changeset 5:f762bf195c4b

import spandsp-0.0.3
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 16:00:21 +0200
parents 26cd8f1ef0b1
children 22a74b01a099
files spandsp-0.0.3/COPYING spandsp-0.0.3/README.txt spandsp-0.0.3/spandsp-0.0.3/AUTHORS spandsp-0.0.3/spandsp-0.0.3/COPYING spandsp-0.0.3/spandsp-0.0.3/ChangeLog spandsp-0.0.3/spandsp-0.0.3/DueDiligence spandsp-0.0.3/spandsp-0.0.3/INSTALL spandsp-0.0.3/spandsp-0.0.3/Makefile spandsp-0.0.3/spandsp-0.0.3/Makefile.am spandsp-0.0.3/spandsp-0.0.3/Makefile.in spandsp-0.0.3/spandsp-0.0.3/NEWS spandsp-0.0.3/spandsp-0.0.3/README spandsp-0.0.3/spandsp-0.0.3/aclocal.m4 spandsp-0.0.3/spandsp-0.0.3/config-h.in spandsp-0.0.3/spandsp-0.0.3/config.log spandsp-0.0.3/spandsp-0.0.3/config.status spandsp-0.0.3/spandsp-0.0.3/config/config.guess spandsp-0.0.3/spandsp-0.0.3/config/config.sub spandsp-0.0.3/spandsp-0.0.3/config/depcomp spandsp-0.0.3/spandsp-0.0.3/config/install-sh spandsp-0.0.3/spandsp-0.0.3/config/ltmain.sh spandsp-0.0.3/spandsp-0.0.3/config/missing spandsp-0.0.3/spandsp-0.0.3/configure spandsp-0.0.3/spandsp-0.0.3/configure.ac spandsp-0.0.3/spandsp-0.0.3/doc/Makefile spandsp-0.0.3/spandsp-0.0.3/doc/Makefile.am spandsp-0.0.3/spandsp-0.0.3/doc/Makefile.in spandsp-0.0.3/spandsp-0.0.3/doc/css.css spandsp-0.0.3/spandsp-0.0.3/doc/libspandsp-doxygen spandsp-0.0.3/spandsp-0.0.3/itutests/Makefile spandsp-0.0.3/spandsp-0.0.3/itutests/Makefile.am spandsp-0.0.3/spandsp-0.0.3/itutests/Makefile.in spandsp-0.0.3/spandsp-0.0.3/itutests/fax/Makefile spandsp-0.0.3/spandsp-0.0.3/itutests/fax/Makefile.am spandsp-0.0.3/spandsp-0.0.3/itutests/fax/Makefile.in spandsp-0.0.3/spandsp-0.0.3/itutests/fax/generate_dithered_tif.c spandsp-0.0.3/spandsp-0.0.3/itutests/fax/generate_sized_pages.c spandsp-0.0.3/spandsp-0.0.3/libspandsp.vcproj spandsp-0.0.3/spandsp-0.0.3/libtool spandsp-0.0.3/spandsp-0.0.3/spandsp.spec spandsp-0.0.3/spandsp-0.0.3/spandsp.spec.in spandsp-0.0.3/spandsp-0.0.3/spandsp/global-tones.xml spandsp-0.0.3/spandsp-0.0.3/spandsp/tones.dtd spandsp-0.0.3/spandsp-0.0.3/src/.deps/adsi.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/async.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/at_dictionary_gen.Po spandsp-0.0.3/spandsp-0.0.3/src/.deps/at_interpreter.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/awgn.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/bell_r2_mf.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/bert.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/bit_operations.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/bitstream.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/complex_dds.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/complex_filters.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/complex_vector_float.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/dds.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/dtmf.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/echo.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/fax.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/fsk.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/g711.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/g722_decode.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/g722_encode.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/g726.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_decode.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_encode.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_long_term.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_lpc.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_preprocess.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_rpe.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_short_term.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/hdlc.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/ima_adpcm.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/logging.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_analyse.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_decode.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_encode.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_placev.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_voicing.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/modem_connect_tones.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/modem_echo.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/noise.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/oki_adpcm.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/playout.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/plc.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/power_meter.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/queue.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/schedule.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/sig_tone.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/silence_gen.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/super_tone_rx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/super_tone_tx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/t30.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/t31.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/t35.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/t38_core.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/t38_gateway.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/t38_terminal.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/t4.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/testcpuid.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/time_scale.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/tone_detect.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/tone_generate.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v17rx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v17tx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v22bis_rx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v22bis_tx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v27ter_rx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v27ter_tx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v29rx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v29tx.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v42.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v42bis.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/v8.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/vector_float.Plo spandsp-0.0.3/spandsp-0.0.3/src/.deps/vector_int.Plo spandsp-0.0.3/spandsp-0.0.3/src/Makefile spandsp-0.0.3/spandsp-0.0.3/src/Makefile.am spandsp-0.0.3/spandsp-0.0.3/src/Makefile.in spandsp-0.0.3/spandsp-0.0.3/src/adsi.c spandsp-0.0.3/spandsp-0.0.3/src/async.c spandsp-0.0.3/spandsp-0.0.3/src/at_dictionary_gen.c spandsp-0.0.3/spandsp-0.0.3/src/at_interpreter.c spandsp-0.0.3/spandsp-0.0.3/src/at_interpreter_dictionary.h spandsp-0.0.3/spandsp-0.0.3/src/awgn.c spandsp-0.0.3/spandsp-0.0.3/src/bell_r2_mf.c spandsp-0.0.3/spandsp-0.0.3/src/bert.c spandsp-0.0.3/spandsp-0.0.3/src/bit_operations.c spandsp-0.0.3/spandsp-0.0.3/src/bitstream.c spandsp-0.0.3/spandsp-0.0.3/src/complex_dds.c spandsp-0.0.3/spandsp-0.0.3/src/complex_filters.c spandsp-0.0.3/spandsp-0.0.3/src/complex_vector_float.c spandsp-0.0.3/spandsp-0.0.3/src/config.h spandsp-0.0.3/spandsp-0.0.3/src/dds.c spandsp-0.0.3/spandsp-0.0.3/src/dtmf.c spandsp-0.0.3/spandsp-0.0.3/src/echo.c spandsp-0.0.3/spandsp-0.0.3/src/fax.c spandsp-0.0.3/spandsp-0.0.3/src/faxfont.h spandsp-0.0.3/spandsp-0.0.3/src/fsk.c spandsp-0.0.3/spandsp-0.0.3/src/g711.c spandsp-0.0.3/spandsp-0.0.3/src/g722_decode.c spandsp-0.0.3/spandsp-0.0.3/src/g722_encode.c spandsp-0.0.3/spandsp-0.0.3/src/g726.c spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_decode.c spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_encode.c spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_local.h spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_long_term.c spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_lpc.c spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_preprocess.c spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_rpe.c spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_short_term.c spandsp-0.0.3/spandsp-0.0.3/src/hdlc.c spandsp-0.0.3/spandsp-0.0.3/src/ima_adpcm.c spandsp-0.0.3/spandsp-0.0.3/src/libspandsp.sln spandsp-0.0.3/spandsp-0.0.3/src/logging.c spandsp-0.0.3/spandsp-0.0.3/src/lpc10_analyse.c spandsp-0.0.3/spandsp-0.0.3/src/lpc10_decode.c spandsp-0.0.3/spandsp-0.0.3/src/lpc10_encdecs.h spandsp-0.0.3/spandsp-0.0.3/src/lpc10_encode.c spandsp-0.0.3/spandsp-0.0.3/src/lpc10_placev.c spandsp-0.0.3/spandsp-0.0.3/src/lpc10_voicing.c spandsp-0.0.3/spandsp-0.0.3/src/modem_connect_tones.c spandsp-0.0.3/spandsp-0.0.3/src/modem_echo.c spandsp-0.0.3/spandsp-0.0.3/src/msvc/gettimeofday.c spandsp-0.0.3/spandsp-0.0.3/src/msvc/inttypes.h spandsp-0.0.3/spandsp-0.0.3/src/msvc/msvcproj.foot spandsp-0.0.3/spandsp-0.0.3/src/msvc/msvcproj.head spandsp-0.0.3/spandsp-0.0.3/src/msvc/spandsp.def spandsp-0.0.3/spandsp-0.0.3/src/msvc/sys/time.h spandsp-0.0.3/spandsp-0.0.3/src/msvc/tgmath.h spandsp-0.0.3/spandsp-0.0.3/src/msvc/unistd.h spandsp-0.0.3/spandsp-0.0.3/src/msvc/vc8proj.foot spandsp-0.0.3/spandsp-0.0.3/src/msvc/vc8proj.head spandsp-0.0.3/spandsp-0.0.3/src/noise.c spandsp-0.0.3/spandsp-0.0.3/src/oki_adpcm.c spandsp-0.0.3/spandsp-0.0.3/src/playout.c spandsp-0.0.3/spandsp-0.0.3/src/plc.c spandsp-0.0.3/spandsp-0.0.3/src/power_meter.c spandsp-0.0.3/spandsp-0.0.3/src/queue.c spandsp-0.0.3/spandsp-0.0.3/src/schedule.c spandsp-0.0.3/spandsp-0.0.3/src/sig_tone.c spandsp-0.0.3/spandsp-0.0.3/src/silence_gen.c spandsp-0.0.3/spandsp-0.0.3/src/spandsp.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/adsi.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/arctan2.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/async.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/at_interpreter.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/awgn.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/bell_r2_mf.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/bert.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/biquad.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/bit_operations.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/bitstream.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/complex.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/complex_filters.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/complex_vector_float.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/dc_restore.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/dds.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/dtmf.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/echo.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/fax.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/fir.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/fsk.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/g168models.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/g711.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/g722.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/g726.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/gsm0610.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/hdlc.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/ima_adpcm.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/logging.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/lpc10.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/mmx.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/modem_connect_tones.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/modem_echo.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/noise.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/oki_adpcm.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/playout.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/plc.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/power_meter.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/queue.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/schedule.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/sig_tone.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/silence_gen.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/super_tone_rx.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/super_tone_tx.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t30.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t30_fcf.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t31.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t35.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t38_core.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t38_gateway.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t38_terminal.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t4.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/telephony.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/time_scale.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/timing.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/tone_detect.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/tone_generate.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v17rx.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v17tx.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v22bis.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v27ter_rx.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v27ter_tx.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v29rx.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v29tx.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v42.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v42bis.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v8.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/vector_float.h spandsp-0.0.3/spandsp-0.0.3/src/spandsp/vector_int.h spandsp-0.0.3/spandsp-0.0.3/src/stamp-h1 spandsp-0.0.3/spandsp-0.0.3/src/super_tone_rx.c spandsp-0.0.3/spandsp-0.0.3/src/super_tone_tx.c spandsp-0.0.3/spandsp-0.0.3/src/t30.c spandsp-0.0.3/spandsp-0.0.3/src/t31.c spandsp-0.0.3/spandsp-0.0.3/src/t35.c spandsp-0.0.3/spandsp-0.0.3/src/t38_core.c spandsp-0.0.3/spandsp-0.0.3/src/t38_gateway.c spandsp-0.0.3/spandsp-0.0.3/src/t38_terminal.c spandsp-0.0.3/spandsp-0.0.3/src/t4.c spandsp-0.0.3/spandsp-0.0.3/src/t4states.h spandsp-0.0.3/spandsp-0.0.3/src/testcpuid.c spandsp-0.0.3/spandsp-0.0.3/src/time_scale.c spandsp-0.0.3/spandsp-0.0.3/src/tone_detect.c spandsp-0.0.3/spandsp-0.0.3/src/tone_generate.c spandsp-0.0.3/spandsp-0.0.3/src/v17rx.c spandsp-0.0.3/spandsp-0.0.3/src/v17tx.c spandsp-0.0.3/spandsp-0.0.3/src/v22bis_rx.c spandsp-0.0.3/spandsp-0.0.3/src/v22bis_tx.c spandsp-0.0.3/spandsp-0.0.3/src/v27ter_rx.c spandsp-0.0.3/spandsp-0.0.3/src/v27ter_tx.c spandsp-0.0.3/spandsp-0.0.3/src/v29rx.c spandsp-0.0.3/spandsp-0.0.3/src/v29tx.c spandsp-0.0.3/spandsp-0.0.3/src/v42.c spandsp-0.0.3/spandsp-0.0.3/src/v42bis.c spandsp-0.0.3/spandsp-0.0.3/src/v8.c spandsp-0.0.3/spandsp-0.0.3/src/vector_float.c spandsp-0.0.3/spandsp-0.0.3/src/vector_int.c spandsp-0.0.3/spandsp-0.0.3/tests/.deps/adsi_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/async_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/at_interpreter_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/awgn_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/bell_mf_rx_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/bell_mf_tx_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/bert_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/bit_operations_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/dc_restore_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/dds_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/dtmf_rx_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/dtmf_tx_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/echo_monitor.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/echo_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/fax_decode.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/fax_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/fsk_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/g168_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/g711_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/g722_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/g726_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/gsm0610_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/hdlc_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/ima_adpcm_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/ip_network_model.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/line_model.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/line_model_monitor.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/line_model_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/logging_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/lpc10_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/make_g168_css.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/make_line_models.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/modem_connect_tones_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/modem_echo_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/modem_monitor.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/noise_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/oki_adpcm_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/playout_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/plc_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/power_meter_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/r2_mf_rx_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/r2_mf_tx_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/schedule_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/sig_tone_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/super_tone_rx_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/super_tone_tx_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t31_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t38_gateway_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t38_gateway_to_terminal_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t38_terminal_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t38_terminal_to_gateway_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t4_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/test_utils.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/testadsi.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/testfax.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/time_scale_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/tone_generate_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v17_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v22bis_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v27ter_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v29_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v42_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v42bis_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v8_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/vector_float_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/.deps/vector_int_tests.Po spandsp-0.0.3/spandsp-0.0.3/tests/Makefile spandsp-0.0.3/spandsp-0.0.3/tests/Makefile.am spandsp-0.0.3/spandsp-0.0.3/tests/Makefile.in spandsp-0.0.3/spandsp-0.0.3/tests/adsi_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/async_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/at_interpreter_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/awgn_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/bell_mf_rx_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/bell_mf_tx_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/bert_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/bit_operations_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/dc_restore_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/dds_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/dtmf_rx_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/dtmf_tx_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/echo_dump.m spandsp-0.0.3/spandsp-0.0.3/tests/echo_monitor.cpp spandsp-0.0.3/spandsp-0.0.3/tests/echo_monitor.h spandsp-0.0.3/spandsp-0.0.3/tests/echo_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/fax_decode.c spandsp-0.0.3/spandsp-0.0.3/tests/fax_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/fax_tests.sh spandsp-0.0.3/spandsp-0.0.3/tests/fsk_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/g168_quick.sh spandsp-0.0.3/spandsp-0.0.3/tests/g168_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/g168_tests.sh spandsp-0.0.3/spandsp-0.0.3/tests/g711_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/g722_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/g726_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/gsm0610_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/hdlc_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/ima_adpcm_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/ip_network_model.c spandsp-0.0.3/spandsp-0.0.3/tests/ip_network_model.h spandsp-0.0.3/spandsp-0.0.3/tests/levels.png_large.png spandsp-0.0.3/spandsp-0.0.3/tests/line_model.c spandsp-0.0.3/spandsp-0.0.3/tests/line_model.h spandsp-0.0.3/spandsp-0.0.3/tests/line_model_monitor.cpp spandsp-0.0.3/spandsp-0.0.3/tests/line_model_monitor.h spandsp-0.0.3/spandsp-0.0.3/tests/line_model_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/line_models.h spandsp-0.0.3/spandsp-0.0.3/tests/logging_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/lpc10_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/make_g168_css.c spandsp-0.0.3/spandsp-0.0.3/tests/make_line_models.c spandsp-0.0.3/spandsp-0.0.3/tests/modem_connect_tones_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/modem_echo_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/modem_monitor.cpp spandsp-0.0.3/spandsp-0.0.3/tests/modem_monitor.h spandsp-0.0.3/spandsp-0.0.3/tests/noise_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/oki_adpcm_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/playout_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/plc_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/power_meter_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/r2_mf_rx_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/r2_mf_tx_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/regression_tests.sh spandsp-0.0.3/spandsp-0.0.3/tests/residue_sound.wav spandsp-0.0.3/spandsp-0.0.3/tests/result_sound.wav spandsp-0.0.3/spandsp-0.0.3/tests/schedule_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/sig_tone_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/sound_c1_8k.wav spandsp-0.0.3/spandsp-0.0.3/tests/sound_c3_8k.wav spandsp-0.0.3/spandsp-0.0.3/tests/super_tone_rx_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/super_tone_tx_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/t31_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/t38_gateway_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/t38_gateway_to_terminal_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/t38_terminal_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/t38_terminal_to_gateway_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/t4_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/test_utils.c spandsp-0.0.3/spandsp-0.0.3/tests/test_utils.h spandsp-0.0.3/spandsp-0.0.3/tests/testadsi.c spandsp-0.0.3/spandsp-0.0.3/tests/testfax.c spandsp-0.0.3/spandsp-0.0.3/tests/time_domain.png_large.png spandsp-0.0.3/spandsp-0.0.3/tests/time_scale_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/tone_generate_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/v17_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/v22bis_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/v27ter_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/v29_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/v42_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/v42bis_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/v42bis_tests.sh spandsp-0.0.3/spandsp-0.0.3/tests/v8_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/vector_float_tests.c spandsp-0.0.3/spandsp-0.0.3/tests/vector_int_tests.c spandsp-0.0.3/spandsp-0.0.3/wrapper.xsl spandsp-0.0.3/user/Makefile spandsp-0.0.3/user/pl.m spandsp-0.0.3/user/sample.c spandsp-0.0.3/user/speedtest.c spandsp-0.0.3/user/tfir.c
diffstat 437 files changed, 240104 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/COPYING	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 of the License, 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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/README.txt	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,767 @@
+Open Source Line Echo Canceller (OSLEC)
+=======================================
+
+[[introduction]]
+Introduction
+------------
+
+Oslec is an open source high performance line echo canceller.  When
+used with Asterisk it works well on lines where the built-in Zaptel
+echo canceller fails.  No tweaks like rxgain/txgain or fxotrain are
+required.  Oslec is supplied as GPL licensed C source code and is free
+as in speech.
+
+Oslec partially complies with the G168 standard and runs in real time
+on x86 and Blackfin platforms.  Patches exist to allow any Zaptel
+compatible hardware to use Oslec.  It has been successfully tested on
+hardware ranging from single port X100P FXO cards to dual E1 systems.
+Hardware tested includes TDM400, X100P, Sangoma A104, Rhino E1 etc.
+It also works well on the link:ip04.html[IP04 embedded Asterisk
+platform].
+
+There is also a project underway to use
+http://peter.schlaile.de/mISDN/[OSLEC with mISDN].
+
+Oslec is included in many distributions, including Debian, Gentoo,
+Trixbox, Elastix, and Callweaver.
+
+[[testimonials]]
+Testimonials
+------------
+
+So how good is Oslec?  
+
++ The http://www.trixbox[Trixbox] community have been testing
+Oslec, here is a
+http://www.trixbox.org/forums/trixbox-forums/open-discussion/need-people-echo-problems[Trixbox
+forum thread] that has feedback from many people.  Start about half
+way down the page, or search on the string "night and day" :-)
+
++ The http://callweaver.org/wiki/Zaptel[CallWeaver] project use and recommend Oslec.
+
++ Here is some feedback from Oslec users:
+
+[Gordon Henderson, posted in the  Asterisk-user mailing list July 21 2008]
+
+________________________________________________________________________
+I switched to OSLEC after testing HPEC on TDM400 boards, and found that it 
+worked much better and wasn't limited to the restricted mechanism Digium 
+uses for licensing (unlikely as it sounds, I have some clients who do not 
+have a connection to the public Internet, and never will for their phone 
+system)
+
+It also passes the wife test which HPEC didn't.
+
+It's also free (OS as in Open Source), which HPEC isn't, although that 
+wasn't my primary reason for using it - ease of use and "workability" was.
+_____________________________________________________________________
+
+[Michael Gernoth, Author of the Zaptel MG2 echo canceller]
+
+________________________________________________________________________
+Thanks for OSLEC, it's so much better than my hacked KB1 which is called
+MG2 :-)
+_____________________________________________________________________
+
+[David Gottschalk]
+
+________________________________________________________________________
+Once I managed to get OSLEC installed (it was a big job for me, because I was
+missing many of the dependancies and knowledge), it immediately fixed the echo
+problems I had been unable to get rid of to date despite lots and lots of
+tweeks, tests and fiddling.  Even more suprisingly, it appears to converge
+almost immediately from my initial test.
+
+This code is the best since thing since, well, Asterisk !!!
+_____________________________________________________________________
+
+[Nic Bellamy, Head Of Engineering; Vadacom Ltd]
+
+________________________________________________________________________
+Short version: KB1 < MG2 < OSLEC < HPEC
+
+In the open source line echo canceller category, OSLEC is so far the 
+best I've seen.
+
+It converges reasonably fast, and thanks to it's dual-path approach, 
+will converge, albeit a bit slowly, on nasty echo paths where cancellers 
+like KB1 and MG2 will fail entirely.
+
+The nonlinear processor and comfort noise generator provide for a far 
+more pleasant listening experience than KB1/MG2.
+
+It's not quite up to the grade of ADT's G.168 canceller used in Digiums 
+HPEC product in terms of convergence speed or tail coverage.
+_____________________________________________________________________
+
+[Pawel Pastuszak, Astfin.org]
+
+________________________________________________________________________
+Since I installed the first version of OSLEC I was hooked.... It's
+been several months now since the alpha version was released; after
+using OSLEC Mark and I agreed that we had to have OSLEC as the main
+echo cancellation in the Astfin distribution.
+________________________________________________________________________
+                                                                             
+[Pavel Selivano, Parabel Ltd]
+
+________________________________________________________________________
+I've been working with Oslec since March of 2007.  Oslec has had some
+problems, but, thanks to David, they are solved.  Now, I can say Oslec
+is time-tested.  The best, I can note - it is still under development
+(with feed-back).  Thank you David for your good deed.
+
+BTW: comparison to Intel IPP's echo canceler have shown, Oslec is very
+good :-)
+________________________________________________________________________
+
+
+[[news]]
+Oslec News
+----------
+
++ Saturday, June 7, 2008: We have worked out how to use <<rhino,Oslec with
+Rhino>> PRI cards.  Thanks Juan Manuel Coronado!
+
++ Friday, May 16, 2008: Oslec Road Map.  I have kicked off a
+discussion of the
+http://sourceforge.net/mailarchive/forum.php?thread_name=1210895745.7127.60.camel%40localhost&forum_name=freetel-oslec[development
+roadmap] for Oslec.  Is hardware echo cancellation headed for
+extinction?
+
++ Friday, May 16, 2008: Oslec chosen as the **default**
+http://sourceforge.net/mailarchive/forum.php?thread_name=20080515131239.GJ27523%40xorcom.com&forum_name=freetel-oslec[echo
+canceler for Debian].  Thanks Tzafrir for your work on packaging Oslec
+for Debian!
+
++ Tuesday, May 13, 2008: link:/blog/?p=64[Oslec versus the SPA 3000]
+ATA.  A blog post comparing the SPA 3000 echo cancellation to Oslec on
+a problem FXO line.
+
++ Wednesday, February 11, 2008: Oslec mailing list created.  Due to
+popular demand (well, Tzafrir mainly!) there is now an
+https://lists.sourceforge.net/lists/listinfo/freetel-oslec[Oslec
+mailing list].
+
++ Sunday, February 10, 2008: Zaptel 1.4.8 patch checked into SVN,
+thanks Tzafrir.
+
+[[install]]
+Installing  OSLEC with Asterisk/Zaptel
+--------------------------------------
+
+Notes:
+
++ This process also installs a system for sampling echo signals that
+  is helpful for developing oslec.
+
++ I assume Asterisk is already installed and tested.
+
++ I assume you are running Linux 2.6 and Zaptel 1.2.13 or a later
+  1.2/1.4 version of Zaptel.
+
++ I assume you are using a Digium TDM400 line interface card.  Change
+  the "insmod wctdm.ko" line below to match your line interface
+  hardware (e.g. wcfxo for a X100P).
+
++ For Zaptel 1.4.x replace the 1.2.13 text below 1.4.x (tar ball and
+  patch file).
+
++ For Linux 2.4 replace the "insmod moduleXYZ.ko" lines below with
+  "insmod moduleXYZ.o".
+
+1/ Download, build and install oslec:
+
+  $ cd ~
+  $ wget http://www.rowetel.com/ucasterisk/downloads/oslec-0.1.tar.gz
+  $ tar xvzf oslec-0.1.tar.gz
+  $ cd oslec-0.1
+  $ make
+  $ insmod kernel/oslec.ko 
+
+Optional: If you want the latest and greatest, replace the "wget" step
+with:
+
+  $ svn co http://svn.astfin.org/software/oslec/trunk/ oslec
+
+NOTE: There are patches for Zaptel 1.2.13, 1.2.18, 1.2.24, 1.4.1,
+1.4.3, 1.4.4, 1.4.7.1, 1.4.8, 1.4.9.2 and 1.4.11.  It's quite easy to
+port to other versions, please feel free to send me a new patch should
+you get Oslec working with another Zaptel version.  If you can't see a
+patch for your Zaptel version try
+http://svn.astfin.org/software/oslec/trunk/kernel[Oslec SVN] for the
+latest patches.
+
+2/ Build, patch and install Zaptel.  First obtain zaptel-1.2.13.tar.gz and:
+
+  $ tar xvzf zaptel-1.2.13.tar.gz
+  $ cd zaptel-1.2.13
+  $ ./configure
+  $ patch < ../oslec-0.1/kernel/zaptel-1.2.13.patch    (see note 1 below)
+  $ cp ../oslec-0.1/kernel/dir/Module.symvers .        (see note 2 below)
+  $ make
+  $ insmod zaptel.ko
+  $ insmod wctdm.ko 
+  $ ./ztcfg
+  $ asterisk
+
+NOTE: 1: Use -p1 option for zaptel-1.4.9.2 and above
+
+NOTE: 2: The "cp Module.symvers" step above is optional on many systems;
+it stops warnings like WARNING: "oslec_echo_can_create" [zaptel.ko]
+undefined!". However on some Linux machines zaptel will not compile
+without this step.
+
+3/ These options in zapata.conf are important:
+
+---------------------------------------------------------------------
+    echocancel=yes
+    echocancelwhenbridged=no
+    ;echotraining=400
+---------------------------------------------------------------------
+
+The *echocancelwhenbridged=no* allows faxes to pass from FXS to FXO
+ports without interference from the echo canceller.  This option is
+important for fax signals.
+
+Make sure *echotraining* is disabled when using Oslec - this is not
+supported and if enabled will cause the channel to be silent (i.e. no
+audio will pass through).
+
+4/ The settings above have been shown to reliably cancel echo in 95%
+of cases.  If you can still hear echo you may have one of the rare
+cases where your echo is longer than 16ms.  To configure Oslec with a
+32ms tail:
+
+---------------------------------------------------------------------
+    echocancel=256
+    echocancelwhenbridged=no
+    ;echotraining=400
+---------------------------------------------------------------------
+
+Then restart Asterisk.
+
+[[pbxinaflash]]
+PBX in a Flash Install
+----------------------
+
+Here are the
+http://pbxinaflash.com/forum/showthread.php?t=100&page=3[Oslec install
+procedure] for PBX in a Flash. Check the 7-24-08 post in this thread
+by Alex728 for Zaptel-1.4.11 instructions.  Thanks JD Austin and Alex.
+
+Matt Keys has suggested that the PBX in a Flash install procedure also
+worked well for Ubuntu server.
+ 
+[[rhino]]
+Rhino PRI cards
+---------------
+
+The rhino-2.2.6 driver for Rhino PRI cards has software echo
+cancellation disabled by default.  This means there is no echo
+cancellation unless you opt for the Rhino hardware echo cancellation
+module.  However the driver is easy to hack to enable software echo
+cancellation, and hence Oslec.
+
+In the rhino-2.2.6 driver, file r1t1_base.c, r1t1_receiveprep
+function, around line 800:
+
+---------------------------------------------------------------------
+static void r1t1_receiveprep(struct r1t1 *rh, int nextbuf)
+{
+/*
+    int x;
+
+    for (x=0;x<rh->span.channels;x++) {
+        zt_ec_chunk(&rh->chans[x], rh->chans[x].readchunk, rh->ec_chunk2[x]);
+        memcpy(rh->ec_chunk2[x],rh->ec_chunk1[x],ZT_CHUNKSIZE);
+        memcpy(rh->ec_chunk1[x],rh->chans[x].writechunk,ZT_CHUNKSIZE);
+    }
+*/
+    zt_receive(&rh->span);
+}
+---------------------------------------------------------------------
+
+**Solution 1:** Simply un-comment the code and rebuild the driver:
+
+---------------------------------------------------------------------
+static void r1t1_receiveprep(struct r1t1 *rh, int nextbuf)
+{
+
+    int x;
+
+    for (x=0;x<rh->span.channels;x++) {
+        zt_ec_chunk(&rh->chans[x], rh->chans[x].readchunk, rh->ec_chunk2[x]);
+        memcpy(rh->ec_chunk2[x],rh->ec_chunk1[x],ZT_CHUNKSIZE);
+        memcpy(rh->ec_chunk1[x],rh->chans[x].writechunk,ZT_CHUNKSIZE);
+    }
+
+    zt_receive(&rh->span);
+}
+---------------------------------------------------------------------
+
+**Solution 2:** Bob Conklin from Rhino has suggested this fix that
+they have in SVN trunk:
+
+---------------------------------------------------------------------
+static void r1t1_receiveprep(struct r1t1 *rh, int nextbuf)
+{
+    if (!rh->dsp_up)
+        zt_ec_span(&rh->span);
+    zt_receive(&rh->span);
+}
+---------------------------------------------------------------------
+
+This version automatically falls back to software echo cancellation if
+the DSP-based hardware echo cancellation is not present.  Thanks
+Bob!
+
+[[status]]
+Status
+------
+
+Current status is considered *Stable*.  As of 3 January 2008:
+
++ Thousands of people (estimated) using Oslec on x86 platforms now.
+Oslec is stable and works well.  Oslec has been included in many
+distributions, including Debian, Gentoo, Trixbox, Elastix, and
+Callweaver.
+
++ Oslec works well on many different types of hardware, from single
+port $10 X100P cards to dual E1s.
+
++ Oslec has been partially optimised for the embedded Blackfin
+DSP/RISC CPU and now runs in real time on the link:ip04.html[IP04 Open
+Hardware IP-PBX].  Running on several hundred IP04s now.
+
++ Real time runs well on FXO/FXS lines where the other Zaptel echo
+cancellers (including the latest MG2) struggle.  No tweaks like
+levels, fxotrain, or even opermode required so far.  Hardware used for
+tests was a TDM400 and X100P card.
+
++ The simulation code passes many but not all of the G168 tests.
+Some problems with high level signals near 0dBm0 and some of the G168
+echo models.  Passes maybe 90% of the tests attempted so far, however
+not all of the tests and/or range of test conditions have been
+attempted yet.  The fails are close calls (like a few dB off), not
+complete breakdowns of the algorithm.
+
++ Oslec has been specifically developed to work with low cost line
+interface hardware like the X100P.  The X100P has problems with 60Hz
+hum and DC offset in the rx signal, which interfere with the echo
+canceller algorithm.  However with the addition of some high pass
+filters good results with X100P cards have been obtained using Oslec.
+Line interfaces based on chips such as those from Silicon Labs
+(e.g. the TDM400) have no DC offset or hum which is one reason they
+tend to perform better.
+
++ Oslec has been optimised to deal with specific problems encountered
+with soft phone clients.  Due to the high quality microphones and
+sound blaster hardware used on PCs, more low frequency energy is
+present compared to normal telephone signals.  When this low frequency
+energy is sent to a hybrid it can force the hybrid into a non linear
+mode.  Echo cancellers assume a linear hybrid so any non-linearities
+make the echo canceller fall over.  The solution is to high pass
+filter energy sent to the hybrid to ensure excessive low frequency
+energy is removed.  This means inserting a HP filter in the tx path.
+
+[[directories]]
+Directories
+-----------
+
+The http://svn.astfin.org/software/oslec/trunk/[Oslec SVN repository]
+combines several projects (mainly spandsp) used to develop, test, and
+run oslec.
+
+spandsp : A subset of spandsp to support testing and development of
+	  Oslec.  The echo canceller and G168 test suite source code
+	  live in here.
+
+user....: User mode apps, e.g. sampling of echo signals and a unit
+          test for measuring the execution speed of Oslec.
+
+kernel..: Builds Oslec into a kernel module.  Also contains patches for
+	  Zaptel to allow the use of Oslec.
+
+[[diagnostics]]
+Run Time Information
+--------------------
+
+Set up a call that uses an analog port, then check out /proc/oslec for
+real-time stats:
+
+  [root@homework kernel]# cat /proc/oslec/info
+  channels....: 1
+  mode........: [13] |ADAPTION|NLP|CNG|
+  Ltx.........: 0
+  Lrx.........: 211
+  Lclean......: 211
+  Lclean_bg...: 211
+  shift.......: 0
+  Double Talk.: 1
+  MIPs (last)....: 1
+  MIPs (worst)...: 7
+  MIPs (avergage): 1
+
+You can turn the various mode switches off and on, for example:
+
+   echo 9 > /proc/oslec/mode
+
+turns off comfort noise, but keeps ADAPT and NLP on.  The mode
+switches are listed in the
+http://svn.astfin.org/software/oslec/trunk/spandsp-0.0.3/src/spandsp/echo.h[echo.h]
+header file (#define ECHO_CAN_USE_*).  The /proc interface only
+monitors the first Zaptel call you bring up, see
+http://svn.astfin.org/software/oslec/trunk/kernel/oslec_wrap.c[oslec_wrap.c]
+for more information.
+   
+There is a GUI for run-time control of Oslec, called the Oslec Control
+Panel.  For example you can Enable and Disable the echo canceller in
+real time, as you are speaking.  If you Reset the echo canceller you
+can hear how long it takes to converge again.
+
+NOTE: The command line tool *dialog* must be installed on your system
+to use the Oslec Control Panel.
+
+  $ cd kernel
+  $ ./oslec-ctrl-panel.sh 
+
+image::/images/echo/oslec_control_panel.png[Oslec Control Panel]
+
+[[speed]]
+Execution Speed and Optimisation
+--------------------------------
+
+In the user directory there is a
+http://svn.astfin.org/software/oslec/trunk/user/speedtest.c[speedtest.c]
+program that measures how many MIPs the echo canceller consumes and
+estimates how many cancellers can run in real time.  The current x86
+code is vanilla C and could be greatly improved with MMX or SSE
+optimisations, some of which are already coded in spandsp.  There is
+also much that can be done to improve execution speed on the Blackfin.
+
+Steve's spandsp code includes some support for MMX and SSE2
+optimisation.  Define USE_MMX or USE_SSE2 in the Makefile to use this
+option.  At this stage only the fir.h filter code is optimised, oslec
+would run much faster if lms_adapt_bg() in echo.c was also ported to
+MMX/SSE2.  With USE_MMX defined, the speedtest.c program dropped from
+33 MIPs to 20 MIPs per channel for 256 taps/32ms.  If using MMX in the
+kernel (e.g. with zaptel) make sure you compile zaptel with
+CONFIG_ZAPTEL_MMX to ensure the FPU state is saved in the right
+places.  
+
+To enable MMX/SSE modify this line of oslec/kernel/Makefile:
+
+----------------------------------------------
+
+all::
+        $(MAKE) -C $(KDIR) EXTRA_CFLAGS='$(KINCLUDE) \
+        -DUSE_MMX -DUSE_SSE2 -DEXPORT_SYMTAB -O6' \
+        SUBDIRS=$(PWD) modules
+
+----------------------------------------------
+
+Thanks Nic Bellamy for help in testing MMX and Ming-Ching Tiew for
+providing the correct command line for compiling with MMX/SSE.
+
+Some notes on further optimisation:
+
+1/ How do lots of MIPs in ISR affect total system performance?  For
+example if we are using 25% of MIP in ISR does * still run OK?  Find the
+CPU load knee different for user versus kernel mode cycles
+consumption.
+
+2/ Estimated Oslec MIPs are 5(N)(Fs), N is the filter size (number of
+taps), Fs=8000 is the sampling rate.  Factor of 5 is comprised of 1
+for each FIR filter (forgeround and background), 2 for LMS, 1 for overhead.
+This suggests that when optimised around 10 MIPs for a 32ms tail.
+
+3/ There are some more notes on optimisation for the Blackfin in
+http://svn.astfin.org/software/oslec/trunk/spandsp-0.0.3/src/echo.c[echo.c].
+
+[[credits]]
+Background and Credits
+----------------------
+
+Oslec started life as a prototype echo canceller and G168 test
+framework from Steve Underwood's http://www.soft-switch.org/[Spandsp]
+library.  Steve wrote much of the DSP code used in Asterisk, and the
+Zaptel echo cancellation code is heavily based on his work.
+
+Using the Spandsp G168 test framework, a high performance echo
+canceller has been developed and carefully tested.  Working together
+with alpha testers the performance was brought to a beta state in June
+2005.  <<links,More>>.  Since then many thousands of people have
+installed Oslec.
+
+Thanks to Steve Underwood, Jean-Marc Valin, and Ramakrishnan
+Muthukrishnan for their suggestions and email discussions.  Thanks
+also to those people who collected echo samples for me such as Mark,
+Pawel, and Pavel.  Thanks Nic Bellamy for help with testing,
+explanation of long path issues, and MMX support.  Thanks Tzafrir for
+testing and patches/enhancements and Dmitry for help with
+multithreaded and locking issues.
+
+Thanks Vieri for finding a circuit with a tail > 32ms, and Patrick for
+submitting a Zaptel 1.2.18 patch.  Thanks Dave Fullerton and Carlton
+O'Riley for Zaptel 1.4.3/1.4.4 patches.  Thanks Bill Salibrici for
+finding a memory leak. Thanks Michael E. Kromer for submitting a
+Zaptel 1.4.7.1 patch, and Tzafrir for the Zaptel 1.4.8 patch.  Thanks
+Russ Price for the Zaptel 1.2.24 patch.  Thanks Chris Notley for the
+1.4.11 patch.
+
+Thanks to Peter Schlaile for porting Oslec to mISDN.  Thanks also to
+Kristijan Vrban for sending me some ISDN hardware so I can help with
+the ISDN/Oslec testing!
+
+Thanks to Tzafrir and Faidon for helping debug the muted audio
+problems on 64 bit systems.
+
+Thanks Rudolf E. Steiner for testing Oslec on SMP and multiple E1
+systems.
+
+[[sample]]
+Sampling Zaptel Echo
+--------------------
+
+Introduction
+~~~~~~~~~~~~
+
+I have developed a system for sampling echo on running Zaptel/Asterisk
+systems.  If you do experience any echo with Oslec, please use this
+system to sample the echo, then email the sample files to me.  
+
+See the http://www.rowetel.com/blog/?p=18[Part 1 blog post] for more
+information on sampling echo.
+
+The nice thing about is that it doesn't interfere with your running
+Asterisk system.  If you hear echo at any time you can fire up a
+console and run "sample" to capture real-time data from the Zaptel
+port.
+
+There are other ways to capture audio from a running Asterisk system,
+for example using the built in Asterisk play and record applications.
+However this system is designed to capture *exactly* the signals being
+fed to & from the echo canceller - preserving the exact timing of the
+signals and with no intermediate buffering.  This is very important
+for echo cancellation work - the algorithms depend on an exact timing
+relationship between the transmit and receive signals.
+
+The system simultaneously captures the receive signal both before
+*and* after the echo canceller - something that is difficult to do
+with the built in Asterisk functions due to the location of the echo
+canceller deep in the Zaptel driver.
+
+If you would like to help further develop Oslec, please
+mailto:david_at_rowetel_dot_com[send me] your echo samples! I would
+welcome any samples of your echo signals, for example where the echo
+canceller isn't working well, and also cases where it does work
+well. By comparing the two cases we can learn a lot about the
+strengths and weaknesses of the algorithm.
+
+Installing
+~~~~~~~~~~
+
+1/ Install Oslec ("HowTo - Run OSLEC with Asterisk/Zaptel" section above).
+
+2/ If you would like to use zaptap without oslec change the selected
+   echo canceller in zconfig.c and rebuild/install zaptel.
+
+3/ Compile sample.c:
+
+     # cd user
+     # make
+
+4/ Create a device node.  I used major number 33 as it was
+   free on my PC:
+
+     # mknod -m 666 /dev/sample c 33 0
+
+   If 33 is not free choose a free major number and change the
+   #define SAMPLE_MAJOR in zaptel.c and recompile.
+
+Note it is important to "insmod zaptel.o" from inside the zaptel
+directory and don't forget the ".o" (.ko for Linux 2.6).  Otherwise
+insmod will use the previously installed version of zaptel and
+"sample" won't work.
+
+5/ Make the call to the Zaptel port you wish to sample.  Run
+   sample while talking:
+
+     # ./sample test 1 5
+
+this will create test_tx.raw, test_rx.raw & test_ec.raw. There
+will be a few messages on the console as the driver does it's
+thing, you can check these with dmesg.
+
+6/ You can check your samples by playing them back through your
+   sound card, for example:
+
+     # play -f s -r 8000 -s w test_ec.raw
+
+7/ To convert the raw files to wave files (this is more convenient for playing
+   and processing with the Oslec simulation):
+
+     # sox -t raw -r 8000 -s -w -c 1 test_ec.raw test_ec.wav
+     # play test_ec.wav
+
+8/ There is an Octave script pl.m to help plot the samples:
+    
+     # cp /your/test/samples ~/oslec/user
+     # cd ~/oslec/user
+     # octave
+     octave:1> pl("test")
+
+Configuration
+~~~~~~~~~~~~~
+
++ Zaptel/Asterisk 1.2.13, 1.4.0 or 1.4.1.  However other versions should work
+  OK.
++ Linux 2.4 or 2.6 Kernel
++ Digium TDM400 hardware
++ My zapata.conf for the FXO port under test is something like:
+
+---------------------------------------------------------------------
+    signalling=fxs_ks
+    echocancel=yes
+    ;echocancelwhenbridged=yes
+    ;echotraining=400
+    group=2;
+    conext=incoming
+    channel =>4
+---------------------------------------------------------------------
+ 
+Note echo training is switched off, although this didn't make much
+difference to the FXO Port when using the built-in Zaptel echo
+cancellers. (helped the the FXS port though).  Oslec does not support
+echo training.
+
+[[support]]
+Support
+-------
+
+https://lists.sourceforge.net/lists/listinfo/freetel-oslec[Oslec
+mailing list].
+
+[[further]]
+Further Work
+------------
+
+Here are some ideas for further work.
+
+1/ Make info screen on control panel update each second automatically.
+
+2/ When e/c is reset during a call it converges faster than at start of
+   calls.  This suggests e/c is wandering off into dumb states before
+   the call is connected.  Perhaps disabling adaption until the call
+   is connected would help with faster convergence
+
+3/ Preserving the state of the e/c between calls is also a very good
+   idea, current zaptel design destroys the e/c at the end of a call.
+
+4/ Switch on and test SSE and MMX filter code for x86.  Code LMS
+   update for x86 in SSE or MMX.
+   
+5/ Add a feature to /proc/oslec to extract the current estimated
+   impulse response.  Use gnuplot or Octave to plot it in real time.
+
+6/ Attempt to speed convergence.
+
+7/ Set up test scripts for greater coverage of G168 tests.
+
+8/ If necessary develop a sparse approach to handle 128ms tails.
+
+[[Simulation]]
+HowTo - OSLEC G168 Simulation
+-----------------------------
+
+The simulation form of Oslec is useful for Oslec development.  It is
+much easier to develop using a non-real time, user mode program than
+saying 'Hello,...1,...2,....3" down a telephone line.  The simulation
+dumps internal states while it is running, which can be plotted and
+analysed using Octave.
+
+1. Read spandsp-0.0.3/README and make sure you have installed the
+dependencies like libtiff-devel, libaudiofile-devel, fftw-devel.
+
+2. Make, build, run a test:
+
+  $ cd spandsp-0.0.3; 
+  $ ./configure --enable-tests
+  $ make
+  $ cd tests
+  $ ./echo_tests 2a
+
+3. You can change the echo path model with -m [1..7] (default 1)
+
+4. You can change the ERL with -erl [0..whatever] (default 10.0)
+
+5. You can plot the internal states using Octave:
+
+  $ cd spandsp-0.0.3/echo_tests
+  $ octave
+  octave:1> echo_dump
+
+  The st= and en= statements at the top of echo_dump.m control which
+  part of the waveform is plotted.
+
+6. There are some sequences of tests set up in the script files:
+
+  $ ./g168_quick.sh (useful for a quick sanity test)
+  $ ./g168_tests.sh (more comprehensive set of tests)
+
+7. For more options:
+
+  $ ./echo_tests -h
+
+8. Counting passes (say if u want to see how many tests pass after making
+   a change):
+
+  $ ./g168_tests.sh > lms16bit.txt
+  $ cat lms16bit.txt | grep PASS | wc -l
+
+[[links]]
+Further Reading
+---------------
+
++ http://svn.astfin.org/software/oslec/trunk/spandsp-0.0.3/src/echo.c[echo.c]
+is the heart of the Oslec echo canceller.
+
+There are several blog posts documenting the development of Oslec:
+
++ http://www.rowetel.com/blog/?p=18[Part 1 - Introduction] discusses the myth
+of hardware echo cancellation and the concept of an echo canceller
+developed using echo samples collected by a community.
+
++ http://www.rowetel.com/blog/?p=21[Part 2 - How Echo Cancellers Work]
+is an easy to read introduction to echo cancellation for C programmers.
+
++ http://www.rowetel.com/blog/?p=22[Part 3 - Two Prototypes] discusses
+two algorithms that were developed as candidates for Oslec.  This is a
+fairly "hard core" DSP post - some familiarity with echo cancellers is
+assumed.
+
++ http://www.rowetel.com/blog/?p=23[Part 4 - First Phone calls] talks
+about the very first real-world phone calls made using Oslec.
+
++ http://www.rowetel.com/blog/?p=33[Part 5 - Ready for Beta Testing].
+Walks through some of the alpha testing bugs and how they were fixed,
+discusses open development methods and the need for 128ms tails.
+
+Some useful links:
+
++ Ochiai, Areseki, and Ogihara, "Echo Canceller with Two Echo Path
+Models", IEEE Transactions on communications, COM-25, No. 6, June 1977. 
+http://www.rowetel.com/images/echo/dual_path_paper.pdf[download].
+
++ The classic, very useful paper that tells you how to actually build
+a real world echo canceller: Messerschmitt, Hedberg, Cole, Haoui,
+Winship, "Digital Voice Echo Canceller with a
+TMS320020. http://www.rowetel.com/images/echo/spra129.pdf[download].
+
++ A nice
+http://en.wikipedia.org/wiki/Least_mean_squares_filter[introduction to
+LMS filters].
+
++ Good introduction to http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/voipsol/ea_isd.htm[echo on VOIP calls] from Cisco.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/AUTHORS	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1 @@
+Steve Underwood <steveu@coppice.org>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/COPYING	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 of the License, 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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/ChangeLog	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,44 @@
+06.05.23 - 0.0.3 - Steve Underwood <steveu@coppice.org>
+    - T.38 now implemented, though it needs further polishing.
+    - G.726 and G.722 now implemented.
+
+04.08.29 - 0.0.2 - Steve Underwood <steveu@coppice.org>
+    - T.4 no longer uses libtiff for compresion and decompression on the line side
+      (it is still used to handle the TIFF files). Spandsp no longer depends on
+      accessing the "internals" of libtiff. New 1D and 2D compression and
+      decompression code now handles the line side. This should be more robust than
+      using libtiff, and handles the fudging of bad scan lines rather better.
+    - T.30 line turn-around timing corrected.
+    - T.30 DCS header contents corrected.
+    - T.30 provision for V.17 added, as an option.
+    - T.30 now has a statistics interface, for applications to find details about
+      image transfers.
+    - T.30 processing now correctly closes TIFF files are they have been sent.
+    - FAX header line insertion is now supported for transmitted FAXes.
+    - asynchronous serial processing now has a V.14 compatible rate adaption option.
+    - V.8 modem negotiation module added.
+    - OKI ADPCM now supports Dialogic compatible operation at 6k samples/second, as
+      well as 8k samples/second, using its own sample rate converter.
+    - message queuing added to ease things like T.31 handling
+    - incomplete skeleton (still rather nasty, to be honest) T.31 processing.
+    - incomplete skeleton of V.22bis added. There is probably quite a bit to do
+      to get this complete and robust. It probably requires the T.31 processing
+      be expanded to something more like V.250, so it doesn't just handle FAX.
+    - Incomplete V.17 added (there could be an IBM patent related to the TCM part of
+      V.17, but I think it has expired. Don't distribute binaries of spandsp built
+      with V.17 enabled until this is resolved - and the modem is completed, of
+      course :-) ). The current version transmits OK. It receives OK with the
+      long training sequence, but the symbol and carrier syncing isn't good enough
+      for robust receiving with the short training sequence.
+    - A basic BER tester has been added.
+    - The faster modems now have proper shutdown procedures, whether one is defined in
+      the spec. or not.
+    - The modems (except simple FSK) now have APIs to access performance information.
+    - A common GUI (using FLTK) added for the modem tests.
+    - A bit more documentation added.
+    - Some API inconsistencies cleaned up.
+    - The usual bundle of assorted buglet fixes and polishing.
+
+04.04.29 - 0.0.1k - Steve Underwood <steveu@coppice.org>
+    - The first version which gives solid faxing for a large number of people.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/DueDiligence	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,55 @@
+Intellectual Property Due Diligence
+-----------------------------------
+
+Modems and voice coding are heavily patented areas. Implementing these without
+serious consideration of IP issues would be foolish. This document describes
+the basis on which the software has been implemented.
+
+
+A check of the intellectual property information at the ITU web site shows a
+number of patent claims against the current standards implemented by spandsp.
+It is important to realise, however, that some of these patents have long
+since expired (group III fax dates back to the 1970s). Also, many are
+related to recent additions to the FAX standard, such as colour FAX handling,
+which few people ever use.
+
+The V.14 rate adaption standard seems free of patent encumberance.
+
+One patent is listed as relevant to the V.17 standard. It is a patent from
+IBM, but the ITU database does not specify its nature. I believe it is
+related to the trellis coding used, and I think it has expired. I do not
+know for sure. The techniques used in the implementation should be free of
+patent encumberance. Most of the implementation is similar to the V.29
+modem. The key addition the trellis code processing. The trellis encoding
+is trivial. The decoding uses Viterbi techniques, which are quite old.
+
+The V.21 standard dates from the 1950s. The V.23 standard is also very old.
+There is no possibility that any patents related to it are still in force.
+However, the implementation also needs to be free of patented techniques.
+The implementation only uses very mature numerical oscillator and quadrature
+correlation techniques, so there should be no patent issues.
+
+Only one patent is listed as relevant to the V.29 standard. This dates from
+the 1970s, and must have expired. The modem has been implemented using only
+very mature techniques, none of which can be less than 20 years old. There
+seem no possibility, therefore, that any patents are still in force related
+to the techniques used.
+
+Some aspect of the V.8 standard seems to have patents associated with it,
+according to the ITU patent database. I am unclear what these are. V.8 is a
+very simple standard. There seems to be nothing innovative about it.
+
+Many patents are listed as relevant to the T.30 standard. However, they all
+appear to relate to newer features, such as colour FAX, added in recent years.
+The current implementation only covers the original features from the late
+1970s, where there appear to be patent issues.
+
+The T.4 standard defines the image compression and decompression techniques
+used for group 3 FAXes. The spandsp implementation is based on code derived
+from freely available implementations of T.4. These have existed for a number
+of years without IP issues. The standard is old enough for any patents to have
+expired, anyway.
+
+V.42bis compression uses the LZW algorithm. This is the same algorithm used in
+GIF files. Unisys patented this algorithm. However, the Unisys patent has now
+expired.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/INSTALL	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,182 @@
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.ac' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.ac' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory.  After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
+
+`--help'
+     Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--version'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/Makefile	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,698 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+srcdir = .
+top_srcdir = .
+
+pkgdatadir = $(datadir)/spandsp
+pkglibdir = $(libdir)/spandsp
+pkgincludedir = $(includedir)/spandsp
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/spandsp.spec.in \
+	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+	config/config.guess config/config.sub config/depcomp \
+	config/install-sh config/ltmain.sh config/missing
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES = spandsp.spec
+SCRIPTS = $(noinst_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(datadir)"
+nobase_dataDATA_INSTALL = $(install_sh_DATA)
+DATA = $(nobase_data_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoconf
+AUTOHEADER = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoheader
+AUTOMAKE = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run automake-1.9
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+COMP_VENDOR_CFLAGS = -O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+COND_DOC_FALSE = 
+COND_DOC_TRUE = #
+COND_ITUTESTS_FALSE = 
+COND_ITUTESTS_TRUE = #
+COND_MMX_FALSE = 
+COND_MMX_TRUE = #
+COND_SSE_FALSE = 
+COND_SSE_TRUE = #
+COND_TESTS_FALSE = #
+COND_TESTS_TRUE = 
+CPP = gcc -E
+CPPFLAGS =  
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = grep -E
+EXEEXT = 
+F77 = 
+FFLAGS = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS = 
+LIBOBJS = 
+LIBS = -lm -ltiff 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run makeinfo
+OBJEXT = o
+PACKAGE = spandsp
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = 
+PACKAGE_STRING = 
+PACKAGE_TARNAME = 
+PACKAGE_VERSION = 
+PATH_SEPARATOR = :
+RANLIB = ranlib
+SET_MAKE = 
+SHELL = /bin/sh
+SPANDSP_LT_AGE = 0
+SPANDSP_LT_CURRENT = 0
+SPANDSP_LT_REVISION = 2
+STRIP = strip
+TESTLIBS =  -L/usr/X11R6/lib -lXft -lXext -lX11 -laudiofile -lfftw3 -lpthread -ldl
+VERSION = 0.0.3
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+ac_ct_RANLIB = ranlib
+ac_ct_STRIP = strip
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /xhome1/tmp/oslec/spandsp-0.0.3/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+noinst_SCRIPTS = spandsp.spec
+nobase_data_DATA = spandsp/global-tones.xml spandsp/tones.dtd
+MAINTAINERCLEANFILES = Makefile.in
+EXTRA_DIST = DueDiligence \
+             spandsp.spec \
+             wrapper.xsl \
+             libspandsp.vcproj \
+             doc/libspandsp-doxygen \
+             src/msvc/gettimeofday.c \
+             src/msvc/inttypes.h \
+             src/msvc/tgmath.h \
+             src/msvc/unistd.h \
+             src/msvc/sys/time.h \
+             src/msvc/spandsp.def \
+             src/msvc/msvcproj.head \
+             src/msvc/msvcproj.foot \
+             src/msvc/vc8proj.head \
+             src/msvc/vc8proj.foot \
+             src/libspandsp.sln \
+             spandsp/global-tones.xml \
+             spandsp/tones.dtd
+
+#MAYBE_DOC = doc
+MAYBE_TESTS = tests
+#MAYBE_ITUTESTS = itutests
+SUBDIRS = src $(MAYBE_DOC) $(MAYBE_TESTS) $(MAYBE_ITUTESTS)
+DIST_SUBDIRS = src doc tests itutests
+all: all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+spandsp.spec: $(top_builddir)/config.status $(srcdir)/spandsp.spec.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_dataDATA: $(nobase_data_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \
+	  $(nobase_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+uninstall-nobase_dataDATA:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (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):
+	@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 \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@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)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkdir_p) $(distdir)/. $(distdir)/config $(distdir)/doc $(distdir)/spandsp $(distdir)/src $(distdir)/src/msvc $(distdir)/src/msvc/sys
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS) $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(datadir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-nobase_dataDATA
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-nobase_dataDATA
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+	check-am clean clean-generic clean-libtool clean-recursive \
+	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+	dist-shar dist-tarZ dist-zip distcheck distclean \
+	distclean-generic distclean-libtool distclean-recursive \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man \
+	install-nobase_dataDATA install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am \
+	uninstall-nobase_dataDATA
+
+
+faq: faq.xml
+	cd faq ; xsltproc ../wrapper.xsl ../faq.xml
+
+rpm: rpm-build
+
+rpm-build:
+	$(MAKE) -$(MAKEFLAGS) bump.rpm.release
+	$(MAKE) -$(MAKEFLAGS) dist
+	rm -rf rpm/BUILD/*
+	rm -f rpm/RPMS/*/*
+	rm -f rpm/SOURCES/*
+	rm -f rpm/SPECS/*
+	rm -f rpm/SRPMS/*
+	rpm -ta --sign spandsp-0.0.3.tar.gz
+
+bump.rpm.release: spandsp.spec
+	VERSION="x"; \
+	test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \
+	NEXT_RELEASE=0; \
+	test "$$VERSION" = "0.0.3" && NEXT_RELEASE="$$RELEASE"; \
+	RELEASE=`expr $$NEXT_RELEASE + 1`; \
+	echo "VERSION=0.0.3" >$(srcdir)/rpm.release; \
+	echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release; \
+	sed 's/^Release: .*/Release: '$$RELEASE'/' \
+		<spandsp.spec >spandsp.spec.new; \
+	mv spandsp.spec.new spandsp.spec
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/Makefile.am	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,83 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License version 2, as
+## published by the Free Software Foundation.
+##
+## 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+##
+## $Id: Makefile.am,v 1.20 2006/12/06 13:53:36 steveu Exp $
+
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+
+noinst_SCRIPTS = spandsp.spec
+
+nobase_data_DATA = spandsp/global-tones.xml spandsp/tones.dtd
+
+MAINTAINERCLEANFILES = Makefile.in
+
+EXTRA_DIST = DueDiligence \
+             spandsp.spec \
+             wrapper.xsl \
+             libspandsp.vcproj \
+             doc/libspandsp-doxygen \
+             src/msvc/gettimeofday.c \
+             src/msvc/inttypes.h \
+             src/msvc/tgmath.h \
+             src/msvc/unistd.h \
+             src/msvc/sys/time.h \
+             src/msvc/spandsp.def \
+             src/msvc/msvcproj.head \
+             src/msvc/msvcproj.foot \
+             src/msvc/vc8proj.head \
+             src/msvc/vc8proj.foot \
+             src/libspandsp.sln \
+             spandsp/global-tones.xml \
+             spandsp/tones.dtd
+
+if COND_DOC
+    MAYBE_DOC=doc
+endif
+if COND_TESTS
+    MAYBE_TESTS=tests
+endif
+if COND_ITUTESTS
+    MAYBE_ITUTESTS=itutests
+endif
+SUBDIRS = src $(MAYBE_DOC) $(MAYBE_TESTS) $(MAYBE_ITUTESTS)
+
+DIST_SUBDIRS = src doc tests itutests
+
+faq: faq.xml
+	cd faq ; xsltproc ../wrapper.xsl ../faq.xml
+
+rpm: rpm-build
+
+rpm-build:
+	$(MAKE) -$(MAKEFLAGS) bump.rpm.release
+	$(MAKE) -$(MAKEFLAGS) dist
+	rm -rf rpm/BUILD/*
+	rm -f rpm/RPMS/*/*
+	rm -f rpm/SOURCES/*
+	rm -f rpm/SPECS/*
+	rm -f rpm/SRPMS/*
+	rpm -ta --sign @PACKAGE@-@VERSION@.tar.gz
+
+bump.rpm.release: spandsp.spec
+	VERSION="x"; \
+	test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \
+	NEXT_RELEASE=0; \
+	test "$$VERSION" = "@VERSION@" && NEXT_RELEASE="$$RELEASE"; \
+	RELEASE=`expr $$NEXT_RELEASE + 1`; \
+	echo "VERSION=@VERSION@" >$(srcdir)/rpm.release; \
+	echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release; \
+	sed 's/^Release: .*/Release: '$$RELEASE'/' \
+		<spandsp.spec >spandsp.spec.new; \
+	mv spandsp.spec.new spandsp.spec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/Makefile.in	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,698 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/spandsp.spec.in \
+	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+	config/config.guess config/config.sub config/depcomp \
+	config/install-sh config/ltmain.sh config/missing
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES = spandsp.spec
+SCRIPTS = $(noinst_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(datadir)"
+nobase_dataDATA_INSTALL = $(install_sh_DATA)
+DATA = $(nobase_data_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMP_VENDOR_CFLAGS = @COMP_VENDOR_CFLAGS@
+COND_DOC_FALSE = @COND_DOC_FALSE@
+COND_DOC_TRUE = @COND_DOC_TRUE@
+COND_ITUTESTS_FALSE = @COND_ITUTESTS_FALSE@
+COND_ITUTESTS_TRUE = @COND_ITUTESTS_TRUE@
+COND_MMX_FALSE = @COND_MMX_FALSE@
+COND_MMX_TRUE = @COND_MMX_TRUE@
+COND_SSE_FALSE = @COND_SSE_FALSE@
+COND_SSE_TRUE = @COND_SSE_TRUE@
+COND_TESTS_FALSE = @COND_TESTS_FALSE@
+COND_TESTS_TRUE = @COND_TESTS_TRUE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPANDSP_LT_AGE = @SPANDSP_LT_AGE@
+SPANDSP_LT_CURRENT = @SPANDSP_LT_CURRENT@
+SPANDSP_LT_REVISION = @SPANDSP_LT_REVISION@
+STRIP = @STRIP@
+TESTLIBS = @TESTLIBS@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+noinst_SCRIPTS = spandsp.spec
+nobase_data_DATA = spandsp/global-tones.xml spandsp/tones.dtd
+MAINTAINERCLEANFILES = Makefile.in
+EXTRA_DIST = DueDiligence \
+             spandsp.spec \
+             wrapper.xsl \
+             libspandsp.vcproj \
+             doc/libspandsp-doxygen \
+             src/msvc/gettimeofday.c \
+             src/msvc/inttypes.h \
+             src/msvc/tgmath.h \
+             src/msvc/unistd.h \
+             src/msvc/sys/time.h \
+             src/msvc/spandsp.def \
+             src/msvc/msvcproj.head \
+             src/msvc/msvcproj.foot \
+             src/msvc/vc8proj.head \
+             src/msvc/vc8proj.foot \
+             src/libspandsp.sln \
+             spandsp/global-tones.xml \
+             spandsp/tones.dtd
+
+@COND_DOC_TRUE@MAYBE_DOC = doc
+@COND_TESTS_TRUE@MAYBE_TESTS = tests
+@COND_ITUTESTS_TRUE@MAYBE_ITUTESTS = itutests
+SUBDIRS = src $(MAYBE_DOC) $(MAYBE_TESTS) $(MAYBE_ITUTESTS)
+DIST_SUBDIRS = src doc tests itutests
+all: all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+spandsp.spec: $(top_builddir)/config.status $(srcdir)/spandsp.spec.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_dataDATA: $(nobase_data_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \
+	  $(nobase_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+uninstall-nobase_dataDATA:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (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):
+	@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 \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@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)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkdir_p) $(distdir)/. $(distdir)/config $(distdir)/doc $(distdir)/spandsp $(distdir)/src $(distdir)/src/msvc $(distdir)/src/msvc/sys
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS) $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(datadir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-nobase_dataDATA
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-nobase_dataDATA
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+	check-am clean clean-generic clean-libtool clean-recursive \
+	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+	dist-shar dist-tarZ dist-zip distcheck distclean \
+	distclean-generic distclean-libtool distclean-recursive \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man \
+	install-nobase_dataDATA install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am \
+	uninstall-nobase_dataDATA
+
+
+faq: faq.xml
+	cd faq ; xsltproc ../wrapper.xsl ../faq.xml
+
+rpm: rpm-build
+
+rpm-build:
+	$(MAKE) -$(MAKEFLAGS) bump.rpm.release
+	$(MAKE) -$(MAKEFLAGS) dist
+	rm -rf rpm/BUILD/*
+	rm -f rpm/RPMS/*/*
+	rm -f rpm/SOURCES/*
+	rm -f rpm/SPECS/*
+	rm -f rpm/SRPMS/*
+	rpm -ta --sign @PACKAGE@-@VERSION@.tar.gz
+
+bump.rpm.release: spandsp.spec
+	VERSION="x"; \
+	test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \
+	NEXT_RELEASE=0; \
+	test "$$VERSION" = "@VERSION@" && NEXT_RELEASE="$$RELEASE"; \
+	RELEASE=`expr $$NEXT_RELEASE + 1`; \
+	echo "VERSION=@VERSION@" >$(srcdir)/rpm.release; \
+	echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release; \
+	sed 's/^Release: .*/Release: '$$RELEASE'/' \
+		<spandsp.spec >spandsp.spec.new; \
+	mv spandsp.spec.new spandsp.spec
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/NEWS	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1 @@
+No news is good news!
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/README	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,31 @@
+spandsp 0.0.3 - A DSP library for telephony
+-------------------------------------------
+
+SpanDSP is a library of DSP functions for telephony, in the 8000 sample per
+second world of E1s, T1s, and higher order PCM channels. It contains low level
+functions, such as basic filters. It also contains higher level functions, such
+as cadenced supervisory tone detection, and a complete software FAX machine.
+The software has been designed to avoid intellectual property issues, using
+mature techniques where all relevant patents have expired. See the file
+DueDiligence for important information about these intellectual property issues.
+
+Dependencies
+------------
+
+spandsp depends on various other packages for various tasks. Most of these
+dependencies relate to building the test suite.
+
+libtiff (and libtiff-devel on most Linux distributions) is required to
+build the spandsp library.
+
+libaudiofile (and libaudiofile-devel) is required to build the test suite
+fftw (and fftw-devel) is required to build the test suite. Version 2 or 3 of
+FFTW may be used. Spandsp adapts to the differences between them.
+
+fltk (and fltk-devel), Fl_Cartesian and Fl_Audio_Meter are required to build the
+test suite with GUI interfaces for some of the tests. The tests will build
+without these packages, but the GUI features will not be available.
+Fl_Cartesian and Fl_Audio_Meter can be downloaded from
+http://www.soft-switch.org/downloads.
+
+Steve Underwood <steveu@coppice.org>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/aclocal.m4	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,7010 @@
+# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+
+# 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 distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 47 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  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*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _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
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(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`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "[$]0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # 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.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # 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
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # 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: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   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 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
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   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
+     # 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
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    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 *BSD
+    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.
+    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 &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_unknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# -------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # 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: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   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
+     $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 .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[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
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    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}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  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)'
+  # 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"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # 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=`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/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  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
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      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_LIBTOOL_LANG_CXX_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+	AC_LIBTOOL_LANG_RC_CONFIG
+	;;
+
+      *)
+	AC_MSG_ERROR([Unsupported tag name: $tagname])
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 dll's
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+#- set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"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
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    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.
+      # 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'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+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.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) 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
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+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
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+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|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.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  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
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+      */dev/null* | *'Invalid file or object type'*)
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+        ;;
+      *)
+	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	*/dev/null*)
+	  lt_cv_path_NM="$tmp_nm -p"
+	  break
+	  ;;
+	*)
+	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	  continue # so that we can try to find one that supports BSD flags
+	  ;;
+	esac
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# 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.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# 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.
+# 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
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+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
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_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.
+#
+_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
+if test "$GCC" = no; then
+  case $host_os in
+  sco3.2v5*)
+    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
+    ;;
+  esac
+fi
+if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
+  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
+  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
+  else
+    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+  fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+# Report which librarie types wil actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  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])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# 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
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_LD
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $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'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=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
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes; then
+      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`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	else
+	  # We have old collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	fi
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	_LT_AC_SYS_LIBPATH_AIX
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	# -bexpall does not export symbols beginning with underscore (_)
+	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
+	# Exported symbols can be pulled into shared objects from archives
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	# This is similar to how AIX traditionally builds it's 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
+    ;;
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _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
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+    else
+      _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
+
+    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
+          _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 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 -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 ld's
+          _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
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  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 | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    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
+      # 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 -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
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      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'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+        ;;
+      ia64*)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        ;;
+      *)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case "$host_cpu" in
+    hppa*64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      aCC*)
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# 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 -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
+	  if test $with_gnu_ld = no; then
+	    case "$host_cpu" in
+	    ia64*|hppa*64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      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 ${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
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	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}${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
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+	;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# 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 $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      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(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'
+	;;
+      pgCC*)
+        # Portland Group C++ compiler
+	_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 ${wl}$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+        ;;
+      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'
+
+	runpath_var=LD_RUN_PATH
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# 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 -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    fi
+    # 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*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      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 ${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)=:
+
+	# 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 -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; 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 && 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}${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)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      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 ${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 ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# 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 -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; 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 && 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}${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)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sco*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+	_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_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'
+
+	_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]].*) ;;
+	  *)
+	    # The C++ compiler is used as linker so we must use $wl
+	    # flag to pass the commands to the underlying system
+	    # 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`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'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	;;
+      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'
+
+	# The C++ compiler must be used to create the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _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 -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _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 -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	fi
+	;;
+    esac
+    ;;
+  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # 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\"`"
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\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=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  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])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+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'
+
+# 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)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# 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)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars.  Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
+
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
+
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
+
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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 of the License, 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., 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
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# 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?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# 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'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+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'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  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]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris* | sysv5*)
+  symcode='[[BDRT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# 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'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	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++*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | kfreebsd*-gnu | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    if test "$host_cpu" != ia64; then
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    case "$host_cpu" in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  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.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux*)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  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'
+	    ;;
+	  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)='-static'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  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
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      sco*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      solaris*)
+	case $cc_basename in
+	  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*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      unixware*)
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_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
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _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
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    linux*)
+      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*)
+        # 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)='-static'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      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*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      _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'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      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'
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _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 '\''/^[[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'
+  ;;
+  esac
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_AC_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # 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
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # 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*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _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 '\''/^[[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'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	_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)=
+	  ;;
+	pgf77* | pgf90* )			# Portland Group f77 and f90 compilers
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+	  tmp_addflag=' -fpic -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'
+	wlarc=
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $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'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      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'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    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)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+      if test "$GCC" = yes; then
+	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`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  else
+  	  # We have old collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 _LT_AC_SYS_LIBPATH_AIX
+	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds it's 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
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    bsdi[[45]]*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _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'
+      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    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
+    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 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}'
+    else
+      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 ld's
+         _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
+      ;;
+
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    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
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	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'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	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'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $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)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    openbsd*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _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
+       case $host_os in
+	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	   ;;
+	 *)
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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'
+      else
+	_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 ${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'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    sco3.2v5*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+	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'
+      fi
+      _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]].*) ;;
+      *)
+ 	# 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
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv5*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# 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 && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_MSG_RESULT([$SED])
+])
+
+# 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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# 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.5])])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# 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.
+
+# 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/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# 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.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# 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.
+
+# serial 8
+
+# 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
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# 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.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# 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.
+
+# serial 12
+
+# 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.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+	      		     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+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.
+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)])
+
+# 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# 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.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# 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.
+
+# serial 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+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.
+#
+# 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).
+# This was a mistake.  There are at least two reasons why we must not
+# use `-m 0755':
+#   - it causes special bits like SGID to be ignored,
+#   - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out.  Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# 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.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+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.
+#
+# 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.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# 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_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
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/config-h.in	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,241 @@
+/* config-h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <audiofile.h> header file. */
+#undef HAVE_AUDIOFILE_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the <fftw3.h> header file. */
+#undef HAVE_FFTW3_H
+
+/* Define to 1 if you have the <fftw.h> header file. */
+#undef HAVE_FFTW_H
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the <FL/Fl_Audio_Meter.H> header file. */
+#undef HAVE_FL_FL_AUDIO_METER_H
+
+/* Define to 1 if you have the <FL/Fl_Cartesian.H> header file. */
+#undef HAVE_FL_FL_CARTESIAN_H
+
+/* Define to 1 if you have the <FL/fl_draw.H> header file. */
+#undef HAVE_FL_FL_DRAW_H
+
+/* Define to 1 if you have the <FL/Fl.H> header file. */
+#undef HAVE_FL_FL_H
+
+/* Define to 1 if you have the <FL/Fl_Light_Button.H> header file. */
+#undef HAVE_FL_FL_LIGHT_BUTTON_H
+
+/* Define to 1 if you have the <FL/Fl_Overlay_Window.H> header file. */
+#undef HAVE_FL_FL_OVERLAY_WINDOW_H
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the `tiff' library (-ltiff). */
+#undef HAVE_LIBTIFF
+
+/* Define to 1 if you have the 'libxml2' library (-lxml2). */
+#undef HAVE_LIBXML2
+
+/* Define to 1 if you have the <libxml/parser.h> header file. */
+#undef HAVE_LIBXML_PARSER_H
+
+/* Define to 1 if you have the <libxml/xinclude.h> header file. */
+#undef HAVE_LIBXML_XINCLUDE_H
+
+/* Define to 1 if you have the <libxml/xmlmemory.h> header file. */
+#undef HAVE_LIBXML_XMLMEMORY_H
+
+/* Define to 1 if the system has the type `long double'. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if the system has the type `long long'. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <math.h> header file. */
+#undef HAVE_MATH_H
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `pow' function. */
+#undef HAVE_POW
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#undef HAVE_REALLOC
+
+/* Define to 1 if you have the `rint' function. */
+#undef HAVE_RINT
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the <socket.h> header file. */
+#undef HAVE_SOCKET_H
+
+/* Define to 1 if you have the `sqrt' function. */
+#undef HAVE_SQRT
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the <sys/fcntl.h> header file. */
+#undef HAVE_SYS_FCNTL_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the <tgmath.h> header file. */
+#undef HAVE_TGMATH_H
+
+/* Define to 1 if you have the <tiffio.h> header file. */
+#undef HAVE_TIFFIO_H
+
+/* Define to 1 if you have the <unicall.h> header file. */
+#undef HAVE_UNICALL_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define to 1 if you have the <X11/X.h> header file. */
+#undef HAVE_X11_X_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* Define to the type of arg 1 for `select'. */
+#undef SELECT_TYPE_ARG1
+
+/* Define to the type of args 2, 3 and 4 for `select'. */
+#undef SELECT_TYPE_ARG234
+
+/* Define to the type of arg 5 for `select'. */
+#undef SELECT_TYPE_ARG5
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to rpl_realloc if the replacement function should be used. */
+#undef realloc
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+#undef volatile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/config.log	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,5077 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by configure, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ ./configure --enable-tests
+
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = bunny
+uname -m = i686
+uname -r = 2.6.15-27-686
+uname -s = Linux
+uname -v = #1 SMP PREEMPT Fri Dec 8 18:00:07 UTC 2006
+
+/usr/bin/uname -p = unknown
+/bin/uname -X     = unknown
+
+/bin/arch              = i686
+/usr/bin/arch -k       = unknown
+/usr/convex/getsysinfo = unknown
+hostinfo               = unknown
+/bin/machine           = unknown
+/usr/bin/oslevel       = unknown
+/bin/universe          = unknown
+
+PATH: /opt/uClinux/bfin-uclinux/bin
+PATH: /usr/local/bin/geda-install/bin
+PATH: /usr/local/sbin
+PATH: /usr/local/bin
+PATH: /usr/sbin
+PATH: /usr/bin
+PATH: /sbin
+PATH: /bin
+PATH: /usr/bin/X11
+PATH: /usr/games
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+configure:1562: checking for a BSD-compatible install
+configure:1617: result: /usr/bin/install -c
+configure:1628: checking whether build environment is sane
+configure:1671: result: yes
+configure:1736: checking for gawk
+configure:1752: found /usr/bin/gawk
+configure:1762: result: gawk
+configure:1772: checking whether make sets $(MAKE)
+configure:1792: result: yes
+configure:1967: checking build system type
+configure:1985: result: i686-pc-linux-gnu
+configure:1993: checking host system type
+configure:2007: result: i686-pc-linux-gnu
+configure:2061: checking for gcc
+configure:2077: found /usr/bin/gcc
+configure:2087: result: gcc
+configure:2331: checking for C compiler version
+configure:2334: gcc --version </dev/null >&5
+gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
+Copyright (C) 2006 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+configure:2337: $? = 0
+configure:2339: gcc -v </dev/null >&5
+Using built-in specs.
+Target: i486-linux-gnu
+Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu
+Thread model: posix
+gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
+configure:2342: $? = 0
+configure:2344: gcc -V </dev/null >&5
+gcc: '-V' option must have argument
+configure:2347: $? = 1
+configure:2370: checking for C compiler default output file name
+configure:2373: gcc    conftest.c  >&5
+configure:2376: $? = 0
+configure:2422: result: a.out
+configure:2427: checking whether the C compiler works
+configure:2433: ./a.out
+configure:2436: $? = 0
+configure:2453: result: yes
+configure:2460: checking whether we are cross compiling
+configure:2462: result: no
+configure:2465: checking for suffix of executables
+configure:2467: gcc -o conftest    conftest.c  >&5
+configure:2470: $? = 0
+configure:2495: result: 
+configure:2501: checking for suffix of object files
+configure:2522: gcc -c   conftest.c >&5
+configure:2525: $? = 0
+configure:2547: result: o
+configure:2551: checking whether we are using the GNU C compiler
+configure:2575: gcc -c   conftest.c >&5
+configure:2581: $? = 0
+configure:2584: test -z 			 || test ! -s conftest.err
+configure:2587: $? = 0
+configure:2590: test -s conftest.o
+configure:2593: $? = 0
+configure:2606: result: yes
+configure:2612: checking whether gcc accepts -g
+configure:2633: gcc -c -g  conftest.c >&5
+configure:2639: $? = 0
+configure:2642: test -z 			 || test ! -s conftest.err
+configure:2645: $? = 0
+configure:2648: test -s conftest.o
+configure:2651: $? = 0
+configure:2662: result: yes
+configure:2679: checking for gcc option to accept ANSI C
+configure:2749: gcc  -c -g -O2  conftest.c >&5
+configure:2755: $? = 0
+configure:2758: test -z 			 || test ! -s conftest.err
+configure:2761: $? = 0
+configure:2764: test -s conftest.o
+configure:2767: $? = 0
+configure:2785: result: none needed
+configure:2803: gcc -c -g -O2  conftest.c >&5
+conftest.c:2: error: syntax error before 'me'
+configure:2809: $? = 1
+configure: failed program was:
+| #ifndef __cplusplus
+|   choke me
+| #endif
+configure:2950: checking for style of include used by make
+configure:2978: result: GNU
+configure:3006: checking dependency style of gcc
+configure:3096: result: gcc3
+configure:3165: checking for g++
+configure:3181: found /usr/bin/g++
+configure:3191: result: g++
+configure:3207: checking for C++ compiler version
+configure:3210: g++ --version </dev/null >&5
+g++ (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
+Copyright (C) 2006 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+configure:3213: $? = 0
+configure:3215: g++ -v </dev/null >&5
+Using built-in specs.
+Target: i486-linux-gnu
+Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu
+Thread model: posix
+gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
+configure:3218: $? = 0
+configure:3220: g++ -V </dev/null >&5
+g++: '-V' option must have argument
+configure:3223: $? = 1
+configure:3226: checking whether we are using the GNU C++ compiler
+configure:3250: g++ -c   conftest.cc >&5
+configure:3256: $? = 0
+configure:3259: test -z 			 || test ! -s conftest.err
+configure:3262: $? = 0
+configure:3265: test -s conftest.o
+configure:3268: $? = 0
+configure:3281: result: yes
+configure:3287: checking whether g++ accepts -g
+configure:3308: g++ -c -g  conftest.cc >&5
+configure:3314: $? = 0
+configure:3317: test -z 			 || test ! -s conftest.err
+configure:3320: $? = 0
+configure:3323: test -s conftest.o
+configure:3326: $? = 0
+configure:3337: result: yes
+configure:3379: g++ -c -g -O2  conftest.cc >&5
+configure:3385: $? = 0
+configure:3388: test -z 			 || test ! -s conftest.err
+configure:3391: $? = 0
+configure:3394: test -s conftest.o
+configure:3397: $? = 0
+configure:3423: g++ -c -g -O2  conftest.cc >&5
+conftest.cc: In function 'int main()':
+conftest.cc:15: error: 'exit' was not declared in this scope
+configure:3429: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| /* end confdefs.h.  */
+| 
+| int
+| main ()
+| {
+| exit (42);
+|   ;
+|   return 0;
+| }
+configure:3379: g++ -c -g -O2  conftest.cc >&5
+configure:3385: $? = 0
+configure:3388: test -z 			 || test ! -s conftest.err
+configure:3391: $? = 0
+configure:3394: test -s conftest.o
+configure:3397: $? = 0
+configure:3423: g++ -c -g -O2  conftest.cc >&5
+configure:3429: $? = 0
+configure:3432: test -z 			 || test ! -s conftest.err
+configure:3435: $? = 0
+configure:3438: test -s conftest.o
+configure:3441: $? = 0
+configure:3466: checking dependency style of g++
+configure:3556: result: gcc3
+configure:3579: checking how to run the C preprocessor
+configure:3614: gcc -E  conftest.c
+configure:3620: $? = 0
+configure:3652: gcc -E  conftest.c
+conftest.c:14:28: error: ac_nonexistent.h: No such file or directory
+configure:3658: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:3697: result: gcc -E
+configure:3721: gcc -E  conftest.c
+configure:3727: $? = 0
+configure:3759: gcc -E  conftest.c
+conftest.c:14:28: error: ac_nonexistent.h: No such file or directory
+configure:3765: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:3809: checking for egrep
+configure:3819: result: grep -E
+configure:3825: checking whether gcc needs -traditional
+configure:3867: result: no
+configure:3946: checking for a sed that does not truncate output
+configure:4000: result: /bin/sed
+configure:4014: checking for ld used by gcc
+configure:4081: result: /usr/bin/ld
+configure:4090: checking if the linker (/usr/bin/ld) is GNU ld
+configure:4105: result: yes
+configure:4110: checking for /usr/bin/ld option to reload object files
+configure:4117: result: -r
+configure:4135: checking for BSD-compatible nm
+configure:4177: result: /usr/bin/nm -B
+configure:4181: checking whether ln -s works
+configure:4185: result: yes
+configure:4192: checking how to recognise dependent libraries
+configure:4364: result: pass_all
+configure:4571: checking for ANSI C header files
+configure:4596: gcc -c -g -O2  conftest.c >&5
+configure:4602: $? = 0
+configure:4605: test -z 			 || test ! -s conftest.err
+configure:4608: $? = 0
+configure:4611: test -s conftest.o
+configure:4614: $? = 0
+configure:4703: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c: In function 'main':
+conftest.c:31: warning: incompatible implicit declaration of built-in function 'exit'
+configure:4706: $? = 0
+configure:4708: ./conftest
+configure:4711: $? = 0
+configure:4726: result: yes
+configure:4750: checking for sys/types.h
+configure:4766: gcc -c -g -O2  conftest.c >&5
+configure:4772: $? = 0
+configure:4775: test -z 			 || test ! -s conftest.err
+configure:4778: $? = 0
+configure:4781: test -s conftest.o
+configure:4784: $? = 0
+configure:4795: result: yes
+configure:4750: checking for sys/stat.h
+configure:4766: gcc -c -g -O2  conftest.c >&5
+configure:4772: $? = 0
+configure:4775: test -z 			 || test ! -s conftest.err
+configure:4778: $? = 0
+configure:4781: test -s conftest.o
+configure:4784: $? = 0
+configure:4795: result: yes
+configure:4750: checking for stdlib.h
+configure:4766: gcc -c -g -O2  conftest.c >&5
+configure:4772: $? = 0
+configure:4775: test -z 			 || test ! -s conftest.err
+configure:4778: $? = 0
+configure:4781: test -s conftest.o
+configure:4784: $? = 0
+configure:4795: result: yes
+configure:4750: checking for string.h
+configure:4766: gcc -c -g -O2  conftest.c >&5
+configure:4772: $? = 0
+configure:4775: test -z 			 || test ! -s conftest.err
+configure:4778: $? = 0
+configure:4781: test -s conftest.o
+configure:4784: $? = 0
+configure:4795: result: yes
+configure:4750: checking for memory.h
+configure:4766: gcc -c -g -O2  conftest.c >&5
+configure:4772: $? = 0
+configure:4775: test -z 			 || test ! -s conftest.err
+configure:4778: $? = 0
+configure:4781: test -s conftest.o
+configure:4784: $? = 0
+configure:4795: result: yes
+configure:4750: checking for strings.h
+configure:4766: gcc -c -g -O2  conftest.c >&5
+configure:4772: $? = 0
+configure:4775: test -z 			 || test ! -s conftest.err
+configure:4778: $? = 0
+configure:4781: test -s conftest.o
+configure:4784: $? = 0
+configure:4795: result: yes
+configure:4750: checking for inttypes.h
+configure:4766: gcc -c -g -O2  conftest.c >&5
+configure:4772: $? = 0
+configure:4775: test -z 			 || test ! -s conftest.err
+configure:4778: $? = 0
+configure:4781: test -s conftest.o
+configure:4784: $? = 0
+configure:4795: result: yes
+configure:4750: checking for stdint.h
+configure:4766: gcc -c -g -O2  conftest.c >&5
+configure:4772: $? = 0
+configure:4775: test -z 			 || test ! -s conftest.err
+configure:4778: $? = 0
+configure:4781: test -s conftest.o
+configure:4784: $? = 0
+configure:4795: result: yes
+configure:4750: checking for unistd.h
+configure:4766: gcc -c -g -O2  conftest.c >&5
+configure:4772: $? = 0
+configure:4775: test -z 			 || test ! -s conftest.err
+configure:4778: $? = 0
+configure:4781: test -s conftest.o
+configure:4784: $? = 0
+configure:4795: result: yes
+configure:4821: checking dlfcn.h usability
+configure:4833: gcc -c -g -O2  conftest.c >&5
+configure:4839: $? = 0
+configure:4842: test -z 			 || test ! -s conftest.err
+configure:4845: $? = 0
+configure:4848: test -s conftest.o
+configure:4851: $? = 0
+configure:4861: result: yes
+configure:4865: checking dlfcn.h presence
+configure:4875: gcc -E  conftest.c
+configure:4881: $? = 0
+configure:4901: result: yes
+configure:4936: checking for dlfcn.h
+configure:4943: result: yes
+configure:4966: checking how to run the C++ preprocessor
+configure:4997: g++ -E  conftest.cc
+configure:5003: $? = 0
+configure:5035: g++ -E  conftest.cc
+conftest.cc:25:28: error: ac_nonexistent.h: No such file or directory
+configure:5041: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:5080: result: g++ -E
+configure:5104: g++ -E  conftest.cc
+configure:5110: $? = 0
+configure:5142: g++ -E  conftest.cc
+conftest.cc:25:28: error: ac_nonexistent.h: No such file or directory
+configure:5148: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:5245: checking for g77
+configure:5274: result: no
+configure:5245: checking for f77
+configure:5274: result: no
+configure:5245: checking for xlf
+configure:5274: result: no
+configure:5245: checking for frt
+configure:5274: result: no
+configure:5245: checking for pgf77
+configure:5274: result: no
+configure:5245: checking for fort77
+configure:5274: result: no
+configure:5245: checking for fl32
+configure:5274: result: no
+configure:5245: checking for af77
+configure:5274: result: no
+configure:5245: checking for f90
+configure:5274: result: no
+configure:5245: checking for xlf90
+configure:5274: result: no
+configure:5245: checking for pgf90
+configure:5274: result: no
+configure:5245: checking for epcf90
+configure:5274: result: no
+configure:5245: checking for f95
+configure:5274: result: no
+configure:5245: checking for fort
+configure:5274: result: no
+configure:5245: checking for xlf95
+configure:5274: result: no
+configure:5245: checking for ifc
+configure:5274: result: no
+configure:5245: checking for efc
+configure:5274: result: no
+configure:5245: checking for pgf95
+configure:5274: result: no
+configure:5245: checking for lf95
+configure:5274: result: no
+configure:5245: checking for gfortran
+configure:5274: result: no
+configure:5286: checking for Fortran 77 compiler version
+configure:5289:  --version </dev/null >&5
+./configure: line 5290: --version: command not found
+configure:5292: $? = 127
+configure:5294:  -v </dev/null >&5
+./configure: line 5295: -v: command not found
+configure:5297: $? = 127
+configure:5299:  -V </dev/null >&5
+./configure: line 5300: -V: command not found
+configure:5302: $? = 127
+configure:5310: checking whether we are using the GNU Fortran 77 compiler
+configure:5324:  -c  conftest.F >&5
+./configure: line 5325: -c: command not found
+configure:5330: $? = 127
+configure: failed program was:
+|       program main
+| #ifndef __GNUC__
+|        choke me
+| #endif
+| 
+|       end
+configure:5355: result: no
+configure:5361: checking whether  accepts -g
+configure:5373:  -c -g conftest.f >&5
+./configure: line 5374: -c: command not found
+configure:5379: $? = 127
+configure: failed program was:
+|       program main
+| 
+|       end
+configure:5403: result: no
+configure:5433: checking the maximum length of command line arguments
+configure:5525: result: 32768
+configure:5536: checking command to parse /usr/bin/nm -B output from gcc object
+configure:5632: gcc -c -g -O2  conftest.c >&5
+configure:5635: $? = 0
+configure:5639: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ 	]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ 	][ 	]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \> conftest.nm
+configure:5642: $? = 0
+configure:5694: gcc -o conftest -g -O2   conftest.c conftstm.o >&5
+configure:5697: $? = 0
+configure:5735: result: ok
+configure:5739: checking for objdir
+configure:5754: result: .libs
+configure:5844: checking for ar
+configure:5860: found /usr/bin/ar
+configure:5871: result: ar
+configure:5924: checking for ranlib
+configure:5940: found /usr/bin/ranlib
+configure:5951: result: ranlib
+configure:6004: checking for strip
+configure:6020: found /usr/bin/strip
+configure:6031: result: strip
+configure:6318: checking if gcc static flag  works
+configure:6346: result: yes
+configure:6364: checking if gcc supports -fno-rtti -fno-exceptions
+configure:6382: gcc -c -g -O2  -fno-rtti -fno-exceptions conftest.c >&5
+cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
+configure:6386: $? = 0
+configure:6399: result: no
+configure:6414: checking for gcc option to produce PIC
+configure:6618: result: -fPIC
+configure:6626: checking if gcc PIC flag -fPIC works
+configure:6644: gcc -c -g -O2  -fPIC -DPIC conftest.c >&5
+configure:6648: $? = 0
+configure:6661: result: yes
+configure:6685: checking if gcc supports -c -o file.o
+configure:6706: gcc -c -g -O2  -o out/conftest2.o conftest.c >&5
+configure:6710: $? = 0
+configure:6732: result: yes
+configure:6758: checking whether the gcc linker (/usr/bin/ld) supports shared libraries
+configure:7651: result: yes
+configure:7677: checking whether -lc should be explicitly linked in
+configure:7682: gcc -c -g -O2  conftest.c >&5
+configure:7685: $? = 0
+configure:7699: gcc -shared conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| grep  -lc  \>/dev/null 2\>\&1
+configure:7702: $? = 0
+configure:7714: result: no
+configure:7722: checking dynamic linker characteristics
+configure:8285: result: GNU/Linux ld.so
+configure:8289: checking how to hardcode library paths into programs
+configure:8314: result: immediate
+configure:8328: checking whether stripping libraries is possible
+configure:8333: result: yes
+configure:9156: checking if libtool supports shared libraries
+configure:9158: result: yes
+configure:9161: checking whether to build shared libraries
+configure:9182: result: yes
+configure:9185: checking whether to build static libraries
+configure:9189: result: yes
+configure:9281: creating libtool
+configure:9859: checking for ld used by g++
+configure:9926: result: /usr/bin/ld
+configure:9935: checking if the linker (/usr/bin/ld) is GNU ld
+configure:9950: result: yes
+configure:10001: checking whether the g++ linker (/usr/bin/ld) supports shared libraries
+configure:10886: result: yes
+configure:10904: g++ -c -g -O2  conftest.cc >&5
+configure:10907: $? = 0
+configure:11003: checking for g++ option to produce PIC
+configure:11271: result: -fPIC
+configure:11279: checking if g++ PIC flag -fPIC works
+configure:11297: g++ -c -g -O2  -fPIC -DPIC conftest.cc >&5
+configure:11301: $? = 0
+configure:11314: result: yes
+configure:11338: checking if g++ supports -c -o file.o
+configure:11359: g++ -c -g -O2  -o out/conftest2.o conftest.cc >&5
+configure:11363: $? = 0
+configure:11385: result: yes
+configure:11411: checking whether the g++ linker (/usr/bin/ld) supports shared libraries
+configure:11436: result: yes
+configure:11507: checking dynamic linker characteristics
+configure:12070: result: GNU/Linux ld.so
+configure:12074: checking how to hardcode library paths into programs
+configure:12099: result: immediate
+configure:12113: checking whether stripping libraries is possible
+configure:12118: result: yes
+configure:19646: checking for C compiler vendor
+configure:19675: gcc -c -g -O2  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:31: error: 'thisisanerror' undeclared (first use in this function)
+conftest.c:31: error: (Each undeclared identifier is reported only once
+conftest.c:31: error: for each function it appears in.)
+configure:19681: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| /* end confdefs.h.  */
+| 
+| int
+| main ()
+| {
+| 
+| #if !(defined(__ICC) || defined(__ECC) || defined(__INTEL_COMPILER))
+|       thisisanerror;
+| #endif
+| 
+|   ;
+|   return 0;
+| }
+configure:19675: gcc -c -g -O2  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:31: error: 'thisisanerror' undeclared (first use in this function)
+conftest.c:31: error: (Each undeclared identifier is reported only once
+conftest.c:31: error: for each function it appears in.)
+configure:19681: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| /* end confdefs.h.  */
+| 
+| int
+| main ()
+| {
+| 
+| #if !(defined(__xlc__) || defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__))
+|       thisisanerror;
+| #endif
+| 
+|   ;
+|   return 0;
+| }
+configure:19675: gcc -c -g -O2  conftest.c >&5
+configure:19681: $? = 0
+configure:19684: test -z 			 || test ! -s conftest.err
+configure:19687: $? = 0
+configure:19690: test -s conftest.o
+configure:19693: $? = 0
+configure:19705: result: gnu
+configure:19709: checking for an ANSI C-conforming const
+configure:19776: gcc -c -g -O2  conftest.c >&5
+configure:19782: $? = 0
+configure:19785: test -z 			 || test ! -s conftest.err
+configure:19788: $? = 0
+configure:19791: test -s conftest.o
+configure:19794: $? = 0
+configure:19805: result: yes
+configure:19815: checking for inline
+configure:19836: gcc -c -g -O2  conftest.c >&5
+configure:19842: $? = 0
+configure:19845: test -z 			 || test ! -s conftest.err
+configure:19848: $? = 0
+configure:19851: test -s conftest.o
+configure:19854: $? = 0
+configure:19866: result: inline
+configure:19885: checking for working volatile
+configure:19908: gcc -c -g -O2  conftest.c >&5
+configure:19914: $? = 0
+configure:19917: test -z 			 || test ! -s conftest.err
+configure:19920: $? = 0
+configure:19923: test -s conftest.o
+configure:19926: $? = 0
+configure:19937: result: yes
+configure:19948: checking for long long
+configure:19972: gcc -c -g -O2  conftest.c >&5
+configure:19978: $? = 0
+configure:19981: test -z 			 || test ! -s conftest.err
+configure:19984: $? = 0
+configure:19987: test -s conftest.o
+configure:19990: $? = 0
+configure:20001: result: yes
+configure:20012: checking for long double
+configure:20036: gcc -c -g -O2  conftest.c >&5
+configure:20042: $? = 0
+configure:20045: test -z 			 || test ! -s conftest.err
+configure:20048: $? = 0
+configure:20051: test -s conftest.o
+configure:20054: $? = 0
+configure:20065: result: yes
+configure:20077: checking return type of signal handlers
+configure:20108: gcc -c -g -O2  conftest.c >&5
+configure:20114: $? = 0
+configure:20117: test -z 			 || test ! -s conftest.err
+configure:20120: $? = 0
+configure:20123: test -s conftest.o
+configure:20126: $? = 0
+configure:20137: result: void
+configure:20172: checking for error_at_line
+configure:20193: gcc -o conftest -g -O2   conftest.c  >&5
+configure:20199: $? = 0
+configure:20202: test -z 			 || test ! -s conftest.err
+configure:20205: $? = 0
+configure:20208: test -s conftest
+configure:20211: $? = 0
+configure:20223: result: yes
+configure:20240: checking for vprintf
+configure:20297: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:52: warning: conflicting types for built-in function 'vprintf'
+configure:20303: $? = 0
+configure:20306: test -z 			 || test ! -s conftest.err
+configure:20309: $? = 0
+configure:20312: test -s conftest
+configure:20315: $? = 0
+configure:20327: result: yes
+configure:20334: checking for _doprnt
+configure:20391: gcc -o conftest -g -O2   conftest.c  >&5
+/tmp/ccOU58gM.o: In function `main':/xhome1/tmp/oslec/spandsp-0.0.3/conftest.c:68: undefined reference to `_doprnt'
+/tmp/ccOU58gM.o:(.data+0x0): undefined reference to `_doprnt'
+collect2: ld returned 1 exit status
+configure:20397: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| /* end confdefs.h.  */
+| /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+| #define _doprnt innocuous__doprnt
+| 
+| /* System header to define __stub macros and hopefully few prototypes,
+|     which can conflict with char _doprnt (); below.
+|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+|     <limits.h> exists even on freestanding compilers.  */
+| 
+| #ifdef __STDC__
+| # include <limits.h>
+| #else
+| # include <assert.h>
+| #endif
+| 
+| #undef _doprnt
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| {
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char _doprnt ();
+| /* The GNU C library defines this for functions which it implements
+|     to always fail with ENOSYS.  Some functions are actually named
+|     something starting with __ and the normal name is an alias.  */
+| #if defined (__stub__doprnt) || defined (__stub____doprnt)
+| choke me
+| #else
+| char (*f) () = _doprnt;
+| #endif
+| #ifdef __cplusplus
+| }
+| #endif
+| 
+| int
+| main ()
+| {
+| return f != _doprnt;
+|   ;
+|   return 0;
+| }
+configure:20421: result: no
+configure:20440: checking for stdlib.h
+configure:20445: result: yes
+configure:20584: checking for GNU libc compatible malloc
+configure:20613: gcc -o conftest -g -O2   conftest.c  >&5
+configure:20616: $? = 0
+configure:20618: ./conftest
+configure:20621: $? = 0
+configure:20635: result: yes
+configure:20665: checking for working memcmp
+configure:20713: gcc -o conftest -g -O2   conftest.c  >&5
+configure:20716: $? = 0
+configure:20718: ./conftest
+configure:20721: $? = 0
+configure:20735: result: yes
+configure:20751: checking for stdlib.h
+configure:20756: result: yes
+configure:20895: checking for GNU libc compatible realloc
+configure:20924: gcc -o conftest -g -O2   conftest.c  >&5
+configure:20927: $? = 0
+configure:20929: ./conftest
+configure:20932: $? = 0
+configure:20946: result: yes
+configure:20991: checking sys/select.h usability
+configure:21003: gcc -c -g -O2  conftest.c >&5
+configure:21009: $? = 0
+configure:21012: test -z 			 || test ! -s conftest.err
+configure:21015: $? = 0
+configure:21018: test -s conftest.o
+configure:21021: $? = 0
+configure:21031: result: yes
+configure:21035: checking sys/select.h presence
+configure:21045: gcc -E  conftest.c
+configure:21051: $? = 0
+configure:21071: result: yes
+configure:21106: checking for sys/select.h
+configure:21113: result: yes
+configure:20991: checking sys/socket.h usability
+configure:21003: gcc -c -g -O2  conftest.c >&5
+configure:21009: $? = 0
+configure:21012: test -z 			 || test ! -s conftest.err
+configure:21015: $? = 0
+configure:21018: test -s conftest.o
+configure:21021: $? = 0
+configure:21031: result: yes
+configure:21035: checking sys/socket.h presence
+configure:21045: gcc -E  conftest.c
+configure:21051: $? = 0
+configure:21071: result: yes
+configure:21106: checking for sys/socket.h
+configure:21113: result: yes
+configure:21126: checking types of arguments for select
+configure:21159: gcc -c -g -O2  conftest.c >&5
+configure:21165: $? = 0
+configure:21168: test -z 			 || test ! -s conftest.err
+configure:21171: $? = 0
+configure:21174: test -s conftest.o
+configure:21177: $? = 0
+configure:21193: result: int,fd_set *,struct timeval *
+configure:21221: checking for memmove
+configure:21278: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:62: warning: conflicting types for built-in function 'memmove'
+configure:21284: $? = 0
+configure:21287: test -z 			 || test ! -s conftest.err
+configure:21290: $? = 0
+configure:21293: test -s conftest
+configure:21296: $? = 0
+configure:21308: result: yes
+configure:21322: checking for memset
+configure:21379: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:63: warning: conflicting types for built-in function 'memset'
+configure:21385: $? = 0
+configure:21388: test -z 			 || test ! -s conftest.err
+configure:21391: $? = 0
+configure:21394: test -s conftest
+configure:21397: $? = 0
+configure:21409: result: yes
+configure:21423: checking for pow
+configure:21480: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:64: warning: conflicting types for built-in function 'pow'
+/tmp/ccSR9o3N.o: In function `main':/xhome1/tmp/oslec/spandsp-0.0.3/conftest.c:79: undefined reference to `pow'
+/tmp/ccSR9o3N.o:(.data+0x0): undefined reference to `pow'
+collect2: ld returned 1 exit status
+configure:21486: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| /* end confdefs.h.  */
+| /* Define pow to an innocuous variant, in case <limits.h> declares pow.
+|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+| #define pow innocuous_pow
+| 
+| /* System header to define __stub macros and hopefully few prototypes,
+|     which can conflict with char pow (); below.
+|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+|     <limits.h> exists even on freestanding compilers.  */
+| 
+| #ifdef __STDC__
+| # include <limits.h>
+| #else
+| # include <assert.h>
+| #endif
+| 
+| #undef pow
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| {
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char pow ();
+| /* The GNU C library defines this for functions which it implements
+|     to always fail with ENOSYS.  Some functions are actually named
+|     something starting with __ and the normal name is an alias.  */
+| #if defined (__stub_pow) || defined (__stub___pow)
+| choke me
+| #else
+| char (*f) () = pow;
+| #endif
+| #ifdef __cplusplus
+| }
+| #endif
+| 
+| int
+| main ()
+| {
+| return f != pow;
+|   ;
+|   return 0;
+| }
+configure:21510: result: no
+configure:21524: checking for sqrt
+configure:21581: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:64: warning: conflicting types for built-in function 'sqrt'
+/tmp/ccY9A33k.o: In function `main':/xhome1/tmp/oslec/spandsp-0.0.3/conftest.c:79: undefined reference to `sqrt'
+/tmp/ccY9A33k.o:(.data+0x0): undefined reference to `sqrt'
+collect2: ld returned 1 exit status
+configure:21587: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| /* end confdefs.h.  */
+| /* Define sqrt to an innocuous variant, in case <limits.h> declares sqrt.
+|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+| #define sqrt innocuous_sqrt
+| 
+| /* System header to define __stub macros and hopefully few prototypes,
+|     which can conflict with char sqrt (); below.
+|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+|     <limits.h> exists even on freestanding compilers.  */
+| 
+| #ifdef __STDC__
+| # include <limits.h>
+| #else
+| # include <assert.h>
+| #endif
+| 
+| #undef sqrt
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| {
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char sqrt ();
+| /* The GNU C library defines this for functions which it implements
+|     to always fail with ENOSYS.  Some functions are actually named
+|     something starting with __ and the normal name is an alias.  */
+| #if defined (__stub_sqrt) || defined (__stub___sqrt)
+| choke me
+| #else
+| char (*f) () = sqrt;
+| #endif
+| #ifdef __cplusplus
+| }
+| #endif
+| 
+| int
+| main ()
+| {
+| return f != sqrt;
+|   ;
+|   return 0;
+| }
+configure:21611: result: no
+configure:21625: checking for rint
+configure:21682: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:64: warning: conflicting types for built-in function 'rint'
+/tmp/cca6Dnx4.o: In function `main':/xhome1/tmp/oslec/spandsp-0.0.3/conftest.c:79: undefined reference to `rint'
+/tmp/cca6Dnx4.o:(.data+0x0): undefined reference to `rint'
+collect2: ld returned 1 exit status
+configure:21688: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| /* end confdefs.h.  */
+| /* Define rint to an innocuous variant, in case <limits.h> declares rint.
+|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+| #define rint innocuous_rint
+| 
+| /* System header to define __stub macros and hopefully few prototypes,
+|     which can conflict with char rint (); below.
+|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+|     <limits.h> exists even on freestanding compilers.  */
+| 
+| #ifdef __STDC__
+| # include <limits.h>
+| #else
+| # include <assert.h>
+| #endif
+| 
+| #undef rint
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| {
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char rint ();
+| /* The GNU C library defines this for functions which it implements
+|     to always fail with ENOSYS.  Some functions are actually named
+|     something starting with __ and the normal name is an alias.  */
+| #if defined (__stub_rint) || defined (__stub___rint)
+| choke me
+| #else
+| char (*f) () = rint;
+| #endif
+| #ifdef __cplusplus
+| }
+| #endif
+| 
+| int
+| main ()
+| {
+| return f != rint;
+|   ;
+|   return 0;
+| }
+configure:21712: result: no
+configure:21726: checking for select
+configure:21783: gcc -o conftest -g -O2   conftest.c  >&5
+configure:21789: $? = 0
+configure:21792: test -z 			 || test ! -s conftest.err
+configure:21795: $? = 0
+configure:21798: test -s conftest
+configure:21801: $? = 0
+configure:21813: result: yes
+configure:21827: checking for strcasecmp
+configure:21884: gcc -o conftest -g -O2   conftest.c  >&5
+configure:21890: $? = 0
+configure:21893: test -z 			 || test ! -s conftest.err
+configure:21896: $? = 0
+configure:21899: test -s conftest
+configure:21902: $? = 0
+configure:21914: result: yes
+configure:21928: checking for strchr
+configure:21985: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:66: warning: conflicting types for built-in function 'strchr'
+configure:21991: $? = 0
+configure:21994: test -z 			 || test ! -s conftest.err
+configure:21997: $? = 0
+configure:22000: test -s conftest
+configure:22003: $? = 0
+configure:22015: result: yes
+configure:22029: checking for strdup
+configure:22086: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:67: warning: conflicting types for built-in function 'strdup'
+configure:22092: $? = 0
+configure:22095: test -z 			 || test ! -s conftest.err
+configure:22098: $? = 0
+configure:22101: test -s conftest
+configure:22104: $? = 0
+configure:22116: result: yes
+configure:22130: checking for strerror
+configure:22187: gcc -o conftest -g -O2   conftest.c  >&5
+configure:22193: $? = 0
+configure:22196: test -z 			 || test ! -s conftest.err
+configure:22199: $? = 0
+configure:22202: test -s conftest
+configure:22205: $? = 0
+configure:22217: result: yes
+configure:22231: checking for strstr
+configure:22288: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:69: warning: conflicting types for built-in function 'strstr'
+configure:22294: $? = 0
+configure:22297: test -z 			 || test ! -s conftest.err
+configure:22300: $? = 0
+configure:22303: test -s conftest
+configure:22306: $? = 0
+configure:22318: result: yes
+configure:22332: checking for strtol
+configure:22389: gcc -o conftest -g -O2   conftest.c  >&5
+configure:22395: $? = 0
+configure:22398: test -z 			 || test ! -s conftest.err
+configure:22401: $? = 0
+configure:22404: test -s conftest
+configure:22407: $? = 0
+configure:22419: result: yes
+configure:22433: checking for gettimeofday
+configure:22490: gcc -o conftest -g -O2   conftest.c  >&5
+configure:22496: $? = 0
+configure:22499: test -z 			 || test ! -s conftest.err
+configure:22502: $? = 0
+configure:22505: test -s conftest
+configure:22508: $? = 0
+configure:22520: result: yes
+configure:22531: checking for ANSI C header files
+configure:22686: result: yes
+configure:22696: checking for sys/wait.h that is POSIX.1 compatible
+configure:22727: gcc -c -g -O2  conftest.c >&5
+configure:22733: $? = 0
+configure:22736: test -z 			 || test ! -s conftest.err
+configure:22739: $? = 0
+configure:22742: test -s conftest.o
+configure:22745: $? = 0
+configure:22756: result: yes
+configure:22766: checking whether time.h and sys/time.h may both be included
+configure:22791: gcc -c -g -O2  conftest.c >&5
+configure:22797: $? = 0
+configure:22800: test -z 			 || test ! -s conftest.err
+configure:22803: $? = 0
+configure:22806: test -s conftest.o
+configure:22809: $? = 0
+configure:22820: result: yes
+configure:22846: checking socket.h usability
+configure:22858: gcc -c -g -O2  conftest.c >&5
+conftest.c:85:20: error: socket.h: No such file or directory
+configure:22864: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <socket.h>
+configure:22886: result: no
+configure:22890: checking socket.h presence
+configure:22900: gcc -E  conftest.c
+conftest.c:51:20: error: socket.h: No such file or directory
+configure:22906: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| /* end confdefs.h.  */
+| #include <socket.h>
+configure:22926: result: no
+configure:22961: checking for socket.h
+configure:22968: result: no
+configure:22986: checking for inttypes.h
+configure:22991: result: yes
+configure:23135: checking for unistd.h
+configure:23140: result: yes
+configure:23284: checking for stdlib.h
+configure:23289: result: yes
+configure:23433: checking for string.h
+configure:23438: result: yes
+configure:23582: checking for strings.h
+configure:23587: result: yes
+configure:23740: checking malloc.h usability
+configure:23752: gcc -c -g -O2  conftest.c >&5
+configure:23758: $? = 0
+configure:23761: test -z 			 || test ! -s conftest.err
+configure:23764: $? = 0
+configure:23767: test -s conftest.o
+configure:23770: $? = 0
+configure:23780: result: yes
+configure:23784: checking malloc.h presence
+configure:23794: gcc -E  conftest.c
+configure:23800: $? = 0
+configure:23820: result: yes
+configure:23855: checking for malloc.h
+configure:23862: result: yes
+configure:23889: checking tgmath.h usability
+configure:23901: gcc -c -g -O2  conftest.c >&5
+configure:23907: $? = 0
+configure:23910: test -z 			 || test ! -s conftest.err
+configure:23913: $? = 0
+configure:23916: test -s conftest.o
+configure:23919: $? = 0
+configure:23929: result: yes
+configure:23933: checking tgmath.h presence
+configure:23943: gcc -E  conftest.c
+configure:23949: $? = 0
+configure:23969: result: yes
+configure:24004: checking for tgmath.h
+configure:24011: result: yes
+configure:24038: checking math.h usability
+configure:24050: gcc -c -g -O2  conftest.c >&5
+configure:24056: $? = 0
+configure:24059: test -z 			 || test ! -s conftest.err
+configure:24062: $? = 0
+configure:24065: test -s conftest.o
+configure:24068: $? = 0
+configure:24078: result: yes
+configure:24082: checking math.h presence
+configure:24092: gcc -E  conftest.c
+configure:24098: $? = 0
+configure:24118: result: yes
+configure:24153: checking for math.h
+configure:24160: result: yes
+configure:24187: checking float.h usability
+configure:24199: gcc -c -g -O2  conftest.c >&5
+configure:24205: $? = 0
+configure:24208: test -z 			 || test ! -s conftest.err
+configure:24211: $? = 0
+configure:24214: test -s conftest.o
+configure:24217: $? = 0
+configure:24227: result: yes
+configure:24231: checking float.h presence
+configure:24241: gcc -E  conftest.c
+configure:24247: $? = 0
+configure:24267: result: yes
+configure:24302: checking for float.h
+configure:24309: result: yes
+configure:24336: checking fcntl.h usability
+configure:24348: gcc -c -g -O2  conftest.c >&5
+configure:24354: $? = 0
+configure:24357: test -z 			 || test ! -s conftest.err
+configure:24360: $? = 0
+configure:24363: test -s conftest.o
+configure:24366: $? = 0
+configure:24376: result: yes
+configure:24380: checking fcntl.h presence
+configure:24390: gcc -E  conftest.c
+configure:24396: $? = 0
+configure:24416: result: yes
+configure:24451: checking for fcntl.h
+configure:24458: result: yes
+configure:24485: checking sys/time.h usability
+configure:24497: gcc -c -g -O2  conftest.c >&5
+configure:24503: $? = 0
+configure:24506: test -z 			 || test ! -s conftest.err
+configure:24509: $? = 0
+configure:24512: test -s conftest.o
+configure:24515: $? = 0
+configure:24525: result: yes
+configure:24529: checking sys/time.h presence
+configure:24539: gcc -E  conftest.c
+configure:24545: $? = 0
+configure:24565: result: yes
+configure:24600: checking for sys/time.h
+configure:24607: result: yes
+configure:24625: checking for sys/select.h
+configure:24630: result: yes
+configure:24783: checking sys/ioctl.h usability
+configure:24795: gcc -c -g -O2  conftest.c >&5
+configure:24801: $? = 0
+configure:24804: test -z 			 || test ! -s conftest.err
+configure:24807: $? = 0
+configure:24810: test -s conftest.o
+configure:24813: $? = 0
+configure:24823: result: yes
+configure:24827: checking sys/ioctl.h presence
+configure:24837: gcc -E  conftest.c
+configure:24843: $? = 0
+configure:24863: result: yes
+configure:24898: checking for sys/ioctl.h
+configure:24905: result: yes
+configure:24932: checking sys/fcntl.h usability
+configure:24944: gcc -c -g -O2  conftest.c >&5
+configure:24950: $? = 0
+configure:24953: test -z 			 || test ! -s conftest.err
+configure:24956: $? = 0
+configure:24959: test -s conftest.o
+configure:24962: $? = 0
+configure:24972: result: yes
+configure:24976: checking sys/fcntl.h presence
+configure:24986: gcc -E  conftest.c
+configure:24992: $? = 0
+configure:25012: result: yes
+configure:25047: checking for sys/fcntl.h
+configure:25054: result: yes
+configure:25081: checking audiofile.h usability
+configure:25093: gcc -c -g -O2  conftest.c >&5
+configure:25099: $? = 0
+configure:25102: test -z 			 || test ! -s conftest.err
+configure:25105: $? = 0
+configure:25108: test -s conftest.o
+configure:25111: $? = 0
+configure:25121: result: yes
+configure:25125: checking audiofile.h presence
+configure:25135: gcc -E  conftest.c
+configure:25141: $? = 0
+configure:25161: result: yes
+configure:25196: checking for audiofile.h
+configure:25203: result: yes
+configure:25230: checking fftw.h usability
+configure:25242: gcc -c -g -O2  conftest.c >&5
+conftest.c:100:18: error: fftw.h: No such file or directory
+configure:25248: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <fftw.h>
+configure:25270: result: no
+configure:25274: checking fftw.h presence
+configure:25284: gcc -E  conftest.c
+conftest.c:66:18: error: fftw.h: No such file or directory
+configure:25290: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| /* end confdefs.h.  */
+| #include <fftw.h>
+configure:25310: result: no
+configure:25345: checking for fftw.h
+configure:25352: result: no
+configure:25379: checking fftw3.h usability
+configure:25391: gcc -c -g -O2  conftest.c >&5
+configure:25397: $? = 0
+configure:25400: test -z 			 || test ! -s conftest.err
+configure:25403: $? = 0
+configure:25406: test -s conftest.o
+configure:25409: $? = 0
+configure:25419: result: yes
+configure:25423: checking fftw3.h presence
+configure:25433: gcc -E  conftest.c
+configure:25439: $? = 0
+configure:25459: result: yes
+configure:25494: checking for fftw3.h
+configure:25501: result: yes
+configure:25528: checking tiffio.h usability
+configure:25540: gcc -c -g -O2  conftest.c >&5
+configure:25546: $? = 0
+configure:25549: test -z 			 || test ! -s conftest.err
+configure:25552: $? = 0
+configure:25555: test -s conftest.o
+configure:25558: $? = 0
+configure:25568: result: yes
+configure:25572: checking tiffio.h presence
+configure:25582: gcc -E  conftest.c
+configure:25588: $? = 0
+configure:25608: result: yes
+configure:25643: checking for tiffio.h
+configure:25650: result: yes
+configure:25677: checking pthread.h usability
+configure:25689: gcc -c -g -O2  conftest.c >&5
+configure:25695: $? = 0
+configure:25698: test -z 			 || test ! -s conftest.err
+configure:25701: $? = 0
+configure:25704: test -s conftest.o
+configure:25707: $? = 0
+configure:25717: result: yes
+configure:25721: checking pthread.h presence
+configure:25731: gcc -E  conftest.c
+configure:25737: $? = 0
+configure:25757: result: yes
+configure:25792: checking for pthread.h
+configure:25799: result: yes
+configure:25826: checking unicall.h usability
+configure:25838: gcc -c -g -O2  conftest.c >&5
+conftest.c:103:21: error: unicall.h: No such file or directory
+configure:25844: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <unicall.h>
+configure:25866: result: no
+configure:25870: checking unicall.h presence
+configure:25880: gcc -E  conftest.c
+conftest.c:69:21: error: unicall.h: No such file or directory
+configure:25886: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| /* end confdefs.h.  */
+| #include <unicall.h>
+configure:25906: result: no
+configure:25941: checking for unicall.h
+configure:25948: result: no
+configure:25975: checking X11/X.h usability
+configure:25987: gcc -c -g -O2  conftest.c >&5
+configure:25993: $? = 0
+configure:25996: test -z 			 || test ! -s conftest.err
+configure:25999: $? = 0
+configure:26002: test -s conftest.o
+configure:26005: $? = 0
+configure:26015: result: yes
+configure:26019: checking X11/X.h presence
+configure:26029: gcc -E  conftest.c
+configure:26035: $? = 0
+configure:26055: result: yes
+configure:26090: checking for X11/X.h
+configure:26097: result: yes
+configure:26112: checking for libxml/xmlmemory.h
+configure:26132: gcc -c -g -O2  conftest.c >&5
+conftest.c:70:30: error: libxml/xmlmemory.h: No such file or directory
+configure:26138: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <libxml/xmlmemory.h>
+| int
+| main ()
+| {
+| int a = 1;
+|   ;
+|   return 0;
+| }
+configure:26183: gcc -c -g -O2  -I/usr/include conftest.c >&5
+conftest.c:70:30: error: libxml/xmlmemory.h: No such file or directory
+configure:26189: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <libxml/xmlmemory.h>
+| int
+| main ()
+| {
+| int a = 1;
+|   ;
+|   return 0;
+| }
+configure:26183: gcc -c -g -O2  -I/usr/local/include conftest.c >&5
+conftest.c:70:30: error: libxml/xmlmemory.h: No such file or directory
+configure:26189: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <libxml/xmlmemory.h>
+| int
+| main ()
+| {
+| int a = 1;
+|   ;
+|   return 0;
+| }
+configure:26183: gcc -c -g -O2  -I/usr/include/libxml2 conftest.c >&5
+conftest.c:70:30: error: libxml/xmlmemory.h: No such file or directory
+configure:26189: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <libxml/xmlmemory.h>
+| int
+| main ()
+| {
+| int a = 1;
+|   ;
+|   return 0;
+| }
+configure:26183: gcc -c -g -O2  -I/usr/local/include/libxml2 conftest.c >&5
+conftest.c:70:30: error: libxml/xmlmemory.h: No such file or directory
+configure:26189: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <libxml/xmlmemory.h>
+| int
+| main ()
+| {
+| int a = 1;
+|   ;
+|   return 0;
+| }
+configure:26233: checking libxml/xmlmemory.h usability
+configure:26245: gcc -c -g -O2   conftest.c >&5
+conftest.c:104:30: error: libxml/xmlmemory.h: No such file or directory
+configure:26251: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <libxml/xmlmemory.h>
+configure:26273: result: no
+configure:26277: checking libxml/xmlmemory.h presence
+configure:26287: gcc -E   conftest.c
+conftest.c:70:30: error: libxml/xmlmemory.h: No such file or directory
+configure:26293: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <libxml/xmlmemory.h>
+configure:26313: result: no
+configure:26348: checking for libxml/xmlmemory.h
+configure:26355: result: no
+configure:26382: checking libxml/parser.h usability
+configure:26394: gcc -c -g -O2   conftest.c >&5
+conftest.c:104:27: error: libxml/parser.h: No such file or directory
+configure:26400: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <libxml/parser.h>
+configure:26422: result: no
+configure:26426: checking libxml/parser.h presence
+configure:26436: gcc -E   conftest.c
+conftest.c:70:27: error: libxml/parser.h: No such file or directory
+configure:26442: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <libxml/parser.h>
+configure:26462: result: no
+configure:26497: checking for libxml/parser.h
+configure:26504: result: no
+configure:26531: checking libxml/xinclude.h usability
+configure:26543: gcc -c -g -O2   conftest.c >&5
+conftest.c:104:29: error: libxml/xinclude.h: No such file or directory
+configure:26549: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <libxml/xinclude.h>
+configure:26571: result: no
+configure:26575: checking libxml/xinclude.h presence
+configure:26585: gcc -E   conftest.c
+conftest.c:70:29: error: libxml/xinclude.h: No such file or directory
+configure:26591: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <libxml/xinclude.h>
+configure:26611: result: no
+configure:26646: checking for libxml/xinclude.h
+configure:26653: result: no
+configure:26688: checking FL/Fl.H usability
+configure:26700: g++ -c -g -O2   conftest.cc >&5
+conftest.cc:104:19: error: FL/Fl.H: No such file or directory
+configure:26706: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <FL/Fl.H>
+configure:26728: result: no
+configure:26732: checking FL/Fl.H presence
+configure:26742: g++ -E   conftest.cc
+conftest.cc:70:19: error: FL/Fl.H: No such file or directory
+configure:26748: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <FL/Fl.H>
+configure:26768: result: no
+configure:26803: checking for FL/Fl.H
+configure:26810: result: no
+configure:26837: checking FL/Fl_Overlay_Window.H usability
+configure:26849: g++ -c -g -O2   conftest.cc >&5
+conftest.cc:104:34: error: FL/Fl_Overlay_Window.H: No such file or directory
+configure:26855: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <FL/Fl_Overlay_Window.H>
+configure:26877: result: no
+configure:26881: checking FL/Fl_Overlay_Window.H presence
+configure:26891: g++ -E   conftest.cc
+conftest.cc:70:34: error: FL/Fl_Overlay_Window.H: No such file or directory
+configure:26897: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <FL/Fl_Overlay_Window.H>
+configure:26917: result: no
+configure:26952: checking for FL/Fl_Overlay_Window.H
+configure:26959: result: no
+configure:26986: checking FL/Fl_Light_Button.H usability
+configure:26998: g++ -c -g -O2   conftest.cc >&5
+conftest.cc:104:32: error: FL/Fl_Light_Button.H: No such file or directory
+configure:27004: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <FL/Fl_Light_Button.H>
+configure:27026: result: no
+configure:27030: checking FL/Fl_Light_Button.H presence
+configure:27040: g++ -E   conftest.cc
+conftest.cc:70:32: error: FL/Fl_Light_Button.H: No such file or directory
+configure:27046: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <FL/Fl_Light_Button.H>
+configure:27066: result: no
+configure:27101: checking for FL/Fl_Light_Button.H
+configure:27108: result: no
+configure:27135: checking FL/fl_draw.H usability
+configure:27147: g++ -c -g -O2   conftest.cc >&5
+conftest.cc:104:24: error: FL/fl_draw.H: No such file or directory
+configure:27153: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <FL/fl_draw.H>
+configure:27175: result: no
+configure:27179: checking FL/fl_draw.H presence
+configure:27189: g++ -E   conftest.cc
+conftest.cc:70:24: error: FL/fl_draw.H: No such file or directory
+configure:27195: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <FL/fl_draw.H>
+configure:27215: result: no
+configure:27250: checking for FL/fl_draw.H
+configure:27257: result: no
+configure:27284: checking FL/Fl_Cartesian.H usability
+configure:27296: g++ -c -g -O2   conftest.cc >&5
+conftest.cc:104:29: error: FL/Fl_Cartesian.H: No such file or directory
+configure:27302: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <FL/Fl_Cartesian.H>
+configure:27324: result: no
+configure:27328: checking FL/Fl_Cartesian.H presence
+configure:27338: g++ -E   conftest.cc
+conftest.cc:70:29: error: FL/Fl_Cartesian.H: No such file or directory
+configure:27344: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <FL/Fl_Cartesian.H>
+configure:27364: result: no
+configure:27399: checking for FL/Fl_Cartesian.H
+configure:27406: result: no
+configure:27433: checking FL/Fl_Audio_Meter.H usability
+configure:27445: g++ -c -g -O2   conftest.cc >&5
+conftest.cc:104:31: error: FL/Fl_Audio_Meter.H: No such file or directory
+configure:27451: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #if HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #if HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #if STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # if HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #if HAVE_STRING_H
+| # if !STDC_HEADERS && HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #if HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #if HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #else
+| # if HAVE_STDINT_H
+| #  include <stdint.h>
+| # endif
+| #endif
+| #if HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <FL/Fl_Audio_Meter.H>
+configure:27473: result: no
+configure:27477: checking FL/Fl_Audio_Meter.H presence
+configure:27487: g++ -E   conftest.cc
+conftest.cc:70:31: error: FL/Fl_Audio_Meter.H: No such file or directory
+configure:27493: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| /* end confdefs.h.  */
+| #include <FL/Fl_Audio_Meter.H>
+configure:27513: result: no
+configure:27548: checking for FL/Fl_Audio_Meter.H
+configure:27555: result: no
+configure:27576: checking for /usr/X11R6/lib64
+configure:27591: result: no
+configure:27596: checking for /usr/X11R6/lib
+configure:27611: result: yes
+configure:27621: checking for XftFontOpen in -lXft
+configure:27651: gcc -o conftest -g -O2    conftest.c -lXft  -L/usr/X11R6/lib  >&5
+configure:27657: $? = 0
+configure:27660: test -z 			 || test ! -s conftest.err
+configure:27663: $? = 0
+configure:27666: test -s conftest
+configure:27669: $? = 0
+configure:27682: result: yes
+configure:27688: checking for XextCreateExtension in -lXext
+configure:27718: gcc -o conftest -g -O2    conftest.c -lXext  -L/usr/X11R6/lib -lXft  >&5
+configure:27724: $? = 0
+configure:27727: test -z 			 || test ! -s conftest.err
+configure:27730: $? = 0
+configure:27733: test -s conftest
+configure:27736: $? = 0
+configure:27749: result: yes
+configure:27755: checking for XOpenDisplay in -lX11
+configure:27785: gcc -o conftest -g -O2    conftest.c -lX11  -L/usr/X11R6/lib -lXft -lXext  >&5
+configure:27791: $? = 0
+configure:27794: test -z 			 || test ! -s conftest.err
+configure:27797: $? = 0
+configure:27800: test -s conftest
+configure:27803: $? = 0
+configure:27816: result: yes
+configure:27823: checking for TIFFOpen in -ltiff
+configure:27853: gcc -o conftest -g -O2    conftest.c -ltiff -lm  >&5
+configure:27859: $? = 0
+configure:27862: test -z 			 || test ! -s conftest.err
+configure:27865: $? = 0
+configure:27868: test -s conftest
+configure:27871: $? = 0
+configure:27884: result: yes
+configure:27900: checking for cos in -lm
+configure:27930: gcc -o conftest -g -O2    conftest.c -lm  -ltiff  >&5
+conftest.c:78: warning: conflicting types for built-in function 'cos'
+configure:27936: $? = 0
+configure:27939: test -z 			 || test ! -s conftest.err
+configure:27942: $? = 0
+configure:27945: test -s conftest
+configure:27948: $? = 0
+configure:27961: result: yes
+configure:27972: checking for xmlParseFile in -lxml2
+configure:28002: gcc -o conftest -g -O2    conftest.c -lxml2  -lm -ltiff  >&5
+/usr/bin/ld: cannot find -lxml2
+collect2: ld returned 1 exit status
+configure:28008: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| #define HAVE_LIBTIFF 1
+| #define HAVE_LIBM 1
+| /* end confdefs.h.  */
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char xmlParseFile ();
+| int
+| main ()
+| {
+| xmlParseFile ();
+|   ;
+|   return 0;
+| }
+configure:28033: result: no
+configure:28050: checking for main in -lfltk
+configure:28074: g++ -o conftest -g -O2    conftest.cc -lfltk  -lm -ltiff  >&5
+/usr/bin/ld: cannot find -lfltk
+collect2: ld returned 1 exit status
+configure:28080: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| #define HAVE_LIBTIFF 1
+| #define HAVE_LIBM 1
+| /* end confdefs.h.  */
+| 
+| 
+| int
+| main ()
+| {
+| main ();
+|   ;
+|   return 0;
+| }
+configure:28105: result: no
+configure:28111: checking for main in -lfltk_cartesian
+configure:28135: g++ -o conftest -g -O2    conftest.cc -lfltk_cartesian  -lm -ltiff  >&5
+/usr/bin/ld: cannot find -lfltk_cartesian
+collect2: ld returned 1 exit status
+configure:28141: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| #define HAVE_LIBTIFF 1
+| #define HAVE_LIBM 1
+| /* end confdefs.h.  */
+| 
+| 
+| int
+| main ()
+| {
+| main ();
+|   ;
+|   return 0;
+| }
+configure:28166: result: no
+configure:28172: checking for main in -lfltk_audio_meter
+configure:28196: g++ -o conftest -g -O2    conftest.cc -lfltk_audio_meter  -lm -ltiff  >&5
+/usr/bin/ld: cannot find -lfltk_audio_meter
+collect2: ld returned 1 exit status
+configure:28202: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| #define HAVE_LIBTIFF 1
+| #define HAVE_LIBM 1
+| /* end confdefs.h.  */
+| 
+| 
+| int
+| main ()
+| {
+| main ();
+|   ;
+|   return 0;
+| }
+configure:28227: result: no
+configure:28239: checking for afOpenFile in -laudiofile
+configure:28269: gcc -o conftest -g -O2    conftest.c -laudiofile  -lm -ltiff  >&5
+configure:28275: $? = 0
+configure:28278: test -z 			 || test ! -s conftest.err
+configure:28281: $? = 0
+configure:28284: test -s conftest
+configure:28287: $? = 0
+configure:28300: result: yes
+configure:28310: checking for fftw_plan_dft_1d in -lfftw3
+configure:28340: gcc -o conftest -g -O2    conftest.c -lfftw3  -lm -ltiff  >&5
+configure:28346: $? = 0
+configure:28349: test -z 			 || test ! -s conftest.err
+configure:28352: $? = 0
+configure:28355: test -s conftest
+configure:28358: $? = 0
+configure:28371: result: yes
+configure:28377: checking for fftw_create_plan in -lfftw
+configure:28407: gcc -o conftest -g -O2    conftest.c -lfftw  -lm -ltiff  >&5
+/usr/bin/ld: cannot find -lfftw
+collect2: ld returned 1 exit status
+configure:28413: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| #define HAVE_LIBTIFF 1
+| #define HAVE_LIBM 1
+| /* end confdefs.h.  */
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char fftw_create_plan ();
+| int
+| main ()
+| {
+| fftw_create_plan ();
+|   ;
+|   return 0;
+| }
+configure:28438: result: no
+configure:28444: checking for pthread_attr_init in -lpthread
+configure:28474: gcc -o conftest -g -O2    conftest.c -lpthread  -lm -ltiff  >&5
+configure:28480: $? = 0
+configure:28483: test -z 			 || test ! -s conftest.err
+configure:28486: $? = 0
+configure:28489: test -s conftest
+configure:28492: $? = 0
+configure:28505: result: yes
+configure:28511: checking for dlopen in -ldl
+configure:28541: gcc -o conftest -g -O2    conftest.c -ldl  -lm -ltiff  >&5
+configure:28547: $? = 0
+configure:28550: test -z 			 || test ! -s conftest.err
+configure:28553: $? = 0
+configure:28556: test -s conftest
+configure:28559: $? = 0
+configure:28572: result: yes
+configure:28578: checking for uc_start in -lunicall
+configure:28608: gcc -o conftest -g -O2    conftest.c -lunicall -ltiff -ldl -lm -ltiff  >&5
+/usr/bin/ld: cannot find -lunicall
+collect2: ld returned 1 exit status
+configure:28614: $? = 1
+configure: failed program was:
+| /* confdefs.h.  */
+| 
+| #define PACKAGE_NAME ""
+| #define PACKAGE_TARNAME ""
+| #define PACKAGE_VERSION ""
+| #define PACKAGE_STRING ""
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE "spandsp"
+| #define VERSION "0.0.3"
+| #ifdef __cplusplus
+| extern "C" void std::exit (int) throw (); using std::exit;
+| #endif
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_LONG_LONG 1
+| #define HAVE_LONG_DOUBLE 1
+| #define RETSIGTYPE void
+| #define HAVE_VPRINTF 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_REALLOC 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_SOCKET_H 1
+| #define SELECT_TYPE_ARG1 int
+| #define SELECT_TYPE_ARG234 (fd_set *)
+| #define SELECT_TYPE_ARG5 (struct timeval *)
+| #define HAVE_MEMMOVE 1
+| #define HAVE_MEMSET 1
+| #define HAVE_SELECT 1
+| #define HAVE_STRCASECMP 1
+| #define HAVE_STRCHR 1
+| #define HAVE_STRDUP 1
+| #define HAVE_STRERROR 1
+| #define HAVE_STRSTR 1
+| #define HAVE_STRTOL 1
+| #define HAVE_GETTIMEOFDAY 1
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_WAIT_H 1
+| #define TIME_WITH_SYS_TIME 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_MALLOC_H 1
+| #define HAVE_TGMATH_H 1
+| #define HAVE_MATH_H 1
+| #define HAVE_FLOAT_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_SYS_SELECT_H 1
+| #define HAVE_SYS_IOCTL_H 1
+| #define HAVE_SYS_FCNTL_H 1
+| #define HAVE_AUDIOFILE_H 1
+| #define HAVE_FFTW3_H 1
+| #define HAVE_TIFFIO_H 1
+| #define HAVE_PTHREAD_H 1
+| #define HAVE_X11_X_H 1
+| #define HAVE_LIBTIFF 1
+| #define HAVE_LIBM 1
+| /* end confdefs.h.  */
+| 
+| /* Override any gcc2 internal prototype to avoid an error.  */
+| #ifdef __cplusplus
+| extern "C"
+| #endif
+| /* We use char because int might match the return type of a gcc2
+|    builtin and then its argument prototype would still apply.  */
+| char uc_start ();
+| int
+| main ()
+| {
+| uc_start ();
+|   ;
+|   return 0;
+| }
+configure:28639: result: no
+configure:28872: creating ./config.status
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by config.status, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = 
+  CONFIG_HEADERS  = 
+  CONFIG_LINKS    = 
+  CONFIG_COMMANDS = 
+  $ ./config.status 
+
+on bunny
+
+config.status:774: creating Makefile
+config.status:774: creating doc/Makefile
+config.status:774: creating itutests/Makefile
+config.status:774: creating itutests/fax/Makefile
+config.status:774: creating src/Makefile
+config.status:774: creating tests/Makefile
+config.status:774: creating spandsp.spec
+config.status:840: creating src/config.h
+config.status:1060: src/config.h is unchanged
+config.status:1240: executing depfiles commands
+
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+
+ac_cv_build=i686-pc-linux-gnu
+ac_cv_build_alias=i686-pc-linux-gnu
+ac_cv_c_compiler_gnu=yes
+ac_cv_c_const=yes
+ac_cv_c_inline=inline
+ac_cv_c_volatile=yes
+ac_cv_cxx_compiler_gnu=yes
+ac_cv_env_CC_set=
+ac_cv_env_CC_value=
+ac_cv_env_CFLAGS_set=
+ac_cv_env_CFLAGS_value=
+ac_cv_env_CPPFLAGS_set=
+ac_cv_env_CPPFLAGS_value=
+ac_cv_env_CPP_set=
+ac_cv_env_CPP_value=
+ac_cv_env_CXXCPP_set=
+ac_cv_env_CXXCPP_value=
+ac_cv_env_CXXFLAGS_set=
+ac_cv_env_CXXFLAGS_value=
+ac_cv_env_CXX_set=
+ac_cv_env_CXX_value=
+ac_cv_env_F77_set=
+ac_cv_env_F77_value=
+ac_cv_env_FFLAGS_set=
+ac_cv_env_FFLAGS_value=
+ac_cv_env_LDFLAGS_set=
+ac_cv_env_LDFLAGS_value=
+ac_cv_env_build_alias_set=
+ac_cv_env_build_alias_value=
+ac_cv_env_host_alias_set=
+ac_cv_env_host_alias_value=
+ac_cv_env_target_alias_set=
+ac_cv_env_target_alias_value=
+ac_cv_exeext=
+ac_cv_f77_compiler_gnu=no
+ac_cv_file__usr_X11R6_lib=yes
+ac_cv_file__usr_X11R6_lib64=no
+ac_cv_func__doprnt=no
+ac_cv_func_gettimeofday=yes
+ac_cv_func_malloc_0_nonnull=yes
+ac_cv_func_memcmp_working=yes
+ac_cv_func_memmove=yes
+ac_cv_func_memset=yes
+ac_cv_func_pow=no
+ac_cv_func_realloc_0_nonnull=yes
+ac_cv_func_rint=no
+ac_cv_func_select=yes
+ac_cv_func_select_args='int,fd_set *,struct timeval *'
+ac_cv_func_sqrt=no
+ac_cv_func_strcasecmp=yes
+ac_cv_func_strchr=yes
+ac_cv_func_strdup=yes
+ac_cv_func_strerror=yes
+ac_cv_func_strstr=yes
+ac_cv_func_strtol=yes
+ac_cv_func_vprintf=yes
+ac_cv_header_FL_Fl_Audio_Meter_H=no
+ac_cv_header_FL_Fl_Cartesian_H=no
+ac_cv_header_FL_Fl_H=no
+ac_cv_header_FL_Fl_Light_Button_H=no
+ac_cv_header_FL_Fl_Overlay_Window_H=no
+ac_cv_header_FL_fl_draw_H=no
+ac_cv_header_X11_X_h=yes
+ac_cv_header_audiofile_h=yes
+ac_cv_header_dlfcn_h=yes
+ac_cv_header_fcntl_h=yes
+ac_cv_header_fftw3_h=yes
+ac_cv_header_fftw_h=no
+ac_cv_header_float_h=yes
+ac_cv_header_inttypes_h=yes
+ac_cv_header_libxml_parser_h=no
+ac_cv_header_libxml_xinclude_h=no
+ac_cv_header_libxml_xmlmemory_h=no
+ac_cv_header_malloc_h=yes
+ac_cv_header_math_h=yes
+ac_cv_header_memory_h=yes
+ac_cv_header_pthread_h=yes
+ac_cv_header_socket_h=no
+ac_cv_header_stdc=yes
+ac_cv_header_stdint_h=yes
+ac_cv_header_stdlib_h=yes
+ac_cv_header_string_h=yes
+ac_cv_header_strings_h=yes
+ac_cv_header_sys_fcntl_h=yes
+ac_cv_header_sys_ioctl_h=yes
+ac_cv_header_sys_select_h=yes
+ac_cv_header_sys_socket_h=yes
+ac_cv_header_sys_stat_h=yes
+ac_cv_header_sys_time_h=yes
+ac_cv_header_sys_types_h=yes
+ac_cv_header_sys_wait_h=yes
+ac_cv_header_tgmath_h=yes
+ac_cv_header_tiffio_h=yes
+ac_cv_header_time=yes
+ac_cv_header_unicall_h=no
+ac_cv_header_unistd_h=yes
+ac_cv_host=i686-pc-linux-gnu
+ac_cv_host_alias=i686-pc-linux-gnu
+ac_cv_lib_X11_XOpenDisplay=yes
+ac_cv_lib_Xext_XextCreateExtension=yes
+ac_cv_lib_Xft_XftFontOpen=yes
+ac_cv_lib_audiofile_afOpenFile=yes
+ac_cv_lib_dl_dlopen=yes
+ac_cv_lib_error_at_line=yes
+ac_cv_lib_fftw3_fftw_plan_dft_1d=yes
+ac_cv_lib_fftw_fftw_create_plan=no
+ac_cv_lib_fltk_audio_meter_main=no
+ac_cv_lib_fltk_cartesian_main=no
+ac_cv_lib_fltk_main=no
+ac_cv_lib_m_cos=yes
+ac_cv_lib_pthread_pthread_attr_init=yes
+ac_cv_lib_tiff_TIFFOpen=yes
+ac_cv_lib_unicall_uc_start=no
+ac_cv_lib_xml2_xmlParseFile=no
+ac_cv_objext=o
+ac_cv_path_install='/usr/bin/install -c'
+ac_cv_prog_AWK=gawk
+ac_cv_prog_CPP='gcc -E'
+ac_cv_prog_CXXCPP='g++ -E'
+ac_cv_prog_ac_ct_AR=ar
+ac_cv_prog_ac_ct_CC=gcc
+ac_cv_prog_ac_ct_CXX=g++
+ac_cv_prog_ac_ct_RANLIB=ranlib
+ac_cv_prog_ac_ct_STRIP=strip
+ac_cv_prog_cc_g=yes
+ac_cv_prog_cc_stdc=
+ac_cv_prog_cxx_g=yes
+ac_cv_prog_egrep='grep -E'
+ac_cv_prog_f77_g=no
+ac_cv_prog_gcc_traditional=no
+ac_cv_prog_make_make_set=yes
+ac_cv_type_long_double=yes
+ac_cv_type_long_long=yes
+ac_cv_type_signal=void
+am_cv_CC_dependencies_compiler_type=gcc3
+am_cv_CXX_dependencies_compiler_type=gcc3
+ax_cv_c_compiler_vendor=gnu
+lt_cv_deplibs_check_method=pass_all
+lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_ld_reload_flag=-r
+lt_cv_objdir=.libs
+lt_cv_path_LD=/usr/bin/ld
+lt_cv_path_LDCXX=/usr/bin/ld
+lt_cv_path_NM='/usr/bin/nm -B'
+lt_cv_path_SED=/bin/sed
+lt_cv_prog_compiler_c_o=yes
+lt_cv_prog_compiler_c_o_CXX=yes
+lt_cv_prog_compiler_rtti_exceptions=no
+lt_cv_prog_gnu_ld=yes
+lt_cv_prog_gnu_ldcxx=yes
+lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ 	]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ 	][ 	]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'''
+lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/  {\"\1\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \([^ ]*\) \([^ ]*\)$/  {"\2", (lt_ptr) \&\2},/p'\'''
+lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^. .* \(.*\)$/extern int \1;/p'\'''
+lt_cv_sys_max_cmd_len=32768
+lt_lt_cv_prog_compiler_c_o='"yes"'
+lt_lt_cv_prog_compiler_c_o_CXX='"yes"'
+lt_lt_cv_sys_global_symbol_pipe='"sed -n -e '\''s/^.*[ 	]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ 	][ 	]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'\''"'
+lt_lt_cv_sys_global_symbol_to_c_name_address='"sed -n -e '\''s/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'\''"'
+lt_lt_cv_sys_global_symbol_to_cdecl='"sed -n -e '\''s/^. .* \\(.*\\)\$/extern int \\1;/p'\''"'
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+ACLOCAL='${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run aclocal-1.9'
+AMDEPBACKSLASH='\'
+AMDEP_FALSE='#'
+AMDEP_TRUE=''
+AMTAR='${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run tar'
+AR='ar'
+AUTOCONF='${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoconf'
+AUTOHEADER='${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoheader'
+AUTOMAKE='${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run automake-1.9'
+AWK='gawk'
+CC='gcc'
+CCDEPMODE='depmode=gcc3'
+CFLAGS='-g -O2'
+COMP_VENDOR_CFLAGS='-O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes'
+COND_DOC_FALSE=''
+COND_DOC_TRUE='#'
+COND_ITUTESTS_FALSE=''
+COND_ITUTESTS_TRUE='#'
+COND_MMX_FALSE=''
+COND_MMX_TRUE='#'
+COND_SSE_FALSE=''
+COND_SSE_TRUE='#'
+COND_TESTS_FALSE='#'
+COND_TESTS_TRUE=''
+CPP='gcc -E'
+CPPFLAGS=' '
+CXX='g++'
+CXXCPP='g++ -E'
+CXXDEPMODE='depmode=gcc3'
+CXXFLAGS='-g -O2'
+CYGPATH_W='echo'
+DEFS='-DHAVE_CONFIG_H'
+DEPDIR='.deps'
+ECHO='echo'
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+EGREP='grep -E'
+EXEEXT=''
+F77=''
+FFLAGS=''
+INSTALL_DATA='${INSTALL} -m 644'
+INSTALL_PROGRAM='${INSTALL}'
+INSTALL_SCRIPT='${INSTALL}'
+INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
+LDFLAGS=''
+LIBOBJS=''
+LIBS='-lm -ltiff '
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+LN_S='ln -s'
+LTLIBOBJS=''
+MAKEINFO='${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run makeinfo'
+OBJEXT='o'
+PACKAGE='spandsp'
+PACKAGE_BUGREPORT=''
+PACKAGE_NAME=''
+PACKAGE_STRING=''
+PACKAGE_TARNAME=''
+PACKAGE_VERSION=''
+PATH_SEPARATOR=':'
+RANLIB='ranlib'
+SET_MAKE=''
+SHELL='/bin/sh'
+SPANDSP_LT_AGE='0'
+SPANDSP_LT_CURRENT='0'
+SPANDSP_LT_REVISION='2'
+STRIP='strip'
+TESTLIBS=' -L/usr/X11R6/lib -lXft -lXext -lX11 -laudiofile -lfftw3 -lpthread -ldl'
+VERSION='0.0.3'
+ac_ct_AR='ar'
+ac_ct_CC='gcc'
+ac_ct_CXX='g++'
+ac_ct_F77=''
+ac_ct_RANLIB='ranlib'
+ac_ct_STRIP='strip'
+am__fastdepCC_FALSE='#'
+am__fastdepCC_TRUE=''
+am__fastdepCXX_FALSE='#'
+am__fastdepCXX_TRUE=''
+am__include='include'
+am__leading_dot='.'
+am__quote=''
+am__tar='${AMTAR} chof - "$$tardir"'
+am__untar='${AMTAR} xf -'
+bindir='${exec_prefix}/bin'
+build='i686-pc-linux-gnu'
+build_alias=''
+build_cpu='i686'
+build_os='linux-gnu'
+build_vendor='pc'
+datadir='${prefix}/share'
+exec_prefix='${prefix}'
+host='i686-pc-linux-gnu'
+host_alias=''
+host_cpu='i686'
+host_os='linux-gnu'
+host_vendor='pc'
+includedir='${prefix}/include'
+infodir='${prefix}/info'
+install_sh='/xhome1/tmp/oslec/spandsp-0.0.3/config/install-sh'
+libdir='${exec_prefix}/lib'
+libexecdir='${exec_prefix}/libexec'
+localstatedir='${prefix}/var'
+mandir='${prefix}/man'
+mkdir_p='mkdir -p --'
+oldincludedir='/usr/include'
+prefix='/usr/local'
+program_transform_name='s,x,x,'
+sbindir='${exec_prefix}/sbin'
+sharedstatedir='${prefix}/com'
+sysconfdir='${prefix}/etc'
+target_alias=''
+
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+
+#define HAVE_AUDIOFILE_H 1
+#define HAVE_DLFCN_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_FFTW3_H 1
+#define HAVE_FLOAT_H 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_LIBM 1
+#define HAVE_LIBTIFF 1
+#define HAVE_LONG_DOUBLE 1
+#define HAVE_LONG_LONG 1
+#define HAVE_MALLOC 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MATH_H 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMORY_H 1
+#define HAVE_MEMSET 1
+#define HAVE_PTHREAD_H 1
+#define HAVE_REALLOC 1
+#define HAVE_SELECT 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRCASECMP 1
+#define HAVE_STRCHR 1
+#define HAVE_STRDUP 1
+#define HAVE_STRERROR 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRSTR 1
+#define HAVE_STRTOL 1
+#define HAVE_SYS_FCNTL_H 1
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_WAIT_H 1
+#define HAVE_TGMATH_H 1
+#define HAVE_TIFFIO_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_VPRINTF 1
+#define HAVE_X11_X_H 1
+#define PACKAGE "spandsp"
+#define PACKAGE_BUGREPORT ""
+#define PACKAGE_NAME ""
+#define PACKAGE_STRING ""
+#define PACKAGE_TARNAME ""
+#define PACKAGE_VERSION ""
+#define RETSIGTYPE void
+#define SELECT_TYPE_ARG1 int
+#define SELECT_TYPE_ARG234 (fd_set *)
+#define SELECT_TYPE_ARG5 (struct timeval *)
+#define STDC_HEADERS 1
+#define STDC_HEADERS 1
+#define TIME_WITH_SYS_TIME 1
+#define VERSION "0.0.3"
+#endif
+#ifdef __cplusplus
+extern "C" void std::exit (int) throw (); using std::exit;
+
+configure: exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/config.status	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1331 @@
+#! /bin/sh
+# Generated by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=${CONFIG_SHELL-/bin/sh}
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+config_files=" Makefile doc/Makefile itutests/Makefile itutests/fax/Makefile src/Makefile tests/Makefile spandsp.spec"
+config_headers=" src/config.h:config-h.in"
+config_commands=" depfiles"
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+ac_cs_version="\
+config.status
+configured by ./configure, generated by GNU Autoconf 2.59,
+  with options \"'--enable-tests'\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=.
+INSTALL="/usr/bin/install -c"
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+if $ac_cs_recheck; then
+  echo "running /bin/sh ./configure " '--enable-tests' $ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec /bin/sh ./configure '--enable-tests' $ac_configure_extra_args --no-create --no-recursion
+fi
+
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="" ac_aux_dir="config"
+
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+  "itutests/Makefile" ) CONFIG_FILES="$CONFIG_FILES itutests/Makefile" ;;
+  "itutests/fax/Makefile" ) CONFIG_FILES="$CONFIG_FILES itutests/fax/Makefile" ;;
+  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+  "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+  "spandsp.spec" ) CONFIG_FILES="$CONFIG_FILES spandsp.spec" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:config-h.in" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
+s,@SHELL@,/bin/sh,;t t
+s,@PATH_SEPARATOR@,:,;t t
+s,@PACKAGE_NAME@,,;t t
+s,@PACKAGE_TARNAME@,,;t t
+s,@PACKAGE_VERSION@,,;t t
+s,@PACKAGE_STRING@,,;t t
+s,@PACKAGE_BUGREPORT@,,;t t
+s,@exec_prefix@,${prefix},;t t
+s,@prefix@,/usr/local,;t t
+s,@program_transform_name@,s,x,x,,;t t
+s,@bindir@,${exec_prefix}/bin,;t t
+s,@sbindir@,${exec_prefix}/sbin,;t t
+s,@libexecdir@,${exec_prefix}/libexec,;t t
+s,@datadir@,${prefix}/share,;t t
+s,@sysconfdir@,${prefix}/etc,;t t
+s,@sharedstatedir@,${prefix}/com,;t t
+s,@localstatedir@,${prefix}/var,;t t
+s,@libdir@,${exec_prefix}/lib,;t t
+s,@includedir@,${prefix}/include,;t t
+s,@oldincludedir@,/usr/include,;t t
+s,@infodir@,${prefix}/info,;t t
+s,@mandir@,${prefix}/man,;t t
+s,@build_alias@,,;t t
+s,@host_alias@,,;t t
+s,@target_alias@,,;t t
+s,@DEFS@,-DHAVE_CONFIG_H,;t t
+s,@ECHO_C@,,;t t
+s,@ECHO_N@,-n,;t t
+s,@ECHO_T@,,;t t
+s,@LIBS@,-lm -ltiff ,;t t
+s,@SPANDSP_LT_CURRENT@,0,;t t
+s,@SPANDSP_LT_REVISION@,2,;t t
+s,@SPANDSP_LT_AGE@,0,;t t
+s,@INSTALL_PROGRAM@,${INSTALL},;t t
+s,@INSTALL_SCRIPT@,${INSTALL},;t t
+s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
+s,@CYGPATH_W@,echo,;t t
+s,@PACKAGE@,spandsp,;t t
+s,@VERSION@,0.0.3,;t t
+s,@ACLOCAL@,${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run aclocal-1.9,;t t
+s,@AUTOCONF@,${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoconf,;t t
+s,@AUTOMAKE@,${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run automake-1.9,;t t
+s,@AUTOHEADER@,${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoheader,;t t
+s,@MAKEINFO@,${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run makeinfo,;t t
+s,@install_sh@,/xhome1/tmp/oslec/spandsp-0.0.3/config/install-sh,;t t
+s,@STRIP@,strip,;t t
+s,@ac_ct_STRIP@,strip,;t t
+s,@INSTALL_STRIP_PROGRAM@,${SHELL} $(install_sh) -c -s,;t t
+s,@mkdir_p@,mkdir -p --,;t t
+s,@AWK@,gawk,;t t
+s,@SET_MAKE@,,;t t
+s,@am__leading_dot@,.,;t t
+s,@AMTAR@,${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run tar,;t t
+s,@am__tar@,${AMTAR} chof - "$$tardir",;t t
+s,@am__untar@,${AMTAR} xf -,;t t
+s,@build@,i686-pc-linux-gnu,;t t
+s,@build_cpu@,i686,;t t
+s,@build_vendor@,pc,;t t
+s,@build_os@,linux-gnu,;t t
+s,@host@,i686-pc-linux-gnu,;t t
+s,@host_cpu@,i686,;t t
+s,@host_vendor@,pc,;t t
+s,@host_os@,linux-gnu,;t t
+s,@CC@,gcc,;t t
+s,@CFLAGS@,-g -O2,;t t
+s,@LDFLAGS@,,;t t
+s,@CPPFLAGS@, ,;t t
+s,@ac_ct_CC@,gcc,;t t
+s,@EXEEXT@,,;t t
+s,@OBJEXT@,o,;t t
+s,@DEPDIR@,.deps,;t t
+s,@am__include@,include,;t t
+s,@am__quote@,,;t t
+s,@AMDEP_TRUE@,,;t t
+s,@AMDEP_FALSE@,#,;t t
+s,@AMDEPBACKSLASH@,\,;t t
+s,@CCDEPMODE@,depmode=gcc3,;t t
+s,@am__fastdepCC_TRUE@,,;t t
+s,@am__fastdepCC_FALSE@,#,;t t
+s,@CXX@,g++,;t t
+s,@CXXFLAGS@,-g -O2,;t t
+s,@ac_ct_CXX@,g++,;t t
+s,@CXXDEPMODE@,depmode=gcc3,;t t
+s,@am__fastdepCXX_TRUE@,,;t t
+s,@am__fastdepCXX_FALSE@,#,;t t
+s,@CPP@,gcc -E,;t t
+s,@EGREP@,grep -E,;t t
+s,@LN_S@,ln -s,;t t
+s,@ECHO@,echo,;t t
+s,@AR@,ar,;t t
+s,@ac_ct_AR@,ar,;t t
+s,@RANLIB@,ranlib,;t t
+s,@ac_ct_RANLIB@,ranlib,;t t
+s,@CXXCPP@,g++ -E,;t t
+s,@F77@,,;t t
+s,@FFLAGS@,,;t t
+s,@ac_ct_F77@,,;t t
+s,@LIBTOOL@,$(SHELL) $(top_builddir)/libtool,;t t
+s,@LIBOBJS@,,;t t
+s,@COND_DOC_TRUE@,#,;t t
+s,@COND_DOC_FALSE@,,;t t
+s,@COND_TESTS_TRUE@,,;t t
+s,@COND_TESTS_FALSE@,#,;t t
+s,@COND_ITUTESTS_TRUE@,#,;t t
+s,@COND_ITUTESTS_FALSE@,,;t t
+s,@COND_MMX_TRUE@,#,;t t
+s,@COND_MMX_FALSE@,,;t t
+s,@COND_SSE_TRUE@,#,;t t
+s,@COND_SSE_FALSE@,,;t t
+s,@TESTLIBS@, -L/usr/X11R6/lib -lXft -lXext -lX11 -laudiofile -lfftw3 -lpthread -ldl,;t t
+s,@COMP_VENDOR_CFLAGS@,-O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes,;t t
+s,@LTLIBOBJS@,,;t t
+CEOF
+
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  sed "/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}
+
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+  # Handle all the #define templates only if necessary.
+  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then
+  # If there are no defines, we may have an empty if/fi
+  :
+  cat >$tmp/defines.sed <<CEOF
+/^[	 ]*#[	 ]*define/!b
+t clr
+: clr
+${ac_dA}PACKAGE_NAME${ac_dB}PACKAGE_NAME${ac_dC}""${ac_dD}
+${ac_dA}PACKAGE_TARNAME${ac_dB}PACKAGE_TARNAME${ac_dC}""${ac_dD}
+${ac_dA}PACKAGE_VERSION${ac_dB}PACKAGE_VERSION${ac_dC}""${ac_dD}
+${ac_dA}PACKAGE_STRING${ac_dB}PACKAGE_STRING${ac_dC}""${ac_dD}
+${ac_dA}PACKAGE_BUGREPORT${ac_dB}PACKAGE_BUGREPORT${ac_dC}""${ac_dD}
+${ac_dA}PACKAGE${ac_dB}PACKAGE${ac_dC}"spandsp"${ac_dD}
+${ac_dA}VERSION${ac_dB}VERSION${ac_dC}"0.0.3"${ac_dD}
+${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_TYPES_H${ac_dB}HAVE_SYS_TYPES_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_STAT_H${ac_dB}HAVE_SYS_STAT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MEMORY_H${ac_dB}HAVE_MEMORY_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRINGS_H${ac_dB}HAVE_STRINGS_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_INTTYPES_H${ac_dB}HAVE_INTTYPES_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDINT_H${ac_dB}HAVE_STDINT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_DLFCN_H${ac_dB}HAVE_DLFCN_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_LONG_LONG${ac_dB}HAVE_LONG_LONG${ac_dC}1${ac_dD}
+${ac_dA}HAVE_LONG_DOUBLE${ac_dB}HAVE_LONG_DOUBLE${ac_dC}1${ac_dD}
+${ac_dA}RETSIGTYPE${ac_dB}RETSIGTYPE${ac_dC}void${ac_dD}
+${ac_dA}HAVE_VPRINTF${ac_dB}HAVE_VPRINTF${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MALLOC${ac_dB}HAVE_MALLOC${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_REALLOC${ac_dB}HAVE_REALLOC${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_SELECT_H${ac_dB}HAVE_SYS_SELECT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_SOCKET_H${ac_dB}HAVE_SYS_SOCKET_H${ac_dC}1${ac_dD}
+${ac_dA}SELECT_TYPE_ARG1${ac_dB}SELECT_TYPE_ARG1${ac_dC}int${ac_dD}
+${ac_dA}SELECT_TYPE_ARG234${ac_dB}SELECT_TYPE_ARG234${ac_dC}(fd_set *)${ac_dD}
+${ac_dA}SELECT_TYPE_ARG5${ac_dB}SELECT_TYPE_ARG5${ac_dC}(struct timeval *)${ac_dD}
+${ac_dA}HAVE_MEMMOVE${ac_dB}HAVE_MEMMOVE${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MEMSET${ac_dB}HAVE_MEMSET${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SELECT${ac_dB}HAVE_SELECT${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRCASECMP${ac_dB}HAVE_STRCASECMP${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRCHR${ac_dB}HAVE_STRCHR${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRDUP${ac_dB}HAVE_STRDUP${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRERROR${ac_dB}HAVE_STRERROR${ac_dC}1${ac_dD}
+CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  cat >$tmp/defines.sed <<CEOF
+/^[	 ]*#[	 ]*define/!b
+t clr
+: clr
+${ac_dA}HAVE_STRSTR${ac_dB}HAVE_STRSTR${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRTOL${ac_dB}HAVE_STRTOL${ac_dC}1${ac_dD}
+${ac_dA}HAVE_GETTIMEOFDAY${ac_dB}HAVE_GETTIMEOFDAY${ac_dC}1${ac_dD}
+${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_WAIT_H${ac_dB}HAVE_SYS_WAIT_H${ac_dC}1${ac_dD}
+${ac_dA}TIME_WITH_SYS_TIME${ac_dB}TIME_WITH_SYS_TIME${ac_dC}1${ac_dD}
+${ac_dA}HAVE_INTTYPES_H${ac_dB}HAVE_INTTYPES_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_STRINGS_H${ac_dB}HAVE_STRINGS_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MALLOC_H${ac_dB}HAVE_MALLOC_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_TGMATH_H${ac_dB}HAVE_TGMATH_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_MATH_H${ac_dB}HAVE_MATH_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_FLOAT_H${ac_dB}HAVE_FLOAT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_FCNTL_H${ac_dB}HAVE_FCNTL_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_TIME_H${ac_dB}HAVE_SYS_TIME_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_SELECT_H${ac_dB}HAVE_SYS_SELECT_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_IOCTL_H${ac_dB}HAVE_SYS_IOCTL_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_SYS_FCNTL_H${ac_dB}HAVE_SYS_FCNTL_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_AUDIOFILE_H${ac_dB}HAVE_AUDIOFILE_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_FFTW3_H${ac_dB}HAVE_FFTW3_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_TIFFIO_H${ac_dB}HAVE_TIFFIO_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_PTHREAD_H${ac_dB}HAVE_PTHREAD_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_X11_X_H${ac_dB}HAVE_X11_X_H${ac_dC}1${ac_dD}
+${ac_dA}HAVE_LIBTIFF${ac_dB}HAVE_LIBTIFF${ac_dC}1${ac_dD}
+${ac_dA}HAVE_LIBM${ac_dB}HAVE_LIBM${ac_dC}1${ac_dD}
+CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  fi # grep
+
+  # Handle all the #undef templates
+  cat >$tmp/undefs.sed <<CEOF
+/^[	 ]*#[	 ]*undef/!b
+t clr
+: clr
+${ac_uA}PACKAGE_NAME${ac_uB}PACKAGE_NAME${ac_uC}""${ac_uD}
+${ac_uA}PACKAGE_TARNAME${ac_uB}PACKAGE_TARNAME${ac_uC}""${ac_uD}
+${ac_uA}PACKAGE_VERSION${ac_uB}PACKAGE_VERSION${ac_uC}""${ac_uD}
+${ac_uA}PACKAGE_STRING${ac_uB}PACKAGE_STRING${ac_uC}""${ac_uD}
+${ac_uA}PACKAGE_BUGREPORT${ac_uB}PACKAGE_BUGREPORT${ac_uC}""${ac_uD}
+${ac_uA}PACKAGE${ac_uB}PACKAGE${ac_uC}"spandsp"${ac_uD}
+${ac_uA}VERSION${ac_uB}VERSION${ac_uC}"0.0.3"${ac_uD}
+${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_TYPES_H${ac_uB}HAVE_SYS_TYPES_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_STAT_H${ac_uB}HAVE_SYS_STAT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MEMORY_H${ac_uB}HAVE_MEMORY_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRINGS_H${ac_uB}HAVE_STRINGS_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_INTTYPES_H${ac_uB}HAVE_INTTYPES_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDINT_H${ac_uB}HAVE_STDINT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_DLFCN_H${ac_uB}HAVE_DLFCN_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_LONG_LONG${ac_uB}HAVE_LONG_LONG${ac_uC}1${ac_uD}
+${ac_uA}HAVE_LONG_DOUBLE${ac_uB}HAVE_LONG_DOUBLE${ac_uC}1${ac_uD}
+${ac_uA}RETSIGTYPE${ac_uB}RETSIGTYPE${ac_uC}void${ac_uD}
+${ac_uA}HAVE_VPRINTF${ac_uB}HAVE_VPRINTF${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MALLOC${ac_uB}HAVE_MALLOC${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_REALLOC${ac_uB}HAVE_REALLOC${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_SELECT_H${ac_uB}HAVE_SYS_SELECT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_SOCKET_H${ac_uB}HAVE_SYS_SOCKET_H${ac_uC}1${ac_uD}
+${ac_uA}SELECT_TYPE_ARG1${ac_uB}SELECT_TYPE_ARG1${ac_uC}int${ac_uD}
+${ac_uA}SELECT_TYPE_ARG234${ac_uB}SELECT_TYPE_ARG234${ac_uC}(fd_set *)${ac_uD}
+${ac_uA}SELECT_TYPE_ARG5${ac_uB}SELECT_TYPE_ARG5${ac_uC}(struct timeval *)${ac_uD}
+${ac_uA}HAVE_MEMMOVE${ac_uB}HAVE_MEMMOVE${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MEMSET${ac_uB}HAVE_MEMSET${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SELECT${ac_uB}HAVE_SELECT${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRCASECMP${ac_uB}HAVE_STRCASECMP${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRCHR${ac_uB}HAVE_STRCHR${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRDUP${ac_uB}HAVE_STRDUP${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRERROR${ac_uB}HAVE_STRERROR${ac_uC}1${ac_uD}
+CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  cat >$tmp/undefs.sed <<CEOF
+/^[	 ]*#[	 ]*undef/!b
+t clr
+: clr
+${ac_uA}HAVE_STRSTR${ac_uB}HAVE_STRSTR${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRTOL${ac_uB}HAVE_STRTOL${ac_uC}1${ac_uD}
+${ac_uA}HAVE_GETTIMEOFDAY${ac_uB}HAVE_GETTIMEOFDAY${ac_uC}1${ac_uD}
+${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_WAIT_H${ac_uB}HAVE_SYS_WAIT_H${ac_uC}1${ac_uD}
+${ac_uA}TIME_WITH_SYS_TIME${ac_uB}TIME_WITH_SYS_TIME${ac_uC}1${ac_uD}
+${ac_uA}HAVE_INTTYPES_H${ac_uB}HAVE_INTTYPES_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_STRINGS_H${ac_uB}HAVE_STRINGS_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MALLOC_H${ac_uB}HAVE_MALLOC_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_TGMATH_H${ac_uB}HAVE_TGMATH_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_MATH_H${ac_uB}HAVE_MATH_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_FLOAT_H${ac_uB}HAVE_FLOAT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_FCNTL_H${ac_uB}HAVE_FCNTL_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_TIME_H${ac_uB}HAVE_SYS_TIME_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_SELECT_H${ac_uB}HAVE_SYS_SELECT_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_IOCTL_H${ac_uB}HAVE_SYS_IOCTL_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_SYS_FCNTL_H${ac_uB}HAVE_SYS_FCNTL_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_AUDIOFILE_H${ac_uB}HAVE_AUDIOFILE_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_FFTW3_H${ac_uB}HAVE_FFTW3_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_TIFFIO_H${ac_uB}HAVE_TIFFIO_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_PTHREAD_H${ac_uB}HAVE_PTHREAD_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_X11_X_H${ac_uB}HAVE_X11_X_H${ac_uC}1${ac_uD}
+${ac_uA}HAVE_LIBTIFF${ac_uB}HAVE_LIBTIFF${ac_uC}1${ac_uD}
+${ac_uA}HAVE_LIBM${ac_uB}HAVE_LIBM${ac_uC}1${ac_uD}
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X$ac_file : 'X\(//\)[^/]' \| \
+	 X$ac_file : 'X\(//\)$' \| \
+	 X$ac_file : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+
+{ (exit 0); exit 0; }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/config/config.guess	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1411 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-06-17'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+## for Red Hat Linux
+if test -f /etc/redhat-release ; then
+    VENDOR=redhat ;
+else
+    VENDOR= ;
+fi
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha*:OpenVMS:*:*)
+	echo alpha-hp-vms
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c \
+	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && exit 0
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    # avoid double evaluation of $set_cc_for_build
+	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    *:UNICOS/mp:*:*)
+	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
+	exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+	# Determine whether the default compiler uses glibc.
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#if __GLIBC__ >= 2
+	LIBC=gnu
+	#else
+	LIBC=
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    x86:Interix*:[34]*)
+	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+	exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
+	exit 0 ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0 ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit 0 ;;
+    M68*:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	case `uname -p` in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/config/config.sub	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1500 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-06-18'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, 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.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| msp430 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| s390 | s390x \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* \
+	| m32r-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| msp430-* \
+	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| s390-* | s390x-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+	| xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nv1)
+		basic_machine=nv1-cray
+		os=-unicosmp
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/config/depcomp	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,529 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-02-09.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 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.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/config/install-sh	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-02-02.21
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
+
+    -T) no_target_directory=true
+	shift
+	continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+	for arg
+	do
+          if test -n "$dstarg"; then
+	    # $@ is not empty: it contains at least $arg.
+	    set fnord "$@" "$dstarg"
+	    shift # fnord
+	  fi
+	  shift # arg
+	  dstarg=$arg
+	done
+	break;;
+  esac
+done
+
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dstarg: Is a directory" >&2
+	exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+	# mkdir can fail with a `File exist' error in case several
+	# install-sh are creating the directory concurrently.  This
+	# is OK.
+	test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
+
+	   # Now remove or move aside any old file at destination location.
+	   # We try this two ways since rm can't unlink itself on some
+	   # systems and the destination file might be busy for other
+	   # reasons.  In this case, the final cleanup might fail but the new
+	   # file should still install successfully.
+	   {
+	     if test -f "$dstdir/$dstfile"; then
+	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+	       || {
+		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/config/ltmain.sh	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,6496 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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 of the License, 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., 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
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.16
+TIMESTAMP=" (1.1220.2.235 2005/04/25 18:13:26)"
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
+  setopt NO_GLOB_SUBST
+fi
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+quote_scanset='[[~#^*{};<>?'"'"' 	]'
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+      if test "X$win32_nmres" = "Ximport" ; then
+        win32_libid_type="x86 archive import"
+      else
+        win32_libid_type="x86 archive static"
+      fi
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	case $arg in
+	  *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	    # Double-quote args containing other shell metacharacters.
+	    case $arg in
+	      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    CC_quoted="$CC_quoted $arg"
+	  done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xdir="$my_gentop/$my_xlib"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $status
+      fi
+      case $host in
+      *-darwin*)
+	$show "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	if test -z "$run"; then
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+	  if test -n "$darwin_arches"; then 
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      lipo -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    ${rm}r unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd "$darwin_orig_dir"
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	fi # $run
+      ;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit $EXIT_FAILURE
+	;;
+      esac
+
+      case $tagname in
+      CC)
+	# Don't test for the "default" C tag, as we know, it's there, but
+	# not specially marked.
+	;;
+      *)
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+	  taglist="$taglist $tagname"
+	  # Evaluate the configuration.
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+	else
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
+	fi
+	;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $?
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $?
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    $echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $echo "enable shared libraries"
+    else
+      $echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $echo "enable static libraries"
+    else
+      $echo "disable static libraries"
+    fi
+    exit $?
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag) prevopt="--tag" prev=tag ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case "$arg_mode" in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
+
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
+	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	qlibobj="\"$qlibobj\"" ;;
+    esac
+    if test "X$libobj" != "X$qlibobj"; then
+	$echo "$modename: libobj name \`$libobj' may not contain shell special characters."
+	exit $EXIT_FAILURE
+    fi
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+      $echo "$srcfile" > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+	$show "$mkdir ${xdir}$objdir"
+	$run $mkdir ${xdir}$objdir
+	status=$?
+	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $status
+	fi
+      fi
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	$show "$mv $output_obj $lobj"
+	if $run $mv $output_obj $lobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static)
+	if test "X$arg" = "X-all-static"; then
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	else
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	fi
+	build_libtool_libs=no
+	build_old_libs=yes
+	prefer_static_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat $save_arg`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		# If there is no directory component, then add one.
+		case $arg in
+		*/* | *\\*) . $arg ;;
+		*) . ./$arg ;;
+		esac
+
+		if test -z "$pic_object" || \
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none && \
+		   test "$non_pic_object" = none; then
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+
+		# Extract subdirectory from the argument.
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		if test "X$xdir" = "X$arg"; then
+		  xdir=
+		else
+		  xdir="$xdir/"
+		fi
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs="$libobjs $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if test -z "$run"; then
+		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+		  exit $EXIT_FAILURE
+		else
+		  # Dry-run case.
+
+		  # Extract subdirectory from the argument.
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		  if test "X$xdir" = "X$arg"; then
+		    xdir=
+		  else
+		    xdir="$xdir/"
+		  fi
+
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+		  libobjs="$libobjs $pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      fi
+	    done
+	  else
+	    $echo "$modename: link input file \`$save_arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	shrext)
+  	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+        darwin_framework)
+	  compiler_flags="$compiler_flags $arg"
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
+	  exit $EXIT_FAILURE
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework)
+        prev=darwin_framework
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-mingw* | *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs -framework System"
+	    continue
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+	compile_command="$compile_command $arg"
+	compiler_flags="$compiler_flags $arg"
+	finalize_command="$finalize_command $arg"
+	prev=xcompiler
+	continue
+	;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	compiler_flags="$compiler_flags $arg"
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        if test "$with_gcc" = "yes" ; then
+          compiler_flags="$compiler_flags $arg"
+        fi
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  # If there is no directory component, then add one.
+	  case $arg in
+	  */* | *\\*) . $arg ;;
+	  *) . ./$arg ;;
+	  esac
+
+	  if test -z "$pic_object" || \
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none && \
+	     test "$non_pic_object" = none; then
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$arg"; then
+	    xdir=
+ 	  else
+	    xdir="$xdir/"
+	  fi
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs="$libobjs $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if test -z "$run"; then
+	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+	    exit $EXIT_FAILURE
+	  else
+	    # Dry-run case.
+
+	    # Extract subdirectory from the argument.
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$arg"; then
+	      xdir=
+	    else
+	      xdir="$xdir/"
+	    fi
+
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+	    libobjs="$libobjs $pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    valid_a_lib=no
+	    case $deplibs_check_method in
+	      match_pattern*)
+		set dummy $deplibs_check_method
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+		if eval $echo \"$deplib\" 2>/dev/null \
+		    | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		  valid_a_lib=yes
+		fi
+		;;
+	      pass_all)
+		valid_a_lib=yes
+		;;
+            esac
+	    if test "$valid_a_lib" != yes; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
+	      $echo "*** I have the capability to make that library automatically link in when"
+	      $echo "*** you link to this library.  But I can only do this if you have a"
+	      $echo "*** shared version of the library, which you do not appear to have"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
+	    else
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit $EXIT_FAILURE
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+	        case "$tmp_libs " in
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	        esac
+              fi
+	      tmp_libs="$tmp_libs $deplib"
+	    done
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath " in
+	      *" $dir "*) ;;
+	      *" $absdir "*) ;;
+	      *) temp_rpath="$temp_rpath $dir" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	if test -n "$library_names" &&
+	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on
+	  # some systems (darwin)
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$extract_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$old_archive_from_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against
+		    # it, someone is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case "$libdir" in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit $EXIT_FAILURE
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case "$libdir" in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $echo "*** I have the capability to make that library automatically link in when"
+	    $echo "*** you link to this library.  But I can only do this if you have a"
+	    $echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$echo
+		$echo "*** However, this would only work if libtool was able to extract symbol"
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$echo "*** not find such a program.  So, this module is probably useless."
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    convenience="$convenience $dir/$old_library"
+	    old_convenience="$old_convenience $dir/$old_library"
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="$absdir/$objdir"
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit $EXIT_FAILURE
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="$absdir"
+		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs,
+		  # but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		    fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		  fi
+		  path=""
+		  ;;
+		*)
+		  path="-L$path"
+		  ;;
+		esac
+		;;
+	      -l*)
+		case $host in
+		*-*-darwin*)
+		  # Again, we only want to link against shared libraries
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		  for tmp in $newlib_search_path ; do
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
+		      break
+		    fi
+		  done
+		  path=""
+		  ;;
+		*) continue ;;
+		esac
+		;;
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit $EXIT_FAILURE
+	else
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor - 1`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix | nonstopux)
+	  major=`expr $current - $age + 1`
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=.`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$echo "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+	         then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	if test -n "$removelist"; then
+	  $show "${rm}r $removelist"
+	  $run ${rm}r $removelist
+	fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      for path in $notinst_path; do
+	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+      done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs -framework System"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+ 	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  $LTCC -o conftest conftest.c $deplibs
+	  if test "$?" -eq 0 ; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" -ne "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; then
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $echo
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
+		    $echo "*** I have the capability to make that library automatically link in when"
+		    $echo "*** you link to this library.  But I can only do this if you have a"
+		    $echo "*** shared version of the library, which I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		$rm conftest
+		$LTCC -o conftest conftest.c $i
+		# Did it work?
+		if test "$?" -eq 0 ; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval \\$echo \"$libname_spec\"`
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		    set dummy $deplib_matches
+		    deplib_match=$2
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $echo
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
+		      $echo "*** I have the capability to make that library automatically link in when"
+		      $echo "*** you link to this library.  But I can only do this if you have a"
+		      $echo "*** shared version of the library, which you do not appear to have"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $echo
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $echo "***  make it link in!  You will probably need to install it or some"
+		  $echo "*** library that it depends on before this library will be fully"
+		  $echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | ${SED} 10q \
+			 | $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
+	    | grep . >/dev/null; then
+	    $echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $echo
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $echo "*** a static module, that should work as long as the dlopening"
+	    $echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $echo
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $echo "*** not find such a program.  So, this module is probably useless."
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
+	    $echo "*** automatically added whenever a program is linked with this library"
+	    $echo "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	realname="$2"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	  fi
+	fi
+	
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
+	else
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise.
+	  $echo "creating reloadable object files..."
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  delfiles=
+	  last_robj=
+	  k=1
+	  output=$output_objdir/$output_la-${k}.$objext
+	  # Loop over the list of objects to be linked.
+	  for obj in $save_libobjs
+	  do
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+	    if test "X$objlist" = X ||
+	       { len=`expr "X$test_cmds" : ".*"` &&
+		 test "$len" -le "$max_cmd_len"; }; then
+	      objlist="$objlist $obj"
+	    else
+	      # The command $test_cmds is almost too long, add a
+	      # command to the queue.
+	      if test "$k" -eq 1 ; then
+		# The first file doesn't have a previous command to add.
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+	      else
+		# All subsequent reloadable object files will link in
+		# the last one created.
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+	      fi
+	      last_robj=$output_objdir/$output_la-${k}.$objext
+	      k=`expr $k + 1`
+	      output=$output_objdir/$output_la-${k}.$objext
+	      objlist=$obj
+	      len=1
+	    fi
+	  done
+	  # Handle the remaining objects by creating one last
+	  # reloadable object file.  All subsequent reloadable object
+	  # files will link in the last one created.
+	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+	  # Set up a command to remove the reloadable object files
+	  # after they are used.
+	  i=0
+	  while test "$i" -lt "$k"
+	  do
+	    i=`expr $i + 1`
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+	  done
+
+	  $echo "creating a temporary reloadable object file: $output"
+
+	  # Loop through the commands generated above and execute them.
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $concat_cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    cmds=$archive_expsym_cmds
+	  else
+	    cmds=$archive_cmds
+	    fi
+	  fi
+
+	  # Append the command to remove the reloadable object files
+	  # to the just-reset $cmds.
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $run eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	cmds=$reload_cmds
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    if test -n "$export_symbols_regex"; then
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$outputname.exp"
+	      $run $rm $export_symbols
+	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	    else
+	      $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+"
+
+	    case $host in
+	    *cygwin* | *mingw* )
+	  $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+	      ;;
+	    * )
+	  $echo >> "$output_objdir/$dlsyms" "\
+const struct {
+"
+	      ;;
+	    esac
+
+
+	  $echo >> "$output_objdir/$dlsyms" "\
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case $dir in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
+	    cwrapper=`$echo ${output}.exe`
+	    $rm $cwrappersource $cwrapper
+	    trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  newargz[0] = "$SHELL";
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+  newargz[1] = fnqualify(argv[0]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha (name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+  size_t size;
+  char *p;
+  char tmp[LT_PATHMAX + 1];
+
+  assert(path != NULL);
+
+  /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha (path[0]) && path[1] == ':')
+    return xstrdup (path);
+#endif
+  if (IS_DIR_SEPARATOR (path[0]))
+    return xstrdup (path);
+
+  /* prepend the current directory */
+  /* doesn't handle '~' */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+  p = XMALLOC(char, size);
+  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+  return p;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+	  # we should really use a build-platform specific compiler
+	  # here, but OTOH, the wrappers (shell script and this C one)
+	  # are only useful if you want to execute the "real" binary.
+	  # Since the "real" binary is built for $host, then this
+	  # wrapper might as well be built for $host, too.
+	  $run $LTCC -s -o $cwrapper $cwrappersource
+	  ;;
+	esac
+	$rm $output
+	trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      exec \$progdir/\$program \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      exit $EXIT_FAILURE
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $echo "copying selected object files to avoid basename conflicts..."
+
+	  if test -z "$gentop"; then
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    status=$?
+	    if test "$status" -ne 0 && test ! -d "$gentop"; then
+	      exit $status
+	    fi
+	  fi
+
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		counter=`expr $counter + 1`
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      $run ln "$obj" "$gentop/$newobj" ||
+	      $run cp "$obj" "$gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+
+	eval cmds=\"$old_archive_cmds\"
+
+	if len=`expr "X$cmds" : ".*"` &&
+	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  $echo "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  for obj in $save_oldobjs
+	  do
+	    oldobjs="$objlist $obj"
+	    objlist="$objlist $obj"
+	    eval test_cmds=\"$old_archive_cmds\"
+	    if len=`expr "X$test_cmds" : ".*"` &&
+	       test "$len" -le "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest="$arg"
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) prev="-f" ;;
+      -g) prev="-g" ;;
+      -m) prev="-m" ;;
+      -o) prev="-o" ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*) ;;
+
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest="$arg"
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+	test "X$dir" = "X$file/" && dir=
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  cmds=$postinstall_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin*|*mingw*)
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case $lib in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir="/tmp"
+	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
+	      tmpdir="$tmpdir/libtool-$$"
+	      save_umask=`umask`
+	      umask 0077
+	      if $mkdir "$tmpdir"; then
+	        umask $save_umask
+	      else
+	        umask $save_umask
+		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+		continue
+	      fi
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyways
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  cmds=$finish_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $echo "----------------------------------------------------------------------"
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $echo "   $libdir"
+    done
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "----------------------------------------------------------------------"
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      if test "${save_LC_ALL+set}" = set; then
+	LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+	LANG="$save_LANG"; export LANG
+      fi
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+	  if test "$mode" = uninstall; then
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      cmds=$postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      cmds=$old_postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+	  # Read the .lo file
+	  . $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" \
+	     && test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" \
+	     && test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+		    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+		    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+		    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $?
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/config/missing	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,357 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-02-08.22
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/configure	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,30205 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(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`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "$0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="src/tone_generate.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPANDSP_LT_CURRENT SPANDSP_LT_REVISION SPANDSP_LT_AGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS COND_DOC_TRUE COND_DOC_FALSE COND_TESTS_TRUE COND_TESTS_FALSE COND_ITUTESTS_TRUE COND_ITUTESTS_FALSE COND_MMX_TRUE COND_MMX_FALSE COND_SSE_TRUE COND_SSE_FALSE TESTLIBS COMP_VENDOR_CFLAGS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+ac_env_F77_set=${F77+set}
+ac_env_F77_value=$F77
+ac_cv_env_F77_set=${F77+set}
+ac_cv_env_F77_value=$F77
+ac_env_FFLAGS_set=${FFLAGS+set}
+ac_env_FFLAGS_value=$FFLAGS
+ac_cv_env_FFLAGS_set=${FFLAGS+set}
+ac_cv_env_FFLAGS_value=$FFLAGS
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-shared[=PKGS]
+                          build shared libraries [default=yes]
+  --enable-static[=PKGS]
+                          build static libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-doc      Build the documentation
+  --enable-tests    Build the test programs
+  --enable-itutests Build TIFF test files for some ITU test images
+  --enable-mmx      Enable MMX support
+  --enable-sse      Enable SSE support
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-tags[=TAGS]
+                          include additional configurations [automatic]
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CPP         C preprocessor
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd "$ac_popdir"
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+SPANDSP_MAJOR_VERSION=0
+SPANDSP_MINOR_VERSION=0
+SPANDSP_MICRO_VERSION=3
+
+SPANDSP_LT_CURRENT=0
+SPANDSP_LT_REVISION=2
+SPANDSP_LT_AGE=0
+
+VERSION=$SPANDSP_MAJOR_VERSION.$SPANDSP_MINOR_VERSION.$SPANDSP_MICRO_VERSION
+PACKAGE=spandsp
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in config $srcdir/config; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+          ac_config_headers="$ac_config_headers src/config.h:config-h.in"
+
+am__api_version="1.9"
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=$PACKAGE
+ VERSION=$VERSION
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+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
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+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'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+if test $ac_cv_c_compiler_gnu = yes; then
+    echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
+if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    ac_pattern="Autoconf.*'x'"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sgtty.h>
+Autoconf TIOCGETP
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then
+  ac_cv_prog_gcc_traditional=yes
+else
+  ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+  if test $ac_cv_prog_gcc_traditional = no; then
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <termio.h>
+Autoconf TCGETA
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then
+  ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+  fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
+  if test $ac_cv_prog_gcc_traditional = yes; then
+    CC="$CC -traditional"
+  fi
+fi
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi;
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi;
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval="$enable_fast_install"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi;
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# 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 && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    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.
+      # 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'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+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.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) 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
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+      */dev/null* | *'Invalid file or object type'*)
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+        ;;
+      *)
+	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	*/dev/null*)
+	  lt_cv_path_NM="$tmp_nm -p"
+	  break
+	  ;;
+	*)
+	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	  continue # so that we can try to find one that supports BSD flags
+	  ;;
+	esac
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+NM="$lt_cv_path_NM"
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+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
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+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|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.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  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
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > 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
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 4410 "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
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > 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.o`" in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  lt_cv_cc_needs_belf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+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'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+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'
+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'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_F77" && break
+done
+
+  F77=$ac_ct_F77
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:5286:" \
+     "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
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_f77_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+G77=`test $ac_compiler_gnu = yes && echo yes`
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    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 *BSD
+    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.
+    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 &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+  echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+
+
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# 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'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+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'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  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]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris* | sysv5*)
+  symcode='[BDRT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# 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'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  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
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+  echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  AR=$ac_ct_AR
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  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*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"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
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"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
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+enable_dlopen=no
+enable_win32_dll=no
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+  withval="$with_pic"
+  pic_mode="$withval"
+else
+  pic_mode=default
+fi;
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+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.
+#
+lt_prog_cc_shlib=
+if test "$GCC" = no; then
+  case $host_os in
+  sco3.2v5*)
+    lt_prog_cc_shlib='-belf'
+    ;;
+  esac
+fi
+if test -n "$lt_prog_cc_shlib"; then
+  { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
+echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
+  if echo "$old_CC $old_CFLAGS " | grep "[ 	]$lt_prog_cc_shlib[ 	]" >/dev/null; then :
+  else
+    { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
+echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
+    lt_cv_prog_cc_can_build_shared=no
+  fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   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
+     # 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
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6382: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:6386: \$? = $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 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
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	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
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      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
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      pgcc* | pgf77* | pgf90*)
+        # 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='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_prog_compiler_pic='-Kpic'
+      lt_prog_compiler_static='-dn'
+      ;;
+
+    solaris*)
+      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*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      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'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6644: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:6648: \$? = $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 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
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
+
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6706: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:6710: \$? = $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
+     $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 .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag=
+  enable_shared_with_static_runtimes=no
+  archive_cmds=
+  archive_expsym_cmds=
+  old_archive_From_new_cmds=
+  old_archive_from_expsyms_cmds=
+  export_dynamic_flag_spec=
+  whole_archive_flag_spec=
+  thread_safe_flag_spec=
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_direct=no
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  link_all_deplibs=unknown
+  hardcode_automatic=no
+  module_cmds=
+  module_expsym_cmds=
+  always_export_symbols=no
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # 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*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # 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*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      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 '\''/^[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'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	ld_shlibs=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=
+	  ;;
+	pgf77* | pgf90* )			# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec=
+	  tmp_addflag=' -fpic -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'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $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'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      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'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    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)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+
+      if test "$GCC" = yes; then
+	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`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L=yes
+  	  hardcode_libdir_flag_spec='-L$libdir'
+  	  hardcode_libdir_separator=
+	  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
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  always_export_symbols=yes
+	  # 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.
+	  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
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+      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
+      archive_cmds_need_lc=no
+      hardcode_direct=no
+      hardcode_automatic=yes
+      hardcode_shlibpath_var=unsupported
+      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 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}'
+    else
+      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 ld's
+         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
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_flag_spec_ld='+b $libdir'
+	  hardcode_libdir_separator=:
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	ia64*)
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	*)
+	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator=:
+	  hardcode_direct=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $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='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    openbsd*)
+      hardcode_direct=yes
+      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
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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='${wl}-rpath ${wl}$libdir'
+      else
+	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 ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+
+    sco3.2v5*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    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'
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+ 	# 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
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=no
+      hardcode_shlibpath_var=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv5*)
+      no_undefined_flag=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      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'
+      hardcode_libdir_flag_spec=
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > 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); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    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}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  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)'
+  # 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"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # 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 8089 "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=`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/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  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
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+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
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 8953 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  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
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 9051 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  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
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# Report which librarie types wil actually be built
+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
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  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
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler \
+    CC \
+    LD \
+    lt_prog_compiler_wl \
+    lt_prog_compiler_pic \
+    lt_prog_compiler_static \
+    lt_prog_compiler_no_builtin_flag \
+    export_dynamic_flag_spec \
+    thread_safe_flag_spec \
+    whole_archive_flag_spec \
+    enable_shared_with_static_runtimes \
+    old_archive_cmds \
+    old_archive_from_new_cmds \
+    predep_objects \
+    postdep_objects \
+    predeps \
+    postdeps \
+    compiler_lib_search_path \
+    archive_cmds \
+    archive_expsym_cmds \
+    postinstall_cmds \
+    postuninstall_cmds \
+    old_archive_from_expsyms_cmds \
+    allow_undefined_flag \
+    no_undefined_flag \
+    export_symbols_cmds \
+    hardcode_libdir_flag_spec \
+    hardcode_libdir_flag_spec_ld \
+    hardcode_libdir_separator \
+    hardcode_automatic \
+    module_cmds \
+    module_expsym_cmds \
+    lt_cv_prog_compiler_c_o \
+    exclude_expsyms \
+    include_expsyms; do
+
+    case $var in
+    old_archive_cmds | \
+    old_archive_from_new_cmds | \
+    archive_cmds | \
+    archive_expsym_cmds | \
+    module_cmds | \
+    module_expsym_cmds | \
+    old_archive_from_expsyms_cmds | \
+    export_symbols_cmds | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  { echo "$as_me:$LINENO: creating $ofile" >&5
+echo "$as_me: creating $ofile" >&6;}
+
+  cat <<__EOF__ >> "$cfgfile"
+#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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 of the License, 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., 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
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# 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?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+# Check whether --with-tags or --without-tags was given.
+if test "${with_tags+set}" = set; then
+  withval="$with_tags"
+  tagnames="$withval"
+fi;
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+    else
+      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+    fi
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
+    "") ;;
+    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+echo "$as_me: error: invalid tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      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_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'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_automatic_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+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
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+compiler_CXX=$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-%%"`
+
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+else
+  lt_prog_compiler_no_builtin_flag_CXX=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    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.
+      # 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'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+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.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    archive_expsym_cmds_CXX='$CC -shared -nostdlib $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'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_CXX=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+ld_shlibs_CXX=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    archive_cmds_CXX=''
+    hardcode_direct_CXX=yes
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes; then
+      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`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  hardcode_direct_CXX=yes
+	else
+	  # We have old collect2
+	  hardcode_direct_CXX=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L_CXX=yes
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  hardcode_libdir_separator_CXX=
+	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
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    always_export_symbols_CXX=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      allow_undefined_flag_CXX='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	allow_undefined_flag_CXX="-z nodefs"
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	no_undefined_flag_CXX=' ${wl}-bernotok'
+	allow_undefined_flag_CXX=' ${wl}-berok'
+	# -bexpall does not export symbols beginning with underscore (_)
+	always_export_symbols_CXX=yes
+	# 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.
+	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
+    ;;
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+    # as there is no search path for DLLs.
+    hardcode_libdir_flag_spec_CXX='-L$libdir'
+    allow_undefined_flag_CXX=unsupported
+    always_export_symbols_CXX=no
+    enable_shared_with_static_runtimes_CXX=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+    else
+      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
+
+    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
+          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 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 -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 ld's
+          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
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  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 | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    ld_shlibs_CXX=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    hardcode_direct_CXX=yes
+    hardcode_minus_L_CXX=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      ld_shlibs_CXX=no
+      ;;
+    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
+      # 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 -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
+        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
+      else
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      case "$host_cpu" in
+      hppa*64*)
+	hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+	hardcode_libdir_separator_CXX=:
+        ;;
+      ia64*)
+	hardcode_libdir_flag_spec_CXX='-L$libdir'
+        ;;
+      *)
+	hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_CXX=:
+	export_dynamic_flag_spec_CXX='${wl}-E'
+        ;;
+      esac
+    fi
+    case "$host_cpu" in
+    hppa*64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      ;;
+    ia64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    *)
+      hardcode_direct_CXX=yes
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      aCC*)
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# 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 -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
+	  if test $with_gnu_ld = no; then
+	    case "$host_cpu" in
+	    ia64*|hppa*64*)
+	      archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	      ;;
+	    *)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      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 ${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
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	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}${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
+	fi
+	link_all_deplibs_CXX=yes
+	;;
+    esac
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# 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 $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      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
+	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'
+	;;
+      pgCC*)
+        # Portland Group C++ compiler
+	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 ${wl}$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX=''
+        ;;
+      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'
+
+	runpath_var=LD_RUN_PATH
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# 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 -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      hardcode_libdir_flag_spec_CXX='-R$libdir'
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+    fi
+    # 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*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      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 ${output_objdir}/so_locations -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# 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 -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; 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 && 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}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      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 ${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 ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# 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 -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; 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 && 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}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  sco*)
+    archive_cmds_need_lc_CXX=no
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+	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_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'
+
+	hardcode_libdir_flag_spec_CXX='-R$libdir'
+	hardcode_shlibpath_var_CXX=no
+	case $host_os in
+	  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. 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`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'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	fi
+	;;
+    esac
+    ;;
+  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+esac
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+
+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
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # 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\"`"
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$rm -f confest.$objext
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+
+lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	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++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | kfreebsd*-gnu | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  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*)
+	    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
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux*)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC*)
+	    # Portland Group C++ compiler.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      sco*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      solaris*)
+	case $cc_basename in
+	  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*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      unixware*)
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_CXX=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:11297: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:11301: \$? = $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 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
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
+
+if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:11359: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:11363: \$? = $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
+     $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 .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    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'
+  ;;
+  esac
+
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > 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); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    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}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  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)'
+  # 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"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # 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 11874 "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=`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/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  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
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+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
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6
+
+if test "$hardcode_action_CXX" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 12738 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  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
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 12836 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  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
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_CXX \
+    CC_CXX \
+    LD_CXX \
+    lt_prog_compiler_wl_CXX \
+    lt_prog_compiler_pic_CXX \
+    lt_prog_compiler_static_CXX \
+    lt_prog_compiler_no_builtin_flag_CXX \
+    export_dynamic_flag_spec_CXX \
+    thread_safe_flag_spec_CXX \
+    whole_archive_flag_spec_CXX \
+    enable_shared_with_static_runtimes_CXX \
+    old_archive_cmds_CXX \
+    old_archive_from_new_cmds_CXX \
+    predep_objects_CXX \
+    postdep_objects_CXX \
+    predeps_CXX \
+    postdeps_CXX \
+    compiler_lib_search_path_CXX \
+    archive_cmds_CXX \
+    archive_expsym_cmds_CXX \
+    postinstall_cmds_CXX \
+    postuninstall_cmds_CXX \
+    old_archive_from_expsyms_cmds_CXX \
+    allow_undefined_flag_CXX \
+    no_undefined_flag_CXX \
+    export_symbols_cmds_CXX \
+    hardcode_libdir_flag_spec_CXX \
+    hardcode_libdir_flag_spec_ld_CXX \
+    hardcode_libdir_separator_CXX \
+    hardcode_automatic_CXX \
+    module_cmds_CXX \
+    module_expsym_cmds_CXX \
+    lt_cv_prog_compiler_c_o_CXX \
+    exclude_expsyms_CXX \
+    include_expsyms_CXX; do
+
+    case $var in
+    old_archive_cmds_CXX | \
+    old_archive_from_new_cmds_CXX | \
+    archive_cmds_CXX | \
+    archive_expsym_cmds_CXX | \
+    module_cmds_CXX | \
+    module_expsym_cmds_CXX | \
+    old_archive_from_expsyms_cmds_CXX | \
+    export_symbols_cmds_CXX | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_CXX
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# 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?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_CXX
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_CXX
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_CXX"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+
+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'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+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
+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
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  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
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+GCC_F77="$G77"
+LD_F77="$LD"
+
+lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_F77='-Wl,'
+    lt_prog_compiler_static_F77='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_F77='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_F77=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_F77=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_F77='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      else
+	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
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      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
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    linux*)
+      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*)
+        # 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='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_prog_compiler_pic_F77='-Kpic'
+      lt_prog_compiler_static_F77='-dn'
+      ;;
+
+    solaris*)
+      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*)
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_F77='-Kconform_pic'
+	lt_prog_compiler_static_F77='-Bstatic'
+      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'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_F77=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13721: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:13725: \$? = $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 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
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
+
+if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+     esac
+else
+    lt_prog_compiler_pic_F77=
+     lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_F77=
+    ;;
+  *)
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13783: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13787: \$? = $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
+     $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 .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag_F77=
+  enable_shared_with_static_runtimes_F77=no
+  archive_cmds_F77=
+  archive_expsym_cmds_F77=
+  old_archive_From_new_cmds_F77=
+  old_archive_from_expsyms_cmds_F77=
+  export_dynamic_flag_spec_F77=
+  whole_archive_flag_spec_F77=
+  thread_safe_flag_spec_F77=
+  hardcode_libdir_flag_spec_F77=
+  hardcode_libdir_flag_spec_ld_F77=
+  hardcode_libdir_separator_F77=
+  hardcode_direct_F77=no
+  hardcode_minus_L_F77=no
+  hardcode_shlibpath_var_F77=unsupported
+  link_all_deplibs_F77=unknown
+  hardcode_automatic_F77=no
+  module_cmds_F77=
+  module_expsym_cmds_F77=
+  always_export_symbols_F77=no
+  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_F77=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # 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*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_F77=yes
+  if test "$with_gnu_ld" = yes; then
+    # 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*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_F77=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_F77=unsupported
+	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      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 '\''/^[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'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	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=
+	  ;;
+	pgf77* | pgf90* )			# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_F77=
+	  tmp_addflag=' -fpic -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'
+	wlarc=
+      else
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $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'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    sunos4*)
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      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'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+    esac
+
+    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)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=yes
+      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_F77=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_F77=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_F77=''
+      hardcode_direct_F77=yes
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+
+      if test "$GCC" = yes; then
+	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`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct_F77=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_F77=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_F77=yes
+  	  hardcode_libdir_flag_spec_F77='-L$libdir'
+  	  hardcode_libdir_separator_F77=
+	  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
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_F77=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_F77='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_F77="-z nodefs"
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_F77=' ${wl}-bernotok'
+	  allow_undefined_flag_F77=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  always_export_symbols_F77=yes
+	  # 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.
+	  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
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_F77=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_F77=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_F77=' '
+      allow_undefined_flag_F77=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      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_F77='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
+    darwin* | rhapsody*)
+      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
+      archive_cmds_need_lc_F77=no
+      hardcode_direct_F77=no
+      hardcode_automatic_F77=yes
+      hardcode_shlibpath_var_F77=unsupported
+      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 ld's
+      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
+      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 ld's
+         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
+      ;;
+
+    dgux*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_F77=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    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
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_direct_F77=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+	  hardcode_libdir_separator_F77=:
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+	  ;;
+	ia64*)
+	  hardcode_libdir_flag_spec_F77='-L$libdir'
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	*)
+	  hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_F77=:
+	  hardcode_direct_F77=yes
+	  export_dynamic_flag_spec_F77='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $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_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      link_all_deplibs_F77=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    newsos6)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_F77=yes
+      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
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec_F77='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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_F77='${wl}-rpath ${wl}$libdir'
+      else
+	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 ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    sco3.2v5*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    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'
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+ 	# 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
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_F77='$CC -r -o $output$reload_objs'
+	  hardcode_direct_F77=no
+        ;;
+	motorola)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_F77=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_F77=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag_F77='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv5*)
+      no_undefined_flag_F77=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      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'
+      hardcode_libdir_flag_spec_F77=
+      hardcode_shlibpath_var_F77=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      ld_shlibs_F77=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+echo "${ECHO_T}$ld_shlibs_F77" >&6
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_F77=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_F77 in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > 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); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+        allow_undefined_flag_F77=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_F77=no
+        else
+	  archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    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}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  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)'
+  # 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"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # 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 15146 "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=`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/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  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
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+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
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_F77" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+     test "$hardcode_minus_L_F77" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_F77=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_F77=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_F77=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+echo "${ECHO_T}$hardcode_action_F77" >&6
+
+if test "$hardcode_action_F77" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_F77 \
+    CC_F77 \
+    LD_F77 \
+    lt_prog_compiler_wl_F77 \
+    lt_prog_compiler_pic_F77 \
+    lt_prog_compiler_static_F77 \
+    lt_prog_compiler_no_builtin_flag_F77 \
+    export_dynamic_flag_spec_F77 \
+    thread_safe_flag_spec_F77 \
+    whole_archive_flag_spec_F77 \
+    enable_shared_with_static_runtimes_F77 \
+    old_archive_cmds_F77 \
+    old_archive_from_new_cmds_F77 \
+    predep_objects_F77 \
+    postdep_objects_F77 \
+    predeps_F77 \
+    postdeps_F77 \
+    compiler_lib_search_path_F77 \
+    archive_cmds_F77 \
+    archive_expsym_cmds_F77 \
+    postinstall_cmds_F77 \
+    postuninstall_cmds_F77 \
+    old_archive_from_expsyms_cmds_F77 \
+    allow_undefined_flag_F77 \
+    no_undefined_flag_F77 \
+    export_symbols_cmds_F77 \
+    hardcode_libdir_flag_spec_F77 \
+    hardcode_libdir_flag_spec_ld_F77 \
+    hardcode_libdir_separator_F77 \
+    hardcode_automatic_F77 \
+    module_cmds_F77 \
+    module_expsym_cmds_F77 \
+    lt_cv_prog_compiler_c_o_F77 \
+    exclude_expsyms_F77 \
+    include_expsyms_F77; do
+
+    case $var in
+    old_archive_cmds_F77 | \
+    old_archive_from_new_cmds_F77 | \
+    archive_cmds_F77 | \
+    archive_expsym_cmds_F77 | \
+    module_cmds_F77 | \
+    module_expsym_cmds_F77 | \
+    old_archive_from_expsyms_cmds_F77 | \
+    export_symbols_cmds_F77 | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# 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?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_F77
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_F77
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_F77
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_F77
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_F77"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+
+
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+objext_GCJ=$objext
+
+# Code to be used in simple compile tests
+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'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+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
+  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15919: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:15923: \$? = $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 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
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_GCJ='-Wl,'
+    lt_prog_compiler_static_GCJ='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_GCJ='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_GCJ=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_GCJ=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_GCJ='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      else
+	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
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      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
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    linux*)
+      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*)
+        # 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='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_GCJ='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_GCJ='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_prog_compiler_pic_GCJ='-Kpic'
+      lt_prog_compiler_static_GCJ='-dn'
+      ;;
+
+    solaris*)
+      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*)
+      lt_prog_compiler_wl_GCJ='-Qoption ld '
+      lt_prog_compiler_pic_GCJ='-PIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_GCJ='-Kconform_pic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      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'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_GCJ"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_GCJ=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16181: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:16185: \$? = $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 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
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
+
+if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+    case $lt_prog_compiler_pic_GCJ in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     esac
+else
+    lt_prog_compiler_pic_GCJ=
+     lt_prog_compiler_can_build_shared_GCJ=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_GCJ=
+    ;;
+  *)
+    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_GCJ=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # 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: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16243: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:16247: \$? = $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
+     $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 .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag_GCJ=
+  enable_shared_with_static_runtimes_GCJ=no
+  archive_cmds_GCJ=
+  archive_expsym_cmds_GCJ=
+  old_archive_From_new_cmds_GCJ=
+  old_archive_from_expsyms_cmds_GCJ=
+  export_dynamic_flag_spec_GCJ=
+  whole_archive_flag_spec_GCJ=
+  thread_safe_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_ld_GCJ=
+  hardcode_libdir_separator_GCJ=
+  hardcode_direct_GCJ=no
+  hardcode_minus_L_GCJ=no
+  hardcode_shlibpath_var_GCJ=unsupported
+  link_all_deplibs_GCJ=unknown
+  hardcode_automatic_GCJ=no
+  module_cmds_GCJ=
+  module_expsym_cmds_GCJ=
+  always_export_symbols_GCJ=no
+  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_GCJ=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # 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*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_GCJ=yes
+  if test "$with_gnu_ld" = yes; then
+    # 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*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_GCJ=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_GCJ=unsupported
+	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      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 '\''/^[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'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	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=
+	  ;;
+	pgf77* | pgf90* )			# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_GCJ=
+	  tmp_addflag=' -fpic -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'
+	wlarc=
+      else
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $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'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    sunos4*)
+      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      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'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+    esac
+
+    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)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=yes
+      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_GCJ=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_GCJ=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_GCJ=''
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+
+      if test "$GCC" = yes; then
+	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`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct_GCJ=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_GCJ=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_GCJ=yes
+  	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
+  	  hardcode_libdir_separator_GCJ=
+	  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
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_GCJ=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_GCJ='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_GCJ="-z nodefs"
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_GCJ=' ${wl}-bernotok'
+	  allow_undefined_flag_GCJ=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  always_export_symbols_GCJ=yes
+	  # 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.
+	  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
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_GCJ=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_GCJ=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ=' '
+      allow_undefined_flag_GCJ=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      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_GCJ='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_GCJ=yes
+      ;;
+
+    darwin* | rhapsody*)
+      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
+      archive_cmds_need_lc_GCJ=no
+      hardcode_direct_GCJ=no
+      hardcode_automatic_GCJ=yes
+      hardcode_shlibpath_var_GCJ=unsupported
+      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 ld's
+      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
+      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 ld's
+         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
+      ;;
+
+    dgux*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_GCJ=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    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
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_direct_GCJ=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+	  hardcode_libdir_separator_GCJ=:
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+	  ;;
+	ia64*)
+	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_GCJ=yes
+	  ;;
+	*)
+	  hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_GCJ=:
+	  hardcode_direct_GCJ=yes
+	  export_dynamic_flag_spec_GCJ='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_GCJ=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $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_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    newsos6)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_GCJ=yes
+      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
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec_GCJ='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      allow_undefined_flag_GCJ=unsupported
+      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $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_GCJ='${wl}-rpath ${wl}$libdir'
+      else
+	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 ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    sco3.2v5*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    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'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+ 	# 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
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_GCJ='$CC -r -o $output$reload_objs'
+	  hardcode_direct_GCJ=no
+        ;;
+	motorola)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_GCJ=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_GCJ=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag_GCJ='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv5*)
+      no_undefined_flag_GCJ=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      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'
+      hardcode_libdir_flag_spec_GCJ=
+      hardcode_shlibpath_var_GCJ=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      ld_shlibs_GCJ=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+echo "${ECHO_T}$ld_shlibs_GCJ" >&6
+test "$ld_shlibs_GCJ" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_GCJ" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_GCJ=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_GCJ in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > 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); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_GCJ
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+        allow_undefined_flag_GCJ=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_GCJ=no
+        else
+	  archive_cmds_need_lc_GCJ=yes
+        fi
+        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    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}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  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)'
+  # 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"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # 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 17626 "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=`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/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  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
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+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
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_GCJ" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
+     test "$hardcode_minus_L_GCJ" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_GCJ=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_GCJ=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_GCJ=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+echo "${ECHO_T}$hardcode_action_GCJ" >&6
+
+if test "$hardcode_action_GCJ" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 18490 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  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
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 18588 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  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
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_GCJ \
+    CC_GCJ \
+    LD_GCJ \
+    lt_prog_compiler_wl_GCJ \
+    lt_prog_compiler_pic_GCJ \
+    lt_prog_compiler_static_GCJ \
+    lt_prog_compiler_no_builtin_flag_GCJ \
+    export_dynamic_flag_spec_GCJ \
+    thread_safe_flag_spec_GCJ \
+    whole_archive_flag_spec_GCJ \
+    enable_shared_with_static_runtimes_GCJ \
+    old_archive_cmds_GCJ \
+    old_archive_from_new_cmds_GCJ \
+    predep_objects_GCJ \
+    postdep_objects_GCJ \
+    predeps_GCJ \
+    postdeps_GCJ \
+    compiler_lib_search_path_GCJ \
+    archive_cmds_GCJ \
+    archive_expsym_cmds_GCJ \
+    postinstall_cmds_GCJ \
+    postuninstall_cmds_GCJ \
+    old_archive_from_expsyms_cmds_GCJ \
+    allow_undefined_flag_GCJ \
+    no_undefined_flag_GCJ \
+    export_symbols_cmds_GCJ \
+    hardcode_libdir_flag_spec_GCJ \
+    hardcode_libdir_flag_spec_ld_GCJ \
+    hardcode_libdir_separator_GCJ \
+    hardcode_automatic_GCJ \
+    module_cmds_GCJ \
+    module_expsym_cmds_GCJ \
+    lt_cv_prog_compiler_c_o_GCJ \
+    exclude_expsyms_GCJ \
+    include_expsyms_GCJ; do
+
+    case $var in
+    old_archive_cmds_GCJ | \
+    old_archive_from_new_cmds_GCJ | \
+    archive_cmds_GCJ | \
+    archive_expsym_cmds_GCJ | \
+    module_cmds_GCJ | \
+    module_expsym_cmds_GCJ | \
+    old_archive_from_expsyms_cmds_GCJ | \
+    export_symbols_cmds_GCJ | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_GCJ
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_GCJ
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_GCJ
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_GCJ
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# 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?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_GCJ
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_GCJ
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_GCJ
+archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_GCJ
+module_expsym_cmds=$lt_module_expsym_cmds_GCJ
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_GCJ
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_GCJ
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_GCJ
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_GCJ
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_GCJ
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_GCJ"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_GCJ
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+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
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_RC \
+    CC_RC \
+    LD_RC \
+    lt_prog_compiler_wl_RC \
+    lt_prog_compiler_pic_RC \
+    lt_prog_compiler_static_RC \
+    lt_prog_compiler_no_builtin_flag_RC \
+    export_dynamic_flag_spec_RC \
+    thread_safe_flag_spec_RC \
+    whole_archive_flag_spec_RC \
+    enable_shared_with_static_runtimes_RC \
+    old_archive_cmds_RC \
+    old_archive_from_new_cmds_RC \
+    predep_objects_RC \
+    postdep_objects_RC \
+    predeps_RC \
+    postdeps_RC \
+    compiler_lib_search_path_RC \
+    archive_cmds_RC \
+    archive_expsym_cmds_RC \
+    postinstall_cmds_RC \
+    postuninstall_cmds_RC \
+    old_archive_from_expsyms_cmds_RC \
+    allow_undefined_flag_RC \
+    no_undefined_flag_RC \
+    export_symbols_cmds_RC \
+    hardcode_libdir_flag_spec_RC \
+    hardcode_libdir_flag_spec_ld_RC \
+    hardcode_libdir_separator_RC \
+    hardcode_automatic_RC \
+    module_cmds_RC \
+    module_expsym_cmds_RC \
+    lt_cv_prog_compiler_c_o_RC \
+    exclude_expsyms_RC \
+    include_expsyms_RC; do
+
+    case $var in
+    old_archive_cmds_RC | \
+    old_archive_from_new_cmds_RC | \
+    archive_cmds_RC | \
+    archive_expsym_cmds_RC | \
+    module_cmds_RC | \
+    module_expsym_cmds_RC | \
+    old_archive_from_expsyms_cmds_RC | \
+    export_symbols_cmds_RC | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_RC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# 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?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_RC
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_RC
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_RC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_RC"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+	;;
+
+      *)
+	{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Prevent multiple expansion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+echo "$as_me:$LINENO: checking for C compiler vendor" >&5
+echo $ECHO_N "checking for C compiler vendor... $ECHO_C" >&6
+if test "${ax_cv_c_compiler_vendor+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ax_cv_c_compiler_vendor=unknown
+  # note: don't check for GCC first, since some other compilers define __GNUC__
+  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+#if !($vencpp)
+      thisisanerror;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+
+fi
+echo "$as_me:$LINENO: result: $ax_cv_c_compiler_vendor" >&5
+echo "${ECHO_T}$ax_cv_c_compiler_vendor" >&6
+
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset x;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *ccp;
+  char **p;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  ccp = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++ccp;
+  p = (char**) ccp;
+  ccp = (char const *const *) p;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+  }
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_const=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking for working volatile" >&5
+echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
+if test "${ac_cv_c_volatile+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_volatile=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_volatile=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
+echo "${ECHO_T}$ac_cv_c_volatile" >&6
+if test $ac_cv_c_volatile = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define volatile
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking for long long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6
+if test "${ac_cv_type_long_long+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((long long *) 0)
+  return 0;
+if (sizeof (long long))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_long_long=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
+echo "${ECHO_T}$ac_cv_type_long_long" >&6
+if test $ac_cv_type_long_long = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LONG_LONG 1
+_ACEOF
+
+
+fi
+
+echo "$as_me:$LINENO: checking for long double" >&5
+echo $ECHO_N "checking for long double... $ECHO_C" >&6
+if test "${ac_cv_type_long_double+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((long double *) 0)
+  return 0;
+if (sizeof (long double))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_long_double=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long_double=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
+echo "${ECHO_T}$ac_cv_type_long_double" >&6
+if test $ac_cv_type_long_double = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LONG_DOUBLE 1
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
+if test "${ac_cv_type_signal+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+# undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int
+main ()
+{
+int i;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_signal=void
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_signal=int
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+echo "${ECHO_T}$ac_cv_type_signal" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+
+# Check whether --enable-doc or --disable-doc was given.
+if test "${enable_doc+set}" = set; then
+  enableval="$enable_doc"
+
+fi;
+# Check whether --enable-tests or --disable-tests was given.
+if test "${enable_tests+set}" = set; then
+  enableval="$enable_tests"
+
+fi;
+# Check whether --enable-itutests or --disable-itutests was given.
+if test "${enable_itutests+set}" = set; then
+  enableval="$enable_itutests"
+
+fi;
+# Check whether --enable-mmx or --disable-mmx was given.
+if test "${enable_mmx+set}" = set; then
+  enableval="$enable_mmx"
+
+fi;
+# Check whether --enable-sse or --disable-sse was given.
+if test "${enable_sse+set}" = set; then
+  enableval="$enable_sse"
+
+fi;
+
+echo "$as_me:$LINENO: checking for error_at_line" >&5
+echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6
+if test "${ac_cv_lib_error_at_line+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "");
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_error_at_line=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_error_at_line=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
+echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6
+if test $ac_cv_lib_error_at_line = no; then
+  case $LIBOBJS in
+    "error.$ac_objext"   | \
+  *" error.$ac_objext"   | \
+    "error.$ac_objext "* | \
+  *" error.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS error.$ac_objext" ;;
+esac
+
+fi
+
+
+for ac_func in vprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+echo "$as_me:$LINENO: checking for _doprnt" >&5
+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
+if test "${ac_cv_func__doprnt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define _doprnt innocuous__doprnt
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _doprnt (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef _doprnt
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char _doprnt ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub__doprnt) || defined (__stub____doprnt)
+choke me
+#else
+char (*f) () = _doprnt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != _doprnt;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func__doprnt=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func__doprnt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+echo "${ECHO_T}$ac_cv_func__doprnt" >&6
+if test $ac_cv_func__doprnt = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DOPRNT 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+
+for ac_header in stdlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
+echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_malloc_0_nonnull=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if STDC_HEADERS || HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+exit (malloc (0) ? 0 : 1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_malloc_0_nonnull=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
+echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
+if test $ac_cv_func_malloc_0_nonnull = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC 1
+_ACEOF
+
+else
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC 0
+_ACEOF
+
+   case $LIBOBJS in
+    "malloc.$ac_objext"   | \
+  *" malloc.$ac_objext"   | \
+    "malloc.$ac_objext "* | \
+  *" malloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define malloc rpl_malloc
+_ACEOF
+
+fi
+
+
+
+echo "$as_me:$LINENO: checking for working memcmp" >&5
+echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
+if test "${ac_cv_func_memcmp_working+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_memcmp_working=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+  /* Some versions of memcmp are not 8-bit clean.  */
+  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+    exit (1);
+
+  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+     or more and with at least one buffer not starting on a 4-byte boundary.
+     William Lewis provided this test program.   */
+  {
+    char foo[21];
+    char bar[21];
+    int i;
+    for (i = 0; i < 4; i++)
+      {
+	char *a = foo + i;
+	char *b = bar + i;
+	strcpy (a, "--------01111111");
+	strcpy (b, "--------10000000");
+	if (memcmp (a, b, 16) >= 0)
+	  exit (1);
+      }
+    exit (0);
+  }
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_memcmp_working=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_memcmp_working=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
+echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
+test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
+    "memcmp.$ac_objext"   | \
+  *" memcmp.$ac_objext"   | \
+    "memcmp.$ac_objext "* | \
+  *" memcmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
+esac
+
+
+
+for ac_header in stdlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5
+echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6
+if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_realloc_0_nonnull=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if STDC_HEADERS || HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *realloc ();
+#endif
+
+int
+main ()
+{
+exit (realloc (0, 0) ? 0 : 1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_realloc_0_nonnull=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_realloc_0_nonnull=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
+echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6
+if test $ac_cv_func_realloc_0_nonnull = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_REALLOC 1
+_ACEOF
+
+else
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_REALLOC 0
+_ACEOF
+
+   case $LIBOBJS in
+    "realloc.$ac_objext"   | \
+  *" realloc.$ac_objext"   | \
+    "realloc.$ac_objext "* | \
+  *" realloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define realloc rpl_realloc
+_ACEOF
+
+fi
+
+
+
+
+
+for ac_header in sys/select.h sys/socket.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking types of arguments for select" >&5
+echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
+if test "${ac_cv_func_select_args+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
+ for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
+  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+int
+main ()
+{
+extern int select ($ac_arg1,
+					    $ac_arg234, $ac_arg234, $ac_arg234,
+					    $ac_arg5);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+ done
+done
+# Provide a safe default value.
+: ${ac_cv_func_select_args='int,int *,struct timeval *'}
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
+echo "${ECHO_T}$ac_cv_func_select_args" >&6
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG1 $1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG234 ($2)
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG5 ($3)
+_ACEOF
+
+rm -f conftest*
+
+
+
+for ac_func in memmove
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in memset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in pow
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in sqrt
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in rint
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in select
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in strcasecmp
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in strchr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in strdup
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in strerror
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in strstr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in strtol
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in gettimeofday
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_sys_wait_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+if test $ac_cv_header_sys_wait_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_time=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+# Check for header files.
+
+for ac_header in socket.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in inttypes.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in stdlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in string.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in strings.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in malloc.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in tgmath.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in math.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in float.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in fcntl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/time.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/select.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/ioctl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/fcntl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in audiofile.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in fftw.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in fftw3.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in tiffio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in pthread.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in unicall.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in X11/X.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Determine XML2 include path
+echo "$as_me:$LINENO: checking for libxml/xmlmemory.h" >&5
+echo $ECHO_N "checking for libxml/xmlmemory.h... $ECHO_C" >&6
+
+# Can we include headers using system include dirs?
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libxml/xmlmemory.h>
+int
+main ()
+{
+int a = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  XML2_INCLUDE=" "
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+XML2_INCLUDE=
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+# Hunt through several possible directories to find the includes for libxml2
+if test "x$XML2_INCLUDE" = "x"; then
+    old_CPPFLAGS="$CPPFLAGS"
+    for i in $xml2_include_dir /usr/include /usr/local/include /usr/include/libxml2 /usr/local/include/libxml2 ; do
+        CPPFLAGS="$old_CPPFLAGS -I$i"
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libxml/xmlmemory.h>
+int
+main ()
+{
+int a = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  XML2_INCLUDE="-I$i"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+XML2_INCLUDE=
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+        if test "x$XML2_INCLUDE" != "x"; then
+            break;
+        fi
+    done
+    CPPFLAGS="$old_CPPFLAGS $XML2_INCLUDE"
+fi
+
+
+for ac_header in libxml/xmlmemory.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in libxml/parser.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in libxml/xinclude.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+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'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+for ac_header in FL/Fl.H
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in FL/Fl_Overlay_Window.H
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in FL/Fl_Light_Button.H
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in FL/fl_draw.H
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in FL/Fl_Cartesian.H
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in FL/Fl_Audio_Meter.H
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# X86_64 Linux machines have both 64 bit and 32 bit libraries. We need to choose the right set
+echo "$as_me:$LINENO: checking for /usr/X11R6/lib64" >&5
+echo $ECHO_N "checking for /usr/X11R6/lib64... $ECHO_C" >&6
+if test "${ac_cv_file__usr_X11R6_lib64+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/X11R6/lib64"; then
+  ac_cv_file__usr_X11R6_lib64=yes
+else
+  ac_cv_file__usr_X11R6_lib64=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file__usr_X11R6_lib64" >&5
+echo "${ECHO_T}$ac_cv_file__usr_X11R6_lib64" >&6
+if test $ac_cv_file__usr_X11R6_lib64 = yes; then
+  TESTLIBS="$TESTLIBS -L/usr/X11R6/lib64"
+else
+  echo "$as_me:$LINENO: checking for /usr/X11R6/lib" >&5
+echo $ECHO_N "checking for /usr/X11R6/lib... $ECHO_C" >&6
+if test "${ac_cv_file__usr_X11R6_lib+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/X11R6/lib"; then
+  ac_cv_file__usr_X11R6_lib=yes
+else
+  ac_cv_file__usr_X11R6_lib=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file__usr_X11R6_lib" >&5
+echo "${ECHO_T}$ac_cv_file__usr_X11R6_lib" >&6
+if test $ac_cv_file__usr_X11R6_lib = yes; then
+  TESTLIBS="$TESTLIBS -L/usr/X11R6/lib"
+fi
+
+fi
+
+
+# Checks for libraries.
+echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
+echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6
+if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXft $TESTLIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XftFontOpen ();
+int
+main ()
+{
+XftFontOpen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_Xft_XftFontOpen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_Xft_XftFontOpen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
+echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6
+if test $ac_cv_lib_Xft_XftFontOpen = yes; then
+  TESTLIBS="$TESTLIBS -lXft"
+fi
+
+echo "$as_me:$LINENO: checking for XextCreateExtension in -lXext" >&5
+echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
+if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXext $TESTLIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XextCreateExtension ();
+int
+main ()
+{
+XextCreateExtension ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_Xext_XextCreateExtension=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_Xext_XextCreateExtension=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
+echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
+if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
+  TESTLIBS="$TESTLIBS -lXext"
+fi
+
+echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5
+echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
+if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lX11 $TESTLIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XOpenDisplay ();
+int
+main ()
+{
+XOpenDisplay ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_X11_XOpenDisplay=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_X11_XOpenDisplay=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5
+echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
+if test $ac_cv_lib_X11_XOpenDisplay = yes; then
+  TESTLIBS="$TESTLIBS -lX11"
+fi
+
+
+echo "$as_me:$LINENO: checking for TIFFOpen in -ltiff" >&5
+echo $ECHO_N "checking for TIFFOpen in -ltiff... $ECHO_C" >&6
+if test "${ac_cv_lib_tiff_TIFFOpen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltiff -lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char TIFFOpen ();
+int
+main ()
+{
+TIFFOpen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_tiff_TIFFOpen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_tiff_TIFFOpen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFOpen" >&5
+echo "${ECHO_T}$ac_cv_lib_tiff_TIFFOpen" >&6
+if test $ac_cv_lib_tiff_TIFFOpen = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBTIFF 1
+_ACEOF
+
+  LIBS="-ltiff $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: \"Can't build without libtiff (does your system require a libtiff-devel package?)\"" >&5
+echo "$as_me: error: \"Can't build without libtiff (does your system require a libtiff-devel package?)\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+echo "$as_me:$LINENO: checking for cos in -lm" >&5
+echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_cos+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char cos ();
+int
+main ()
+{
+cos ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_m_cos=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_cos=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
+echo "${ECHO_T}$ac_cv_lib_m_cos" >&6
+if test $ac_cv_lib_m_cos = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5
+echo $ECHO_N "checking for xmlParseFile in -lxml2... $ECHO_C" >&6
+if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lxml2  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char xmlParseFile ();
+int
+main ()
+{
+xmlParseFile ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_xml2_xmlParseFile=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_xml2_xmlParseFile=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5
+echo "${ECHO_T}$ac_cv_lib_xml2_xmlParseFile" >&6
+if test $ac_cv_lib_xml2_xmlParseFile = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBXML2 1
+_ACEOF
+ TESTLIBS="$TESTLIBS -lxml2"
+fi
+
+if test -n "$enable_tests" ; 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'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    echo "$as_me:$LINENO: checking for main in -lfltk" >&5
+echo $ECHO_N "checking for main in -lfltk... $ECHO_C" >&6
+if test "${ac_cv_lib_fltk_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfltk  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_fltk_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fltk_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fltk_main" >&5
+echo "${ECHO_T}$ac_cv_lib_fltk_main" >&6
+if test $ac_cv_lib_fltk_main = yes; then
+  TESTLIBS="$TESTLIBS -lfltk -lsupc++"
+fi
+
+    echo "$as_me:$LINENO: checking for main in -lfltk_cartesian" >&5
+echo $ECHO_N "checking for main in -lfltk_cartesian... $ECHO_C" >&6
+if test "${ac_cv_lib_fltk_cartesian_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfltk_cartesian  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_fltk_cartesian_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fltk_cartesian_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fltk_cartesian_main" >&5
+echo "${ECHO_T}$ac_cv_lib_fltk_cartesian_main" >&6
+if test $ac_cv_lib_fltk_cartesian_main = yes; then
+  TESTLIBS="-lfltk_cartesian $TESTLIBS"
+fi
+
+    echo "$as_me:$LINENO: checking for main in -lfltk_audio_meter" >&5
+echo $ECHO_N "checking for main in -lfltk_audio_meter... $ECHO_C" >&6
+if test "${ac_cv_lib_fltk_audio_meter_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfltk_audio_meter  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_fltk_audio_meter_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fltk_audio_meter_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fltk_audio_meter_main" >&5
+echo "${ECHO_T}$ac_cv_lib_fltk_audio_meter_main" >&6
+if test $ac_cv_lib_fltk_audio_meter_main = yes; then
+  TESTLIBS="-lfltk_audio_meter $TESTLIBS"
+fi
+
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+    echo "$as_me:$LINENO: checking for afOpenFile in -laudiofile" >&5
+echo $ECHO_N "checking for afOpenFile in -laudiofile... $ECHO_C" >&6
+if test "${ac_cv_lib_audiofile_afOpenFile+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-laudiofile  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char afOpenFile ();
+int
+main ()
+{
+afOpenFile ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_audiofile_afOpenFile=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_audiofile_afOpenFile=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_audiofile_afOpenFile" >&5
+echo "${ECHO_T}$ac_cv_lib_audiofile_afOpenFile" >&6
+if test $ac_cv_lib_audiofile_afOpenFile = yes; then
+  TESTLIBS="$TESTLIBS -laudiofile"
+else
+  { { echo "$as_me:$LINENO: error: \"Can't make tests without libaudiofile (does your system require a libaudiofile-devel package?)\"" >&5
+echo "$as_me: error: \"Can't make tests without libaudiofile (does your system require a libaudiofile-devel package?)\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+    echo "$as_me:$LINENO: checking for fftw_plan_dft_1d in -lfftw3" >&5
+echo $ECHO_N "checking for fftw_plan_dft_1d in -lfftw3... $ECHO_C" >&6
+if test "${ac_cv_lib_fftw3_fftw_plan_dft_1d+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfftw3  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char fftw_plan_dft_1d ();
+int
+main ()
+{
+fftw_plan_dft_1d ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_fftw3_fftw_plan_dft_1d=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fftw3_fftw_plan_dft_1d=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fftw3_fftw_plan_dft_1d" >&5
+echo "${ECHO_T}$ac_cv_lib_fftw3_fftw_plan_dft_1d" >&6
+if test $ac_cv_lib_fftw3_fftw_plan_dft_1d = yes; then
+  TESTLIBS="$TESTLIBS -lfftw3"
+fi
+
+    echo "$as_me:$LINENO: checking for fftw_create_plan in -lfftw" >&5
+echo $ECHO_N "checking for fftw_create_plan in -lfftw... $ECHO_C" >&6
+if test "${ac_cv_lib_fftw_fftw_create_plan+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfftw  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char fftw_create_plan ();
+int
+main ()
+{
+fftw_create_plan ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_fftw_fftw_create_plan=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fftw_fftw_create_plan=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fftw_fftw_create_plan" >&5
+echo "${ECHO_T}$ac_cv_lib_fftw_fftw_create_plan" >&6
+if test $ac_cv_lib_fftw_fftw_create_plan = yes; then
+  TESTLIBS="$TESTLIBS -lfftw"
+fi
+
+    echo "$as_me:$LINENO: checking for pthread_attr_init in -lpthread" >&5
+echo $ECHO_N "checking for pthread_attr_init in -lpthread... $ECHO_C" >&6
+if test "${ac_cv_lib_pthread_pthread_attr_init+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_attr_init ();
+int
+main ()
+{
+pthread_attr_init ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_pthread_pthread_attr_init=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_pthread_pthread_attr_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_attr_init" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_attr_init" >&6
+if test $ac_cv_lib_pthread_pthread_attr_init = yes; then
+  TESTLIBS="$TESTLIBS -lpthread"
+fi
+
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  TESTLIBS="$TESTLIBS -ldl"
+fi
+
+    echo "$as_me:$LINENO: checking for uc_start in -lunicall" >&5
+echo $ECHO_N "checking for uc_start in -lunicall... $ECHO_C" >&6
+if test "${ac_cv_lib_unicall_uc_start+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lunicall -ltiff -ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char uc_start ();
+int
+main ()
+{
+uc_start ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_unicall_uc_start=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_unicall_uc_start=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_unicall_uc_start" >&5
+echo "${ECHO_T}$ac_cv_lib_unicall_uc_start" >&6
+if test $ac_cv_lib_unicall_uc_start = yes; then
+  TESTLIBS="$TESTLIBS -lunicall"
+fi
+
+fi
+
+case "${ax_cv_c_compiler_vendor}" in
+   gnu)
+        COMP_VENDOR_CFLAGS="-O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+        if test "$enable_sse" = "yes" ; then
+            COMP_VENDOR_CFLAGS="-msse $COMP_VENDOR_CFLAGS"
+        fi
+        if test "$enable_mmx" = "yes" ; then
+            COMP_VENDOR_CFLAGS="-mmmx $COMP_VENDOR_CFLAGS"
+        fi
+        ;;
+    *)
+        COMP_VENDOR_CFLAGS="-O2 -g -std=c99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+        ;;
+esac
+
+
+
+if test "$enable_doc" = yes; then
+  COND_DOC_TRUE=
+  COND_DOC_FALSE='#'
+else
+  COND_DOC_TRUE='#'
+  COND_DOC_FALSE=
+fi
+
+
+
+if test "$enable_tests" = yes; then
+  COND_TESTS_TRUE=
+  COND_TESTS_FALSE='#'
+else
+  COND_TESTS_TRUE='#'
+  COND_TESTS_FALSE=
+fi
+
+
+
+if test "$enable_itutests" = yes; then
+  COND_ITUTESTS_TRUE=
+  COND_ITUTESTS_FALSE='#'
+else
+  COND_ITUTESTS_TRUE='#'
+  COND_ITUTESTS_FALSE=
+fi
+
+
+
+if test "$enable_mmx" = yes; then
+  COND_MMX_TRUE=
+  COND_MMX_FALSE='#'
+else
+  COND_MMX_TRUE='#'
+  COND_MMX_FALSE=
+fi
+
+
+
+if test "$enable_sse" = yes; then
+  COND_SSE_TRUE=
+  COND_SSE_FALSE='#'
+else
+  COND_SSE_TRUE='#'
+  COND_SSE_FALSE=
+fi
+
+
+TESTLIBS=$TESTLIBS
+
+COMP_VENDOR_CFLAGS=$COMP_VENDOR_CFLAGS
+
+
+                                                                      ac_config_files="$ac_config_files Makefile doc/Makefile itutests/Makefile itutests/fax/Makefile src/Makefile tests/Makefile spandsp.spec"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COND_DOC_TRUE}" && test -z "${COND_DOC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COND_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COND_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COND_TESTS_TRUE}" && test -z "${COND_TESTS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COND_TESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COND_TESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COND_ITUTESTS_TRUE}" && test -z "${COND_ITUTESTS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COND_ITUTESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COND_ITUTESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COND_MMX_TRUE}" && test -z "${COND_MMX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COND_MMX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COND_MMX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${COND_SSE_TRUE}" && test -z "${COND_SSE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"COND_SSE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"COND_SSE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+  "itutests/Makefile" ) CONFIG_FILES="$CONFIG_FILES itutests/Makefile" ;;
+  "itutests/fax/Makefile" ) CONFIG_FILES="$CONFIG_FILES itutests/fax/Makefile" ;;
+  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+  "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+  "spandsp.spec" ) CONFIG_FILES="$CONFIG_FILES spandsp.spec" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:config-h.in" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@SPANDSP_LT_CURRENT@,$SPANDSP_LT_CURRENT,;t t
+s,@SPANDSP_LT_REVISION@,$SPANDSP_LT_REVISION,;t t
+s,@SPANDSP_LT_AGE@,$SPANDSP_LT_AGE,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@CXXDEPMODE@,$CXXDEPMODE,;t t
+s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@LN_S@,$LN_S,;t t
+s,@ECHO@,$ECHO,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@CXXCPP@,$CXXCPP,;t t
+s,@F77@,$F77,;t t
+s,@FFLAGS@,$FFLAGS,;t t
+s,@ac_ct_F77@,$ac_ct_F77,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@COND_DOC_TRUE@,$COND_DOC_TRUE,;t t
+s,@COND_DOC_FALSE@,$COND_DOC_FALSE,;t t
+s,@COND_TESTS_TRUE@,$COND_TESTS_TRUE,;t t
+s,@COND_TESTS_FALSE@,$COND_TESTS_FALSE,;t t
+s,@COND_ITUTESTS_TRUE@,$COND_ITUTESTS_TRUE,;t t
+s,@COND_ITUTESTS_FALSE@,$COND_ITUTESTS_FALSE,;t t
+s,@COND_MMX_TRUE@,$COND_MMX_TRUE,;t t
+s,@COND_MMX_FALSE@,$COND_MMX_FALSE,;t t
+s,@COND_SSE_TRUE@,$COND_SSE_TRUE,;t t
+s,@COND_SSE_FALSE@,$COND_SSE_FALSE,;t t
+s,@TESTLIBS@,$TESTLIBS,;t t
+s,@COMP_VENDOR_CFLAGS@,$COMP_VENDOR_CFLAGS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X$ac_file : 'X\(//\)[^/]' \| \
+	 X$ac_file : 'X\(//\)$' \| \
+	 X$ac_file : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+# @end 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/configure.ac	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,229 @@
+# configure.ac -- Process this file with autoconf to produce configure
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2, as
+# published by the Free Software Foundation.
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# $Id: configure.ac,v 1.17 2006/11/26 13:13:30 steveu Exp $
+
+# @start 1
+
+AC_INIT
+
+AC_DEFUN([AX_COMPILER_VENDOR],
+[
+AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+ [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
+  # note: don't check for GCC first, since some other compilers define __GNUC__
+  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+#if !($vencpp)
+      thisisanerror;
+#endif
+])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
+  done
+ ])
+])
+
+SPANDSP_MAJOR_VERSION=0
+SPANDSP_MINOR_VERSION=0
+SPANDSP_MICRO_VERSION=3
+
+SPANDSP_LT_CURRENT=0
+SPANDSP_LT_REVISION=2
+SPANDSP_LT_AGE=0
+
+VERSION=$SPANDSP_MAJOR_VERSION.$SPANDSP_MINOR_VERSION.$SPANDSP_MICRO_VERSION
+PACKAGE=spandsp
+
+AC_SUBST(SPANDSP_LT_CURRENT)
+AC_SUBST(SPANDSP_LT_REVISION)
+AC_SUBST(SPANDSP_LT_AGE)
+
+AC_CONFIG_SRCDIR([src/tone_generate.c])
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_HEADERS([src/config.h:config-h.in])
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+
+AC_CANONICAL_HOST
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_GCC_TRADITIONAL
+AC_PROG_LIBTOOL
+AC_LANG([C])
+
+AX_COMPILER_VENDOR
+
+AC_C_CONST
+AC_C_INLINE
+AC_C_VOLATILE
+
+AC_CHECK_TYPES(long long)
+AC_CHECK_TYPES(long double)
+
+AC_TYPE_SIGNAL
+
+AC_ARG_ENABLE(doc,     [  --enable-doc      Build the documentation])
+AC_ARG_ENABLE(tests,   [  --enable-tests    Build the test programs])
+AC_ARG_ENABLE(itutests,[  --enable-itutests Build TIFF test files for some ITU test images])
+AC_ARG_ENABLE(mmx,     [  --enable-mmx      Enable MMX support])
+AC_ARG_ENABLE(sse,     [  --enable-sse      Enable SSE support])
+
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_VPRINTF
+AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+AC_FUNC_REALLOC
+AC_FUNC_SELECT_ARGTYPES
+
+AC_CHECK_FUNCS([memmove])
+AC_CHECK_FUNCS([memset])
+AC_CHECK_FUNCS([pow])
+AC_CHECK_FUNCS([sqrt])
+AC_CHECK_FUNCS([rint])
+AC_CHECK_FUNCS([select])
+AC_CHECK_FUNCS([strcasecmp])
+AC_CHECK_FUNCS([strchr])
+AC_CHECK_FUNCS([strdup])
+AC_CHECK_FUNCS([strerror])
+AC_CHECK_FUNCS([strstr])
+AC_CHECK_FUNCS([strtol])
+AC_CHECK_FUNCS([gettimeofday])
+
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_HEADER_TIME
+
+# Check for header files.
+AC_CHECK_HEADERS([socket.h])
+AC_CHECK_HEADERS([inttypes.h])
+AC_CHECK_HEADERS([unistd.h])
+AC_CHECK_HEADERS([stdlib.h])
+AC_CHECK_HEADERS([string.h])
+AC_CHECK_HEADERS([strings.h])
+AC_CHECK_HEADERS([malloc.h])
+AC_CHECK_HEADERS([tgmath.h])
+AC_CHECK_HEADERS([math.h])
+AC_CHECK_HEADERS([float.h])
+AC_CHECK_HEADERS([fcntl.h])
+AC_CHECK_HEADERS([sys/time.h])
+AC_CHECK_HEADERS([sys/select.h])
+AC_CHECK_HEADERS([sys/ioctl.h])
+AC_CHECK_HEADERS([sys/fcntl.h])
+AC_CHECK_HEADERS([audiofile.h])
+AC_CHECK_HEADERS([fftw.h])
+AC_CHECK_HEADERS([fftw3.h])
+AC_CHECK_HEADERS([tiffio.h])
+AC_CHECK_HEADERS([pthread.h])
+AC_CHECK_HEADERS([unicall.h])
+AC_CHECK_HEADERS([X11/X.h])
+
+# Determine XML2 include path
+AC_MSG_CHECKING(for libxml/xmlmemory.h)
+
+# Can we include headers using system include dirs?
+AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
+    XML2_INCLUDE=" ",
+    XML2_INCLUDE=
+)
+
+# Hunt through several possible directories to find the includes for libxml2
+if test "x$XML2_INCLUDE" = "x"; then
+    old_CPPFLAGS="$CPPFLAGS"
+    for i in $xml2_include_dir /usr/include /usr/local/include /usr/include/libxml2 /usr/local/include/libxml2 ; do
+        CPPFLAGS="$old_CPPFLAGS -I$i"
+        AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
+            XML2_INCLUDE="-I$i",
+            XML2_INCLUDE=
+        )
+        if test "x$XML2_INCLUDE" != "x"; then
+            break;
+        fi
+    done
+    CPPFLAGS="$old_CPPFLAGS $XML2_INCLUDE"
+fi
+
+AC_CHECK_HEADERS([libxml/xmlmemory.h])
+AC_CHECK_HEADERS([libxml/parser.h])
+AC_CHECK_HEADERS([libxml/xinclude.h])
+
+AC_LANG([C++])
+AC_CHECK_HEADERS([FL/Fl.H])
+AC_CHECK_HEADERS([FL/Fl_Overlay_Window.H])
+AC_CHECK_HEADERS([FL/Fl_Light_Button.H])
+AC_CHECK_HEADERS([FL/fl_draw.H])
+AC_CHECK_HEADERS([FL/Fl_Cartesian.H], [], [], [],[[#include <FL/Fl.H>
+]])
+AC_CHECK_HEADERS([FL/Fl_Audio_Meter.H], [], [], [],[[#include <FL/Fl.H>
+]])
+
+AC_LANG([C])
+# X86_64 Linux machines have both 64 bit and 32 bit libraries. We need to choose the right set
+AC_CHECK_FILE([/usr/X11R6/lib64], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib64"], AC_CHECK_FILE([/usr/X11R6/lib], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib"]))
+
+# Checks for libraries.
+AC_CHECK_LIB([Xft], [XftFontOpen], TESTLIBS="$TESTLIBS -lXft",, $TESTLIBS)
+AC_CHECK_LIB([Xext], [XextCreateExtension], TESTLIBS="$TESTLIBS -lXext",, $TESTLIBS)
+AC_CHECK_LIB([X11], [XOpenDisplay], TESTLIBS="$TESTLIBS -lX11",, $TESTLIBS)
+AC_CHECK_LIB([tiff], [TIFFOpen], , AC_MSG_ERROR("Can't build without libtiff (does your system require a libtiff-devel package?)"), -lm)
+AC_CHECK_LIB([m], [cos])
+AC_CHECK_LIB([xml2], [xmlParseFile], [AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have the 'libxml2' library (-lxml2).]) TESTLIBS="$TESTLIBS -lxml2"])
+if test -n "$enable_tests" ; then
+    AC_LANG([C++])
+    AC_CHECK_LIB([fltk], [main], TESTLIBS="$TESTLIBS -lfltk -lsupc++")
+    AC_CHECK_LIB([fltk_cartesian], [main], TESTLIBS="-lfltk_cartesian $TESTLIBS")
+    AC_CHECK_LIB([fltk_audio_meter], [main], TESTLIBS="-lfltk_audio_meter $TESTLIBS")
+    AC_LANG([C])
+    AC_CHECK_LIB([audiofile], [afOpenFile], TESTLIBS="$TESTLIBS -laudiofile", AC_MSG_ERROR("Can't make tests without libaudiofile (does your system require a libaudiofile-devel package?)"))
+    AC_CHECK_LIB([fftw3], [fftw_plan_dft_1d], TESTLIBS="$TESTLIBS -lfftw3")
+    AC_CHECK_LIB([fftw], [fftw_create_plan], TESTLIBS="$TESTLIBS -lfftw")
+    AC_CHECK_LIB([pthread], [pthread_attr_init], TESTLIBS="$TESTLIBS -lpthread")
+    AC_CHECK_LIB([dl], [dlopen], TESTLIBS="$TESTLIBS -ldl")
+    AC_CHECK_LIB([unicall], [uc_start], TESTLIBS="$TESTLIBS -lunicall",, -ltiff -ldl)
+fi
+
+case "${ax_cv_c_compiler_vendor}" in
+   gnu)
+        COMP_VENDOR_CFLAGS="-O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+        if test "$enable_sse" = "yes" ; then
+            COMP_VENDOR_CFLAGS="-msse $COMP_VENDOR_CFLAGS"
+        fi
+        if test "$enable_mmx" = "yes" ; then
+            COMP_VENDOR_CFLAGS="-mmmx $COMP_VENDOR_CFLAGS"
+        fi
+        ;;
+    *)
+        COMP_VENDOR_CFLAGS="-O2 -g -std=c99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+        ;;
+esac
+
+AM_CONDITIONAL([COND_DOC], [test "$enable_doc" = yes])
+AM_CONDITIONAL([COND_TESTS], [test "$enable_tests" = yes])
+AM_CONDITIONAL([COND_ITUTESTS], [test "$enable_itutests" = yes])
+AM_CONDITIONAL([COND_MMX], [test "$enable_mmx" = yes])
+AM_CONDITIONAL([COND_SSE], [test "$enable_sse" = yes])
+
+AC_SUBST(TESTLIBS, $TESTLIBS)
+AC_SUBST(COMP_VENDOR_CFLAGS, $COMP_VENDOR_CFLAGS)
+
+AC_CONFIG_FILES([Makefile
+                 doc/Makefile
+                 itutests/Makefile
+                 itutests/fax/Makefile
+                 src/Makefile
+                 tests/Makefile
+                 spandsp.spec])
+
+AC_OUTPUT
+
+# @end 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/doc/Makefile	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,329 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# doc/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+srcdir = .
+top_srcdir = ..
+
+pkgdatadir = $(datadir)/spandsp
+pkglibdir = $(libdir)/spandsp
+pkgincludedir = $(includedir)/spandsp
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoconf
+AUTOHEADER = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoheader
+AUTOMAKE = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run automake-1.9
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+COMP_VENDOR_CFLAGS = -O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+COND_DOC_FALSE = 
+COND_DOC_TRUE = #
+COND_ITUTESTS_FALSE = 
+COND_ITUTESTS_TRUE = #
+COND_MMX_FALSE = 
+COND_MMX_TRUE = #
+COND_SSE_FALSE = 
+COND_SSE_TRUE = #
+COND_TESTS_FALSE = #
+COND_TESTS_TRUE = 
+CPP = gcc -E
+CPPFLAGS =  
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = grep -E
+EXEEXT = 
+F77 = 
+FFLAGS = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS = 
+LIBOBJS = 
+LIBS = -lm -ltiff 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run makeinfo
+OBJEXT = o
+PACKAGE = spandsp
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = 
+PACKAGE_STRING = 
+PACKAGE_TARNAME = 
+PACKAGE_VERSION = 
+PATH_SEPARATOR = :
+RANLIB = ranlib
+SET_MAKE = 
+SHELL = /bin/sh
+SPANDSP_LT_AGE = 0
+SPANDSP_LT_CURRENT = 0
+SPANDSP_LT_REVISION = 2
+STRIP = strip
+TESTLIBS =  -L/usr/X11R6/lib -lXft -lXext -lX11 -laudiofile -lfftw3 -lpthread -ldl
+VERSION = 0.0.3
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+ac_ct_RANLIB = ranlib
+ac_ct_STRIP = strip
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /xhome1/tmp/oslec/spandsp-0.0.3/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+MAINTAINERCLEANFILES = Makefile.in
+EXTRA_DIST = css.css
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-info-am
+
+
+all:
+	doxygen libspandsp-doxygen
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/doc/Makefile.am	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,24 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License version 2, as
+## published by the Free Software Foundation.
+##
+## 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+##
+## $Id: Makefile.am,v 1.3 2006/10/24 13:21:58 steveu Exp $
+
+MAINTAINERCLEANFILES = Makefile.in
+
+EXTRA_DIST = css.css
+
+all:
+	doxygen libspandsp-doxygen
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/doc/Makefile.in	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,329 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMP_VENDOR_CFLAGS = @COMP_VENDOR_CFLAGS@
+COND_DOC_FALSE = @COND_DOC_FALSE@
+COND_DOC_TRUE = @COND_DOC_TRUE@
+COND_ITUTESTS_FALSE = @COND_ITUTESTS_FALSE@
+COND_ITUTESTS_TRUE = @COND_ITUTESTS_TRUE@
+COND_MMX_FALSE = @COND_MMX_FALSE@
+COND_MMX_TRUE = @COND_MMX_TRUE@
+COND_SSE_FALSE = @COND_SSE_FALSE@
+COND_SSE_TRUE = @COND_SSE_TRUE@
+COND_TESTS_FALSE = @COND_TESTS_FALSE@
+COND_TESTS_TRUE = @COND_TESTS_TRUE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPANDSP_LT_AGE = @SPANDSP_LT_AGE@
+SPANDSP_LT_CURRENT = @SPANDSP_LT_CURRENT@
+SPANDSP_LT_REVISION = @SPANDSP_LT_REVISION@
+STRIP = @STRIP@
+TESTLIBS = @TESTLIBS@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+MAINTAINERCLEANFILES = Makefile.in
+EXTRA_DIST = css.css
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-info-am
+
+
+all:
+	doxygen libspandsp-doxygen
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/doc/css.css	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,564 @@
+body {
+	background-image: url("../images/weave.jpg");
+	font-family: Verdana, Arial, Helvetica, Sans-serif;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+
+h1 {
+	text-align: center;
+}
+
+h2 {
+	font-family: Verdana, Arial, Helvetica, Sans-serif;
+	border-color: #c00000;
+	color : black;
+	margin-top: 0.8em;
+	border-style: solid;
+	border-width: 0px 0px 3px 0.5em;
+	line-height : 130%;
+}
+
+h3 {
+	font-family: Verdana, Arial, Helvetica, Sans-serif;
+	border-color: #f02020;
+	color : black;
+	border-width: 0px 0px 2px 0.5em;
+	border-style: solid;
+	margin-right: 20%;
+	line-height : 130%;
+}
+caption {
+	font-weight: bold
+}
+a.qindex {}
+a.qindexRef {}
+a.el {
+	text-decoration: none;
+	font-weight: bold
+}
+a.elRef {
+	font-weight: bold
+}
+a.code {
+	text-decoration: none;
+	font-weight: normal;
+	color: #4444ee
+}
+a.codeRef {
+	font-weight: normal;
+	color: #4444ee
+}
+a:hover {
+	text-decoration: none;
+	background-color: #f2f2ff
+}
+dl.el {
+	margin-left: -1cm
+}
+div.fragment {
+	width: 100%;
+	border: none;
+	background-color: #eeeeee
+}
+div.ah {
+	background-color: black;
+	font-weight: bold;
+	color: #ffffff;
+	margin-bottom: 3px;
+	margin-top: 3px
+}
+
+td {
+	font-family: Verdana, Arial, Helvetica, Sans-serif;
+	font-weight: bold;
+}
+
+.navheader {
+	font-family: Verdana, Arial, Helvetica, Sans-serif;
+	background-color: #B2B2ff;
+	font-weight: bold;
+}
+
+.navfooter {
+	font-family: Verdana, Arial, Helvetica, Sans-serif;
+	background-color: #B2B2ff;
+	font-weight: bold;
+}
+
+table.menu {
+	background-color: #000066;
+	font-weight: bold;
+	text-align: center;
+	width: 100%; 
+}
+
+tr.menu {
+	background-color: #ccffff;
+	font-weight: bold;
+	text-align: center;
+}
+td.menu {
+	background-color: #f2e0d0;
+	font-weight: bold;
+	text-align: center;
+}
+
+td.md {
+	background-color: #f2f2ff;
+	font-weight: bold;
+}
+td.mdname1 {
+	background-color: #f2f2ff;
+	font-weight: bold;
+	color: #602020;
+}
+td.mdname {
+	background-color: #f2f2ff;
+	font-weight: bold;
+	color: #602020;
+	width: 600px;
+}
+div.groupHeader {
+	margin-left: 16px;
+	margin-top: 12px;
+	margin-bottom: 6px;
+	font-weight: bold
+}
+div.groupText {
+	margin-left: 16px;
+	font-style: italic;
+	font-size: smaller
+}
+td.indexkey { 
+	font-family: Verdana, Arial, Helvetica, Sans-serif;
+	background-color: #eeeeff; 
+	font-weight: bold; 
+	padding-right  : 10px; 
+	padding-top    : 2px; 
+	padding-left   : 10px; 
+	padding-bottom : 2px; 
+	margin-left    : 0px; 
+	margin-right   : 0px; 
+	margin-top     : 2px; 
+	margin-bottom  : 2px  
+}
+td.indexvalue { 
+	font-family: Verdana, Arial, Helvetica, Sans-serif;
+	background-color: #eeeeff; 
+	font-style: italic; 
+	padding-right  : 10px; 
+	padding-top    : 2px; 
+	padding-left   : 10px; 
+	padding-bottom : 2px; 
+	margin-left    : 0px; 
+	margin-right   : 0px; 
+	margin-top     : 2px; 
+	margin-bottom  : 2px  
+}
+span.keyword {
+	color: #008000
+}
+span.keywordtype {
+	color: #604020
+}
+span.keywordflow {
+	color: #e08000
+}
+span.comment {
+	color: #800000
+}
+span.preprocessor {
+	color: #806020
+}
+span.stringliteral {
+	color: #002080
+}
+span.charliteral {
+	color: #008080
+}
+em {
+	color: #990000;
+	background-color: transparent;
+}
+h1,h2,h3,h4,h5,h6,p,center,td,th,ul,dl,div {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+body,td {
+	font-size: 90%;
+}
+h1 {
+	text-align: center;
+	font-size: 160%;
+}
+h2 {
+	font-size: 120%;
+}
+h3 {
+	font-size: 100%;
+}
+caption {
+	font-weight: bold
+}
+div.qindex {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+div.nav {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+div.navtab {
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	margin-right: 15px;
+	padding: 2px;
+}
+td.navtab {
+	font-size: 70%;
+}
+a.qindex {
+	text-decoration: none;
+	font-weight: bold;
+	color: #1a419d;
+}
+a.qindex:visited {
+	text-decoration: none;
+	font-weight: bold;
+	color: #1a419d
+}
+a.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+}
+a.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	border: 1px double #9295C2;
+}
+a.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+}
+a.qindexHL:visited {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff
+}
+a.el {
+	text-decoration: none;
+	font-weight: bold
+}
+a.elRef {
+	font-weight: bold
+}
+a.code:link {
+	text-decoration: none;
+	font-weight: normal;
+	color: #0000FF
+}
+a.code:visited {
+	text-decoration: none;
+	font-weight: normal;
+	color: #0000FF
+}
+a.codeRef:link {
+	font-weight: normal;
+	color: #0000FF
+}
+a.codeRef:visited {
+	font-weight: normal;
+	color: #0000FF
+}
+a:hover {
+	text-decoration: none;
+	background-color: #f2f2ff
+}
+dl.el {
+	margin-left: -1cm
+}
+.fragment {
+	font-family: Fixed, monospace;
+	font-size: 95%;
+}
+pre.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+div.ah {
+	background-color: black;
+	font-weight: bold;
+	color: #ffffff;
+	margin-bottom: 3px;
+	margin-top: 3px
+}
+td.md {
+	background-color: #F4F4FB;
+	font-weight: bold;
+}
+td.mdPrefix {
+	background-color: #F4F4FB;
+	color: #606060;
+	font-size: 80%;
+}
+td.mdname1 {
+	background-color: #F4F4FB;
+	font-weight: bold;
+	color: #602020;
+}
+td.mdname {
+	background-color: #F4F4FB;
+	font-weight: bold;
+	color: #602020;
+	width: 600px;
+}
+div.groupHeader {
+	margin-left: 16px;
+	margin-top: 12px;
+	margin-bottom: 6px;
+	font-weight: bold;
+}
+div.groupText {
+	margin-left: 16px;
+	font-style: italic;
+	font-size: 90%
+}
+td.indexkey {
+	background-color: #eeeeff;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+td.indexvalue {
+	background-color: #eeeeff;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+tr.memlist {
+	background-color: #f0f0f0; 
+}
+p.formulaDsp {
+	text-align: center;
+}
+img.formulaDsp {
+}
+img.formulaInl {
+	vertical-align: middle; 
+}
+span.keyword {
+	color: #008000
+}
+span.keywordtype {
+	color: #604020
+}
+span.keywordflow {
+	color: #e08000
+}
+span.comment {
+	color: #800000
+}
+span.preprocessor  {
+	color: #806020
+}
+span.stringliteral {
+	color: #002080
+}
+span.charliteral {
+	color: #008080
+}
+.mdTable {
+	border: 1px solid #868686;
+	background-color: #F4F4FB;
+}
+.mdRow {
+	padding: 8px 10px;
+}
+.mdescLeft {
+	padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+	padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplParams {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	color: #606060;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.search {
+	color: #003399;
+	font-weight: bold;
+}
+form.search {
+	margin-bottom: 0px;
+	margin-top: 0px;
+}
+input.search {
+	font-size: 75%;
+	color: #000080;
+	font-weight: normal;
+	background-color: #eeeeff;
+}
+td.tiny {
+	font-size: 75%;
+}
+a {
+	color: #252e78;
+}
+a:visited {
+	color: #3d2185;
+}
+.dirtab {
+	padding: 4px;
+	border-collapse: collapse;
+	border: 1px solid #b0b0b0;
+}
+th.dirtab {
+	background: #eeeeff;
+	font-weight: bold;
+}
+hr {
+	height: 1px;
+	border: none;
+	border-top: 1px solid black;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/doc/libspandsp-doxygen	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1229 @@
+# Doxyfile 1.4.4
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = libspandsp
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 0.0.3
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = api
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, 
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, 
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, 
+# Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# This tag can be used to specify the encoding used in the generated output. 
+# The encoding is not always determined by the language that is chosen, 
+# but also whether or not the output is meant for Windows or non-Windows users. 
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
+# forces the Windows encoding (this is the default for the Windows binary), 
+# whereas setting the tag to NO uses a Unix-style encoding (the default for 
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING   = YES
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is YES.
+
+SHOW_DIRECTORIES       = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the progam writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = 
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = ..
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
+FILE_PATTERNS          = *.c \
+                         *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 2
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = 
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = css.css
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = 
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = 
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = 
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = 
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that a graph may be further truncated if the graph's 
+# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH 
+# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), 
+# the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/itutests/Makefile	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,483 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# itutests/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+srcdir = .
+top_srcdir = ..
+
+pkgdatadir = $(datadir)/spandsp
+pkglibdir = $(libdir)/spandsp
+pkgincludedir = $(includedir)/spandsp
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = itutests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoconf
+AUTOHEADER = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoheader
+AUTOMAKE = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run automake-1.9
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+COMP_VENDOR_CFLAGS = -O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+COND_DOC_FALSE = 
+COND_DOC_TRUE = #
+COND_ITUTESTS_FALSE = 
+COND_ITUTESTS_TRUE = #
+COND_MMX_FALSE = 
+COND_MMX_TRUE = #
+COND_SSE_FALSE = 
+COND_SSE_TRUE = #
+COND_TESTS_FALSE = #
+COND_TESTS_TRUE = 
+CPP = gcc -E
+CPPFLAGS =  
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = grep -E
+EXEEXT = 
+F77 = 
+FFLAGS = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS = 
+LIBOBJS = 
+LIBS = -lm -ltiff 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run makeinfo
+OBJEXT = o
+PACKAGE = spandsp
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = 
+PACKAGE_STRING = 
+PACKAGE_TARNAME = 
+PACKAGE_VERSION = 
+PATH_SEPARATOR = :
+RANLIB = ranlib
+SET_MAKE = 
+SHELL = /bin/sh
+SPANDSP_LT_AGE = 0
+SPANDSP_LT_CURRENT = 0
+SPANDSP_LT_REVISION = 2
+STRIP = strip
+TESTLIBS =  -L/usr/X11R6/lib -lXft -lXext -lX11 -laudiofile -lfftw3 -lpthread -ldl
+VERSION = 0.0.3
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+ac_ct_RANLIB = ranlib
+ac_ct_STRIP = strip
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /xhome1/tmp/oslec/spandsp-0.0.3/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+SUBDIRS = fax
+DIST_SUBDIRS = fax
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  itutests/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  itutests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (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):
+	@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 \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@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)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libtool clean-recursive ctags \
+	ctags-recursive distclean distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am
+
+
+all: 
+
+clean:
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/itutests/Makefile.am	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,25 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License version 2, as
+## published by the Free Software Foundation.
+##
+## 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+##
+## $Id: Makefile.am,v 1.4 2006/10/24 13:21:58 steveu Exp $
+
+SUBDIRS = fax
+
+DIST_SUBDIRS = fax
+
+all: 
+
+clean:
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/itutests/Makefile.in	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,483 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = itutests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMP_VENDOR_CFLAGS = @COMP_VENDOR_CFLAGS@
+COND_DOC_FALSE = @COND_DOC_FALSE@
+COND_DOC_TRUE = @COND_DOC_TRUE@
+COND_ITUTESTS_FALSE = @COND_ITUTESTS_FALSE@
+COND_ITUTESTS_TRUE = @COND_ITUTESTS_TRUE@
+COND_MMX_FALSE = @COND_MMX_FALSE@
+COND_MMX_TRUE = @COND_MMX_TRUE@
+COND_SSE_FALSE = @COND_SSE_FALSE@
+COND_SSE_TRUE = @COND_SSE_TRUE@
+COND_TESTS_FALSE = @COND_TESTS_FALSE@
+COND_TESTS_TRUE = @COND_TESTS_TRUE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPANDSP_LT_AGE = @SPANDSP_LT_AGE@
+SPANDSP_LT_CURRENT = @SPANDSP_LT_CURRENT@
+SPANDSP_LT_REVISION = @SPANDSP_LT_REVISION@
+STRIP = @STRIP@
+TESTLIBS = @TESTLIBS@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = fax
+DIST_SUBDIRS = fax
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  itutests/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  itutests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (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):
+	@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 \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@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)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libtool clean-recursive ctags \
+	ctags-recursive distclean distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am
+
+
+all: 
+
+clean:
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/itutests/fax/Makefile	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,556 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# itutests/fax/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+SOURCES = $(generate_dithered_tif_SOURCES) $(generate_sized_pages_SOURCES)
+
+srcdir = .
+top_srcdir = ../..
+
+pkgdatadir = $(datadir)/spandsp
+pkglibdir = $(libdir)/spandsp
+pkgincludedir = $(includedir)/spandsp
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+noinst_PROGRAMS = generate_dithered_tif$(EXEEXT) \
+	generate_sized_pages$(EXEEXT)
+subdir = itutests/fax
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_generate_dithered_tif_OBJECTS = generate_dithered_tif.$(OBJEXT)
+generate_dithered_tif_OBJECTS = $(am_generate_dithered_tif_OBJECTS)
+generate_dithered_tif_DEPENDENCIES =
+am_generate_sized_pages_OBJECTS = generate_sized_pages.$(OBJEXT)
+generate_sized_pages_OBJECTS = $(am_generate_sized_pages_OBJECTS)
+generate_sized_pages_DEPENDENCIES =
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(generate_dithered_tif_SOURCES) \
+	$(generate_sized_pages_SOURCES)
+DIST_SOURCES = $(generate_dithered_tif_SOURCES) \
+	$(generate_sized_pages_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(datadir)"
+nobase_dataDATA_INSTALL = $(install_sh_DATA)
+DATA = $(nobase_data_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoconf
+AUTOHEADER = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoheader
+AUTOMAKE = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run automake-1.9
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+COMP_VENDOR_CFLAGS = -O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+COND_DOC_FALSE = 
+COND_DOC_TRUE = #
+COND_ITUTESTS_FALSE = 
+COND_ITUTESTS_TRUE = #
+COND_MMX_FALSE = 
+COND_MMX_TRUE = #
+COND_SSE_FALSE = 
+COND_SSE_TRUE = #
+COND_TESTS_FALSE = #
+COND_TESTS_TRUE = 
+CPP = gcc -E
+CPPFLAGS =  
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = grep -E
+EXEEXT = 
+F77 = 
+FFLAGS = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS = 
+LIBOBJS = 
+LIBS = -lm -ltiff 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run makeinfo
+OBJEXT = o
+PACKAGE = spandsp
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = 
+PACKAGE_STRING = 
+PACKAGE_TARNAME = 
+PACKAGE_VERSION = 
+PATH_SEPARATOR = :
+RANLIB = ranlib
+SET_MAKE = 
+SHELL = /bin/sh
+SPANDSP_LT_AGE = 0
+SPANDSP_LT_CURRENT = 0
+SPANDSP_LT_REVISION = 2
+STRIP = strip
+TESTLIBS =  -L/usr/X11R6/lib -lXft -lXext -lX11 -laudiofile -lfftw3 -lpthread -ldl
+VERSION = 0.0.3
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+ac_ct_RANLIB = ranlib
+ac_ct_STRIP = strip
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /xhome1/tmp/oslec/spandsp-0.0.3/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+PBM2G3 = pbmtog3
+FAX2TIFF = fax2tiff
+EXTRA_DIST = itu1.pbm itu2.pbm itu3.pbm itu4.pbm itu5.pbm itu6.pbm itu7.pbm itu8.pbm \
+               test1.pbm test2.pbm test3.pbm test4.pbm
+
+nobase_data_DATA = itutests.tif \
+                    itu1.tif \
+                    itu2.tif \
+                    itu3.tif \
+                    itu4.tif \
+                    itu5.tif \
+                    itu6.tif \
+                    itu7.tif \
+                    itu8.tif \
+                    test1.tif \
+                    test2.tif \
+                    test3.tif \
+                    test4.tif \
+                    dithered.tif \
+                    100pages.tif \
+                    R16_154_A3.tif \
+                    R16_154_A4.tif \
+                    R16_154_B4.tif \
+                    R16_385_A3.tif \
+                    R16_385_A4.tif \
+                    R16_385_B4.tif \
+                    R16_77_A3.tif \
+                    R16_77_A4.tif \
+                    R16_77_B4.tif \
+                    R8_154_A3.tif \
+                    R8_154_A4.tif \
+                    R8_154_B4.tif \
+                    R8_385_A3.tif \
+                    R8_385_A4.tif \
+                    R8_385_B4.tif \
+                    R8_77_A3.tif \
+                    R8_77_A4.tif \
+                    R8_77_B4.tif
+
+generate_dithered_tif_SOURCES = generate_dithered_tif.c
+generate_dithered_tif_LDADD = -ltiff
+generate_sized_pages_SOURCES = generate_sized_pages.c
+generate_sized_pages_LDADD = -ltiff
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .g3 .lo .o .obj .pbm .tif
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  itutests/fax/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  itutests/fax/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+generate_dithered_tif$(EXEEXT): $(generate_dithered_tif_OBJECTS) $(generate_dithered_tif_DEPENDENCIES) 
+	@rm -f generate_dithered_tif$(EXEEXT)
+	$(LINK) $(generate_dithered_tif_LDFLAGS) $(generate_dithered_tif_OBJECTS) $(generate_dithered_tif_LDADD) $(LIBS)
+generate_sized_pages$(EXEEXT): $(generate_sized_pages_OBJECTS) $(generate_sized_pages_DEPENDENCIES) 
+	@rm -f generate_sized_pages$(EXEEXT)
+	$(LINK) $(generate_sized_pages_LDFLAGS) $(generate_sized_pages_OBJECTS) $(generate_sized_pages_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/generate_dithered_tif.Po
+include ./$(DEPDIR)/generate_sized_pages.Po
+
+.c.o:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_dataDATA: $(nobase_data_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \
+	  $(nobase_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+uninstall-nobase_dataDATA:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(datadir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_dataDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-nobase_dataDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-nobase_dataDATA install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-nobase_dataDATA
+
+
+clean:
+	rm -f *.tif *.g3
+
+itutests.tif: itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 \
+              test1.g3 test2.g3 test3.g3 test4.g3
+	$(FAX2TIFF) -M -o $@ itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 \
+                test1.g3 test2.g3 test3.g3 test4.g3
+
+100pages.tif: itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 \
+              test1.g3 test2.g3 test3.g3 test4.g3
+	$(FAX2TIFF) -M -o $@ \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3
+
+.g3.tif:
+	${FAX2TIFF} -M -o $*.tif $*.g3
+
+.pbm.g3:
+	${PBM2G3} $*.pbm >$*.g3
+
+dithered.tif: generate_dithered_tif$(EXEEXT)
+	./generate_dithered_tif$(EXEEXT)
+
+R16_154_A3.tif R16_154_A4.tif R16_154_B4.tif \
+R16_385_A3.tif R16_385_A4.tif R16_385_B4.tif \
+R16_77_A3.tif R16_77_A4.tif R16_77_B4.tif \
+R8_154_A3.tif R8_154_A4.tif R8_154_B4.tif \
+R8_385_A3.tif R8_385_A4.tif R8_385_B4.tif \
+R8_77_A3.tif R8_77_A4.tif R8_77_B4.tif: generate_sized_pages$(EXEEXT)
+	./generate_sized_pages$(EXEEXT)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/itutests/fax/Makefile.am	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,105 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License version 2, as
+## published by the Free Software Foundation.
+##
+## 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+##
+## $Id: Makefile.am,v 1.8 2006/11/26 13:13:30 steveu Exp $
+
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+
+PBM2G3 = pbmtog3
+FAX2TIFF = fax2tiff
+
+EXTRA_DIST = itu1.pbm itu2.pbm itu3.pbm itu4.pbm itu5.pbm itu6.pbm itu7.pbm itu8.pbm \
+               test1.pbm test2.pbm test3.pbm test4.pbm
+
+nobase_data_DATA =  itutests.tif \
+                    itu1.tif \
+                    itu2.tif \
+                    itu3.tif \
+                    itu4.tif \
+                    itu5.tif \
+                    itu6.tif \
+                    itu7.tif \
+                    itu8.tif \
+                    test1.tif \
+                    test2.tif \
+                    test3.tif \
+                    test4.tif \
+                    dithered.tif \
+                    100pages.tif \
+                    R16_154_A3.tif \
+                    R16_154_A4.tif \
+                    R16_154_B4.tif \
+                    R16_385_A3.tif \
+                    R16_385_A4.tif \
+                    R16_385_B4.tif \
+                    R16_77_A3.tif \
+                    R16_77_A4.tif \
+                    R16_77_B4.tif \
+                    R8_154_A3.tif \
+                    R8_154_A4.tif \
+                    R8_154_B4.tif \
+                    R8_385_A3.tif \
+                    R8_385_A4.tif \
+                    R8_385_B4.tif \
+                    R8_77_A3.tif \
+                    R8_77_A4.tif \
+                    R8_77_B4.tif
+
+noinst_PROGRAMS =   generate_dithered_tif \
+                    generate_sized_pages
+
+generate_dithered_tif_SOURCES = generate_dithered_tif.c
+generate_dithered_tif_LDADD = -ltiff
+
+generate_sized_pages_SOURCES = generate_sized_pages.c
+generate_sized_pages_LDADD = -ltiff
+
+clean:
+	rm -f *.tif *.g3
+
+itutests.tif: itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 \
+              test1.g3 test2.g3 test3.g3 test4.g3
+	$(FAX2TIFF) -M -o $@ itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 \
+                test1.g3 test2.g3 test3.g3 test4.g3
+
+100pages.tif: itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 \
+              test1.g3 test2.g3 test3.g3 test4.g3
+	$(FAX2TIFF) -M -o $@ \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3
+
+.g3.tif:
+	${FAX2TIFF} -M -o $*.tif $*.g3
+
+.pbm.g3:
+	${PBM2G3} $*.pbm >$*.g3
+    
+dithered.tif: generate_dithered_tif$(EXEEXT)
+	./generate_dithered_tif$(EXEEXT)
+
+R16_154_A3.tif R16_154_A4.tif R16_154_B4.tif \
+R16_385_A3.tif R16_385_A4.tif R16_385_B4.tif \
+R16_77_A3.tif R16_77_A4.tif R16_77_B4.tif \
+R8_154_A3.tif R8_154_A4.tif R8_154_B4.tif \
+R8_385_A3.tif R8_385_A4.tif R8_385_B4.tif \
+R8_77_A3.tif R8_77_A4.tif R8_77_B4.tif: generate_sized_pages$(EXEEXT)
+	./generate_sized_pages$(EXEEXT)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/itutests/fax/Makefile.in	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,556 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+SOURCES = $(generate_dithered_tif_SOURCES) $(generate_sized_pages_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = generate_dithered_tif$(EXEEXT) \
+	generate_sized_pages$(EXEEXT)
+subdir = itutests/fax
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_generate_dithered_tif_OBJECTS = generate_dithered_tif.$(OBJEXT)
+generate_dithered_tif_OBJECTS = $(am_generate_dithered_tif_OBJECTS)
+generate_dithered_tif_DEPENDENCIES =
+am_generate_sized_pages_OBJECTS = generate_sized_pages.$(OBJEXT)
+generate_sized_pages_OBJECTS = $(am_generate_sized_pages_OBJECTS)
+generate_sized_pages_DEPENDENCIES =
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(generate_dithered_tif_SOURCES) \
+	$(generate_sized_pages_SOURCES)
+DIST_SOURCES = $(generate_dithered_tif_SOURCES) \
+	$(generate_sized_pages_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(datadir)"
+nobase_dataDATA_INSTALL = $(install_sh_DATA)
+DATA = $(nobase_data_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMP_VENDOR_CFLAGS = @COMP_VENDOR_CFLAGS@
+COND_DOC_FALSE = @COND_DOC_FALSE@
+COND_DOC_TRUE = @COND_DOC_TRUE@
+COND_ITUTESTS_FALSE = @COND_ITUTESTS_FALSE@
+COND_ITUTESTS_TRUE = @COND_ITUTESTS_TRUE@
+COND_MMX_FALSE = @COND_MMX_FALSE@
+COND_MMX_TRUE = @COND_MMX_TRUE@
+COND_SSE_FALSE = @COND_SSE_FALSE@
+COND_SSE_TRUE = @COND_SSE_TRUE@
+COND_TESTS_FALSE = @COND_TESTS_FALSE@
+COND_TESTS_TRUE = @COND_TESTS_TRUE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPANDSP_LT_AGE = @SPANDSP_LT_AGE@
+SPANDSP_LT_CURRENT = @SPANDSP_LT_CURRENT@
+SPANDSP_LT_REVISION = @SPANDSP_LT_REVISION@
+STRIP = @STRIP@
+TESTLIBS = @TESTLIBS@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+PBM2G3 = pbmtog3
+FAX2TIFF = fax2tiff
+EXTRA_DIST = itu1.pbm itu2.pbm itu3.pbm itu4.pbm itu5.pbm itu6.pbm itu7.pbm itu8.pbm \
+               test1.pbm test2.pbm test3.pbm test4.pbm
+
+nobase_data_DATA = itutests.tif \
+                    itu1.tif \
+                    itu2.tif \
+                    itu3.tif \
+                    itu4.tif \
+                    itu5.tif \
+                    itu6.tif \
+                    itu7.tif \
+                    itu8.tif \
+                    test1.tif \
+                    test2.tif \
+                    test3.tif \
+                    test4.tif \
+                    dithered.tif \
+                    100pages.tif \
+                    R16_154_A3.tif \
+                    R16_154_A4.tif \
+                    R16_154_B4.tif \
+                    R16_385_A3.tif \
+                    R16_385_A4.tif \
+                    R16_385_B4.tif \
+                    R16_77_A3.tif \
+                    R16_77_A4.tif \
+                    R16_77_B4.tif \
+                    R8_154_A3.tif \
+                    R8_154_A4.tif \
+                    R8_154_B4.tif \
+                    R8_385_A3.tif \
+                    R8_385_A4.tif \
+                    R8_385_B4.tif \
+                    R8_77_A3.tif \
+                    R8_77_A4.tif \
+                    R8_77_B4.tif
+
+generate_dithered_tif_SOURCES = generate_dithered_tif.c
+generate_dithered_tif_LDADD = -ltiff
+generate_sized_pages_SOURCES = generate_sized_pages.c
+generate_sized_pages_LDADD = -ltiff
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .g3 .lo .o .obj .pbm .tif
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  itutests/fax/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  itutests/fax/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+generate_dithered_tif$(EXEEXT): $(generate_dithered_tif_OBJECTS) $(generate_dithered_tif_DEPENDENCIES) 
+	@rm -f generate_dithered_tif$(EXEEXT)
+	$(LINK) $(generate_dithered_tif_LDFLAGS) $(generate_dithered_tif_OBJECTS) $(generate_dithered_tif_LDADD) $(LIBS)
+generate_sized_pages$(EXEEXT): $(generate_sized_pages_OBJECTS) $(generate_sized_pages_DEPENDENCIES) 
+	@rm -f generate_sized_pages$(EXEEXT)
+	$(LINK) $(generate_sized_pages_LDFLAGS) $(generate_sized_pages_OBJECTS) $(generate_sized_pages_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_dithered_tif.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_sized_pages.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_dataDATA: $(nobase_data_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \
+	  $(nobase_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+uninstall-nobase_dataDATA:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(datadir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_dataDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-nobase_dataDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-nobase_dataDATA install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-nobase_dataDATA
+
+
+clean:
+	rm -f *.tif *.g3
+
+itutests.tif: itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 \
+              test1.g3 test2.g3 test3.g3 test4.g3
+	$(FAX2TIFF) -M -o $@ itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 \
+                test1.g3 test2.g3 test3.g3 test4.g3
+
+100pages.tif: itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 \
+              test1.g3 test2.g3 test3.g3 test4.g3
+	$(FAX2TIFF) -M -o $@ \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3 itu5.g3 itu6.g3 itu7.g3 itu8.g3 test1.g3 test2.g3 test3.g3 test4.g3 \
+        itu1.g3 itu2.g3 itu3.g3 itu4.g3
+
+.g3.tif:
+	${FAX2TIFF} -M -o $*.tif $*.g3
+
+.pbm.g3:
+	${PBM2G3} $*.pbm >$*.g3
+
+dithered.tif: generate_dithered_tif$(EXEEXT)
+	./generate_dithered_tif$(EXEEXT)
+
+R16_154_A3.tif R16_154_A4.tif R16_154_B4.tif \
+R16_385_A3.tif R16_385_A4.tif R16_385_B4.tif \
+R16_77_A3.tif R16_77_A4.tif R16_77_B4.tif \
+R8_154_A3.tif R8_154_A4.tif R8_154_B4.tif \
+R8_385_A3.tif R8_385_A4.tif R8_385_B4.tif \
+R8_77_A3.tif R8_77_A4.tif R8_77_B4.tif: generate_sized_pages$(EXEEXT)
+	./generate_sized_pages$(EXEEXT)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/itutests/fax/generate_dithered_tif.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,170 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * generate_dithered_tif.c - Create a fine checkerboard TIFF file for test purposes.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: generate_dithered_tif.c,v 1.3 2006/11/20 00:00:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*
+    This program generates an A4 sized FAX image of a fine checkerboard. This doesn't
+    compress well, so it results in a rather large file for a single page. This is
+    good for testing the handling of extreme pages.
+    
+    Note that due to a bug in FAX image handling, versions of libtiff up to 3.8.2 fail
+    to handle this complex image properly, if 2-D compression is used. The bug should
+    be fixed in CVS at the time of writing, and so should be fixed in released versions
+    after 3.8.2. This code uses 1-D compression to avoid the issue.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <time.h>
+#include <memory.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#define T4_X_RESOLUTION_R4          4019
+#define T4_X_RESOLUTION_R8          8037
+#define T4_X_RESOLUTION_R16         16074
+
+#define T4_Y_RESOLUTION_STANDARD    3850
+#define T4_Y_RESOLUTION_FINE        7700
+#define T4_Y_RESOLUTION_SUPERFINE   15400
+
+int main(int argc, char *argv[])
+{
+    int image_width;
+    int row;
+    int resunit;
+    int output_compression;
+    int output_t4_options;
+    uint8_t image_buffer[1024];
+    TIFF *tiff_file;
+    struct tm *tm;
+    time_t now;
+    char buf[133];
+    float x_resolution;
+    float y_resolution;
+    int x_res;
+    int y_res;
+    int image_length;
+
+    if ((tiff_file = TIFFOpen("dithered.tif", "w")) == NULL)
+        exit(2);
+
+    output_compression = COMPRESSION_CCITT_T4;
+    /* Use 1-D compression until a fixed libtiff is the norm. */
+    //output_t4_options = GROUP3OPT_FILLBITS | GROUP3OPT_2DENCODING;
+    output_t4_options = GROUP3OPT_FILLBITS;
+
+    x_res = T4_X_RESOLUTION_R8;
+    y_res = T4_Y_RESOLUTION_FINE;
+    image_width = 1728;
+    image_length = 2200;
+
+    /* Prepare the directory entry fully before writing the image, or libtiff complains */
+    TIFFSetField(tiff_file, TIFFTAG_COMPRESSION, output_compression);
+    if (output_compression == COMPRESSION_CCITT_T4)
+    {
+        TIFFSetField(tiff_file, TIFFTAG_T4OPTIONS, output_t4_options);
+        TIFFSetField(tiff_file, TIFFTAG_FAXMODE, FAXMODE_CLASSF);
+    }
+    TIFFSetField(tiff_file, TIFFTAG_IMAGEWIDTH, image_width);
+    TIFFSetField(tiff_file, TIFFTAG_BITSPERSAMPLE, 1);
+    TIFFSetField(tiff_file, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
+    TIFFSetField(tiff_file, TIFFTAG_SAMPLESPERPIXEL, 1);
+    TIFFSetField(tiff_file, TIFFTAG_ROWSPERSTRIP, -1L);
+    TIFFSetField(tiff_file, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+    TIFFSetField(tiff_file, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
+    TIFFSetField(tiff_file, TIFFTAG_FILLORDER, FILLORDER_LSB2MSB);
+
+    x_resolution = x_res/100.0f;
+    y_resolution = y_res/100.0f;
+    TIFFSetField(tiff_file, TIFFTAG_XRESOLUTION, floorf(x_resolution*2.54f + 0.5f));
+    TIFFSetField(tiff_file, TIFFTAG_YRESOLUTION, floorf(y_resolution*2.54f + 0.5f));
+    resunit = RESUNIT_INCH;
+    TIFFSetField(tiff_file, TIFFTAG_RESOLUTIONUNIT, resunit);
+
+    TIFFSetField(tiff_file, TIFFTAG_SOFTWARE, "spandsp");
+    if (gethostname(buf, sizeof(buf)) == 0)
+        TIFFSetField(tiff_file, TIFFTAG_HOSTCOMPUTER, buf);
+
+    TIFFSetField(tiff_file, TIFFTAG_IMAGEDESCRIPTION, "Checkerboard or dithered ones");
+    TIFFSetField(tiff_file, TIFFTAG_MAKE, "soft-switch.org");
+    TIFFSetField(tiff_file, TIFFTAG_MODEL, "test data");
+
+    time(&now);
+    tm = localtime(&now);
+    sprintf(buf,
+    	    "%4d/%02d/%02d %02d:%02d:%02d",
+            tm->tm_year + 1900,
+            tm->tm_mon + 1,
+            tm->tm_mday,
+            tm->tm_hour,
+            tm->tm_min,
+            tm->tm_sec);
+    TIFFSetField(tiff_file, TIFFTAG_DATETIME, buf);
+
+    TIFFSetField(tiff_file, TIFFTAG_IMAGELENGTH, image_length);
+    TIFFSetField(tiff_file, TIFFTAG_PAGENUMBER, 0, 1);
+    TIFFSetField(tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
+    TIFFSetField(tiff_file, TIFFTAG_IMAGEWIDTH, image_width);
+
+    /* Write the image first.... */
+    for (row = 0;  row < image_length;  row++)
+    {
+        if ((row & 1) == 0)
+            memset(image_buffer, 0xAA, image_width/8 + 1);
+        else
+            memset(image_buffer, 0x55, image_width/8 + 1);
+        if (TIFFWriteScanline(tiff_file, image_buffer, row, 0) < 0)
+        {
+            printf("Write error at row %d.\n", row);
+            exit(2);
+        }
+    }
+    /* ....then the directory entry, and libtiff is happy. */
+    TIFFWriteDirectory(tiff_file);
+    TIFFClose(tiff_file);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/itutests/fax/generate_sized_pages.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,282 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * generate_sized_pages.c - Create a series of TIFF files in the various page sizes
+ *                        and resolutions.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: generate_sized_pages.c,v 1.4 2006/11/20 00:00:27 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <time.h>
+#include <memory.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#define T4_X_RESOLUTION_R4          4019
+#define T4_X_RESOLUTION_R8          8037
+#define T4_X_RESOLUTION_R16         16074
+
+#define T4_Y_RESOLUTION_STANDARD    3850
+#define T4_Y_RESOLUTION_FINE        7700
+#define T4_Y_RESOLUTION_SUPERFINE   15400
+
+struct
+{
+    const char *name;
+    int x_res;
+    int y_res;
+    int width;
+    int length;
+} sequence[] =
+{
+    {
+        "R8_385_A4.tif",
+        T4_X_RESOLUTION_R8,
+        T4_Y_RESOLUTION_STANDARD,
+        1728,
+        1100
+    },
+    {
+        "R16_385_A4.tif",
+        T4_X_RESOLUTION_R16,
+        T4_Y_RESOLUTION_STANDARD,
+        3456,
+        1100
+    },
+    {
+        "R8_77_A4.tif",
+        T4_X_RESOLUTION_R8,
+        T4_Y_RESOLUTION_FINE,
+        1728,
+        2200
+    },
+    {
+        "R16_77_A4.tif",
+        T4_X_RESOLUTION_R16,
+        T4_Y_RESOLUTION_FINE,
+        3456,
+        2200
+    },
+    {
+        "R8_154_A4.tif",
+        T4_X_RESOLUTION_R8,
+        T4_Y_RESOLUTION_SUPERFINE,
+        1728,
+        4400
+    },
+    {
+        "R16_154_A4.tif",
+        T4_X_RESOLUTION_R16,
+        T4_Y_RESOLUTION_SUPERFINE,
+        3456,
+        4400
+    },
+    {
+        "R8_385_B4.tif",
+        T4_X_RESOLUTION_R8,
+        T4_Y_RESOLUTION_STANDARD,
+        2048,
+        1200
+    },
+    {
+        "R16_385_B4.tif",
+        T4_X_RESOLUTION_R16,
+        T4_Y_RESOLUTION_STANDARD,
+        4096,
+        1200
+    },
+    {
+        "R8_77_B4.tif",
+        T4_X_RESOLUTION_R8,
+        T4_Y_RESOLUTION_FINE,
+        2048,
+        2400
+    },
+    {
+        "R16_77_B4.tif",
+        T4_X_RESOLUTION_R16,
+        T4_Y_RESOLUTION_FINE,
+        4096,
+        2400
+    },
+    {
+        "R8_154_B4.tif",
+        T4_X_RESOLUTION_R8,
+        T4_Y_RESOLUTION_SUPERFINE,
+        2048,
+        4800
+    },
+    {
+        "R16_154_B4.tif",
+        T4_X_RESOLUTION_R16,
+        T4_Y_RESOLUTION_SUPERFINE,
+        4096,
+        4800
+    },
+    {
+        "R8_385_A3.tif",
+        T4_X_RESOLUTION_R8,
+        T4_Y_RESOLUTION_STANDARD,
+        2432,
+        1556
+    },
+    {
+        "R16_385_A3.tif",
+        T4_X_RESOLUTION_R16,
+        T4_Y_RESOLUTION_STANDARD,
+        4864,
+        1556
+    },
+    {
+        "R8_77_A3.tif",
+        T4_X_RESOLUTION_R8,
+        T4_Y_RESOLUTION_FINE,
+        2432,
+        3111
+    },
+    {
+        "R16_77_A3.tif",
+        T4_X_RESOLUTION_R16,
+        T4_Y_RESOLUTION_FINE,
+        4864,
+        3111
+    },
+    {
+        "R8_154_A3.tif",
+        T4_X_RESOLUTION_R8,
+        T4_Y_RESOLUTION_SUPERFINE,
+        2432,
+        6222
+    },
+    {
+        "R16_154_A3.tif",
+        T4_X_RESOLUTION_R16,
+        T4_Y_RESOLUTION_SUPERFINE,
+        4864,
+        6222
+    },
+    {
+        NULL,
+        0,
+        0,
+        0,
+        0
+    },
+};
+
+int main(int argc, char *argv[])
+{
+    int row;
+    uint8_t image_buffer[1024];
+    TIFF *tiff_file;
+    struct tm *tm;
+    time_t now;
+    char buf[133];
+    float x_resolution;
+    float y_resolution;
+    int i;
+
+    for (i = 0;  sequence[i].name;  i++)
+    {
+        if ((tiff_file = TIFFOpen(sequence[i].name, "w")) == NULL)
+            exit(2);
+
+        /* Prepare the directory entry fully before writing the image, or libtiff complains */
+        TIFFSetField(tiff_file, TIFFTAG_COMPRESSION, COMPRESSION_CCITT_T6);
+        TIFFSetField(tiff_file, TIFFTAG_IMAGEWIDTH, sequence[i].width);
+        TIFFSetField(tiff_file, TIFFTAG_BITSPERSAMPLE, 1);
+        TIFFSetField(tiff_file, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
+        TIFFSetField(tiff_file, TIFFTAG_SAMPLESPERPIXEL, 1);
+        TIFFSetField(tiff_file, TIFFTAG_ROWSPERSTRIP, -1L);
+        TIFFSetField(tiff_file, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+        TIFFSetField(tiff_file, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
+        TIFFSetField(tiff_file, TIFFTAG_FILLORDER, FILLORDER_LSB2MSB);
+    
+        x_resolution = sequence[i].x_res/100.0f;
+        y_resolution = sequence[i].y_res/100.0f;
+        TIFFSetField(tiff_file, TIFFTAG_XRESOLUTION, floorf(x_resolution*2.54f + 0.5f));
+        TIFFSetField(tiff_file, TIFFTAG_YRESOLUTION, floorf(y_resolution*2.54f + 0.5f));
+        TIFFSetField(tiff_file, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
+    
+        TIFFSetField(tiff_file, TIFFTAG_SOFTWARE, "spandsp");
+        if (gethostname(buf, sizeof(buf)) == 0)
+            TIFFSetField(tiff_file, TIFFTAG_HOSTCOMPUTER, buf);
+    
+        TIFFSetField(tiff_file, TIFFTAG_IMAGEDESCRIPTION, "Blank test image");
+        TIFFSetField(tiff_file, TIFFTAG_MAKE, "soft-switch.org");
+        TIFFSetField(tiff_file, TIFFTAG_MODEL, "test data");
+
+        time(&now);
+        tm = localtime(&now);
+        sprintf(buf,
+    	        "%4d/%02d/%02d %02d:%02d:%02d",
+                tm->tm_year + 1900,
+                tm->tm_mon + 1,
+                tm->tm_mday,
+                tm->tm_hour,
+                tm->tm_min,
+                tm->tm_sec);
+        TIFFSetField(tiff_file, TIFFTAG_DATETIME, buf);
+    
+        TIFFSetField(tiff_file, TIFFTAG_IMAGELENGTH, sequence[i].length);
+        TIFFSetField(tiff_file, TIFFTAG_PAGENUMBER, 0, 1);
+        TIFFSetField(tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
+        TIFFSetField(tiff_file, TIFFTAG_IMAGEWIDTH, sequence[i].width);
+
+        /* Write the image first.... */
+        for (row = 0;  row < sequence[i].length;  row++)
+        {
+            memset(image_buffer, 0, sequence[i].width/8 + 1);
+            if (TIFFWriteScanline(tiff_file, image_buffer, row, 0) < 0)
+            {
+                printf("Write error at row %d.\n", row);
+                exit(2);
+            }
+        }
+        /* ....then the directory entry, and libtiff is happy. */
+        TIFFWriteDirectory(tiff_file);
+        TIFFClose(tiff_file);
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/libspandsp.vcproj	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,661 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="libspandsp"
+	ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
+	RootNamespace="libspandsp"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="src; src\spandsp; src\msvc"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				ModuleDefinitionFile="src/msvc/spandsp.def"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="src; src\spandsp; src\msvc"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				ModuleDefinitionFile="src/msvc/spandsp.def"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath=".\src\adsi.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\async.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\awgn.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\bert.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\complex_dds.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\complex_filters.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\dds.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\ec_disable_tone.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\echo.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\fax.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\fsk.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\g722_decode.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\g722_encode.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\g726.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\msvc\gettimeofday.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\hdlc.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\ima_adpcm.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\logging.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\modem_echo.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\noise.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\oki_adpcm.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\playout.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\plc.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\power_meter.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\queue.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\schedule.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\sig_tone.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\super_tone_rx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\super_tone_tx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\t30.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\t31.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\t35.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\t38_gateway.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\t38_ifppacket.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\t38_terminal.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\t4.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\testcpuid.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\time_scale.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\tone_detect.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\tone_generate.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v17rx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v17tx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v22bis_rx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v22bis_tx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v27ter_rx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v27ter_tx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v29rx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v29tx.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v42.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v42bis.c"
+				>
+			</File>
+			<File
+				RelativePath=".\src\v8.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath=".\src\spandsp\adsi.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\alaw_ulaw.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\arctan2.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\async.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\awgn.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\bert.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\biquad.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\complex.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\complex_filters.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\dc_restore.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\dds.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\ec_disable_detector.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\ec_disable_tone.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\echo.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\fax.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\faxfont.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\fir.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\fsk.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\g168models.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\g722.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\g726.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\hdlc.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\ima_adpcm.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\msvc\inttypes.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\logging.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\mmx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\modem_echo.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\noise.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\oki_adpcm.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\oss.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\playout.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\plc.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\power_meter.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\queue.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\schedule.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\sig_tone.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\super_tone_rx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\super_tone_tx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\t30.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\t30_fcf.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\t31.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\t35.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\t38.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\t4.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\t4states.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\telephony.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\msvc\tgmath.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\msvc\sys\time.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\time_scale.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\timing.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\tone_detect.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\tone_generate.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\msvc\unistd.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v17rx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v17tx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v22bis.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v27ter_rx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v27ter_tx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v29rx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v29tx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v42.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v42bis.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\v8.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\spandsp\vector.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/libtool	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,7147 @@
+#! /bin/sh
+
+# libtoolT - Provide generalized library-building support services.
+# Generated automatically by  (GNU spandsp 0.0.3)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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 of the License, 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., 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
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED="/bin/sed"
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="/bin/sed -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=" CXX"
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host bunny:
+
+# Shell to use when invoking shell scripts.
+SHELL="/bin/sh"
+
+# Whether or not to build shared libraries.
+build_libtool_libs=yes
+
+# Whether or not to build static libraries.
+build_old_libs=yes
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=no
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=no
+
+# Whether or not to optimize for fast installation.
+fast_install=yes
+
+# The host system.
+host_alias=
+host=i686-pc-linux-gnu
+host_os=linux-gnu
+
+# The build system.
+build_alias=
+build=i686-pc-linux-gnu
+build_os=linux-gnu
+
+# An echo program that does not interpret backslashes.
+echo="echo"
+
+# The archiver.
+AR="ar"
+AR_FLAGS="cru"
+
+# A C compiler.
+LTCC="gcc"
+
+# A language-specific compiler.
+CC="gcc"
+
+# Is the compiler the GNU C compiler?
+with_gcc=yes
+
+# An ERE matcher.
+EGREP="grep -E"
+
+# The linker used to build libraries.
+LD="/usr/bin/ld"
+
+# Whether we need hard or soft links.
+LN_S="ln -s"
+
+# A BSD-compatible nm program.
+NM="/usr/bin/nm -B"
+
+# A symbol stripping program
+STRIP="strip"
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=file
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="dlltool"
+
+# Used on cygwin: object dumper.
+OBJDUMP="objdump"
+
+# Used on cygwin: assembler.
+AS="as"
+
+# The name of the directory that contains temporary libtool files.
+objdir=.libs
+
+# How to create reloadable object files.
+reload_flag=" -r"
+reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
+
+# How to pass a linker flag through the compiler.
+wl="-Wl,"
+
+# Object file suffix (normally "o").
+objext="o"
+
+# Old archive suffix (normally "a").
+libext="a"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='.so'
+
+# Executable file suffix (normally "").
+exeext=""
+
+# Additional compiler flags for building library objects.
+pic_flag=" -fPIC -DPIC"
+pic_mode=default
+
+# What is the maximum length of a command?
+max_cmd_len=32768
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o="yes"
+
+# Must we lock files when doing compilation?
+need_locks="no"
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=no
+
+# Do we need a version for libraries?
+need_version=no
+
+# Whether dlopen is supported.
+dlopen_support=unknown
+
+# Whether dlopen of programs is supported.
+dlopen_self=unknown
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=unknown
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag="-static"
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=" -fno-builtin"
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec="\${wl}--export-dynamic"
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=""
+
+# Library versioning type.
+version_type=linux
+
+# Format of library name prefix.
+libname_spec="lib\$name"
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
+
+# The coded name of the library, if different from the real name.
+soname_spec="\${libname}\${release}\${shared_ext}\$major"
+
+# Commands used to build and install an old-style archive.
+RANLIB="ranlib"
+old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
+old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
+old_postuninstall_cmds=""
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=""
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=""
+
+# Commands used to build and install a shared archive.
+archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
+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"
+postinstall_cmds=""
+postuninstall_cmds=""
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=""
+module_expsym_cmds=""
+
+# Commands to strip libraries.
+old_striplib="strip --strip-debug"
+striplib="strip --strip-unneeded"
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=""
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=""
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=""
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=""
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=""
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method="pass_all"
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd="\$MAGIC_CMD"
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=""
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=""
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=""
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe="sed -n -e 's/^.*[ 	]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ 	][ 	]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
+
+# This is the shared library runtime path variable.
+runpath_var=LD_RUN_PATH
+
+# This is the shared library path variable.
+shlibpath_var=LD_LIBRARY_PATH
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=no
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=immediate
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=yes
+
+# Flag to hardcode $libdir into a binary during linking.
+# This must work even if $libdir does not exist.
+hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
+
+# If ld is used when linking, flag to hardcode $libdir into
+# a binary during linking. This must work even if $libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=""
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=""
+
+# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=no
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=no
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=unsupported
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=no
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="PATH  LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=unknown
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=" /usr/lib/gcc/i486-linux-gnu/4.0.3/ /usr/lib/gcc/i486-linux-gnu/4.0.3/ /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.0.3/ /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../i486-linux-gnu/lib/ /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../i486-linux-gnu/4.0.3/ /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../ /lib/i486-linux-gnu/4.0.3/ /lib/ /usr/lib/i486-linux-gnu/4.0.3/ /usr/lib/"
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/atlas "
+
+# Fix the shell variable $srcfile for the compiler.
+fix_srcfile_path=""
+
+# Set to yes if exported symbols are required.
+always_export_symbols=no
+
+# The commands to list exported symbols.
+export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=""
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+
+# Symbols that must always be exported.
+include_expsyms=""
+
+# ### END LIBTOOL CONFIG
+
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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 of the License, 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., 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
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.16
+TIMESTAMP=" (1.1220.2.235 2005/04/25 18:13:26)"
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
+  setopt NO_GLOB_SUBST
+fi
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+quote_scanset='[[~#^*{};<>?'"'"' 	]'
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+      if test "X$win32_nmres" = "Ximport" ; then
+        win32_libid_type="x86 archive import"
+      else
+        win32_libid_type="x86 archive static"
+      fi
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	case $arg in
+	  *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	    # Double-quote args containing other shell metacharacters.
+	    case $arg in
+	      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    CC_quoted="$CC_quoted $arg"
+	  done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xdir="$my_gentop/$my_xlib"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $status
+      fi
+      case $host in
+      *-darwin*)
+	$show "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	if test -z "$run"; then
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+	  if test -n "$darwin_arches"; then 
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      lipo -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    ${rm}r unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd "$darwin_orig_dir"
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	fi # $run
+      ;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit $EXIT_FAILURE
+	;;
+      esac
+
+      case $tagname in
+      CC)
+	# Don't test for the "default" C tag, as we know, it's there, but
+	# not specially marked.
+	;;
+      *)
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+	  taglist="$taglist $tagname"
+	  # Evaluate the configuration.
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+	else
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
+	fi
+	;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $?
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $?
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    $echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $echo "enable shared libraries"
+    else
+      $echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $echo "enable static libraries"
+    else
+      $echo "disable static libraries"
+    fi
+    exit $?
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag) prevopt="--tag" prev=tag ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case "$arg_mode" in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
+
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
+	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	qlibobj="\"$qlibobj\"" ;;
+    esac
+    if test "X$libobj" != "X$qlibobj"; then
+	$echo "$modename: libobj name \`$libobj' may not contain shell special characters."
+	exit $EXIT_FAILURE
+    fi
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+      $echo "$srcfile" > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+	$show "$mkdir ${xdir}$objdir"
+	$run $mkdir ${xdir}$objdir
+	status=$?
+	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $status
+	fi
+      fi
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	$show "$mv $output_obj $lobj"
+	if $run $mv $output_obj $lobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static)
+	if test "X$arg" = "X-all-static"; then
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	else
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	fi
+	build_libtool_libs=no
+	build_old_libs=yes
+	prefer_static_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat $save_arg`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		# If there is no directory component, then add one.
+		case $arg in
+		*/* | *\\*) . $arg ;;
+		*) . ./$arg ;;
+		esac
+
+		if test -z "$pic_object" || \
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none && \
+		   test "$non_pic_object" = none; then
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+
+		# Extract subdirectory from the argument.
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		if test "X$xdir" = "X$arg"; then
+		  xdir=
+		else
+		  xdir="$xdir/"
+		fi
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs="$libobjs $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if test -z "$run"; then
+		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+		  exit $EXIT_FAILURE
+		else
+		  # Dry-run case.
+
+		  # Extract subdirectory from the argument.
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		  if test "X$xdir" = "X$arg"; then
+		    xdir=
+		  else
+		    xdir="$xdir/"
+		  fi
+
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+		  libobjs="$libobjs $pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      fi
+	    done
+	  else
+	    $echo "$modename: link input file \`$save_arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	shrext)
+  	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+        darwin_framework)
+	  compiler_flags="$compiler_flags $arg"
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
+	  exit $EXIT_FAILURE
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework)
+        prev=darwin_framework
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-mingw* | *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs -framework System"
+	    continue
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+	compile_command="$compile_command $arg"
+	compiler_flags="$compiler_flags $arg"
+	finalize_command="$finalize_command $arg"
+	prev=xcompiler
+	continue
+	;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	compiler_flags="$compiler_flags $arg"
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        if test "$with_gcc" = "yes" ; then
+          compiler_flags="$compiler_flags $arg"
+        fi
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  # If there is no directory component, then add one.
+	  case $arg in
+	  */* | *\\*) . $arg ;;
+	  *) . ./$arg ;;
+	  esac
+
+	  if test -z "$pic_object" || \
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none && \
+	     test "$non_pic_object" = none; then
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$arg"; then
+	    xdir=
+ 	  else
+	    xdir="$xdir/"
+	  fi
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs="$libobjs $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if test -z "$run"; then
+	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+	    exit $EXIT_FAILURE
+	  else
+	    # Dry-run case.
+
+	    # Extract subdirectory from the argument.
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$arg"; then
+	      xdir=
+	    else
+	      xdir="$xdir/"
+	    fi
+
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+	    libobjs="$libobjs $pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    valid_a_lib=no
+	    case $deplibs_check_method in
+	      match_pattern*)
+		set dummy $deplibs_check_method
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+		if eval $echo \"$deplib\" 2>/dev/null \
+		    | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		  valid_a_lib=yes
+		fi
+		;;
+	      pass_all)
+		valid_a_lib=yes
+		;;
+            esac
+	    if test "$valid_a_lib" != yes; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
+	      $echo "*** I have the capability to make that library automatically link in when"
+	      $echo "*** you link to this library.  But I can only do this if you have a"
+	      $echo "*** shared version of the library, which you do not appear to have"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
+	    else
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit $EXIT_FAILURE
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+	        case "$tmp_libs " in
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	        esac
+              fi
+	      tmp_libs="$tmp_libs $deplib"
+	    done
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath " in
+	      *" $dir "*) ;;
+	      *" $absdir "*) ;;
+	      *) temp_rpath="$temp_rpath $dir" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	if test -n "$library_names" &&
+	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on
+	  # some systems (darwin)
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$extract_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$old_archive_from_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against
+		    # it, someone is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case "$libdir" in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit $EXIT_FAILURE
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case "$libdir" in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $echo "*** I have the capability to make that library automatically link in when"
+	    $echo "*** you link to this library.  But I can only do this if you have a"
+	    $echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$echo
+		$echo "*** However, this would only work if libtool was able to extract symbol"
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$echo "*** not find such a program.  So, this module is probably useless."
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    convenience="$convenience $dir/$old_library"
+	    old_convenience="$old_convenience $dir/$old_library"
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="$absdir/$objdir"
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit $EXIT_FAILURE
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="$absdir"
+		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs,
+		  # but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		    fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		  fi
+		  path=""
+		  ;;
+		*)
+		  path="-L$path"
+		  ;;
+		esac
+		;;
+	      -l*)
+		case $host in
+		*-*-darwin*)
+		  # Again, we only want to link against shared libraries
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		  for tmp in $newlib_search_path ; do
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
+		      break
+		    fi
+		  done
+		  path=""
+		  ;;
+		*) continue ;;
+		esac
+		;;
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit $EXIT_FAILURE
+	else
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor - 1`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix | nonstopux)
+	  major=`expr $current - $age + 1`
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=.`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$echo "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+	         then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	if test -n "$removelist"; then
+	  $show "${rm}r $removelist"
+	  $run ${rm}r $removelist
+	fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      for path in $notinst_path; do
+	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+      done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs -framework System"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+ 	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  $LTCC -o conftest conftest.c $deplibs
+	  if test "$?" -eq 0 ; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" -ne "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; then
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $echo
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
+		    $echo "*** I have the capability to make that library automatically link in when"
+		    $echo "*** you link to this library.  But I can only do this if you have a"
+		    $echo "*** shared version of the library, which I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		$rm conftest
+		$LTCC -o conftest conftest.c $i
+		# Did it work?
+		if test "$?" -eq 0 ; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval \\$echo \"$libname_spec\"`
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		    set dummy $deplib_matches
+		    deplib_match=$2
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $echo
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
+		      $echo "*** I have the capability to make that library automatically link in when"
+		      $echo "*** you link to this library.  But I can only do this if you have a"
+		      $echo "*** shared version of the library, which you do not appear to have"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $echo
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $echo "***  make it link in!  You will probably need to install it or some"
+		  $echo "*** library that it depends on before this library will be fully"
+		  $echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | ${SED} 10q \
+			 | $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
+	    | grep . >/dev/null; then
+	    $echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $echo
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $echo "*** a static module, that should work as long as the dlopening"
+	    $echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $echo
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $echo "*** not find such a program.  So, this module is probably useless."
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
+	    $echo "*** automatically added whenever a program is linked with this library"
+	    $echo "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	realname="$2"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	  fi
+	fi
+	
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
+	else
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise.
+	  $echo "creating reloadable object files..."
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  delfiles=
+	  last_robj=
+	  k=1
+	  output=$output_objdir/$output_la-${k}.$objext
+	  # Loop over the list of objects to be linked.
+	  for obj in $save_libobjs
+	  do
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+	    if test "X$objlist" = X ||
+	       { len=`expr "X$test_cmds" : ".*"` &&
+		 test "$len" -le "$max_cmd_len"; }; then
+	      objlist="$objlist $obj"
+	    else
+	      # The command $test_cmds is almost too long, add a
+	      # command to the queue.
+	      if test "$k" -eq 1 ; then
+		# The first file doesn't have a previous command to add.
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+	      else
+		# All subsequent reloadable object files will link in
+		# the last one created.
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+	      fi
+	      last_robj=$output_objdir/$output_la-${k}.$objext
+	      k=`expr $k + 1`
+	      output=$output_objdir/$output_la-${k}.$objext
+	      objlist=$obj
+	      len=1
+	    fi
+	  done
+	  # Handle the remaining objects by creating one last
+	  # reloadable object file.  All subsequent reloadable object
+	  # files will link in the last one created.
+	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+	  # Set up a command to remove the reloadable object files
+	  # after they are used.
+	  i=0
+	  while test "$i" -lt "$k"
+	  do
+	    i=`expr $i + 1`
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+	  done
+
+	  $echo "creating a temporary reloadable object file: $output"
+
+	  # Loop through the commands generated above and execute them.
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $concat_cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    cmds=$archive_expsym_cmds
+	  else
+	    cmds=$archive_cmds
+	    fi
+	  fi
+
+	  # Append the command to remove the reloadable object files
+	  # to the just-reset $cmds.
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $run eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	cmds=$reload_cmds
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    if test -n "$export_symbols_regex"; then
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$outputname.exp"
+	      $run $rm $export_symbols
+	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	    else
+	      $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+"
+
+	    case $host in
+	    *cygwin* | *mingw* )
+	  $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+	      ;;
+	    * )
+	  $echo >> "$output_objdir/$dlsyms" "\
+const struct {
+"
+	      ;;
+	    esac
+
+
+	  $echo >> "$output_objdir/$dlsyms" "\
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case $dir in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
+	    cwrapper=`$echo ${output}.exe`
+	    $rm $cwrappersource $cwrapper
+	    trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  newargz[0] = "$SHELL";
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+  newargz[1] = fnqualify(argv[0]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha (name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+  size_t size;
+  char *p;
+  char tmp[LT_PATHMAX + 1];
+
+  assert(path != NULL);
+
+  /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha (path[0]) && path[1] == ':')
+    return xstrdup (path);
+#endif
+  if (IS_DIR_SEPARATOR (path[0]))
+    return xstrdup (path);
+
+  /* prepend the current directory */
+  /* doesn't handle '~' */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+  p = XMALLOC(char, size);
+  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+  return p;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+	  # we should really use a build-platform specific compiler
+	  # here, but OTOH, the wrappers (shell script and this C one)
+	  # are only useful if you want to execute the "real" binary.
+	  # Since the "real" binary is built for $host, then this
+	  # wrapper might as well be built for $host, too.
+	  $run $LTCC -s -o $cwrapper $cwrappersource
+	  ;;
+	esac
+	$rm $output
+	trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      exec \$progdir/\$program \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      exit $EXIT_FAILURE
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $echo "copying selected object files to avoid basename conflicts..."
+
+	  if test -z "$gentop"; then
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    status=$?
+	    if test "$status" -ne 0 && test ! -d "$gentop"; then
+	      exit $status
+	    fi
+	  fi
+
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		counter=`expr $counter + 1`
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      $run ln "$obj" "$gentop/$newobj" ||
+	      $run cp "$obj" "$gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+
+	eval cmds=\"$old_archive_cmds\"
+
+	if len=`expr "X$cmds" : ".*"` &&
+	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  $echo "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  for obj in $save_oldobjs
+	  do
+	    oldobjs="$objlist $obj"
+	    objlist="$objlist $obj"
+	    eval test_cmds=\"$old_archive_cmds\"
+	    if len=`expr "X$test_cmds" : ".*"` &&
+	       test "$len" -le "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest="$arg"
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) prev="-f" ;;
+      -g) prev="-g" ;;
+      -m) prev="-m" ;;
+      -o) prev="-o" ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*) ;;
+
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest="$arg"
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+	test "X$dir" = "X$file/" && dir=
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  cmds=$postinstall_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin*|*mingw*)
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case $lib in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir="/tmp"
+	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
+	      tmpdir="$tmpdir/libtool-$$"
+	      save_umask=`umask`
+	      umask 0077
+	      if $mkdir "$tmpdir"; then
+	        umask $save_umask
+	      else
+	        umask $save_umask
+		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+		continue
+	      fi
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyways
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  cmds=$finish_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $echo "----------------------------------------------------------------------"
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $echo "   $libdir"
+    done
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "----------------------------------------------------------------------"
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      if test "${save_LC_ALL+set}" = set; then
+	LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+	LANG="$save_LANG"; export LANG
+      fi
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+	  if test "$mode" = uninstall; then
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      cmds=$postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      cmds=$old_postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+	  # Read the .lo file
+	  . $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" \
+	     && test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" \
+	     && test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+		    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+		    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+		    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $?
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# Libtool was configured on host bunny:
+
+# Shell to use when invoking shell scripts.
+SHELL="/bin/sh"
+
+# Whether or not to build shared libraries.
+build_libtool_libs=yes
+
+# Whether or not to build static libraries.
+build_old_libs=yes
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=no
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=no
+
+# Whether or not to optimize for fast installation.
+fast_install=yes
+
+# The host system.
+host_alias=
+host=i686-pc-linux-gnu
+host_os=linux-gnu
+
+# The build system.
+build_alias=
+build=i686-pc-linux-gnu
+build_os=linux-gnu
+
+# An echo program that does not interpret backslashes.
+echo="echo"
+
+# The archiver.
+AR="ar"
+AR_FLAGS="cru"
+
+# A C compiler.
+LTCC="gcc"
+
+# A language-specific compiler.
+CC="g++"
+
+# Is the compiler the GNU C compiler?
+with_gcc=yes
+
+# An ERE matcher.
+EGREP="grep -E"
+
+# The linker used to build libraries.
+LD="/usr/bin/ld"
+
+# Whether we need hard or soft links.
+LN_S="ln -s"
+
+# A BSD-compatible nm program.
+NM="/usr/bin/nm -B"
+
+# A symbol stripping program
+STRIP="strip"
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=file
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="dlltool"
+
+# Used on cygwin: object dumper.
+OBJDUMP="objdump"
+
+# Used on cygwin: assembler.
+AS="as"
+
+# The name of the directory that contains temporary libtool files.
+objdir=.libs
+
+# How to create reloadable object files.
+reload_flag=" -r"
+reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
+
+# How to pass a linker flag through the compiler.
+wl="-Wl,"
+
+# Object file suffix (normally "o").
+objext="o"
+
+# Old archive suffix (normally "a").
+libext="a"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='.so'
+
+# Executable file suffix (normally "").
+exeext=""
+
+# Additional compiler flags for building library objects.
+pic_flag=" -fPIC -DPIC"
+pic_mode=default
+
+# What is the maximum length of a command?
+max_cmd_len=32768
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o="yes"
+
+# Must we lock files when doing compilation?
+need_locks="no"
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=no
+
+# Do we need a version for libraries?
+need_version=no
+
+# Whether dlopen is supported.
+dlopen_support=unknown
+
+# Whether dlopen of programs is supported.
+dlopen_self=unknown
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=unknown
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag="-static"
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=" -fno-builtin"
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec="\${wl}--export-dynamic"
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=""
+
+# Library versioning type.
+version_type=linux
+
+# Format of library name prefix.
+libname_spec="lib\$name"
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
+
+# The coded name of the library, if different from the real name.
+soname_spec="\${libname}\${release}\${shared_ext}\$major"
+
+# Commands used to build and install an old-style archive.
+RANLIB="ranlib"
+old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
+old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
+old_postuninstall_cmds=""
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=""
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=""
+
+# Commands used to build and install a shared archive.
+archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
+archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
+postinstall_cmds=""
+postuninstall_cmds=""
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=""
+module_expsym_cmds=""
+
+# Commands to strip libraries.
+old_striplib="strip --strip-debug"
+striplib="strip --strip-unneeded"
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects="/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.0.3/crtbeginS.o"
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects="/usr/lib/gcc/i486-linux-gnu/4.0.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/crtn.o"
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=""
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path="-L/usr/lib/gcc/i486-linux-gnu/4.0.3 -L/usr/lib/gcc/i486-linux-gnu/4.0.3 -L/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib -L/usr/lib/gcc/i486-linux-gnu/4.0.3/../../.. -L/lib/../lib -L/usr/lib/../lib"
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method="pass_all"
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd="\$MAGIC_CMD"
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=""
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=""
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=""
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe="sed -n -e 's/^.*[ 	]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ 	][ 	]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
+
+# This is the shared library runtime path variable.
+runpath_var=LD_RUN_PATH
+
+# This is the shared library path variable.
+shlibpath_var=LD_LIBRARY_PATH
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=no
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=immediate
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=yes
+
+# Flag to hardcode $libdir into a binary during linking.
+# This must work even if $libdir does not exist.
+hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
+
+# If ld is used when linking, flag to hardcode $libdir into
+# a binary during linking. This must work even if $libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=""
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=""
+
+# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=no
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=no
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=no
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=unknown
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=" /usr/lib/gcc/i486-linux-gnu/4.0.3/ /usr/lib/gcc/i486-linux-gnu/4.0.3/ /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.0.3/ /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../i486-linux-gnu/lib/ /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../i486-linux-gnu/4.0.3/ /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../ /lib/i486-linux-gnu/4.0.3/ /lib/ /usr/lib/i486-linux-gnu/4.0.3/ /usr/lib/"
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/atlas "
+
+# Fix the shell variable $srcfile for the compiler.
+fix_srcfile_path=""
+
+# Set to yes if exported symbols are required.
+always_export_symbols=no
+
+# The commands to list exported symbols.
+export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=""
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=""
+
+# Symbols that must always be exported.
+include_expsyms=""
+
+# ### END LIBTOOL TAG CONFIG: CXX
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/spandsp.spec	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,72 @@
+Summary:   Steve's DSP library for telephony spans.
+Name:      spandsp
+Version:   0.0.3
+Release:   1
+License:   GPL
+URL:       http://www.soft-switch.org/spandsp
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Source:    http://www.soft-switch.org/spandsp/spandsp-0.0.3.tar.gz
+
+Group:     System Environment/Libraries
+Obsoletes: spandsp
+Docdir:    %{_prefix}/doc
+
+%description
+spandsp is a library for DSP in telephony spans. It can perform many of the
+common DSP functions, such as the generation and detection of DTMF and
+supervisory tones.
+
+%package devel
+Summary:   header files and libraries needed for development with spandsp.
+Group:     Development/Libraries
+Requires:  spandsp = %{version}
+Obsoletes: spandsp-devel
+PreReq:    /sbin/install-info
+
+%description devel
+This package includes the header files and libraries needed for
+developing programs using spandsp.
+
+%prep
+%setup
+
+automake
+%build
+CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%_prefix --sysconfdir=/etc
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make prefix=$RPM_BUILD_ROOT/%{_prefix} sysconfdir=$RPM_BUILD_ROOT/etc install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post   -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-, root, root)
+
+%{_prefix}/lib/lib*.so.*
+
+%files devel
+%defattr(-, root, root)
+
+%{_prefix}/lib/lib*.a
+%{_prefix}/lib/lib*.la
+%{_prefix}/lib/lib*.so
+%{_prefix}/include/*
+
+%{_prefix}/share/%{name}/global-tones.xml
+%{_prefix}/share/%{name}/tones.dtd
+
+%changelog
+%changelog
+* Sat Oct 16 2004 Steve Underwood <steveu@coppice.org> 0.0.2-1
+- Preparing for 0.0.2 release
+
+* Thu Apr 15 2004 Steve Underwood <steveu@coppice.org> 0.0.1-1
+- Initial version
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/spandsp.spec.in	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,72 @@
+Summary:   Steve's DSP library for telephony spans.
+Name:      @PACKAGE@
+Version:   @VERSION@
+Release:   1
+License:   GPL
+URL:       http://www.soft-switch.org/spandsp
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Source:    http://www.soft-switch.org/spandsp/@PACKAGE@-@VERSION@.tar.gz
+
+Group:     System Environment/Libraries
+Obsoletes: spandsp
+Docdir:    %{_prefix}/doc
+
+%description
+spandsp is a library for DSP in telephony spans. It can perform many of the
+common DSP functions, such as the generation and detection of DTMF and
+supervisory tones.
+
+%package devel
+Summary:   header files and libraries needed for development with spandsp.
+Group:     Development/Libraries
+Requires:  spandsp = %{version}
+Obsoletes: spandsp-devel
+PreReq:    /sbin/install-info
+
+%description devel
+This package includes the header files and libraries needed for
+developing programs using spandsp.
+
+%prep
+%setup
+
+automake
+%build
+CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%_prefix --sysconfdir=/etc
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make prefix=$RPM_BUILD_ROOT/%{_prefix} sysconfdir=$RPM_BUILD_ROOT/etc install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post   -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-, root, root)
+
+%{_prefix}/lib/lib*.so.*
+
+%files devel
+%defattr(-, root, root)
+
+%{_prefix}/lib/lib*.a
+%{_prefix}/lib/lib*.la
+%{_prefix}/lib/lib*.so
+%{_prefix}/include/*
+
+%{_prefix}/share/%{name}/global-tones.xml
+%{_prefix}/share/%{name}/tones.dtd
+
+%changelog
+%changelog
+* Sat Oct 16 2004 Steve Underwood <steveu@coppice.org> 0.0.2-1
+- Preparing for 0.0.2 release
+
+* Thu Apr 15 2004 Steve Underwood <steveu@coppice.org> 0.0.1-1
+- Initial version
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/spandsp/global-tones.xml	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,7334 @@
+<?xml version="1.0"?>
+<!DOCTYPE global-tones SYSTEM "../tones.dtd">
+<global-tones>
+  <tone-set country="Albania" uncode="al">
+    <dial-tone>
+      <step freq="425"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.3"/>
+        <step length="0.3"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.15"/>
+        <step length="0.15"/>
+      </step>
+    </congestion-tone>
+  </tone-set>
+  <tone-set country="Algeria" uncode="dz">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="25 || 50" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Angola" uncode="ao">
+    <dial-tone>
+      <step freq="400" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="25" level="-12" length="1.0"/>
+        <step length="5.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="400" level="-12" length="1.0"/>
+      <step length="5.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Anguilla" uncode="ai">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="3">
+        <step freq="350+440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step length="0.65"/>
+      <step length="0.2"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="1">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="10.0"/>
+      </step>
+      <step length="0.5"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1143" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Antigua and Barbuda" uncode="ag">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step recorded-announcement="true"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="1">
+        <step freq="480" level="-12" length="0.5"/>
+        <step length="10.0"/>
+        <step freq="480" level="-12" length="0.5"/>
+      </step>
+    </waiting-tone>
+    <test-number-tone>
+      <step freq="1004" level="-12"/>
+    </test-number-tone>
+  </tone-set>
+  <tone-set country="Argentina" uncode="ar">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.3"/>
+        <step length="0.2"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.3"/>
+        <step length="0.4"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step cycles="5">
+        <step freq="1400" level="-12" length="0.1"/>
+        <step length="1.9"/>
+      </step>
+    </warning-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.2"/>
+      <step length="0.4"/>
+      <step length="4.0"/>
+    </waiting-tone>
+    <call-waiting-tone>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="10.0"/>
+    </call-waiting-tone>
+    <end-of-three-party-service-tone>
+      <step cycles="1">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+      </step>
+    </end-of-three-party-service-tone>
+    <service-activated-tone>
+      <step freq="425" level="-12" length="1.0"/>
+      <step length="0.25"/>
+    </service-activated-tone>
+  </tone-set>
+  <tone-set country="Aruba" uncode="aw">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+        <step length="1.0"/>
+      </step>
+    </number-unobtainable-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="4.4"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Ascension Islands" uncode="??">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="440" level="-12" length="0.8"/>
+      <step length="6.0"/>
+      <step freq="440" level="-12" length="0.2"/>
+      <step length="6.0"/>
+      <step freq="440" level="-12" length="0.2"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Australia" uncode="au">
+    <dial-tone>
+      <step freq="400+450" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="PABX">
+      <step freq="154" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="383+417" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="383+417" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+        <step freq="400" level="-22" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="1.0"/>
+      <step length="15.0"/>
+      <step freq="525" level="-12" length="0.36"/>
+      <step length="15.0"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.1"/>
+      <step length="0.1"/>
+      <step freq="525" level="-12" length="0.1"/>
+      <step length="4.7"/>
+    </waiting-tone>
+    <record-tone>
+      <step cycles="endless">
+        <step freq="1400" level="-12" length="0.425"/>
+        <step length="14.525"/>
+      </step>
+    </record-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.075"/>
+      <step length="0.15"/>
+      <step freq="750+1450" level="-12" length="0.075"/>
+      <step length="2.7"/>
+    </payphone-recognition-tone>
+    <facilities-tone>
+      <step freq="425" level="-12"/>
+    </facilities-tone>
+    <offering-tone>
+      <step freq="525" level="-12" length="0.1"/>
+      <step length="0.1"/>
+    </offering-tone>
+  </tone-set>
+  <tone-set country="Austria" uncode="at">
+    <dial-tone>
+      <step freq="420 || 450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="380+420" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step freq="420" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="420 || 450" level="-12" length="1.0"/>
+        <step length="5.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="420" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <busy-tone domain="analogue">
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.3"/>
+        <step length="0.3"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="420" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone domain="analogue">
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.3"/>
+        <step length="0.3"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="420 || 450" level="-12" length="0.15"/>
+      <step length="0.15"/>
+      <step freq="420 || 450" level="-12" length="0.15"/>
+      <step length="1.95"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+        <step length="1.0"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="420" level="-12" length="0.04"/>
+      <step length="1.95"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1336" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1633" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <positive-indication-tone>
+      <step freq="380+420" level="-12" length="1.0"/>
+      <step length="5.0"/>
+    </positive-indication-tone>
+    <negative-indication-tone>
+      <step freq="380+420" level="-12" length="0.4"/>
+      <step length="0.4"/>
+    </negative-indication-tone>
+  </tone-set>
+  <tone-set country="Bahamas" uncode="bs">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480 || 400+440 || 400" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480 || 400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+        <step freq="620 || 400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+        <step freq="420 || 400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Bahrain" uncode="bh">
+    <dial-tone>
+      <step freq="330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440 || 450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="440 || 450" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="400" level="-12" length="0.225"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <intercept-tone>
+      <step freq="450 || 425+475" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </intercept-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.06"/>
+      <step length="0.06"/>
+    </route-tone>
+    <payphone-recognition-tone>
+      <step freq="816+1209" level="-12" length="0.125"/>
+      <step length="1.5"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Barbados" uncode="bb">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step cycles="2">
+        <step freq="350+440" level="-12" length="1.0"/>
+        <step length="1.0"/>
+      </step>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="3">
+        <step freq="350+440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+  </tone-set>
+  <tone-set country="Belarus" uncode="by">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.8"/>
+        <step length="3.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Belgium" uncode="be">
+    <dial-tone>
+      <step freq="425 || 450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second" domain="analogue">
+      <step freq="900" level="-12" length="0.333"/>
+      <step freq="1020" level="-12" length="0.333"/>
+      <step freq="1140" level="-12" length="0.333"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.167"/>
+        <step length="0.167"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="900" level="-12" length="0.333"/>
+      <step freq="1380" level="-12" length="0.333"/>
+      <step freq="1860" level="-12" length="0.333"/>
+    </special-information-tone>
+  </tone-set>
+  <tone-set country="Benin" uncode="bj">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Bermuda" uncode="bm">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step cycles="6">
+          <step freq="200 || 400" level="-12" length="0.5"/>
+          <step length="0.5"/>
+        </step>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="2">
+        <step freq="440" level="-12" length="1.0"/>
+        <step length="10.0"/>
+      </step>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Bhutan" uncode="bt">
+    <dial-tone>
+      <step freq="400+25" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+25" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+25" level="-12" length="0.4"/>
+        <step length="2.6"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.6"/>
+        <step length="0.6"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="400" level="-12" length="0.5"/>
+      <step length="0.25"/>
+    </waiting-tone>
+    <offering-tone>
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.6"/>
+    </offering-tone>
+  </tone-set>
+  <tone-set country="Botswana" uncode="bw">
+    <dial-tone>
+      <step freq="350+450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400 || 450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400 || 450" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.16"/>
+      <step length="2.0"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="1.0"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.07"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Brazil" uncode="br">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="PABX">
+      <step freq="425" level="-12" length="0.975"/>
+      <step length="0.05"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.75"/>
+        <step length="0.25"/>
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="1.0"/>
+    </waiting-tone>
+    <executive-override-tone>
+      <step freq="750" level="-12" length="0.02"/>
+      <step length="1.0"/>
+    </executive-override-tone>
+    <function-acknowledge-tone>
+      <step freq="425" level="-12" length="0.1"/>
+      <step length="0.1"/>
+      <step length="0.1"/>
+      <step length="2.0"/>
+    </function-acknowledge-tone>
+    <pay-tone>
+      <step freq="300" level="-12" length="0.75"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="British Virgin Islands" uncode="vg">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="3">
+        <step freq="350+440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step length="0.65"/>
+      <step length="0.2"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="1">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="10.0"/>
+        <step length="0.5"/>
+      </step>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1143" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Brunei Darussalam" uncode="bn">
+    <dial-tone>
+      <step freq="350+450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="transmission">
+      <step freq="1000" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.3"/>
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="400" level="-12" length="0.25"/>
+      <step length="2.0"/>
+    </warning-tone>
+    <warning-tone type="end-of-period">
+      <step freq="400" level="-12" length="0.624"/>
+      <step length="4.376"/>
+    </warning-tone>
+    <warning-tone type="pip-tone">
+      <step freq="900" level="-12" length="0.25"/>
+      <step length="0.25"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="376+424" level="-12" length="0.5"/>
+    </waiting-tone>
+    <confirmation-tone>
+      <step freq="376+424" level="-12" length="0.1"/>
+      <step length="0.1"/>
+      <step freq="376+424" level="-12" length="0.3"/>
+      <step length="0.3"/>
+    </confirmation-tone>
+    <holding-tone>
+      <step freq="376+424" level="-12" length="0.5"/>
+      <step length="2.5"/>
+    </holding-tone>
+  </tone-set>
+  <tone-set country="Bulgaria" uncode="bg">
+    <dial-tone>
+      <step freq="425" level="-12" length="0.25"/>
+      <step length="0.3"/>
+      <step freq="425" level="-12" length="0.7"/>
+      <step length="0.8"/>
+    </dial-tone>
+    <dial-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.75"/>
+        <step freq="425" level="-12" length="0.75"/>
+        <step length="1.0"/>
+      </step>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="9.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.83"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="0.25"/>
+      <step length="0.15"/>
+      <step length="1.15"/>
+    </warning-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.3"/>
+      <step length="0.2"/>
+      <step length="1.5"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="1800" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+        <step length="1.0"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Burkina Faso" uncode="bf">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="analogue">
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone domain="analogue">
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone domain="analogue">
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone domain="analogue">
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="2.4"/>
+        <step length="2.4"/>
+      </step>
+    </congestion-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+    <route-tone domain="analogue">
+      <step freq="425" level="-12" length="0.04"/>
+      <step length="0.04"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Burundi" uncode="bi">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.7"/>
+        <step length="3.3"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="150" level="-12" length="0.5"/>
+      <step length="0.5"/>
+      <step freq="450" level="-12" length="0.5"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.5"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Cameroon" uncode="cm">
+    <dial-tone>
+      <step freq="440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="330 || 440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.7"/>
+        <step length="3.3"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Canada" uncode="ca">
+    <dial-tone>
+      <step freq="480+720 || 350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="PABX">
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall" domain="PABX">
+      <step freq="350+440" level="-12" length="0.1"/>
+      <step length="0.1"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <executive-override-tone domain="PABX">
+      <step freq="440" level="-12" length="3.0"/>
+    </executive-override-tone>
+    <intercept-tone domain="PABX">
+      <step freq="440" level="-12" length="0.25"/>
+      <step length="0.25"/>
+      <step freq="620" level="-12" length="0.25"/>
+      <step length="0.25"/>
+    </intercept-tone>
+    <confirmation-tone domain="PABX">
+      <step cycles="2">
+        <step freq="350+440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-12" length="0.1"/>
+    </confirmation-tone>
+  </tone-set>
+  <tone-set country="Cayman Islands" uncode="ky">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Central African Republic" uncode="cf">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="330+425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.7"/>
+        <step length="3.3"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+    <pay-tone>
+      <step freq="12000" level="-12" length="0.15"/>
+      <step length="0.15"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="Channel Islands: Jersey" uncode="??">
+    <dial-tone>
+      <step freq="350+450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="400" level="-12" length="0.225"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="400" level="-12" length="0.1"/>
+      <step length="2.5"/>
+      <step freq="400" level="-12" length="0.1"/>
+    </waiting-tone>
+    <pay-tone>
+      <step freq="400" level="-12" length="0.125"/>
+      <step length="0.125"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="Chile" uncode="cl">
+    <dial-tone>
+      <step freq="400" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="1400" level="-12" length="0.5"/>
+      <step length="15.0"/>
+    </warning-tone>
+    <waiting-tone>
+      <step freq="900+1300" level="-12" length="0.5"/>
+      <step length="0.5"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <identification-tone>
+      <step freq="800" level="-12" length="0.6"/>
+      <step length="2.0"/>
+      <step freq="1200" level="-12" length="0.6"/>
+      <step length="2.0"/>
+    </identification-tone>
+    <warning-tone type="end-of-period">
+      <step freq="800" level="-12" length="2.0"/>
+    </warning-tone>
+  </tone-set>
+  <tone-set country="China" uncode="cn">
+    <dial-tone>
+      <step freq="450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.35"/>
+        <step length="0.35"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.7"/>
+        <step length="0.7"/>
+      </step>
+    </congestion-tone>
+    <intrusion-tone>
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.6"/>
+    </intrusion-tone>
+    <special-information-tone>
+      <step freq="450" level="-12" length="0.4"/>
+      <step length="0.04"/>
+    </special-information-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.4"/>
+      <step length="10.0"/>
+    </special-information-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step cycles="3">
+          <step freq="450" level="-12" length="0.1"/>
+          <step length="0.1"/>
+        </step>
+        <step freq="450" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="450" level="-12" length="0.4"/>
+      <step length="4.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Comoros" uncode="km">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="850" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.71"/>
+        <step length="3.31"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Costa Rica" uncode="cr">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.2"/>
+        <step length="4.6"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.3"/>
+        <step length="0.3"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Croatia" uncode="hr">
+    <dial-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.3"/>
+      <step freq="425" level="-12" length="0.7"/>
+      <step length="0.8"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.04"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-20" length="0.2"/>
+      <step length="0.3"/>
+      <step freq="425" level="-20" length="0.7"/>
+      <step length="0.8"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+        <step length="1.0"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="8.0"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step cycles="4">
+        <step freq="1206" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="850" level="-12" length="0.2"/>
+        <step length="2.0"/>
+      </step>
+    </payphone-recognition-tone>
+    <positive-indication-tone>
+      <step freq="425" level="-12"/>
+    </positive-indication-tone>
+    <negative-indication-tone>
+      <step freq="425" level="-12" length="0.25"/>
+      <step length="0.25"/>
+    </negative-indication-tone>
+  </tone-set>
+  <tone-set country="Cuba" uncode="cu">
+    <dial-tone>
+      <step freq="480+720 || 425" level="-12"/>
+    </dial-tone>
+    <dial-tone>
+      <step freq="425" level="-12" length="0.75"/>
+      <step length="0.75"/>
+      <step freq="425" level="-12" length="0.25"/>
+      <step length="0.25"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="330+425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="1050" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480 || 440+620 || 480+620" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="380+460" level="-12" length="1.0"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+720 || 620+480 || 425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+720" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="0.03"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="520" level="-12" length="0.4"/>
+        <step cycles="2">
+          <step length="0.12"/>
+          <step freq="520" level="-12" length="0.12"/>
+        </step>
+        <step length="0.12"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Cyprus" uncode="cy">
+    <dial-tone>
+      <step freq="350+450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.5"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="375+425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="375+425" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="1400" level="-12" length="0.5"/>
+      <step length="14.0"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.6"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1638" level="-12" length="0.068"/>
+      <step length="0.068"/>
+      <step freq="1206" level="-12" length="0.068"/>
+      <step length="0.068"/>
+      <step freq="943" level="-12" length="0.068"/>
+      <step length="0.068"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Czech Republic" uncode="cz">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone>
+      <step freq="425" level="-12" length="0.333"/>
+      <step length="0.333"/>
+      <step freq="425" level="-12" length="0.66"/>
+      <step length="0.66"/>
+    </dial-tone>
+    <dial-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.165"/>
+        <step length="0.165"/>
+        <step freq="425" level="-12" length="0.660"/>
+        <step length="0.660"/>
+      </step>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.333"/>
+        <step length="0.333"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.167"/>
+        <step length="0.167"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.165"/>
+        <step length="0.165"/>
+        <step freq="425" level="-12" length="0.165"/>
+        <step length="0.330"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.333"/>
+      <step length="5.0"/>
+    </waiting-tone>
+    <connection-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </connection-tone>
+    <offering-tone>
+      <step freq="425" level="-12" length="0.333"/>
+      <step length="0.333"/>
+      <step freq="425" level="-12" length="0.333"/>
+      <step length="1.5"/>
+    </offering-tone>
+  </tone-set>
+  <tone-set country="Denmark" uncode="dk">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="150" level="-12" length="0.05"/>
+      <step length="0.5"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+        <step length="1.0"/>
+      </step>
+    </number-unobtainable-tone>
+    <pay-tone>
+      <step freq="950" level="-12" length="0.22"/>
+      <step freq="1400" level="-12" length="0.22"/>
+      <step freq="1800" level="-12" length="0.22"/>
+      <step length="1.0"/>
+    </pay-tone>
+    <payphone-recognition-tone>
+      <step freq="1477+941" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1400+950" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Diego Garcia" uncode="??">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="interrupted at 60 ipm"/>
+      </step>
+    </busy-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="interrupted at 120 ipm"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Djibouti" uncode="dj">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Dominica (Commonwealth of)" uncode="dm">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="3">
+        <step freq="350+440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="450" level="-12" length="0.65"/>
+      <step length="0.2"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="1">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="10.0"/>
+        <step length="0.5"/>
+      </step>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1143" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Dominican Republic" uncode="do">
+    <dial-tone>
+      <step freq="50" level="-12"/>
+    </dial-tone>
+    <dial-tone>
+      <step freq="33" level="-12" length="0.0166"/>
+      <step length="0.0166"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400 || 450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400 || 450" level="-12" length="0.4"/>
+        <step length="2.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.8"/>
+        <step length="0.8"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.8"/>
+        <step length="0.8"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Ecuador" uncode="ec">
+    <dial-tone>
+      <step freq="425" level="-12" length="15.0"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.2"/>
+        <step length="4.65"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.333"/>
+        <step length="0.333"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.333"/>
+        <step length="0.333"/>
+      </step>
+    </congestion-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.6"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Egypt" uncode="eg">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="375+475" level="-12" length="2.0"/>
+        <step length="1.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="375+475" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+    </special-information-tone>
+    <intrusion-tone>
+      <step freq="450" level="-12" length="0.5"/>
+      <step length="0.5"/>
+    </intrusion-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="El Salvador" uncode="sv">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.2"/>
+        <step length="5.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.333"/>
+        <step length="0.333"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Estonia" uncode="ee">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.3"/>
+        <step length="0.3"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.3"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="1.3"/>
+    </warning-tone>
+    <waiting-tone>
+      <step freq="950" level="-12" length="0.33"/>
+      <step freq="1400" level="-12" length="0.33"/>
+      <step freq="1800" level="-12" length="0.33"/>
+      <step length="0.3"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Ethiopia" uncode="et">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <intrusion-tone>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.2"/>
+    </intrusion-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.6"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Falkland Islands" uncode="fk">
+    <dial-tone>
+      <step freq="350+450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="400" level="-12" length="0.255"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="1000" level="-12" length="0.1"/>
+      <step length="0.1"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Faroe Islands" uncode="fo">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Fiji" uncode="fj">
+    <dial-tone>
+      <step freq="33 || 50" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="PABX">
+      <step freq="33.33" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="116.33+149.67 || 375+425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="116.33+149.67 || 375+425" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="383.33+416.67" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="383.33+416.67" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="400" level="-12" length="0.5"/>
+      <step length="0.17"/>
+      <step freq="400" level="-12" length="0.17"/>
+      <step length="0.17"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <number-unobtainable-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Finland" uncode="fi">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="PABX">
+      <step cycles="2">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.3"/>
+      </step>
+      <step length="0.2"/>
+      <step length="0.8"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="0.65"/>
+      <step length="0.025"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.3"/>
+        <step length="0.3"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.3"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="1.3"/>
+    </warning-tone>
+    <queue-tone>
+      <step freq="950" level="-12" length="0.65"/>
+      <step length="0.325"/>
+      <step freq="950" level="-12" length="0.325"/>
+      <step length="1.3"/>
+      <step freq="1400" level="-12" length="2.6"/>
+    </queue-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="0.15"/>
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="8.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="France" uncode="fr">
+    <dial-tone>
+      <step freq="330+440 || 440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="French Polynesia" uncode="pf">
+    <dial-tone>
+      <step freq="440 || 330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Gabon" uncode="ga">
+    <dial-tone>
+      <step freq="440" level="-12" length="15.0"/>
+    </dial-tone>
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="330+440" level="-12" length="7.0"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="900" level="-12" length="0.35"/>
+      <step freq="1380" level="-12" length="0.30"/>
+      <step freq="1860" level="-12" length="0.35"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Gambia" uncode="gm">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Germany" uncode="de">
+    <dial-tone>
+      <step freq="425 || 450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="400+425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.25"/>
+        <step length="4.0"/>
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.5"/>
+        <step length="4.0"/>
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="5.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="1.0"/>
+        <step length="9.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.48"/>
+        <step length="0.48"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.15"/>
+        <step length="0.475"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.24"/>
+        <step length="0.24"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.15"/>
+        <step length="0.475"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425 || 450" level="-12" length="0.24"/>
+      <step length="0.24"/>
+      <step freq="425 || 450" level="-12" length="0.24"/>
+      <step length="1.28"/>
+    </warning-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="5.0"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step cycles="5">
+        <step freq="1633" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="1336" level="-12" length="0.2"/>
+        <step length="2.0"/>
+      </step>
+    </payphone-recognition-tone>
+    <payphone-recognition-tone>
+      <step cycles="5">
+        <step freq="1366" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="1024" level="-12" length="0.2"/>
+        <step length="2.2"/>
+      </step>
+    </payphone-recognition-tone>
+    <payphone-recognition-tone>
+      <step cycles="6">
+        <step freq="1336" level="-12" length="2.2"/>
+        <step length="0.2"/>
+        <step freq="1024" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </payphone-recognition-tone>
+    <payphone-recognition-tone>
+      <step cycles="5">
+        <step freq="1645+857" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="1215+935" level="-12" length="0.2"/>
+        <step length="2.0"/>
+      </step>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Ghana" uncode="gh">
+    <dial-tone>
+      <step freq="400" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.075"/>
+        <step length="0.1"/>
+        <step freq="400" level="-12" length="0.075"/>
+        <step length="0.1"/>
+        <step freq="400" level="-12" length="0.075"/>
+        <step length="0.4"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="400" level="-12" length="0.5"/>
+      <step length="0.3"/>
+      <step freq="400" level="-12" length="0.2"/>
+      <step length="0.3"/>
+      <step freq="400" level="-12" length="0.2"/>
+      <step length="3.0"/>
+    </waiting-tone>
+    <holding-tone>
+      <step freq="400" level="-12" length="0.5"/>
+      <step length="0.5"/>
+      <step freq="400" level="-12" length="0.5"/>
+      <step length="0.25"/>
+    </holding-tone>
+  </tone-set>
+  <tone-set country="Gibraltar" uncode="gi">
+    <dial-tone>
+      <step freq="350+400" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="400" level="-12" length="0.225"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="400" level="-12" length="0.1"/>
+      <step length="3.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Greece" uncode="gr">
+    <dial-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.2"/>
+        <step length="0.3"/>
+        <step freq="425 || 450" level="-12" length="0.7"/>
+        <step length="0.8"/>
+      </step>
+    </dial-tone>
+    <dial-tone type="special">
+      <step cycles="endless">
+        <step freq="400 || 425" level="-12" length="0.2"/>
+        <step length="0.3"/>
+        <step freq="425 || 450" level="-12" length="0.7"/>
+        <step length="0.8"/>
+      </step>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.3"/>
+        <step length="0.3"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.15"/>
+        <step length="0.15"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.33"/>
+      <step freq="1450" level="-12" length="0.33"/>
+      <step freq="1800" level="-12" length="0.33"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="10.0"/>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="10.0"/>
+    </waiting-tone>
+    <intrusion-tone>
+      <step freq="425 || 450" level="-12" length="0.15"/>
+      <step length="0.25"/>
+      <step freq="425 || 450" level="-12" length="0.15"/>
+      <step length="1.45"/>
+    </intrusion-tone>
+    <holding-tone>
+      <step freq="900" level="-12" length="0.5"/>
+      <step length="0.5"/>
+    </holding-tone>
+    <valid-tone-radio-paging>
+      <step freq="450" level="-12" length="0.1"/>
+      <step length="0.1"/>
+      <step freq="450" level="-12" length="0.1"/>
+      <step length="0.7"/>
+    </valid-tone-radio-paging>
+    <number-unobtainable-tone domain="radio-paging">
+      <step cycles="endless">
+        <step freq="450" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Greenland" uncode="gl">
+    <dial-tone>
+      <step freq="445 || 425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="445 || 425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="445 || 425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="445 || 425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="445 || 425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+      </step>
+    </number-unobtainable-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+    <pay-tone>
+      <step freq="950" level="-12" length="0.22"/>
+      <step freq="1400" level="-12" length="0.22"/>
+      <step freq="1800" level="-12" length="0.22"/>
+      <step length="1.0"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="Grenada" uncode="gd">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="460+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step recorded-announcement="true"/>
+      </step>
+    </congestion-tone>
+  </tone-set>
+  <tone-set country="Guadeloupe (French Dep.)" uncode="gp">
+    <dial-tone>
+      <step freq="440 || 330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Guiana (French Dep.)" uncode="gf">
+    <dial-tone>
+      <step freq="440 || 330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Guinea" uncode="gn">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Guyana" uncode="gy">
+    <dial-tone>
+      <step freq="360+400" level="-12" length="1.3"/>
+      <step length="0.3"/>
+      <step freq="360+400" level="-12" length="0.2"/>
+      <step length="0.5"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.75"/>
+        <step length="3.25"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <waiting-tone>
+      <step freq="480" level="-12" length="0.5"/>
+      <step length="18.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Honduras" uncode="hn">
+    <dial-tone>
+      <step freq="440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="440" level="-12" length="0.135"/>
+      <step length="0.135"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="4.0"/>
+        <step freq="440" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <waiting-tone>
+      <step freq="440" level="-12" length="0.5"/>
+      <step length="0.5"/>
+      <step freq="440" level="-12" length="0.2"/>
+      <step length="2.7"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Hong Kong" uncode="hk">
+    <dial-tone>
+      <step freq="350+440 [1%]" level="-13 [-15 -5]" recognition-length="0.3"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="3">
+        <step freq="350+440 [1%]" level="-13 [-15 -5]" length="0.1 [10%]"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440 [1%]" level="-13 [-15 -5]" recognition-length="0.3"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480 [1%]" level="-13" length="0.4 [10%]"/>
+        <step length="0.2 [10%]"/>
+        <step freq="440+480 [1%]" level="-13" length="0.4 [10%]"/>
+        <step length="3.0 [10%]" recognition-length="0.6"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620 [1%]" level="-13" length="0.5 [10%]"/>
+        <step length="0.5 [10%]"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620 [1%]" level="-13" length="0.25 [10%]"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step freq="480+620 [1%]" level="-13" recognition-length="0.9"/>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="endless">
+        <step cycles="3">
+          <step freq="440 [1%]" level="-10" length="0.5 [10%]"/>
+          <step length="0.5 [10%]"/>
+        </step>
+        <step length="8.0 [10%]" recognition-length="1.0"/>
+      </step>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Hungary" uncode="hu">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="350+375+400" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.2"/>
+        <step length="3.7"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.3"/>
+        <step length="0.3"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="0.3"/>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="1.5"/>
+    </warning-tone>
+    <waiting-tone>
+      <step freq="425+450" level="-12" length="0.3"/>
+      <step length="0.3"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1100" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <positive-indication-tone>
+      <step freq="300+420" level="-12" length="1.0"/>
+      <step length="0.2"/>
+      <step recorded-announcement="true"/>
+    </positive-indication-tone>
+    <negative-indication-tone>
+      <step freq="300+420" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step recorded-announcement="true"/>
+    </negative-indication-tone>
+    <offering-tone>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="0.3"/>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="1.5"/>
+    </offering-tone>
+  </tone-set>
+  <tone-set country="Iceland" uncode="is">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.04"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.2"/>
+        <step length="4.7"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step recorded-announcement="true"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.6"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="5.0"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1633" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1209" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="India" uncode="in">
+    <dial-tone>
+      <step freq="33 || 50 || 375+425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="375+425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="375+425" level="-12" length="0.4"/>
+        <step length="2.6"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="133 || 375+425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="133 || 375+425" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.6"/>
+        <step length="0.6"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Indonesia" uncode="id">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.33"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="2.0"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <payphone-recognition-tone>
+      <step freq="1200" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="800" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <offering-tone>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.5"/>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="1.0"/>
+    </offering-tone>
+  </tone-set>
+  <tone-set country="Iran" uncode="ir">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="400+425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+    </special-information-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="10.0"/>
+    </waiting-tone>
+    <holding-tone>
+      <step freq="950" level="-12" length="0.65"/>
+      <step length="0.325"/>
+      <step freq="950" level="-12" length="0.325"/>
+      <step length="1.3"/>
+      <step freq="1400" level="-12" length="2.6"/>
+    </holding-tone>
+    <offering-tone>
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="0.25"/>
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="1.45"/>
+    </offering-tone>
+    <preemption-tone>
+      <step cycles="3">
+        <step freq="1400" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+    </preemption-tone>
+    <permanent-signal-tone>
+      <step freq="1400" level="-12"/>
+    </permanent-signal-tone>
+  </tone-set>
+  <tone-set country="Iraq" uncode="iq">
+    <dial-tone type="recall">
+      <step freq="133" level="-12" length="0.4"/>
+      <step length="0.2"/>
+      <step freq="133" level="-12" length="0.4"/>
+      <step length="1.5"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="1.0"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Ireland" uncode="ie">
+    <dial-tone>
+      <step freq="400+425+450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400 || 450 || 400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400 || 450 || 400+450" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400 || 425" level="-12" length="6.0"/>
+        <step length="1.0"/>
+      </step>
+    </number-unobtainable-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.06"/>
+      <step length="0.06"/>
+    </route-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Israel" uncode="il">
+    <dial-tone>
+      <step freq="400 || 425 || 440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step cycles="3">
+        <step freq="400 || 440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="400 || 440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="3">
+        <step freq="400 || 440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="400 || 440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="400" level="-12" length="1.0"/>
+      <step length="0.25"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400 || 425 || 440" level="-12" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400 || 425 || 440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="975" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+      <step recorded-announcement="true"/>
+    </special-information-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="975" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+        <step length="1.0"/>
+        <step recorded-announcement="true"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="1">
+        <step freq="400 || 440" level="-12" length="0.15"/>
+        <step length="10.0"/>
+        <step freq="400 || 440" level="-12" length="0.15"/>
+      </step>
+    </waiting-tone>
+    <call-waiting-tone>
+      <step cycles="2">
+        <step freq="400 || 440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="400 || 440" level="-12" length="0.6"/>
+      <step length="3.0"/>
+    </call-waiting-tone>
+    <confirmation-tone>
+      <step cycles="1">
+        <step freq="400 || 440" level="-12" length="0.15"/>
+        <step length="0.15"/>
+        <step freq="400 || 440" level="-12" length="0.3"/>
+      </step>
+    </confirmation-tone>
+    <confirmation-tone>
+      <step freq="400" level="-12" length="0.04"/>
+      <step length="0.04"/>
+    </confirmation-tone>
+    <payphone-recognition-tone>
+      <step freq="1209" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="452" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <search-tone>
+      <step freq="1004" level="-12" length="0.01"/>
+      <step length="1.0"/>
+    </search-tone>
+    <holding-tone>
+      <step freq="400" level="-12" length="0.05"/>
+      <step length="2.0"/>
+    </holding-tone>
+  </tone-set>
+  <tone-set country="Italy" uncode="it">
+    <dial-tone>
+      <step freq="425" level="-12" length="0.6"/>
+      <step length="1.0"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Ivory Coast" uncode="ci">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="50 || 375+475" level="-12" length="1.66"/>
+        <step length="3.33"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Jamaica" uncode="jm">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="1.5"/>
+        <step length="4.5"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400 || 133" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400 || 133" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.3"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.2"/>
+        <step length="0.3"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="3.0"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <record-tone>
+      <step freq="480+620" level="-12" length="0.25"/>
+      <step length="0.25"/>
+    </record-tone>
+  </tone-set>
+  <tone-set country="Japan" uncode="jp">
+    <dial-tone>
+      <step freq="400" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </dial-tone>
+    <dial-tone type="second">
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.125"/>
+        <step length="0.125"/>
+      </step>
+    </dial-tone>
+    <dial-tone type="second">
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.125"/>
+        <step length="0.125"/>
+      </step>
+    </dial-tone>
+    <dial-tone type="second">
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.15"/>
+        <step length="0.15"/>
+      </step>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="384+416" level="-12" length="1.0"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="380+420" level="-12" length="1.0"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="400" level="-12" length="0.1"/>
+      <step length="0.1"/>
+    </special-information-tone>
+    <waiting-tone>
+      <step freq="440" level="-12" length="0.1"/>
+      <step length="0.1"/>
+      <step freq="440" level="-12" length="0.1"/>
+      <step length="1.0"/>
+    </waiting-tone>
+    <waiting-tone>
+      <step freq="384+416" level="-12" length="0.5"/>
+      <step length="0.5"/>
+      <step freq="400" level="-12" length="0.5"/>
+      <step length="2.5"/>
+    </waiting-tone>
+    <call-waiting-tone>
+      <step freq="384+416" level="-12" length="0.5"/>
+      <step length="0.0~4.0"/>
+      <step freq="400" level="-12" length="0.05"/>
+      <step length="0.45"/>
+      <step freq="400" level="-12" length="0.05"/>
+      <step length="3.45"/>
+      <step freq="400" level="-12" length="0.05"/>
+      <step length="0.45"/>
+      <step freq="400" level="-12" length="0.05"/>
+      <step length="3.45"/>
+    </call-waiting-tone>
+    <pay-tone>
+      <step freq="250" level="-12" length="1.0"/>
+    </pay-tone>
+    <pay-tone>
+      <step freq="250" level="-12" length="0.5"/>
+    </pay-tone>
+    <positive-indication-tone>
+      <step freq="400" level="-12" length="0.125"/>
+      <step length="0.125"/>
+      <step freq="400" level="-12" length="0.125"/>
+      <step length="0.625"/>
+    </positive-indication-tone>
+  </tone-set>
+  <tone-set country="Jordan" uncode="jo">
+    <dial-tone>
+      <step freq="380+460 || 400+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="380+460 || 400+440" level="-12" length="1.2"/>
+        <step length="4.8"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="383.33+416.67" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="383.33+416.67" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="380+460 || 400+440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="380+460" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400+440" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+720 || 540+660" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="380+460 || 400+440" level="-12" length="0.5"/>
+      <step cycles="2">
+        <step length="0.3"/>
+        <step freq="380+460 || 400+440" level="-12" length="0.2"/>
+      </step>
+      <step length="3.0"/>
+    </waiting-tone>
+    <confirmation-tone>
+      <step cycles="20">
+        <step freq="400" level="-12" length="0.125"/>
+        <step length="0.125"/>
+      </step>
+      <step freq="400" level="-12"/>
+    </confirmation-tone>
+    <holding-tone>
+      <step freq="380+460 || 400+440" level="-12" length="0.5"/>
+      <step length="0.5"/>
+      <step freq="380+460 || 400+440" level="-12" length="0.5"/>
+      <step length="0.25"/>
+    </holding-tone>
+  </tone-set>
+  <tone-set country="Kenya" uncode="ke">
+    <dial-tone>
+      <step freq="425 || 50" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="425" level="-12" length="1.0"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.75"/>
+      <step length="0.75"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="2.0"/>
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="5.0"/>
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="425" level="-12" length="0.225"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="1.4"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+        <step length="1.0"/>
+      </step>
+    </number-unobtainable-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Kiribati Republic" uncode="kg">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="2.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Korea (Rep. of)" uncode="kr">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step freq="400 || 450" level="-12" length="1.0"/>
+      <step length="4.0"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step freq="400 || 450" level="-12" length="1.0"/>
+      <step length="2.0"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="1.0"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.3"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step cycles="2">
+        <step freq="392" level="-12" length="0.5"/>
+        <step freq="494" level="-12" length="0.5"/>
+        <step freq="587" level="-12" length="1.5"/>
+      </step>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.2"/>
+        <step length="0.1"/>
+        <step freq="450" level="-12" length="0.2"/>
+        <step length="1.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="350+440" level="-12" length="0.25"/>
+      <step length="0.25"/>
+      <step freq="350+440" level="-12" length="0.25"/>
+      <step length="3.25"/>
+    </waiting-tone>
+    <intercept-tone>
+      <step freq="350+440" level="-12" length="0.125"/>
+      <step length="0.25"/>
+      <step freq="350+440" level="-12" length="0.125"/>
+      <step length="1.5"/>
+    </intercept-tone>
+  </tone-set>
+  <tone-set country="Kuwait" uncode="kw">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.04"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="1.0"/>
+      <step length="1.5"/>
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="1.5"/>
+    </warning-tone>
+    <intrusion-tone>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+    </intrusion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <intercept-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </intercept-tone>
+    <line-lockout-tone>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.5"/>
+    </line-lockout-tone>
+    <refusal-tone>
+      <step freq="425" level="-12" length="0.6"/>
+      <step length="0.6"/>
+    </refusal-tone>
+    <acceptance-tone>
+      <step freq="425" level="-12"/>
+    </acceptance-tone>
+  </tone-set>
+  <tone-set country="Kyrgyzstan" uncode="kg">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.8"/>
+        <step length="3.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Lao P.D.R." uncode="la">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.04"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="1.0"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.4"/>
+    </waiting-tone>
+    <confirmation-tone>
+      <step freq="950" level="-12"/>
+    </confirmation-tone>
+  </tone-set>
+  <tone-set country="Lebanon" uncode="lb">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="435" level="-12" length="1.2"/>
+        <step length="4.4"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="435" level="-12" length="0.4"/>
+        <step length="0.2"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Liberia" uncode="lr">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.6"/>
+        <step length="0.2"/>
+        <step cycles="3">
+          <step freq="425" level="-12" length="0.2"/>
+          <step length="0.2"/>
+        </step>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Lithuania" uncode="lt">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.8"/>
+        <step length="3.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <waiting-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Luxembourg" uncode="lu">
+    <dial-tone>
+      <step freq="425 || 450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425 || 450" level="-12" length="0.25"/>
+      <step length="0.25"/>
+      <step length="0.25"/>
+      <step length="1.25"/>
+    </warning-tone>
+    <intercept-tone>
+      <step freq="1190" level="-12" length="0.25"/>
+      <step freq="1280" level="-12" length="0.25"/>
+    </intercept-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Macau" uncode="mo">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="1.8"/>
+      <step length="0.2"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.6"/>
+    </waiting-tone>
+    <intercept-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </intercept-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Madagascar" uncode="mg">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="25" level="-12" length="1.66"/>
+        <step length="3.33"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <waiting-tone>
+      <step freq="450" level="-12" length="0.125"/>
+      <step length="0.125"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Malawi" uncode="mw">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400 || 133" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400 || 133" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="525" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.333"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Malaysia" uncode="my">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="0.25"/>
+      <step length="0.25"/>
+      <step freq="425" level="-12" length="0.25"/>
+      <step length="0.25"/>
+      <step freq="425" level="-12" length="2.0"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="900" level="-12" length="1.0"/>
+      <step freq="1400" level="-12" length="1.0"/>
+      <step freq="1800" level="-12" length="1.0"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+    </warning-tone>
+    <warning-tone type="end-of-period">
+      <step freq="900" level="-12" length="0.1"/>
+      <step length="0.1"/>
+      <step freq="900" level="-12" length="0.1"/>
+      <step length="0.1"/>
+      <step freq="900" level="-12" length="0.1"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="1.0"/>
+      <step length="10.0"/>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.25"/>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="10.0"/>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.25"/>
+    </waiting-tone>
+    <line-lockout-tone>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.5"/>
+    </line-lockout-tone>
+  </tone-set>
+  <tone-set country="Maldives" uncode="mv">
+    <dial-tone>
+      <step freq="350+450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="400" level="-12" length="1.0"/>
+      <step length="10.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Mali" uncode="ml">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="330+425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="0.40"/>
+      <step length="0.04"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.7"/>
+        <step length="3.3"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="900" level="-12" length="0.33"/>
+      <step freq="1400" level="-12" length="0.33"/>
+      <step freq="1800" level="-12" length="0.33"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.04"/>
+    </route-tone>
+    <acceptance-tone>
+      <step freq="950" level="-12"/>
+    </acceptance-tone>
+  </tone-set>
+  <tone-set country="Malta" uncode="mt">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450 || 375+425 || 383.33+416.67" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450 || 375+425 || 383.33+416.67" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="400" level="-12" length="0.225"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <pay-tone>
+      <step freq="400" level="-12" length="0.15"/>
+      <step length="0.15"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="Martinique (French Dep.)" uncode="mq">
+    <dial-tone>
+      <step freq="440 || 330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Mauritania" uncode="mr">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Mauritius" uncode="mu">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Mayotte" uncode="yt">
+    <dial-tone>
+      <step freq="440 || 330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Mexico" uncode="mx">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.17"/>
+      <step freq="425" level="-12" length="0.17"/>
+      <step length="0.17"/>
+    </warning-tone>
+  </tone-set>
+  <tone-set country="Moldova" uncode="md">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.8"/>
+        <step length="3.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </congestion-tone>
+  </tone-set>
+  <tone-set country="Montserrat" uncode="ms">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="3">
+        <step freq="350+440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="450" level="-12" length="0.65"/>
+      <step length="0.2"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="1">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="10.0"/>
+        <step freq="440" level="-12" length="0.5"/>
+      </step>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1143" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Morocco" uncode="ma">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="660" level="-12" length="0.5"/>
+      <step freq="440" level="-12" length="0.5"/>
+      <step freq="590" level="-12" length="0.5"/>
+      <step freq="740" level="-12" length="0.3"/>
+      <step length="0.2"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.66"/>
+        <step length="3.33"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Mozambique" uncode="mz">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="5.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Namibia" uncode="na">
+    <dial-tone>
+      <step freq="407+473" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="407+473" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="407+473" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <payphone-recognition-tone>
+      <step freq="770" level="-12" length="0.125"/>
+      <step freq="1209" level="-12" length="1.5"/>
+    </payphone-recognition-tone>
+    <pay-tone>
+      <step freq="400" level="-12" length="0.125"/>
+      <step length="0.125"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="Nauru" uncode="nr">
+    <dial-tone>
+      <step freq="400" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="PABX">
+      <step freq="33" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall" domain="PABX">
+      <step freq="33" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.25"/>
+        <step freq="400" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Nepal" uncode="np">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.1"/>
+        <step length="3.1"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.175"/>
+        <step length="0.175"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Netherlands" uncode="nl">
+    <dial-tone>
+      <step freq="425 || 450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425 || 450" level="-12" length="0.5"/>
+      <step length="0.05"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <waiting-tone>
+      <step freq="425 || 450" level="-12" length="0.5"/>
+      <step length="9.5"/>
+    </waiting-tone>
+    <pay-tone>
+      <step freq="770 || 850 || 950" level="-12"/>
+    </pay-tone>
+    <positive-indication-tone>
+      <step freq="425 || 450" level="-12"/>
+    </positive-indication-tone>
+    <negative-indication-tone>
+      <step freq="425 || 450" level="-12" length="0.0625"/>
+      <step length="0.0625"/>
+    </negative-indication-tone>
+  </tone-set>
+  <tone-set country="New Caledonia" uncode="nc">
+    <dial-tone>
+      <step freq="440 || 330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="New Zealand" uncode="nz">
+    <dial-tone>
+      <step freq="400" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="900" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step cycles="3">
+          <step freq="400" level="-12" length="0.75"/>
+          <step length="0.1"/>
+        </step>
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.4"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="400+450" level="-12" length="0.5"/>
+    </waiting-tone>
+    <waiting-tone>
+      <step freq="400" level="-12" length="0.25"/>
+      <step length="0.25"/>
+      <step freq="400" level="-12" length="0.25"/>
+      <step length="3.25"/>
+    </waiting-tone>
+    <waiting-tone>
+      <step cycles="3">
+        <step freq="523" level="-12" length="0.2"/>
+        <step length="3.0"/>
+      </step>
+      <step freq="659" level="-12" length="0.2"/>
+    </waiting-tone>
+    <function-acknowledge-tone>
+      <step freq="440+450" level="-12" length="2.0"/>
+      <step length="0.4"/>
+      <step freq="440+450" level="-12" length="0.2"/>
+      <step length="0.4"/>
+    </function-acknowledge-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <holding-tone>
+      <step freq="400" level="-12" length="0.5"/>
+      <step length="0.5"/>
+      <step freq="400+450" level="-12" length="0.5"/>
+      <step length="0.25"/>
+    </holding-tone>
+  </tone-set>
+  <tone-set country="Niger" uncode="ne">
+    <dial-tone>
+      <step freq="440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="330 || 440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.7"/>
+        <step length="3.3"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Nigeria" uncode="ng">
+    <dial-tone>
+      <step freq="400 || 425 || 450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step freq="400 || 425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400 || 425 || 450" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="400 || 33" level="-12" length="0.2"/>
+      <step length="1.5"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="400" level="-12" length="0.15"/>
+      <step length="0.25"/>
+      <step freq="400" level="-12" length="0.15"/>
+      <step length="1.45"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="5.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="2.0"/>
+      <step length="4.0"/>
+    </waiting-tone>
+    <holding-tone>
+      <step freq="950" level="-12" length="0.65"/>
+      <step length="0.325"/>
+      <step freq="950" level="-12" length="0.325"/>
+      <step length="1.3"/>
+      <step freq="1400" level="-12" length="2.6"/>
+    </holding-tone>
+  </tone-set>
+  <tone-set country="Norway" uncode="no">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400 || 450" level="-12" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400 || 450" level="-12" length="0.2"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <payphone-recognition-tone>
+      <step cycles="4">
+        <step freq="1477" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="941" level="-12" length="0.2"/>
+        <step length="2.0"/>
+      </step>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Oman" uncode="om">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.17"/>
+      <step freq="425" level="-12" length="0.17"/>
+      <step length="0.17"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.3"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </waiting-tone>
+    <line-lockout-tone>
+      <step freq="425" level="-12" length="0.48"/>
+      <step length="0.48"/>
+    </line-lockout-tone>
+  </tone-set>
+  <tone-set country="Pakistan" uncode="pk">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="383.33+416.67" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="383.33+416.67" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.4"/>
+        <step length="0.675"/>
+        <step freq="450" level="-12" length="0.13"/>
+        <step length="0.17"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Panama" uncode="pa">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.20"/>
+        <step length="4.65"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.32"/>
+        <step length="4.65"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.32"/>
+        <step length="4.65"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.04"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.18"/>
+      <step length="0.18"/>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.18"/>
+    </warning-tone>
+    <number-unobtainable-tone domain="digital">
+      <step cycles="endless">
+        <step recorded-announcement="true"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Papua New Guinea" uncode="pg">
+    <dial-tone>
+      <step freq="425 || 375+425 || 350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.04"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 375+425 || 383.33+416.67 || 400+450 || 390+430" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="425 || 375+425 || 383.33+416.67 || 400+450 || 390+430" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425 || 400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425 || 400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+        <step freq="425 || 400" level="-22" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.33"/>
+      <step freq="1400" level="-12" length="0.33"/>
+      <step freq="1800" level="-12" length="0.33"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="1400" level="-12" length="0.5"/>
+      <step length="11.5"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425 || 400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.04"/>
+      <step length="10.0"/>
+      <step freq="425" level="-12" length="0.04"/>
+      <step length="20.0"/>
+      <step freq="425" level="-12" length="0.04"/>
+      <step length="20.0"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step cycles="4">
+        <step freq="1209" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="852" level="-12" length="0.2"/>
+        <step length="2.0"/>
+      </step>
+    </payphone-recognition-tone>
+    <payphone-recognition-tone>
+      <step cycles="2">
+        <step freq="1336" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="941" level="-12" length="0.2"/>
+        <step length="2.0"/>
+      </step>
+    </payphone-recognition-tone>
+    <payphone-recognition-tone>
+      <step cycles="2">
+        <step freq="900" level="-12" length="0.075"/>
+        <step length="0.15"/>
+        <step freq="900" level="-12" length="0.075"/>
+        <step length="2.7"/>
+      </step>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Paraguay" uncode="py">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="1.0"/>
+      </step>
+    </busy-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="0.25"/>
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="1.45"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="2.0"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="950" level="-12" length="0.65"/>
+      <step length="0.325"/>
+      <step freq="950" level="-12" length="0.125"/>
+      <step length="1.3"/>
+      <step freq="1400" level="-12" length="2.6"/>
+    </waiting-tone>
+    <positive-indication-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </positive-indication-tone>
+  </tone-set>
+  <tone-set country="Philippines" uncode="ph">
+    <dial-tone>
+      <step freq="480+720 || 425" level="-12"/>
+    </dial-tone>
+    <dial-tone>
+      <step freq="400" level="-12" length="0.2"/>
+      <step length="0.2"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="400+425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="1.0"/>
+        <step length="10.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425+480" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+720 || 425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+720 || 480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+720" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Poland" uncode="pl">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="350+425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="0.15"/>
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="4.0"/>
+    </waiting-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Portugal" uncode="pt">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="analogue">
+      <step freq="400" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="1.0"/>
+      <step length="0.2"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="5.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone domain="analogue">
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="5.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone domain="analogue">
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </number-unobtainable-tone>
+    <number-unobtainable-tone domain="analogue">
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="5.0"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1477" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="941" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Puerto Rico" uncode="pr">
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Qatar" uncode="qa">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="2.2"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400 || 450" level="-12" length="0.8"/>
+        <step length="0.8"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="400" level="-12" length="0.225"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Reunion (French Dep.)" uncode="re">
+    <dial-tone>
+      <step freq="440 || 330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Romania" uncode="ro">
+    <dial-tone>
+      <step freq="400 || 450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="384+416 || 425+475" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="133 || 450" level="-12" length="0.15"/>
+        <step length="0.20"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step cycles="6">
+          <step freq="400 || 450" level="-12" length="0.033"/>
+          <step length="0.03"/>
+        </step>
+        <step length="0.1"/>
+        <step freq="400 || 450" level="-12" length="0.03"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Russia" uncode="ru">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.8"/>
+        <step length="3.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <waiting-tone>
+      <step cycles="1">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+      </step>
+      <step length="1.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Rwandese Republic" uncode="rw">
+    <dial-tone>
+      <step freq="440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="340" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.7"/>
+        <step length="3.3"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step cycles="1">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+      </step>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="St. Helena" uncode="sh">
+    <dial-tone>
+      <step freq="350+400" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.35"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <pay-tone>
+      <step freq="400" level="-12" length="0.125"/>
+      <step length="0.125"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="St. Kitts and Nevis" uncode="kn">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="1">
+        <step freq="350+440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step length="0.65"/>
+      <step length="0.2"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="440" level="-12" length="0.5"/>
+      <step length="10.0"/>
+      <step freq="440" level="-12" length="0.5"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1143" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="St. Lucia" uncode="lc">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.375"/>
+        <step length="0.25"/>
+        <step freq="425" level="-12" length="0.375"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="425+330" level="-12"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.1"/>
+      <step length="4.9"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step recorded-announcement="true"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+    </waiting-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="St. Pierre and Miquelon" uncode="pm">
+    <dial-tone>
+      <step freq="440 || 330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="St. Vincent and the Grenadines" uncode="vc">
+    <dial-tone>
+      <step freq="350+450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.2"/>
+        <step length="0.4"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="400" level="-12" length="0.255"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+  </tone-set>
+  <tone-set country="San Marino" uncode="sm">
+    <dial-tone>
+      <step freq="425" level="-12" length="0.6"/>
+      <step length="1.0"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </busy-tone>
+  </tone-set>
+  <tone-set country="Sao Tome e Principe" uncode="st">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="5.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </number-unobtainable-tone>
+    <pay-tone>
+      <step freq="12000" level="-12"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="Saudi Arabia" uncode="sa">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.2"/>
+        <step length="4.6"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <intrusion-tone>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+    </intrusion-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.6"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="4.0"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1200" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <refusal-tone>
+      <step freq="425" level="-12" length="0.6"/>
+      <step length="0.6"/>
+    </refusal-tone>
+    <acceptance-tone>
+      <step freq="425" level="-12"/>
+    </acceptance-tone>
+  </tone-set>
+  <tone-set country="Senegal" uncode="sn">
+    <dial-tone>
+      <step freq="440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.7"/>
+        <step length="3.3"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Seychelles" uncode="sc">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="425" level="-12" length="0.225"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Sierra Leone" uncode="sl">
+    <dial-tone>
+      <step freq="425 || 450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425 || 450" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="950 || 450" level="-12" length="0.333"/>
+        <step length="0.03"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="1" freq="425" level="-12" length="1.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Singapore" uncode="sg">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="401+449" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="401+449" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.125"/>
+      <step length="0.125"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="3.2"/>
+    </waiting-tone>
+    <intercept-tone>
+      <step freq="425" level="-12" length="0.25"/>
+      <step length="2.0"/>
+    </intercept-tone>
+    <payphone-recognition-tone>
+      <step freq="1206" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="832" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Slovakia" uncode="sk">
+    <dial-tone>
+      <step freq="425" level="-12" length="0.333"/>
+      <step length="0.333"/>
+      <step freq="425" level="-12" length="0.66"/>
+      <step length="0.66"/>
+    </dial-tone>
+    <dial-tone domain="centrex">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step cycles="3">
+        <step freq="425" level="-12" length="0.165"/>
+        <step length="0.165"/>
+      </step>
+      <step freq="425" level="-12" length="0.660"/>
+      <step length="0.660"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.333"/>
+        <step length="0.333"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.165"/>
+        <step length="0.165"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.33"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.333"/>
+      <step length="9.0"/>
+    </waiting-tone>
+    <call-waiting-tone>
+      <step freq="425" level="-12" length="1.0"/>
+      <step length="0.17"/>
+      <step freq="425" level="-12" length="0.333"/>
+      <step length="3.5"/>
+    </call-waiting-tone>
+    <connection-tone>
+      <step freq="1400" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </connection-tone>
+    <offering-tone>
+      <step freq="425" level="-12" length="0.333"/>
+      <step length="0.333"/>
+      <step freq="425" level="-12" length="0.333"/>
+      <step length="1.5"/>
+    </offering-tone>
+    <warning-tone type="conference">
+      <step freq="425" level="-12" length="0.66"/>
+    </warning-tone>
+  </tone-set>
+  <tone-set country="Slovenia" uncode="si">
+    <dial-tone>
+      <step freq="425" level="-12" length="0.7"/>
+      <step length="0.8"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.3"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1600" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+  </tone-set>
+  <tone-set country="Solomon Islands" uncode="sb">
+    <dial-tone>
+      <step freq="400" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.4"/>
+        <step length="0.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.075"/>
+        <step length="0.1"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="400+450" level="-12" length="0.5"/>
+      <step freq="400" level="-12" length="0.5"/>
+    </waiting-tone>
+    <pay-tone>
+      <step freq="852" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="South Africa" uncode="za">
+    <dial-tone>
+      <step freq="367+433" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step cycles="4">
+        <step freq="367+433" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+      <step freq="367+433" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="367+433" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="367+433" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="400" level="-12" length="0.15"/>
+      <step length="0.25"/>
+      <step freq="400" level="-12" length="0.15"/>
+      <step length="1.45"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="3">
+        <step freq="367+433" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+      <step freq="367+433" level="-12" length="0.25"/>
+      <step length="7.25"/>
+    </waiting-tone>
+    <pay-tone>
+      <step freq="900" level="-12" length="0.2"/>
+      <step length="1.8"/>
+    </pay-tone>
+    <payphone-recognition-tone>
+      <step freq="770" level="-12" length="0.125"/>
+      <step freq="1209" level="-12" length="1.5"/>
+    </payphone-recognition-tone>
+    <positive-indication-tone>
+      <step freq="700" level="-12" length="0.25"/>
+      <step length="0.25"/>
+      <step freq="1100" level="-12" length="0.25"/>
+      <step length="0.25"/>
+    </positive-indication-tone>
+    <comfort-tone>
+      <step freq="950" level="-12" length="0.65"/>
+      <step length="0.325"/>
+      <step freq="950" level="-12" length="0.325"/>
+      <step length="1.3"/>
+      <step freq="1400" level="-12" length="2.6"/>
+    </comfort-tone>
+    <notify-tone>
+      <step cycles="3">
+        <step freq="900" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </notify-tone>
+  </tone-set>
+  <tone-set country="Spain" uncode="es">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone>
+      <step freq="600" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="1.0"/>
+      <step length="0.1"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.5"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step cycles="2">
+          <step freq="425" level="-12" length="0.2"/>
+          <step length="0.2"/>
+        </step>
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.6"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.33"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="1400" level="-12" length="0.4"/>
+      <step length="5.0"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.6"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.6"/>
+    </waiting-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.175"/>
+      <step length="0.175"/>
+      <step freq="425" level="-12" length="0.175"/>
+      <step length="3.5"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.05"/>
+      <step length="1.28"/>
+    </payphone-recognition-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.05"/>
+      <step length="0.05"/>
+      <step freq="1600" level="-12" length="0.05"/>
+      <step length="1.55"/>
+    </payphone-recognition-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.05"/>
+      <step length="0.05"/>
+      <step freq="1600" level="-12" length="0.05"/>
+      <step length="0.05"/>
+      <step freq="1600" level="-12" length="0.05"/>
+      <step length="1.5"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Sri Lanka" uncode="lk">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="425" level="-12" length="0.65"/>
+      <step length="0.03"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="4.5"/>
+    </waiting-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Suriname" uncode="sr">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="15.0"/>
+        <step length="0.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+    </special-information-tone>
+  </tone-set>
+  <tone-set country="Swaziland" uncode="sz">
+    <dial-tone>
+      <step freq="50" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="4.8"/>
+        <step length="0.2"/>
+      </step>
+    </number-unobtainable-tone>
+    <payphone-recognition-tone>
+      <step freq="1430" level="-12" length="2.0"/>
+      <step length="2.0"/>
+      <step freq="943" level="-12" length="2.0"/>
+    </payphone-recognition-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <pay-tone>
+      <step freq="900" level="-12" length="0.25"/>
+      <step length="0.25"/>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="Sweden" uncode="se">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.32"/>
+        <step length="0.01"/>
+      </step>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="5.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone domain="analogue">
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="9.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.75"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+      <step recorded-announcement="true"/>
+    </special-information-tone>
+    <special-information-tone domain="analogue">
+      <step cycles="3">
+        <step freq="400" level="-12" length="0.05"/>
+        <step length="0.2"/>
+      </step>
+      <step freq="400" level="-12" length="0.6"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step cycles="endless">
+        <step freq="1400" level="-12" length="0.1"/>
+        <step length="1.5"/>
+      </step>
+    </warning-tone>
+    <warning-tone type="three-party-conference">
+      <step cycles="endless">
+        <step freq="1400" level="-12" length="0.35"/>
+        <step length="15.0"/>
+      </step>
+    </warning-tone>
+    <warning-tone type="time-limit">
+      <step freq="425" level="-12" length="2.0"/>
+      <step length="5.0"/>
+      <step freq="425" level="-12"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+      <step recorded-announcement="true"/>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.5"/>
+      <step freq="425" level="-12" length="0.2"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step cycles="7">
+        <step freq="1633" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="1336" level="-12" length="0.2"/>
+        <step length="4.0"/>
+      </step>
+    </payphone-recognition-tone>
+    <pay-tone>
+      <step cycles="2">
+        <step freq="941" level="-12" length="0.2"/>
+        <step length="0.2"/>
+        <step freq="941" level="-12" length="0.2"/>
+        <step length="3.6"/>
+      </step>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="Switzerland" uncode="ch">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone domain="PABX">
+      <step freq="500" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 500" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <busy-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="500" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <record-tone>
+      <step freq="1400" level="-12" length="0.45"/>
+      <step length="15.0"/>
+    </record-tone>
+    <payphone-recognition-tone>
+      <step freq="800" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1200" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Syria" uncode="sy">
+    <dial-tone>
+      <step freq="450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step freq="450" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425 || 475" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="450 || 50" level="-12" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.44"/>
+        <step length="0.49"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step cycles="2">
+          <step freq="450" level="-12" length="0.2"/>
+          <step length="0.23"/>
+        </step>
+        <step freq="450" level="-12" length="0.2"/>
+        <step length="0.92"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.33"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.9"/>
+        <step length="0.2"/>
+        <step cycles="2">
+          <step freq="450" level="-12" length="0.25"/>
+          <step length="0.2"/>
+        </step>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Tajikistan" uncode="tj">
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.8"/>
+        <step length="3.2"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <waiting-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </waiting-tone>
+  </tone-set>
+  <tone-set country="Tanzania" uncode="tz">
+    <dial-tone>
+      <step freq="50" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step freq="400" level="-12"/>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Thailand" uncode="th">
+    <dial-tone>
+      <step freq="350+450 || 400" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.333"/>
+        <step length="0.333"/>
+      </step>
+    </busy-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="800" level="-12" length="1.0"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step cycles="6">
+          <step freq="400" level="-12" length="0.1"/>
+          <step length="0.9"/>
+        </step>
+        <step freq="400" level="-12" length="0.3"/>
+        <step length="0.7"/>
+      </step>
+    </number-unobtainable-tone>
+    <offering-tone>
+      <step cycles="2">
+        <step freq="400" level="-12" length="0.17"/>
+        <step length="0.83"/>
+      </step>
+      <step freq="400" level="-12" length="0.51"/>
+      <step length="0.49"/>
+    </offering-tone>
+  </tone-set>
+  <tone-set country="Trinidad and Tobago" uncode="tt">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <waiting-tone>
+      <step freq="440" level="-12" length="0.3"/>
+      <step length="10.0"/>
+    </waiting-tone>
+    <re-order-tone>
+      <step freq="480+620" level="-12" length="0.3"/>
+      <step length="0.2"/>
+    </re-order-tone>
+    <re-order-tone>
+      <step freq="480+620" level="-12" length="0.2"/>
+      <step length="0.3"/>
+    </re-order-tone>
+  </tone-set>
+  <tone-set country="Tunisia" uncode="tn">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone>
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.04"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.2"/>
+        <step length="4.6"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="950" level="-12"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.167"/>
+        <step length="0.167"/>
+      </step>
+    </congestion-tone>
+  </tone-set>
+  <tone-set country="Turkey" uncode="tr">
+    <dial-tone>
+      <step freq="450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="350+450" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="450" level="-12" length="1.0"/>
+      <step length="0.25"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step cycles="3">
+          <step freq="450" level="-12" length="0.2"/>
+          <step length="0.2"/>
+        </step>
+        <step freq="450" level="-12" length="0.6"/>
+        <step length="0.2"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="450" level="-12" length="0.6"/>
+      <step length="0.2"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="450" level="-12" length="0.2"/>
+        <step length="0.2"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="350+450 || 450" level="-12" length="0.5"/>
+      <step length="0.5"/>
+      <step freq="350+450 || 450" level="-12" length="2.5"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1000" level="-12" length="0.25"/>
+      <step length="0.25"/>
+      <step freq="1200 || 1330" level="-12" length="0.25"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <confirmation-tone>
+      <step freq="450" level="-12" length="0.04"/>
+      <step length="0.04"/>
+    </confirmation-tone>
+  </tone-set>
+  <tone-set country="Turkmenistan" uncode="tm">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="25" level="-12" length="0.4"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.4"/>
+        <step length="0.4"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.8"/>
+        <step length="4.0"/>
+      </step>
+    </number-unobtainable-tone>
+    <route-tone>
+      <step freq="25" level="-12" length="0.4"/>
+      <step length="0.4"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Turks and Caicos Islands" uncode="tc">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="3">
+        <step freq="350+440" level="-12" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480" level="-12" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="450" level="-12" length="0.65"/>
+      <step length="0.2"/>
+    </warning-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step cycles="1">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="10.0"/>
+        <step length="0.5"/>
+      </step>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1600" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="1143" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Uganda" uncode="ug">
+    <dial-tone>
+      <step freq="33 || 50" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="133+17 || 400+17 || 400+450" level="-12" length="0.25"/>
+        <step length="0.5"/>
+        <step freq="133+17 || 400+17 || 400+450" level="-12" length="0.25"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="United Arab Emirates" uncode="ae">
+    <dial-tone>
+      <step freq="350+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450 || 425" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450 || 425" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400 || 425" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400 || 425" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="400 || 425" level="-12" length="0.225"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400 || 425" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="United Kingdom" uncode="uk">
+    <dial-tone>
+      <step freq="350+440 || 50" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450 || 375+425 || 383.33+416.67" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450 || 375+425 || 383.33+416.67" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.4"/>
+        <step length="0.35"/>
+        <step freq="400" level="-12" length="0.225"/>
+        <step length="0.525"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step freq="400" level="-12"/>
+    </number-unobtainable-tone>
+    <payphone-recognition-tone>
+      <step freq="1200" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="800" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+    <pay-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.125"/>
+        <step length="0.125"/>
+      </step>
+    </pay-tone>
+  </tone-set>
+  <tone-set country="United States" uncode="us">
+    <dial-tone>
+      <step freq="350+440 || 480+720" level="-13 [1.5dB]"/>
+    </dial-tone>
+    <dial-tone domain="PABX">
+      <step freq="350+440 || 480+720" level="-16 [0.75dB]"/>
+    </dial-tone>
+    <dial-tone type="recall">
+      <step cycles="3">
+        <step freq="350+440" level="-13 [1.5dB]" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-13 [1.5dB]"/>
+    </dial-tone>
+    <dial-tone domain="PABX" type="recall">
+      <step cycles="3">
+        <step freq="350+440" level="-16 [0.75dB]" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-16 [0.75dB]"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440+480 || 380+460" level="-19 [1.5dB]" length="2.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="440+480" level="-16 [1.5dB]" length="1.0"/>
+        <step length="3.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="480+620 || 480+720" level="-24 [1.5dB]" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="480+620 || 480+720" level="-21 [1.5dB]" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="480+620 || 480+720" level="-24 [1.5dB]" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <congestion-tone domain="PABX">
+      <step cycles="endless">
+        <step freq="480+620 || 480+720" level="-21 [1.5dB]" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <call-waiting-tone>
+      <step cycles="endless">
+        <step freq="480+620" level="-13 [1.5dB]" length="0.3"/>
+        <step length="10.0"/>
+      </step>
+    </call-waiting-tone>
+    <call-waiting-tone domain="PABX" type="station-call">
+      <step freq="480+620" level="-16 [1.5dB]" length="0.3"/>
+    </call-waiting-tone>
+    <call-waiting-tone domain="PABX" type="outside-call">
+      <step cycles="2">
+        <step freq="480+620" level="-16 [1.5dB]" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+    </call-waiting-tone>
+    <call-waiting-tone domain="PABX" type="urgent-call">
+      <step cycles="3">
+        <step freq="480+620" level="-16 [1.5dB]" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+    </call-waiting-tone>
+    <special-information-tone>
+      <step freq="950" level="-13 [1.5dB]" length="0.33"/>
+      <step freq="1400" level="-13 [1.5dB]" length="0.33"/>
+      <step freq="1800" level="-13 [1.5dB]" length="0.33"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="440" level="-13 [1.5dB]" length="2.0"/>
+      <step length="10.0"/>
+      <step freq="440" level="-13 [1.5dB]" length="0.5"/>
+      <step length="10.0"/>
+    </warning-tone>
+    <warning-tone type="operator-intervening" domain="PABX">
+      <step freq="440" level="-13 [1.5dB]" length="1.5"/>
+      <step length="8.0"/>
+      <step freq="440" level="-13 [1.5dB]" length="0.5"/>
+      <step length="8.0"/>
+    </warning-tone>
+    <waiting-tone domain="PABX">
+      <step freq="440" level="-13 [1.5dB]" length="0.3"/>
+      <step length="10.0"/>
+    </waiting-tone>
+    <record-tone>
+      <step freq="1400" level="-13 [1.5dB]" length="0.5"/>
+      <step length="15.0"/>
+    </record-tone>
+    <executive-override-tone domain="PABX">
+      <step freq="440" level="-14 [1.5dB]" length="3.0"/>
+    </executive-override-tone>
+    <intercept-tone domain="PABX">
+      <step freq="440" level="-13 [1.5dB]" length="0.25"/>
+      <step freq="620" level="-13 [1.5dB]" length="0.25"/>
+    </intercept-tone>
+    <confirmation-tone>
+      <step freq="350+440" level="-13 [1.5dB]" length="0.1"/>
+      <step length="0.1"/>
+      <step freq="350+440" level="-13 [1.5dB]" length="0.3"/>
+    </confirmation-tone>
+    <confirmation-tone domain="PABX">
+      <step cycles="2">
+        <step freq="350+440" level="-16 [1.5dB]" length="0.1"/>
+        <step length="0.1"/>
+      </step>
+      <step freq="350+440" level="-16 [1.5dB]" length="0.1"/>
+    </confirmation-tone>
+  </tone-set>
+  <tone-set country="Uruguay" uncode="uy">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone>
+      <step freq="450" level="-12" length="0.7"/>
+      <step length="0.8"/>
+      <step freq="450" level="-12" length="0.2"/>
+      <step length="0.3"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <warning-tone type="operator-intervening">
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="0.25"/>
+      <step freq="425" level="-12" length="0.15"/>
+      <step length="1.45"/>
+    </warning-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="425" level="-12" length="0.2"/>
+      <step length="4.4"/>
+    </waiting-tone>
+    <positive-indication-tone>
+      <step cycles="2">
+        <step freq="425" level="-12" length="0.1"/>
+        <step length="0.2"/>
+      </step>
+      <step freq="425" level="-12" length="0.1"/>
+      <step length="1.3"/>
+    </positive-indication-tone>
+    <negative-indication-tone>
+      <step freq="425" level="-12" length="0.5"/>
+      <step length="0.5"/>
+    </negative-indication-tone>
+  </tone-set>
+  <tone-set country="Vanuatu" uncode="vu">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <dial-tone type="special">
+      <step freq="425" level="-12" length="0.4"/>
+      <step length="0.04"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450 || 116.33+149.67" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450 || 116.33+149.67" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.75"/>
+        <step length="0.75"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.33"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.33"/>
+      <step length="0.03"/>
+    </special-information-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="425" level="-12" length="0.3"/>
+      <step length="10.0"/>
+    </waiting-tone>
+    <route-tone>
+      <step freq="425" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+    <acceptance-tone>
+      <step freq="950" level="-12"/>
+    </acceptance-tone>
+  </tone-set>
+  <tone-set country="Wallis and Futuna Islands" uncode="wf">
+    <dial-tone>
+      <step freq="440 || 330+440" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="1.5"/>
+        <step length="3.5"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="440" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1400" level="-12" length="0.3"/>
+      <step length="0.03"/>
+      <step freq="1800" level="-12" length="0.3"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <route-tone>
+      <step freq="440" level="-12" length="0.05"/>
+      <step length="0.05"/>
+    </route-tone>
+  </tone-set>
+  <tone-set country="Western Samoa" uncode="ws">
+    <dial-tone>
+      <step freq="425" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450" level="-12" length="0.375"/>
+        <step length="0.25"/>
+        <step freq="400+450" level="-12" length="0.375"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step recorded-announcement="true"/>
+      </step>
+    </congestion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step recorded-announcement="true"/>
+      </step>
+    </number-unobtainable-tone>
+  </tone-set>
+  <tone-set country="Yugoslavia" uncode="yu">
+    <dial-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.7"/>
+        <step length="0.8"/>
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.3"/>
+      </step>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425+475" level="-12" length="1.0"/>
+        <step length="9.0"/>
+      </step>
+    </ringback-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.2"/>
+        <step length="0.4"/>
+      </step>
+    </busy-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+  </tone-set>
+  <tone-set country="Zambia" uncode="zm">
+    <dial-tone>
+      <step freq="425 || 50" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="1.0"/>
+        <step length="4.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.5"/>
+        <step length="0.5"/>
+      </step>
+    </busy-tone>
+    <congestion-tone>
+      <step cycles="endless">
+        <step freq="425" level="-12" length="0.25"/>
+        <step length="0.25"/>
+      </step>
+    </congestion-tone>
+    <special-information-tone>
+      <step freq="950" level="-12" length="0.333"/>
+      <step freq="1400" level="-12" length="0.333"/>
+      <step freq="1800" level="-12" length="0.333"/>
+      <step length="1.0"/>
+    </special-information-tone>
+    <intrusion-tone>
+      <step freq="425" level="-12" length="0.1"/>
+      <step length="4.9"/>
+    </intrusion-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="950" level="-12" length="0.333"/>
+        <step freq="1400" level="-12" length="0.333"/>
+        <step freq="1800" level="-12" length="0.333"/>
+      </step>
+    </number-unobtainable-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+  <tone-set country="Zimbabwe" uncode="zw">
+    <dial-tone>
+      <step freq="400" level="-12"/>
+    </dial-tone>
+    <dial-tone type="second">
+      <step freq="400+450 || 367+433" level="-12"/>
+    </dial-tone>
+    <ringback-tone>
+      <step cycles="endless">
+        <step freq="400+450 || 367+433" level="-12" length="0.4"/>
+        <step length="0.2"/>
+        <step freq="400+450 || 367+433" level="-12" length="0.4"/>
+        <step length="2.0"/>
+      </step>
+    </ringback-tone>
+    <busy-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="0.375"/>
+        <step length="0.375"/>
+      </step>
+    </busy-tone>
+    <number-unobtainable-tone>
+      <step cycles="endless">
+        <step freq="400" level="-12" length="2.5"/>
+        <step length="0.5"/>
+      </step>
+    </number-unobtainable-tone>
+    <waiting-tone>
+      <step freq="523+659" level="-12" length="1.5"/>
+      <step length="1.5"/>
+    </waiting-tone>
+    <payphone-recognition-tone>
+      <step freq="1100+1750" level="-12" length="0.2"/>
+      <step length="0.2"/>
+      <step freq="750+1450" level="-12" length="0.2"/>
+      <step length="2.0"/>
+    </payphone-recognition-tone>
+  </tone-set>
+</global-tones>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/spandsp/tones.dtd	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,193 @@
+<!-- Global PSTN supervisory tones -->
+<!ELEMENT global-tones (tone-set)* >
+<!ELEMENT tone-set (dial-tone|ringback-tone|busy-tone|congestion-tone|number-unobtainable-tone|special-information-tone|call-waiting-tone|waiting-tone|payphone-recognition-tone|test-number-tone|end-of-three-party-service-tone|service-activated-tone|record-tone|facilities-tone|offering-tone|positive-indication-tone|negative-indication-tone|route-tone|pay-tone|confirmation-tone|intrusion-tone|intercept-tone|warning-tone|holding-tone|search-tone|acceptance-tone|executive-override-tone|function-acknowledge-tone|queue-tone|valid-tone-radio-paging|notify-tone|re-order-tone|preemption-tone|comfort-tone|connection-tone|refusal-tone|line-lockout-tone|permanent-signal-tone|identification-tone|reorder-tone|recall-dial-tone|special-ringback-tone|busy-verification-tone)* >
+
+<!ATTLIST tone-set
+  country   CDATA   #REQUIRED
+  uncode    CDATA   #REQUIRED
+  >
+
+<!ELEMENT dial-tone (step)* >
+<!ATTLIST dial-tone
+  domain    CDATA   #IMPLIED
+  type      CDATA   #IMPLIED
+  >
+<!ELEMENT ringback-tone (step)* >
+<!ATTLIST ringback-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT busy-tone (step)* >
+<!ATTLIST busy-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT congestion-tone (step)* >
+<!ATTLIST congestion-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT number-unobtainable-tone (step)* >
+<!ATTLIST number-unobtainable-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT special-information-tone (step)* >
+<!ATTLIST special-information-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT call-waiting-tone (step)* >
+<!ATTLIST call-waiting-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT pay-tone (step)* >
+<!ATTLIST pay-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT payphone-recognition-tone (step)* >
+<!ATTLIST payphone-recognition-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT warning-tone (step)* >
+<!ATTLIST warning-tone
+  type      CDATA   #IMPLIED
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT reorder-tone (step)* >
+<!ATTLIST reorder-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT recall-dial-tone (step)* >
+<!ATTLIST recall-dial-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT special-ringback-tone (step)* >
+<!ATTLIST special-ringback-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT busy-verification-tone (step)* >
+<!ATTLIST busy-verification-tone
+  domain    CDATA   #IMPLIED
+  >
+
+<!ELEMENT waiting-tone (step)* >
+<!ATTLIST waiting-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT test-number-tone (step)* >
+<!ATTLIST test-number-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT end-of-three-party-service-tone (step)* >
+<!ATTLIST end-of-three-party-service-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT service-activated-tone (step)* >
+<!ATTLIST service-activated-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT record-tone (step)* >
+<!ATTLIST record-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT facilities-tone (step)* >
+<!ATTLIST facilities-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT offering-tone (step)* >
+<!ATTLIST offering-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT positive-indication-tone (step)* >
+<!ATTLIST positive-indication-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT negative-indication-tone (step)* >
+<!ATTLIST negative-indication-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT route-tone (step)* >
+<!ATTLIST route-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT confirmation-tone (step)* >
+<!ATTLIST confirmation-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT intrusion-tone (step)* >
+<!ATTLIST intrusion-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT intercept-tone (step)* >
+<!ATTLIST intercept-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT holding-tone (step)* >
+<!ATTLIST holding-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT search-tone (step)* >
+<!ATTLIST search-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT acceptance-tone (step)* >
+<!ATTLIST acceptance-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT executive-override-tone (step)* >
+<!ATTLIST executive-override-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT function-acknowledge-tone (step)* >
+<!ATTLIST function-acknowledge-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT queue-tone (step)* >
+<!ATTLIST queue-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT valid-tone-radio-paging (step)* >
+<!ATTLIST valid-tone-radio-paging
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT notify-tone (step)* >
+<!ATTLIST notify-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT re-order-tone (step)* >
+<!ATTLIST re-order-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT preemption-tone (step)* >
+<!ATTLIST preemption-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT comfort-tone (step)* >
+<!ATTLIST comfort-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT connection-tone (step)* >
+<!ATTLIST connection-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT refusal-tone (step)* >
+<!ATTLIST refusal-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT line-lockout-tone (step)* >
+<!ATTLIST line-lockout-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT permanent-signal-tone (step)* >
+<!ATTLIST permanent-signal-tone
+  domain    CDATA   #IMPLIED
+  >
+<!ELEMENT identification-tone (step)* >
+<!ATTLIST identification-tone
+  domain    CDATA   #IMPLIED
+  >
+
+<!ELEMENT step (step|EMPTY)* >
+<!ATTLIST step
+  cycles                CDATA   #IMPLIED
+  freq                  CDATA   #IMPLIED
+  level                 CDATA   #IMPLIED
+  length                CDATA   #IMPLIED
+  recorded-announcement CDATA   #IMPLIED
+  >
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/adsi.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,150 @@
+adsi.lo adsi.o: adsi.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  spandsp/telephony.h spandsp/logging.h spandsp/dds.h spandsp/complex.h \
+  spandsp/power_meter.h spandsp/async.h spandsp/hdlc.h spandsp/fsk.h \
+  spandsp/tone_detect.h spandsp/tone_generate.h spandsp/dtmf.h \
+  spandsp/adsi.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/power_meter.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/fsk.h:
+
+spandsp/tone_detect.h:
+
+spandsp/tone_generate.h:
+
+spandsp/dtmf.h:
+
+spandsp/adsi.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/async.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,75 @@
+async.lo async.o: async.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/assert.h spandsp/telephony.h \
+  spandsp/async.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/async.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/at_dictionary_gen.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,122 @@
+at_dictionary_gen.o at_dictionary_gen.o: at_dictionary_gen.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/assert.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/stat.h:
+
+/usr/include/bits/stat.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/assert.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/at_interpreter.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,140 @@
+at_interpreter.lo at_interpreter.o: at_interpreter.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/memory.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/ctype.h /usr/include/assert.h spandsp/telephony.h \
+  spandsp/logging.h spandsp/queue.h spandsp/power_meter.h \
+  spandsp/complex.h spandsp/tone_generate.h spandsp/async.h \
+  spandsp/hdlc.h spandsp/fsk.h spandsp/at_interpreter.h \
+  at_interpreter_dictionary.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/stat.h:
+
+/usr/include/bits/stat.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/ctype.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/queue.h:
+
+spandsp/power_meter.h:
+
+spandsp/complex.h:
+
+spandsp/tone_generate.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/fsk.h:
+
+spandsp/at_interpreter.h:
+
+at_interpreter_dictionary.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/awgn.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,97 @@
+awgn.lo awgn.o: awgn.c config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/awgn.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/awgn.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/bell_r2_mf.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,116 @@
+bell_r2_mf.lo bell_r2_mf.o: bell_r2_mf.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/time.h /usr/include/bits/time.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sys/types.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/dds.h spandsp/complex.h spandsp/tone_detect.h \
+  spandsp/tone_generate.h spandsp/bell_r2_mf.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/time.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/tone_detect.h:
+
+spandsp/tone_generate.h:
+
+spandsp/bell_r2_mf.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/bert.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,102 @@
+bert.lo bert.o: bert.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/assert.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/async.h spandsp/bert.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/async.h:
+
+spandsp/bert.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/bit_operations.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,82 @@
+bit_operations.lo bit_operations.o: bit_operations.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/assert.h /usr/include/memory.h \
+  spandsp/telephony.h spandsp/bit_operations.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/assert.h:
+
+/usr/include/memory.h:
+
+spandsp/telephony.h:
+
+spandsp/bit_operations.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/bitstream.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,77 @@
+bitstream.lo bitstream.o: bitstream.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/assert.h spandsp/telephony.h \
+  spandsp/logging.h spandsp/bitstream.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/bitstream.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/complex_dds.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,89 @@
+complex_dds.lo complex_dds.o: complex_dds.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/complex.h \
+  spandsp/dds.h spandsp/complex.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/complex.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/complex_filters.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,87 @@
+complex_filters.lo complex_filters.o: complex_filters.c config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  spandsp/complex.h spandsp/complex_filters.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+spandsp/complex.h:
+
+spandsp/complex_filters.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/complex_vector_float.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,134 @@
+complex_vector_float.lo complex_vector_float.o: complex_vector_float.c \
+  config.h /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  spandsp/telephony.h spandsp/logging.h spandsp/complex.h \
+  spandsp/vector_float.h spandsp/complex_vector_float.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/complex.h:
+
+spandsp/vector_float.h:
+
+spandsp/complex_vector_float.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/dds.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,57 @@
+dds.lo dds.o: dds.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/dds.h \
+  spandsp/complex.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/dtmf.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,134 @@
+dtmf.lo dtmf.o: dtmf.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h spandsp/telephony.h spandsp/tone_detect.h \
+  spandsp/tone_generate.h spandsp/dtmf.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+spandsp/telephony.h:
+
+spandsp/tone_detect.h:
+
+spandsp/tone_generate.h:
+
+spandsp/dtmf.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/echo.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,97 @@
+echo.lo echo.o: echo.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/stdlib.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/inttypes.h \
+  /usr/include/stdint.h spandsp/bit_operations.h spandsp/echo.h \
+  spandsp/fir.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+spandsp/bit_operations.h:
+
+spandsp/echo.h:
+
+spandsp/fir.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/fax.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,182 @@
+fax.lo fax.o: fax.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  spandsp/telephony.h spandsp/logging.h spandsp/queue.h \
+  spandsp/dc_restore.h spandsp/power_meter.h spandsp/complex.h \
+  spandsp/tone_generate.h spandsp/async.h spandsp/hdlc.h \
+  spandsp/silence_gen.h spandsp/fsk.h spandsp/v29rx.h spandsp/v29tx.h \
+  spandsp/v27ter_rx.h spandsp/v27ter_tx.h spandsp/t4.h spandsp/t30_fcf.h \
+  spandsp/t35.h spandsp/t30.h spandsp/fax.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/queue.h:
+
+spandsp/dc_restore.h:
+
+spandsp/power_meter.h:
+
+spandsp/complex.h:
+
+spandsp/tone_generate.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/silence_gen.h:
+
+spandsp/fsk.h:
+
+spandsp/v29rx.h:
+
+spandsp/v29tx.h:
+
+spandsp/v27ter_rx.h:
+
+spandsp/v27ter_tx.h:
+
+spandsp/t4.h:
+
+spandsp/t30_fcf.h:
+
+spandsp/t35.h:
+
+spandsp/t30.h:
+
+spandsp/fax.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/fsk.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,116 @@
+fsk.lo fsk.o: fsk.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/assert.h spandsp/telephony.h spandsp/complex.h \
+  spandsp/dds.h spandsp/complex.h spandsp/power_meter.h spandsp/async.h \
+  spandsp/fsk.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/complex.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/power_meter.h:
+
+spandsp/async.h:
+
+spandsp/fsk.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/g711.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,109 @@
+g711.lo g711.o: g711.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/assert.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/bit_operations.h spandsp/g711.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/bit_operations.h:
+
+spandsp/g711.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/g722_decode.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,107 @@
+g722_decode.lo g722_decode.o: g722_decode.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/memory.h /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/g722.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/g722.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/g722_encode.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,107 @@
+g722_encode.lo g722_encode.o: g722_encode.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/memory.h /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/g722.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/g722.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/g726.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,114 @@
+g726.lo g726.o: g726.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/memory.h /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/bitstream.h spandsp/bit_operations.h spandsp/g711.h \
+  spandsp/g726.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/bitstream.h:
+
+spandsp/bit_operations.h:
+
+spandsp/g711.h:
+
+spandsp/g726.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_decode.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,113 @@
+gsm0610_decode.lo gsm0610_decode.o: gsm0610_decode.c config.h \
+  /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/memory.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  spandsp/telephony.h spandsp/dc_restore.h spandsp/bitstream.h \
+  spandsp/gsm0610.h gsm0610_local.h
+
+config.h:
+
+/usr/include/assert.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/bitstream.h:
+
+spandsp/gsm0610.h:
+
+gsm0610_local.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_encode.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,113 @@
+gsm0610_encode.lo gsm0610_encode.o: gsm0610_encode.c config.h \
+  /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/memory.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  spandsp/telephony.h spandsp/dc_restore.h spandsp/bitstream.h \
+  spandsp/gsm0610.h gsm0610_local.h
+
+config.h:
+
+/usr/include/assert.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/bitstream.h:
+
+spandsp/gsm0610.h:
+
+gsm0610_local.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_long_term.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,101 @@
+gsm0610_long_term.lo gsm0610_long_term.o: gsm0610_long_term.c config.h \
+  /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/gsm0610.h gsm0610_local.h
+
+config.h:
+
+/usr/include/assert.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/gsm0610.h:
+
+gsm0610_local.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_lpc.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,106 @@
+gsm0610_lpc.lo gsm0610_lpc.o: gsm0610_lpc.c config.h \
+  /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/bit_operations.h spandsp/vector_int.h spandsp/gsm0610.h \
+  gsm0610_local.h
+
+config.h:
+
+/usr/include/assert.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/bit_operations.h:
+
+spandsp/vector_int.h:
+
+spandsp/gsm0610.h:
+
+gsm0610_local.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_preprocess.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,101 @@
+gsm0610_preprocess.lo gsm0610_preprocess.o: gsm0610_preprocess.c config.h \
+  /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/gsm0610.h gsm0610_local.h
+
+config.h:
+
+/usr/include/assert.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/gsm0610.h:
+
+gsm0610_local.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_rpe.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,101 @@
+gsm0610_rpe.lo gsm0610_rpe.o: gsm0610_rpe.c config.h \
+  /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/gsm0610.h gsm0610_local.h
+
+config.h:
+
+/usr/include/assert.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/gsm0610.h:
+
+gsm0610_local.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/gsm0610_short_term.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,101 @@
+gsm0610_short_term.lo gsm0610_short_term.o: gsm0610_short_term.c config.h \
+  /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/gsm0610.h gsm0610_local.h
+
+config.h:
+
+/usr/include/assert.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/gsm0610.h:
+
+gsm0610_local.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/hdlc.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,80 @@
+hdlc.lo hdlc.o: hdlc.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdio.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h /usr/include/stdlib.h \
+  spandsp/telephony.h spandsp/power_meter.h spandsp/async.h \
+  spandsp/hdlc.h spandsp/fsk.h spandsp/bit_operations.h spandsp/timing.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdio.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/stdlib.h:
+
+spandsp/telephony.h:
+
+spandsp/power_meter.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/fsk.h:
+
+spandsp/bit_operations.h:
+
+spandsp/timing.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/ima_adpcm.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,104 @@
+ima_adpcm.lo ima_adpcm.o: ima_adpcm.c config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/ima_adpcm.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/ima_adpcm.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/logging.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,154 @@
+logging.lo logging.o: logging.c config.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/stdio.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/stdlib.h /usr/include/alloca.h \
+  /usr/include/inttypes.h /usr/include/stdint.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-i386/errno.h /usr/include/signal.h \
+  /usr/include/bits/signum.h /usr/include/bits/siginfo.h \
+  /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
+  /usr/include/asm/sigcontext.h /usr/include/asm-i386/sigcontext.h \
+  /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
+  /usr/include/sys/time.h spandsp/telephony.h spandsp/logging.h
+
+config.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/stdio.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+/usr/include/signal.h:
+
+/usr/include/bits/signum.h:
+
+/usr/include/bits/siginfo.h:
+
+/usr/include/bits/sigaction.h:
+
+/usr/include/bits/sigcontext.h:
+
+/usr/include/asm/sigcontext.h:
+
+/usr/include/asm-i386/sigcontext.h:
+
+/usr/include/bits/sigstack.h:
+
+/usr/include/bits/sigthread.h:
+
+/usr/include/sys/time.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_analyse.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,131 @@
+lpc10_analyse.lo lpc10_analyse.o: lpc10_analyse.c config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/memory.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/dc_restore.h spandsp/lpc10.h \
+  lpc10_encdecs.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/lpc10.h:
+
+lpc10_encdecs.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_decode.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,129 @@
+lpc10_decode.lo lpc10_decode.o: lpc10_decode.c config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/memory.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/lpc10.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/lpc10.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_encode.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,131 @@
+lpc10_encode.lo lpc10_encode.o: lpc10_encode.c config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/memory.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/dc_restore.h spandsp/lpc10.h \
+  lpc10_encdecs.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/lpc10.h:
+
+lpc10_encdecs.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_placev.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,131 @@
+lpc10_placev.lo lpc10_placev.o: lpc10_placev.c config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/memory.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/dc_restore.h spandsp/lpc10.h \
+  lpc10_encdecs.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/lpc10.h:
+
+lpc10_encdecs.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/lpc10_voicing.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,131 @@
+lpc10_voicing.lo lpc10_voicing.o: lpc10_voicing.c config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/memory.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/dc_restore.h spandsp/lpc10.h \
+  lpc10_encdecs.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/lpc10.h:
+
+lpc10_encdecs.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/modem_connect_tones.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,107 @@
+modem_connect_tones.lo modem_connect_tones.o: modem_connect_tones.c \
+  config.h /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/dds.h spandsp/complex.h \
+  spandsp/tone_detect.h spandsp/tone_generate.h spandsp/super_tone_rx.h \
+  spandsp/modem_connect_tones.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/tone_detect.h:
+
+spandsp/tone_generate.h:
+
+spandsp/super_tone_rx.h:
+
+spandsp/modem_connect_tones.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/modem_echo.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,131 @@
+modem_echo.lo modem_echo.o: modem_echo.c config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/bit_operations.h spandsp/dc_restore.h \
+  spandsp/modem_echo.h spandsp/fir.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/bit_operations.h:
+
+spandsp/dc_restore.h:
+
+spandsp/modem_echo.h:
+
+spandsp/fir.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/noise.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,128 @@
+noise.lo noise.o: noise.c config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/memory.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/dc_restore.h spandsp/noise.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/noise.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/oki_adpcm.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,72 @@
+oki_adpcm.lo oki_adpcm.o: oki_adpcm.c config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  spandsp/telephony.h spandsp/oki_adpcm.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+spandsp/telephony.h:
+
+spandsp/oki_adpcm.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/playout.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,112 @@
+playout.lo playout.o: playout.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h spandsp/telephony.h spandsp/playout.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+spandsp/telephony.h:
+
+spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/plc.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,144 @@
+plc.lo plc.o: plc.c config.h /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/plc.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/plc.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/power_meter.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,135 @@
+power_meter.lo power_meter.o: power_meter.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/float.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  spandsp/telephony.h spandsp/power_meter.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/float.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/power_meter.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/queue.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,103 @@
+queue.lo queue.o: queue.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h /usr/include/stdlib.h \
+  /usr/include/time.h /usr/include/bits/time.h /usr/include/ctype.h \
+  /usr/include/sys/types.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h spandsp/queue.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/time.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/ctype.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+spandsp/queue.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/schedule.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,96 @@
+schedule.lo schedule.o: schedule.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/memory.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h spandsp/telephony.h spandsp/schedule.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+spandsp/telephony.h:
+
+spandsp/schedule.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/sig_tone.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,133 @@
+sig_tone.lo sig_tone.o: sig_tone.c config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/memory.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h spandsp/telephony.h spandsp/dc_restore.h \
+  spandsp/dds.h spandsp/complex.h spandsp/sig_tone.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/sig_tone.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/silence_gen.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,153 @@
+silence_gen.lo silence_gen.o: silence_gen.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/silence_gen.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/silence_gen.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/super_tone_rx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,136 @@
+super_tone_rx.lo super_tone_rx.o: super_tone_rx.c config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/ctype.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/tone_detect.h spandsp/tone_generate.h \
+  spandsp/super_tone_rx.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/ctype.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/tone_detect.h:
+
+spandsp/tone_generate.h:
+
+spandsp/super_tone_rx.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/super_tone_tx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,138 @@
+super_tone_tx.lo super_tone_tx.o: super_tone_tx.c config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/ctype.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/complex.h spandsp/dds.h spandsp/complex.h \
+  spandsp/super_tone_tx.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/ctype.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/complex.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/super_tone_tx.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/t30.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,175 @@
+t30.lo t30.o: t30.c config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/bit_operations.h spandsp/queue.h spandsp/power_meter.h \
+  spandsp/complex.h spandsp/tone_generate.h spandsp/async.h \
+  spandsp/hdlc.h spandsp/fsk.h spandsp/v29rx.h spandsp/v29tx.h \
+  spandsp/v27ter_rx.h spandsp/v27ter_tx.h spandsp/t4.h spandsp/t30_fcf.h \
+  spandsp/t35.h spandsp/t30.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/bit_operations.h:
+
+spandsp/queue.h:
+
+spandsp/power_meter.h:
+
+spandsp/complex.h:
+
+spandsp/tone_generate.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/fsk.h:
+
+spandsp/v29rx.h:
+
+spandsp/v29tx.h:
+
+spandsp/v27ter_rx.h:
+
+spandsp/v27ter_tx.h:
+
+spandsp/t4.h:
+
+spandsp/t30_fcf.h:
+
+spandsp/t35.h:
+
+spandsp/t30.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/t31.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,204 @@
+t31.lo t31.o: t31.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/memory.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/ctype.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/assert.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h spandsp/telephony.h \
+  spandsp/logging.h spandsp/bit_operations.h spandsp/dc_restore.h \
+  spandsp/queue.h spandsp/power_meter.h spandsp/complex.h \
+  spandsp/tone_generate.h spandsp/async.h spandsp/hdlc.h \
+  spandsp/silence_gen.h spandsp/fsk.h spandsp/v29rx.h spandsp/v29tx.h \
+  spandsp/v27ter_rx.h spandsp/v27ter_tx.h spandsp/t4.h spandsp/t30.h \
+  spandsp/t38_core.h /usr/include/sys/time.h spandsp/at_interpreter.h \
+  spandsp/t31.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/stat.h:
+
+/usr/include/bits/stat.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/ctype.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/bit_operations.h:
+
+spandsp/dc_restore.h:
+
+spandsp/queue.h:
+
+spandsp/power_meter.h:
+
+spandsp/complex.h:
+
+spandsp/tone_generate.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/silence_gen.h:
+
+spandsp/fsk.h:
+
+spandsp/v29rx.h:
+
+spandsp/v29tx.h:
+
+spandsp/v27ter_rx.h:
+
+spandsp/v27ter_tx.h:
+
+spandsp/t4.h:
+
+spandsp/t30.h:
+
+spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+spandsp/at_interpreter.h:
+
+spandsp/t31.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/t35.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,53 @@
+t35.lo t35.o: t35.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/ctype.h /usr/include/bits/types.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/typesizes.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdlib.h spandsp/telephony.h spandsp/bit_operations.h \
+  spandsp/t35.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/ctype.h:
+
+/usr/include/bits/types.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdlib.h:
+
+spandsp/telephony.h:
+
+spandsp/bit_operations.h:
+
+spandsp/t35.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/t38_core.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,185 @@
+t38_core.lo t38_core.o: t38_core.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/memory.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h spandsp/telephony.h \
+  spandsp/logging.h spandsp/bit_operations.h spandsp/queue.h \
+  spandsp/power_meter.h spandsp/complex.h spandsp/tone_generate.h \
+  spandsp/async.h spandsp/hdlc.h spandsp/fsk.h spandsp/v29rx.h \
+  spandsp/v29tx.h spandsp/v27ter_rx.h spandsp/v27ter_tx.h spandsp/t4.h \
+  spandsp/t30_fcf.h spandsp/t35.h spandsp/t30.h spandsp/t38_core.h \
+  /usr/include/sys/time.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/memory.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/bit_operations.h:
+
+spandsp/queue.h:
+
+spandsp/power_meter.h:
+
+spandsp/complex.h:
+
+spandsp/tone_generate.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/fsk.h:
+
+spandsp/v29rx.h:
+
+spandsp/v29tx.h:
+
+spandsp/v27ter_rx.h:
+
+spandsp/v27ter_tx.h:
+
+spandsp/t4.h:
+
+spandsp/t30_fcf.h:
+
+spandsp/t35.h:
+
+spandsp/t30.h:
+
+spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/t38_gateway.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,187 @@
+t38_gateway.lo t38_gateway.o: t38_gateway.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/queue.h spandsp/bit_operations.h spandsp/power_meter.h \
+  spandsp/complex.h spandsp/tone_generate.h spandsp/async.h \
+  spandsp/hdlc.h spandsp/silence_gen.h spandsp/fsk.h spandsp/v29rx.h \
+  spandsp/v29tx.h spandsp/v27ter_rx.h spandsp/v27ter_tx.h spandsp/t4.h \
+  spandsp/t30_fcf.h spandsp/t35.h spandsp/t30.h spandsp/t38_core.h \
+  /usr/include/sys/time.h spandsp/t38_gateway.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/queue.h:
+
+spandsp/bit_operations.h:
+
+spandsp/power_meter.h:
+
+spandsp/complex.h:
+
+spandsp/tone_generate.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/silence_gen.h:
+
+spandsp/fsk.h:
+
+spandsp/v29rx.h:
+
+spandsp/v29tx.h:
+
+spandsp/v27ter_rx.h:
+
+spandsp/v27ter_tx.h:
+
+spandsp/t4.h:
+
+spandsp/t30_fcf.h:
+
+spandsp/t35.h:
+
+spandsp/t30.h:
+
+spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+spandsp/t38_gateway.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/t38_terminal.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,184 @@
+t38_terminal.lo t38_terminal.o: t38_terminal.c config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/bit_operations.h spandsp/queue.h spandsp/power_meter.h \
+  spandsp/complex.h spandsp/tone_generate.h spandsp/async.h \
+  spandsp/hdlc.h spandsp/fsk.h spandsp/v29rx.h spandsp/v29tx.h \
+  spandsp/v27ter_rx.h spandsp/v27ter_tx.h spandsp/t4.h spandsp/t30_fcf.h \
+  spandsp/t35.h spandsp/t30.h spandsp/t38_core.h /usr/include/sys/time.h \
+  spandsp/t38_terminal.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/bit_operations.h:
+
+spandsp/queue.h:
+
+spandsp/power_meter.h:
+
+spandsp/complex.h:
+
+spandsp/tone_generate.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/fsk.h:
+
+spandsp/v29rx.h:
+
+spandsp/v29tx.h:
+
+spandsp/v27ter_rx.h:
+
+spandsp/v27ter_tx.h:
+
+spandsp/t4.h:
+
+spandsp/t30_fcf.h:
+
+spandsp/t35.h:
+
+spandsp/t30.h:
+
+spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+spandsp/t38_terminal.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/t4.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,196 @@
+t4.lo t4.o: t4.c config.h /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
+  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/environments.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/sys/stat.h /usr/include/bits/stat.h /usr/include/stdlib.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/xlocale.h /usr/include/alloca.h /usr/include/memory.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/bit_operations.h spandsp/async.h spandsp/t4.h faxfont.h \
+  t4states.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/xopen_lim.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/sys/stat.h:
+
+/usr/include/bits/stat.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/alloca.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/bit_operations.h:
+
+spandsp/async.h:
+
+spandsp/t4.h:
+
+faxfont.h:
+
+t4states.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/testcpuid.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,20 @@
+testcpuid.lo testcpuid.o: testcpuid.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/time_scale.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,148 @@
+time_scale.lo time_scale.o: time_scale.c config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/time_scale.h
+
+config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/time_scale.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/tone_detect.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,132 @@
+tone_detect.lo tone_detect.o: tone_detect.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h spandsp/telephony.h spandsp/tone_detect.h \
+  spandsp/tone_generate.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+spandsp/telephony.h:
+
+spandsp/tone_detect.h:
+
+spandsp/tone_generate.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/tone_generate.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,136 @@
+tone_generate.lo tone_generate.o: tone_generate.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  spandsp/telephony.h spandsp/dc_restore.h spandsp/dds.h \
+  spandsp/complex.h spandsp/tone_generate.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/dc_restore.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/tone_generate.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v17rx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,150 @@
+v17rx.lo v17rx.o: v17rx.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/complex.h spandsp/vector_float.h spandsp/complex_vector_float.h \
+  spandsp/async.h spandsp/power_meter.h spandsp/arctan2.h spandsp/dds.h \
+  spandsp/complex.h spandsp/complex_filters.h spandsp/v29rx.h \
+  spandsp/v17rx.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/complex.h:
+
+spandsp/vector_float.h:
+
+spandsp/complex_vector_float.h:
+
+spandsp/async.h:
+
+spandsp/power_meter.h:
+
+spandsp/arctan2.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/complex_filters.h:
+
+spandsp/v29rx.h:
+
+spandsp/v17rx.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v17tx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,142 @@
+v17tx.lo v17tx.o: v17tx.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/complex.h spandsp/vector_float.h spandsp/complex_vector_float.h \
+  spandsp/async.h spandsp/dds.h spandsp/complex.h spandsp/power_meter.h \
+  spandsp/v17tx.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/complex.h:
+
+spandsp/vector_float.h:
+
+spandsp/complex_vector_float.h:
+
+spandsp/async.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/power_meter.h:
+
+spandsp/v17tx.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v22bis_rx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,147 @@
+v22bis_rx.lo v22bis_rx.o: v22bis_rx.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/vector_float.h spandsp/async.h spandsp/power_meter.h \
+  spandsp/arctan2.h spandsp/complex.h spandsp/dds.h spandsp/complex.h \
+  spandsp/complex_filters.h spandsp/v29rx.h spandsp/v22bis.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/vector_float.h:
+
+spandsp/async.h:
+
+spandsp/power_meter.h:
+
+spandsp/arctan2.h:
+
+spandsp/complex.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/complex_filters.h:
+
+spandsp/v29rx.h:
+
+spandsp/v22bis.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v22bis_tx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,144 @@
+v22bis_tx.lo v22bis_tx.o: v22bis_tx.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/complex.h spandsp/vector_float.h spandsp/complex_vector_float.h \
+  spandsp/async.h spandsp/dds.h spandsp/complex.h spandsp/power_meter.h \
+  spandsp/v29rx.h spandsp/v22bis.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/complex.h:
+
+spandsp/vector_float.h:
+
+spandsp/complex_vector_float.h:
+
+spandsp/async.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/power_meter.h:
+
+spandsp/v29rx.h:
+
+spandsp/v22bis.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v27ter_rx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,150 @@
+v27ter_rx.lo v27ter_rx.o: v27ter_rx.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/complex.h spandsp/vector_float.h spandsp/complex_vector_float.h \
+  spandsp/async.h spandsp/power_meter.h spandsp/arctan2.h spandsp/dds.h \
+  spandsp/complex.h spandsp/complex_filters.h spandsp/v29rx.h \
+  spandsp/v27ter_rx.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/complex.h:
+
+spandsp/vector_float.h:
+
+spandsp/complex_vector_float.h:
+
+spandsp/async.h:
+
+spandsp/power_meter.h:
+
+spandsp/arctan2.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/complex_filters.h:
+
+spandsp/v29rx.h:
+
+spandsp/v27ter_rx.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v27ter_tx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,142 @@
+v27ter_tx.lo v27ter_tx.o: v27ter_tx.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/complex.h spandsp/vector_float.h spandsp/complex_vector_float.h \
+  spandsp/async.h spandsp/dds.h spandsp/complex.h spandsp/power_meter.h \
+  spandsp/v27ter_tx.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/complex.h:
+
+spandsp/vector_float.h:
+
+spandsp/complex_vector_float.h:
+
+spandsp/async.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/power_meter.h:
+
+spandsp/v27ter_tx.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v29rx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,147 @@
+v29rx.lo v29rx.o: v29rx.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/complex.h spandsp/vector_float.h spandsp/complex_vector_float.h \
+  spandsp/async.h spandsp/power_meter.h spandsp/arctan2.h spandsp/dds.h \
+  spandsp/complex.h spandsp/complex_filters.h spandsp/v29rx.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/complex.h:
+
+spandsp/vector_float.h:
+
+spandsp/complex_vector_float.h:
+
+spandsp/async.h:
+
+spandsp/power_meter.h:
+
+spandsp/arctan2.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/complex_filters.h:
+
+spandsp/v29rx.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v29tx.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,142 @@
+v29tx.lo v29tx.o: v29tx.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/complex.h spandsp/vector_float.h spandsp/complex_vector_float.h \
+  spandsp/async.h spandsp/dds.h spandsp/complex.h spandsp/power_meter.h \
+  spandsp/v29tx.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/complex.h:
+
+spandsp/vector_float.h:
+
+spandsp/complex_vector_float.h:
+
+spandsp/async.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/power_meter.h:
+
+spandsp/v29tx.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v42.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,117 @@
+v42.lo v42.o: v42.c config.h /usr/include/stdio.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/stdlib.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/errno.h \
+  /usr/include/bits/errno.h /usr/include/linux/errno.h \
+  /usr/include/asm/errno.h /usr/include/asm-i386/errno.h \
+  spandsp/telephony.h spandsp/logging.h spandsp/async.h spandsp/hdlc.h \
+  spandsp/schedule.h spandsp/queue.h spandsp/v42.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/async.h:
+
+spandsp/hdlc.h:
+
+spandsp/schedule.h:
+
+spandsp/queue.h:
+
+spandsp/v42.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v42bis.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,121 @@
+v42bis.lo v42bis.o: v42bis.c config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/stdlib.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/errno.h \
+  /usr/include/bits/errno.h /usr/include/linux/errno.h \
+  /usr/include/asm/errno.h /usr/include/asm-i386/errno.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/ctype.h \
+  /usr/include/assert.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/bit_operations.h spandsp/v42bis.h
+
+config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/ctype.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/bit_operations.h:
+
+spandsp/v42bis.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/v8.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,151 @@
+v8.lo v8.o: v8.c config.h /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/memory.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h spandsp/telephony.h spandsp/logging.h \
+  spandsp/queue.h spandsp/async.h spandsp/dds.h spandsp/complex.h \
+  spandsp/tone_detect.h spandsp/tone_generate.h spandsp/super_tone_rx.h \
+  spandsp/modem_connect_tones.h spandsp/power_meter.h spandsp/fsk.h \
+  spandsp/v8.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/queue.h:
+
+spandsp/async.h:
+
+spandsp/dds.h:
+
+spandsp/complex.h:
+
+spandsp/tone_detect.h:
+
+spandsp/tone_generate.h:
+
+spandsp/super_tone_rx.h:
+
+spandsp/modem_connect_tones.h:
+
+spandsp/power_meter.h:
+
+spandsp/fsk.h:
+
+spandsp/v8.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/vector_float.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,129 @@
+vector_float.lo vector_float.o: vector_float.c config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  spandsp/telephony.h spandsp/logging.h spandsp/vector_float.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/vector_float.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/.deps/vector_int.Plo	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,129 @@
+vector_int.lo vector_int.o: vector_int.c config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  spandsp/telephony.h spandsp/logging.h spandsp/vector_int.h
+
+config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+spandsp/telephony.h:
+
+spandsp/logging.h:
+
+spandsp/vector_int.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/Makefile	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,814 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# src/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+
+SOURCES = $(libspandsp_la_SOURCES) at_dictionary_gen.c
+
+srcdir = .
+top_srcdir = ..
+
+pkgdatadir = $(datadir)/spandsp
+pkglibdir = $(libdir)/spandsp
+pkgincludedir = $(includedir)/spandsp
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+noinst_PROGRAMS = at_dictionary_gen$(EXEEXT)
+subdir = src
+DIST_COMMON = $(nobase_include_HEADERS) $(noinst_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/config-h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libspandsp_la_LIBADD =
+am_libspandsp_la_OBJECTS = adsi.lo async.lo at_interpreter.lo awgn.lo \
+	bell_r2_mf.lo bert.lo bit_operations.lo bitstream.lo \
+	complex_dds.lo complex_filters.lo complex_vector_float.lo \
+	dds.lo dtmf.lo echo.lo fax.lo fsk.lo g711.lo g722_encode.lo \
+	g722_decode.lo g726.lo gsm0610_decode.lo gsm0610_encode.lo \
+	gsm0610_long_term.lo gsm0610_lpc.lo gsm0610_preprocess.lo \
+	gsm0610_rpe.lo gsm0610_short_term.lo hdlc.lo ima_adpcm.lo \
+	logging.lo lpc10_analyse.lo lpc10_decode.lo lpc10_encode.lo \
+	lpc10_placev.lo lpc10_voicing.lo modem_echo.lo \
+	modem_connect_tones.lo noise.lo oki_adpcm.lo playout.lo plc.lo \
+	power_meter.lo queue.lo schedule.lo sig_tone.lo silence_gen.lo \
+	super_tone_rx.lo super_tone_tx.lo t4.lo t30.lo t31.lo t35.lo \
+	t38_core.lo t38_gateway.lo t38_terminal.lo testcpuid.lo \
+	time_scale.lo tone_detect.lo tone_generate.lo v17rx.lo \
+	v17tx.lo v22bis_rx.lo v22bis_tx.lo v27ter_rx.lo v27ter_tx.lo \
+	v29rx.lo v29tx.lo v42.lo v42bis.lo v8.lo vector_float.lo \
+	vector_int.lo
+libspandsp_la_OBJECTS = $(am_libspandsp_la_OBJECTS)
+PROGRAMS = $(noinst_PROGRAMS)
+at_dictionary_gen_SOURCES = at_dictionary_gen.c
+at_dictionary_gen_OBJECTS = at_dictionary_gen.$(OBJEXT)
+at_dictionary_gen_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libspandsp_la_SOURCES) at_dictionary_gen.c
+DIST_SOURCES = $(libspandsp_la_SOURCES) at_dictionary_gen.c
+nobase_includeHEADERS_INSTALL = $(install_sh_DATA)
+HEADERS = $(nobase_include_HEADERS) $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoconf
+AUTOHEADER = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoheader
+AUTOMAKE = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run automake-1.9
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+COMP_VENDOR_CFLAGS = -O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+COND_DOC_FALSE = 
+COND_DOC_TRUE = #
+COND_ITUTESTS_FALSE = 
+COND_ITUTESTS_TRUE = #
+COND_MMX_FALSE = 
+COND_MMX_TRUE = #
+COND_SSE_FALSE = 
+COND_SSE_TRUE = #
+COND_TESTS_FALSE = #
+COND_TESTS_TRUE = 
+CPP = gcc -E
+CPPFLAGS =  
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = grep -E
+EXEEXT = 
+F77 = 
+FFLAGS = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS = 
+LIBOBJS = 
+LIBS = -lm -ltiff 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run makeinfo
+OBJEXT = o
+PACKAGE = spandsp
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = 
+PACKAGE_STRING = 
+PACKAGE_TARNAME = 
+PACKAGE_VERSION = 
+PATH_SEPARATOR = :
+RANLIB = ranlib
+SET_MAKE = 
+SHELL = /bin/sh
+SPANDSP_LT_AGE = 0
+SPANDSP_LT_CURRENT = 0
+SPANDSP_LT_REVISION = 2
+STRIP = strip
+TESTLIBS =  -L/usr/X11R6/lib -lXft -lXext -lX11 -laudiofile -lfftw3 -lpthread -ldl
+VERSION = 0.0.3
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+ac_ct_RANLIB = ranlib
+ac_ct_STRIP = strip
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /xhome1/tmp/oslec/spandsp-0.0.3/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+MAINTAINERCLEANFILES = Makefile.in
+INCLUDES = -I$(top_builddir)
+lib_LTLIBRARIES = libspandsp.la
+libspandsp_la_SOURCES = adsi.c \
+                        async.c \
+                        at_interpreter.c \
+                        awgn.c \
+                        bell_r2_mf.c \
+                        bert.c \
+                        bit_operations.c \
+                        bitstream.c \
+                        complex_dds.c \
+                        complex_filters.c \
+                        complex_vector_float.c \
+                        dds.c \
+                        dtmf.c \
+                        echo.c \
+                        fax.c \
+                        fsk.c \
+                        g711.c \
+                        g722_encode.c \
+                        g722_decode.c \
+                        g726.c \
+                        gsm0610_decode.c \
+                        gsm0610_encode.c \
+                        gsm0610_long_term.c \
+                        gsm0610_lpc.c \
+                        gsm0610_preprocess.c \
+                        gsm0610_rpe.c \
+                        gsm0610_short_term.c \
+                        hdlc.c \
+                        ima_adpcm.c \
+                        logging.c \
+                        lpc10_analyse.c \
+                        lpc10_decode.c \
+                        lpc10_encode.c \
+                        lpc10_placev.c \
+                        lpc10_voicing.c \
+                        modem_echo.c \
+                        modem_connect_tones.c \
+                        noise.c \
+                        oki_adpcm.c \
+                        playout.c \
+                        plc.c \
+                        power_meter.c \
+                        queue.c \
+                        schedule.c \
+                        sig_tone.c \
+                        silence_gen.c \
+                        super_tone_rx.c \
+                        super_tone_tx.c \
+                        t4.c \
+                        t30.c \
+                        t31.c \
+                        t35.c \
+                        t38_core.c \
+                        t38_gateway.c \
+                        t38_terminal.c \
+                        testcpuid.c \
+                        time_scale.c \
+                        tone_detect.c \
+                        tone_generate.c \
+                        v17rx.c \
+                        v17tx.c \
+                        v22bis_rx.c \
+                        v22bis_tx.c \
+                        v27ter_rx.c \
+                        v27ter_tx.c \
+                        v29rx.c \
+                        v29tx.c \
+                        v42.c \
+                        v42bis.c \
+                        v8.c \
+                        vector_float.c \
+                        vector_int.c
+
+libspandsp_la_LDFLAGS = -version-info 0:2:0
+nobase_include_HEADERS = spandsp/adsi.h \
+                        spandsp/async.h \
+                        spandsp/arctan2.h \
+                        spandsp/at_interpreter.h \
+                        spandsp/awgn.h \
+                        spandsp/bell_r2_mf.h \
+                        spandsp/bert.h \
+                        spandsp/biquad.h \
+                        spandsp/bit_operations.h \
+                        spandsp/bitstream.h \
+                        spandsp/complex.h \
+                        spandsp/complex_filters.h \
+                        spandsp/complex_vector_float.h \
+                        spandsp/dc_restore.h \
+                        spandsp/dds.h \
+                        spandsp/dtmf.h \
+                        spandsp/echo.h \
+                        spandsp/fax.h \
+                        spandsp/fir.h \
+                        spandsp/fsk.h \
+                        spandsp/g168models.h \
+                        spandsp/g711.h \
+                        spandsp/g722.h \
+                        spandsp/g726.h \
+                        spandsp/gsm0610.h \
+                        spandsp/hdlc.h \
+                        spandsp/ima_adpcm.h \
+                        spandsp/logging.h \
+                        spandsp/lpc10.h \
+                        spandsp/modem_echo.h \
+                        spandsp/modem_connect_tones.h \
+                        spandsp/noise.h \
+                        spandsp/oki_adpcm.h \
+                        spandsp/playout.h \
+                        spandsp/plc.h \
+                        spandsp/power_meter.h \
+                        spandsp/queue.h \
+                        spandsp/schedule.h \
+                        spandsp/sig_tone.h \
+                        spandsp/silence_gen.h \
+                        spandsp/super_tone_rx.h \
+                        spandsp/super_tone_tx.h \
+                        spandsp/t4.h \
+                        spandsp/t30.h \
+                        spandsp/t30_fcf.h \
+                        spandsp/t31.h \
+                        spandsp/t35.h \
+                        spandsp/t38_core.h \
+                        spandsp/t38_gateway.h \
+                        spandsp/t38_terminal.h \
+                        spandsp/telephony.h \
+                        spandsp/time_scale.h \
+                        spandsp/timing.h \
+                        spandsp/tone_detect.h \
+                        spandsp/tone_generate.h \
+                        spandsp/v17rx.h \
+                        spandsp/v17tx.h \
+                        spandsp/v22bis.h \
+                        spandsp/v27ter_rx.h \
+                        spandsp/v27ter_tx.h \
+                        spandsp/v29rx.h \
+                        spandsp/v29tx.h \
+                        spandsp/v42.h \
+                        spandsp/v42bis.h \
+                        spandsp/v8.h \
+                        spandsp/vector_float.h \
+                        spandsp/vector_int.h \
+                        spandsp.h
+
+noinst_HEADERS = faxfont.h \
+                        gsm0610_local.h \
+                        lpc10_encdecs.h \
+                        t4states.h
+
+DSP = libspandsp.dsp
+VCPROJ = libspandsp.vcproj
+WIN32SOURCES = $(libspandsp_la_SOURCES) gettimeofday.c
+WIN32HEADERS = $(nobase_include_HEADERS) spandsp.h
+DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
+VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(top_srcdir)/config-h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/config.h
+$(top_srcdir)/config-h.in:  $(am__configure_deps) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libspandsp.la: $(libspandsp_la_OBJECTS) $(libspandsp_la_DEPENDENCIES) 
+	$(LINK) -rpath $(libdir) $(libspandsp_la_LDFLAGS) $(libspandsp_la_OBJECTS) $(libspandsp_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+at_dictionary_gen$(EXEEXT): $(at_dictionary_gen_OBJECTS) $(at_dictionary_gen_DEPENDENCIES) 
+	@rm -f at_dictionary_gen$(EXEEXT)
+	$(LINK) $(at_dictionary_gen_LDFLAGS) $(at_dictionary_gen_OBJECTS) $(at_dictionary_gen_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/adsi.Plo
+include ./$(DEPDIR)/async.Plo
+include ./$(DEPDIR)/at_dictionary_gen.Po
+include ./$(DEPDIR)/at_interpreter.Plo
+include ./$(DEPDIR)/awgn.Plo
+include ./$(DEPDIR)/bell_r2_mf.Plo
+include ./$(DEPDIR)/bert.Plo
+include ./$(DEPDIR)/bit_operations.Plo
+include ./$(DEPDIR)/bitstream.Plo
+include ./$(DEPDIR)/complex_dds.Plo
+include ./$(DEPDIR)/complex_filters.Plo
+include ./$(DEPDIR)/complex_vector_float.Plo
+include ./$(DEPDIR)/dds.Plo
+include ./$(DEPDIR)/dtmf.Plo
+include ./$(DEPDIR)/echo.Plo
+include ./$(DEPDIR)/fax.Plo
+include ./$(DEPDIR)/fsk.Plo
+include ./$(DEPDIR)/g711.Plo
+include ./$(DEPDIR)/g722_decode.Plo
+include ./$(DEPDIR)/g722_encode.Plo
+include ./$(DEPDIR)/g726.Plo
+include ./$(DEPDIR)/gsm0610_decode.Plo
+include ./$(DEPDIR)/gsm0610_encode.Plo
+include ./$(DEPDIR)/gsm0610_long_term.Plo
+include ./$(DEPDIR)/gsm0610_lpc.Plo
+include ./$(DEPDIR)/gsm0610_preprocess.Plo
+include ./$(DEPDIR)/gsm0610_rpe.Plo
+include ./$(DEPDIR)/gsm0610_short_term.Plo
+include ./$(DEPDIR)/hdlc.Plo
+include ./$(DEPDIR)/ima_adpcm.Plo
+include ./$(DEPDIR)/logging.Plo
+include ./$(DEPDIR)/lpc10_analyse.Plo
+include ./$(DEPDIR)/lpc10_decode.Plo
+include ./$(DEPDIR)/lpc10_encode.Plo
+include ./$(DEPDIR)/lpc10_placev.Plo
+include ./$(DEPDIR)/lpc10_voicing.Plo
+include ./$(DEPDIR)/modem_connect_tones.Plo
+include ./$(DEPDIR)/modem_echo.Plo
+include ./$(DEPDIR)/noise.Plo
+include ./$(DEPDIR)/oki_adpcm.Plo
+include ./$(DEPDIR)/playout.Plo
+include ./$(DEPDIR)/plc.Plo
+include ./$(DEPDIR)/power_meter.Plo
+include ./$(DEPDIR)/queue.Plo
+include ./$(DEPDIR)/schedule.Plo
+include ./$(DEPDIR)/sig_tone.Plo
+include ./$(DEPDIR)/silence_gen.Plo
+include ./$(DEPDIR)/super_tone_rx.Plo
+include ./$(DEPDIR)/super_tone_tx.Plo
+include ./$(DEPDIR)/t30.Plo
+include ./$(DEPDIR)/t31.Plo
+include ./$(DEPDIR)/t35.Plo
+include ./$(DEPDIR)/t38_core.Plo
+include ./$(DEPDIR)/t38_gateway.Plo
+include ./$(DEPDIR)/t38_terminal.Plo
+include ./$(DEPDIR)/t4.Plo
+include ./$(DEPDIR)/testcpuid.Plo
+include ./$(DEPDIR)/time_scale.Plo
+include ./$(DEPDIR)/tone_detect.Plo
+include ./$(DEPDIR)/tone_generate.Plo
+include ./$(DEPDIR)/v17rx.Plo
+include ./$(DEPDIR)/v17tx.Plo
+include ./$(DEPDIR)/v22bis_rx.Plo
+include ./$(DEPDIR)/v22bis_tx.Plo
+include ./$(DEPDIR)/v27ter_rx.Plo
+include ./$(DEPDIR)/v27ter_tx.Plo
+include ./$(DEPDIR)/v29rx.Plo
+include ./$(DEPDIR)/v29tx.Plo
+include ./$(DEPDIR)/v42.Plo
+include ./$(DEPDIR)/v42bis.Plo
+include ./$(DEPDIR)/v8.Plo
+include ./$(DEPDIR)/vector_float.Plo
+include ./$(DEPDIR)/vector_int.Plo
+
+.c.o:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_includeHEADERS: $(nobase_include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+	  $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+uninstall-nobase_includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_include_HEADERS)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(mkdir_p) $(distdir)/.. $(distdir)/spandsp
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) config.h
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_includeHEADERS
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
+	uninstall-nobase_includeHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
+	distclean distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-libLTLIBRARIES install-man \
+	install-nobase_includeHEADERS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-libLTLIBRARIES uninstall-nobase_includeHEADERS
+
+
+# We need to run at_dictionary_gen, so it generates the at_interpreter_dictionary.h file
+# used by several of the test programs.
+
+at_interpreter.$(OBJEXT): at_dictionary_gen$(EXEEXT) at_interpreter_dictionary.h
+
+at_interpreter.lo: at_dictionary_gen$(EXEEXT) at_interpreter_dictionary.h
+
+at_interpreter_dictionary.h: at_dictionary_gen$(EXEEXT)
+	./at_dictionary_gen$(EXEEXT) >at_interpreter_dictionary.h
+
+$(DSP): msvc/msvcproj.head msvc/msvcproj.foot Makefile.am
+	echo "creating $(DSP)"
+	@(cp $(srcdir)/msvc/msvcproj.head $(DSP); \
+	echo "# Begin Group \"Source Files\"" $(DSPOUT); \
+	for file in $(WIN32SOURCES); do \
+	echo "# Begin Source File" $(DSPOUT); \
+	echo "" $(DSPOUT); \
+	echo "SOURCE=.\\"$$file $(DSPOUT); \
+	echo "# End Source File" $(DSPOUT); \
+	done; \
+	echo "# End Group" $(DSPOUT); \
+	echo "# Begin Group \"Header Files\"" $(DSPOUT); \
+	for file in $(WIN32HEADERS); do \
+	echo "# Begin Source File" $(DSPOUT); \
+	echo "" $(DSPOUT); \
+	echo "SOURCE=.\\"$$file $(DSPOUT); \
+	echo "# End Source File" $(DSPOUT); \
+	done; \
+	echo "# End Group" $(DSPOUT); \
+	cat $(srcdir)/msvc/msvcproj.foot $(DSPOUT) )
+
+$(VCPROJ): msvc/vc8proj.head msvc/vc8proj.foot Makefile.am
+	echo "creating $(VCPROJ)"
+	@(cp $(srcdir)/msvc/vc8proj.head $(VCPROJ); \
+	for file in $(WIN32SOURCES); do \
+		echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
+	done; \
+	echo "</Filter><Filter  Name=\"Header Files\">" $(VCPROJOUT); \
+	for file in $(WIN32HEADERS); do \
+		echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
+	done; \
+	cat $(srcdir)/msvc/vc8proj.foot $(VCPROJOUT) )
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/Makefile.am	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,227 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License version 2, as
+## published by the Free Software Foundation.
+##
+## 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+##
+## $Id: Makefile.am,v 1.61 2006/11/30 15:41:47 steveu Exp $
+
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+
+MAINTAINERCLEANFILES = Makefile.in
+
+INCLUDES = -I$(top_builddir)
+
+lib_LTLIBRARIES = libspandsp.la
+
+libspandsp_la_SOURCES = adsi.c \
+                        async.c \
+                        at_interpreter.c \
+                        awgn.c \
+                        bell_r2_mf.c \
+                        bert.c \
+                        bit_operations.c \
+                        bitstream.c \
+                        complex_dds.c \
+                        complex_filters.c \
+                        complex_vector_float.c \
+                        dds.c \
+                        dtmf.c \
+                        echo.c \
+                        fax.c \
+                        fsk.c \
+                        g711.c \
+                        g722_encode.c \
+                        g722_decode.c \
+                        g726.c \
+                        gsm0610_decode.c \
+                        gsm0610_encode.c \
+                        gsm0610_long_term.c \
+                        gsm0610_lpc.c \
+                        gsm0610_preprocess.c \
+                        gsm0610_rpe.c \
+                        gsm0610_short_term.c \
+                        hdlc.c \
+                        ima_adpcm.c \
+                        logging.c \
+                        lpc10_analyse.c \
+                        lpc10_decode.c \
+                        lpc10_encode.c \
+                        lpc10_placev.c \
+                        lpc10_voicing.c \
+                        modem_echo.c \
+                        modem_connect_tones.c \
+                        noise.c \
+                        oki_adpcm.c \
+                        playout.c \
+                        plc.c \
+                        power_meter.c \
+                        queue.c \
+                        schedule.c \
+                        sig_tone.c \
+                        silence_gen.c \
+                        super_tone_rx.c \
+                        super_tone_tx.c \
+                        t4.c \
+                        t30.c \
+                        t31.c \
+                        t35.c \
+                        t38_core.c \
+                        t38_gateway.c \
+                        t38_terminal.c \
+                        testcpuid.c \
+                        time_scale.c \
+                        tone_detect.c \
+                        tone_generate.c \
+                        v17rx.c \
+                        v17tx.c \
+                        v22bis_rx.c \
+                        v22bis_tx.c \
+                        v27ter_rx.c \
+                        v27ter_tx.c \
+                        v29rx.c \
+                        v29tx.c \
+                        v42.c \
+                        v42bis.c \
+                        v8.c \
+                        vector_float.c \
+                        vector_int.c
+
+libspandsp_la_LDFLAGS = -version-info @SPANDSP_LT_CURRENT@:@SPANDSP_LT_REVISION@:@SPANDSP_LT_AGE@
+
+nobase_include_HEADERS = spandsp/adsi.h \
+                        spandsp/async.h \
+                        spandsp/arctan2.h \
+                        spandsp/at_interpreter.h \
+                        spandsp/awgn.h \
+                        spandsp/bell_r2_mf.h \
+                        spandsp/bert.h \
+                        spandsp/biquad.h \
+                        spandsp/bit_operations.h \
+                        spandsp/bitstream.h \
+                        spandsp/complex.h \
+                        spandsp/complex_filters.h \
+                        spandsp/complex_vector_float.h \
+                        spandsp/dc_restore.h \
+                        spandsp/dds.h \
+                        spandsp/dtmf.h \
+                        spandsp/echo.h \
+                        spandsp/fax.h \
+                        spandsp/fir.h \
+                        spandsp/fsk.h \
+                        spandsp/g168models.h \
+                        spandsp/g711.h \
+                        spandsp/g722.h \
+                        spandsp/g726.h \
+                        spandsp/gsm0610.h \
+                        spandsp/hdlc.h \
+                        spandsp/ima_adpcm.h \
+                        spandsp/logging.h \
+                        spandsp/lpc10.h \
+                        spandsp/modem_echo.h \
+                        spandsp/modem_connect_tones.h \
+                        spandsp/noise.h \
+                        spandsp/oki_adpcm.h \
+                        spandsp/playout.h \
+                        spandsp/plc.h \
+                        spandsp/power_meter.h \
+                        spandsp/queue.h \
+                        spandsp/schedule.h \
+                        spandsp/sig_tone.h \
+                        spandsp/silence_gen.h \
+                        spandsp/super_tone_rx.h \
+                        spandsp/super_tone_tx.h \
+                        spandsp/t4.h \
+                        spandsp/t30.h \
+                        spandsp/t30_fcf.h \
+                        spandsp/t31.h \
+                        spandsp/t35.h \
+                        spandsp/t38_core.h \
+                        spandsp/t38_gateway.h \
+                        spandsp/t38_terminal.h \
+                        spandsp/telephony.h \
+                        spandsp/time_scale.h \
+                        spandsp/timing.h \
+                        spandsp/tone_detect.h \
+                        spandsp/tone_generate.h \
+                        spandsp/v17rx.h \
+                        spandsp/v17tx.h \
+                        spandsp/v22bis.h \
+                        spandsp/v27ter_rx.h \
+                        spandsp/v27ter_tx.h \
+                        spandsp/v29rx.h \
+                        spandsp/v29tx.h \
+                        spandsp/v42.h \
+                        spandsp/v42bis.h \
+                        spandsp/v8.h \
+                        spandsp/vector_float.h \
+                        spandsp/vector_int.h \
+                        spandsp.h
+
+noinst_HEADERS =        faxfont.h \
+                        gsm0610_local.h \
+                        lpc10_encdecs.h \
+                        t4states.h
+
+noinst_PROGRAMS =       at_dictionary_gen
+
+# We need to run at_dictionary_gen, so it generates the at_interpreter_dictionary.h file
+# used by several of the test programs.
+
+at_interpreter.$(OBJEXT): at_dictionary_gen$(EXEEXT) at_interpreter_dictionary.h
+
+at_interpreter.lo: at_dictionary_gen$(EXEEXT) at_interpreter_dictionary.h
+
+at_interpreter_dictionary.h: at_dictionary_gen$(EXEEXT)
+	./at_dictionary_gen$(EXEEXT) >at_interpreter_dictionary.h
+
+DSP = libspandsp.dsp
+VCPROJ = libspandsp.vcproj
+
+WIN32SOURCES = $(libspandsp_la_SOURCES) gettimeofday.c
+WIN32HEADERS = $(nobase_include_HEADERS) spandsp.h
+
+DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
+VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
+
+$(DSP): msvc/msvcproj.head msvc/msvcproj.foot Makefile.am
+	echo "creating $(DSP)"
+	@(cp $(srcdir)/msvc/msvcproj.head $(DSP); \
+	echo "# Begin Group \"Source Files\"" $(DSPOUT); \
+	for file in $(WIN32SOURCES); do \
+	echo "# Begin Source File" $(DSPOUT); \
+	echo "" $(DSPOUT); \
+	echo "SOURCE=.\\"$$file $(DSPOUT); \
+	echo "# End Source File" $(DSPOUT); \
+	done; \
+	echo "# End Group" $(DSPOUT); \
+	echo "# Begin Group \"Header Files\"" $(DSPOUT); \
+	for file in $(WIN32HEADERS); do \
+	echo "# Begin Source File" $(DSPOUT); \
+	echo "" $(DSPOUT); \
+	echo "SOURCE=.\\"$$file $(DSPOUT); \
+	echo "# End Source File" $(DSPOUT); \
+	done; \
+	echo "# End Group" $(DSPOUT); \
+	cat $(srcdir)/msvc/msvcproj.foot $(DSPOUT) )
+
+$(VCPROJ): msvc/vc8proj.head msvc/vc8proj.foot Makefile.am
+	echo "creating $(VCPROJ)"
+	@(cp $(srcdir)/msvc/vc8proj.head $(VCPROJ); \
+	for file in $(WIN32SOURCES); do \
+		echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
+	done; \
+	echo "</Filter><Filter  Name=\"Header Files\">" $(VCPROJOUT); \
+	for file in $(WIN32HEADERS); do \
+		echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
+	done; \
+	cat $(srcdir)/msvc/vc8proj.foot $(VCPROJOUT) )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/Makefile.in	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,814 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+SOURCES = $(libspandsp_la_SOURCES) at_dictionary_gen.c
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = at_dictionary_gen$(EXEEXT)
+subdir = src
+DIST_COMMON = $(nobase_include_HEADERS) $(noinst_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/config-h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libspandsp_la_LIBADD =
+am_libspandsp_la_OBJECTS = adsi.lo async.lo at_interpreter.lo awgn.lo \
+	bell_r2_mf.lo bert.lo bit_operations.lo bitstream.lo \
+	complex_dds.lo complex_filters.lo complex_vector_float.lo \
+	dds.lo dtmf.lo echo.lo fax.lo fsk.lo g711.lo g722_encode.lo \
+	g722_decode.lo g726.lo gsm0610_decode.lo gsm0610_encode.lo \
+	gsm0610_long_term.lo gsm0610_lpc.lo gsm0610_preprocess.lo \
+	gsm0610_rpe.lo gsm0610_short_term.lo hdlc.lo ima_adpcm.lo \
+	logging.lo lpc10_analyse.lo lpc10_decode.lo lpc10_encode.lo \
+	lpc10_placev.lo lpc10_voicing.lo modem_echo.lo \
+	modem_connect_tones.lo noise.lo oki_adpcm.lo playout.lo plc.lo \
+	power_meter.lo queue.lo schedule.lo sig_tone.lo silence_gen.lo \
+	super_tone_rx.lo super_tone_tx.lo t4.lo t30.lo t31.lo t35.lo \
+	t38_core.lo t38_gateway.lo t38_terminal.lo testcpuid.lo \
+	time_scale.lo tone_detect.lo tone_generate.lo v17rx.lo \
+	v17tx.lo v22bis_rx.lo v22bis_tx.lo v27ter_rx.lo v27ter_tx.lo \
+	v29rx.lo v29tx.lo v42.lo v42bis.lo v8.lo vector_float.lo \
+	vector_int.lo
+libspandsp_la_OBJECTS = $(am_libspandsp_la_OBJECTS)
+PROGRAMS = $(noinst_PROGRAMS)
+at_dictionary_gen_SOURCES = at_dictionary_gen.c
+at_dictionary_gen_OBJECTS = at_dictionary_gen.$(OBJEXT)
+at_dictionary_gen_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libspandsp_la_SOURCES) at_dictionary_gen.c
+DIST_SOURCES = $(libspandsp_la_SOURCES) at_dictionary_gen.c
+nobase_includeHEADERS_INSTALL = $(install_sh_DATA)
+HEADERS = $(nobase_include_HEADERS) $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMP_VENDOR_CFLAGS = @COMP_VENDOR_CFLAGS@
+COND_DOC_FALSE = @COND_DOC_FALSE@
+COND_DOC_TRUE = @COND_DOC_TRUE@
+COND_ITUTESTS_FALSE = @COND_ITUTESTS_FALSE@
+COND_ITUTESTS_TRUE = @COND_ITUTESTS_TRUE@
+COND_MMX_FALSE = @COND_MMX_FALSE@
+COND_MMX_TRUE = @COND_MMX_TRUE@
+COND_SSE_FALSE = @COND_SSE_FALSE@
+COND_SSE_TRUE = @COND_SSE_TRUE@
+COND_TESTS_FALSE = @COND_TESTS_FALSE@
+COND_TESTS_TRUE = @COND_TESTS_TRUE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPANDSP_LT_AGE = @SPANDSP_LT_AGE@
+SPANDSP_LT_CURRENT = @SPANDSP_LT_CURRENT@
+SPANDSP_LT_REVISION = @SPANDSP_LT_REVISION@
+STRIP = @STRIP@
+TESTLIBS = @TESTLIBS@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+MAINTAINERCLEANFILES = Makefile.in
+INCLUDES = -I$(top_builddir)
+lib_LTLIBRARIES = libspandsp.la
+libspandsp_la_SOURCES = adsi.c \
+                        async.c \
+                        at_interpreter.c \
+                        awgn.c \
+                        bell_r2_mf.c \
+                        bert.c \
+                        bit_operations.c \
+                        bitstream.c \
+                        complex_dds.c \
+                        complex_filters.c \
+                        complex_vector_float.c \
+                        dds.c \
+                        dtmf.c \
+                        echo.c \
+                        fax.c \
+                        fsk.c \
+                        g711.c \
+                        g722_encode.c \
+                        g722_decode.c \
+                        g726.c \
+                        gsm0610_decode.c \
+                        gsm0610_encode.c \
+                        gsm0610_long_term.c \
+                        gsm0610_lpc.c \
+                        gsm0610_preprocess.c \
+                        gsm0610_rpe.c \
+                        gsm0610_short_term.c \
+                        hdlc.c \
+                        ima_adpcm.c \
+                        logging.c \
+                        lpc10_analyse.c \
+                        lpc10_decode.c \
+                        lpc10_encode.c \
+                        lpc10_placev.c \
+                        lpc10_voicing.c \
+                        modem_echo.c \
+                        modem_connect_tones.c \
+                        noise.c \
+                        oki_adpcm.c \
+                        playout.c \
+                        plc.c \
+                        power_meter.c \
+                        queue.c \
+                        schedule.c \
+                        sig_tone.c \
+                        silence_gen.c \
+                        super_tone_rx.c \
+                        super_tone_tx.c \
+                        t4.c \
+                        t30.c \
+                        t31.c \
+                        t35.c \
+                        t38_core.c \
+                        t38_gateway.c \
+                        t38_terminal.c \
+                        testcpuid.c \
+                        time_scale.c \
+                        tone_detect.c \
+                        tone_generate.c \
+                        v17rx.c \
+                        v17tx.c \
+                        v22bis_rx.c \
+                        v22bis_tx.c \
+                        v27ter_rx.c \
+                        v27ter_tx.c \
+                        v29rx.c \
+                        v29tx.c \
+                        v42.c \
+                        v42bis.c \
+                        v8.c \
+                        vector_float.c \
+                        vector_int.c
+
+libspandsp_la_LDFLAGS = -version-info @SPANDSP_LT_CURRENT@:@SPANDSP_LT_REVISION@:@SPANDSP_LT_AGE@
+nobase_include_HEADERS = spandsp/adsi.h \
+                        spandsp/async.h \
+                        spandsp/arctan2.h \
+                        spandsp/at_interpreter.h \
+                        spandsp/awgn.h \
+                        spandsp/bell_r2_mf.h \
+                        spandsp/bert.h \
+                        spandsp/biquad.h \
+                        spandsp/bit_operations.h \
+                        spandsp/bitstream.h \
+                        spandsp/complex.h \
+                        spandsp/complex_filters.h \
+                        spandsp/complex_vector_float.h \
+                        spandsp/dc_restore.h \
+                        spandsp/dds.h \
+                        spandsp/dtmf.h \
+                        spandsp/echo.h \
+                        spandsp/fax.h \
+                        spandsp/fir.h \
+                        spandsp/fsk.h \
+                        spandsp/g168models.h \
+                        spandsp/g711.h \
+                        spandsp/g722.h \
+                        spandsp/g726.h \
+                        spandsp/gsm0610.h \
+                        spandsp/hdlc.h \
+                        spandsp/ima_adpcm.h \
+                        spandsp/logging.h \
+                        spandsp/lpc10.h \
+                        spandsp/modem_echo.h \
+                        spandsp/modem_connect_tones.h \
+                        spandsp/noise.h \
+                        spandsp/oki_adpcm.h \
+                        spandsp/playout.h \
+                        spandsp/plc.h \
+                        spandsp/power_meter.h \
+                        spandsp/queue.h \
+                        spandsp/schedule.h \
+                        spandsp/sig_tone.h \
+                        spandsp/silence_gen.h \
+                        spandsp/super_tone_rx.h \
+                        spandsp/super_tone_tx.h \
+                        spandsp/t4.h \
+                        spandsp/t30.h \
+                        spandsp/t30_fcf.h \
+                        spandsp/t31.h \
+                        spandsp/t35.h \
+                        spandsp/t38_core.h \
+                        spandsp/t38_gateway.h \
+                        spandsp/t38_terminal.h \
+                        spandsp/telephony.h \
+                        spandsp/time_scale.h \
+                        spandsp/timing.h \
+                        spandsp/tone_detect.h \
+                        spandsp/tone_generate.h \
+                        spandsp/v17rx.h \
+                        spandsp/v17tx.h \
+                        spandsp/v22bis.h \
+                        spandsp/v27ter_rx.h \
+                        spandsp/v27ter_tx.h \
+                        spandsp/v29rx.h \
+                        spandsp/v29tx.h \
+                        spandsp/v42.h \
+                        spandsp/v42bis.h \
+                        spandsp/v8.h \
+                        spandsp/vector_float.h \
+                        spandsp/vector_int.h \
+                        spandsp.h
+
+noinst_HEADERS = faxfont.h \
+                        gsm0610_local.h \
+                        lpc10_encdecs.h \
+                        t4states.h
+
+DSP = libspandsp.dsp
+VCPROJ = libspandsp.vcproj
+WIN32SOURCES = $(libspandsp_la_SOURCES) gettimeofday.c
+WIN32HEADERS = $(nobase_include_HEADERS) spandsp.h
+DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
+VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(top_srcdir)/config-h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/config.h
+$(top_srcdir)/config-h.in:  $(am__configure_deps) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libspandsp.la: $(libspandsp_la_OBJECTS) $(libspandsp_la_DEPENDENCIES) 
+	$(LINK) -rpath $(libdir) $(libspandsp_la_LDFLAGS) $(libspandsp_la_OBJECTS) $(libspandsp_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+at_dictionary_gen$(EXEEXT): $(at_dictionary_gen_OBJECTS) $(at_dictionary_gen_DEPENDENCIES) 
+	@rm -f at_dictionary_gen$(EXEEXT)
+	$(LINK) $(at_dictionary_gen_LDFLAGS) $(at_dictionary_gen_OBJECTS) $(at_dictionary_gen_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adsi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/async.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at_dictionary_gen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at_interpreter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awgn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bell_r2_mf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bert.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bit_operations.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitstream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complex_dds.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complex_filters.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complex_vector_float.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dds.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtmf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/echo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsk.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g711.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g722_decode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g722_encode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g726.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm0610_decode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm0610_encode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm0610_long_term.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm0610_lpc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm0610_preprocess.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm0610_rpe.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm0610_short_term.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdlc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ima_adpcm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc10_analyse.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc10_decode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc10_encode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc10_placev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc10_voicing.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modem_connect_tones.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modem_echo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/noise.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oki_adpcm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playout.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power_meter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queue.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/schedule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig_tone.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/silence_gen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/super_tone_rx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/super_tone_tx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t30.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t31.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t35.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t38_core.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t38_gateway.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t38_terminal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcpuid.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_scale.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tone_detect.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tone_generate.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v17rx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v17tx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v22bis_rx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v22bis_tx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v27ter_rx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v27ter_tx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v29rx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v29tx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v42.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v42bis.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v8.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_float.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_int.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_includeHEADERS: $(nobase_include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+	  $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+uninstall-nobase_includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_include_HEADERS)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(mkdir_p) $(distdir)/.. $(distdir)/spandsp
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) config.h
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_includeHEADERS
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
+	uninstall-nobase_includeHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
+	distclean distclean-compile distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-libLTLIBRARIES install-man \
+	install-nobase_includeHEADERS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-libLTLIBRARIES uninstall-nobase_includeHEADERS
+
+
+# We need to run at_dictionary_gen, so it generates the at_interpreter_dictionary.h file
+# used by several of the test programs.
+
+at_interpreter.$(OBJEXT): at_dictionary_gen$(EXEEXT) at_interpreter_dictionary.h
+
+at_interpreter.lo: at_dictionary_gen$(EXEEXT) at_interpreter_dictionary.h
+
+at_interpreter_dictionary.h: at_dictionary_gen$(EXEEXT)
+	./at_dictionary_gen$(EXEEXT) >at_interpreter_dictionary.h
+
+$(DSP): msvc/msvcproj.head msvc/msvcproj.foot Makefile.am
+	echo "creating $(DSP)"
+	@(cp $(srcdir)/msvc/msvcproj.head $(DSP); \
+	echo "# Begin Group \"Source Files\"" $(DSPOUT); \
+	for file in $(WIN32SOURCES); do \
+	echo "# Begin Source File" $(DSPOUT); \
+	echo "" $(DSPOUT); \
+	echo "SOURCE=.\\"$$file $(DSPOUT); \
+	echo "# End Source File" $(DSPOUT); \
+	done; \
+	echo "# End Group" $(DSPOUT); \
+	echo "# Begin Group \"Header Files\"" $(DSPOUT); \
+	for file in $(WIN32HEADERS); do \
+	echo "# Begin Source File" $(DSPOUT); \
+	echo "" $(DSPOUT); \
+	echo "SOURCE=.\\"$$file $(DSPOUT); \
+	echo "# End Source File" $(DSPOUT); \
+	done; \
+	echo "# End Group" $(DSPOUT); \
+	cat $(srcdir)/msvc/msvcproj.foot $(DSPOUT) )
+
+$(VCPROJ): msvc/vc8proj.head msvc/vc8proj.foot Makefile.am
+	echo "creating $(VCPROJ)"
+	@(cp $(srcdir)/msvc/vc8proj.head $(VCPROJ); \
+	for file in $(WIN32SOURCES); do \
+		echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
+	done; \
+	echo "</Filter><Filter  Name=\"Header Files\">" $(VCPROJOUT); \
+	for file in $(WIN32HEADERS); do \
+		echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
+	done; \
+	cat $(srcdir)/msvc/vc8proj.foot $(VCPROJOUT) )
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/adsi.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,966 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * adsi.c - Analogue display service interfaces of various types, including
+ *          ADSI, TDD and most caller ID formats.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: adsi.c,v 1.36 2006/11/19 14:07:23 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/dds.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/fsk.h"
+#include "spandsp/tone_detect.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/dtmf.h"
+#include "spandsp/adsi.h"
+
+#define BAUDOT_FIGURE_SHIFT     0x1B
+#define BAUDOT_LETTER_SHIFT     0x1F
+
+#define SOH 0x01
+#define STX 0x02
+#define ETX 0x03
+#define DLE 0x10
+#define SUB 0x1A
+
+static uint8_t adsi_encode_baudot(adsi_tx_state_t *s, uint8_t ch);
+static uint8_t adsi_decode_baudot(adsi_rx_state_t *s, uint8_t ch);
+
+static int adsi_tx_get_bit(void *user_data)
+{
+    int bit;
+    adsi_tx_state_t *s;
+    
+    s = (adsi_tx_state_t *) user_data;
+    /* This is similar to the async. handling code in fsk.c, but a few special
+       things are needed in the preamble, and postamble of an ADSI message. */
+    if (s->bitno < 300)
+    {
+        /* Alternating bit preamble */
+        bit = s->bitno & 1;
+        s->bitno++;
+    }
+    else if (s->bitno < 300 + s->ones_len)
+    {
+        /* All 1s for receiver conditioning */
+        /* NB: The receiver is an async one. It needs a rest after the
+               alternating 1/0 sequence so it can reliably pick up on
+               the next start bit, and sync to the byte stream. */
+        /* The length of this period varies with the circumstance */
+        bit = 1;
+        s->bitno++;
+    }
+    else if (s->bitno < 300 + s->ones_len + 1)
+    {
+        if (s->bitpos == 0)
+        {
+            /* Start bit */
+            bit = 0;
+            s->bitpos++;
+        }
+        else if (s->bitpos < 9)
+        {
+            bit = (s->msg[s->byteno] >> (s->bitpos - 1)) & 1;
+            s->bitpos++;
+        }
+        else
+        {
+            /* Stop bit */
+            bit = 1;
+            s->bitpos = 0;
+            s->byteno++;
+            if (s->byteno > s->msg_len)
+                s->bitno++;
+        }
+    }
+    else if (s->bitno < 300 + s->ones_len + 5)
+    {
+        /* Extra stop bits beyond the last character, to meet the specs., and ensure
+           all bits are out of the DSP before we shut off the FSK modem. */
+        bit = 1;
+        s->bitno++;
+    }
+    else
+    {
+        bit = 2;
+        if (s->tx_signal_on)
+        {
+            /* The FSK should now be switched off. */
+            s->tx_signal_on = FALSE;
+            s->msg_len = 0;
+        }
+    }
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int adsi_tdd_get_async_byte(void *user_data)
+{
+    adsi_tx_state_t *s;
+    
+    s = (adsi_tx_state_t *) user_data;
+    if (s->byteno < s->msg_len)
+        return s->msg[s->byteno++];
+    if (s->tx_signal_on)
+    {
+        /* The FSK should now be switched off. */
+        s->tx_signal_on = FALSE;
+        s->msg_len = 0;
+    }
+    return 0x1F;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void adsi_rx_put_bit(void *user_data, int bit)
+{
+    adsi_rx_state_t *s;
+    int i;
+    int sum;
+
+    s = (adsi_rx_state_t *) user_data;
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_CARRIER_UP:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Carrier up.\n");
+            s->consecutive_ones = 0;
+            s->bitpos = 0;
+            s->in_progress = 0;
+            s->msg_len = 0;
+            s->baudot_shift = 0;
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Carrier down.\n");
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_WARNING, "Unexpected special put bit value - %d!\n", bit);
+            break;
+        }
+        return;
+    }
+    bit &= 1;
+    if (s->bitpos == 0)
+    {
+        if (bit == 0)
+        {
+            /* Start bit */
+            s->bitpos++;
+            if (s->consecutive_ones > 10)
+            {
+                /* This is a line idle condition, which means we should
+                   restart message acquisition */
+                s->msg_len = 0;
+            }
+            s->consecutive_ones = 0;
+        }
+        else
+        {
+            s->consecutive_ones++;
+        }
+    }
+    else if (s->bitpos <= 8)
+    {
+        s->in_progress >>= 1;
+        if (bit)
+            s->in_progress |= 0x80;
+        s->bitpos++;
+    }
+    else
+    {
+        /* Stop bit */
+        if (bit)
+        {
+            if (s->msg_len < 256)
+            {
+                if (s->standard == ADSI_STANDARD_JCLIP)
+                {
+                    if (s->msg_len == 0)
+                    {
+                        /* A message should start DLE SOH, but let's just check 
+                           we are starting with a DLE for now */
+                        if (s->in_progress == (0x80 | DLE))
+                            s->msg[s->msg_len++] = (uint8_t) s->in_progress;
+                    }
+                    else
+                    {
+                        s->msg[s->msg_len++] = (uint8_t) s->in_progress;
+                    }
+                    if (s->msg_len >= 11  &&  s->msg_len == ((s->msg[6] & 0x7F) + 11))
+                    {
+                        /* Test the CRC-16 */
+                        if (crc_itu16_calc(s->msg + 2, s->msg_len - 2, 0) == 0)
+                        {
+                            /* Strip off the parity bits. It doesn't seem
+                               worthwhile actually checking the parity if a
+                               CRC check has succeeded. */
+                            for (i = 0;  i < s->msg_len - 2;  i++)
+                                s->msg[i] &= 0x7F;
+                            /* Put everything, except the CRC octets */
+                            s->put_msg(s->user_data, s->msg, s->msg_len - 2);
+                        }
+                        else
+                        {
+                            span_log(&s->logging, SPAN_LOG_WARNING, "CRC failed\n");
+                        }
+                        s->msg_len = 0;
+                    }
+                }
+                else
+                {
+                    s->msg[s->msg_len++] = (uint8_t) s->in_progress;
+                    if (s->msg_len >= 3  &&  s->msg_len == (s->msg[1] + 3))
+                    {
+                        /* Test the checksum */
+                        sum = 0;
+                        for (i = 0;  i < s->msg_len - 1;  i++)
+                            sum += s->msg[i];
+                        if ((-sum & 0xFF) == s->msg[i])
+                            s->put_msg(s->user_data, s->msg, s->msg_len - 1);
+                        else
+                            span_log(&s->logging, SPAN_LOG_WARNING, "Sumcheck failed\n");
+                        s->msg_len = 0;
+                    }
+                }
+            }
+        }
+        else
+        {
+            s->framing_errors++;
+        }
+        s->bitpos = 0;
+        s->in_progress = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void adsi_tdd_put_async_byte(void *user_data, int byte)
+{
+    adsi_rx_state_t *s;
+    uint8_t octet;
+    
+    s = (adsi_rx_state_t *) user_data;
+    if (byte < 0)
+    {
+        /* Special conditions */
+        switch (byte)
+        {
+        case PUTBIT_CARRIER_UP:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Carrier up.\n");
+            s->consecutive_ones = 0;
+            s->bitpos = 0;
+            s->in_progress = 0;
+            s->msg_len = 0;
+            s->baudot_shift = 0;
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Carrier down.\n");
+            if (s->msg_len > 0)
+            {
+                /* Whatever we have to date constitutes the message */
+                s->put_msg(s->user_data, s->msg, s->msg_len);
+                s->msg_len = 0;
+            }
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_WARNING, "Unexpected special put byte value - %d!\n", byte);
+            break;
+        }
+        return;
+    }
+    if ((octet = adsi_decode_baudot(s, (uint8_t) byte)))
+        s->msg[s->msg_len++] = octet;
+    if (s->msg_len >= 256)
+    {
+        s->put_msg(s->user_data, s->msg, s->msg_len);
+        s->msg_len = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void adsi_rx_dtmf(void *user_data, const char *digits, int len)
+{
+    adsi_rx_state_t *s;
+
+    s = (adsi_rx_state_t *) user_data;
+    if (s->msg_len == 0)
+    {
+        /* Message starting. Start a 10s timeout, to make things more noise
+           tolerant for a detector running continuously when on hook. */
+        s->in_progress = 80000;
+    }
+    for (  ;  len  &&  s->msg_len < 256;  len--)
+    {
+        if (*digits == '#')
+        {
+            s->put_msg(s->user_data, s->msg, s->msg_len);
+            s->msg_len = 0;
+        }
+        else
+        {
+            s->msg[s->msg_len++] = *digits++;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void start_tx(adsi_tx_state_t *s)
+{
+    switch (s->standard)
+    {
+    case ADSI_STANDARD_CLASS:
+        fsk_tx_init(&(s->fsktx), &preset_fsk_specs[FSK_BELL202], adsi_tx_get_bit, s);
+        break;
+    case ADSI_STANDARD_CLIP:
+    case ADSI_STANDARD_ACLIP:
+    case ADSI_STANDARD_JCLIP:
+        fsk_tx_init(&(s->fsktx), &preset_fsk_specs[FSK_V23CH1], adsi_tx_get_bit, s);
+        break;
+    case ADSI_STANDARD_CLIP_DTMF:
+        dtmf_tx_init(&(s->dtmftx));
+        break;
+    case ADSI_STANDARD_TDD:
+        fsk_tx_init(&(s->fsktx), &preset_fsk_specs[FSK_WEITBRECHT], async_tx_get_bit, &(s->asynctx));
+        async_tx_init(&(s->asynctx), 5, ASYNC_PARITY_NONE, 2, FALSE, adsi_tdd_get_async_byte, s);
+        /* Schedule an explicit shift at the start of baudot transmission */
+        s->baudot_shift = 2;
+        break;
+    }
+    s->tx_signal_on = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+void adsi_rx(adsi_rx_state_t *s, const int16_t *amp, int len)
+{
+    switch (s->standard)
+    {
+    case ADSI_STANDARD_CLIP_DTMF:
+        /* Apply a message timeout. */
+        s->in_progress -= len;
+        if (s->in_progress <= 0)
+            s->msg_len = 0;
+        dtmf_rx(&(s->dtmfrx), amp, len);
+        break;
+    default:
+        fsk_rx(&(s->fskrx), amp, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void adsi_rx_init(adsi_rx_state_t *s,
+                  int standard,
+                  put_msg_func_t put_msg,
+                  void *user_data)
+{
+    memset(s, 0, sizeof(*s));
+    s->put_msg = put_msg;
+    s->user_data = user_data;
+    switch (standard)
+    {
+    case ADSI_STANDARD_CLASS:
+        fsk_rx_init(&(s->fskrx), &preset_fsk_specs[FSK_BELL202], FALSE, adsi_rx_put_bit, s);
+        break;
+    case ADSI_STANDARD_CLIP:
+    case ADSI_STANDARD_ACLIP:
+    case ADSI_STANDARD_JCLIP:
+        fsk_rx_init(&(s->fskrx), &preset_fsk_specs[FSK_V23CH1], FALSE, adsi_rx_put_bit, s);
+        break;
+    case ADSI_STANDARD_CLIP_DTMF:
+        dtmf_rx_init(&(s->dtmfrx), adsi_rx_dtmf, s);
+        break;
+    case ADSI_STANDARD_TDD:
+        fsk_rx_init(&(s->fskrx), &preset_fsk_specs[FSK_WEITBRECHT], FALSE, async_rx_put_bit, &(s->asyncrx));
+        async_rx_init(&(s->asyncrx), 5, ASYNC_PARITY_NONE, 2, TRUE, adsi_tdd_put_async_byte, s);
+        break;
+    }
+    s->standard = standard;
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+}
+/*- End of function --------------------------------------------------------*/
+
+int adsi_tx(adsi_tx_state_t *s, int16_t *amp, int max_len)
+{
+    int len;
+
+    len = tone_gen(&(s->alert_tone_gen), amp, max_len);
+    switch (s->standard)
+    {
+    case ADSI_STANDARD_CLIP_DTMF:
+        if (len < max_len)
+            len += dtmf_tx(&(s->dtmftx), amp, max_len - len);
+        break;
+    default:
+        if (len < max_len  &&  s->tx_signal_on)
+            len += fsk_tx(&(s->fsktx), amp + len, max_len - len);
+        break;
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+void adsi_send_alert_tone(adsi_tx_state_t *s)
+{
+    tone_gen_init(&(s->alert_tone_gen), &(s->alert_tone_desc));
+}
+/*- End of function --------------------------------------------------------*/
+
+int adsi_put_message(adsi_tx_state_t *s, uint8_t *msg, int len)
+{
+    int i;
+    int j;
+    int k;
+    int byte;
+    int parity;
+    int sum;
+    size_t ii;
+    uint16_t crc_value;
+
+    /* Don't inject a new message when a previous one is still in progress */
+    if (s->msg_len > 0)
+        return 0;
+    if (!s->tx_signal_on)
+    {
+        /* We need to restart the modem */
+        start_tx(s);
+    }
+    switch (s->standard)
+    {
+    case ADSI_STANDARD_CLIP_DTMF:
+        if (len >= 128)
+            return -1;
+        msg[len] = '\0';
+        len -= (int) dtmf_tx_put(&(s->dtmftx), (char *) msg);
+        break;
+    case ADSI_STANDARD_JCLIP:
+        if (len > 128 - 9)
+            return -1;
+        i = 0;
+        s->msg[i++] = DLE;
+        s->msg[i++] = SOH;
+        s->msg[i++] = 0x07; //header
+        s->msg[i++] = DLE;
+        s->msg[i++] = STX;
+        s->msg[i++] = msg[0];
+        s->msg[i++] = (uint8_t) (len - 2);
+        /* We might need to byte stuff the overall length, but the rest of the
+           message should already be stuffed. */
+        if (len - 2 == DLE)
+            s->msg[i++] = DLE;
+        memcpy(&s->msg[i], &msg[2], len - 2);
+        i += len - 2;
+        s->msg[i++] = DLE;
+        s->msg[i++] = ETX;
+        
+        /* Set the parity bits */
+        for (j = 0;  j < i;  j++)
+        {
+            byte = s->msg[j];
+            parity = 0;
+            for (k = 1;  k <= 7;  k++)
+                parity ^= (byte << k);
+            s->msg[j] = (s->msg[j] & 0x7F) | ((uint8_t) parity & 0x80);
+        }
+
+        crc_value = crc_itu16_calc(s->msg + 2, i - 2, 0);
+        s->msg[i++] = (uint8_t) (crc_value & 0xFF);
+        s->msg[i++] = (uint8_t) ((crc_value >> 8) & 0xFF);
+        s->msg_len = i;
+
+        s->ones_len = 80;
+        break;
+    case ADSI_STANDARD_TDD:
+        if (len > 255)
+            return -1;
+        memcpy(s->msg, msg, len);
+        s->msg_len = len;
+        break;
+    default:
+        if (len > 255)
+            return -1;
+        memcpy(s->msg, msg, len);
+        /* Force the length in case it is wrong */
+        s->msg[1] = (uint8_t) (len - 2);
+        /* Add the sumcheck */
+        sum = 0;
+        for (ii = 0;  ii < (size_t) len;  ii++)
+            sum += s->msg[ii];
+        s->msg[len] = (uint8_t) ((-sum) & 0xFF);
+        s->msg_len = len + 1;
+        s->ones_len = 80;
+        break;
+    }    
+    /* Prepare the bit sequencing */
+    s->byteno = 0;
+    s->bitpos = 0;
+    s->bitno = 0;
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+void adsi_tx_init(adsi_tx_state_t *s, int standard)
+{
+    memset(s, 0, sizeof(*s));
+    make_tone_gen_descriptor(&(s->alert_tone_desc),
+                             2130,
+                             -13,
+                             2750,
+                             -13,
+                             110,
+                             60,
+                             0,
+                             0,
+                             FALSE);
+    s->standard = standard;
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    start_tx(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static uint8_t adsi_encode_baudot(adsi_tx_state_t *s, uint8_t ch)
+{
+    static const uint8_t conv[128] =
+    {
+        0x00, /* NUL */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0x42, /* LF */
+        0xFF, /*   */
+        0xFF, /*   */
+        0x48, /* CR */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0xFF, /*   */
+        0x44, /*   */
+        0xFF, /* ! */
+        0xFF, /* " */
+        0x94, /* # */
+        0x89, /* $ */
+        0xFF, /* % */
+        0xFF, /* & */
+        0x85, /* ' */
+        0x8F, /* ( */
+        0x92, /* ) */
+        0x8B, /* * */
+        0x91, /* + */
+        0x8C, /* , */
+        0x83, /* - */
+        0x9C, /* . */
+        0x9D, /* / */
+        0x96, /* 0 */
+        0x97, /* 1 */
+        0x93, /* 2 */
+        0x81, /* 3 */
+        0x8A, /* 4 */
+        0x90, /* 5 */
+        0x95, /* 6 */
+        0x87, /* 7 */
+        0x86, /* 8 */
+        0x98, /* 9 */
+        0x8E, /* : */
+        0xFF, /* ; */
+        0xFF, /* < */
+        0x9E, /* = */
+        0xFF, /* > */
+        0x99, /* ? */
+        0xFF, /* @ */
+        0x03, /* A */
+        0x19, /* B */
+        0x0E, /* C */
+        0x09, /* D */
+        0x01, /* E */
+        0x0D, /* F */
+        0x1A, /* G */
+        0x14, /* H */
+        0x06, /* I */
+        0x0B, /* J */
+        0x0F, /* K */
+        0x12, /* L */
+        0x1C, /* M */
+        0x0C, /* N */
+        0x18, /* O */
+        0x16, /* P */
+        0x17, /* Q */
+        0x0A, /* R */
+        0x05, /* S */
+        0x10, /* T */
+        0x07, /* U */
+        0x1E, /* V */
+        0x13, /* W */
+        0x1D, /* X */
+        0x15, /* Y */
+        0x11, /* Z */
+        0xFF, /* [ */
+        0xFF, /* \ */
+        0xFF, /* ] */
+        0x9B, /* ^ */
+        0xFF, /* _ */
+        0xFF, /* ` */
+        0x03, /* a */
+        0x19, /* b */
+        0x0E, /* c */
+        0x09, /* d */
+        0x01, /* e */
+        0x0D, /* f */
+        0x1A, /* g */
+        0x14, /* h */
+        0x06, /* i */
+        0x0B, /* j */
+        0x0F, /* k */
+        0x12, /* l */
+        0x1C, /* m */
+        0x0C, /* n */
+        0x18, /* o */
+        0x16, /* p */
+        0x17, /* q */
+        0x0A, /* r */
+        0x05, /* s */
+        0x10, /* t */
+        0x07, /* u */
+        0x1E, /* v */
+        0x13, /* w */
+        0x1D, /* x */
+        0x15, /* y */
+        0x11, /* z */
+        0xFF, /* { */
+        0xFF, /* | */
+        0xFF, /* } */
+        0xFF, /* ~ */
+        0xFF, /* DEL */
+    };
+
+    ch = conv[ch];
+    if (ch != 0xFF)
+    {
+        if ((ch & 0x40))
+            return ch & 0x1F;
+        if ((ch & 0x80))
+        {
+            if (s->baudot_shift == 1)
+                return ch & 0x1F;
+            s->baudot_shift = 1;
+            return (BAUDOT_FIGURE_SHIFT << 5) | (ch & 0x1F);
+        }
+        else
+        {
+            if (s->baudot_shift == 0)
+                return ch & 0x1F;
+            s->baudot_shift = 0;
+            return (BAUDOT_LETTER_SHIFT << 5) | (ch & 0x1F);
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static uint8_t adsi_decode_baudot(adsi_rx_state_t *s, uint8_t ch)
+{
+    static const uint8_t conv[2][32] =
+    {
+        {"\000E\nA SIU\rDRJNFCKTZLWHYPQOBG^MXV^"},
+        {"\0003\n- '87\r$4*,*:(5+)2#6019?*^./=^"}
+    };
+
+    switch (ch)
+    {
+    case BAUDOT_FIGURE_SHIFT:
+        s->baudot_shift = 1;
+        break;
+    case BAUDOT_LETTER_SHIFT:
+        s->baudot_shift = 0;
+        break;
+    default:
+        return conv[s->baudot_shift][ch];
+    }
+    /* return 0 if we did not produce a character */
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int adsi_next_field(adsi_rx_state_t *s, const uint8_t *msg, int msg_len, int pos, uint8_t *field_type, uint8_t const **field_body, int *field_len)
+{
+    int i;
+
+    /* Return -1 for no more fields. Return -2 for message structure corrupt. */
+    switch (s->standard)
+    {
+    case ADSI_STANDARD_CLASS:
+    case ADSI_STANDARD_CLIP:
+    case ADSI_STANDARD_ACLIP:
+        if (pos >= msg_len)
+            return -1;
+        /* For MDMF type messages, these standards all use "IE" type fields - type,
+           length, contents - and similar headers */
+        if (pos <= 0)
+        {
+            /* Return the message type */
+            *field_type = msg[0];
+            *field_len = 0;
+            *field_body = NULL;
+            pos = 2;
+        }
+        else
+        {
+            if ((msg[0] & 0x80))
+            {
+                /* MDMF messages seem to always have a message type with the MSB set. Is that
+                   guaranteed? */
+                *field_type = msg[pos++];
+                *field_len = msg[pos++];
+                *field_body = msg + pos;
+            }
+            else
+            {
+                /* SDMF */
+                *field_type = 0;
+                *field_len = msg_len - pos;
+                *field_body = msg + pos;
+            }
+            pos += *field_len;
+        }
+        if (pos > msg_len)
+            return -2;
+        break;
+    case ADSI_STANDARD_JCLIP:
+        if (pos >= msg_len - 2)
+            return -1;
+        if (pos <= 0)
+        {
+            /* Return the message type */
+            pos = 5;
+            *field_type = msg[pos++];
+            if (*field_type == DLE)
+                pos++;
+            if (msg[pos++] == DLE)
+                pos++;
+            *field_len = 0;
+            *field_body = NULL;
+        }
+        else
+        {
+            *field_type = msg[pos++];
+            if (*field_type == DLE)
+                pos++;
+            *field_len = msg[pos++];
+            if (*field_len == DLE)
+                pos++;
+            /* TODO: we assume here that the body contains no DLE's that would have been stuffed */
+            *field_body = msg + pos;
+            pos += *field_len;
+        }
+        if (pos > msg_len - 2)
+            return -2;
+        break;
+    case ADSI_STANDARD_CLIP_DTMF:
+        if (pos >= msg_len)
+            return -1;
+        if (pos < 0)
+            pos = 0;
+        *field_type = msg[pos++];
+        *field_body = msg + pos;
+        i = pos;
+        while (i < msg_len  &&  msg[i] != '#')
+            i++;
+        *field_len = i - pos;
+        pos = i;
+        if (msg[pos] == '#')
+            pos++;
+        if (pos > msg_len)
+            return -2;
+        break;
+    case ADSI_STANDARD_TDD:
+        if (pos >= msg_len)
+            return -1;
+        *field_type = 0;
+        *field_body = msg;
+        *field_len = msg_len;
+        pos = msg_len;
+        break;
+    }
+    return pos;
+}
+/*- End of function --------------------------------------------------------*/
+
+int adsi_add_field(adsi_tx_state_t *s, uint8_t *msg, int len, uint8_t field_type, uint8_t const *field_body, int field_len)
+{
+    int i;
+    int x;
+
+    switch (s->standard)
+    {
+    case ADSI_STANDARD_CLASS:
+    case ADSI_STANDARD_CLIP:
+    case ADSI_STANDARD_ACLIP:
+        /* These standards all use "IE" type fields - type, length, value - and similar headers */
+        if (len <= 0)
+        {
+            /* Initialise a new message. The field type is actually the message type. */
+            msg[0] = field_type;
+            msg[1] = 0;
+            len = 2;
+        }
+        else
+        {
+            /* Add to a message in progress. */
+            if (field_type)
+            {
+                msg[len++] = field_type;
+                msg[len++] = (uint8_t) field_len;
+                if (field_len == DLE)
+                    msg[len++] = (uint8_t) field_len;
+                memcpy(msg + len, field_body, field_len);
+                len += field_len;
+            }
+            else
+            {
+                /* No field type or length, for restricted single message formats */
+                memcpy(msg + len, field_body, field_len);
+                len += field_len;
+            }
+        }
+        break;
+    case ADSI_STANDARD_JCLIP:
+        /* This standard uses "IE" type fields - type, length, value - but escapes DLE characters,
+           to prevent immitation of a control octet. */
+        if (len <= 0)
+        {
+            /* Initialise a new message. The field type is actually the message type. */
+            msg[0] = field_type;
+            msg[1] = 0;
+            len = 2;
+        }
+        else
+        {
+            /* Add to a message in progress. */
+            msg[len++] = field_type;
+            if (field_type == DLE)
+                msg[len++] = field_type;
+            msg[len++] = (uint8_t) field_len;
+            if (field_len == DLE)
+                msg[len++] = (uint8_t) field_len;
+            for (i = 0;  i < field_len;  i++)
+            {
+                msg[len++] = field_body[i];
+                if (field_body[i] == DLE)
+                    msg[len++] = field_body[i];
+            }
+        }
+        break;
+    case ADSI_STANDARD_CLIP_DTMF:
+        if (len < 0)
+        {
+            len = 0;
+        }
+        else
+        {
+            msg[len] = field_type;
+            memcpy(msg + len + 1, field_body, field_len);
+            msg[len + field_len + 1] = '#';
+            len += (field_len + 2);
+        }
+        break;
+    case ADSI_STANDARD_TDD:
+        if (len < 0)
+            len = 0;
+        for (i = 0;  i < field_len;  i++)
+        {
+            if ((x = adsi_encode_baudot(s, field_body[i])))
+            {
+                if ((x & 0x3E0))
+                    msg[len++] = (uint8_t) ((x >> 5) & 0x1F);
+                msg[len++] = (uint8_t) (x & 0x1F);
+            }
+        }
+        break;
+    }
+
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *adsi_standard_to_str(int standard)
+{
+    switch (standard)
+    {
+    case ADSI_STANDARD_CLASS:
+        return "CLASS";
+    case ADSI_STANDARD_CLIP:
+        return "CLIP";
+    case ADSI_STANDARD_ACLIP:
+        return "A-CLIP";
+    case ADSI_STANDARD_JCLIP:
+        return "J-CLIP";
+    case ADSI_STANDARD_CLIP_DTMF:
+        return "CLIP-DTMF";
+    case ADSI_STANDARD_TDD:
+        return "TDD";
+    }
+    return "???";
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/async.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,218 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * async.c - Asynchronous serial bit stream encoding and decoding
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: async.c,v 1.6 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/async.h"
+
+void async_rx_init(async_rx_state_t *s,
+                   int data_bits,
+                   int parity,
+                   int stop_bits,
+                   int use_v14,
+                   put_byte_func_t put_byte,
+                   void *user_data)
+{
+    s->data_bits = data_bits;
+    s->parity = parity;
+    s->stop_bits = stop_bits;
+    s->use_v14 = use_v14;
+
+    s->put_byte = put_byte;
+    s->user_data = user_data;
+
+    s->byte_in_progress = 0;
+    s->bitpos = 0;
+    s->parity_bit = 0;
+
+    s->parity_errors = 0;
+    s->framing_errors = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void async_rx_put_bit(void *user_data, int bit)
+{
+    async_rx_state_t *s;
+
+    s = (async_rx_state_t *) user_data;
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_CARRIER_UP:
+        case PUTBIT_CARRIER_DOWN:
+        case PUTBIT_TRAINING_SUCCEEDED:
+        case PUTBIT_TRAINING_FAILED:
+        case PUTBIT_END_OF_DATA:
+            s->put_byte(s->user_data, bit);
+            s->bitpos = 0;
+            s->byte_in_progress = 0;
+            break;
+        default:
+            //printf("Eh!\n");
+            break;
+        }
+        return;
+    }
+    if (s->bitpos == 0)
+    {
+        /* Search for the start bit */
+        s->bitpos += (bit ^ 1);
+        s->parity_bit = 0;
+        s->byte_in_progress = 0;
+    }
+    else if (s->bitpos <= s->data_bits)
+    {
+        s->byte_in_progress = (s->byte_in_progress >> 1) | (bit << 7);
+        s->parity_bit ^= bit;
+        s->bitpos++;
+    }
+    else if (s->parity  &&  s->bitpos == s->data_bits + 1)
+    {
+        if (s->parity == ASYNC_PARITY_ODD)
+            s->parity_bit ^= 1;
+
+        if (s->parity_bit != bit)
+            s->parity_errors++;
+        s->bitpos++;
+    }
+    else
+    {
+        /* Stop bit */
+        if (bit == 1)
+        {
+            /* Align the received value */
+            if (s->data_bits < 8)
+                s->byte_in_progress >>= (8 - s->data_bits);
+            s->put_byte(s->user_data, s->byte_in_progress);
+            s->bitpos = 0;
+        }
+        else if (s->use_v14)
+        {
+            /* This is actually the start bit for the next character, and
+               the stop bit has been dropped from the stream. This is the
+               rate adaption specified in V.14 */
+            /* Align the received value */
+            if (s->data_bits < 8)
+                s->byte_in_progress >>= (8 - s->data_bits);
+            s->put_byte(s->user_data, s->byte_in_progress);
+            s->bitpos = 1;
+            s->parity_bit = 0;
+            s->byte_in_progress = 0;
+        }
+        else
+        {
+            s->framing_errors++;
+            s->bitpos = 0;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void async_tx_init(async_tx_state_t *s,
+                   int data_bits,
+                   int parity,
+                   int stop_bits,
+                   int use_v14,
+                   get_byte_func_t get_byte,
+                   void *user_data)
+{
+    /* We have a use_v14 parameter for completeness, but right now V.14 only
+       applies to the receive side. We are unlikely to have an application where
+       flow control does not exist, so V.14 stuffing is not needed. */
+    s->data_bits = data_bits;
+    s->parity = parity;
+    s->stop_bits = stop_bits;
+    if (parity != ASYNC_PARITY_NONE)
+        s->stop_bits++;
+        
+    s->get_byte = get_byte;
+    s->user_data = user_data;
+
+    s->byte_in_progress = 0;
+    s->bitpos = 0;
+    s->parity_bit = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int async_tx_get_bit(void *user_data)
+{
+    async_tx_state_t *s;
+    int bit;
+    
+    s = (async_tx_state_t *) user_data;
+    if (s->bitpos == 0)
+    {
+        if ((s->byte_in_progress = s->get_byte(s->user_data)) < 0)
+        {
+            /* No more data */
+            bit = PUTBIT_END_OF_DATA;
+        }
+        else
+        {
+            /* Start bit */
+            bit = 0;
+            s->parity_bit = 0;
+            s->bitpos++;
+        }
+    }
+    else if (s->bitpos <= s->data_bits)
+    {
+        bit = s->byte_in_progress & 1;
+        s->byte_in_progress >>= 1;
+        s->parity_bit ^= bit;
+        s->bitpos++;
+    }
+    else if (s->parity  &&  s->bitpos == s->data_bits + 1)
+    {
+        if (s->parity == ASYNC_PARITY_ODD)
+            s->parity_bit ^= 1;
+        bit = s->parity_bit;
+        s->bitpos++;
+    }
+    else
+    {
+        /* Stop bit(s) */
+        bit = 1;
+        if (++s->bitpos > s->data_bits + s->stop_bits)
+            s->bitpos = 0;
+    }
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/at_dictionary_gen.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,634 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * at_dictionary_gen.c - Generate a trie based dictionary for the AT
+ *                       commands supported by the AT interpreter.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: at_dictionary_gen.c,v 1.7 2006/11/30 15:41:47 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define _GNU_SOURCE
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#include <assert.h>
+
+const char *wordlist[] =
+{
+    " ",        /* Dummy to absorb spaces in commands */
+    "&C",       /* V.250 6.2.8 - Circuit 109 (received line signal detector), behaviour */ 
+    "&D",       /* V.250 6.2.9 - Circuit 108 (data terminal ready) behaviour */ 
+    "&F",       /* V.250 6.1.2 - Set to factory-defined configuration */ 
+    "+A8A",     /* V.251 6.3 - V.8 calling tone indication */
+    "+A8C",     /* V.251 6.2 - V.8 answer signal indication */
+    "+A8E",     /* V.251 5.1 - V.8 and V.8bis operation controls */
+    "+A8I",     /* V.251 6.1 - V.8 CI signal indication */
+    "+A8J",     /* V.251 6.4 - V.8 negotiation complete */
+    "+A8M",     /* V.251 5.2 - Send V.8 menu signals */
+    "+A8R",     /* V.251 6.6 - V.8bis signal and message reporting */
+    "+A8T",     /* V.251 5.3 - Send V.8bis signal and/or message(s) */
+    "+ASTO",    /* V.250 6.3.15 - Store telephone number */ 
+    "+CAAP",    /* 3GPP TS 27.007 7.25 - Automatic answer for eMLPP Service */
+    "+CACM",    /* 3GPP TS 27.007 8.25 - Accumulated call meter */
+    "+CACSP",   /* 3GPP TS 27.007 11.1.7 - Voice Group or Voice Broadcast Call State Attribute Presentation */
+    "+CAD",     /* IS-99 5.6.3 - Query analogue or digital service */
+    "+CAEMLPP", /* 3GPP TS 27.007 7.22 - eMLPP Priority Registration and Interrogation */
+    "+CAHLD",   /* 3GPP TS 27.007 11.1.3 - Leave an ongoing Voice Group or Voice Broadcast Call */
+    "+CAJOIN",  /* 3GPP TS 27.007 11.1.1 - Accept an incoming Voice Group or Voice Broadcast Call */
+    "+CALA",    /* 3GPP TS 27.007 8.16 - Alarm */
+    "+CALCC",   /* 3GPP TS 27.007 11.1.6 - List current Voice Group and Voice Broadcast Calls */
+    "+CALD",    /* 3GPP TS 27.007 8.38 - Delete alar m */
+    "+CALM",    /* 3GPP TS 27.007 8.20 - Alert sound mode */
+    "+CAMM",    /* 3GPP TS 27.007 8.26 - Accumulated call meter maximum */
+    "+CANCHEV", /* 3GPP TS 27.007 11.1.8 - NCH Support Indication */
+    "+CAOC",    /* 3GPP TS 27.007 7.16 - Advice of Charge */
+    "+CAPD",    /* 3GPP TS 27.007 8.39 - Postpone or dismiss an alarm */
+    "+CAPTT",   /* 3GPP TS 27.007 11.1.4 - Talker Access for Voice Group Call */
+    "+CAREJ",   /* 3GPP TS 27.007 11.1.2 - Reject an incoming Voice Group or Voice Broadcast Call */
+    "+CAULEV",  /* 3GPP TS 27.007 11.1.5 - Voice Group Call Uplink Status Presentation */
+    "+CBC",     /* 3GPP TS 27.007 8.4 - Battery charge */
+    "+CBCS",    /* 3GPP TS 27.007 11.3.2 - VBS subscriptions and GId status */
+    "+CBIP",    /* IS-99 5.6 - Base station IP address */
+    "+CBST",    /* 3GPP TS 27.007 6.7 - Select bearer service type */
+    "+CCFC",    /* 3GPP TS 27.007 7.11 - Call forwarding number and conditions */
+    "+CCLK",    /* 3GPP TS 27.007 8.15 - Clock */
+    "+CCS",     /* IS-135 4.1.22 - Compression status */
+    "+CCUG",    /* 3GPP TS 27.007 7.10 - Closed user group */
+    "+CCWA",    /* 3GPP TS 27.007 7.12 - Call waiting */
+    "+CCWE",    /* 3GPP TS 27.007 8.28 - Call Meter maximum event */
+    "+CDIP",    /* 3GPP TS 27.007 7.9 - Called line identification presentation */
+    "+CDIS",    /* 3GPP TS 27.007 8.8 - Display control */
+    "+CDV",     /* IS-99 5.6 - Dial command for voice call */
+    "+CEER",    /* 3GPP TS 27.007 6.10 - Extended error report */
+    "+CESP",    /* GSM07.05  3.2.4 - Enter SMS block mode protocol */
+    "+CFCS",    /* 3GPP TS 27.007 7.24 - Fast call setup conditions */
+    "+CFG",     /* IS-99 5.6 - Configuration string */
+    "+CFUN",    /* 3GPP TS 27.007 8.2 - Set phone functionality */
+    "+CGACT",   /* 3GPP TS 27.007 10.1.10 - PDP context activate or deactivate */
+    "+CGANS",   /* 3GPP TS 27.007 10.1.16 - Manual response to a network request for PDP context activation */
+    "+CGATT",   /* 3GPP TS 27.007 10.1.9 - PS attach or detach */
+    "+CGAUTO",  /* 3GPP TS 27.007 10.1.15 - Automatic response to a network request for PDP context activation */
+    "+CGCAP",   /* IS-99 5.6 - Request complete capabilities list */
+    "+CGCLASS", /* 3GPP TS 27.007 10.1.17 - GPRS mobile station class (GPRS only) */
+    "+CGCLOSP", /* 3GPP TS 27.007 10.1.13 - Configure local octet stream PAD parameters (Obsolete) */
+    "+CGCLPAD", /* 3GPP TS 27.007 10.1.12 - Configure local triple-X PAD parameters (GPRS only) (Obsolete) */
+    "+CGCMOD",  /* 3GPP TS 27.007 10.1.11 - PDP Context Modify */
+    "+CGCS",    /* 3GPP TS 27.007 11.3.1 - VGCS subscriptions and GId status */
+    "+CGDATA",  /* 3GPP TS 27.007 10.1.12 - Enter data state */
+    "+CGDCONT", /* 3GPP TS 27.007 10.1.1 - Define PDP Context */
+    "+CGDSCONT",/* 3GPP TS 27.007 10.1.2 - Define Secondary PDP Context */
+    "+CGEQMIN", /* 3GPP TS 27.007 10.1.7 - 3G Quality of Service Profile (Minimum acceptable) */
+    "+CGEQNEG", /* 3GPP TS 27.007 10.1.8 - 3G Quality of Service Profile (Negotiated) */
+    "+CGEQREQ", /* 3GPP TS 27.007 10.1.6 - 3G Quality of Service Profile (Requested) */
+    "+CGEREP",  /* 3GPP TS 27.007 10.1.18 - Packet Domain event reporting */
+    "+CGMI",    /* 3GPP TS 27.007 5.1 - Request manufacturer identification */
+    "+CGMM",    /* 3GPP TS 27.007 5.2 - Request model identification */
+    "+CGMR",    /* 3GPP TS 27.007 5.3 - Request revision identification */
+    "+CGOI",    /* IS-99 5.6 - Request global object identification */
+    "+CGPADDR", /* 3GPP TS 27.007 10.1.14 - Show PDP address */
+    "+CGQMIN",  /* 3GPP TS 27.007 10.1.5 - Quality of Service Profile (Minimum acceptable) */
+    "+CGQREQ",  /* 3GPP TS 27.007 10.1.4 - Quality of Service Profile (Requested) */
+    "+CGREG",   /* 3GPP TS 27.007 10.1.19 - GPRS network registration status */
+    "+CGSMS",   /* 3GPP TS 27.007 10.1.20 - Select service for MO SMS messages */
+    "+CGSN",    /* 3GPP TS 27.007 5.4 - Request product serial number identification */
+    "+CGTFT",   /* 3GPP TS 27.007 10.1.3 - Traffic Flow Template */
+    "+CHLD",    /* 3GPP TS 27.007 7.13 - Call related supplementary services */
+    "+CHSA",    /* 3GPP TS 27.007 6.18 - HSCSD non-transparent asymmetry configuration */
+    "+CHSC",    /* 3GPP TS 27.007 6.15 - HSCSD current call parameters */
+    "+CHSD",    /* 3GPP TS 27.007 6.12 - HSCSD device parameters */
+    "+CHSN",    /* 3GPP TS 27.007 6.14 - HSCSD non-transparent call configuration */
+    "+CHSR",    /* 3GPP TS 27.007 6.16 - HSCSD parameters report */
+    "+CHST",    /* 3GPP TS 27.007 6.13 - HSCSD transparent call configuration */
+    "+CHSU",    /* 3GPP TS 27.007 6.17 - HSCSD automatic user initiated upgrading */
+    "+CHUP",    /* 3GPP TS 27.007 6.5 - Hangup call */
+    "+CHV",     /* IS-99 5.6 - Hang-up voice */
+    "+CIMI",    /* 3GPP TS 27.007 5.6 - Request international mobile subscriber identity */
+    "+CIND",    /* 3GPP TS 27.007 8.9 - Indicator control */
+    "+CIT",     /* IS-99 5.6 - Command state inactivity timer */
+    "+CKPD",    /* 3GPP TS 27.007 8.7 - Keypad control */
+    "+CLAC",    /* 3GPP TS 27.007 8.37 - List all available AT commands */
+    "+CLAE",    /* 3GPP TS 27.007 8.31 - Language Event */
+    "+CLAN",    /* 3GPP TS 27.007 8.30 - Set Language */
+    "+CLCC",    /* 3GPP TS 27.007 7.18 - List current calls */
+    "+CLCK",    /* 3GPP TS 27.007 7.4 - Facility lock */
+    "+CLIP",    /* 3GPP TS 27.007 7.6 - Calling line identification presentation */
+    "+CLIR",    /* 3GPP TS 27.007 7.7 - Calling line identification restriction */
+    "+CLVL",    /* 3GPP TS 27.007 8.23 - Loudspeaker volume level */
+    "+CMAR",    /* 3GPP TS 27.007 8.36 - Master reset */
+    "+CMEC",    /* 3GPP TS 27.007 8.6 - Mobile termination control mode */
+    "+CMEE",    /* GSM07.07 9.1 - Report mobile equipment error */
+    "+CMER",    /* 3GPP TS 27.007 8.10 - Mobile termination event reporting */
+    "+CMGC",    /* GSM07.05 3.5.5/4.5 - Send command */
+    "+CMGD",    /* GSM07.05 3.5.4 - Delete message */
+    "+CMGF",    /* GSM07.05 3.2.3 - Message Format */
+    "+CMGL",    /* GSM07.05 3.4.2/4.1 -  List messages */
+    "+CMGR",    /* GSM07.05 3.4.3/4.2 - Read message */
+    "+CMGS",    /* GSM07.05 3.5.1/4.3 - Send message */
+    "+CMGW",    /* GSM07.05 3.5.3/4.4 - Write message to memory */
+    "+CMIP",    /* IS-99 5.6 - Mobile station IP address */
+    "+CMM",     /* IS-135 4.1.23 - Menu map */
+    "+CMMS",    /* GSM07.05 3.5.6 - More messages to send */
+    "+CMOD",    /* 3GPP TS 27.007 6.4 - Call mode */
+    "+CMSS",    /* GSM07.05 3.5.2/4.7 - Send message from storage */
+    "+CMUT",    /* 3GPP TS 27.007 8.24 - Mute control */
+    "+CMUX",    /* 3GPP TS 27.007 5.7 - Multiplexing mode */
+    "+CNMA",    /* GSM07.05 3.4.4/4.6 - New message acknowledgement to terminal adapter */
+    "+CNMI",    /* GSM07.05 3.4.1 - New message indications to terminal equipment */
+    "+CNUM",    /* 3GPP TS 27.007 7.1 - Subscriber number */
+    "+COLP",    /* 3GPP TS 27.007 7.8 - Connected line identification presentation */
+    "+COPN",    /* 3GPP TS 27.007 7.21 - Read operator names */
+    "+COPS",    /* 3GPP TS 27.007 7.3 - PLMN selection */
+    "+COS",     /* IS-135 4.1.24 - Originating service */
+    "+COTDI",   /* 3GPP TS 27.007 11.1.9 - Originator to Dispatcher Information */
+    "+CPAS",    /* 3GPP TS 27.007 8.1 - Phone activity status */
+    "+CPBF",    /* 3GPP TS 27.007 8.13 - Find phonebook entries */
+    "+CPBR",    /* 3GPP TS 27.007 8.12 - Read phonebook entries */
+    "+CPBS",    /* 3GPP TS 27.007 8.11 - Select phonebook memory storage */
+    "+CPBW",    /* 3GPP TS 27.007 8.14 - Write phonebook entry */
+    "+CPIN",    /* 3GPP TS 27.007 8.3 - Enter PIN */
+    "+CPLS",    /* 3GPP TS 27.007 7.20 - Selection of preferred PLMN list */
+    "+CPMS",    /* GSM07.05 3.2.2 - Preferred message storage */
+    "+CPOL",    /* 3GPP TS 27.007 7.19 - Preferred PLMN list */
+    "+CPPS",    /* 3GPP TS 27.007 7.23 - eMLPP subscriptions */
+    "+CPROT",   /* 3GPP TS 27.007 8.42 - Enter protocol mode */
+    "+CPUC",    /* 3GPP TS 27.007 8.27 - Price per unit and currency table */
+    "+CPWC",    /* 3GPP TS 27.007 8.29 - Power class */
+    "+CPWD",    /* 3GPP TS 27.007 7.5 - Change password */
+    "+CQD",     /* IS-135 4.1.25 - Query disconnect timer */
+    "+CR",      /* 3GPP TS 27.007 6.9 - Service reporting control */
+    "+CRC",     /* 3GPP TS 27.007 6.11 - Cellular result codes */
+    "+CREG",    /* 3GPP TS 27.007 7.2 - Network registration */
+    "+CRES",    /* GSM07.05 3.3.6 - Restore Settings */
+    "+CRLP",    /* 3GPP TS 27.007 6.8 - Radio link protocol */
+    "+CRM",     /* IS-99 5.6 - Set rm interface protocol */
+    "+CRMC",    /* 3GPP TS 27.007 8.34 - Ring Melody Control */
+    "+CRMP",    /* 3GPP TS 27.007 8.35 - Ring Melody Playback */
+    "+CRSL",    /* 3GPP TS 27.007 8.21 - Ringer sound level */
+    "+CRSM",    /* 3GPP TS 27.007 8.18 - Restricted SIM access */
+    "+CSAS",    /* GSM07.05 3.3.5 - Save settings */
+    "+CSCA",    /* GSM07.05 3.3.1 - Service centre address */
+    "+CSCB",    /* GSM07.05 3.3.4 - Select cell broadcast message types */
+    "+CSCC",    /* 3GPP TS 27.007 8.19 - Secure control command */
+    "+CSCS",    /* 3GPP TS 27.007 5.5 - Select TE character set */
+    "+CSDF",    /* 3GPP TS 27.007 6.22 - Settings date format */
+    "+CSDH",    /* GSM07.05 3.3.3 - Show text mode parameters */
+    "+CSGT",    /* 3GPP TS 27.007 8.32 - Set Greeting Text */
+    "+CSIL",    /* 3GPP TS 27.007 6.23 - Silence Command */
+    "+CSIM",    /* 3GPP TS 27.007 8.17 - Generic SIM access */
+    "+CSMP",    /* GSM07.05 3.3.2 - Set text mode parameters */
+    "+CSMS",    /* GSM07.05 3.2.1 - Select Message Service */
+    "+CSNS",    /* 3GPP TS 27.007 6.19 - Single numbering scheme */
+    "+CSQ",     /* 3GPP TS 27.007 8.5 - Signal quality */
+    "+CSS",     /* IS-135 4.1.28 - Serving system identification */
+    "+CSSN",    /* 3GPP TS 27.007 7.17 - Supplementary service notifications */
+    "+CSTA",    /* 3GPP TS 27.007 6.1 - Select type of address */
+    "+CSTF",    /* 3GPP TS 27.007 6.24 - Settings time format */
+    "+CSVM",    /* 3GPP TS 27.007 8.33 - Set Voice Mail Number */
+    "+CTA",     /* IS-135 4.1.29 - MT-Terminated async. Data calls */
+    "+CTF",     /* IS-135 4.1.30 - MT-Terminated FAX calls */
+    "+CTFR",    /* 3GPP TS 27.007 7.14 - Call deflection */
+    "+CTZR",    /* 3GPP TS 27.007 8.41 - Time Zone Reporting */
+    "+CTZU",    /* 3GPP TS 27.007 8.40 - Automatic Time Zone Update */
+    "+CUSD",    /* 3GPP TS 27.007 7.15 - Unstructured supplementary service data */
+    "+CUUS1",   /* 3GPP TS 27.007 7.26 - User to User Signalling Service 1 */
+    "+CV120",   /* 3GPP TS 27.007 6.21 - V.120 rate adaption protocol */
+    "+CVHU",    /* 3GPP TS 27.007 6.20 - Voice Hangup Control */
+    "+CVIB",    /* 3GPP TS 27.007 8.22 - Vibrator mode */
+    "+CXT",     /* IS-99 5.6 - Cellular extension */
+    "+DR",      /* V.250 6.6.2 - Data compression reporting */ 
+    "+DS",      /* V.250 6.6.1 - Data compression */ 
+    "+DS44",    /* V.250 6.6.2 - V.44 data compression */
+    "+EB",      /* V.250 6.5.2 - Break handling in error control operation */ 
+    "+EFCS",    /* V.250 6.5.4 - 32-bit frame check sequence */ 
+    "+EFRAM",   /* V.250 6.5.8 - Frame length */ 
+    "+ER",      /* V.250 6.5.5 - Error control reporting */ 
+    "+ES",      /* V.250 6.5.1 - Error control selection */ 
+    "+ESR",     /* V.250 6.5.3 - Selective repeat */ 
+    "+ETBM",    /* V.250 6.5.6 - Call termination buffer management */ 
+    "+EWIND",   /* V.250 6.5.7 - Window size */ 
+    "+FAA",     /* T.32 8.5.2.5 - Adaptive Answer parameter */
+    "+FAP",     /* T.32 8.5.1.12 - Addressing and polling capabilities parameter */
+    "+FAR",     /* T.31 8.5.1 - Adaptive reception control */ 
+    "+FBO",     /* T.32 8.5.3.4 - Phase C data bit order */
+    "+FBS",     /* T.32 8.5.3.2 - Buffer Size, read only parameter */
+    "+FBU",     /* T.32 8.5.1.10 - HDLC Frame Reporting parameter */
+    "+FCC",     /* T.32 8.5.1.1 - DCE capabilities parameters */
+    "+FCL",     /* T.31 8.5.2 - Carrier loss timeout */ 
+    "+FCLASS",  /* T.31 8.2 - Capabilities identification and control */ 
+    "+FCQ",     /* T.32 8.5.2.3 -  Copy quality checking parameter */
+    "+FCR",     /* T.32 8.5.1.9 - Capability to receive parameter */
+    "+FCS",     /* T.32 8.5.1.3 - Current Session Results parameters */
+    "+FCT",     /* T.32 8.5.2.6 - DTE phase C timeout parameter */
+    "+FDD",     /* T.31 8.5.3 - Double escape character replacement */ 
+    "+FDR",     /* T.32 8.3.4 - Data reception command */
+    "+FDT",     /* T.32 8.3.3 - Data transmission command */
+    "+FEA",     /* T.32 8.5.3.5 - Phase C received EOL alignment parameter */
+    "+FFC",     /* T.32 8.5.3.6 - Format conversion parameter */
+    "+FFD",     /* T.32 8.5.1.14 - File diagnostic message parameter */
+    "+FHS",     /* T.32 8.5.2.7 - Call termination status parameter */
+    "+FIE",     /* T.32 8.5.2.1 - Procedure interrupt enable parameter */
+    "+FIP",     /* T.32 8.3.6 - Initialize facsimile parameters */
+    "+FIS",     /* T.32 8.5.1.2 -  Current session parameters */
+    "+FIT",     /* T.31 8.5.4 - DTE inactivity timeout */ 
+    "+FKS",     /* T.32 8.3.5 - Session termination command */
+    "+FLI",     /* T.32 8.5.1.5 - Local ID string parameter, TSI or CSI */
+    "+FLO",     /* T.31 says to implement something similar to +IFC */ 
+    "+FLP",     /* T.32 8.5.1.7 - Indicate document to poll parameter */
+    "+FMI",     /* T.31 says to duplicate +GMI */ 
+    "+FMM",     /* T.31 says to duplicate +GMM */ 
+    "+FMR",     /* T.31 says to duplicate +GMR */ 
+    "+FMS",     /* T.32 8.5.2.9 - Minimum phase C speed parameter */
+    "+FND",     /* T.32 8.5.2.10 - Non-Standard Message Data Indication parameter */
+    "+FNR",     /* T.32 8.5.1.11 - Negotiation message reporting control parameters */
+    "+FNS",     /* T.32 8.5.1.6 - Non-Standard Frame FIF parameter */
+    "+FPA",     /* T.32 8.5.1.13 - Selective polling address parameter */
+    "+FPI",     /* T.32 8.5.1.5 - Local Polling ID String parameter */
+    "+FPP",     /* T.32 8.5.3 - Facsimile packet protocol */
+    "+FPR",     /* T.31 says to implement something similar to +IPR */ 
+    "+FPS",     /* T.32 8.5.2.2 - Page Status parameter */
+    "+FPW",     /* T.32 8.5.1.13 - PassWord parameter (Sending or Polling) */
+    "+FRH",     /* T.31 8.3.6 - HDLC receive */ 
+    "+FRM",     /* T.31 8.3.4 - Facsimile receive */ 
+    "+FRQ",     /* T.32 8.5.2.4 - Receive Quality Thresholds parameters */
+    "+FRS",     /* T.31 8.3.2 - Receive silence */ 
+    "+FRY",     /* T.32 8.5.2.8 - ECM Retry Value parameter */
+    "+FSA",     /* T.32 8.5.1.13 - Subaddress parameter */
+    "+FSP",     /* T.32 8.5.1.8 - Request to poll parameter */
+    "+FTH",     /* T.31 8.3.5 - HDLC transmit */ 
+    "+FTM",     /* T.31 8.3.3 - Facsimile transmit */ 
+    "+FTS",     /* T.31 8.3.1 - Transmit silence */ 
+    "+GCAP",    /* V.250 6.1.9 - Request complete capabilities list */ 
+    "+GCI",     /* V.250 6.1.10 - Country of installation, */ 
+    "+GMI",     /* V.250 6.1.4 - Request manufacturer identification */ 
+    "+GMM",     /* V.250 6.1.5 - Request model identification */ 
+    "+GMR",     /* V.250 6.1.6 - Request revision identification */ 
+    "+GOI",     /* V.250 6.1.8 - Request global object identification */ 
+    "+GSN",     /* V.250 6.1.7 - Request product serial number identification */ 
+    "+IBC",     /* TIA-617 8.3 - Control of in-band control */
+    "+IBM",     /* TIA-617 8.4 - In-Band MARK idle reporting control */
+    "+ICF",     /* V.250 6.2.11 - DTE-DCE character framing */ 
+    "+ICLOK",   /* V.250 6.2.14 - Select sync transmit clock source */ 
+    "+IDSR",    /* V.250 6.2.16 - Select data set ready option */ 
+    "+IFC",     /* V.250 6.2.12 - DTE-DCE local flow control */ 
+    "+ILRR",    /* V.250 6.2.13 - DTE-DCE local rate reporting */ 
+    "+ILSD",    /* V.250 6.2.15 - Select long space disconnect option */ 
+    "+IPR",     /* V.250 6.2.10 - Fixed DTE rate */ 
+    "+IRTS",    /* V.250 6.2.17 - Select synchronous mode RTS option */ 
+    "+MA",      /* V.250 6.4.2 - Modulation automode control */ 
+    "+MR",      /* V.250 6.4.3 - Modulation reporting control */ 
+    "+MS",      /* V.250 6.4.1 - Modulation selection */ 
+    "+MSC",     /* V.250 6.4.8 - Seamless rate change enable */ 
+    "+MV18AM",  /* V.250 6.4.6 - V.18 answering message editing */ 
+    "+MV18P",   /* V.250 6.4.7 - Order of probes */ 
+    "+MV18R",   /* V.250 6.4.5 - V.18 reporting control */ 
+    "+MV18S",   /* V.250 6.4.4 - V.18 selection */
+    "+PCW",     /* V.250 6.8.1 - Call waiting enable (V.92 DCE) */
+    "+PIG",     /* V.250 6.8.5 - PCM upstream ignore */
+    "+PMH",     /* V.250 6.8.2 - Modem on hold enable */
+    "+PMHF",    /* V.250 6.8.6 - V.92 Modem on hold hook flash */
+    "+PMHR",    /* V.250 6.8.4 - Initiate modem on hold */
+    "+PMHT",    /* V.250 6.8.3 - Modem on hold timer */
+    "+PQC",     /* V.250 6.8.7 - V.92 Phase 1 and Phase 2 Control */
+    "+PSS",     /* V.250 6.8.8 - V.92 Use Short Sequence */
+    "+SAC",     /* V.252 3.4 - Audio transmit configuration */
+    "+SAM",     /* V.252 3.5 - Audio receive mode */
+    "+SAR",     /* V.252 5.3 - Audio receive channel indication */
+    "+SARR",    /* V.252 3.9 - Audio indication reporting */
+    "+SAT",     /* V.252 5.4 - Audio transmit channel indication */
+    "+SCRR",    /* V.252 3.11 - Capabilities indication reporting */
+    "+SDC",     /* V.252 3.3 - Data configuration */
+    "+SDI",     /* V.252 5.2 - Data channel identification */
+    "+SDR",     /* V.252 3.8 - Data indication reporting */
+    "+SRSC",    /* V.252 5.1.2 - Remote terminal simultaneous capability indication */
+    "+STC",     /* V.252 3.1 - Terminal configuration */
+    "+STH",     /* V.252 3.2 - Close logical channel */
+    "+SVC",     /* V.252 3.6 - Video transmit configuration */
+    "+SVM",     /* V.252 3.7 - Video receive mode */
+    "+SVR",     /* V.252 5.5 - Video receive channel indication */
+    "+SVRR",    /* V.252 3.10 - Video indication reporting */
+    "+SVT",     /* V.252 5.6 - Video transmit channel indication */
+    "+TADR",    /* V.250 6.7.2.9 - Local V.54 address */ 
+    "+TAL",     /* V.250 6.7.2.15 - Local analogue loop */ 
+    "+TALS",    /* V.250 6.7.2.6 - Analogue loop status */ 
+    "+TDLS",    /* V.250 6.7.2.7 - Local digital loop status */ 
+    "+TE140",   /* V.250 6.7.2.1 - Enable ckt 140 */ 
+    "+TE141",   /* V.250 6.7.2.2 - Enable ckt 141 */ 
+    "+TEPAL",   /* V.250 6.7.2.5 - Enable front panel analogue loop */ 
+    "+TEPDL",   /* V.250 6.7.2.4 - Enable front panel RDL */ 
+    "+TERDL",   /* V.250 6.7.2.3 - Enable RDL from remote */ 
+    "+TLDL",    /* V.250 6.7.2.13 - Local digital loop */ 
+    "+TMO",     /* V.250 6.9 - V.59 command */
+    "+TMODE",   /* V.250 6.7.2.10 - Set V.54 mode */ 
+    "+TNUM",    /* V.250 6.7.2.12 - Errored bit and block counts */ 
+    "+TRDL",    /* V.250 6.7.2.14 - Request remote digital loop */ 
+    "+TRDLS",   /* V.250 6.7.2.8 - Remote digital loop status */ 
+    "+TRES",    /* V.250 6.7.2.17 - Self test result */ 
+    "+TSELF",   /* V.250 6.7.2.16 - Self test */ 
+    "+TTER",    /* V.250 6.7.2.11 - Test error rate */ 
+    "+VAC",     /* V.252 4.1 - Set audio code */
+    "+VACR",    /* V.252 6.1 - Audio code report */
+    "+VBT",     /* 3GPP TS 27.007 C.2.2 - Buffer threshold setting */
+    "+VCID",    /* V.253 9.2.3 - Caller ID service */
+    "+VCIDR",   /* V.252 6.2 - Caller ID report */
+    "+VDID",    /* V.253 9.2.4 - DID service */
+    "+VDIDR",   /* V.252 6.2 - DID report */
+    "+VDR",     /* V.253 10.3.1 - Distinctive ring (ring cadence reporting) */
+    "+VDT",     /* V.253 10.3.2 - Control tone cadence reporting */
+    "+VDX",     /* V.253 10.5.6 - Speakerphone duplex mode */
+    "+VEM",     /* V.253 10.5.7 - Deliver event reports */
+    "+VGM",     /* V.253 10.5.2 - Microphone gain */
+    "+VGR",     /* V.253 10.2.1 - Receive gain selection */
+    "+VGS",     /* V.253 10.5.3 - Speaker gain */
+    "+VGT",     /* V.253 10.2.2 - Volume selection */
+    "+VHC",     /* V.252 4.12 - Telephony port hook control */
+    "+VIP",     /* V.253 10.1.1 - Initialize voice parameters */
+    "+VIT",     /* V.253 10.2.3 - DTE/DCE inactivity timer */
+    "+VLS",     /* V.253 10.2.4 - Analogue source/destination selection */
+    "+VNH",     /* V.253 9.2.5 - Automatic hangup control */
+    "+VPH",     /* V.252 4.11 - Phone hookswitch status */
+    "+VPP",     /* V.253 10.4.2 - Voice packet protocol */
+    "+VPR",     /* IS-101 10.4.3 - Select DTE/DCE interface rate */
+    "+VRA",     /* V.253 10.2.5 - Ringing tone goes away timer */
+    "+VRID",    /* Extension - Find the originating and destination numbers */
+    "+VRL",     /* V.253 10.1.2 - Ring local phone */
+    "+VRN",     /* V.253 10.2.6 - Ringing tone never appeared timer */
+    "+VRX",     /* V.253 10.1.3 - Voice receive state */
+    "+VSD",     /* V.253 10.2.7 - Silence detection (QUIET and SILENCE) */
+    "+VSID",    /* Extension - Set the originating number */
+    "+VSM",     /* V.253 10.2.8 - Compression method selection */
+    "+VSP",     /* V.253 10.5.1 - Voice speakerphone state */
+    "+VTA",     /* V.253 10.5.4 - Train acoustic echo-canceller */ 
+    "+VTD",     /* V.253 10.2.9 - Beep tone duration timer */
+    "+VTER",    /* V.252 6.4 - Simple telephony event report */
+    "+VTH",     /* V.253 10.5.5 - Train line echo-canceller */ 
+    "+VTR",     /* V.253 10.1.4 - Voice duplex state */
+    "+VTS",     /* V.253 10.1.5 - DTMF and tone generation in voice */
+    "+VTX",     /* V.253 10.1.6 - Transmit data state */
+    "+VXT",     /* IS-101 10.1.5 - Translate voice data */
+    "+W",       /* TIA-678 5.2.4.1 - Compliance indication */
+    "+WBAG",    /* TIA-678 C.5.6 Bias modem audio gain */
+    "+WCDA",    /* TIA-678 B.3.2.5 Display data link address */
+    "+WCHG",    /* TIA-678 B.3.2.4 Display battery charging status */
+    "+WCID",    /* TIA-678 B.3.2.1 Display system ID (operator) */
+    "+WCLK",    /* TIA-678 B.3.2.3 Lock/unlock DCE */
+    "+WCPN",    /* TIA-678 B.3.2.2 Set personal identification number */
+    "+WCXF",    /* TIA-678 B.3.2.6 Display supported annex B commands */
+    "+WDAC",    /* TIA-678 C.5.1 Data over analogue cellular command query */
+    "+WDIR",    /* TIA-678 C.5.8 Phone number directory selection */
+    "+WECR",    /* TIA-678 C.5.3 Enable cellular result codes */
+    "+WFON",    /* TIA-678 C.5.5 Phone specification */
+    "+WKPD",    /* TIA-678 C.5.7 Keypad emulation */
+    "+WPBA",    /* TIA-678 C.5.9 Phone battery query */
+    "+WPTH",    /* TIA-678 C.5.10 Call path */
+    "+WRLK",    /* TIA-678 C.5.4 Roam lockout */
+    "+WS45",    /* TIA-678 5.2.4.2 DTE-side stack selection */
+    "+WS46",    /* 3GPP TS 27.007 5.9 - PCCA STD-101 [17] select wireless network */
+    "+WS50",    /* TIA-678 B.3.1.1 Normalized signal strength */
+    "+WS51",    /* TIA-678 B.3.1.2 Carrier detect signal threshold */
+    "+WS52",    /* TIA-678 B.3.1.3 Normalized battery level */
+    "+WS53",    /* TIA-678 B.3.1.4 Normalized channel quality */
+    "+WS54",    /* TIA-678 B.3.1.5 Carrier detect channel quality threshold */
+    "+WS57",    /* TIA-678 B.3.1.7 Antenna preference */
+    "+WS58",    /* TIA-678 B.3.1.8 Idle time-out value */
+    "+WSTL",    /* TIA-678 C.5.2 Call session time limit */
+    ";",        /* Dummy to absorb semi-colon delimiters in commands */
+    "A",        /* V.250 6.3.5 - Answer */ 
+    "D",        /* V.250 6.3.1 - Dial */ 
+    "E",        /* V.250 6.2.4 - Command echo */ 
+    "H",        /* V.250 6.3.6 - Hook control */ 
+    "I",        /* V.250 6.1.3 - Request identification information */ 
+    "L",        /* V.250 6.3.13 - Monitor speaker loudness */ 
+    "M",        /* V.250 6.3.14 - Monitor speaker mode */ 
+    "O",        /* V.250 6.3.7 - Return to online data state */ 
+    "P",        /* V.250 6.3.3 - Select pulse dialling (command) */ 
+    "Q",        /* V.250 6.2.5 - Result code suppression */ 
+    "S0",       /* V.250 6.3.8 - Automatic answer */ 
+    "S10",      /* V.250 6.3.12 - Automatic disconnect delay */ 
+    "S3",       /* V.250 6.2.1 - Command line termination character */ 
+    "S4",       /* V.250 6.2.2 - Response formatting character */ 
+    "S5",       /* V.250 6.2.3 - Command line editing character */ 
+    "S6",       /* V.250 6.3.9 - Pause before blind dialling */ 
+    "S7",       /* V.250 6.3.10 - Connection completion timeout */ 
+    "S8",       /* V.250 6.3.11 - Comma dial modifier time */ 
+    "T",        /* V.250 6.3.2 - Select tone dialling (command) */ 
+    "V",        /* V.250 6.2.6 - DCE response format */ 
+    "X",        /* V.250 6.2.7 - Result code selection and call progress monitoring control */ 
+    "Z",        /* V.250 6.1.1 - Reset to default configuration */
+    NULL
+};
+
+int packed_ptr = 0;
+
+short int packed_trie[30000];
+
+#define ALPHABET_SIZE       128
+
+typedef struct trie_node_s
+{
+    int first;
+    int last;
+    int node_no;
+    int entry;
+    /* Array of pointers to children */
+    struct trie_node_s *child_list[ALPHABET_SIZE];
+} trie_node_t;
+
+typedef struct
+{
+    int entries;
+    /* The root of the trie */
+    trie_node_t *root;
+} trie_t;
+
+static trie_node_t *trie_node_create(void)
+{
+    trie_node_t *s;
+    
+    if ((s = malloc(sizeof(trie_node_t))))
+    {
+        memset(s, 0, sizeof(*s));
+        s->first = ALPHABET_SIZE - 1;
+    }
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+static trie_t *trie_create(void)
+{
+    trie_t *s;
+    
+    if ((s = malloc(sizeof(trie_t))))
+    {
+        memset(s, 0, sizeof(*s));
+        s->root = trie_node_create();
+    }
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void trie_recursive_add_node_numbers(trie_node_t *t)
+{
+    int index;
+ 
+    if (t)
+    {
+        if (t->first <= t->last)
+        {
+            t->node_no = packed_ptr + 1;
+            packed_ptr += (t->last - t->first + 1 + 3);
+            for (index = 0;  index < ALPHABET_SIZE;  index++)
+                trie_recursive_add_node_numbers(t->child_list[index]);
+        }
+        else
+        {
+            t->node_no = packed_ptr + 1;
+            packed_ptr += 3;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void trie_recursive_build_packed_trie(trie_node_t *t)
+{
+    int i;
+ 
+    if (t)
+    {
+        if (t->first <= t->last)
+        {
+            packed_trie[packed_ptr++] = t->first;
+            packed_trie[packed_ptr++] = t->last;
+            packed_trie[packed_ptr++] = t->entry;
+            for (i = t->first;  i <= t->last;  i++)
+                packed_trie[packed_ptr++] = (t->child_list[i])  ?  t->child_list[i]->node_no  :  0;
+            for (i = t->first;  i <= t->last;  i++)
+                trie_recursive_build_packed_trie(t->child_list[i]);
+        }
+        else
+        {
+            packed_trie[packed_ptr++] = 1;
+            packed_trie[packed_ptr++] = 0;
+            packed_trie[packed_ptr++] = t->entry;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void trie_add(trie_t *s, const char *u, size_t len)
+{
+    int i;
+    int index;
+    trie_node_t *t;
+
+    s->entries++;
+    /* Loop over the length of the string to add and traverse the trie... */
+    for (t = s->root, i = 0;  i < len;  i++)
+    {
+        /* The character in u we are processing... */
+        index = (unsigned char) u[i];
+ 
+        /* Is there a child node for this character? */
+        if (t->child_list[index] == NULL)
+        {
+            t->child_list[index] = trie_node_create();
+            if (index < t->first)
+                t->first = index;
+            if (index > t->last)
+                t->last = index;
+        }
+ 
+        /* Move to the new node... and loop */
+        t = t->child_list[index];
+    }
+    t->entry = s->entries;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void dump_trie(void)
+{
+    int i;
+
+    printf("\nstatic const at_cmd_service_t at_commands[] =\n{\n");
+    for (i = 0;  wordlist[i];  i++)
+    {
+        switch (wordlist[i][0])
+        {
+        case ' ':
+        case ';':
+            printf("    at_cmd_dummy,\n");
+            break;
+        case '+':
+            printf("    at_cmd_plus_%s,\n", wordlist[i] + 1);
+            break;
+        case '&':
+            printf("    at_cmd_amp_%s,\n", wordlist[i] + 1);
+            break;
+        default:
+            printf("    at_cmd_%s,\n", wordlist[i]);
+            break;
+        }
+    }
+    printf("};\n");
+
+    printf("\nstatic const uint16_t command_trie[] =\n{");
+    for (i = 0;  i < packed_ptr;  i++)
+    {
+        if ((i & 7) == 0)
+            printf("\n    ");
+        printf("0x%04X, ", packed_trie[i]);
+    }
+    printf("\n};\n");
+    printf("\n#define COMMAND_TRIE_LEN %d\n", packed_ptr);
+
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    trie_t *s;
+    int i;
+    
+    s = trie_create();
+
+    for (i = 0;  wordlist[i];  i++)
+        trie_add(s, wordlist[i], strlen(wordlist[i]));
+    printf("// The trie contains %d entries\n", i);
+
+    packed_ptr = 0;
+    trie_recursive_add_node_numbers(s->root);
+    packed_ptr = 0;
+    trie_recursive_build_packed_trie(s->root);
+
+    dump_trie();
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/at_interpreter.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,5311 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * at_interpreter.c - AT command interpreter to V.251, V.252, V.253, T.31 and the 3GPP specs.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Special thanks to Lee Howard <faxguy@howardsilvan.com>
+ * for his great work debugging and polishing this code.
+ *
+ * Copyright (C) 2004, 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: at_interpreter.c,v 1.16 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define _GNU_SOURCE
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <memory.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/queue.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/complex.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/fsk.h"
+
+#include "spandsp/at_interpreter.h"
+
+#define ms_to_samples(t)        (((t)*SAMPLE_RATE)/1000)
+
+#define MANUFACTURER            "www.soft-switch.org"
+#define SERIAL_NUMBER           "42"
+#define GLOBAL_OBJECT_IDENTITY  "42"
+
+enum
+{
+    ASCII_RESULT_CODES = 1,
+    NUMERIC_RESULT_CODES,
+    NO_RESULT_CODES
+};
+
+static at_profile_t profiles[3] =
+{
+    {
+#if defined(_MSC_VER)
+        /*.echo =*/ TRUE,
+        /*.verbose =*/ TRUE,
+        /*.result_code_format =*/ ASCII_RESULT_CODES,
+        /*.pulse_dial =*/ FALSE,
+        /*.double_escape =*/ FALSE,
+        /*.adaptive_receive =*/ FALSE,
+        /*.s_regs[100] =*/ {0, 0, 0, '\r', '\n', '\b', 1, 60, 5, 0, 0}
+#else
+        .echo = TRUE,
+        .verbose = TRUE,
+        .result_code_format = ASCII_RESULT_CODES,
+        .pulse_dial = FALSE,
+        .double_escape = FALSE,
+        .adaptive_receive = FALSE,
+        .s_regs[0] = 0,
+        .s_regs[3] = '\r',
+        .s_regs[4] = '\n',
+        .s_regs[5] = '\b',
+        .s_regs[6] = 1,
+        .s_regs[7] = 60,
+        .s_regs[8] = 5,
+        .s_regs[10] = 0
+#endif
+    }
+};
+
+typedef const char *(*at_cmd_service_t)(at_state_t *s, const char *cmd);
+
+static const char *manufacturer = MANUFACTURER;
+static const char *model = PACKAGE;
+static const char *revision = VERSION;
+
+#define ETX 0x03
+#define DLE 0x10
+#define SUB 0x1A
+
+enum
+{
+    T31_FLUSH,
+    T31_SILENCE_TX,
+    T31_SILENCE_RX,
+    T31_CED_TONE,
+    T31_CNG_TONE,
+    T31_NOCNG_TONE,
+};
+
+static const char *at_response_codes[] =
+{
+    "OK",
+    "CONNECT",
+    "RING",
+    "NO CARRIER",
+    "ERROR",
+    "???",
+    "NO DIALTONE",
+    "BUSY",
+    "NO ANSWER",
+    "+FCERROR",
+    "+FRH:3"
+};
+
+void at_set_at_rx_mode(at_state_t *s, int new_mode)
+{
+    /* The use of a DTE timeout is mode dependent. Set the timeout appropriately in
+       the modem. */
+    switch (new_mode)
+    {
+    case AT_MODE_HDLC:
+    case AT_MODE_STUFFED:
+        at_modem_control(s, s->dte_inactivity_timeout*1000, (void *) (intptr_t) s->dte_inactivity_timeout);
+        break;
+    default:
+        at_modem_control(s, AT_MODEM_CONTROL_DTE_TIMEOUT, NULL);
+        break;
+    }
+    s->at_rx_mode = new_mode;
+}
+/*- End of function --------------------------------------------------------*/
+
+void at_put_response(at_state_t *s, const char *t)
+{
+    uint8_t buf[3];
+    
+    buf[0] = s->p.s_regs[3];
+    buf[1] = s->p.s_regs[4];
+    buf[2] = '\0';
+    if (s->p.result_code_format == ASCII_RESULT_CODES)
+        s->at_tx_handler(s, s->at_tx_user_data, buf, 2);
+    s->at_tx_handler(s, s->at_tx_user_data, (uint8_t *) t, strlen(t));
+    s->at_tx_handler(s, s->at_tx_user_data, buf, 2);
+}
+/*- End of function --------------------------------------------------------*/
+
+void at_put_numeric_response(at_state_t *s, int val)
+{
+    char buf[20];
+
+    snprintf(buf, sizeof(buf), "%d", val);
+    at_put_response(s, buf);
+}
+/*- End of function --------------------------------------------------------*/
+
+void at_put_response_code(at_state_t *s, int code)
+{
+    uint8_t buf[20];
+
+    switch (s->p.result_code_format)
+    {
+    case ASCII_RESULT_CODES:
+        at_put_response(s, at_response_codes[code]);
+        break;
+    case NUMERIC_RESULT_CODES:
+        snprintf((char *) buf, sizeof(buf), "%d%c", code, s->p.s_regs[3]);
+        s->at_tx_handler(s, s->at_tx_user_data, buf, strlen((char *) buf));
+        break;
+    default:
+        /* No result codes */
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int answer_call(at_state_t *s)
+{
+    if (at_modem_control(s, AT_MODEM_CONTROL_ANSWER, NULL) < 0)
+        return FALSE;
+    /* Answering should now be in progress. No AT response should be
+       issued at this point. */
+    s->do_hangup = FALSE;
+    return TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+void at_call_event(at_state_t *s, int event)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "Call event %d received\n", event);
+    switch (event)
+    {
+    case AT_CALL_EVENT_ALERTING:
+        at_modem_control(s, AT_MODEM_CONTROL_RNG, (void *) 1);
+        if (s->display_call_info  &&  !s->call_info_displayed)
+            at_display_call_info(s);
+        at_put_response_code(s, AT_RESPONSE_CODE_RING);
+        if ((++s->rings_indicated) >= s->p.s_regs[0]  &&  s->p.s_regs[0])
+        {
+            /* The modem is set to auto-answer now */
+            answer_call(s);
+        }
+        break;
+    case AT_CALL_EVENT_ANSWERED:
+        at_modem_control(s, AT_MODEM_CONTROL_RNG, (void *) 0);
+        if (s->fclass_mode == 0)
+        {
+            /* Normal data modem connection */
+            at_set_at_rx_mode(s, AT_MODE_CONNECTED);
+            /* TODO: */
+        }
+        else
+        {
+            /* FAX modem connection */
+            at_set_at_rx_mode(s, AT_MODE_DELIVERY);
+            at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) T31_CED_TONE);
+        }
+        break;
+    case AT_CALL_EVENT_CONNECTED:
+        span_log(&s->logging, SPAN_LOG_FLOW, "Dial call - connected. fclass=%d\n", s->fclass_mode);
+        at_modem_control(s, AT_MODEM_CONTROL_RNG, (void *) 0);
+        if (s->fclass_mode == 0)
+        {
+            /* Normal data modem connection */
+            at_set_at_rx_mode(s, AT_MODE_CONNECTED);
+            /* TODO: */
+        }
+        else
+        {
+            /* FAX modem connection */
+            at_set_at_rx_mode(s, AT_MODE_DELIVERY);
+            if (s->silent_dial)
+                at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) T31_NOCNG_TONE);
+            else
+                at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) T31_CNG_TONE);
+            s->dte_is_waiting = TRUE;
+        }
+        break;
+    case AT_CALL_EVENT_BUSY:
+        at_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+        at_put_response_code(s, AT_RESPONSE_CODE_BUSY);
+        break;
+    case AT_CALL_EVENT_NO_DIALTONE:
+        at_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+        at_put_response_code(s, AT_RESPONSE_CODE_NO_DIALTONE);
+        break;
+    case AT_CALL_EVENT_NO_ANSWER:
+        at_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+        at_put_response_code(s, AT_RESPONSE_CODE_NO_ANSWER);
+        break;
+    case AT_CALL_EVENT_HANGUP:
+        span_log(&s->logging, SPAN_LOG_FLOW, "Hangup... at_rx_mode %d\n", s->at_rx_mode);
+        at_modem_control(s, AT_MODEM_CONTROL_ONHOOK, NULL);
+        if (s->dte_is_waiting)
+        {
+            if (s->ok_is_pending)
+            {
+                at_put_response_code(s, AT_RESPONSE_CODE_OK);
+                s->ok_is_pending = FALSE;
+            }
+            else
+            {
+                at_put_response_code(s, AT_RESPONSE_CODE_NO_CARRIER);
+            }
+            s->dte_is_waiting = FALSE;
+            at_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+        }
+        else if (s->fclass_mode  &&  s->rx_signal_present)
+        {
+            s->rx_data[s->rx_data_bytes++] = DLE;
+            s->rx_data[s->rx_data_bytes++] = ETX;
+            s->at_tx_handler(s, s->at_tx_user_data, s->rx_data, s->rx_data_bytes);
+            s->rx_data_bytes = 0;
+        }
+        if (s->at_rx_mode != AT_MODE_OFFHOOK_COMMAND  &&  s->at_rx_mode != AT_MODE_ONHOOK_COMMAND)
+            at_put_response_code(s, AT_RESPONSE_CODE_NO_CARRIER);
+        s->rx_signal_present = FALSE;
+        at_modem_control(s, AT_MODEM_CONTROL_RNG, (void *) 0);
+        at_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+        break;
+    default:
+        span_log(&s->logging, SPAN_LOG_WARNING, "Invalid call event %d received.\n", event);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void at_reset_call_info(at_state_t *s)
+{
+    s->rings_indicated = 0;
+    s->call_info_displayed = FALSE;
+    if (s->call_date)
+    {
+        free(s->call_date);
+        s->call_date = NULL;
+    }
+    if (s->call_time)
+    {
+        free(s->call_time);
+        s->call_time = NULL;
+    }
+    if (s->originating_name)
+    {
+        free(s->originating_name);
+        s->originating_name = NULL;
+    }
+    if (s->originating_number)
+    {
+        free(s->originating_number);
+        s->originating_number = NULL;
+    }
+    if (s->originating_ani)
+    {
+        free(s->originating_ani);
+        s->originating_ani = NULL;
+    }
+    if (s->destination_number)
+    {
+        free(s->destination_number);
+        s->destination_number = NULL;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void at_set_call_info(at_state_t *s,
+                      char const *call_date,
+                      char const *call_time,
+                      char const *originating_name,
+                      char const *originating_number,
+                      char const *originating_ani,
+                      char const *destination_number)
+{
+    at_reset_call_info(s);
+    if (call_date)
+        s->call_date = strdup(call_date);
+    if (call_time)
+        s->call_time = strdup(call_time);
+    if (originating_name)
+        s->originating_name = strdup(originating_name);
+    if (originating_number)
+        s->originating_number = strdup(originating_number);
+    if (originating_ani)
+        s->originating_ani = strdup(originating_ani);
+    if (destination_number)
+        s->destination_number = strdup(destination_number);
+}
+/*- End of function --------------------------------------------------------*/
+
+void at_display_call_info(at_state_t *s)
+{
+    char buf[132 + 1];
+
+    snprintf(buf, sizeof(buf), "DATE=%s", (s->call_date)  ?  s->call_date  :  "<NONE>");
+    at_put_response(s, buf);
+    snprintf(buf, sizeof(buf), "TIME=%s", (s->call_time)  ?  s->call_time  :  "<NONE>");
+    at_put_response(s, buf);
+    snprintf(buf, sizeof(buf), "NAME=%s", (s->originating_name)  ?  s->originating_name  :  "<NONE>");
+    at_put_response(s, buf);
+    snprintf(buf, sizeof(buf), "NMBR=%s", (s->originating_number)  ?  s->originating_number  :  "<NONE>");
+    at_put_response(s, buf);
+    snprintf(buf, sizeof(buf), "ANID=%s", (s->originating_ani)  ?  s->originating_ani  :  "<NONE>");
+    at_put_response(s, buf);
+    snprintf(buf, sizeof(buf), "NDID=%s", (s->destination_number)  ?  s->destination_number  :  "<NONE>");
+    at_put_response(s, buf);
+    s->call_info_displayed = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int parse_num(const char **s, int max_value)
+{
+    int i;
+    
+    /* The spec. says no digits is valid, and should be treated as zero. */
+    i = 0;
+    while (isdigit(**s))
+    {
+        i = i*10 + ((**s) - '0');
+        (*s)++;
+    }
+    if (i > max_value)
+        i = -1;
+    return i;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int parse_hex_num(const char **s, int max_value)
+{
+    int i;
+    
+    /* The spec. says a hex value is always 2 digits, and the alpha digits are
+       upper case. */
+    i = 0;
+    if (isdigit(**s))
+        i = **s - '0';
+    else if (**s >= 'A'  &&  **s <= 'F')
+        i = **s - 'A';
+    else
+        return -1;
+    (*s)++;
+
+    if (isdigit(**s))
+        i = (i << 4)  | (**s - '0');
+    else if (**s >= 'A'  &&  **s <= 'F')
+        i = (i << 4)  | (**s - 'A');
+    else
+        return -1;
+    (*s)++;
+    if (i > max_value)
+        i = -1;
+    return i;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int parse_out(at_state_t *s, const char **t, int *target, int max_value, const char *prefix, const char *def)
+{
+    char buf[100];
+    int val;
+
+    switch (*(*t)++)
+    {
+    case '=':
+        switch (**t)
+        {
+        case '?':
+            /* Show possible values */
+            (*t)++;
+            snprintf(buf, sizeof(buf), "%s%s", (prefix)  ?  prefix  :  "", def);
+            at_put_response(s, buf);
+            break;
+        default:
+            /* Set value */
+            if ((val = parse_num(t, max_value)) < 0)
+                return FALSE;
+            if (target)
+                *target = val;
+            break;
+        }
+        break;
+    case '?':
+        /* Show current value */
+        val = (target)  ?  *target  :  0;
+        snprintf(buf, sizeof(buf), "%s%d", (prefix)  ?  prefix  :  "", val);
+        at_put_response(s, buf);
+        break;
+    default:
+        return FALSE;
+    }
+    return TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int parse_2_out(at_state_t *s, const char **t, int *target1, int max_value1, int *target2, int max_value2, const char *prefix, const char *def)
+{
+    char buf[100];
+    int val1;
+    int val2;
+
+    switch (*(*t)++)
+    {
+    case '=':
+        switch (**t)
+        {
+        case '?':
+            /* Show possible values */
+            (*t)++;
+            snprintf(buf, sizeof(buf), "%s%s", (prefix)  ?  prefix  :  "", def);
+            at_put_response(s, buf);
+            break;
+        default:
+            /* Set value */
+            if ((val1 = parse_num(t, max_value1)) < 0)
+                return FALSE;
+            if (target1)
+                *target1 = val1;
+            if (**t == ',')
+            {
+                (*t)++;
+                if ((val2 = parse_num(t, max_value2)) < 0)
+                    return FALSE;
+                if (target2)
+                    *target2 = val2;
+            }
+            break;
+        }
+        break;
+    case '?':
+        /* Show current value */
+        val1 = (target1)  ?  *target1  :  0;
+        val2 = (target2)  ?  *target2  :  0;
+        snprintf(buf, sizeof(buf), "%s%d,%d", (prefix)  ?  prefix  :  "", val1, val2);
+        at_put_response(s, buf);
+        break;
+    default:
+        return FALSE;
+    }
+    return TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int parse_hex_out(at_state_t *s, const char **t, int *target, int max_value, const char *prefix, const char *def)
+{
+    char buf[100];
+    int val;
+
+    switch (*(*t)++)
+    {
+    case '=':
+        switch (**t)
+        {
+        case '?':
+            /* Show possible values */
+            (*t)++;
+            snprintf(buf, sizeof(buf), "%s%s", (prefix)  ?  prefix  :  "", def);
+            at_put_response(s, buf);
+            break;
+        default:
+            /* Set value */
+            if ((val = parse_hex_num(t, max_value)) < 0)
+                return FALSE;
+            if (target)
+                *target = val;
+            break;
+        }
+        break;
+    case '?':
+        /* Show current value */
+        val = (target)  ?  *target  :  0;
+        snprintf(buf, sizeof(buf), "%s%02X", (prefix)  ?  prefix  :  "", val);
+        at_put_response(s, buf);
+        break;
+    default:
+        return FALSE;
+    }
+    return TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int match_element(const char **variant, const char *variants)
+{
+    int i;
+    size_t len;
+    char const *s;
+    char const *t;
+
+    s = variants;
+    for (i = 0;  *s;  i++)
+    {
+        if ((t = strchr(s, ',')))
+            len = t - s;
+        else
+            len = strlen(s);
+        if (len == (int) strlen(*variant)  &&  memcmp(*variant, s, len) == 0)
+        {
+            *variant += len;
+            return  i;
+        }
+        s += len;
+        if (*s == ',')
+            s++;
+    }
+    return  -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int parse_string_out(at_state_t *s, const char **t, int *target, int max_value, const char *prefix, const char *def)
+{
+    char buf[100];
+    int val;
+    size_t len;
+    char *tmp;
+
+    switch (*(*t)++)
+    {
+    case '=':
+        switch (**t)
+        {
+        case '?':
+            /* Show possible values */
+            (*t)++;
+            snprintf(buf, sizeof(buf), "%s%s", (prefix)  ?  prefix  :  "", def);
+            at_put_response(s, buf);
+            break;
+        default:
+            /* Set value */
+            if ((val = match_element(t, def)) < 0)
+                return FALSE;
+            if (target)
+                *target = val;
+            break;
+        }
+        break;
+    case '?':
+        /* Show current index value from def */
+        val = (target)  ?  *target  :  0;
+        while (val--  &&  (def = strchr(def, ',')))
+            def++;
+        if ((tmp = strchr(def, ',')))
+            len = tmp - def;
+        else
+            len = strlen(def);
+        snprintf(buf, sizeof(buf), "%s%.*s", (prefix)  ?  prefix  :  "", (int) len, def);
+        at_put_response(s, buf);
+        break;
+    default:
+        return FALSE;
+    }
+    return TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_class1_cmd(at_state_t *s, const char **t)
+{
+    int val;
+    int operation;
+    int direction;
+    int result;
+    const char *allowed;
+
+    direction = (*(*t + 2) == 'T');
+    operation = *(*t + 3);
+    /* Step past the "+Fxx" */
+    *t += 4;
+    switch (operation)
+    {
+    case 'S':
+        allowed = "0-255";
+        break;
+    case 'H':
+        allowed = "3";
+        break;
+    default:
+#if defined(ENABLE_V17)
+        allowed = "24,48,72,73,74,96,97,98,121,122,145,146";
+#else
+        allowed = "24,48,72,96";
+#endif
+        break;
+    }
+    
+    val = -1;
+    if (!parse_out(s, t, &val, 255, NULL, allowed))
+        return TRUE;
+    if (val < 0)
+    {
+        /* It was just a query */
+        return  TRUE;
+    }
+    /* All class 1 FAX commands are supposed to give an ERROR response, if the phone
+       is on-hook. */
+    if (s->at_rx_mode == AT_MODE_ONHOOK_COMMAND)
+        return FALSE;
+
+    result = TRUE;
+    if (s->class1_handler)
+        result = s->class1_handler(s, s->class1_user_data, direction, operation, val);
+    switch (result)
+    {
+    case 0:
+        /* Inhibit an immediate response.  (These commands should not be part of a multi-command entry.) */
+        *t = (const char *) -1;
+        return TRUE;
+    case -1:
+        return FALSE;
+    }
+    return TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *s_reg_handler(at_state_t *s, const char *t, int reg)
+{
+    int val;
+    int b;
+    char buf[4];
+
+    /* Set or get an S register */
+    switch (*t++)
+    {
+    case '=':
+        switch (*t)
+        {
+        case '?':
+            t++;
+            snprintf(buf, sizeof(buf), "%3.3d", 0);
+            at_put_response(s, buf);
+            break;
+        default:
+            if ((val = parse_num(&t, 255)) < 0)
+                return NULL;
+            s->p.s_regs[reg] = (uint8_t) val;
+            break;
+        }
+        break;
+    case '?':
+        snprintf(buf, sizeof(buf), "%3.3d", s->p.s_regs[reg]);
+        at_put_response(s, buf);
+        break;
+    case '.':
+        if ((b = parse_num(&t, 7)) < 0)
+            return NULL;
+        switch (*t++)
+        {
+        case '=':
+            switch (*t)
+            {
+            case '?':
+                t++;
+                at_put_numeric_response(s, 0);
+                break;
+            default:
+                if ((val = parse_num(&t, 1)) < 0)
+                    return NULL;
+                if (val)
+                    s->p.s_regs[reg] |= (1 << b);
+                else
+                    s->p.s_regs[reg] &= ~(1 << b);
+                break;
+            }
+            break;
+        case '?':
+            at_put_numeric_response(s, (int) ((s->p.s_regs[reg] >> b) & 1));
+            break;
+        default:
+            return NULL;
+        }
+        break;
+    default:
+        return NULL;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_dummy(at_state_t *s, const char *t)
+{
+    /* Dummy routine to absorb delimiting characters from a command string */
+    return t + 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_A(at_state_t *s, const char *t)
+{
+    /* V.250 6.3.5 - Answer (abortable) */ 
+    t += 1;
+    if (!answer_call(s))
+        return NULL;
+    return (const char *) -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_D(at_state_t *s, const char *t)
+{
+    int ok;
+    char *u;
+    const char *w;
+    char num[100 + 1];
+    char ch;
+
+    /* V.250 6.3.1 - Dial (abortable) */ 
+    at_reset_call_info(s);
+    s->do_hangup = FALSE;
+    s->silent_dial = FALSE;
+    t += 1;
+    ok = FALSE;
+    /* There are a numbers of options in a dial command string.
+       Many are completely irrelevant in this application. */
+    w = t;
+    u = num;
+    for (  ;  (ch = *t);  t++)
+    {
+        if (isdigit(ch))
+        {
+            /* V.250 6.3.1.1 Basic digit set */
+            *u++ = ch;
+        }
+        else
+        {
+            switch (ch)
+            {
+            case 'A':
+            case 'B':
+            case 'C':
+            case 'D':
+            case '*':
+            case '#':
+                /* V.250 6.3.1.1 Full DTMF repertoire */
+                if (!s->p.pulse_dial)
+                    *u++ = ch;
+                break;
+            case '+':
+                /* V.250 6.3.1.1 International access code */
+                /* TODO: */
+                break;
+            case ',':
+                /* V.250 6.3.1.2 Pause */
+                /* TODO: */
+                break;
+            case 'T':
+                /* V.250 6.3.1.3 Tone dial */
+                s->p.pulse_dial = FALSE;
+                break;
+            case 'P':
+                /* V.250 6.3.1.4 Pulse dial */
+                s->p.pulse_dial = TRUE;
+                break;
+            case '!':
+                /* V.250 6.3.1.5 Hook flash, register recall */
+                /* TODO: */
+                break;
+            case 'W':
+                /* V.250 6.3.1.6 Wait for dial tone */
+                /* TODO: */
+                break;
+            case '@':
+                /* V.250 6.3.1.7 Wait for quiet answer */
+                s->silent_dial = TRUE;
+                break;
+            case 'S':
+                /* V.250 6.3.1.8 Invoke stored string */
+                /* S=<location> */
+                /* TODO: */
+                break;
+            case 'G':
+            case 'g':
+                /* GSM07.07 6.2 - Control the CUG supplementary service for this call */
+                /* TODO: */
+                break;
+            case 'I':
+            case 'i':
+                /* GSM07.07 6.2 - Override Calling Line Identification Restriction (CLIR) */
+                /* TODO: */
+                break;
+            case ';':
+                /* V.250 6.3.1 - Dial string terminator - make voice call and remain in command mode */
+                /* TODO: */
+                break;
+            case '>':
+                /* GSM07.07 6.2 - Direct dialling from phone book supplementary service subscription
+                                  default value for this call */
+                /* TODO: */
+                break;
+            default:
+                return NULL;
+            }
+        }
+    }
+    *u = '\0';
+    if ((ok = at_modem_control(s, AT_MODEM_CONTROL_CALL, num)) < 0)
+        return NULL;
+    /* Dialing should now be in progress. No AT response should be
+       issued at this point. */
+    return (const char *) -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_E(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.2.4 - Command echo */ 
+    t += 1;
+    if ((val = parse_num(&t, 1)) < 0)
+        return NULL;
+    s->p.echo = val;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_H(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.3.6 - Hook control */ 
+    t += 1;
+    if ((val = parse_num(&t, 1)) < 0)
+        return NULL;
+    if (val)
+    {
+        /* Take the receiver off-hook, effectively busying-out the modem. */
+        if (s->at_rx_mode != AT_MODE_ONHOOK_COMMAND  &&  s->at_rx_mode != AT_MODE_OFFHOOK_COMMAND)
+            return NULL;
+        at_modem_control(s, AT_MODEM_CONTROL_OFFHOOK, NULL);
+        at_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+        return t;
+    }
+    at_reset_call_info(s);
+    if (s->at_rx_mode != AT_MODE_ONHOOK_COMMAND  &&  s->at_rx_mode != AT_MODE_OFFHOOK_COMMAND)
+    {
+        /* Push out the last of the audio (probably by sending a short silence). */
+        at_modem_control(s, AT_MODEM_CONTROL_RESTART, (void *) T31_FLUSH);
+        s->do_hangup = TRUE;
+        at_set_at_rx_mode(s, AT_MODE_CONNECTED);
+        return (const char *) -1;
+    }
+    at_modem_control(s, AT_MODEM_CONTROL_HANGUP, NULL);
+    at_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_I(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.1.3 - Request identification information */ 
+    /* N.B. The information supplied in response to an ATIx command is very
+       variable. It was widely used in different ways before the AT command
+       set was standardised by the ITU. */
+    t += 1;
+    switch (val = parse_num(&t, 255))
+    {
+    case 0:
+        at_put_response(s, model);
+        break;
+    case 3:
+        at_put_response(s, manufacturer);
+        break;
+    default:
+        return NULL;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_L(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.3.13 - Monitor speaker loudness */
+    /* Just absorb this command, as we have no speaker */
+    t += 1;
+    if ((val = parse_num(&t, 255)) < 0)
+        return NULL;
+    s->speaker_volume = val;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_M(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.3.14 - Monitor speaker mode */ 
+    /* Just absorb this command, as we have no speaker */
+    t += 1;
+    if ((val = parse_num(&t, 255)) < 0)
+        return NULL;
+    s->speaker_mode = val;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_O(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.3.7 - Return to online data state */ 
+    t += 1;
+    if ((val = parse_num(&t, 1)) < 0)
+        return NULL;
+    if (val == 0)
+    {
+        at_set_at_rx_mode(s, AT_MODE_CONNECTED);
+        at_put_response_code(s, AT_RESPONSE_CODE_CONNECT);
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_P(at_state_t *s, const char *t)
+{
+    /* V.250 6.3.3 - Select pulse dialling (command) */ 
+    t += 1;
+    s->p.pulse_dial = TRUE;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_Q(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.2.5 - Result code suppression */ 
+    t += 1;
+    if ((val = parse_num(&t, 1)) < 0)
+        return NULL;
+    switch (val)
+    {
+    case 0:
+        s->p.result_code_format = (s->p.verbose)  ?  ASCII_RESULT_CODES  :  NUMERIC_RESULT_CODES;
+        break;
+    case 1:
+        s->p.result_code_format = NO_RESULT_CODES;
+        break;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_S0(at_state_t *s, const char *t)
+{
+    /* V.250 6.3.8 - Automatic answer */ 
+    t += 2;
+    return s_reg_handler(s, t, 0);
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_S10(at_state_t *s, const char *t)
+{
+    /* V.250 6.3.12 - Automatic disconnect delay */ 
+    t += 3;
+    return s_reg_handler(s, t, 10);
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_S3(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.1 - Command line termination character */ 
+    t += 2;
+    return s_reg_handler(s, t, 3);
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_S4(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.2 - Response formatting character */ 
+    t += 2;
+    return s_reg_handler(s, t, 4);
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_S5(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.3 - Command line editing character */ 
+    t += 2;
+    return s_reg_handler(s, t, 5);
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_S6(at_state_t *s, const char *t)
+{
+    /* V.250 6.3.9 - Pause before blind dialling */ 
+    t += 2;
+    return s_reg_handler(s, t, 6);
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_S7(at_state_t *s, const char *t)
+{
+    /* V.250 6.3.10 - Connection completion timeout */ 
+    t += 2;
+    return s_reg_handler(s, t, 7);
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_S8(at_state_t *s, const char *t)
+{
+    /* V.250 6.3.11 - Comma dial modifier time */ 
+    t += 2;
+    return s_reg_handler(s, t, 8);
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_T(at_state_t *s, const char *t)
+{
+    /* V.250 6.3.2 - Select tone dialling (command) */ 
+    t += 1;
+    s->p.pulse_dial = FALSE;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_V(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.2.6 - DCE response format */ 
+    t += 1;
+    if ((val = parse_num(&t, 1)) < 0)
+        return NULL;
+    s->p.verbose = val;
+    if (s->p.result_code_format != NO_RESULT_CODES)
+        s->p.result_code_format = (s->p.verbose)  ?  ASCII_RESULT_CODES  :  NUMERIC_RESULT_CODES;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_X(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.2.7 - Result code selection and call progress monitoring control */
+    /* 0    CONNECT result code is given upon entering online data state.
+            Dial tone and busy detection are disabled.
+       1    CONNECT <text> result code is given upon entering online data state.
+            Dial tone and busy detection are disabled.
+       2    CONNECT <text> result code is given upon entering online data state.
+            Dial tone detection is enabled, and busy detection is disabled.
+       3    CONNECT <text> result code is given upon entering online data state.
+            Dial tone detection is disabled, and busy detection is enabled.
+       4    CONNECT <text> result code is given upon entering online data state.
+            Dial tone and busy detection are both enabled. */
+    t += 1;
+    if ((val = parse_num(&t, 4)) < 0)
+        return NULL;
+    s->result_code_mode = val;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_Z(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.1.1 - Reset to default configuration */ 
+    t += 1;
+    if ((val = parse_num(&t, sizeof(profiles)/sizeof(profiles[0]) - 1)) < 0)
+        return NULL;
+    /* Just make sure we are on hook */
+    at_modem_control(s, AT_MODEM_CONTROL_HANGUP, NULL);
+    at_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+    s->p = profiles[val];
+    at_reset_call_info(s);
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_amp_C(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.2.8 - Circuit 109 (received line signal detector) behaviour */ 
+    /* We have no RLSD pin, so just absorb this. */
+    t += 2;
+    if ((val = parse_num(&t, 1)) < 0)
+        return NULL;
+    s->rlsd_behaviour = val;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_amp_D(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.250 6.2.9 - Circuit 108 (data terminal ready) behaviour */ 
+    t += 2;
+    if ((val = parse_num(&t, 2)) < 0)
+        return NULL;
+    /* TODO: We have no DTR pin, but we need this to get into online
+             command state. */
+    s->dtr_behaviour = val;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_amp_F(at_state_t *s, const char *t)
+{
+    t += 2;
+
+    /* V.250 6.1.2 - Set to factory-defined configuration */ 
+    /* Just make sure we are on hook */
+    at_modem_control(s, AT_MODEM_CONTROL_HANGUP, NULL);
+    at_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+    s->p = profiles[0];
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_A8A(at_state_t *s, const char *t)
+{
+    /* V.251 6.3 - V.8 calling tone indication */
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_A8C(at_state_t *s, const char *t)
+{
+    /* V.251 6.2 - V.8 answer signal indication */
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_A8E(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.251 5.1 - V.8 and V.8bis operation controls */
+    /* Syntax: +A8E=<v8o>,<v8a>,<v8cf>[,<v8b>][,<cfrange>][,<protrange>] */
+    /* <v8o>=0  Disable V.8 origination negotiation
+       <v8o>=1  Enable DCE-controlled V.8 origination negotiation
+       <v8o>=2  Enable DTE-controlled V.8 origination negotiation, send V.8 CI only
+       <v8o>=3  Enable DTE-controlled V.8 origination negotiation, send 1100Hz CNG only
+       <v8o>=4  Enable DTE-controlled V.8 origination negotiation, send 1300Hz CT only
+       <v8o>=5  Enable DTE-controlled V.8 origination negotiation, send no tones
+       <v8o>=6  Enable DCE-controlled V.8 origination negotiation, issue +A8x indications
+       <v8a>=0  Disable V.8 answer negotiation
+       <v8a>=1  Enable DCE-controlled V.8 answer negotiation
+       <v8a>=2  Enable DTE-controlled V.8 answer negotiation, send ANSam
+       <v8a>=3  Enable DTE-controlled V.8 answer negotiation, send no signal
+       <v8a>=4  Disable DTE-controlled V.8 answer negotiation, send ANS
+       <v8a>=5  Enable DCE-controlled V.8 answer negotiation, issue +A8x indications
+       <v8cf>=X..Y Set the V.8 CI signal call function to the hexadecimal octet value X..Y
+       <v8b>=0  Disable V.8bis negotiation
+       <v8b>=1  Enable DCE-controlled V.8bis negotiation
+       <v8b>=2  Enable DTE-controlled V.8bis negotiation
+       <cfrange>="<string of values>"   Set to alternative list of call function "option bit"
+                                        values that the answering DCE shall accept from the caller
+       <protrange>="<string of values>" Set to alternative list of protocol "option bit" values that
+                                        the answering DCE shall accept from the caller
+    */
+    /* TODO: */
+    t += 4;
+    if (!parse_out(s, &t, &val, 6, "+A8E:", "(0-6),(0-5),(00-FF)"))
+        return NULL;
+    if (*t != ',')
+        return t;
+    if ((val = parse_num(&t, 5)) < 0)
+        return NULL;
+    if (*t != ',')
+        return t;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_A8I(at_state_t *s, const char *t)
+{
+    /* V.251 6.1 - V.8 CI signal indication */
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_A8J(at_state_t *s, const char *t)
+{
+    /* V.251 6.4 - V.8 negotiation complete */
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_A8M(at_state_t *s, const char *t)
+{
+    /* V.251 5.2 - Send V.8 menu signals */
+    /* Syntax: +A8M=<hexadecimal coded CM or JM octet string>  */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_A8R(at_state_t *s, const char *t)
+{
+    /* V.251 6.6 - V.8bis signal and message reporting */
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_A8T(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* V.251 5.3 - Send V.8bis signal and/or message(s) */
+    /* Syntax: +A8T=<signal>[,<1st message>][,<2nd message>][,<sig_en>][,<msg_en>][,<supp_delay>] */
+    /*  <signal>=0  None
+        <signal>=1  Initiating Mre
+        <signal>=2  Initiating MRd
+        <signal>=3  Initiating CRe, low power
+        <signal>=4  Initiating CRe, high power
+        <signal>=5  Initiating CRd
+        <signal>=6  Initiating Esi
+        <signal>=7  Responding MRd, low power
+        <signal>=8  Responding MRd, high power
+        <signal>=9  Responding CRd
+        <signal>=10 Responding Esr
+    */
+    /* TODO: */
+    t += 4;
+    if (!parse_out(s, &t, &val, 10, "+A8T:", "(0-10)"))
+        return NULL;
+    s->v8bis_signal = val;
+    if (*t != ',')
+        return t;
+    if ((val = parse_num(&t, 255)) < 0)
+        return NULL;
+    s->v8bis_1st_message = val;
+    if (*t != ',')
+        return t;
+    if ((val = parse_num(&t, 255)) < 0)
+        return NULL;
+    s->v8bis_2nd_message = val;
+    if (*t != ',')
+        return t;
+    if ((val = parse_num(&t, 255)) < 0)
+        return NULL;
+    s->v8bis_sig_en = val;
+    if (*t != ',')
+        return t;
+    if ((val = parse_num(&t, 255)) < 0)
+        return NULL;
+    s->v8bis_msg_en = val;
+    if (*t != ',')
+        return t;
+    if ((val = parse_num(&t, 255)) < 0)
+        return NULL;
+    s->v8bis_supp_delay = val;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ASTO(at_state_t *s, const char *t)
+{
+    /* V.250 6.3.15 - Store telephone number */ 
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+ASTO:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAAP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.25 - Automatic answer for eMLPP Service */
+    /* TODO: */
+    t += 5;
+    if (!parse_2_out(s, &t, NULL, 65535, NULL, 65535, "+CAAP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CACM(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.25 - Accumulated call meter */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CACM:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CACSP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.1.7 - Voice Group or Voice Broadcast Call State Attribute Presentation */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CACSP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAD(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6.3 - Query analogue or digital service */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAEMLPP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.22 - eMLPP Priority Registration and Interrogation */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CAEMLPP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAHLD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.1.3 - Leave an ongoing Voice Group or Voice Broadcast Call */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CAHLD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAJOIN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.1.1 - Accept an incoming Voice Group or Voice Broadcast Call */
+    /* TODO: */
+    t += 7;
+    if (!parse_out(s, &t, NULL, 1, "+CAJOIN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CALA(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.16 - Alarm */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CALA:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CALCC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.1.6 - List current Voice Group and Voice Broadcast Calls */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CALCC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CALD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.38 - Delete alarm */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CALD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CALM(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.20 - Alert sound mode */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CALM:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAMM(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.26 - Accumulated call meter maximum */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CAMM:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CANCHEV(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.1.8 - NCH Support Indication */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CANCHEV:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAOC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.16 - Advice of Charge */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CAOC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAPD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.39 - Postpone or dismiss an alarm */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CAPD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAPTT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.1.4 - Talker Access for Voice Group Call */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CAPTT:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAREJ(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.1.2 - Reject an incoming Voice Group or Voice Broadcast Call */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CAREJ:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CAULEV(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.1.5 - Voice Group Call Uplink Status Presentation */
+    /* TODO: */
+    t += 7;
+    if (!parse_out(s, &t, NULL, 1, "+CAULEV:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CBC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.4 - Battery charge */
+    /* TODO: */
+    t += 4;
+    if (!parse_out(s, &t, NULL, 1, "+CBC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CBCS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.3.2 - VBS subscriptions and GId status */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CBCS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CBIP(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Base station IP address */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CBST(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.7 - Select bearer service type */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CBST:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CCFC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.11 - Call forwarding number and conditions */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CCFC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CCLK(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.15 - Clock */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CCLK:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CCS(at_state_t *s, const char *t)
+{
+    /* IS-135 4.1.22 - Compression status */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CCUG(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.10 - Closed user group */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CCUG:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CCWA(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.12 - Call waiting */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CCWA:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CCWE(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.28 - Call Meter maximum event */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CCWE:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CDIP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.9 - Called line identification presentation */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CDIP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CDIS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.8 - Display control */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CDIS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CDV(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Dial command for voice call */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CEER(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.10 - Extended error report */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CEER:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CESP(at_state_t *s, const char *t)
+{
+    /* GSM07.05  3.2.4 - Enter SMS block mode protocol */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CFCS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.24 - Fast call setup conditions */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CFCS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CFG(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Configuration string */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CFUN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.2 - Set phone functionality */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CFUN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGACT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.10 - PDP context activate or deactivate */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CGACT:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGANS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.16 - Manual response to a network request for PDP context activation */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CGANS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGATT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.9 - PS attach or detach */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CGATT:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGAUTO(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.15 - Automatic response to a network request for PDP context activation */
+    /* TODO: */
+    t += 7;
+    if (!parse_out(s, &t, NULL, 1, "+CGAUTO:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGCAP(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Request complete capabilities list */
+    /* TODO: */
+    t += 6;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGCLASS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.17 - GPRS mobile station class (GPRS only) */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CGCLASS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGCLOSP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.13 - Configure local Octet Stream PAD parameters (Obsolete) */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CGCLOSP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGCLPAD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.12 - Configure local triple-X PAD parameters (GPRS only) (Obsolete) */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CGCLPAD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGCMOD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.11 - PDP Context Modify */
+    /* TODO: */
+    t += 7;
+    if (!parse_out(s, &t, NULL, 1, "+CGCMOD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGCS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.3.1 - VGCS subscriptions and GId status */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CGCS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGDATA(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.12 - Enter data state */
+    /* TODO: */
+    t += 7;
+    if (!parse_out(s, &t, NULL, 1, "+CGDATA:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGDCONT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.1 - Define PDP Context */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CGDCONT:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGDSCONT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.2 - Define Secondary PDP Context */
+    /* TODO: */
+    t += 9;
+    if (!parse_out(s, &t, NULL, 1, "+CGDSCONT:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGEQMIN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.7 - 3G Quality of Service Profile (Minimum acceptable) */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CGEQMIN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGEQNEG(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.8 - 3G Quality of Service Profile (Negotiated) */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CGEQNEG:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGEQREQ(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.6 - 3G Quality of Service Profile (Requested) */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CGEQREQ:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGEREP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.18 - Packet Domain event reporting */
+    /* TODO: */
+    t += 7;
+    if (!parse_out(s, &t, NULL, 1, "+CGEREP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGMI(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 5.1 - Request manufacturer identification */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CGMI:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGMM(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 5.2 - Request model identification */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CGMM:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGMR(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 5.3 - Request revision identification */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CGMR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGOI(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Request global object identification */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGPADDR(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.14 - Show PDP address */
+    /* TODO: */
+    t += 8;
+    if (!parse_out(s, &t, NULL, 1, "+CGPADDR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGQMIN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.5 - Quality of Service Profile (Minimum acceptable) */
+    /* TODO: */
+    t += 7;
+    if (!parse_out(s, &t, NULL, 1, "+CGQMIN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGQREQ(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.4 - Quality of Service Profile (Requested) */
+    /* TODO: */
+    t += 7;
+    if (!parse_out(s, &t, NULL, 1, "+CGQREQ:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGREG(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.19 - GPRS network registration status */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CGREG:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGSMS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.20 - Select service for MO SMS messages */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CGSMS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGSN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 5.4 - Request product serial number identification */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CGSN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CGTFT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 10.1.3 - Traffic Flow Template */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CGTFT:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHLD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.13 - Call related supplementary services */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CHLD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHSA(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.18 - HSCSD non-transparent asymmetry configuration */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CHSA:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHSC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.15 - HSCSD current call parameters */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CHSC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHSD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.12 - HSCSD device parameters */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CHSD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHSN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.14 - HSCSD non-transparent call configuration */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CHSN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHSR(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.16 - HSCSD parameters report */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CHSR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHST(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.13 - HSCSD transparent call configuration */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CHST:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHSU(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.17 - HSCSD automatic user initiated upgrading */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CHSU:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHUP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.5 - Hangup call */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CHUP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CHV(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Hang-up voice */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CIMI(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 5.6 - Request international mobile subscriber identity */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CIMI:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CIND(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.9 - Indicator control */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CIND:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CIT(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Command state inactivity timer */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CKPD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.7 - Keypad control */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CKPD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CLAC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.37 - List all available AT commands */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CLAC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CLAE(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.31 - Language Event */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CLAE:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CLAN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.30 - Set Language */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CLAN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CLCC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.18 - List current calls */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CLCC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CLCK(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.4 - Facility lock */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CLCK:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CLIP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.6 - Calling line identification presentation */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CLIP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CLIR(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.7 - Calling line identification restriction */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CLIR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CLVL(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.23 - Loudspeaker volume level */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CLVL:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMAR(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.36 - Master Reset */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CMAR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMEC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.6 - Mobile Termination control mode */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CMEC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMEE(at_state_t *s, const char *t)
+{
+    /* GSM07.07 9.1 - Report mobile equipment error */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMER(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.10 - Mobile Termination event reporting */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CMER:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMGC(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.5.5/4.5 - Send command */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMGD(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.5.4 - Delete message */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMGF(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.2.3 - Message Format */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMGL(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.4.2/4.1 -  List messages */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMGR(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.4.3/4.2 - Read message */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMGS(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.5.1/4.3 - Send message */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMGW(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.5.3/4.4 - Write message to memory */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMIP(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Mobile station IP address */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMM(at_state_t *s, const char *t)
+{
+    /* IS-135 4.1.23 - Menu map */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMMS(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.5.6 - More messages to send */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMOD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.4 - Call mode */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CMOD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMSS(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.5.2/4.7 - Send message from storage */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMUT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.24 - Mute control */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CMUT:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CNMA(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.4.4/4.6 - New message acknowledgement to terminal adapter */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CNMI(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.4.1 - New message indications to terminal equipment */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CMUX(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 5.7 - Multiplexing mode */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CMUX:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CNUM(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.1 - Subscriber number */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CNUM:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_COLP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.8 - Connected line identification presentation */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+COLP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_COPN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.21 - Read operator names */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+COPN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_COPS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.3 - PLMN selection */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+COPS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_COS(at_state_t *s, const char *t)
+{
+    /* IS-135 4.1.24 - Originating service */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_COTDI(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 11.1.9 - Originator to Dispatcher Information */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+COTDI:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPAS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.1 - Phone activity status */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPAS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPBF(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.13 - Find phonebook entries */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPBF:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPBR(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.12 - Read phonebook entries */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPBR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPBS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.11 - Select phonebook memory storage */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPBS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPBW(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.14 - Write phonebook entry */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPBW:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPIN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.3 - Enter PIN */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPIN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPLS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.20 - Selection of preferred PLMN list */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPLS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPMS(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.2.2 - Preferred message storage */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPOL(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.19 - Preferred PLMN list */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPOL:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPPS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.23 - eMLPP subscriptions */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPPS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPROT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.42 - Enter protocol mode */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CPROT:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPUC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.27 - Price per unit and currency table */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPUC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPWC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.29 - Power class */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPWC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CPWD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.5 - Change password */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CPWD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CQD(at_state_t *s, const char *t)
+{
+    /* IS-135 4.1.25 - Query disconnect timer */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CR(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.9 - Service reporting control */
+    /* TODO: */
+    t += 3;
+    if (!parse_out(s, &t, NULL, 1, "+CR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CRC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.11 - Cellular result codes */
+    /* TODO: */
+    t += 4;
+    if (!parse_out(s, &t, NULL, 1, "+CRC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CREG(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.2 - Network registration */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CREG:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CRES(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.3.6 - Restore Settings */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CRLP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CRLP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.8 - Radio link protocol */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CRLP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CRM(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Set rm interface protocol */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CRMC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.34 - Ring Melody Control */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CRMC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CRMP(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.35 - Ring Melody Playback */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CRMP:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CRSL(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.21 - Ringer sound level */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CRSL:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CRSM(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.18 - Restricted SIM access */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CRSM:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSAS(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.3.5 - Save settings */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSCA(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.3.1 - Service centre address */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSCB(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.3.4 - Select cell broadcast message types */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSCC(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.19 - Secure control command */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSCC:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSCS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 5.5 - Select TE character set */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSCS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSDF(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.22 - Settings date format */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSDF:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSDH(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.3.3 - Show text mode parameters */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSGT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.32 - Set Greeting Text */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSGT:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSIL(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.23 - Silence Command */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSIL:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSIM(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.17 - Generic SIM access */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSIM:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSMP(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.3.2 - Set text mode parameters */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSMS(at_state_t *s, const char *t)
+{
+    /* GSM07.05 3.2.1 - Select Message Service */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSNS(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.19 - Single numbering scheme */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSNS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSQ(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.5 - Signal quality */
+    /* TODO: */
+    t += 4;
+    if (!parse_out(s, &t, NULL, 1, "+CSQ:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSS(at_state_t *s, const char *t)
+{
+    /* IS-135 4.1.28 - Serving system identification */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSSN(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.17 - Supplementary service notifications */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSSN:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSTA(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.1 - Select type of address */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSTA:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSTF(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.24 - Settings time format */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSTF:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CSVM(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.33 - Set Voice Mail Number */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CSVM:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CTA(at_state_t *s, const char *t)
+{
+    /* IS-135 4.1.29 - MT-Terminated async. Data calls */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CTF(at_state_t *s, const char *t)
+{
+    /* IS-135 4.1.30 - MT-Terminated FAX calls */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CTFR(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.14 - Call deflection */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CTFR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CTZR(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.41 - Time Zone Reporting */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CTZR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CTZU(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.40 - Automatic Time Zone Update */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CTZU:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CUSD(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.15 - Unstructured supplementary service data */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CUSD:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CUUS1(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 7.26 - User to User Signalling Service 1 */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CUUS1:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CV120(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.21 - V.120 rate adaption protocol */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+CV120:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CVHU(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 6.20 - Voice Hangup Control */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CVHU:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CVIB(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 8.22 - Vibrator mode */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+CVIB:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_CXT(at_state_t *s, const char *t)
+{
+    /* IS-99 5.6 - Cellular extension */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_DR(at_state_t *s, const char *t)
+{
+    /* V.250 6.6.2 - Data compression reporting */ 
+    /* TODO: */
+    t += 3;
+    if (!parse_out(s, &t, NULL, 1, "+DR:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_DS(at_state_t *s, const char *t)
+{
+    /* V.250 6.6.1 - Data compression */ 
+    /* TODO: */
+    t += 3;
+    if (!parse_out(s, &t, NULL, 1, "+DS:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_DS44(at_state_t *s, const char *t)
+{
+    /* V.250 6.6.2 - V.44 data compression */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_EB(at_state_t *s, const char *t)
+{
+    /* V.250 6.5.2 - Break handling in error control operation */ 
+    /* TODO: */
+    t += 3;
+    if (!parse_out(s, &t, NULL, 1, "+EB:", ""))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_EFCS(at_state_t *s, const char *t)
+{
+    /* V.250 6.5.4 - 32-bit frame check sequence */ 
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 2, "+EFCS:", "(0-2)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_EFRAM(at_state_t *s, const char *t)
+{
+    /* V.250 6.5.8 - Frame length */ 
+    /* TODO: */
+    t += 6;
+    if (!parse_2_out(s, &t, NULL, 65535, NULL, 65535, "+EFRAM:", "(1-65535),(1-65535)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ER(at_state_t *s, const char *t)
+{
+    /* V.250 6.5.5 - Error control reporting */ 
+    /*  0   Error control reporting disabled (no +ER intermediate result code transmitted)
+        1   Error control reporting enabled (+ER intermediate result code transmitted) */
+    /* TODO: */
+    t += 3;
+    if (!parse_out(s, &t, NULL, 1, "+ER:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ES(at_state_t *s, const char *t)
+{
+    /* V.250 6.5.1 - Error control selection */ 
+    /* TODO: */
+    t += 3;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ESR(at_state_t *s, const char *t)
+{
+    /* V.250 6.5.3 - Selective repeat */ 
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ETBM(at_state_t *s, const char *t)
+{
+    /* V.250 6.5.6 - Call termination buffer management */ 
+    /* TODO: */
+    t += 5;
+    if (!parse_2_out(s, &t, NULL, 2, NULL, 2, "+ETBM:", "(0-2),(0-2),(0-30)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_EWIND(at_state_t *s, const char *t)
+{
+    /* V.250 6.5.7 - Window size */ 
+    /* TODO: */
+    t += 6;
+    if (!parse_2_out(s, &t, &s->rx_window, 127, &s->tx_window, 127, "+EWIND:", "(1-127),(1-127)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FAA(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.5 - Adaptive Answer parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FAP(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.12 - Addressing and polling capabilities parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FAR(at_state_t *s, const char *t)
+{
+    /* T.31 8.5.1 - Adaptive reception control */ 
+    t += 4;
+    if (!parse_out(s, &t, &s->p.adaptive_receive, 1, NULL, "0,1"))
+         return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FBO(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.3.4 - Phase C data bit order */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FBS(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.3.2 - Buffer Size, read only parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FBU(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.10 - HDLC Frame Reporting parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FCC(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.1 - DCE capabilities parameters */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FCL(at_state_t *s, const char *t)
+{
+    /* T.31 8.5.2 - Carrier loss timeout */ 
+    t += 4;
+    if (!parse_out(s, &t, &s->carrier_loss_timeout, 255, NULL, "(0-255)"))
+         return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FCLASS(at_state_t *s, const char *t)
+{
+    /* T.31 8.2 - Capabilities identification and control */ 
+    t += 7;
+    /* T.31 says the reply string should be "0,1.0", however making
+       it "0,1,1.0" makes things compatible with a lot more software
+       that may be expecting a pre-T.31 modem. */
+    if (!parse_string_out(s, &t, &s->fclass_mode, 1, NULL, "0,1,1.0"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FCQ(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.3 -  Copy quality checking parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FCR(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.9 - Capability to receive parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FCS(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.3 - Current Session Results parameters */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FCT(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.6 - DTE phase C timeout parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FDD(at_state_t *s, const char *t)
+{
+    /* T.31 8.5.3 - Double escape character replacement */ 
+    t += 4;
+    if (!parse_out(s, &t, &s->p.double_escape, 1, NULL, "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FDR(at_state_t *s, const char *t)
+{
+    /* T.32 8.3.4 - Data reception command */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FDT(at_state_t *s, const char *t)
+{
+    /* T.32 8.3.3 - Data transmission command */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FEA(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.3.5 - Phase C received EOL alignment parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FFC(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.3.6 - Format conversion parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FFD(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.14 - File diagnostic message parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FHS(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.7 - Call termination status parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FIE(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.1 - Procedure interrupt enable parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FIP(at_state_t *s, const char *t)
+{
+    /* T.32 8.3.6 - Initialize Facsimile Parameters */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FIS(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.2 -  Current session parameters */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FIT(at_state_t *s, const char *t)
+{
+    /* T.31 8.5.4 - DTE inactivity timeout */ 
+    t += 4;
+    if (!parse_2_out(s, &t, &s->dte_inactivity_timeout, 255, &s->dte_inactivity_action, 1, "+FIT:", "(0-255),(0-1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FKS(at_state_t *s, const char *t)
+{
+    /* T.32 8.3.5 - Session termination command */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FLI(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.5 - Local ID string parameter, TSI or CSI */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FLO(at_state_t *s, const char *t)
+{
+    /* T.31 Annex A */ 
+    /* Implement something similar to the V.250 +IFC command */ 
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FLP(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.7 - Indicate document to poll parameter */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FMI(at_state_t *s, const char *t)
+{
+    /* T.31 says to duplicate +GMI */ 
+    t += 4;
+    if (t[0] == '?')
+    {
+        at_put_response(s, manufacturer);
+        t += 1;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FMM(at_state_t *s, const char *t)
+{
+    /* T.31 says to duplicate +GMM */ 
+    t += 4;
+    if (t[0] == '?')
+    {
+        at_put_response(s, model);
+        t += 1;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FMR(at_state_t *s, const char *t)
+{
+    /* T.31 says to duplicate +GMR */ 
+    t += 4;
+    if (t[0] == '?')
+    {
+        at_put_response(s, revision);
+        t += 1;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FMS(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.9 - Minimum phase C speed parameter */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FND(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.10 - Non-Standard Message Data Indication parameter */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FNR(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.11 - Negotiation message reporting control parameters */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FNS(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.6 - Non-Standard Frame FIF parameter */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FPA(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.13 - Selective polling address parameter */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FPI(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.5 - Local Polling ID String parameter */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FPP(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.3 - Facsimile packet protocol */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FPR(at_state_t *s, const char *t)
+{
+    /* T.31 Annex A */ 
+    /* Implement something similar to the V.250 +IPR command */ 
+    t += 4;
+    if (!parse_out(s, &t, &s->dte_rate, 115200, NULL, "115200"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FPS(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.2 - Page Status parameter */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FPW(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.13 - PassWord parameter (Sending or Polling) */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FRH(at_state_t *s, const char *t)
+{
+    /* T.31 8.3.6 - HDLC receive */ 
+    if (!process_class1_cmd(s, &t))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FRM(at_state_t *s, const char *t)
+{
+    /* T.31 8.3.4 - Facsimile receive */ 
+    if (!process_class1_cmd(s, &t))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FRQ(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.4 - Receive Quality Thresholds parameters */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FRS(at_state_t *s, const char *t)
+{
+    /* T.31 8.3.2 - Receive silence */ 
+    if (!process_class1_cmd(s, &t))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FRY(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.2.8 - ECM Retry Value parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FSA(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.13 - Subaddress parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FSP(at_state_t *s, const char *t)
+{
+    /* T.32 8.5.1.8 - Request to poll parameter */
+    /* TODO */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FTH(at_state_t *s, const char *t)
+{
+    /* T.31 8.3.5 - HDLC transmit */ 
+    if (!process_class1_cmd(s, &t))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FTM(at_state_t *s, const char *t)
+{
+    /* T.31 8.3.3 - Facsimile transmit */ 
+    if (!process_class1_cmd(s, &t))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_FTS(at_state_t *s, const char *t)
+{
+    /* T.31 8.3.1 - Transmit silence */ 
+    if (!process_class1_cmd(s, &t))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_GCAP(at_state_t *s, const char *t)
+{
+    /* V.250 6.1.9 - Request complete capabilities list */
+    t += 5;
+    /* Response elements
+       +FCLASS     +F (FAX) commands
+       +MS         +M (modulation control) commands +MS and +MR
+       +MV18S      +M (modulation control) commands +MV18S and +MV18R
+       +ES         +E (error control) commands +ES, +EB, +ER, +EFCS, and +ETBM
+       +DS         +D (data compression) commands +DS and +DR */
+    /* TODO: make this adapt to the configuration we really have. */
+    if (t[0] == '?')
+    {
+        at_put_response(s, "+GCAP:+FCLASS");
+        t += 1;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_GCI(at_state_t *s, const char *t)
+{
+    /* V.250 6.1.10 - Country of installation, */ 
+    t += 4;
+    if (!parse_hex_out(s, &t, &s->country_of_installation, 255, "+GCI:", "(00-FF)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_GMI(at_state_t *s, const char *t)
+{
+    /* V.250 6.1.4 - Request manufacturer identification */ 
+    t += 4;
+    if (t[0] == '?')
+    {
+        at_put_response(s, manufacturer);
+        t += 1;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_GMM(at_state_t *s, const char *t)
+{
+    /* V.250 6.1.5 - Request model identification */ 
+    t += 4;
+    if (t[0] == '?')
+    {
+        at_put_response(s, model);
+        t += 1;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_GMR(at_state_t *s, const char *t)
+{
+    /* V.250 6.1.6 - Request revision identification */ 
+    t += 4;
+    if (t[0] == '?')
+    {
+        at_put_response(s, revision);
+        t += 1;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_GOI(at_state_t *s, const char *t)
+{
+    /* V.250 6.1.8 - Request global object identification */ 
+    /* TODO: */
+    t += 4;
+    if (t[0] == '?')
+    {
+        at_put_response(s, GLOBAL_OBJECT_IDENTITY);
+        t += 1;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_GSN(at_state_t *s, const char *t)
+{
+    /* V.250 6.1.7 - Request product serial number identification */ 
+    /* TODO: */
+    t += 4;
+    if (t[0] == '?')
+    {
+        at_put_response(s, SERIAL_NUMBER);
+        t += 1;
+    }
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_IBC(at_state_t *s, const char *t)
+{
+    /* TIA-617 8.3 - Control of in-band control */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_IBM(at_state_t *s, const char *t)
+{
+    /* TIA-617 8.4 - In-Band MARK idle reporting control */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ICF(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.11 - DTE-DCE character framing */ 
+    t += 4;
+    /* Character format
+        0    auto detect
+        1    8 data 2 stop
+        2    8 data 1 parity 1 stop
+        3    8 data 1 stop
+        4    7 data 2 stop
+        5    7 data 1 parity 1 stop
+        6    7 data 1 stop
+    
+       parity
+        0    Odd
+        1    Even
+        2    Mark
+        3    Space */
+    if (!parse_2_out(s, &t, &s->dte_char_format, 6, &s->dte_parity, 3, "+ICF:", "(0-6),(0-3)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ICLOK(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.14 - Select sync transmit clock source */ 
+    t += 6;
+    if (!parse_out(s, &t, &s->sync_tx_clock_source, 2, "+ICLOK:", "(0-2)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_IDSR(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.16 - Select data set ready option */ 
+    t += 5;
+    if (!parse_out(s, &t, &s->dsr_option, 2, "+IDSR:", "(0-2)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_IFC(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.12 - DTE-DCE local flow control */ 
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ILRR(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.13 - DTE-DCE local rate reporting */ 
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ILSD(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.15 - Select long space disconnect option */ 
+    t += 5;
+    if (!parse_out(s, &t, &s->long_space_disconnect_option, 2, "+ILSD:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_IPR(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.10 - Fixed DTE rate */ 
+    /* TODO: */
+    t += 4;
+    if (!parse_out(s, &t, &s->dte_rate, 115200, "+IPR:", "(115200),(115200)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_IRTS(at_state_t *s, const char *t)
+{
+    /* V.250 6.2.17 - Select synchronous mode RTS option */ 
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+IRTS:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_MA(at_state_t *s, const char *t)
+{
+    /* V.250 6.4.2 - Modulation automode control */ 
+    /* TODO: */
+    t += 3;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_MR(at_state_t *s, const char *t)
+{
+    /* V.250 6.4.3 - Modulation reporting control */ 
+    /*  0    Disables reporting of modulation connection (+MCR: and +MRR: are not transmitted)
+        1    Enables reporting of modulation connection (+MCR: and +MRR: are transmitted) */
+    /* TODO: */
+    t += 3;
+    if (!parse_out(s, &t, NULL, 1, "+MR:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_MS(at_state_t *s, const char *t)
+{
+    /* V.250 6.4.1 - Modulation selection */ 
+    /* TODO: */
+    t += 3;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_MSC(at_state_t *s, const char *t)
+{
+    /* V.250 6.4.8 - Seamless rate change enable */ 
+    /*  0   Disables V.34 seamless rate change 
+        1   Enables V.34 seamless rate change */
+    /* TODO: */
+    t += 4;
+    if (!parse_out(s, &t, NULL, 1, "+MSC:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_MV18AM(at_state_t *s, const char *t)
+{
+    /* V.250 6.4.6 - V.18 answering message editing */ 
+    /* TODO: */
+    t += 7;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_MV18P(at_state_t *s, const char *t)
+{
+    /* V.250 6.4.7 - Order of probes */ 
+    /*  2    Send probe message in 5-bit (Baudot) mode
+        3    Send probe message in DTMF mode
+        4    Send probe message in EDT mode
+        5    Send Rec. V.21 carrier as a probe
+        6    Send Rec. V.23 carrier as a probe
+        7    Send Bell 103 carrier as a probe */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 7, "+MV18P:", "(2-7)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_MV18R(at_state_t *s, const char *t)
+{
+    /* V.250 6.4.5 - V.18 reporting control */ 
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+MV18R:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_MV18S(at_state_t *s, const char *t)
+{
+    /* V.250 6.4.4 - V.18 selection */ 
+    /*  mode:
+        0    Disables V.18 operation
+        1    V.18 operation, auto detect mode
+        2    V.18 operation, connect in 5-bit (Baudot) mode
+        3    V.18 operation, connect in DTMF mode
+        4    V.18 operation, connect in EDT mode
+        5    V.18 operation, connect in V.21 mode
+        6    V.18 operation, connect in V.23 mode
+        7    V.18 operation, connect in Bell 103-type mode
+
+        dflt_ans_mode:
+        0    Disables V.18 answer operation
+        1    No default specified (auto detect)
+        2    V.18 operation connect in 5-bit (Baudot) mode
+        3    V.18 operation connect in DTMF mode
+        4    V.18 operation connect in EDT mode
+
+        fbk_time_enable:
+        0    Disable
+        1    Enable
+
+        ans_msg_enable
+        0    Disable
+        1    Enable
+
+        probing_en
+        0    Disable probing
+        1    Enable probing
+        2    Initiate probing */
+    /* TODO: */
+    t += 6;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_PCW(at_state_t *s, const char *t)
+{
+    /* V.250 6.8.1 - Call waiting enable (V.92 DCE) */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_PIG(at_state_t *s, const char *t)
+{
+    /* V.250 6.8.5 - PCM upstream ignore */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_PMH(at_state_t *s, const char *t)
+{
+    /* V.250 6.8.2 - Modem on hold enable */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_PMHF(at_state_t *s, const char *t)
+{
+    /* V.250 6.8.6 - V.92 Modem on hold hook flash */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_PMHR(at_state_t *s, const char *t)
+{
+    /* V.250 6.8.4 - Initiate modem on hold */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_PMHT(at_state_t *s, const char *t)
+{
+    /* V.250 6.8.3 - Modem on hold timer */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_PQC(at_state_t *s, const char *t)
+{
+    /* V.250 6.8.7 - V.92 Phase 1 and Phase 2 Control */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_PSS(at_state_t *s, const char *t)
+{
+    /* V.250 6.8.8 - V.92 Use Short Sequence */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SAC(at_state_t *s, const char *t)
+{
+    /* V.252 3.4 - Audio transmit configuration */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SAM(at_state_t *s, const char *t)
+{
+    /* V.252 3.5 - Audio receive mode */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SAR(at_state_t *s, const char *t)
+{
+    /* V.252 5.3 - Audio receive channel indication */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SARR(at_state_t *s, const char *t)
+{
+    /* V.252 3.9 - Audio indication reporting */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SAT(at_state_t *s, const char *t)
+{
+    /* V.252 5.4 - Audio transmit channel indication */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SCRR(at_state_t *s, const char *t)
+{
+    /* V.252 3.11 - Capabilities indication reporting */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SDC(at_state_t *s, const char *t)
+{
+    /* V.252 3.3 - Data configuration */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SDI(at_state_t *s, const char *t)
+{
+    /* V.252 5.2 - Data channel identification */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SDR(at_state_t *s, const char *t)
+{
+    /* V.252 3.8 - Data indication reporting */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SRSC(at_state_t *s, const char *t)
+{
+    /* V.252 5.1.2 - Remote terminal simultaneous capability indication */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_STC(at_state_t *s, const char *t)
+{
+    /* V.252 3.1 - Terminal configuration */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_STH(at_state_t *s, const char *t)
+{
+    /* V.252 3.2 - Close logical channel */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SVC(at_state_t *s, const char *t)
+{
+    /* V.252 3.6 - Video transmit configuration */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SVM(at_state_t *s, const char *t)
+{
+    /* V.252 3.7 - Video receive mode */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SVR(at_state_t *s, const char *t)
+{
+    /* V.252 5.5 - Video receive channel indication */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SVRR(at_state_t *s, const char *t)
+{
+    /* V.252 3.10 - Video indication reporting */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_SVT(at_state_t *s, const char *t)
+{
+    /* V.252 5.6 - Video transmit channel indication */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TADR(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.9 - Local V.54 address */ 
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TAL(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.15 - Local analogue loop */ 
+    /* Action
+        0   Disable analogue loop
+        1   Enable analogue loop
+       Band
+        0   Low frequency band
+        1   High frequency band */
+    /* TODO: */
+    t += 4;
+    if (!parse_2_out(s, &t, NULL, 1, NULL, 1, "+TAL:", "(0,1),(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TALS(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.6 - Analogue loop status */ 
+    /*  0   Inactive
+        1   V.24 circuit 141 invoked
+        2   Front panel invoked
+        3   Network management system invoked */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 3, "+TALS:", "(0-3)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TDLS(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.7 - Local digital loop status */ 
+    /*  0   Disabled
+        1   Enabled, inactive
+        2   Front panel invoked
+        3   Network management system invoked
+        4   Remote invoked */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 3, "+TDLS:", "(0-4)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TE140(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.1 - Enable ckt 140 */ 
+    /*  0   Disabled
+        1   Enabled */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+TE140:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TE141(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.2 - Enable ckt 141 */ 
+    /*  0   Response is disabled
+        1   Response is enabled */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+TE141:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TEPAL(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.5 - Enable front panel analogue loop */ 
+    /*  0   Disabled
+        1   Enabled */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+TEPAL:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TEPDL(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.4 - Enable front panel RDL */ 
+    /*  0   Disabled
+        1   Enabled */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+TEPDL:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TERDL(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.3 - Enable RDL from remote */ 
+    /*  0   Local DCE will ignore command from remote
+        1   Local DCE will obey command from remote */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+TERDL:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TLDL(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.13 - Local digital loop */
+    /*  0   Stop test
+        1   Start test */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+TLDL:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TMO(at_state_t *s, const char *t)
+{
+    /* V.250 6.9 - V.59 command */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TMODE(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.10 - Set V.54 mode */ 
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+TMODE:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TNUM(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.12 - Errored bit and block counts */ 
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TRDL(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.14 - Request remote digital loop */ 
+    /*  0   Stop RDL
+        1   Start RDL */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+TRDL:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TRDLS(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.8 - Remote digital loop status */ 
+    /* TODO: */
+    t += 6;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TRES(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.17 - Self test result */ 
+    /*  0   No test
+        1   Pass
+        2   Fail */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, NULL, 1, "+TRES:", "(0-2)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TSELF(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.16 - Self test */ 
+    /*  0   Intrusive full test
+        1   Safe partial test */
+    /* TODO: */
+    t += 6;
+    if (!parse_out(s, &t, NULL, 1, "+TSELF:", "(0,1)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_TTER(at_state_t *s, const char *t)
+{
+    /* V.250 6.7.2.11 - Test error rate */ 
+    /* TODO: */
+    t += 5;
+    if (!parse_2_out(s, &t, NULL, 65535, NULL, 65535, "+TTER:", "(0-65535),(0-65535)"))
+        return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VAC(at_state_t *s, const char *t)
+{
+    /* V.252 4.1 - Set audio code */
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VACR(at_state_t *s, const char *t)
+{
+    /* V.252 6.1 - Audio code report */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VBT(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 C.2.2 - Buffer threshold setting */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VCID(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 C.2.3 - Calling number ID presentation */
+    /* TODO: */
+    t += 5;
+    if (!parse_out(s, &t, &s->display_call_info, 1, NULL, "0,1"))
+         return NULL;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VCIDR(at_state_t *s, const char *t)
+{
+    /* V.252 6.2 - Caller ID report */
+    /* TODO: */
+    t += 6;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VDID(at_state_t *s, const char *t)
+{
+    /* V.253 9.2.4 - DID service */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VDIDR(at_state_t *s, const char *t)
+{
+    /* V.252 6.2 - DID report */
+    /* TODO: */
+    t += 6;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VDR(at_state_t *s, const char *t)
+{
+    /* V.253 10.3.1 - Distinctive ring (ring cadence reporting) */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VDT(at_state_t *s, const char *t)
+{
+    /* V.253 10.3.2 - Control tone cadence reporting */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VDX(at_state_t *s, const char *t)
+{
+    /* V.253 10.5.6 - Speakerphone duplex mode */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VEM(at_state_t *s, const char *t)
+{
+    /* V.253 10.5.7 - Deliver event reports */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VGM(at_state_t *s, const char *t)
+{
+    /* V.253 10.5.2 - Microphone gain */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VGR(at_state_t *s, const char *t)
+{
+    /* V.253 10.2.1 - Receive gain selection */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VGS(at_state_t *s, const char *t)
+{
+    /* V.253 10.5.3 - Speaker gain */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VGT(at_state_t *s, const char *t)
+{
+    /* V.253 10.2.2 - Volume selection */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VHC(at_state_t *s, const char *t)
+{
+    /* V.252 4.12 - Telephony port hook control */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VIP(at_state_t *s, const char *t)
+{
+    /* V.253 10.1.1 - Initialize voice parameters */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VIT(at_state_t *s, const char *t)
+{
+    /* V.253 10.2.3 - DTE/DCE inactivity timer */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VLS(at_state_t *s, const char *t)
+{
+    /* V.253 10.2.4 - Analogue source/destination selection */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VNH(at_state_t *s, const char *t)
+{
+    /* V.253 9.2.5 - Automatic hangup control */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VPH(at_state_t *s, const char *t)
+{
+    /* V.252 4.11 - Phone hookswitch status */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VPP(at_state_t *s, const char *t)
+{
+    /* V.253 10.4.2 - Voice packet protocol */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VPR(at_state_t *s, const char *t)
+{
+    /* IS-101 10.4.3 - Select DTE/DCE interface rate */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VRA(at_state_t *s, const char *t)
+{
+    /* V.253 10.2.5 - Ringing tone goes away timer */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VRID(at_state_t *s, const char *t)
+{
+    int val;
+
+    /* Extension of V.253 +VCID, Calling number ID report/repeat */
+    t += 5;
+    val = 0;
+    if (!parse_out(s, &t, &val, 1, NULL, "0,1"))
+         return NULL;
+    if (val == 1)
+        at_display_call_info(s);
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VRL(at_state_t *s, const char *t)
+{
+    /* V.253 10.1.2 - Ring local phone */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VRN(at_state_t *s, const char *t)
+{
+    /* V.253 10.2.6 - Ringing tone never appeared timer */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VRX(at_state_t *s, const char *t)
+{
+    /* V.253 10.1.3 - Voice receive state */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VSD(at_state_t *s, const char *t)
+{
+    /* V.253 10.2.7 - Silence detection (QUIET and SILENCE) */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VSID(at_state_t *s, const char *t)
+{
+    /* Extension of V.253 +VCID, Set calling number ID */
+    t += 5;
+    switch (*t)
+    {
+    case '=':
+        switch (*(t+1))
+        {
+        case '?':
+            /* Show possible values */
+            at_put_response(s, "");
+            break;
+        default:
+            /* Set value */
+            s->local_id = strdup(t + 1);
+            if (at_modem_control(s, AT_MODEM_CONTROL_SETID, s->local_id) < 0)
+                return NULL;
+            break;
+        }
+        break;
+    case '?':
+        /* Show current index value from def */
+        at_put_response(s, (s->local_id)  ?  s->local_id  :  "");
+        break;
+    default:
+        return NULL;
+    }
+    while (*t) t++;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VSM(at_state_t *s, const char *t)
+{
+    /* V.253 10.2.8 - Compression method selection */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VSP(at_state_t *s, const char *t)
+{
+    /* V.253 10.5.1 - Voice speakerphone state */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VTA(at_state_t *s, const char *t)
+{
+    /* V.253 10.5.4 - Train acoustic echo-canceller */ 
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VTD(at_state_t *s, const char *t)
+{
+    /* V.253 10.2.9 - Beep tone duration timer */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VTER(at_state_t *s, const char *t)
+{
+    /* V.252 6.4 - Simple telephony event report */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VTH(at_state_t *s, const char *t)
+{
+    /* V.253 10.5.5 - Train line echo-canceller */ 
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VTR(at_state_t *s, const char *t)
+{
+    /* V.253 10.1.4 - Voice duplex state */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VTS(at_state_t *s, const char *t)
+{
+    /* V.253 10.1.5 - DTMF and tone generation in voice */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VTX(at_state_t *s, const char *t)
+{
+    /* V.253 10.1.6 - Transmit data state */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_VXT(at_state_t *s, const char *t)
+{
+    /* IS-101 10.1.5 - Translate voice data */
+    /* TODO: */
+    t += 4;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_W(at_state_t *s, const char *t)
+{
+    /* TIA-678 5.2.4.1 - Compliance indication */
+    /* TODO: */
+    t += 2;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WBAG(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.6 Bias Modem Audio Gain */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WCDA(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.2.5 Display Data Link Address */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WCHG(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.2.4 Display Battery Charging Status */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WCID(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.2.1 Display System ID (operator) */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WCLK(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.2.3 Lock/Unlock DCE */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WCPN(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.2.2 Set Personal Identification Number */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WCXF(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.2.6 Display Supported Annex B commands */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WDAC(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.1 Data over Analogue Cellular Command Query */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WDIR(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.8 Phone Number Directory Selection */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WECR(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.3 Enable Cellular Result Codes */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WFON(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.5 Phone Specification */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WKPD(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.7 Keypad Emulation */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WPBA(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.9 Phone Battery Query */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WPTH(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.10 Call Path */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WRLK(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.4 Roam Lockout */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WS45(at_state_t *s, const char *t)
+{
+    /* TIA-678 5.2.4.2 DTE-side stack selection */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WS46(at_state_t *s, const char *t)
+{
+    /* 3GPP TS 27.007 5.9 - PCCA STD-101 [17] select wireless network */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WS50(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.1.1 Normalized Signal Strength */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WS51(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.1.2 Carrier Detect Signal Threshold */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WS52(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.1.3 Normalized Battery Level */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WS53(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.1.4 Normalized Channel Quality */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WS54(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.1.5 Carrier Detect Channel Quality Threshold */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WS57(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.1.7 Antenna Preference */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WS58(at_state_t *s, const char *t)
+{
+    /* TIA-678 B.3.1.8 Idle Time-out Value */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_WSTL(at_state_t *s, const char *t)
+{
+    /* TIA-678 C.5.2 Call Session Time Limit */
+    /* TODO: */
+    t += 5;
+    return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+    AT command group prefixes:
+
+    +A    Call control (network addressing) issues, common, PSTN, ISDN, Rec. X.25, switched digital
+    +C    Digital cellular extensions
+    +D    Data compression, Rec. V.42bis
+    +E    Error control, Rec. V.42
+    +F    Facsimile, Rec. T.30, etc.
+    +G    Generic issues such as identity and capabilities
+    +I    DTE-DCE interface issues, Rec. V.24, etc.
+    +M    Modulation, Rec. V.32bis, etc.
+    +S    Switched or simultaneous data types
+    +T    Test issues
+    +V    Voice extensions
+    +W    Wireless extensions
+*/
+
+#include "at_interpreter_dictionary.h"
+
+static int command_search(const char *u, int len, int *matched)
+{
+    int i;
+    int index;
+    int first;
+    int last;
+    int entry;
+    int ptr;
+
+    entry = 0;
+    /* Loop over the length of the string to search the trie... */
+    for (i = 0, ptr = 0;  ptr < COMMAND_TRIE_LEN;  i++)
+    {
+        /* The character in u we are processing... */
+        /* V.250 5.4.1 says upper and lower case are equivalent in commands */
+        index = (unsigned char) toupper(u[i]);
+        /* Is there a child node for this character? */
+        /* Note: First and last could have been packed into one uint16_t,
+           but space is not that critical, so the other packing is good
+           enough to make the table reasonable. */
+        first = command_trie[ptr++];
+        last = command_trie[ptr++];
+        entry = command_trie[ptr++];
+        if (index < first  ||  index > last)
+            break;
+        if ((ptr = command_trie[ptr + index - first]) == 0)
+            break;
+        ptr--;
+    }
+    *matched = i;
+    return entry;
+}
+/*- End of function --------------------------------------------------------*/
+
+int at_modem_control(at_state_t *s, int op, const char *num)
+{
+    switch (op)
+    {
+    case AT_MODEM_CONTROL_ANSWER:
+        break;
+    case AT_MODEM_CONTROL_CALL:
+        break;
+    case AT_MODEM_CONTROL_HANGUP:
+        break;
+    case AT_MODEM_CONTROL_OFFHOOK:
+        break;
+    case AT_MODEM_CONTROL_DTR:
+        break;
+    case AT_MODEM_CONTROL_RTS:
+        break;
+    case AT_MODEM_CONTROL_CTS:
+        break;
+    case AT_MODEM_CONTROL_CAR:
+        break;
+    case AT_MODEM_CONTROL_RNG:
+        break;
+    case AT_MODEM_CONTROL_DSR:
+        break;
+    case AT_MODEM_CONTROL_RESTART:
+        break;
+    default:
+        break;
+    }
+    /*endswitch*/
+    return s->modem_control_handler(s, s->modem_control_user_data, op, num);
+}
+/*- End of function --------------------------------------------------------*/
+
+void at_interpreter(at_state_t *s, const char *cmd, int len)
+{
+    int i;
+    int c;
+    int entry;
+    int matched;
+    const char *t;
+
+    if (s->p.echo)
+        s->at_tx_handler(s, s->at_tx_user_data, (uint8_t *) cmd, len);
+
+    for (i = 0;  i < len;  i++)
+    {
+        /* The spec says the top bit should be ignored */
+        c = *cmd++ & 0x7F;
+        /* Handle incoming character */
+        if (s->line_ptr < 2)
+        {
+            /* Look for the initial "at", "AT", "a/" or "A/", and ignore anything before it */
+            /* V.250 5.2.1 only shows "at" and "AT" as command prefixes. "At" and "aT" are
+               not specified, despite 5.4.1 saying upper and lower case are equivalent in
+               commands. Let's be tolerant and accept them. */
+            if (tolower(c) == 'a')
+            {
+                s->line_ptr = 0;
+                s->line[s->line_ptr++] = (char) toupper(c);
+            }
+            else if (s->line_ptr == 1)
+            {
+                if (tolower(c) == 't')
+                {
+                    /* We have an "AT" command */
+                    s->line[s->line_ptr++] = (char) toupper(c);
+                }
+                else if (c == '/')
+                {
+                    /* We have an "A/" command */
+                    /* TODO: implement "A/" command repeat */
+                    s->line[s->line_ptr++] = (char) c;
+                }
+                else
+                {
+                    s->line_ptr = 0;
+                }
+            }
+        }
+        else
+        {
+            /* We are beyond the initial AT */
+            if (c >= 0x20  &&  c <= 0x7E)
+            {
+                /* Add a new char */
+                if (s->line_ptr < (int) (sizeof(s->line) - 1))
+                    s->line[s->line_ptr++] = (char) toupper(c);
+            }
+            else if (c == s->p.s_regs[3])
+            {
+                /* End of command line. Do line validation */
+                s->line[s->line_ptr] = '\0';
+                if (s->line_ptr > 2)
+                {
+                    /* The spec says the commands within a command line are executed in order, until
+                       an error is found, or the end of the command line is reached. */
+                    t = s->line + 2;
+                    while (t  &&  *t)
+                    {
+                        if ((entry = command_search(t, 15, &matched)) <= 0)
+                            break;
+                        if ((t = at_commands[entry - 1](s, t)) == NULL)
+                            break;
+                        if (t == (const char *) -1)
+                            break;
+                    }
+                    if (t != (const char *) -1)
+                    {
+                        if (t == NULL)
+                            at_put_response_code(s, AT_RESPONSE_CODE_ERROR);
+                        else
+                            at_put_response_code(s, AT_RESPONSE_CODE_OK);
+                    }
+                }
+                else if (s->line_ptr == 2)
+                {
+                    /* It's just an empty "AT" command, return OK. */
+                    at_put_response_code(s, AT_RESPONSE_CODE_OK);
+                }
+                s->line_ptr = 0;
+            }
+            else if (c == s->p.s_regs[5])
+            {
+                /* Command line editing character (backspace) */
+                if (s->line_ptr > 0)
+                    s->line_ptr--;
+            }
+            else
+            {
+                /* The spec says control characters, other than those
+                   explicitly handled, should be ignored, and so this
+                   invalid character causes everything buffered
+                   before it to also be ignored. */
+                s->line_ptr = 0;
+            }
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void at_set_class1_handler(at_state_t *s, at_class1_handler_t handler, void *user_data)
+{
+    s->class1_handler = handler;
+    s->class1_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+at_state_t *at_init(at_state_t *s,
+                    at_tx_handler_t *at_tx_handler,
+                    void *at_tx_user_data,
+                    at_modem_control_handler_t *modem_control_handler,
+                    void *modem_control_user_data)
+{
+    memset(s, '\0', sizeof(*s));
+    s->modem_control_handler = modem_control_handler;
+    s->modem_control_user_data = modem_control_user_data;
+    s->at_tx_handler = at_tx_handler;
+    s->at_tx_user_data = at_tx_user_data;
+    at_reset_call_info(s);
+    s->local_id = NULL;
+    s->display_call_info = 0;
+    at_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+    s->p = profiles[0];
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/at_interpreter_dictionary.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,909 @@
+// The trie contains 399 entries
+
+static const at_cmd_service_t at_commands[] =
+{
+    at_cmd_dummy,
+    at_cmd_amp_C,
+    at_cmd_amp_D,
+    at_cmd_amp_F,
+    at_cmd_plus_A8A,
+    at_cmd_plus_A8C,
+    at_cmd_plus_A8E,
+    at_cmd_plus_A8I,
+    at_cmd_plus_A8J,
+    at_cmd_plus_A8M,
+    at_cmd_plus_A8R,
+    at_cmd_plus_A8T,
+    at_cmd_plus_ASTO,
+    at_cmd_plus_CAAP,
+    at_cmd_plus_CACM,
+    at_cmd_plus_CACSP,
+    at_cmd_plus_CAD,
+    at_cmd_plus_CAEMLPP,
+    at_cmd_plus_CAHLD,
+    at_cmd_plus_CAJOIN,
+    at_cmd_plus_CALA,
+    at_cmd_plus_CALCC,
+    at_cmd_plus_CALD,
+    at_cmd_plus_CALM,
+    at_cmd_plus_CAMM,
+    at_cmd_plus_CANCHEV,
+    at_cmd_plus_CAOC,
+    at_cmd_plus_CAPD,
+    at_cmd_plus_CAPTT,
+    at_cmd_plus_CAREJ,
+    at_cmd_plus_CAULEV,
+    at_cmd_plus_CBC,
+    at_cmd_plus_CBCS,
+    at_cmd_plus_CBIP,
+    at_cmd_plus_CBST,
+    at_cmd_plus_CCFC,
+    at_cmd_plus_CCLK,
+    at_cmd_plus_CCS,
+    at_cmd_plus_CCUG,
+    at_cmd_plus_CCWA,
+    at_cmd_plus_CCWE,
+    at_cmd_plus_CDIP,
+    at_cmd_plus_CDIS,
+    at_cmd_plus_CDV,
+    at_cmd_plus_CEER,
+    at_cmd_plus_CESP,
+    at_cmd_plus_CFCS,
+    at_cmd_plus_CFG,
+    at_cmd_plus_CFUN,
+    at_cmd_plus_CGACT,
+    at_cmd_plus_CGANS,
+    at_cmd_plus_CGATT,
+    at_cmd_plus_CGAUTO,
+    at_cmd_plus_CGCAP,
+    at_cmd_plus_CGCLASS,
+    at_cmd_plus_CGCLOSP,
+    at_cmd_plus_CGCLPAD,
+    at_cmd_plus_CGCMOD,
+    at_cmd_plus_CGCS,
+    at_cmd_plus_CGDATA,
+    at_cmd_plus_CGDCONT,
+    at_cmd_plus_CGDSCONT,
+    at_cmd_plus_CGEQMIN,
+    at_cmd_plus_CGEQNEG,
+    at_cmd_plus_CGEQREQ,
+    at_cmd_plus_CGEREP,
+    at_cmd_plus_CGMI,
+    at_cmd_plus_CGMM,
+    at_cmd_plus_CGMR,
+    at_cmd_plus_CGOI,
+    at_cmd_plus_CGPADDR,
+    at_cmd_plus_CGQMIN,
+    at_cmd_plus_CGQREQ,
+    at_cmd_plus_CGREG,
+    at_cmd_plus_CGSMS,
+    at_cmd_plus_CGSN,
+    at_cmd_plus_CGTFT,
+    at_cmd_plus_CHLD,
+    at_cmd_plus_CHSA,
+    at_cmd_plus_CHSC,
+    at_cmd_plus_CHSD,
+    at_cmd_plus_CHSN,
+    at_cmd_plus_CHSR,
+    at_cmd_plus_CHST,
+    at_cmd_plus_CHSU,
+    at_cmd_plus_CHUP,
+    at_cmd_plus_CHV,
+    at_cmd_plus_CIMI,
+    at_cmd_plus_CIND,
+    at_cmd_plus_CIT,
+    at_cmd_plus_CKPD,
+    at_cmd_plus_CLAC,
+    at_cmd_plus_CLAE,
+    at_cmd_plus_CLAN,
+    at_cmd_plus_CLCC,
+    at_cmd_plus_CLCK,
+    at_cmd_plus_CLIP,
+    at_cmd_plus_CLIR,
+    at_cmd_plus_CLVL,
+    at_cmd_plus_CMAR,
+    at_cmd_plus_CMEC,
+    at_cmd_plus_CMEE,
+    at_cmd_plus_CMER,
+    at_cmd_plus_CMGC,
+    at_cmd_plus_CMGD,
+    at_cmd_plus_CMGF,
+    at_cmd_plus_CMGL,
+    at_cmd_plus_CMGR,
+    at_cmd_plus_CMGS,
+    at_cmd_plus_CMGW,
+    at_cmd_plus_CMIP,
+    at_cmd_plus_CMM,
+    at_cmd_plus_CMMS,
+    at_cmd_plus_CMOD,
+    at_cmd_plus_CMSS,
+    at_cmd_plus_CMUT,
+    at_cmd_plus_CMUX,
+    at_cmd_plus_CNMA,
+    at_cmd_plus_CNMI,
+    at_cmd_plus_CNUM,
+    at_cmd_plus_COLP,
+    at_cmd_plus_COPN,
+    at_cmd_plus_COPS,
+    at_cmd_plus_COS,
+    at_cmd_plus_COTDI,
+    at_cmd_plus_CPAS,
+    at_cmd_plus_CPBF,
+    at_cmd_plus_CPBR,
+    at_cmd_plus_CPBS,
+    at_cmd_plus_CPBW,
+    at_cmd_plus_CPIN,
+    at_cmd_plus_CPLS,
+    at_cmd_plus_CPMS,
+    at_cmd_plus_CPOL,
+    at_cmd_plus_CPPS,
+    at_cmd_plus_CPROT,
+    at_cmd_plus_CPUC,
+    at_cmd_plus_CPWC,
+    at_cmd_plus_CPWD,
+    at_cmd_plus_CQD,
+    at_cmd_plus_CR,
+    at_cmd_plus_CRC,
+    at_cmd_plus_CREG,
+    at_cmd_plus_CRES,
+    at_cmd_plus_CRLP,
+    at_cmd_plus_CRM,
+    at_cmd_plus_CRMC,
+    at_cmd_plus_CRMP,
+    at_cmd_plus_CRSL,
+    at_cmd_plus_CRSM,
+    at_cmd_plus_CSAS,
+    at_cmd_plus_CSCA,
+    at_cmd_plus_CSCB,
+    at_cmd_plus_CSCC,
+    at_cmd_plus_CSCS,
+    at_cmd_plus_CSDF,
+    at_cmd_plus_CSDH,
+    at_cmd_plus_CSGT,
+    at_cmd_plus_CSIL,
+    at_cmd_plus_CSIM,
+    at_cmd_plus_CSMP,
+    at_cmd_plus_CSMS,
+    at_cmd_plus_CSNS,
+    at_cmd_plus_CSQ,
+    at_cmd_plus_CSS,
+    at_cmd_plus_CSSN,
+    at_cmd_plus_CSTA,
+    at_cmd_plus_CSTF,
+    at_cmd_plus_CSVM,
+    at_cmd_plus_CTA,
+    at_cmd_plus_CTF,
+    at_cmd_plus_CTFR,
+    at_cmd_plus_CTZR,
+    at_cmd_plus_CTZU,
+    at_cmd_plus_CUSD,
+    at_cmd_plus_CUUS1,
+    at_cmd_plus_CV120,
+    at_cmd_plus_CVHU,
+    at_cmd_plus_CVIB,
+    at_cmd_plus_CXT,
+    at_cmd_plus_DR,
+    at_cmd_plus_DS,
+    at_cmd_plus_DS44,
+    at_cmd_plus_EB,
+    at_cmd_plus_EFCS,
+    at_cmd_plus_EFRAM,
+    at_cmd_plus_ER,
+    at_cmd_plus_ES,
+    at_cmd_plus_ESR,
+    at_cmd_plus_ETBM,
+    at_cmd_plus_EWIND,
+    at_cmd_plus_FAA,
+    at_cmd_plus_FAP,
+    at_cmd_plus_FAR,
+    at_cmd_plus_FBO,
+    at_cmd_plus_FBS,
+    at_cmd_plus_FBU,
+    at_cmd_plus_FCC,
+    at_cmd_plus_FCL,
+    at_cmd_plus_FCLASS,
+    at_cmd_plus_FCQ,
+    at_cmd_plus_FCR,
+    at_cmd_plus_FCS,
+    at_cmd_plus_FCT,
+    at_cmd_plus_FDD,
+    at_cmd_plus_FDR,
+    at_cmd_plus_FDT,
+    at_cmd_plus_FEA,
+    at_cmd_plus_FFC,
+    at_cmd_plus_FFD,
+    at_cmd_plus_FHS,
+    at_cmd_plus_FIE,
+    at_cmd_plus_FIP,
+    at_cmd_plus_FIS,
+    at_cmd_plus_FIT,
+    at_cmd_plus_FKS,
+    at_cmd_plus_FLI,
+    at_cmd_plus_FLO,
+    at_cmd_plus_FLP,
+    at_cmd_plus_FMI,
+    at_cmd_plus_FMM,
+    at_cmd_plus_FMR,
+    at_cmd_plus_FMS,
+    at_cmd_plus_FND,
+    at_cmd_plus_FNR,
+    at_cmd_plus_FNS,
+    at_cmd_plus_FPA,
+    at_cmd_plus_FPI,
+    at_cmd_plus_FPP,
+    at_cmd_plus_FPR,
+    at_cmd_plus_FPS,
+    at_cmd_plus_FPW,
+    at_cmd_plus_FRH,
+    at_cmd_plus_FRM,
+    at_cmd_plus_FRQ,
+    at_cmd_plus_FRS,
+    at_cmd_plus_FRY,
+    at_cmd_plus_FSA,
+    at_cmd_plus_FSP,
+    at_cmd_plus_FTH,
+    at_cmd_plus_FTM,
+    at_cmd_plus_FTS,
+    at_cmd_plus_GCAP,
+    at_cmd_plus_GCI,
+    at_cmd_plus_GMI,
+    at_cmd_plus_GMM,
+    at_cmd_plus_GMR,
+    at_cmd_plus_GOI,
+    at_cmd_plus_GSN,
+    at_cmd_plus_IBC,
+    at_cmd_plus_IBM,
+    at_cmd_plus_ICF,
+    at_cmd_plus_ICLOK,
+    at_cmd_plus_IDSR,
+    at_cmd_plus_IFC,
+    at_cmd_plus_ILRR,
+    at_cmd_plus_ILSD,
+    at_cmd_plus_IPR,
+    at_cmd_plus_IRTS,
+    at_cmd_plus_MA,
+    at_cmd_plus_MR,
+    at_cmd_plus_MS,
+    at_cmd_plus_MSC,
+    at_cmd_plus_MV18AM,
+    at_cmd_plus_MV18P,
+    at_cmd_plus_MV18R,
+    at_cmd_plus_MV18S,
+    at_cmd_plus_PCW,
+    at_cmd_plus_PIG,
+    at_cmd_plus_PMH,
+    at_cmd_plus_PMHF,
+    at_cmd_plus_PMHR,
+    at_cmd_plus_PMHT,
+    at_cmd_plus_PQC,
+    at_cmd_plus_PSS,
+    at_cmd_plus_SAC,
+    at_cmd_plus_SAM,
+    at_cmd_plus_SAR,
+    at_cmd_plus_SARR,
+    at_cmd_plus_SAT,
+    at_cmd_plus_SCRR,
+    at_cmd_plus_SDC,
+    at_cmd_plus_SDI,
+    at_cmd_plus_SDR,
+    at_cmd_plus_SRSC,
+    at_cmd_plus_STC,
+    at_cmd_plus_STH,
+    at_cmd_plus_SVC,
+    at_cmd_plus_SVM,
+    at_cmd_plus_SVR,
+    at_cmd_plus_SVRR,
+    at_cmd_plus_SVT,
+    at_cmd_plus_TADR,
+    at_cmd_plus_TAL,
+    at_cmd_plus_TALS,
+    at_cmd_plus_TDLS,
+    at_cmd_plus_TE140,
+    at_cmd_plus_TE141,
+    at_cmd_plus_TEPAL,
+    at_cmd_plus_TEPDL,
+    at_cmd_plus_TERDL,
+    at_cmd_plus_TLDL,
+    at_cmd_plus_TMO,
+    at_cmd_plus_TMODE,
+    at_cmd_plus_TNUM,
+    at_cmd_plus_TRDL,
+    at_cmd_plus_TRDLS,
+    at_cmd_plus_TRES,
+    at_cmd_plus_TSELF,
+    at_cmd_plus_TTER,
+    at_cmd_plus_VAC,
+    at_cmd_plus_VACR,
+    at_cmd_plus_VBT,
+    at_cmd_plus_VCID,
+    at_cmd_plus_VCIDR,
+    at_cmd_plus_VDID,
+    at_cmd_plus_VDIDR,
+    at_cmd_plus_VDR,
+    at_cmd_plus_VDT,
+    at_cmd_plus_VDX,
+    at_cmd_plus_VEM,
+    at_cmd_plus_VGM,
+    at_cmd_plus_VGR,
+    at_cmd_plus_VGS,
+    at_cmd_plus_VGT,
+    at_cmd_plus_VHC,
+    at_cmd_plus_VIP,
+    at_cmd_plus_VIT,
+    at_cmd_plus_VLS,
+    at_cmd_plus_VNH,
+    at_cmd_plus_VPH,
+    at_cmd_plus_VPP,
+    at_cmd_plus_VPR,
+    at_cmd_plus_VRA,
+    at_cmd_plus_VRID,
+    at_cmd_plus_VRL,
+    at_cmd_plus_VRN,
+    at_cmd_plus_VRX,
+    at_cmd_plus_VSD,
+    at_cmd_plus_VSID,
+    at_cmd_plus_VSM,
+    at_cmd_plus_VSP,
+    at_cmd_plus_VTA,
+    at_cmd_plus_VTD,
+    at_cmd_plus_VTER,
+    at_cmd_plus_VTH,
+    at_cmd_plus_VTR,
+    at_cmd_plus_VTS,
+    at_cmd_plus_VTX,
+    at_cmd_plus_VXT,
+    at_cmd_plus_W,
+    at_cmd_plus_WBAG,
+    at_cmd_plus_WCDA,
+    at_cmd_plus_WCHG,
+    at_cmd_plus_WCID,
+    at_cmd_plus_WCLK,
+    at_cmd_plus_WCPN,
+    at_cmd_plus_WCXF,
+    at_cmd_plus_WDAC,
+    at_cmd_plus_WDIR,
+    at_cmd_plus_WECR,
+    at_cmd_plus_WFON,
+    at_cmd_plus_WKPD,
+    at_cmd_plus_WPBA,
+    at_cmd_plus_WPTH,
+    at_cmd_plus_WRLK,
+    at_cmd_plus_WS45,
+    at_cmd_plus_WS46,
+    at_cmd_plus_WS50,
+    at_cmd_plus_WS51,
+    at_cmd_plus_WS52,
+    at_cmd_plus_WS53,
+    at_cmd_plus_WS54,
+    at_cmd_plus_WS57,
+    at_cmd_plus_WS58,
+    at_cmd_plus_WSTL,
+    at_cmd_dummy,
+    at_cmd_A,
+    at_cmd_D,
+    at_cmd_E,
+    at_cmd_H,
+    at_cmd_I,
+    at_cmd_L,
+    at_cmd_M,
+    at_cmd_O,
+    at_cmd_P,
+    at_cmd_Q,
+    at_cmd_S0,
+    at_cmd_S10,
+    at_cmd_S3,
+    at_cmd_S4,
+    at_cmd_S5,
+    at_cmd_S6,
+    at_cmd_S7,
+    at_cmd_S8,
+    at_cmd_T,
+    at_cmd_V,
+    at_cmd_X,
+    at_cmd_Z,
+};
+
+static const uint16_t command_trie[] =
+{
+    0x0020, 0x005A, 0x0000, 0x003F, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0042, 0x0000, 0x0000, 0x0000, 0x0000, 0x0052, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0F43, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0F46, 0x0000, 0x0000, 0x0F49, 
+    0x0F4C, 0x0000, 0x0000, 0x0F4F, 0x0F52, 0x0000, 0x0000, 0x0F55, 
+    0x0F58, 0x0000, 0x0F5B, 0x0F5E, 0x0F61, 0x0000, 0x0F64, 0x0F8C, 
+    0x0000, 0x0F8F, 0x0000, 0x0F92, 0x0000, 0x0F95, 0x0001, 0x0000, 
+    0x0001, 0x0043, 0x0046, 0x0000, 0x0049, 0x004C, 0x0000, 0x004F, 
+    0x0001, 0x0000, 0x0002, 0x0001, 0x0000, 0x0003, 0x0001, 0x0000, 
+    0x0004, 0x0041, 0x0057, 0x0000, 0x006C, 0x0000, 0x00C5, 0x07D0, 
+    0x07E3, 0x0848, 0x09EA, 0x0000, 0x0A38, 0x0000, 0x0000, 0x0000, 
+    0x0AAF, 0x0000, 0x0000, 0x0B03, 0x0000, 0x0000, 0x0B52, 0x0BF6, 
+    0x0000, 0x0CDC, 0x0E20, 0x0038, 0x0053, 0x0000, 0x008B, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x00BA, 0x0041, 0x0054, 0x0000, 0x00A2, 0x0000, 0x00A5, 
+    0x0000, 0x00A8, 0x0000, 0x0000, 0x0000, 0x00AB, 0x00AE, 0x0000, 
+    0x0000, 0x00B1, 0x0000, 0x0000, 0x0000, 0x0000, 0x00B4, 0x0000, 
+    0x00B7, 0x0001, 0x0000, 0x0005, 0x0001, 0x0000, 0x0006, 0x0001, 
+    0x0000, 0x0007, 0x0001, 0x0000, 0x0008, 0x0001, 0x0000, 0x0009, 
+    0x0001, 0x0000, 0x000A, 0x0001, 0x0000, 0x000B, 0x0001, 0x0000, 
+    0x000C, 0x0054, 0x0054, 0x0000, 0x00BE, 0x004F, 0x004F, 0x0000, 
+    0x00C2, 0x0001, 0x0000, 0x000D, 0x0041, 0x0058, 0x0000, 0x00E0, 
+    0x01BC, 0x01E5, 0x0220, 0x0241, 0x0261, 0x0288, 0x0425, 0x0471, 
+    0x0000, 0x048D, 0x0498, 0x04EE, 0x0580, 0x05A5, 0x05D5, 0x0657, 
+    0x065E, 0x06B4, 0x0748, 0x077C, 0x0794, 0x0000, 0x07C9, 0x0041, 
+    0x0055, 0x0000, 0x00F8, 0x0000, 0x00FF, 0x0113, 0x0116, 0x0000, 
+    0x0000, 0x0129, 0x0000, 0x0134, 0x0000, 0x0143, 0x0163, 0x016A, 
+    0x017D, 0x0184, 0x0000, 0x01A2, 0x0000, 0x0000, 0x01AD, 0x0050, 
+    0x0050, 0x0000, 0x00FC, 0x0001, 0x0000, 0x000E, 0x004D, 0x0053, 
+    0x0000, 0x0109, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x010C, 
+    0x0001, 0x0000, 0x000F, 0x0050, 0x0050, 0x0000, 0x0110, 0x0001, 
+    0x0000, 0x0010, 0x0001, 0x0000, 0x0011, 0x004D, 0x004D, 0x0000, 
+    0x011A, 0x004C, 0x004C, 0x0000, 0x011E, 0x0050, 0x0050, 0x0000, 
+    0x0122, 0x0050, 0x0050, 0x0000, 0x0126, 0x0001, 0x0000, 0x0012, 
+    0x004C, 0x004C, 0x0000, 0x012D, 0x0044, 0x0044, 0x0000, 0x0131, 
+    0x0001, 0x0000, 0x0013, 0x004F, 0x004F, 0x0000, 0x0138, 0x0049, 
+    0x0049, 0x0000, 0x013C, 0x004E, 0x004E, 0x0000, 0x0140, 0x0001, 
+    0x0000, 0x0014, 0x0041, 0x004D, 0x0000, 0x0153, 0x0000, 0x0156, 
+    0x015D, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0160, 0x0001, 0x0000, 0x0015, 0x0043, 0x0043, 0x0000, 
+    0x015A, 0x0001, 0x0000, 0x0016, 0x0001, 0x0000, 0x0017, 0x0001, 
+    0x0000, 0x0018, 0x004D, 0x004D, 0x0000, 0x0167, 0x0001, 0x0000, 
+    0x0019, 0x0043, 0x0043, 0x0000, 0x016E, 0x0048, 0x0048, 0x0000, 
+    0x0172, 0x0045, 0x0045, 0x0000, 0x0176, 0x0056, 0x0056, 0x0000, 
+    0x017A, 0x0001, 0x0000, 0x001A, 0x0043, 0x0043, 0x0000, 0x0181, 
+    0x0001, 0x0000, 0x001B, 0x0044, 0x0054, 0x0000, 0x0198, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x019B, 0x0001, 
+    0x0000, 0x001C, 0x0054, 0x0054, 0x0000, 0x019F, 0x0001, 0x0000, 
+    0x001D, 0x0045, 0x0045, 0x0000, 0x01A6, 0x004A, 0x004A, 0x0000, 
+    0x01AA, 0x0001, 0x0000, 0x001E, 0x004C, 0x004C, 0x0000, 0x01B1, 
+    0x0045, 0x0045, 0x0000, 0x01B5, 0x0056, 0x0056, 0x0000, 0x01B9, 
+    0x0001, 0x0000, 0x001F, 0x0043, 0x0053, 0x0000, 0x01D0, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x01D7, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x01DE, 0x0053, 
+    0x0053, 0x0020, 0x01D4, 0x0001, 0x0000, 0x0021, 0x0050, 0x0050, 
+    0x0000, 0x01DB, 0x0001, 0x0000, 0x0022, 0x0054, 0x0054, 0x0000, 
+    0x01E2, 0x0001, 0x0000, 0x0023, 0x0046, 0x0057, 0x0000, 0x01FA, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0201, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0208, 0x0000, 0x020B, 0x0000, 
+    0x0212, 0x0043, 0x0043, 0x0000, 0x01FE, 0x0001, 0x0000, 0x0024, 
+    0x004B, 0x004B, 0x0000, 0x0205, 0x0001, 0x0000, 0x0025, 0x0001, 
+    0x0000, 0x0026, 0x0047, 0x0047, 0x0000, 0x020F, 0x0001, 0x0000, 
+    0x0027, 0x0041, 0x0045, 0x0000, 0x021A, 0x0000, 0x0000, 0x0000, 
+    0x021D, 0x0001, 0x0000, 0x0028, 0x0001, 0x0000, 0x0029, 0x0049, 
+    0x0056, 0x0000, 0x0231, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x023E, 
+    0x0050, 0x0053, 0x0000, 0x0238, 0x0000, 0x0000, 0x023B, 0x0001, 
+    0x0000, 0x002A, 0x0001, 0x0000, 0x002B, 0x0001, 0x0000, 0x002C, 
+    0x0045, 0x0053, 0x0000, 0x0253, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x025A, 0x0052, 0x0052, 0x0000, 0x0257, 0x0001, 0x0000, 
+    0x002D, 0x0050, 0x0050, 0x0000, 0x025E, 0x0001, 0x0000, 0x002E, 
+    0x0043, 0x0055, 0x0000, 0x0277, 0x0000, 0x0000, 0x0000, 0x027E, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0281, 0x0053, 0x0053, 
+    0x0000, 0x027B, 0x0001, 0x0000, 0x002F, 0x0001, 0x0000, 0x0030, 
+    0x004E, 0x004E, 0x0000, 0x0285, 0x0001, 0x0000, 0x0031, 0x0041, 
+    0x0054, 0x0000, 0x029F, 0x0000, 0x02D5, 0x0334, 0x0377, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03B1, 0x0000, 
+    0x03C7, 0x03CE, 0x03E1, 0x0400, 0x040B, 0x041A, 0x0043, 0x0055, 
+    0x0000, 0x02B5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x02BC, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x02C3, 0x02CA, 0x0054, 0x0054, 0x0000, 0x02B9, 
+    0x0001, 0x0000, 0x0032, 0x0053, 0x0053, 0x0000, 0x02C0, 0x0001, 
+    0x0000, 0x0033, 0x0054, 0x0054, 0x0000, 0x02C7, 0x0001, 0x0000, 
+    0x0034, 0x0054, 0x0054, 0x0000, 0x02CE, 0x004F, 0x004F, 0x0000, 
+    0x02D2, 0x0001, 0x0000, 0x0035, 0x0041, 0x0053, 0x0000, 0x02EB, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x02F2, 0x0326, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0331, 0x0050, 0x0050, 0x0000, 0x02EF, 0x0001, 0x0000, 
+    0x0036, 0x0041, 0x0050, 0x0000, 0x0305, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0310, 0x031B, 0x0053, 0x0053, 0x0000, 0x0309, 
+    0x0053, 0x0053, 0x0000, 0x030D, 0x0001, 0x0000, 0x0037, 0x0053, 
+    0x0053, 0x0000, 0x0314, 0x0050, 0x0050, 0x0000, 0x0318, 0x0001, 
+    0x0000, 0x0038, 0x0041, 0x0041, 0x0000, 0x031F, 0x0044, 0x0044, 
+    0x0000, 0x0323, 0x0001, 0x0000, 0x0039, 0x004F, 0x004F, 0x0000, 
+    0x032A, 0x0044, 0x0044, 0x0000, 0x032E, 0x0001, 0x0000, 0x003A, 
+    0x0001, 0x0000, 0x003B, 0x0041, 0x0053, 0x0000, 0x034A, 0x0000, 
+    0x0355, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0364, 0x0054, 0x0054, 0x0000, 0x034E, 0x0041, 0x0041, 0x0000, 
+    0x0352, 0x0001, 0x0000, 0x003C, 0x004F, 0x004F, 0x0000, 0x0359, 
+    0x004E, 0x004E, 0x0000, 0x035D, 0x0054, 0x0054, 0x0000, 0x0361, 
+    0x0001, 0x0000, 0x003D, 0x0043, 0x0043, 0x0000, 0x0368, 0x004F, 
+    0x004F, 0x0000, 0x036C, 0x004E, 0x004E, 0x0000, 0x0370, 0x0054, 
+    0x0054, 0x0000, 0x0374, 0x0001, 0x0000, 0x003E, 0x0051, 0x0052, 
+    0x0000, 0x037C, 0x03A6, 0x004D, 0x0052, 0x0000, 0x0385, 0x0390, 
+    0x0000, 0x0000, 0x0000, 0x039B, 0x0049, 0x0049, 0x0000, 0x0389, 
+    0x004E, 0x004E, 0x0000, 0x038D, 0x0001, 0x0000, 0x003F, 0x0045, 
+    0x0045, 0x0000, 0x0394, 0x0047, 0x0047, 0x0000, 0x0398, 0x0001, 
+    0x0000, 0x0040, 0x0045, 0x0045, 0x0000, 0x039F, 0x0051, 0x0051, 
+    0x0000, 0x03A3, 0x0001, 0x0000, 0x0041, 0x0045, 0x0045, 0x0000, 
+    0x03AA, 0x0050, 0x0050, 0x0000, 0x03AE, 0x0001, 0x0000, 0x0042, 
+    0x0049, 0x0052, 0x0000, 0x03BE, 0x0000, 0x0000, 0x0000, 0x03C1, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x03C4, 0x0001, 0x0000, 0x0043, 
+    0x0001, 0x0000, 0x0044, 0x0001, 0x0000, 0x0045, 0x0049, 0x0049, 
+    0x0000, 0x03CB, 0x0001, 0x0000, 0x0046, 0x0041, 0x0041, 0x0000, 
+    0x03D2, 0x0044, 0x0044, 0x0000, 0x03D6, 0x0044, 0x0044, 0x0000, 
+    0x03DA, 0x0052, 0x0052, 0x0000, 0x03DE, 0x0001, 0x0000, 0x0047, 
+    0x004D, 0x0052, 0x0000, 0x03EA, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x03F5, 0x0049, 0x0049, 0x0000, 0x03EE, 0x004E, 0x004E, 0x0000, 
+    0x03F2, 0x0001, 0x0000, 0x0048, 0x0045, 0x0045, 0x0000, 0x03F9, 
+    0x0051, 0x0051, 0x0000, 0x03FD, 0x0001, 0x0000, 0x0049, 0x0045, 
+    0x0045, 0x0000, 0x0404, 0x0047, 0x0047, 0x0000, 0x0408, 0x0001, 
+    0x0000, 0x004A, 0x004D, 0x004E, 0x0000, 0x0410, 0x0417, 0x0053, 
+    0x0053, 0x0000, 0x0414, 0x0001, 0x0000, 0x004B, 0x0001, 0x0000, 
+    0x004C, 0x0046, 0x0046, 0x0000, 0x041E, 0x0054, 0x0054, 0x0000, 
+    0x0422, 0x0001, 0x0000, 0x004D, 0x004C, 0x0056, 0x0000, 0x0433, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x043A, 0x0000, 
+    0x0467, 0x046E, 0x0044, 0x0044, 0x0000, 0x0437, 0x0001, 0x0000, 
+    0x004E, 0x0041, 0x0055, 0x0000, 0x0452, 0x0000, 0x0455, 0x0458, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x045B, 0x0000, 0x0000, 0x0000, 0x045E, 0x0000, 0x0461, 
+    0x0464, 0x0001, 0x0000, 0x004F, 0x0001, 0x0000, 0x0050, 0x0001, 
+    0x0000, 0x0051, 0x0001, 0x0000, 0x0052, 0x0001, 0x0000, 0x0053, 
+    0x0001, 0x0000, 0x0054, 0x0001, 0x0000, 0x0055, 0x0050, 0x0050, 
+    0x0000, 0x046B, 0x0001, 0x0000, 0x0056, 0x0001, 0x0000, 0x0057, 
+    0x004D, 0x0054, 0x0000, 0x047C, 0x0483, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x048A, 0x0049, 0x0049, 0x0000, 0x0480, 0x0001, 
+    0x0000, 0x0058, 0x0044, 0x0044, 0x0000, 0x0487, 0x0001, 0x0000, 
+    0x0059, 0x0001, 0x0000, 0x005A, 0x0050, 0x0050, 0x0000, 0x0491, 
+    0x0044, 0x0044, 0x0000, 0x0495, 0x0001, 0x0000, 0x005B, 0x0041, 
+    0x0056, 0x0000, 0x04B1, 0x0000, 0x04C9, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x04DB, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x04E7, 
+    0x0043, 0x004E, 0x0000, 0x04C0, 0x0000, 0x04C3, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x04C6, 0x0001, 
+    0x0000, 0x005C, 0x0001, 0x0000, 0x005D, 0x0001, 0x0000, 0x005E, 
+    0x0043, 0x004B, 0x0000, 0x04D5, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x04D8, 0x0001, 0x0000, 0x005F, 0x0001, 
+    0x0000, 0x0060, 0x0050, 0x0052, 0x0000, 0x04E1, 0x0000, 0x04E4, 
+    0x0001, 0x0000, 0x0061, 0x0001, 0x0000, 0x0062, 0x004C, 0x004C, 
+    0x0000, 0x04EB, 0x0001, 0x0000, 0x0063, 0x0041, 0x0055, 0x0000, 
+    0x0506, 0x0000, 0x0000, 0x0000, 0x050D, 0x0000, 0x0529, 0x0000, 
+    0x0556, 0x0000, 0x0000, 0x0000, 0x055D, 0x0000, 0x0564, 0x0000, 
+    0x0000, 0x0000, 0x056B, 0x0000, 0x0572, 0x0052, 0x0052, 0x0000, 
+    0x050A, 0x0001, 0x0000, 0x0064, 0x0043, 0x0052, 0x0000, 0x0520, 
+    0x0000, 0x0523, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0526, 0x0001, 
+    0x0000, 0x0065, 0x0001, 0x0000, 0x0066, 0x0001, 0x0000, 0x0067, 
+    0x0043, 0x0057, 0x0000, 0x0541, 0x0544, 0x0000, 0x0547, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x054A, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x054D, 0x0550, 0x0000, 0x0000, 0x0000, 0x0553, 
+    0x0001, 0x0000, 0x0068, 0x0001, 0x0000, 0x0069, 0x0001, 0x0000, 
+    0x006A, 0x0001, 0x0000, 0x006B, 0x0001, 0x0000, 0x006C, 0x0001, 
+    0x0000, 0x006D, 0x0001, 0x0000, 0x006E, 0x0050, 0x0050, 0x0000, 
+    0x055A, 0x0001, 0x0000, 0x006F, 0x0053, 0x0053, 0x0070, 0x0561, 
+    0x0001, 0x0000, 0x0071, 0x0044, 0x0044, 0x0000, 0x0568, 0x0001, 
+    0x0000, 0x0072, 0x0053, 0x0053, 0x0000, 0x056F, 0x0001, 0x0000, 
+    0x0073, 0x0054, 0x0058, 0x0000, 0x057A, 0x0000, 0x0000, 0x0000, 
+    0x057D, 0x0001, 0x0000, 0x0074, 0x0001, 0x0000, 0x0075, 0x004D, 
+    0x0055, 0x0000, 0x058C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x059E, 0x0041, 0x0049, 0x0000, 0x0598, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x059B, 0x0001, 
+    0x0000, 0x0076, 0x0001, 0x0000, 0x0077, 0x004D, 0x004D, 0x0000, 
+    0x05A2, 0x0001, 0x0000, 0x0078, 0x004C, 0x0054, 0x0000, 0x05B1, 
+    0x0000, 0x0000, 0x0000, 0x05B8, 0x0000, 0x0000, 0x05C7, 0x05CA, 
+    0x0050, 0x0050, 0x0000, 0x05B5, 0x0001, 0x0000, 0x0079, 0x004E, 
+    0x0053, 0x0000, 0x05C1, 0x0000, 0x0000, 0x0000, 0x0000, 0x05C4, 
+    0x0001, 0x0000, 0x007A, 0x0001, 0x0000, 0x007B, 0x0001, 0x0000, 
+    0x007C, 0x0044, 0x0044, 0x0000, 0x05CE, 0x0049, 0x0049, 0x0000, 
+    0x05D2, 0x0001, 0x0000, 0x007D, 0x0041, 0x0057, 0x0000, 0x05EF, 
+    0x05F6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0617, 
+    0x0000, 0x0000, 0x061E, 0x0625, 0x0000, 0x062C, 0x0633, 0x0000, 
+    0x063A, 0x0000, 0x0000, 0x0645, 0x0000, 0x064C, 0x0053, 0x0053, 
+    0x0000, 0x05F3, 0x0001, 0x0000, 0x007E, 0x0046, 0x0057, 0x0000, 
+    0x060B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x060E, 0x0611, 0x0000, 0x0000, 
+    0x0000, 0x0614, 0x0001, 0x0000, 0x007F, 0x0001, 0x0000, 0x0080, 
+    0x0001, 0x0000, 0x0081, 0x0001, 0x0000, 0x0082, 0x004E, 0x004E, 
+    0x0000, 0x061B, 0x0001, 0x0000, 0x0083, 0x0053, 0x0053, 0x0000, 
+    0x0622, 0x0001, 0x0000, 0x0084, 0x0053, 0x0053, 0x0000, 0x0629, 
+    0x0001, 0x0000, 0x0085, 0x004C, 0x004C, 0x0000, 0x0630, 0x0001, 
+    0x0000, 0x0086, 0x0053, 0x0053, 0x0000, 0x0637, 0x0001, 0x0000, 
+    0x0087, 0x004F, 0x004F, 0x0000, 0x063E, 0x0054, 0x0054, 0x0000, 
+    0x0642, 0x0001, 0x0000, 0x0088, 0x0043, 0x0043, 0x0000, 0x0649, 
+    0x0001, 0x0000, 0x0089, 0x0043, 0x0044, 0x0000, 0x0651, 0x0654, 
+    0x0001, 0x0000, 0x008A, 0x0001, 0x0000, 0x008B, 0x0044, 0x0044, 
+    0x0000, 0x065B, 0x0001, 0x0000, 0x008C, 0x0043, 0x0053, 0x008D, 
+    0x0672, 0x0000, 0x0675, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x068B, 0x0692, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x06A9, 0x0001, 0x0000, 0x008E, 0x0047, 0x0053, 0x0000, 0x0685, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0688, 0x0001, 0x0000, 0x008F, 0x0001, 
+    0x0000, 0x0090, 0x0050, 0x0050, 0x0000, 0x068F, 0x0001, 0x0000, 
+    0x0091, 0x0043, 0x0050, 0x0092, 0x06A3, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x06A6, 0x0001, 0x0000, 0x0093, 0x0001, 0x0000, 0x0094, 
+    0x004C, 0x004D, 0x0000, 0x06AE, 0x06B1, 0x0001, 0x0000, 0x0095, 
+    0x0001, 0x0000, 0x0096, 0x0041, 0x0056, 0x0000, 0x06CD, 0x0000, 
+    0x06D4, 0x06F6, 0x0000, 0x0000, 0x0702, 0x0000, 0x0709, 0x0000, 
+    0x0000, 0x0000, 0x0714, 0x0721, 0x0000, 0x0000, 0x0728, 0x0000, 
+    0x072B, 0x0732, 0x0000, 0x0741, 0x0053, 0x0053, 0x0000, 0x06D1, 
+    0x0001, 0x0000, 0x0097, 0x0041, 0x0053, 0x0000, 0x06EA, 0x06ED, 
+    0x06F0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x06F3, 0x0001, 0x0000, 0x0098, 0x0001, 0x0000, 0x0099, 0x0001, 
+    0x0000, 0x009A, 0x0001, 0x0000, 0x009B, 0x0046, 0x0048, 0x0000, 
+    0x06FC, 0x0000, 0x06FF, 0x0001, 0x0000, 0x009C, 0x0001, 0x0000, 
+    0x009D, 0x0054, 0x0054, 0x0000, 0x0706, 0x0001, 0x0000, 0x009E, 
+    0x004C, 0x004D, 0x0000, 0x070E, 0x0711, 0x0001, 0x0000, 0x009F, 
+    0x0001, 0x0000, 0x00A0, 0x0050, 0x0053, 0x0000, 0x071B, 0x0000, 
+    0x0000, 0x071E, 0x0001, 0x0000, 0x00A1, 0x0001, 0x0000, 0x00A2, 
+    0x0053, 0x0053, 0x0000, 0x0725, 0x0001, 0x0000, 0x00A3, 0x0001, 
+    0x0000, 0x00A4, 0x004E, 0x004E, 0x00A5, 0x072F, 0x0001, 0x0000, 
+    0x00A6, 0x0041, 0x0046, 0x0000, 0x073B, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x073E, 0x0001, 0x0000, 0x00A7, 0x0001, 0x0000, 0x00A8, 
+    0x004D, 0x004D, 0x0000, 0x0745, 0x0001, 0x0000, 0x00A9, 0x0041, 
+    0x005A, 0x0000, 0x0765, 0x0000, 0x0000, 0x0000, 0x0000, 0x0768, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x076F, 0x0001, 0x0000, 0x00AA, 0x0052, 
+    0x0052, 0x00AB, 0x076C, 0x0001, 0x0000, 0x00AC, 0x0052, 0x0055, 
+    0x0000, 0x0776, 0x0000, 0x0000, 0x0779, 0x0001, 0x0000, 0x00AD, 
+    0x0001, 0x0000, 0x00AE, 0x0053, 0x0055, 0x0000, 0x0782, 0x0000, 
+    0x0789, 0x0044, 0x0044, 0x0000, 0x0786, 0x0001, 0x0000, 0x00AF, 
+    0x0053, 0x0053, 0x0000, 0x078D, 0x0031, 0x0031, 0x0000, 0x0791, 
+    0x0001, 0x0000, 0x00B0, 0x0031, 0x0049, 0x0000, 0x07B0, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x07BB, 0x07C2, 0x0032, 
+    0x0032, 0x0000, 0x07B4, 0x0030, 0x0030, 0x0000, 0x07B8, 0x0001, 
+    0x0000, 0x00B1, 0x0055, 0x0055, 0x0000, 0x07BF, 0x0001, 0x0000, 
+    0x00B2, 0x0042, 0x0042, 0x0000, 0x07C6, 0x0001, 0x0000, 0x00B3, 
+    0x0054, 0x0054, 0x0000, 0x07CD, 0x0001, 0x0000, 0x00B4, 0x0052, 
+    0x0053, 0x0000, 0x07D5, 0x07D8, 0x0001, 0x0000, 0x00B5, 0x0034, 
+    0x0034, 0x00B6, 0x07DC, 0x0034, 0x0034, 0x0000, 0x07E0, 0x0001, 
+    0x0000, 0x00B7, 0x0042, 0x0057, 0x0000, 0x07FC, 0x0000, 0x0000, 
+    0x0000, 0x07FF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0824, 0x0827, 0x082E, 
+    0x0000, 0x0000, 0x0839, 0x0001, 0x0000, 0x00B8, 0x0043, 0x0052, 
+    0x0000, 0x0812, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0819, 0x0053, 0x0053, 0x0000, 0x0816, 0x0001, 0x0000, 0x00B9, 
+    0x0041, 0x0041, 0x0000, 0x081D, 0x004D, 0x004D, 0x0000, 0x0821, 
+    0x0001, 0x0000, 0x00BA, 0x0001, 0x0000, 0x00BB, 0x0052, 0x0052, 
+    0x00BC, 0x082B, 0x0001, 0x0000, 0x00BD, 0x0042, 0x0042, 0x0000, 
+    0x0832, 0x004D, 0x004D, 0x0000, 0x0836, 0x0001, 0x0000, 0x00BE, 
+    0x0049, 0x0049, 0x0000, 0x083D, 0x004E, 0x004E, 0x0000, 0x0841, 
+    0x0044, 0x0044, 0x0000, 0x0845, 0x0001, 0x0000, 0x00BF, 0x0041, 
+    0x0054, 0x0000, 0x085F, 0x087D, 0x0890, 0x08C3, 0x08E0, 0x08E7, 
+    0x0000, 0x08F2, 0x08F9, 0x0000, 0x0918, 0x091F, 0x0933, 0x094D, 
+    0x0000, 0x0969, 0x0000, 0x0995, 0x09B9, 0x09D2, 0x0041, 0x0052, 
+    0x0000, 0x0874, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0877, 0x0000, 0x087A, 0x0001, 0x0000, 0x00C0, 0x0001, 0x0000, 
+    0x00C1, 0x0001, 0x0000, 0x00C2, 0x004F, 0x0055, 0x0000, 0x0887, 
+    0x0000, 0x0000, 0x0000, 0x088A, 0x0000, 0x088D, 0x0001, 0x0000, 
+    0x00C3, 0x0001, 0x0000, 0x00C4, 0x0001, 0x0000, 0x00C5, 0x0043, 
+    0x0054, 0x0000, 0x08A5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x08A8, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x08B7, 0x08BA, 0x08BD, 0x08C0, 0x0001, 0x0000, 0x00C6, 0x0041, 
+    0x0041, 0x00C7, 0x08AC, 0x0053, 0x0053, 0x0000, 0x08B0, 0x0053, 
+    0x0053, 0x0000, 0x08B4, 0x0001, 0x0000, 0x00C8, 0x0001, 0x0000, 
+    0x00C9, 0x0001, 0x0000, 0x00CA, 0x0001, 0x0000, 0x00CB, 0x0001, 
+    0x0000, 0x00CC, 0x0044, 0x0054, 0x0000, 0x08D7, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x08DA, 0x0000, 0x08DD, 0x0001, 0x0000, 
+    0x00CD, 0x0001, 0x0000, 0x00CE, 0x0001, 0x0000, 0x00CF, 0x0041, 
+    0x0041, 0x0000, 0x08E4, 0x0001, 0x0000, 0x00D0, 0x0043, 0x0044, 
+    0x0000, 0x08EC, 0x08EF, 0x0001, 0x0000, 0x00D1, 0x0001, 0x0000, 
+    0x00D2, 0x0053, 0x0053, 0x0000, 0x08F6, 0x0001, 0x0000, 0x00D3, 
+    0x0045, 0x0054, 0x0000, 0x090C, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x090F, 0x0000, 
+    0x0000, 0x0912, 0x0915, 0x0001, 0x0000, 0x00D4, 0x0001, 0x0000, 
+    0x00D5, 0x0001, 0x0000, 0x00D6, 0x0001, 0x0000, 0x00D7, 0x0053, 
+    0x0053, 0x0000, 0x091C, 0x0001, 0x0000, 0x00D8, 0x0049, 0x0050, 
+    0x0000, 0x092A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x092D, 
+    0x0930, 0x0001, 0x0000, 0x00D9, 0x0001, 0x0000, 0x00DA, 0x0001, 
+    0x0000, 0x00DB, 0x0049, 0x0053, 0x0000, 0x0941, 0x0000, 0x0000, 
+    0x0000, 0x0944, 0x0000, 0x0000, 0x0000, 0x0000, 0x0947, 0x094A, 
+    0x0001, 0x0000, 0x00DC, 0x0001, 0x0000, 0x00DD, 0x0001, 0x0000, 
+    0x00DE, 0x0001, 0x0000, 0x00DF, 0x0044, 0x0053, 0x0000, 0x0960, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0963, 0x0966, 0x0001, 
+    0x0000, 0x00E0, 0x0001, 0x0000, 0x00E1, 0x0001, 0x0000, 0x00E2, 
+    0x0041, 0x0057, 0x0000, 0x0983, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0986, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0989, 0x0000, 0x098C, 0x098F, 0x0000, 0x0000, 
+    0x0000, 0x0992, 0x0001, 0x0000, 0x00E3, 0x0001, 0x0000, 0x00E4, 
+    0x0001, 0x0000, 0x00E5, 0x0001, 0x0000, 0x00E6, 0x0001, 0x0000, 
+    0x00E7, 0x0001, 0x0000, 0x00E8, 0x0048, 0x0059, 0x0000, 0x09AA, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x09AD, 0x0000, 0x0000, 0x0000, 
+    0x09B0, 0x0000, 0x09B3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x09B6, 0x0001, 0x0000, 0x00E9, 0x0001, 0x0000, 0x00EA, 0x0001, 
+    0x0000, 0x00EB, 0x0001, 0x0000, 0x00EC, 0x0001, 0x0000, 0x00ED, 
+    0x0041, 0x0050, 0x0000, 0x09CC, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x09CF, 0x0001, 0x0000, 0x00EE, 0x0001, 0x0000, 
+    0x00EF, 0x0048, 0x0053, 0x0000, 0x09E1, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x09E4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x09E7, 
+    0x0001, 0x0000, 0x00F0, 0x0001, 0x0000, 0x00F1, 0x0001, 0x0000, 
+    0x00F2, 0x0043, 0x0053, 0x0000, 0x09FE, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0A14, 0x0000, 
+    0x0A2A, 0x0000, 0x0000, 0x0000, 0x0A31, 0x0041, 0x0049, 0x0000, 
+    0x0A0A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0A11, 0x0050, 0x0050, 0x0000, 0x0A0E, 0x0001, 0x0000, 0x00F3, 
+    0x0001, 0x0000, 0x00F4, 0x0049, 0x0052, 0x0000, 0x0A21, 0x0000, 
+    0x0000, 0x0000, 0x0A24, 0x0000, 0x0000, 0x0000, 0x0000, 0x0A27, 
+    0x0001, 0x0000, 0x00F5, 0x0001, 0x0000, 0x00F6, 0x0001, 0x0000, 
+    0x00F7, 0x0049, 0x0049, 0x0000, 0x0A2E, 0x0001, 0x0000, 0x00F8, 
+    0x004E, 0x004E, 0x0000, 0x0A35, 0x0001, 0x0000, 0x00F9, 0x0042, 
+    0x0052, 0x0000, 0x0A4C, 0x0A60, 0x0A78, 0x0000, 0x0A83, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0A8A, 0x0000, 0x0000, 0x0000, 
+    0x0A9D, 0x0000, 0x0AA4, 0x0043, 0x004D, 0x0000, 0x0A5A, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0A5D, 0x0001, 0x0000, 0x00FA, 0x0001, 0x0000, 0x00FB, 0x0046, 
+    0x004C, 0x0000, 0x0A6A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0A6D, 0x0001, 0x0000, 0x00FC, 0x004F, 0x004F, 0x0000, 0x0A71, 
+    0x004B, 0x004B, 0x0000, 0x0A75, 0x0001, 0x0000, 0x00FD, 0x0053, 
+    0x0053, 0x0000, 0x0A7C, 0x0052, 0x0052, 0x0000, 0x0A80, 0x0001, 
+    0x0000, 0x00FE, 0x0043, 0x0043, 0x0000, 0x0A87, 0x0001, 0x0000, 
+    0x00FF, 0x0052, 0x0053, 0x0000, 0x0A8F, 0x0A96, 0x0052, 0x0052, 
+    0x0000, 0x0A93, 0x0001, 0x0000, 0x0100, 0x0044, 0x0044, 0x0000, 
+    0x0A9A, 0x0001, 0x0000, 0x0101, 0x0052, 0x0052, 0x0000, 0x0AA1, 
+    0x0001, 0x0000, 0x0102, 0x0054, 0x0054, 0x0000, 0x0AA8, 0x0053, 
+    0x0053, 0x0000, 0x0AAC, 0x0001, 0x0000, 0x0103, 0x0041, 0x0056, 
+    0x0000, 0x0AC8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0ACB, 0x0ACE, 0x0000, 0x0000, 0x0AD5, 0x0001, 
+    0x0000, 0x0104, 0x0001, 0x0000, 0x0105, 0x0043, 0x0043, 0x0106, 
+    0x0AD2, 0x0001, 0x0000, 0x0107, 0x0031, 0x0031, 0x0000, 0x0AD9, 
+    0x0038, 0x0038, 0x0000, 0x0ADD, 0x0041, 0x0053, 0x0000, 0x0AF3, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0AFA, 0x0000, 
+    0x0AFD, 0x0B00, 0x004D, 0x004D, 0x0000, 0x0AF7, 0x0001, 0x0000, 
+    0x0108, 0x0001, 0x0000, 0x0109, 0x0001, 0x0000, 0x010A, 0x0001, 
+    0x0000, 0x010B, 0x0043, 0x0053, 0x0000, 0x0B17, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0B1E, 0x0000, 0x0000, 0x0000, 0x0B25, 
+    0x0000, 0x0000, 0x0000, 0x0B44, 0x0000, 0x0B4B, 0x0057, 0x0057, 
+    0x0000, 0x0B1B, 0x0001, 0x0000, 0x010C, 0x0047, 0x0047, 0x0000, 
+    0x0B22, 0x0001, 0x0000, 0x010D, 0x0048, 0x0048, 0x0000, 0x0B29, 
+    0x0046, 0x0054, 0x010E, 0x0B3B, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0B3E, 
+    0x0000, 0x0B41, 0x0001, 0x0000, 0x010F, 0x0001, 0x0000, 0x0110, 
+    0x0001, 0x0000, 0x0111, 0x0043, 0x0043, 0x0000, 0x0B48, 0x0001, 
+    0x0000, 0x0112, 0x0053, 0x0053, 0x0000, 0x0B4F, 0x0001, 0x0000, 
+    0x0113, 0x0041, 0x0056, 0x0000, 0x0B6B, 0x0000, 0x0B90, 0x0B9B, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0BB7, 0x0000, 0x0BC2, 
+    0x0000, 0x0BD1, 0x0043, 0x0054, 0x0000, 0x0B80, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0B83, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0B86, 0x0000, 0x0B8D, 0x0001, 
+    0x0000, 0x0114, 0x0001, 0x0000, 0x0115, 0x0052, 0x0052, 0x0116, 
+    0x0B8A, 0x0001, 0x0000, 0x0117, 0x0001, 0x0000, 0x0118, 0x0052, 
+    0x0052, 0x0000, 0x0B94, 0x0052, 0x0052, 0x0000, 0x0B98, 0x0001, 
+    0x0000, 0x0119, 0x0043, 0x0052, 0x0000, 0x0BAE, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0BB1, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0BB4, 0x0001, 0x0000, 0x011A, 
+    0x0001, 0x0000, 0x011B, 0x0001, 0x0000, 0x011C, 0x0053, 0x0053, 
+    0x0000, 0x0BBB, 0x0043, 0x0043, 0x0000, 0x0BBF, 0x0001, 0x0000, 
+    0x011D, 0x0043, 0x0048, 0x0000, 0x0BCB, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0BCE, 0x0001, 0x0000, 0x011E, 0x0001, 0x0000, 0x011F, 
+    0x0043, 0x0054, 0x0000, 0x0BE6, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0BE9, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0BEC, 0x0000, 0x0BF3, 0x0001, 0x0000, 0x0120, 
+    0x0001, 0x0000, 0x0121, 0x0052, 0x0052, 0x0122, 0x0BF0, 0x0001, 
+    0x0000, 0x0123, 0x0001, 0x0000, 0x0124, 0x0041, 0x0054, 0x0000, 
+    0x0C0D, 0x0000, 0x0000, 0x0C27, 0x0C32, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0C86, 0x0C91, 0x0CA0, 0x0000, 0x0000, 
+    0x0000, 0x0CAB, 0x0CC2, 0x0CD1, 0x0044, 0x004C, 0x0000, 0x0C19, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0C20, 
+    0x0052, 0x0052, 0x0000, 0x0C1D, 0x0001, 0x0000, 0x0125, 0x0053, 
+    0x0053, 0x0126, 0x0C24, 0x0001, 0x0000, 0x0127, 0x004C, 0x004C, 
+    0x0000, 0x0C2B, 0x0053, 0x0053, 0x0000, 0x0C2F, 0x0001, 0x0000, 
+    0x0128, 0x0031, 0x0052, 0x0000, 0x0C57, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0C66, 0x0000, 0x0C7B, 0x0034, 0x0034, 
+    0x0000, 0x0C5B, 0x0030, 0x0031, 0x0000, 0x0C60, 0x0C63, 0x0001, 
+    0x0000, 0x0129, 0x0001, 0x0000, 0x012A, 0x0041, 0x0044, 0x0000, 
+    0x0C6D, 0x0000, 0x0000, 0x0C74, 0x004C, 0x004C, 0x0000, 0x0C71, 
+    0x0001, 0x0000, 0x012B, 0x004C, 0x004C, 0x0000, 0x0C78, 0x0001, 
+    0x0000, 0x012C, 0x0044, 0x0044, 0x0000, 0x0C7F, 0x004C, 0x004C, 
+    0x0000, 0x0C83, 0x0001, 0x0000, 0x012D, 0x0044, 0x0044, 0x0000, 
+    0x0C8A, 0x004C, 0x004C, 0x0000, 0x0C8E, 0x0001, 0x0000, 0x012E, 
+    0x004F, 0x004F, 0x0000, 0x0C95, 0x0044, 0x0044, 0x012F, 0x0C99, 
+    0x0045, 0x0045, 0x0000, 0x0C9D, 0x0001, 0x0000, 0x0130, 0x0055, 
+    0x0055, 0x0000, 0x0CA4, 0x004D, 0x004D, 0x0000, 0x0CA8, 0x0001, 
+    0x0000, 0x0131, 0x0044, 0x0045, 0x0000, 0x0CB0, 0x0CBB, 0x004C, 
+    0x004C, 0x0000, 0x0CB4, 0x0053, 0x0053, 0x0132, 0x0CB8, 0x0001, 
+    0x0000, 0x0133, 0x0053, 0x0053, 0x0000, 0x0CBF, 0x0001, 0x0000, 
+    0x0134, 0x0045, 0x0045, 0x0000, 0x0CC6, 0x004C, 0x004C, 0x0000, 
+    0x0CCA, 0x0046, 0x0046, 0x0000, 0x0CCE, 0x0001, 0x0000, 0x0135, 
+    0x0045, 0x0045, 0x0000, 0x0CD5, 0x0052, 0x0052, 0x0000, 0x0CD9, 
+    0x0001, 0x0000, 0x0136, 0x0041, 0x0058, 0x0000, 0x0CF7, 0x0D02, 
+    0x0D09, 0x0D18, 0x0D3F, 0x0000, 0x0D46, 0x0D5D, 0x0D64, 0x0000, 
+    0x0000, 0x0D72, 0x0000, 0x0D79, 0x0000, 0x0D80, 0x0000, 0x0D97, 
+    0x0DC5, 0x0DE5, 0x0000, 0x0000, 0x0000, 0x0E19, 0x0043, 0x0043, 
+    0x0000, 0x0CFB, 0x0052, 0x0052, 0x0137, 0x0CFF, 0x0001, 0x0000, 
+    0x0138, 0x0054, 0x0054, 0x0000, 0x0D06, 0x0001, 0x0000, 0x0139, 
+    0x0049, 0x0049, 0x0000, 0x0D0D, 0x0044, 0x0044, 0x0000, 0x0D11, 
+    0x0052, 0x0052, 0x013A, 0x0D15, 0x0001, 0x0000, 0x013B, 0x0049, 
+    0x0058, 0x0000, 0x0D2B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0D36, 0x0000, 0x0D39, 0x0000, 0x0000, 
+    0x0000, 0x0D3C, 0x0044, 0x0044, 0x0000, 0x0D2F, 0x0052, 0x0052, 
+    0x013C, 0x0D33, 0x0001, 0x0000, 0x013D, 0x0001, 0x0000, 0x013E, 
+    0x0001, 0x0000, 0x013F, 0x0001, 0x0000, 0x0140, 0x004D, 0x004D, 
+    0x0000, 0x0D43, 0x0001, 0x0000, 0x0141, 0x004D, 0x0054, 0x0000, 
+    0x0D51, 0x0000, 0x0000, 0x0000, 0x0000, 0x0D54, 0x0D57, 0x0D5A, 
+    0x0001, 0x0000, 0x0142, 0x0001, 0x0000, 0x0143, 0x0001, 0x0000, 
+    0x0144, 0x0001, 0x0000, 0x0145, 0x0043, 0x0043, 0x0000, 0x0D61, 
+    0x0001, 0x0000, 0x0146, 0x0050, 0x0054, 0x0000, 0x0D6C, 0x0000, 
+    0x0000, 0x0000, 0x0D6F, 0x0001, 0x0000, 0x0147, 0x0001, 0x0000, 
+    0x0148, 0x0053, 0x0053, 0x0000, 0x0D76, 0x0001, 0x0000, 0x0149, 
+    0x0048, 0x0048, 0x0000, 0x0D7D, 0x0001, 0x0000, 0x014A, 0x0048, 
+    0x0052, 0x0000, 0x0D8E, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0D91, 0x0000, 0x0D94, 0x0001, 0x0000, 0x014B, 
+    0x0001, 0x0000, 0x014C, 0x0001, 0x0000, 0x014D, 0x0041, 0x0058, 
+    0x0000, 0x0DB2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0DB5, 0x0000, 0x0000, 0x0DBC, 0x0000, 0x0DBF, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0DC2, 0x0001, 0x0000, 0x014E, 0x0044, 0x0044, 0x0000, 0x0DB9, 
+    0x0001, 0x0000, 0x014F, 0x0001, 0x0000, 0x0150, 0x0001, 0x0000, 
+    0x0151, 0x0001, 0x0000, 0x0152, 0x0044, 0x0050, 0x0000, 0x0DD5, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0DD8, 0x0000, 0x0000, 0x0000, 
+    0x0DDF, 0x0000, 0x0000, 0x0DE2, 0x0001, 0x0000, 0x0153, 0x0044, 
+    0x0044, 0x0000, 0x0DDC, 0x0001, 0x0000, 0x0154, 0x0001, 0x0000, 
+    0x0155, 0x0001, 0x0000, 0x0156, 0x0041, 0x0058, 0x0000, 0x0E00, 
+    0x0000, 0x0000, 0x0E03, 0x0E06, 0x0000, 0x0000, 0x0E0D, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0E10, 0x0E13, 0x0000, 0x0000, 0x0000, 0x0000, 0x0E16, 0x0001, 
+    0x0000, 0x0157, 0x0001, 0x0000, 0x0158, 0x0052, 0x0052, 0x0000, 
+    0x0E0A, 0x0001, 0x0000, 0x0159, 0x0001, 0x0000, 0x015A, 0x0001, 
+    0x0000, 0x015B, 0x0001, 0x0000, 0x015C, 0x0001, 0x0000, 0x015D, 
+    0x0054, 0x0054, 0x0000, 0x0E1D, 0x0001, 0x0000, 0x015E, 0x0042, 
+    0x0053, 0x015F, 0x0E35, 0x0E40, 0x0E82, 0x0E9C, 0x0EA7, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0EB2, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0EBD, 0x0000, 0x0EE1, 0x0EEC, 0x0041, 0x0041, 0x0000, 0x0E39, 
+    0x0047, 0x0047, 0x0000, 0x0E3D, 0x0001, 0x0000, 0x0160, 0x0044, 
+    0x0058, 0x0000, 0x0E58, 0x0000, 0x0000, 0x0000, 0x0E5F, 0x0E66, 
+    0x0000, 0x0000, 0x0E6D, 0x0000, 0x0000, 0x0000, 0x0E74, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0E7B, 0x0041, 
+    0x0041, 0x0000, 0x0E5C, 0x0001, 0x0000, 0x0161, 0x0047, 0x0047, 
+    0x0000, 0x0E63, 0x0001, 0x0000, 0x0162, 0x0044, 0x0044, 0x0000, 
+    0x0E6A, 0x0001, 0x0000, 0x0163, 0x004B, 0x004B, 0x0000, 0x0E71, 
+    0x0001, 0x0000, 0x0164, 0x004E, 0x004E, 0x0000, 0x0E78, 0x0001, 
+    0x0000, 0x0165, 0x0046, 0x0046, 0x0000, 0x0E7F, 0x0001, 0x0000, 
+    0x0166, 0x0041, 0x0049, 0x0000, 0x0E8E, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0E95, 0x0043, 0x0043, 0x0000, 
+    0x0E92, 0x0001, 0x0000, 0x0167, 0x0052, 0x0052, 0x0000, 0x0E99, 
+    0x0001, 0x0000, 0x0168, 0x0043, 0x0043, 0x0000, 0x0EA0, 0x0052, 
+    0x0052, 0x0000, 0x0EA4, 0x0001, 0x0000, 0x0169, 0x004F, 0x004F, 
+    0x0000, 0x0EAB, 0x004E, 0x004E, 0x0000, 0x0EAF, 0x0001, 0x0000, 
+    0x016A, 0x0050, 0x0050, 0x0000, 0x0EB6, 0x0044, 0x0044, 0x0000, 
+    0x0EBA, 0x0001, 0x0000, 0x016B, 0x0042, 0x0054, 0x0000, 0x0ED3, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0EDA, 0x0041, 0x0041, 0x0000, 0x0ED7, 0x0001, 0x0000, 
+    0x016C, 0x0048, 0x0048, 0x0000, 0x0EDE, 0x0001, 0x0000, 0x016D, 
+    0x004C, 0x004C, 0x0000, 0x0EE5, 0x004B, 0x004B, 0x0000, 0x0EE9, 
+    0x0001, 0x0000, 0x016E, 0x0034, 0x0054, 0x0000, 0x0F10, 0x0F1B, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0F3C, 0x0035, 
+    0x0036, 0x0000, 0x0F15, 0x0F18, 0x0001, 0x0000, 0x016F, 0x0001, 
+    0x0000, 0x0170, 0x0030, 0x0038, 0x0000, 0x0F27, 0x0F2A, 0x0F2D, 
+    0x0F30, 0x0F33, 0x0000, 0x0000, 0x0F36, 0x0F39, 0x0001, 0x0000, 
+    0x0171, 0x0001, 0x0000, 0x0172, 0x0001, 0x0000, 0x0173, 0x0001, 
+    0x0000, 0x0174, 0x0001, 0x0000, 0x0175, 0x0001, 0x0000, 0x0176, 
+    0x0001, 0x0000, 0x0177, 0x004C, 0x004C, 0x0000, 0x0F40, 0x0001, 
+    0x0000, 0x0178, 0x0001, 0x0000, 0x0179, 0x0001, 0x0000, 0x017A, 
+    0x0001, 0x0000, 0x017B, 0x0001, 0x0000, 0x017C, 0x0001, 0x0000, 
+    0x017D, 0x0001, 0x0000, 0x017E, 0x0001, 0x0000, 0x017F, 0x0001, 
+    0x0000, 0x0180, 0x0001, 0x0000, 0x0181, 0x0001, 0x0000, 0x0182, 
+    0x0001, 0x0000, 0x0183, 0x0030, 0x0038, 0x0000, 0x0F70, 0x0F73, 
+    0x0000, 0x0F7A, 0x0F7D, 0x0F80, 0x0F83, 0x0F86, 0x0F89, 0x0001, 
+    0x0000, 0x0184, 0x0030, 0x0030, 0x0000, 0x0F77, 0x0001, 0x0000, 
+    0x0185, 0x0001, 0x0000, 0x0186, 0x0001, 0x0000, 0x0187, 0x0001, 
+    0x0000, 0x0188, 0x0001, 0x0000, 0x0189, 0x0001, 0x0000, 0x018A, 
+    0x0001, 0x0000, 0x018B, 0x0001, 0x0000, 0x018C, 0x0001, 0x0000, 
+    0x018D, 0x0001, 0x0000, 0x018E, 0x0001, 0x0000, 0x018F, 
+};
+
+#define COMMAND_TRIE_LEN 3991
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/awgn.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,157 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * awgn.c - An additive Gaussian white noise generator
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: awgn.c,v 1.11 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+/* This code is based on some demonstration code in a research
+   paper somewhere. I can't track down where I got the original from,
+   so that due recognition can be given. The original had no explicit
+   copyright notice, and I hope nobody objects to its use here.
+   
+   Having a reasonable Gaussian noise generator is pretty important for
+   telephony testing (in fact, pretty much any DSP testing), and this
+   one seems to have served me OK. Since the generation of Gaussian
+   noise is only for test purposes, and not a core system component,
+   I don't intend to worry excessively about copyright issues, unless
+   someone worries me.
+        
+   The non-core nature of this code also explains why it is unlikely
+   to ever be optimised. */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/awgn.h"
+
+/* Gaussian noise generator constants */
+#define M1 259200
+#define IA1 7141
+#define IC1 54773
+#define RM1 (1.0/M1)
+#define M2 134456
+#define IA2 8121
+#define IC2 28411
+#define RM2 (1.0/M2)
+#define M3 243000
+#define IA3 4561
+#define IC3 51349
+
+static double ran1(awgn_state_t *s)
+{
+    double temp;
+    int j;
+
+    s->ix1 = (IA1*s->ix1 + IC1)%M1;
+    s->ix2 = (IA2*s->ix2 + IC2)%M2;
+    s->ix3 = (IA3*s->ix3 + IC3)%M3;
+    j = 1 + ((97*s->ix3)/M3);
+    if (j > 97  ||  j < 1)
+    {
+        /* Error */
+        return -1;
+    }
+    temp = s->r[j];
+    s->r[j] = (s->ix1 + s->ix2*RM2)*RM1;
+    return temp;
+}
+/*- End of function --------------------------------------------------------*/
+
+void awgn_init_dbm0(awgn_state_t *s, int idum, float level)
+{
+    awgn_init_dbov(s, idum, level - DBM0_MAX_POWER);
+}
+/*- End of function --------------------------------------------------------*/
+
+void awgn_init_dbov(awgn_state_t *s, int idum, float level)
+{
+    int j;
+
+    if (idum < 0)
+        idum = -idum;
+
+    s->rms = pow(10.0, level/20.0)*32768.0;
+
+    s->ix1 = (IC1 + idum)%M1;
+    s->ix1 = (IA1*s->ix1 + IC1)%M1;
+    s->ix2 = s->ix1%M2;
+    s->ix1 = (IA1*s->ix1 + IC1)%M1;
+    s->ix3 = s->ix1%M3;
+    s->r[0] = 0.0;
+    for (j = 1;  j <= 97;  j++)
+    {
+        s->ix1 = (IA1*s->ix1 + IC1)%M1;
+        s->ix2 = (IA2*s->ix2 + IC2)%M2;
+        s->r[j] = (s->ix1 + s->ix2*RM2)*RM1;
+    }
+    s->gset = 0.0;
+    s->iset = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int16_t awgn(awgn_state_t *s)
+{
+    double fac;
+    double r;
+    double v1;
+    double v2;
+    double amp;
+
+    if (s->iset == 0)
+    {
+        do
+        {
+            v1 = 2.0*ran1(s) - 1.0;
+            v2 = 2.0*ran1(s) - 1.0;
+            r = v1*v1 + v2*v2;
+        }
+        while (r >= 1.0);
+        fac = sqrt(-2.0*log(r)/r);
+        s->gset = v1*fac;
+        s->iset = 1;
+        amp = v2*fac*s->rms;
+    }
+    else
+    {
+        s->iset = 0;
+        amp = s->gset*s->rms;
+    }
+    return fsaturate(amp);
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/bell_r2_mf.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,799 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bell_r2_mf.c - Bell MF and MFC/R2 tone generation and detection.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bell_r2_mf.c,v 1.9 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file bell_r2_mf.h */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <string.h>
+#include <time.h>
+#include <fcntl.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/dds.h"
+#include "spandsp/tone_detect.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/bell_r2_mf.h"
+
+#if !defined(M_PI)
+/* C99 systems may not define M_PI */
+#define M_PI 3.14159265358979323846264338327
+#endif
+
+#define ms_to_samples(t)            (((t)*SAMPLE_RATE)/1000)
+
+typedef struct
+{
+    float       f1;         /* First freq */
+    float       f2;         /* Second freq */
+    int8_t      level1;     /* Level of the first freq (dB) */
+    int8_t      level2;     /* Level of the second freq (dB) */
+    uint8_t     on_time;    /* Tone on time (ms) */
+    uint8_t     off_time;   /* Minimum post tone silence (ms) */
+} mf_digit_tones_t;
+
+int bell_mf_gen_inited = FALSE;
+tone_gen_descriptor_t bell_mf_digit_tones[15];
+
+int r2_mf_gen_inited = FALSE;
+tone_gen_descriptor_t r2_mf_fwd_digit_tones[15];
+tone_gen_descriptor_t r2_mf_back_digit_tones[15];
+
+#if 0
+tone_gen_descriptor_t socotel_mf_digit_tones[18];
+#endif
+
+/* Bell R1 tone generation specs.
+ *  Power: -7dBm +- 1dB
+ *  Frequency: within +-1.5%
+ *  Mismatch between the start time of a pair of tones: <=6ms.
+ *  Mismatch between the end time of a pair of tones: <=6ms.
+ *  Tone duration: 68+-7ms, except KP which is 100+-7ms.
+ *  Inter-tone gap: 68+-7ms.
+ */
+static const mf_digit_tones_t bell_mf_tones[] =
+{
+    { 700.0f,  900.0f, -7, -7,  68, 68},
+    { 700.0f, 1100.0f, -7, -7,  68, 68},
+    { 900.0f, 1100.0f, -7, -7,  68, 68},
+    { 700.0f, 1300.0f, -7, -7,  68, 68},
+    { 900.0f, 1300.0f, -7, -7,  68, 68},
+    {1100.0f, 1300.0f, -7, -7,  68, 68},
+    { 700.0f, 1500.0f, -7, -7,  68, 68},
+    { 900.0f, 1500.0f, -7, -7,  68, 68},
+    {1100.0f, 1500.0f, -7, -7,  68, 68},
+    {1300.0f, 1500.0f, -7, -7,  68, 68},
+    { 700.0f, 1700.0f, -7, -7,  68, 68}, /* ST''' - use 'C' */
+    { 900.0f, 1700.0f, -7, -7,  68, 68}, /* ST'   - use 'A' */
+    {1100.0f, 1700.0f, -7, -7, 100, 68}, /* KP    - use '*' */
+    {1300.0f, 1700.0f, -7, -7,  68, 68}, /* ST''  - use 'B' */
+    {1500.0f, 1700.0f, -7, -7,  68, 68}, /* ST    - use '#' */
+    {0.0f, 0.0f, 0, 0, 0, 0}
+};
+
+/* The order of the digits here must match the list above */
+static const char bell_mf_tone_codes[] = "1234567890CA*B#";
+
+/* R2 tone generation specs.
+ *  Power: -11.5dBm +- 1dB
+ *  Frequency: within +-4Hz
+ *  Mismatch between the start time of a pair of tones: <=1ms.
+ *  Mismatch between the end time of a pair of tones: <=1ms.
+ */
+static const mf_digit_tones_t r2_mf_fwd_tones[] =
+{
+    {1380.0f, 1500.0f, -11, -11, 1, 0},
+    {1380.0f, 1620.0f, -11, -11, 1, 0},
+    {1500.0f, 1620.0f, -11, -11, 1, 0},
+    {1380.0f, 1740.0f, -11, -11, 1, 0},
+    {1500.0f, 1740.0f, -11, -11, 1, 0},
+    {1620.0f, 1740.0f, -11, -11, 1, 0},
+    {1380.0f, 1860.0f, -11, -11, 1, 0},
+    {1500.0f, 1860.0f, -11, -11, 1, 0},
+    {1620.0f, 1860.0f, -11, -11, 1, 0},
+    {1740.0f, 1860.0f, -11, -11, 1, 0},
+    {1380.0f, 1980.0f, -11, -11, 1, 0},
+    {1500.0f, 1980.0f, -11, -11, 1, 0},
+    {1620.0f, 1980.0f, -11, -11, 1, 0},
+    {1740.0f, 1980.0f, -11, -11, 1, 0},
+    {1860.0f, 1980.0f, -11, -11, 1, 0},
+    {0.0f, 0.0f, 0, 0, 0, 0}
+};
+
+static const mf_digit_tones_t r2_mf_back_tones[] =
+{
+    {1140.0f, 1020.0f, -11, -11, 1, 0},
+    {1140.0f,  900.0f, -11, -11, 1, 0},
+    {1020.0f,  900.0f, -11, -11, 1, 0},
+    {1140.0f,  780.0f, -11, -11, 1, 0},
+    {1020.0f,  780.0f, -11, -11, 1, 0},
+    { 900.0f,  780.0f, -11, -11, 1, 0},
+    {1140.0f,  660.0f, -11, -11, 1, 0},
+    {1020.0f,  660.0f, -11, -11, 1, 0},
+    { 900.0f,  660.0f, -11, -11, 1, 0},
+    { 780.0f,  660.0f, -11, -11, 1, 0},
+    {1140.0f,  540.0f, -11, -11, 1, 0},
+    {1020.0f,  540.0f, -11, -11, 1, 0},
+    { 900.0f,  540.0f, -11, -11, 1, 0},
+    { 780.0f,  540.0f, -11, -11, 1, 0},
+    { 660.0f,  540.0f, -11, -11, 1, 0},
+    {0.0f, 0.0f, 0, 0, 0, 0}
+};
+
+/* The order of the digits here must match the lists above */
+static const char r2_mf_tone_codes[] = "1234567890BCDEF";
+
+#if 0
+static const mf_digit_tones_t socotel_tones[] =
+{
+    { 700.0f,  900.0f, -11, -11, 1, 0},
+    { 700.0f, 1100.0f, -11, -11, 1, 0},
+    { 900.0f, 1100.0f, -11, -11, 1, 0},
+    { 700.0f, 1300.0f, -11, -11, 1, 0},
+    { 900.0f, 1300.0f, -11, -11, 1, 0},
+    {1100.0f, 1300.0f, -11, -11, 1, 0},
+    { 700.0f, 1500.0f, -11, -11, 1, 0},
+    { 900.0f, 1500.0f, -11, -11, 1, 0},
+    {1100.0f, 1500.0f, -11, -11, 1, 0},
+    {1300.0f, 1500.0f, -11, -11, 1, 0},
+    {1500.0f, 1700.0f, -11, -11, 1, 0},
+    { 700.0f, 1700.0f, -11, -11, 1, 0},
+    { 900.0f, 1700.0f, -11, -11, 1, 0},
+    {1300.0f, 1700.0f, -11, -11, 1, 0},
+    {1100.0f, 1700.0f, -11, -11, 1, 0},
+    {1700.0f,    0.0f, -11, -11, 1, 0},   /* Use 'F' */
+    {1900.0f,    0.0f, -11, -11, 1, 0},   /* Use 'G' */
+    {0.0f, 0.0f, 0, 0, 0, 0}
+};
+
+/* The order of the digits here must match the list above */
+static char socotel_mf_tone_codes[] = "1234567890ABCDEFG";
+#endif
+
+#define BELL_MF_THRESHOLD           1.6e9f
+#define BELL_MF_TWIST               4.0f    /* 6dB */
+#define BELL_MF_RELATIVE_PEAK       12.6f   /* 11dB */
+
+#define R2_MF_THRESHOLD             5.0e8f
+#define R2_MF_TWIST                 5.0f    /* 7dB */
+#define R2_MF_RELATIVE_PEAK         12.6f   /* 11dB */
+
+static goertzel_descriptor_t bell_mf_detect_desc[6];
+
+static goertzel_descriptor_t mf_fwd_detect_desc[6];
+static goertzel_descriptor_t mf_back_detect_desc[6];
+
+static const float bell_mf_frequencies[] =
+{
+     700.0f,  900.0f, 1100.0f, 1300.0f, 1500.0f, 1700.0f
+};
+
+/* Use the follow characters for the Bell MF special signals:
+    KP    - use '*'
+    ST    - use '#'
+    ST'   - use 'A'
+    ST''  - use 'B'
+    ST''' - use 'C' */
+static const char bell_mf_positions[] = "1247C-358A--69*---0B----#";
+
+static const float r2_mf_fwd_frequencies[] =
+{
+    1380.0f, 1500.0f, 1620.0f, 1740.0f, 1860.0f, 1980.0f
+};
+
+static const float r2_mf_back_frequencies[] =
+{
+    1140.0f, 1020.0f,  900.0f,  780.0f,  660.0f,  540.0f
+};
+
+/* Use codes '1' to 'F' for the R2 signals 1 to 15, except for signal 'A'.
+   Use '0' for this, so the codes match the digits 0-9. */
+static const char r2_mf_positions[] = "1247B-358C--69D---0E----F";
+
+static void bell_mf_gen_init(void)
+{
+    int i;
+    const mf_digit_tones_t *tones;
+
+    if (bell_mf_gen_inited)
+        return;
+    i = 0;
+    tones = bell_mf_tones;
+    while (tones->on_time)
+    {
+        /* Note: The duration of KP is longer than the other signals. */
+        make_tone_gen_descriptor(&bell_mf_digit_tones[i++],
+                                 (int) tones->f1,
+                                 tones->level1,
+                                 (int) tones->f2,
+                                 tones->level2,
+                                 tones->on_time,
+                                 tones->off_time,
+                                 0,
+                                 0,
+                                 FALSE);
+        tones++;
+    }
+    bell_mf_gen_inited = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+int bell_mf_tx(bell_mf_tx_state_t *s, int16_t amp[], int max_samples)
+{
+    int len;
+    size_t dig;
+    char *cp;
+
+    len = 0;
+    if (s->tones.current_section >= 0)
+    {
+        /* Deal with the fragment left over from last time */
+        len = tone_gen(&(s->tones), amp, max_samples);
+    }
+    dig = 0;
+    while (dig < s->current_digits  &&  len < max_samples)
+    {
+        /* Step to the next digit */
+        if ((cp = strchr(bell_mf_tone_codes, s->digits[dig++])) == NULL)
+            continue;
+        tone_gen_init(&(s->tones), &(s->tone_descriptors[cp - bell_mf_tone_codes]));
+        len += tone_gen(&(s->tones), amp + len, max_samples - len);
+    }
+    if (dig)
+    {
+        /* Shift out the consumed digits */
+        s->current_digits -= dig;
+        memmove(s->digits, s->digits + dig, s->current_digits);
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+size_t bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits)
+{
+    size_t len;
+
+    /* This returns the number of characters that would not fit in the buffer.
+       The buffer will only be loaded if the whole string of digits will fit,
+       in which case zero is returned. */
+    if ((len = strlen(digits)) > 0)
+    {
+        if (s->current_digits + len <= MAX_BELL_MF_DIGITS)
+        {
+            memcpy(s->digits + s->current_digits, digits, len);
+            s->current_digits += len;
+            len = 0;
+        }
+        else
+        {
+            len = MAX_BELL_MF_DIGITS - s->current_digits;
+        }
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+bell_mf_tx_state_t *bell_mf_tx_init(bell_mf_tx_state_t *s)
+{
+    if (!bell_mf_gen_inited)
+        bell_mf_gen_init();
+    s->tone_descriptors = bell_mf_digit_tones;
+    tone_gen_init(&(s->tones), &bell_mf_digit_tones[0]);
+    s->current_sample = 0;
+    s->current_digits = 0;
+    s->tones.current_section = -1;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int r2_mf_tx(r2_mf_tx_state_t *s, int16_t amp[], int samples, int fwd, char digit)
+{
+    int len;
+    char *cp;
+
+    len = 0;
+    if ((digit & 0x80))
+    {
+        /* Continue generating the tone we started earlier. */
+        len = tone_gen(&s->tone, amp, samples);
+    }
+    else if (digit == 0)
+    {
+        len = samples;
+        memset(amp, 0, len*sizeof(int16_t));
+    }
+    else
+    {
+        if ((cp = strchr(r2_mf_tone_codes, digit)))
+        {
+            if (fwd)
+                tone_gen_init(&s->tone, &r2_mf_fwd_digit_tones[cp - r2_mf_tone_codes]);
+            else
+                tone_gen_init(&s->tone, &r2_mf_back_digit_tones[cp - r2_mf_tone_codes]);
+            len = tone_gen(&s->tone, amp, samples);
+        }
+        else
+        {
+            len = samples;
+            memset(amp, 0, len*sizeof(int16_t));
+            
+        }
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+r2_mf_tx_state_t *r2_mf_tx_init(r2_mf_tx_state_t *s)
+{
+    int i;
+    const mf_digit_tones_t *tones;
+
+    if (!r2_mf_gen_inited)
+    {
+        i = 0;
+        tones = r2_mf_fwd_tones;
+        while (tones->on_time)
+        {
+            make_tone_gen_descriptor(&r2_mf_fwd_digit_tones[i++],
+                                     (int) tones->f1,
+                                     tones->level1,
+                                     (int) tones->f2,
+                                     tones->level2,
+                                     tones->on_time,
+                                     tones->off_time,
+                                     0,
+                                     0,
+                                     (tones->off_time == 0));
+            tones++;
+        }
+        i = 0;
+        tones = r2_mf_back_tones;
+        while (tones->on_time)
+        {
+            make_tone_gen_descriptor(&r2_mf_back_digit_tones[i++],
+                                     (int) tones->f1,
+                                     tones->level1,
+                                     (int) tones->f2,
+                                     tones->level2,
+                                     tones->on_time,
+                                     tones->off_time,
+                                     0,
+                                     0,
+                                     (tones->off_time == 0));
+            tones++;
+        }
+        r2_mf_gen_inited = TRUE;
+    }
+    memset(s, 0, sizeof(*s));
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int bell_mf_rx(bell_mf_rx_state_t *s, const int16_t amp[], int samples)
+{
+    float energy[6];
+    float famp;
+    float v1;
+    int i;
+    int j;
+    int sample;
+    int best;
+    int second_best;
+    int limit;
+    uint8_t hit;
+
+    hit = 0;
+    for (sample = 0;  sample < samples;  sample = limit)
+    {
+        if ((samples - sample) >= (120 - s->current_sample))
+            limit = sample + (120 - s->current_sample);
+        else
+            limit = samples;
+        for (j = sample;  j < limit;  j++)
+        {
+            famp = amp[j];
+    
+            /* With GCC 2.95, the following unrolled code seems to take about 35%
+               (rough estimate) as long as a neat little 0-5 loop */
+            v1 = s->out[0].v2;
+            s->out[0].v2 = s->out[0].v3;
+            s->out[0].v3 = s->out[0].fac*s->out[0].v2 - v1 + famp;
+    
+            v1 = s->out[1].v2;
+            s->out[1].v2 = s->out[1].v3;
+            s->out[1].v3 = s->out[1].fac*s->out[1].v2 - v1 + famp;
+    
+            v1 = s->out[2].v2;
+            s->out[2].v2 = s->out[2].v3;
+            s->out[2].v3 = s->out[2].fac*s->out[2].v2 - v1 + famp;
+    
+            v1 = s->out[3].v2;
+            s->out[3].v2 = s->out[3].v3;
+            s->out[3].v3 = s->out[3].fac*s->out[3].v2 - v1 + famp;
+    
+            v1 = s->out[4].v2;
+            s->out[4].v2 = s->out[4].v3;
+            s->out[4].v3 = s->out[4].fac*s->out[4].v2 - v1 + famp;
+    
+            v1 = s->out[5].v2;
+            s->out[5].v2 = s->out[5].v3;
+            s->out[5].v3 = s->out[5].fac*s->out[5].v2 - v1 + famp;
+        }
+        s->current_sample += (limit - sample);
+        if (s->current_sample < 120)
+            continue;
+
+        /* We are at the end of an MF detection block */
+        /* Find the two highest energies. The spec says to look for
+           two tones and two tones only. Taking this literally -ie
+           only two tones pass the minimum threshold - doesn't work
+           well. The sinc function mess, due to rectangular windowing
+           ensure that! Find the two highest energies and ensure they
+           are considerably stronger than any of the others. */
+        energy[0] = goertzel_result(&s->out[0]);
+        energy[1] = goertzel_result(&s->out[1]);
+        if (energy[0] > energy[1])
+        {
+            best = 0;
+            second_best = 1;
+        }
+        else
+        {
+            best = 1;
+            second_best = 0;
+        }
+        for (i = 2;  i < 6;  i++)
+        {
+            energy[i] = goertzel_result(&s->out[i]);
+            if (energy[i] >= energy[best])
+            {
+                second_best = best;
+                best = i;
+            }
+            else if (energy[i] >= energy[second_best])
+            {
+                second_best = i;
+            }
+        }
+        /* Basic signal level and twist tests */
+        hit = 0;
+        if (energy[best] >= BELL_MF_THRESHOLD
+            &&
+            energy[second_best] >= BELL_MF_THRESHOLD
+            &&
+            energy[best] < energy[second_best]*BELL_MF_TWIST
+            &&
+            energy[best]*BELL_MF_TWIST > energy[second_best])
+        {
+            /* Relative peak test */
+            hit = 'X';
+            for (i = 0;  i < 6;  i++)
+            {
+                if (i != best  &&  i != second_best)
+                {
+                    if (energy[i]*BELL_MF_RELATIVE_PEAK >= energy[second_best])
+                    {
+                        /* The best two are not clearly the best */
+                        hit = 0;
+                        break;
+                    }
+                }
+            }
+        }
+        if (hit)
+        {
+            /* Get the values into ascending order */
+            if (second_best < best)
+            {
+                i = best;
+                best = second_best;
+                second_best = i;
+            }
+            best = best*5 + second_best - 1;
+            hit = bell_mf_positions[best];
+            /* Look for two successive similar results */
+            /* The logic in the next test is:
+               For KP we need 4 successive identical clean detects, with
+               two blocks of something different preceeding it. For anything
+               else we need two successive identical clean detects, with
+               two blocks of something different preceeding it. */
+            if (hit == s->hits[4]
+                &&
+                hit == s->hits[3]
+                &&
+                   ((hit != '*'  &&  hit != s->hits[2]  &&  hit != s->hits[1])
+                    ||
+                    (hit == '*'  &&  hit == s->hits[2]  &&  hit != s->hits[1]  &&  hit != s->hits[0])))
+            {
+                if (s->current_digits < MAX_BELL_MF_DIGITS)
+                {
+                    s->digits[s->current_digits++] = (char) hit;
+                    s->digits[s->current_digits] = '\0';
+                    if (s->callback)
+                    {
+                        s->callback(s->callback_data, s->digits, s->current_digits);
+                        s->current_digits = 0;
+                    }
+                }
+                else
+                {
+                    s->lost_digits++;
+                }
+            }
+        }
+        s->hits[0] = s->hits[1];
+        s->hits[1] = s->hits[2];
+        s->hits[2] = s->hits[3];
+        s->hits[3] = s->hits[4];
+        s->hits[4] = hit;
+        /* Reinitialise the detector for the next block */
+        for (i = 0;  i < 6;  i++)
+            goertzel_reset(&s->out[i]);
+        s->current_sample = 0;
+    }
+    if (s->current_digits  &&  s->callback)
+    {
+        s->callback(s->callback_data, s->digits, s->current_digits);
+        s->digits[0] = '\0';
+        s->current_digits = 0;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+size_t bell_mf_rx_get(bell_mf_rx_state_t *s, char *buf, int max)
+{
+    if (max > s->current_digits)
+        max = s->current_digits;
+    if (max > 0)
+    {
+        memcpy(buf, s->digits, max);
+        memmove(s->digits, s->digits + max, s->current_digits - max);
+        s->current_digits -= max;
+    }
+    buf[max] = '\0';
+    return  max;
+}
+/*- End of function --------------------------------------------------------*/
+
+bell_mf_rx_state_t *bell_mf_rx_init(bell_mf_rx_state_t *s,
+                                    void (*callback)(void *user_data, const char *digits, int len),
+                                    void *user_data)
+{
+    int i;
+    static int initialised = FALSE;
+
+    if (!initialised)
+    {
+        for (i = 0;  i < 6;  i++)
+            make_goertzel_descriptor(&bell_mf_detect_desc[i], bell_mf_frequencies[i], 120);
+        initialised = TRUE;
+    }
+    s->callback = callback;
+    s->callback_data = user_data;
+
+    s->hits[0] = 
+    s->hits[1] =
+    s->hits[2] =
+    s->hits[3] = 
+    s->hits[4] = 0;
+
+    for (i = 0;  i < 6;  i++)
+        goertzel_init(&s->out[i], &bell_mf_detect_desc[i]);
+    s->current_sample = 0;
+    s->lost_digits = 0;
+    s->current_digits = 0;
+    s->digits[0] = '\0';
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int r2_mf_rx(r2_mf_rx_state_t *s, const int16_t amp[], int samples)
+{
+    float energy[6];
+    float famp;
+    float v1;
+    int i;
+    int j;
+    int sample;
+    int best;
+    int second_best;
+    int hit;
+    int hit_char;
+    int limit;
+
+    hit = 0;
+    hit_char = 0;
+    for (sample = 0;  sample < samples;  sample = limit)
+    {
+        if ((samples - sample) >= (s->samples - s->current_sample))
+            limit = sample + (s->samples - s->current_sample);
+        else
+            limit = samples;
+        for (j = sample;  j < limit;  j++)
+        {
+            famp = amp[j];
+    
+            /* With GCC 2.95, the following unrolled code seems to take about 35%
+               (rough estimate) as long as a neat little 0-5 loop */
+            v1 = s->out[0].v2;
+            s->out[0].v2 = s->out[0].v3;
+            s->out[0].v3 = s->out[0].fac*s->out[0].v2 - v1 + famp;
+    
+            v1 = s->out[1].v2;
+            s->out[1].v2 = s->out[1].v3;
+            s->out[1].v3 = s->out[1].fac*s->out[1].v2 - v1 + famp;
+    
+            v1 = s->out[2].v2;
+            s->out[2].v2 = s->out[2].v3;
+            s->out[2].v3 = s->out[2].fac*s->out[2].v2 - v1 + famp;
+    
+            v1 = s->out[3].v2;
+            s->out[3].v2 = s->out[3].v3;
+            s->out[3].v3 = s->out[3].fac*s->out[3].v2 - v1 + famp;
+    
+            v1 = s->out[4].v2;
+            s->out[4].v2 = s->out[4].v3;
+            s->out[4].v3 = s->out[4].fac*s->out[4].v2 - v1 + famp;
+    
+            v1 = s->out[5].v2;
+            s->out[5].v2 = s->out[5].v3;
+            s->out[5].v3 = s->out[5].fac*s->out[5].v2 - v1 + famp;
+        }
+        s->current_sample += (limit - sample);
+        if (s->current_sample < s->samples)
+            continue;
+
+        /* We are at the end of an MF detection block */
+        /* Find the two highest energies */
+        energy[0] = goertzel_result(&s->out[0]);
+        energy[1] = goertzel_result(&s->out[1]);
+        if (energy[0] > energy[1])
+        {
+            best = 0;
+            second_best = 1;
+        }
+        else
+        {
+            best = 1;
+            second_best = 0;
+        }
+        
+        for (i = 2;  i < 6;  i++)
+        {
+            energy[i] = goertzel_result(&s->out[i]);
+            if (energy[i] >= energy[best])
+            {
+                second_best = best;
+                best = i;
+            }
+            else if (energy[i] >= energy[second_best])
+            {
+                second_best = i;
+            }
+        }
+        /* Basic signal level and twist tests */
+        hit = FALSE;
+        if (energy[best] >= R2_MF_THRESHOLD
+            &&
+            energy[second_best] >= R2_MF_THRESHOLD
+            &&
+            energy[best] < energy[second_best]*R2_MF_TWIST
+            &&
+            energy[best]*R2_MF_TWIST > energy[second_best])
+        {
+            /* Relative peak test */
+            hit = TRUE;
+            for (i = 0;  i < 6;  i++)
+            {
+                if (i != best  &&  i != second_best)
+                {
+                    if (energy[i]*R2_MF_RELATIVE_PEAK >= energy[second_best])
+                    {
+                        /* The best two are not clearly the best */
+                        hit = FALSE;
+                        break;
+                    }
+                }
+            }
+        }
+        if (hit)
+        {
+            /* Get the values into ascending order */
+            if (second_best < best)
+            {
+                i = best;
+                best = second_best;
+                second_best = i;
+            }
+            best = best*5 + second_best - 1;
+            hit_char = r2_mf_positions[best];
+        }
+        else
+        {
+            hit_char = 0;
+        }
+
+        /* Reinitialise the detector for the next block */
+        if (s->fwd)
+        {
+            for (i = 0;  i < 6;  i++)
+                goertzel_reset(&s->out[i]);
+        }
+        else
+        {
+            for (i = 0;  i < 6;  i++)
+                goertzel_reset(&s->out[i]);
+        }
+        s->current_sample = 0;
+    }
+    return hit_char;
+}
+/*- End of function --------------------------------------------------------*/
+
+r2_mf_rx_state_t *r2_mf_rx_init(r2_mf_rx_state_t *s, int fwd)
+{
+    int i;
+    static int initialised = FALSE;
+
+    s->fwd = fwd;
+
+    if (!initialised)
+    {
+        for (i = 0;  i < 6;  i++)
+        {
+            make_goertzel_descriptor(&mf_fwd_detect_desc[i], r2_mf_fwd_frequencies[i], 133);
+            make_goertzel_descriptor(&mf_back_detect_desc[i], r2_mf_back_frequencies[i], 133);
+        }
+        initialised = TRUE;
+    }
+    if (fwd)
+    {
+        for (i = 0;  i < 6;  i++)
+            goertzel_init(&s->out[i], &mf_fwd_detect_desc[i]);
+    }
+    else
+    {
+        for (i = 0;  i < 6;  i++)
+            goertzel_init(&s->out[i], &mf_back_detect_desc[i]);
+    }
+    s->samples = 133;
+    s->current_sample = 0;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/bert.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,460 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bert.c - Bit error rate tests.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bert.c,v 1.21 2006/11/19 14:07:24 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <time.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/async.h"
+#include "spandsp/bert.h"
+
+static const char *qbf = "VoyeZ Le BricK GeanT QuE J'ExaminE PreS Du WharF 123 456 7890 + - * : = $ % ( )"
+                         "ThE QuicK BrowN FoX JumpS OveR ThE LazY DoG 123 456 7890 + - * : = $ % ( )";
+
+int bert_get_bit(bert_state_t *s)
+{
+    int bit;
+
+    if (s->limit  &&  s->tx_bits >= s->limit)
+        return PUTBIT_END_OF_DATA;
+    bit = 0;
+    switch (s->pattern_class)
+    {
+    case 0:
+        bit = s->tx_reg & 1;
+        s->tx_reg = (s->tx_reg >> 1) | ((s->tx_reg & 1) << s->shift2);
+        break;
+    case 1:
+        bit = s->tx_reg & 1;
+        s->tx_reg = (s->tx_reg >> 1) | (((s->tx_reg ^ (s->tx_reg >> s->shift)) & 1) << s->shift2);
+        if (s->max_zeros)
+        {
+            /* This generator suppresses runs >s->max_zeros */
+            if (bit)
+            {
+                if (++s->tx_zeros > s->max_zeros)
+                {
+                    s->tx_zeros = 0;
+                    bit ^= 1;
+                }
+            }
+            else
+            {
+                s->tx_zeros = 0;
+            }
+        }
+        bit ^= s->invert;
+        break;
+    case 2:
+        if (s->tx_step_bit == 0)
+        {
+            s->tx_step_bit = 7;
+            s->tx_reg = qbf[s->tx_step++];
+            if (s->tx_reg == 0)
+            {
+                s->tx_reg = 'V';
+                s->tx_step = 1;
+            }
+        }
+        bit = s->tx_reg & 1;
+        s->tx_reg >>= 1;
+        s->tx_step_bit--;
+        break;
+    }
+    s->tx_bits++;
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+void bert_put_bit(bert_state_t *s, int bit)
+{
+    int i;
+    int j;
+    int sum;
+    int test;
+
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Training succeeded\n");
+            break;
+        case PUTBIT_CARRIER_UP:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Carrier down\n");
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Eh!\n");
+            break;
+        }
+        return;
+    }
+    bit = (bit & 1) ^ s->invert;
+    s->rx_bits++;
+    switch (s->pattern_class)
+    {
+    case 0:
+        if (s->resync)
+        {
+            s->rx_reg = (s->rx_reg >> 1) | (bit << s->shift2);
+            s->ref_reg = (s->ref_reg >> 1) | ((s->ref_reg & 1) << s->shift2);
+            if (s->rx_reg == s->ref_reg)
+            {
+                if (++s->resync > s->resync_time)
+                {
+                    s->resync = 0;
+                    if (s->reporter)
+                        s->reporter(s->user_data, BERT_REPORT_SYNCED, &s->results);
+                }
+            }
+            else
+            {
+                s->resync = 2;
+                s->ref_reg = s->master_reg;
+            }
+        }
+        else
+        {
+            s->results.total_bits++;
+            if ((bit ^ s->ref_reg) & 1)
+                s->results.bad_bits++;
+            s->ref_reg = (s->ref_reg >> 1) | ((s->ref_reg & 1) << s->shift2);
+        }
+        break;
+    case 1:
+        if (s->resync)
+        {
+            /* If we get a reasonable period for which we correctly predict the
+               next bit, we must be in sync. */
+            /* Don't worry about max. zeros tests when resyncing.
+               It might just extend the resync time a little. Trying
+               to include the test might affect robustness. */
+            if (bit == (int) ((s->rx_reg >> s->shift) & 1))
+            {
+                if (++s->resync > s->resync_time)
+                {
+                    s->resync = 0;
+                    if (s->reporter)
+                        s->reporter(s->user_data, BERT_REPORT_SYNCED, &s->results);
+                }
+            }
+            else
+            {
+                s->resync = 2;
+                s->rx_reg ^= s->mask;
+            }
+        }
+        else
+        {
+            if (s->max_zeros)
+            {
+                if ((s->rx_reg & s->mask))
+                {
+                    if (++s->rx_zeros > s->max_zeros)
+                    {
+                        s->rx_zeros = 0;
+                        bit ^= 1;
+                    }
+                }
+                else
+                {
+                    s->rx_zeros = 0;
+                }
+            }
+            s->results.total_bits++;
+            if (bit != (int) ((s->rx_reg >> s->shift) & 1))
+            {
+                s->results.bad_bits++;
+                s->resync_bad_bits++;
+                s->decade_bad[2][s->decade_ptr[2]]++;
+            }
+            if (--s->step <= 0)
+            {
+                s->step = 100;
+                test = TRUE;
+                for (i = 2;  i <= 7;  i++)
+                {
+                    if (++s->decade_ptr[i] < 10)
+                        break;
+                    s->decade_ptr[i] = 0;
+                    for (sum = 0, j = 0;  j < 10;  j++)
+                        sum += s->decade_bad[i][j];
+                    if (test  &&  sum > 10)
+                    {
+                        test = FALSE;
+                        if (s->error_rate != i  &&  s->reporter)
+                            s->reporter(s->user_data, BERT_REPORT_GT_10_2 + i - 2, &s->results);
+                        s->error_rate = i;
+                    }
+                    s->decade_bad[i][0] = 0;
+                    if (i < 7)
+                        s->decade_bad[i + 1][s->decade_ptr[i + 1]] = sum;
+                }
+                if (i > 7)
+                {
+                    if (s->decade_ptr[i] >= 10)
+                        s->decade_ptr[i] = 0;
+                    if (test)
+                    {
+                        if (s->error_rate != i  &&  s->reporter)
+                            s->reporter(s->user_data, BERT_REPORT_GT_10_2 + i - 2, &s->results);
+                        s->error_rate = i;
+                    }
+                }
+                else
+                {
+                    s->decade_bad[i][s->decade_ptr[i]] = 0;
+                }
+            }
+            if (--s->resync_cnt <= 0)
+            {
+                /* Check if there were enough bad bits during this period to
+                   justify a resync. */
+                if (s->resync_bad_bits >= (s->resync_len*s->resync_percent)/100)
+                {
+                    s->resync = 1;
+                    s->results.resyncs++;
+                    if (s->reporter)
+                        s->reporter(s->user_data, BERT_REPORT_UNSYNCED, &s->results);
+                }
+                s->resync_cnt = s->resync_len;
+                s->resync_bad_bits = 0;
+            }
+        }
+        s->rx_reg = (s->rx_reg >> 1) | (((s->rx_reg ^ (s->rx_reg >> s->shift)) & 1) << s->shift2);
+        break;
+    case 2:
+        s->rx_reg = (s->rx_reg >> 1) | (bit << 6);
+        /* TODO: There is no mechanism for synching yet. This only works if things start in sync. */
+        if (++s->rx_step_bit == 7)
+        {
+            s->rx_step_bit = 0;
+            if ((int) s->rx_reg != qbf[s->rx_step])
+            {
+                /* We need to work out the number of actual bad bits here. We need to look at the
+                   error rate, and see it a resync is needed. etc. */
+                s->results.bad_bits++;
+            }
+            if (qbf[++s->rx_step] == '\0')
+                s->rx_step = 0;
+        }
+        s->results.total_bits++;
+        break;
+    }
+    if (s->report_frequency > 0)
+    {
+        if (--s->report_countdown <= 0)
+        {
+            if (s->reporter)
+                s->reporter(s->user_data, BERT_REPORT_REGULAR, &s->results);
+            s->report_countdown = s->report_frequency;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int bert_result(bert_state_t *s, bert_results_t *results)
+{
+    results->total_bits = s->results.total_bits;
+    results->bad_bits = s->results.bad_bits;
+    results->resyncs = s->results.resyncs;
+    return sizeof(*results);
+}
+/*- End of function --------------------------------------------------------*/
+
+void bert_set_report(bert_state_t *s, int freq, bert_report_func_t reporter, void *user_data)
+{
+    s->report_frequency = freq;
+    s->reporter = reporter;
+    s->user_data = user_data;
+    
+    s->report_countdown = s->report_frequency;
+}
+/*- End of function --------------------------------------------------------*/
+
+bert_state_t *bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent)
+{
+    int i;
+    int j;
+
+    memset(s, 0, sizeof(*s));
+
+    s->pattern = pattern;
+    s->limit = limit;
+    s->reporter = NULL;
+    s->user_data = NULL;
+    s->report_frequency = 0;
+
+    s->resync_time = 72;
+    s->invert = 0;
+    switch (s->pattern)
+    {
+    case BERT_PATTERN_ZEROS:
+        s->tx_reg = 0;
+        s->shift2 = 31;
+        s->pattern_class = 0;
+        break;
+    case BERT_PATTERN_ONES:
+        s->tx_reg = ~((uint32_t) 0);
+        s->shift2 = 31;
+        s->pattern_class = 0;
+        break;
+    case BERT_PATTERN_7_TO_1:
+        s->tx_reg = 0xFEFEFEFE;
+        s->shift2 = 31;
+        s->pattern_class = 0;
+        break;
+    case BERT_PATTERN_3_TO_1:
+        s->tx_reg = 0xEEEEEEEE;
+        s->shift2 = 31;
+        s->pattern_class = 0;
+        break;
+    case BERT_PATTERN_1_TO_1:
+        s->tx_reg = 0xAAAAAAAA;
+        s->shift2 = 31;
+        s->pattern_class = 0;
+        break;
+    case BERT_PATTERN_1_TO_3:
+        s->tx_reg = 0x11111111;
+        s->shift2 = 31;
+        s->pattern_class = 0;
+        break;
+    case BERT_PATTERN_1_TO_7:
+        s->tx_reg = 0x01010101;
+        s->shift2 = 31;
+        s->pattern_class = 0;
+        break;
+    case BERT_PATTERN_QBF:
+        s->tx_reg = 0;
+        s->pattern_class = 2;
+        break;
+    case BERT_PATTERN_ITU_O151_23:
+        s->pattern_class = 1;
+        s->tx_reg = 0x7FFFFF;
+        s->mask = 0x20;
+        s->shift = 5;
+        s->shift2 = 22;
+        s->invert = 1;
+        s->resync_time = 56;
+        s->max_zeros = 0;
+        break;
+    case BERT_PATTERN_ITU_O151_20:
+        s->pattern_class = 1;
+        s->tx_reg = 0xFFFFF;
+        s->mask = 0x8;
+        s->shift = 3;
+        s->shift2 = 19;
+        s->invert = 1;
+        s->resync_time = 50;
+        s->max_zeros = 14;
+        break;
+    case BERT_PATTERN_ITU_O151_15:
+        s->pattern_class = 1;
+        s->tx_reg = 0x7FFF;
+        s->mask = 0x2;
+        s->shift = 1;
+        s->shift2 = 14;
+        s->invert = 1;
+        s->resync_time = 40;
+        s->max_zeros = 0;
+        break;
+    case BERT_PATTERN_ITU_O152_11:
+        s->pattern_class = 1;
+        s->tx_reg = 0x7FF;
+        s->mask = 0x4;
+        s->shift = 2;
+        s->shift2 = 10;
+        s->invert = 0;
+        s->resync_time = 32;
+        s->max_zeros = 0;
+        break;
+    case BERT_PATTERN_ITU_O153_9:
+        s->pattern_class = 1;
+        s->tx_reg = 0x1FF;
+        s->mask = 0x10;
+        s->shift = 4;
+        s->shift2 = 8;
+        s->invert = 0;
+        s->resync_time = 28;
+        s->max_zeros = 0;
+        break;
+    }
+    s->tx_bits = 0;
+    s->tx_step = 0;
+    s->tx_step_bit = 0;
+    s->tx_zeros = 0;
+
+    s->rx_reg = s->tx_reg;
+    s->ref_reg = s->rx_reg;
+    s->master_reg = s->ref_reg;
+    s->rx_bits = 0;
+    s->rx_step = 0;
+    s->rx_step_bit = 0;
+
+    s->resync = 1;
+    s->resync_cnt = resync_len;
+    s->resync_bad_bits = 0;
+    s->resync_len = resync_len;
+    s->resync_percent = resync_percent;
+    s->results.total_bits = 0;
+    s->results.bad_bits = 0;
+    s->results.resyncs = 0;
+
+    s->report_countdown = 0;
+
+    for (i = 0;  i < 8;  i++)
+    {
+        for (j = 0;  j < 10;  j++)
+            s->decade_bad[i][j] = 0;
+        s->decade_ptr[i] = 0;
+    }
+    s->error_rate = 8;
+    s->step = 100;
+    
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "BERT");
+
+    return  s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/bit_operations.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,112 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bit_operations.c - Various bit level operations, such as bit reversal
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bit_operations.c,v 1.5 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <string.h>
+#include <assert.h>
+#include <memory.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/bit_operations.h"
+
+uint16_t bit_reverse16(uint16_t x)
+{
+    x = (x >> 8) | (x << 8);
+    x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4);
+    x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2);
+    return ((x & 0xAAAA) >> 1) | ((x & 0x5555) << 1);
+}
+/*- End of function --------------------------------------------------------*/
+
+uint32_t bit_reverse32(uint32_t x)
+{
+    x = (x >> 16) | (x << 16);
+    x = ((x & 0xFF00FF00) >> 8) | ((x & 0x00FF00FF) << 8);
+    x = ((x & 0xF0F0F0F0) >> 4) | ((x & 0x0F0F0F0F) << 4);
+    x = ((x & 0xCCCCCCCC) >> 2) | ((x & 0x33333333) << 2);
+    return ((x & 0xAAAAAAAA) >> 1) | ((x & 0x55555555) << 1);
+}
+/*- End of function --------------------------------------------------------*/
+
+uint32_t bit_reverse_4bytes(uint32_t x)
+{
+    x = (x >> 4) | (x << 4);
+    x = ((x & 0xCCCCCCCC) >> 2) | ((x & 0x33333333) << 2);
+    return ((x & 0xAAAAAAAA) >> 1) | ((x & 0x55555555) << 1);
+}
+/*- End of function --------------------------------------------------------*/
+
+int one_bits32(uint32_t x)
+{
+    x = x - ((x >> 1) & 0x55555555);
+    /* We now have 16 2-bit counts */
+    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
+    /* We now have 8 4-bit counts */
+    x = (x + (x >> 4)) & 0x0F0F0F0F;
+    /* We now have 4 8-bit counts */
+#if defined(__i386__)  ||  defined(__x86_64__)
+    /* If multiply is fast */
+    return (x*0x01010101) >> 24;
+#else
+    /* If multiply is slow */
+    x += (x >> 8);
+    x += (x >> 16);
+    return (x & 0x0000003F);
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+uint32_t make_mask32(uint32_t x)
+{
+    x |= (x >> 1);
+    x |= (x >> 2);
+    x |= (x >> 4);
+    x |= (x >> 8);
+    x |= (x >> 16);
+    return x;
+}
+/*- End of function --------------------------------------------------------*/
+
+uint16_t make_mask16(uint16_t x)
+{
+    x |= (x >> 1);
+    x |= (x >> 2);
+    x |= (x >> 4);
+    x |= (x >> 8);
+    return x;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/bitstream.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,136 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bitstream.c - Bitstream composition and decomposition routines.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bitstream.c,v 1.6 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/bitstream.h"
+
+void bitstream_put(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits)
+{
+    value &= ((1 << bits) - 1);
+    if (s->residue + bits <= 32)
+    {
+        s->bitstream |= (value << s->residue);
+        s->residue += bits;
+    }
+    while (s->residue >= 8)
+    {
+        s->residue -= 8;
+        *(*c)++ = (uint8_t)(s->bitstream & 0xFF);
+        s->bitstream >>= 8;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void bitstream_flush(bitstream_state_t *s, uint8_t **c)
+{
+    if (s->residue > 0)
+    {
+        *(*c)++ = (uint8_t)((s->bitstream << (8 - s->residue)) & 0xFF);
+        s->residue = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+unsigned int bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
+{
+    unsigned int x;
+
+    while (s->residue < bits)
+    {
+        x = (unsigned int) *(*c)++;
+        s->bitstream |= (x << s->residue);
+        s->residue += 8;
+    }
+    s->residue -= bits;
+    x = s->bitstream & ((1 << bits) - 1);
+    s->bitstream >>= bits;
+    return x;
+}
+/*- End of function --------------------------------------------------------*/
+
+void bitstream_put2(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits)
+{
+    value &= ((1 << bits) - 1);
+    if (s->residue + bits <= 32)
+    {
+        s->bitstream = (s->bitstream << bits) | value;
+        s->residue += bits;
+    }
+    while (s->residue >= 8)
+    {
+        s->residue -= 8;
+        *(*c)++ = (uint8_t) ((s->bitstream >> s->residue) & 0xFF);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void bitstream_flush2(bitstream_state_t *s, uint8_t **c)
+{
+    if (s->residue > 0)
+    {
+        *(*c)++ = (uint8_t) ((s->bitstream << (8 - s->residue)) & 0xFF);
+        s->residue = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+unsigned int bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits)
+{
+    unsigned int x;
+
+    while (s->residue < bits)
+    {
+        x = (unsigned int) *(*c)++;
+        s->bitstream = (s->bitstream << 8) | x;
+        s->residue += 8;
+    }
+    s->residue -= bits;
+    x = (s->bitstream >> s->residue) & ((1 << bits) - 1);
+    return x;
+}
+/*- End of function --------------------------------------------------------*/
+
+bitstream_state_t *bitstream_init(bitstream_state_t *s)
+{
+    if (s)
+        memset(s, 0, sizeof(*s));
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/complex_dds.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,2173 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * complex_dds.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: complex_dds.c,v 1.19 2006/11/28 16:59:56 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/complex.h"
+#include "spandsp/dds.h"
+
+#define SLENK	    11
+#define SINELEN     (1 << SLENK)
+
+/* Precreating this table allows it to be in const memory, which might
+   have some performance advantage. */
+static const float sine_table[SINELEN] =
+{
+     0.00000000f,
+     0.00306796f,
+     0.00613588f,
+     0.00920375f,
+     0.01227154f,
+     0.01533921f,
+     0.01840673f,
+     0.02147408f,
+     0.02454123f,
+     0.02760815f,
+     0.03067480f,
+     0.03374117f,
+     0.03680722f,
+     0.03987293f,
+     0.04293826f,
+     0.04600318f,
+     0.04906767f,
+     0.05213170f,
+     0.05519524f,
+     0.05825826f,
+     0.06132074f,
+     0.06438263f,
+     0.06744392f,
+     0.07050457f,
+     0.07356456f,
+     0.07662386f,
+     0.07968244f,
+     0.08274026f,
+     0.08579731f,
+     0.08885355f,
+     0.09190896f,
+     0.09496350f,
+     0.09801714f,
+     0.10106986f,
+     0.10412163f,
+     0.10717242f,
+     0.11022221f,
+     0.11327095f,
+     0.11631863f,
+     0.11936521f,
+     0.12241068f,
+     0.12545498f,
+     0.12849811f,
+     0.13154003f,
+     0.13458071f,
+     0.13762012f,
+     0.14065824f,
+     0.14369503f,
+     0.14673047f,
+     0.14976453f,
+     0.15279719f,
+     0.15582840f,
+     0.15885814f,
+     0.16188639f,
+     0.16491312f,
+     0.16793829f,
+     0.17096189f,
+     0.17398387f,
+     0.17700422f,
+     0.18002290f,
+     0.18303989f,
+     0.18605515f,
+     0.18906866f,
+     0.19208040f,
+     0.19509032f,
+     0.19809841f,
+     0.20110463f,
+     0.20410897f,
+     0.20711138f,
+     0.21011184f,
+     0.21311032f,
+     0.21610680f,
+     0.21910124f,
+     0.22209362f,
+     0.22508391f,
+     0.22807208f,
+     0.23105811f,
+     0.23404196f,
+     0.23702361f,
+     0.24000302f,
+     0.24298018f,
+     0.24595505f,
+     0.24892761f,
+     0.25189782f,
+     0.25486566f,
+     0.25783110f,
+     0.26079412f,
+     0.26375468f,
+     0.26671276f,
+     0.26966833f,
+     0.27262136f,
+     0.27557182f,
+     0.27851969f,
+     0.28146494f,
+     0.28440754f,
+     0.28734746f,
+     0.29028468f,
+     0.29321916f,
+     0.29615089f,
+     0.29907983f,
+     0.30200595f,
+     0.30492923f,
+     0.30784964f,
+     0.31076715f,
+     0.31368174f,
+     0.31659338f,
+     0.31950203f,
+     0.32240768f,
+     0.32531029f,
+     0.32820984f,
+     0.33110631f,
+     0.33399965f,
+     0.33688985f,
+     0.33977688f,
+     0.34266072f,
+     0.34554132f,
+     0.34841868f,
+     0.35129276f,
+     0.35416353f,
+     0.35703096f,
+     0.35989504f,
+     0.36275572f,
+     0.36561300f,
+     0.36846683f,
+     0.37131719f,
+     0.37416406f,
+     0.37700741f,
+     0.37984721f,
+     0.38268343f,
+     0.38551605f,
+     0.38834505f,
+     0.39117038f,
+     0.39399204f,
+     0.39680999f,
+     0.39962420f,
+     0.40243465f,
+     0.40524131f,
+     0.40804416f,
+     0.41084317f,
+     0.41363831f,
+     0.41642956f,
+     0.41921689f,
+     0.42200027f,
+     0.42477968f,
+     0.42755509f,
+     0.43032648f,
+     0.43309382f,
+     0.43585708f,
+     0.43861624f,
+     0.44137127f,
+     0.44412214f,
+     0.44686884f,
+     0.44961133f,
+     0.45234959f,
+     0.45508359f,
+     0.45781330f,
+     0.46053871f,
+     0.46325978f,
+     0.46597650f,
+     0.46868882f,
+     0.47139674f,
+     0.47410021f,
+     0.47679923f,
+     0.47949376f,
+     0.48218377f,
+     0.48486925f,
+     0.48755016f,
+     0.49022648f,
+     0.49289819f,
+     0.49556526f,
+     0.49822767f,
+     0.50088538f,
+     0.50353838f,
+     0.50618665f,
+     0.50883014f,
+     0.51146885f,
+     0.51410274f,
+     0.51673180f,
+     0.51935599f,
+     0.52197529f,
+     0.52458968f,
+     0.52719913f,
+     0.52980362f,
+     0.53240313f,
+     0.53499762f,
+     0.53758708f,
+     0.54017147f,
+     0.54275078f,
+     0.54532499f,
+     0.54789406f,
+     0.55045797f,
+     0.55301671f,
+     0.55557023f,
+     0.55811853f,
+     0.56066158f,
+     0.56319934f,
+     0.56573181f,
+     0.56825895f,
+     0.57078075f,
+     0.57329717f,
+     0.57580819f,
+     0.57831380f,
+     0.58081396f,
+     0.58330865f,
+     0.58579786f,
+     0.58828155f,
+     0.59075970f,
+     0.59323230f,
+     0.59569930f,
+     0.59816071f,
+     0.60061648f,
+     0.60306660f,
+     0.60551104f,
+     0.60794978f,
+     0.61038281f,
+     0.61281008f,
+     0.61523159f,
+     0.61764731f,
+     0.62005721f,
+     0.62246128f,
+     0.62485949f,
+     0.62725182f,
+     0.62963824f,
+     0.63201874f,
+     0.63439328f,
+     0.63676186f,
+     0.63912444f,
+     0.64148101f,
+     0.64383154f,
+     0.64617601f,
+     0.64851440f,
+     0.65084668f,
+     0.65317284f,
+     0.65549285f,
+     0.65780669f,
+     0.66011434f,
+     0.66241578f,
+     0.66471098f,
+     0.66699992f,
+     0.66928259f,
+     0.67155895f,
+     0.67382900f,
+     0.67609270f,
+     0.67835004f,
+     0.68060100f,
+     0.68284555f,
+     0.68508367f,
+     0.68731534f,
+     0.68954054f,
+     0.69175926f,
+     0.69397146f,
+     0.69617713f,
+     0.69837625f,
+     0.70056879f,
+     0.70275474f,
+     0.70493408f,
+     0.70710678f,
+     0.70927283f,
+     0.71143220f,
+     0.71358487f,
+     0.71573083f,
+     0.71787005f,
+     0.72000251f,
+     0.72212819f,
+     0.72424708f,
+     0.72635916f,
+     0.72846439f,
+     0.73056277f,
+     0.73265427f,
+     0.73473888f,
+     0.73681657f,
+     0.73888732f,
+     0.74095113f,
+     0.74300795f,
+     0.74505779f,
+     0.74710061f,
+     0.74913639f,
+     0.75116513f,
+     0.75318680f,
+     0.75520138f,
+     0.75720885f,
+     0.75920919f,
+     0.76120239f,
+     0.76318842f,
+     0.76516727f,
+     0.76713891f,
+     0.76910334f,
+     0.77106052f,
+     0.77301045f,
+     0.77495311f,
+     0.77688847f,
+     0.77881651f,
+     0.78073723f,
+     0.78265060f,
+     0.78455660f,
+     0.78645521f,
+     0.78834643f,
+     0.79023022f,
+     0.79210658f,
+     0.79397548f,
+     0.79583690f,
+     0.79769084f,
+     0.79953727f,
+     0.80137617f,
+     0.80320753f,
+     0.80503133f,
+     0.80684755f,
+     0.80865618f,
+     0.81045720f,
+     0.81225059f,
+     0.81403633f,
+     0.81581441f,
+     0.81758481f,
+     0.81934752f,
+     0.82110251f,
+     0.82284978f,
+     0.82458930f,
+     0.82632106f,
+     0.82804505f,
+     0.82976123f,
+     0.83146961f,
+     0.83317016f,
+     0.83486287f,
+     0.83654773f,
+     0.83822471f,
+     0.83989379f,
+     0.84155498f,
+     0.84320824f,
+     0.84485357f,
+     0.84649094f,
+     0.84812034f,
+     0.84974177f,
+     0.85135519f,
+     0.85296060f,
+     0.85455799f,
+     0.85614733f,
+     0.85772861f,
+     0.85930182f,
+     0.86086694f,
+     0.86242396f,
+     0.86397286f,
+     0.86551362f,
+     0.86704625f,
+     0.86857071f,
+     0.87008699f,
+     0.87159509f,
+     0.87309498f,
+     0.87458665f,
+     0.87607009f,
+     0.87754529f,
+     0.87901223f,
+     0.88047089f,
+     0.88192126f,
+     0.88336334f,
+     0.88479710f,
+     0.88622253f,
+     0.88763962f,
+     0.88904836f,
+     0.89044872f,
+     0.89184071f,
+     0.89322430f,
+     0.89459949f,
+     0.89596625f,
+     0.89732458f,
+     0.89867447f,
+     0.90001589f,
+     0.90134885f,
+     0.90267332f,
+     0.90398929f,
+     0.90529676f,
+     0.90659570f,
+     0.90788612f,
+     0.90916798f,
+     0.91044129f,
+     0.91170603f,
+     0.91296219f,
+     0.91420976f,
+     0.91544872f,
+     0.91667906f,
+     0.91790078f,
+     0.91911385f,
+     0.92031828f,
+     0.92151404f,
+     0.92270113f,
+     0.92387953f,
+     0.92504924f,
+     0.92621024f,
+     0.92736253f,
+     0.92850608f,
+     0.92964090f,
+     0.93076696f,
+     0.93188427f,
+     0.93299280f,
+     0.93409255f,
+     0.93518351f,
+     0.93626567f,
+     0.93733901f,
+     0.93840353f,
+     0.93945922f,
+     0.94050607f,
+     0.94154407f,
+     0.94257320f,
+     0.94359346f,
+     0.94460484f,
+     0.94560733f,
+     0.94660091f,
+     0.94758559f,
+     0.94856135f,
+     0.94952818f,
+     0.95048607f,
+     0.95143502f,
+     0.95237501f,
+     0.95330604f,
+     0.95422810f,
+     0.95514117f,
+     0.95604525f,
+     0.95694034f,
+     0.95782641f,
+     0.95870347f,
+     0.95957151f,
+     0.96043052f,
+     0.96128049f,
+     0.96212140f,
+     0.96295327f,
+     0.96377607f,
+     0.96458979f,
+     0.96539444f,
+     0.96619000f,
+     0.96697647f,
+     0.96775384f,
+     0.96852209f,
+     0.96928124f,
+     0.97003125f,
+     0.97077214f,
+     0.97150389f,
+     0.97222650f,
+     0.97293995f,
+     0.97364425f,
+     0.97433938f,
+     0.97502535f,
+     0.97570213f,
+     0.97636973f,
+     0.97702814f,
+     0.97767736f,
+     0.97831737f,
+     0.97894818f,
+     0.97956977f,
+     0.98018214f,
+     0.98078528f,
+     0.98137919f,
+     0.98196387f,
+     0.98253930f,
+     0.98310549f,
+     0.98366242f,
+     0.98421009f,
+     0.98474850f,
+     0.98527764f,
+     0.98579751f,
+     0.98630810f,
+     0.98680940f,
+     0.98730142f,
+     0.98778414f,
+     0.98825757f,
+     0.98872169f,
+     0.98917651f,
+     0.98962202f,
+     0.99005821f,
+     0.99048508f,
+     0.99090264f,
+     0.99131086f,
+     0.99170975f,
+     0.99209931f,
+     0.99247953f,
+     0.99285041f,
+     0.99321195f,
+     0.99356414f,
+     0.99390697f,
+     0.99424045f,
+     0.99456457f,
+     0.99487933f,
+     0.99518473f,
+     0.99548076f,
+     0.99576741f,
+     0.99604470f,
+     0.99631261f,
+     0.99657115f,
+     0.99682030f,
+     0.99706007f,
+     0.99729046f,
+     0.99751146f,
+     0.99772307f,
+     0.99792529f,
+     0.99811811f,
+     0.99830154f,
+     0.99847558f,
+     0.99864022f,
+     0.99879546f,
+     0.99894129f,
+     0.99907773f,
+     0.99920476f,
+     0.99932238f,
+     0.99943060f,
+     0.99952942f,
+     0.99961882f,
+     0.99969882f,
+     0.99976941f,
+     0.99983058f,
+     0.99988235f,
+     0.99992470f,
+     0.99995764f,
+     0.99998118f,
+     0.99999529f,
+     1.00000000f,
+     0.99999529f,
+     0.99998118f,
+     0.99995764f,
+     0.99992470f,
+     0.99988235f,
+     0.99983058f,
+     0.99976941f,
+     0.99969882f,
+     0.99961882f,
+     0.99952942f,
+     0.99943060f,
+     0.99932238f,
+     0.99920476f,
+     0.99907773f,
+     0.99894129f,
+     0.99879546f,
+     0.99864022f,
+     0.99847558f,
+     0.99830154f,
+     0.99811811f,
+     0.99792529f,
+     0.99772307f,
+     0.99751146f,
+     0.99729046f,
+     0.99706007f,
+     0.99682030f,
+     0.99657115f,
+     0.99631261f,
+     0.99604470f,
+     0.99576741f,
+     0.99548076f,
+     0.99518473f,
+     0.99487933f,
+     0.99456457f,
+     0.99424045f,
+     0.99390697f,
+     0.99356414f,
+     0.99321195f,
+     0.99285041f,
+     0.99247953f,
+     0.99209931f,
+     0.99170975f,
+     0.99131086f,
+     0.99090264f,
+     0.99048508f,
+     0.99005821f,
+     0.98962202f,
+     0.98917651f,
+     0.98872169f,
+     0.98825757f,
+     0.98778414f,
+     0.98730142f,
+     0.98680940f,
+     0.98630810f,
+     0.98579751f,
+     0.98527764f,
+     0.98474850f,
+     0.98421009f,
+     0.98366242f,
+     0.98310549f,
+     0.98253930f,
+     0.98196387f,
+     0.98137919f,
+     0.98078528f,
+     0.98018214f,
+     0.97956977f,
+     0.97894818f,
+     0.97831737f,
+     0.97767736f,
+     0.97702814f,
+     0.97636973f,
+     0.97570213f,
+     0.97502535f,
+     0.97433938f,
+     0.97364425f,
+     0.97293995f,
+     0.97222650f,
+     0.97150389f,
+     0.97077214f,
+     0.97003125f,
+     0.96928124f,
+     0.96852209f,
+     0.96775384f,
+     0.96697647f,
+     0.96619000f,
+     0.96539444f,
+     0.96458979f,
+     0.96377607f,
+     0.96295327f,
+     0.96212140f,
+     0.96128049f,
+     0.96043052f,
+     0.95957151f,
+     0.95870347f,
+     0.95782641f,
+     0.95694034f,
+     0.95604525f,
+     0.95514117f,
+     0.95422810f,
+     0.95330604f,
+     0.95237501f,
+     0.95143502f,
+     0.95048607f,
+     0.94952818f,
+     0.94856135f,
+     0.94758559f,
+     0.94660091f,
+     0.94560733f,
+     0.94460484f,
+     0.94359346f,
+     0.94257320f,
+     0.94154407f,
+     0.94050607f,
+     0.93945922f,
+     0.93840353f,
+     0.93733901f,
+     0.93626567f,
+     0.93518351f,
+     0.93409255f,
+     0.93299280f,
+     0.93188427f,
+     0.93076696f,
+     0.92964090f,
+     0.92850608f,
+     0.92736253f,
+     0.92621024f,
+     0.92504924f,
+     0.92387953f,
+     0.92270113f,
+     0.92151404f,
+     0.92031828f,
+     0.91911385f,
+     0.91790078f,
+     0.91667906f,
+     0.91544872f,
+     0.91420976f,
+     0.91296219f,
+     0.91170603f,
+     0.91044129f,
+     0.90916798f,
+     0.90788612f,
+     0.90659570f,
+     0.90529676f,
+     0.90398929f,
+     0.90267332f,
+     0.90134885f,
+     0.90001589f,
+     0.89867447f,
+     0.89732458f,
+     0.89596625f,
+     0.89459949f,
+     0.89322430f,
+     0.89184071f,
+     0.89044872f,
+     0.88904836f,
+     0.88763962f,
+     0.88622253f,
+     0.88479710f,
+     0.88336334f,
+     0.88192126f,
+     0.88047089f,
+     0.87901223f,
+     0.87754529f,
+     0.87607009f,
+     0.87458665f,
+     0.87309498f,
+     0.87159509f,
+     0.87008699f,
+     0.86857071f,
+     0.86704625f,
+     0.86551362f,
+     0.86397286f,
+     0.86242396f,
+     0.86086694f,
+     0.85930182f,
+     0.85772861f,
+     0.85614733f,
+     0.85455799f,
+     0.85296060f,
+     0.85135519f,
+     0.84974177f,
+     0.84812034f,
+     0.84649094f,
+     0.84485357f,
+     0.84320824f,
+     0.84155498f,
+     0.83989379f,
+     0.83822471f,
+     0.83654773f,
+     0.83486287f,
+     0.83317016f,
+     0.83146961f,
+     0.82976123f,
+     0.82804505f,
+     0.82632106f,
+     0.82458930f,
+     0.82284978f,
+     0.82110251f,
+     0.81934752f,
+     0.81758481f,
+     0.81581441f,
+     0.81403633f,
+     0.81225059f,
+     0.81045720f,
+     0.80865618f,
+     0.80684755f,
+     0.80503133f,
+     0.80320753f,
+     0.80137617f,
+     0.79953727f,
+     0.79769084f,
+     0.79583690f,
+     0.79397548f,
+     0.79210658f,
+     0.79023022f,
+     0.78834643f,
+     0.78645521f,
+     0.78455660f,
+     0.78265060f,
+     0.78073723f,
+     0.77881651f,
+     0.77688847f,
+     0.77495311f,
+     0.77301045f,
+     0.77106052f,
+     0.76910334f,
+     0.76713891f,
+     0.76516727f,
+     0.76318842f,
+     0.76120239f,
+     0.75920919f,
+     0.75720885f,
+     0.75520138f,
+     0.75318680f,
+     0.75116513f,
+     0.74913639f,
+     0.74710061f,
+     0.74505779f,
+     0.74300795f,
+     0.74095113f,
+     0.73888732f,
+     0.73681657f,
+     0.73473888f,
+     0.73265427f,
+     0.73056277f,
+     0.72846439f,
+     0.72635916f,
+     0.72424708f,
+     0.72212819f,
+     0.72000251f,
+     0.71787005f,
+     0.71573083f,
+     0.71358487f,
+     0.71143220f,
+     0.70927283f,
+     0.70710678f,
+     0.70493408f,
+     0.70275474f,
+     0.70056879f,
+     0.69837625f,
+     0.69617713f,
+     0.69397146f,
+     0.69175926f,
+     0.68954054f,
+     0.68731534f,
+     0.68508367f,
+     0.68284555f,
+     0.68060100f,
+     0.67835004f,
+     0.67609270f,
+     0.67382900f,
+     0.67155895f,
+     0.66928259f,
+     0.66699992f,
+     0.66471098f,
+     0.66241578f,
+     0.66011434f,
+     0.65780669f,
+     0.65549285f,
+     0.65317284f,
+     0.65084668f,
+     0.64851440f,
+     0.64617601f,
+     0.64383154f,
+     0.64148101f,
+     0.63912444f,
+     0.63676186f,
+     0.63439328f,
+     0.63201874f,
+     0.62963824f,
+     0.62725182f,
+     0.62485949f,
+     0.62246128f,
+     0.62005721f,
+     0.61764731f,
+     0.61523159f,
+     0.61281008f,
+     0.61038281f,
+     0.60794978f,
+     0.60551104f,
+     0.60306660f,
+     0.60061648f,
+     0.59816071f,
+     0.59569930f,
+     0.59323230f,
+     0.59075970f,
+     0.58828155f,
+     0.58579786f,
+     0.58330865f,
+     0.58081396f,
+     0.57831380f,
+     0.57580819f,
+     0.57329717f,
+     0.57078075f,
+     0.56825895f,
+     0.56573181f,
+     0.56319934f,
+     0.56066158f,
+     0.55811853f,
+     0.55557023f,
+     0.55301671f,
+     0.55045797f,
+     0.54789406f,
+     0.54532499f,
+     0.54275078f,
+     0.54017147f,
+     0.53758708f,
+     0.53499762f,
+     0.53240313f,
+     0.52980362f,
+     0.52719913f,
+     0.52458968f,
+     0.52197529f,
+     0.51935599f,
+     0.51673180f,
+     0.51410274f,
+     0.51146885f,
+     0.50883014f,
+     0.50618665f,
+     0.50353838f,
+     0.50088538f,
+     0.49822767f,
+     0.49556526f,
+     0.49289819f,
+     0.49022648f,
+     0.48755016f,
+     0.48486925f,
+     0.48218377f,
+     0.47949376f,
+     0.47679923f,
+     0.47410021f,
+     0.47139674f,
+     0.46868882f,
+     0.46597650f,
+     0.46325978f,
+     0.46053871f,
+     0.45781330f,
+     0.45508359f,
+     0.45234959f,
+     0.44961133f,
+     0.44686884f,
+     0.44412214f,
+     0.44137127f,
+     0.43861624f,
+     0.43585708f,
+     0.43309382f,
+     0.43032648f,
+     0.42755509f,
+     0.42477968f,
+     0.42200027f,
+     0.41921689f,
+     0.41642956f,
+     0.41363831f,
+     0.41084317f,
+     0.40804416f,
+     0.40524131f,
+     0.40243465f,
+     0.39962420f,
+     0.39680999f,
+     0.39399204f,
+     0.39117038f,
+     0.38834505f,
+     0.38551605f,
+     0.38268343f,
+     0.37984721f,
+     0.37700741f,
+     0.37416406f,
+     0.37131719f,
+     0.36846683f,
+     0.36561300f,
+     0.36275572f,
+     0.35989504f,
+     0.35703096f,
+     0.35416353f,
+     0.35129276f,
+     0.34841868f,
+     0.34554132f,
+     0.34266072f,
+     0.33977688f,
+     0.33688985f,
+     0.33399965f,
+     0.33110631f,
+     0.32820984f,
+     0.32531029f,
+     0.32240768f,
+     0.31950203f,
+     0.31659338f,
+     0.31368174f,
+     0.31076715f,
+     0.30784964f,
+     0.30492923f,
+     0.30200595f,
+     0.29907983f,
+     0.29615089f,
+     0.29321916f,
+     0.29028468f,
+     0.28734746f,
+     0.28440754f,
+     0.28146494f,
+     0.27851969f,
+     0.27557182f,
+     0.27262136f,
+     0.26966833f,
+     0.26671276f,
+     0.26375468f,
+     0.26079412f,
+     0.25783110f,
+     0.25486566f,
+     0.25189782f,
+     0.24892761f,
+     0.24595505f,
+     0.24298018f,
+     0.24000302f,
+     0.23702361f,
+     0.23404196f,
+     0.23105811f,
+     0.22807208f,
+     0.22508391f,
+     0.22209362f,
+     0.21910124f,
+     0.21610680f,
+     0.21311032f,
+     0.21011184f,
+     0.20711138f,
+     0.20410897f,
+     0.20110463f,
+     0.19809841f,
+     0.19509032f,
+     0.19208040f,
+     0.18906866f,
+     0.18605515f,
+     0.18303989f,
+     0.18002290f,
+     0.17700422f,
+     0.17398387f,
+     0.17096189f,
+     0.16793829f,
+     0.16491312f,
+     0.16188639f,
+     0.15885814f,
+     0.15582840f,
+     0.15279719f,
+     0.14976453f,
+     0.14673047f,
+     0.14369503f,
+     0.14065824f,
+     0.13762012f,
+     0.13458071f,
+     0.13154003f,
+     0.12849811f,
+     0.12545498f,
+     0.12241068f,
+     0.11936521f,
+     0.11631863f,
+     0.11327095f,
+     0.11022221f,
+     0.10717242f,
+     0.10412163f,
+     0.10106986f,
+     0.09801714f,
+     0.09496350f,
+     0.09190896f,
+     0.08885355f,
+     0.08579731f,
+     0.08274026f,
+     0.07968244f,
+     0.07662386f,
+     0.07356456f,
+     0.07050457f,
+     0.06744392f,
+     0.06438263f,
+     0.06132074f,
+     0.05825826f,
+     0.05519524f,
+     0.05213170f,
+     0.04906767f,
+     0.04600318f,
+     0.04293826f,
+     0.03987293f,
+     0.03680722f,
+     0.03374117f,
+     0.03067480f,
+     0.02760815f,
+     0.02454123f,
+     0.02147408f,
+     0.01840673f,
+     0.01533921f,
+     0.01227154f,
+     0.00920375f,
+     0.00613588f,
+     0.00306796f,
+     0.00000000f,
+    -0.00306796f,
+    -0.00613588f,
+    -0.00920375f,
+    -0.01227154f,
+    -0.01533921f,
+    -0.01840673f,
+    -0.02147408f,
+    -0.02454123f,
+    -0.02760815f,
+    -0.03067480f,
+    -0.03374117f,
+    -0.03680722f,
+    -0.03987293f,
+    -0.04293826f,
+    -0.04600318f,
+    -0.04906767f,
+    -0.05213170f,
+    -0.05519524f,
+    -0.05825826f,
+    -0.06132074f,
+    -0.06438263f,
+    -0.06744392f,
+    -0.07050457f,
+    -0.07356456f,
+    -0.07662386f,
+    -0.07968244f,
+    -0.08274026f,
+    -0.08579731f,
+    -0.08885355f,
+    -0.09190896f,
+    -0.09496350f,
+    -0.09801714f,
+    -0.10106986f,
+    -0.10412163f,
+    -0.10717242f,
+    -0.11022221f,
+    -0.11327095f,
+    -0.11631863f,
+    -0.11936521f,
+    -0.12241068f,
+    -0.12545498f,
+    -0.12849811f,
+    -0.13154003f,
+    -0.13458071f,
+    -0.13762012f,
+    -0.14065824f,
+    -0.14369503f,
+    -0.14673047f,
+    -0.14976453f,
+    -0.15279719f,
+    -0.15582840f,
+    -0.15885814f,
+    -0.16188639f,
+    -0.16491312f,
+    -0.16793829f,
+    -0.17096189f,
+    -0.17398387f,
+    -0.17700422f,
+    -0.18002290f,
+    -0.18303989f,
+    -0.18605515f,
+    -0.18906866f,
+    -0.19208040f,
+    -0.19509032f,
+    -0.19809841f,
+    -0.20110463f,
+    -0.20410897f,
+    -0.20711138f,
+    -0.21011184f,
+    -0.21311032f,
+    -0.21610680f,
+    -0.21910124f,
+    -0.22209362f,
+    -0.22508391f,
+    -0.22807208f,
+    -0.23105811f,
+    -0.23404196f,
+    -0.23702361f,
+    -0.24000302f,
+    -0.24298018f,
+    -0.24595505f,
+    -0.24892761f,
+    -0.25189782f,
+    -0.25486566f,
+    -0.25783110f,
+    -0.26079412f,
+    -0.26375468f,
+    -0.26671276f,
+    -0.26966833f,
+    -0.27262136f,
+    -0.27557182f,
+    -0.27851969f,
+    -0.28146494f,
+    -0.28440754f,
+    -0.28734746f,
+    -0.29028468f,
+    -0.29321916f,
+    -0.29615089f,
+    -0.29907983f,
+    -0.30200595f,
+    -0.30492923f,
+    -0.30784964f,
+    -0.31076715f,
+    -0.31368174f,
+    -0.31659338f,
+    -0.31950203f,
+    -0.32240768f,
+    -0.32531029f,
+    -0.32820984f,
+    -0.33110631f,
+    -0.33399965f,
+    -0.33688985f,
+    -0.33977688f,
+    -0.34266072f,
+    -0.34554132f,
+    -0.34841868f,
+    -0.35129276f,
+    -0.35416353f,
+    -0.35703096f,
+    -0.35989504f,
+    -0.36275572f,
+    -0.36561300f,
+    -0.36846683f,
+    -0.37131719f,
+    -0.37416406f,
+    -0.37700741f,
+    -0.37984721f,
+    -0.38268343f,
+    -0.38551605f,
+    -0.38834505f,
+    -0.39117038f,
+    -0.39399204f,
+    -0.39680999f,
+    -0.39962420f,
+    -0.40243465f,
+    -0.40524131f,
+    -0.40804416f,
+    -0.41084317f,
+    -0.41363831f,
+    -0.41642956f,
+    -0.41921689f,
+    -0.42200027f,
+    -0.42477968f,
+    -0.42755509f,
+    -0.43032648f,
+    -0.43309382f,
+    -0.43585708f,
+    -0.43861624f,
+    -0.44137127f,
+    -0.44412214f,
+    -0.44686884f,
+    -0.44961133f,
+    -0.45234959f,
+    -0.45508359f,
+    -0.45781330f,
+    -0.46053871f,
+    -0.46325978f,
+    -0.46597650f,
+    -0.46868882f,
+    -0.47139674f,
+    -0.47410021f,
+    -0.47679923f,
+    -0.47949376f,
+    -0.48218377f,
+    -0.48486925f,
+    -0.48755016f,
+    -0.49022648f,
+    -0.49289819f,
+    -0.49556526f,
+    -0.49822767f,
+    -0.50088538f,
+    -0.50353838f,
+    -0.50618665f,
+    -0.50883014f,
+    -0.51146885f,
+    -0.51410274f,
+    -0.51673180f,
+    -0.51935599f,
+    -0.52197529f,
+    -0.52458968f,
+    -0.52719913f,
+    -0.52980362f,
+    -0.53240313f,
+    -0.53499762f,
+    -0.53758708f,
+    -0.54017147f,
+    -0.54275078f,
+    -0.54532499f,
+    -0.54789406f,
+    -0.55045797f,
+    -0.55301671f,
+    -0.55557023f,
+    -0.55811853f,
+    -0.56066158f,
+    -0.56319934f,
+    -0.56573181f,
+    -0.56825895f,
+    -0.57078075f,
+    -0.57329717f,
+    -0.57580819f,
+    -0.57831380f,
+    -0.58081396f,
+    -0.58330865f,
+    -0.58579786f,
+    -0.58828155f,
+    -0.59075970f,
+    -0.59323230f,
+    -0.59569930f,
+    -0.59816071f,
+    -0.60061648f,
+    -0.60306660f,
+    -0.60551104f,
+    -0.60794978f,
+    -0.61038281f,
+    -0.61281008f,
+    -0.61523159f,
+    -0.61764731f,
+    -0.62005721f,
+    -0.62246128f,
+    -0.62485949f,
+    -0.62725182f,
+    -0.62963824f,
+    -0.63201874f,
+    -0.63439328f,
+    -0.63676186f,
+    -0.63912444f,
+    -0.64148101f,
+    -0.64383154f,
+    -0.64617601f,
+    -0.64851440f,
+    -0.65084668f,
+    -0.65317284f,
+    -0.65549285f,
+    -0.65780669f,
+    -0.66011434f,
+    -0.66241578f,
+    -0.66471098f,
+    -0.66699992f,
+    -0.66928259f,
+    -0.67155895f,
+    -0.67382900f,
+    -0.67609270f,
+    -0.67835004f,
+    -0.68060100f,
+    -0.68284555f,
+    -0.68508367f,
+    -0.68731534f,
+    -0.68954054f,
+    -0.69175926f,
+    -0.69397146f,
+    -0.69617713f,
+    -0.69837625f,
+    -0.70056879f,
+    -0.70275474f,
+    -0.70493408f,
+    -0.70710678f,
+    -0.70927283f,
+    -0.71143220f,
+    -0.71358487f,
+    -0.71573083f,
+    -0.71787005f,
+    -0.72000251f,
+    -0.72212819f,
+    -0.72424708f,
+    -0.72635916f,
+    -0.72846439f,
+    -0.73056277f,
+    -0.73265427f,
+    -0.73473888f,
+    -0.73681657f,
+    -0.73888732f,
+    -0.74095113f,
+    -0.74300795f,
+    -0.74505779f,
+    -0.74710061f,
+    -0.74913639f,
+    -0.75116513f,
+    -0.75318680f,
+    -0.75520138f,
+    -0.75720885f,
+    -0.75920919f,
+    -0.76120239f,
+    -0.76318842f,
+    -0.76516727f,
+    -0.76713891f,
+    -0.76910334f,
+    -0.77106052f,
+    -0.77301045f,
+    -0.77495311f,
+    -0.77688847f,
+    -0.77881651f,
+    -0.78073723f,
+    -0.78265060f,
+    -0.78455660f,
+    -0.78645521f,
+    -0.78834643f,
+    -0.79023022f,
+    -0.79210658f,
+    -0.79397548f,
+    -0.79583690f,
+    -0.79769084f,
+    -0.79953727f,
+    -0.80137617f,
+    -0.80320753f,
+    -0.80503133f,
+    -0.80684755f,
+    -0.80865618f,
+    -0.81045720f,
+    -0.81225059f,
+    -0.81403633f,
+    -0.81581441f,
+    -0.81758481f,
+    -0.81934752f,
+    -0.82110251f,
+    -0.82284978f,
+    -0.82458930f,
+    -0.82632106f,
+    -0.82804505f,
+    -0.82976123f,
+    -0.83146961f,
+    -0.83317016f,
+    -0.83486287f,
+    -0.83654773f,
+    -0.83822471f,
+    -0.83989379f,
+    -0.84155498f,
+    -0.84320824f,
+    -0.84485357f,
+    -0.84649094f,
+    -0.84812034f,
+    -0.84974177f,
+    -0.85135519f,
+    -0.85296060f,
+    -0.85455799f,
+    -0.85614733f,
+    -0.85772861f,
+    -0.85930182f,
+    -0.86086694f,
+    -0.86242396f,
+    -0.86397286f,
+    -0.86551362f,
+    -0.86704625f,
+    -0.86857071f,
+    -0.87008699f,
+    -0.87159509f,
+    -0.87309498f,
+    -0.87458665f,
+    -0.87607009f,
+    -0.87754529f,
+    -0.87901223f,
+    -0.88047089f,
+    -0.88192126f,
+    -0.88336334f,
+    -0.88479710f,
+    -0.88622253f,
+    -0.88763962f,
+    -0.88904836f,
+    -0.89044872f,
+    -0.89184071f,
+    -0.89322430f,
+    -0.89459949f,
+    -0.89596625f,
+    -0.89732458f,
+    -0.89867447f,
+    -0.90001589f,
+    -0.90134885f,
+    -0.90267332f,
+    -0.90398929f,
+    -0.90529676f,
+    -0.90659570f,
+    -0.90788612f,
+    -0.90916798f,
+    -0.91044129f,
+    -0.91170603f,
+    -0.91296219f,
+    -0.91420976f,
+    -0.91544872f,
+    -0.91667906f,
+    -0.91790078f,
+    -0.91911385f,
+    -0.92031828f,
+    -0.92151404f,
+    -0.92270113f,
+    -0.92387953f,
+    -0.92504924f,
+    -0.92621024f,
+    -0.92736253f,
+    -0.92850608f,
+    -0.92964090f,
+    -0.93076696f,
+    -0.93188427f,
+    -0.93299280f,
+    -0.93409255f,
+    -0.93518351f,
+    -0.93626567f,
+    -0.93733901f,
+    -0.93840353f,
+    -0.93945922f,
+    -0.94050607f,
+    -0.94154407f,
+    -0.94257320f,
+    -0.94359346f,
+    -0.94460484f,
+    -0.94560733f,
+    -0.94660091f,
+    -0.94758559f,
+    -0.94856135f,
+    -0.94952818f,
+    -0.95048607f,
+    -0.95143502f,
+    -0.95237501f,
+    -0.95330604f,
+    -0.95422810f,
+    -0.95514117f,
+    -0.95604525f,
+    -0.95694034f,
+    -0.95782641f,
+    -0.95870347f,
+    -0.95957151f,
+    -0.96043052f,
+    -0.96128049f,
+    -0.96212140f,
+    -0.96295327f,
+    -0.96377607f,
+    -0.96458979f,
+    -0.96539444f,
+    -0.96619000f,
+    -0.96697647f,
+    -0.96775384f,
+    -0.96852209f,
+    -0.96928124f,
+    -0.97003125f,
+    -0.97077214f,
+    -0.97150389f,
+    -0.97222650f,
+    -0.97293995f,
+    -0.97364425f,
+    -0.97433938f,
+    -0.97502535f,
+    -0.97570213f,
+    -0.97636973f,
+    -0.97702814f,
+    -0.97767736f,
+    -0.97831737f,
+    -0.97894818f,
+    -0.97956977f,
+    -0.98018214f,
+    -0.98078528f,
+    -0.98137919f,
+    -0.98196387f,
+    -0.98253930f,
+    -0.98310549f,
+    -0.98366242f,
+    -0.98421009f,
+    -0.98474850f,
+    -0.98527764f,
+    -0.98579751f,
+    -0.98630810f,
+    -0.98680940f,
+    -0.98730142f,
+    -0.98778414f,
+    -0.98825757f,
+    -0.98872169f,
+    -0.98917651f,
+    -0.98962202f,
+    -0.99005821f,
+    -0.99048508f,
+    -0.99090264f,
+    -0.99131086f,
+    -0.99170975f,
+    -0.99209931f,
+    -0.99247953f,
+    -0.99285041f,
+    -0.99321195f,
+    -0.99356414f,
+    -0.99390697f,
+    -0.99424045f,
+    -0.99456457f,
+    -0.99487933f,
+    -0.99518473f,
+    -0.99548076f,
+    -0.99576741f,
+    -0.99604470f,
+    -0.99631261f,
+    -0.99657115f,
+    -0.99682030f,
+    -0.99706007f,
+    -0.99729046f,
+    -0.99751146f,
+    -0.99772307f,
+    -0.99792529f,
+    -0.99811811f,
+    -0.99830154f,
+    -0.99847558f,
+    -0.99864022f,
+    -0.99879546f,
+    -0.99894129f,
+    -0.99907773f,
+    -0.99920476f,
+    -0.99932238f,
+    -0.99943060f,
+    -0.99952942f,
+    -0.99961882f,
+    -0.99969882f,
+    -0.99976941f,
+    -0.99983058f,
+    -0.99988235f,
+    -0.99992470f,
+    -0.99995764f,
+    -0.99998118f,
+    -0.99999529f,
+    -1.00000000f,
+    -0.99999529f,
+    -0.99998118f,
+    -0.99995764f,
+    -0.99992470f,
+    -0.99988235f,
+    -0.99983058f,
+    -0.99976941f,
+    -0.99969882f,
+    -0.99961882f,
+    -0.99952942f,
+    -0.99943060f,
+    -0.99932238f,
+    -0.99920476f,
+    -0.99907773f,
+    -0.99894129f,
+    -0.99879546f,
+    -0.99864022f,
+    -0.99847558f,
+    -0.99830154f,
+    -0.99811811f,
+    -0.99792529f,
+    -0.99772307f,
+    -0.99751146f,
+    -0.99729046f,
+    -0.99706007f,
+    -0.99682030f,
+    -0.99657115f,
+    -0.99631261f,
+    -0.99604470f,
+    -0.99576741f,
+    -0.99548076f,
+    -0.99518473f,
+    -0.99487933f,
+    -0.99456457f,
+    -0.99424045f,
+    -0.99390697f,
+    -0.99356414f,
+    -0.99321195f,
+    -0.99285041f,
+    -0.99247953f,
+    -0.99209931f,
+    -0.99170975f,
+    -0.99131086f,
+    -0.99090264f,
+    -0.99048508f,
+    -0.99005821f,
+    -0.98962202f,
+    -0.98917651f,
+    -0.98872169f,
+    -0.98825757f,
+    -0.98778414f,
+    -0.98730142f,
+    -0.98680940f,
+    -0.98630810f,
+    -0.98579751f,
+    -0.98527764f,
+    -0.98474850f,
+    -0.98421009f,
+    -0.98366242f,
+    -0.98310549f,
+    -0.98253930f,
+    -0.98196387f,
+    -0.98137919f,
+    -0.98078528f,
+    -0.98018214f,
+    -0.97956977f,
+    -0.97894818f,
+    -0.97831737f,
+    -0.97767736f,
+    -0.97702814f,
+    -0.97636973f,
+    -0.97570213f,
+    -0.97502535f,
+    -0.97433938f,
+    -0.97364425f,
+    -0.97293995f,
+    -0.97222650f,
+    -0.97150389f,
+    -0.97077214f,
+    -0.97003125f,
+    -0.96928124f,
+    -0.96852209f,
+    -0.96775384f,
+    -0.96697647f,
+    -0.96619000f,
+    -0.96539444f,
+    -0.96458979f,
+    -0.96377607f,
+    -0.96295327f,
+    -0.96212140f,
+    -0.96128049f,
+    -0.96043052f,
+    -0.95957151f,
+    -0.95870347f,
+    -0.95782641f,
+    -0.95694034f,
+    -0.95604525f,
+    -0.95514117f,
+    -0.95422810f,
+    -0.95330604f,
+    -0.95237501f,
+    -0.95143502f,
+    -0.95048607f,
+    -0.94952818f,
+    -0.94856135f,
+    -0.94758559f,
+    -0.94660091f,
+    -0.94560733f,
+    -0.94460484f,
+    -0.94359346f,
+    -0.94257320f,
+    -0.94154407f,
+    -0.94050607f,
+    -0.93945922f,
+    -0.93840353f,
+    -0.93733901f,
+    -0.93626567f,
+    -0.93518351f,
+    -0.93409255f,
+    -0.93299280f,
+    -0.93188427f,
+    -0.93076696f,
+    -0.92964090f,
+    -0.92850608f,
+    -0.92736253f,
+    -0.92621024f,
+    -0.92504924f,
+    -0.92387953f,
+    -0.92270113f,
+    -0.92151404f,
+    -0.92031828f,
+    -0.91911385f,
+    -0.91790078f,
+    -0.91667906f,
+    -0.91544872f,
+    -0.91420976f,
+    -0.91296219f,
+    -0.91170603f,
+    -0.91044129f,
+    -0.90916798f,
+    -0.90788612f,
+    -0.90659570f,
+    -0.90529676f,
+    -0.90398929f,
+    -0.90267332f,
+    -0.90134885f,
+    -0.90001589f,
+    -0.89867447f,
+    -0.89732458f,
+    -0.89596625f,
+    -0.89459949f,
+    -0.89322430f,
+    -0.89184071f,
+    -0.89044872f,
+    -0.88904836f,
+    -0.88763962f,
+    -0.88622253f,
+    -0.88479710f,
+    -0.88336334f,
+    -0.88192126f,
+    -0.88047089f,
+    -0.87901223f,
+    -0.87754529f,
+    -0.87607009f,
+    -0.87458665f,
+    -0.87309498f,
+    -0.87159509f,
+    -0.87008699f,
+    -0.86857071f,
+    -0.86704625f,
+    -0.86551362f,
+    -0.86397286f,
+    -0.86242396f,
+    -0.86086694f,
+    -0.85930182f,
+    -0.85772861f,
+    -0.85614733f,
+    -0.85455799f,
+    -0.85296060f,
+    -0.85135519f,
+    -0.84974177f,
+    -0.84812034f,
+    -0.84649094f,
+    -0.84485357f,
+    -0.84320824f,
+    -0.84155498f,
+    -0.83989379f,
+    -0.83822471f,
+    -0.83654773f,
+    -0.83486287f,
+    -0.83317016f,
+    -0.83146961f,
+    -0.82976123f,
+    -0.82804505f,
+    -0.82632106f,
+    -0.82458930f,
+    -0.82284978f,
+    -0.82110251f,
+    -0.81934752f,
+    -0.81758481f,
+    -0.81581441f,
+    -0.81403633f,
+    -0.81225059f,
+    -0.81045720f,
+    -0.80865618f,
+    -0.80684755f,
+    -0.80503133f,
+    -0.80320753f,
+    -0.80137617f,
+    -0.79953727f,
+    -0.79769084f,
+    -0.79583690f,
+    -0.79397548f,
+    -0.79210658f,
+    -0.79023022f,
+    -0.78834643f,
+    -0.78645521f,
+    -0.78455660f,
+    -0.78265060f,
+    -0.78073723f,
+    -0.77881651f,
+    -0.77688847f,
+    -0.77495311f,
+    -0.77301045f,
+    -0.77106052f,
+    -0.76910334f,
+    -0.76713891f,
+    -0.76516727f,
+    -0.76318842f,
+    -0.76120239f,
+    -0.75920919f,
+    -0.75720885f,
+    -0.75520138f,
+    -0.75318680f,
+    -0.75116513f,
+    -0.74913639f,
+    -0.74710061f,
+    -0.74505779f,
+    -0.74300795f,
+    -0.74095113f,
+    -0.73888732f,
+    -0.73681657f,
+    -0.73473888f,
+    -0.73265427f,
+    -0.73056277f,
+    -0.72846439f,
+    -0.72635916f,
+    -0.72424708f,
+    -0.72212819f,
+    -0.72000251f,
+    -0.71787005f,
+    -0.71573083f,
+    -0.71358487f,
+    -0.71143220f,
+    -0.70927283f,
+    -0.70710678f,
+    -0.70493408f,
+    -0.70275474f,
+    -0.70056879f,
+    -0.69837625f,
+    -0.69617713f,
+    -0.69397146f,
+    -0.69175926f,
+    -0.68954054f,
+    -0.68731534f,
+    -0.68508367f,
+    -0.68284555f,
+    -0.68060100f,
+    -0.67835004f,
+    -0.67609270f,
+    -0.67382900f,
+    -0.67155895f,
+    -0.66928259f,
+    -0.66699992f,
+    -0.66471098f,
+    -0.66241578f,
+    -0.66011434f,
+    -0.65780669f,
+    -0.65549285f,
+    -0.65317284f,
+    -0.65084668f,
+    -0.64851440f,
+    -0.64617601f,
+    -0.64383154f,
+    -0.64148101f,
+    -0.63912444f,
+    -0.63676186f,
+    -0.63439328f,
+    -0.63201874f,
+    -0.62963824f,
+    -0.62725182f,
+    -0.62485949f,
+    -0.62246128f,
+    -0.62005721f,
+    -0.61764731f,
+    -0.61523159f,
+    -0.61281008f,
+    -0.61038281f,
+    -0.60794978f,
+    -0.60551104f,
+    -0.60306660f,
+    -0.60061648f,
+    -0.59816071f,
+    -0.59569930f,
+    -0.59323230f,
+    -0.59075970f,
+    -0.58828155f,
+    -0.58579786f,
+    -0.58330865f,
+    -0.58081396f,
+    -0.57831380f,
+    -0.57580819f,
+    -0.57329717f,
+    -0.57078075f,
+    -0.56825895f,
+    -0.56573181f,
+    -0.56319934f,
+    -0.56066158f,
+    -0.55811853f,
+    -0.55557023f,
+    -0.55301671f,
+    -0.55045797f,
+    -0.54789406f,
+    -0.54532499f,
+    -0.54275078f,
+    -0.54017147f,
+    -0.53758708f,
+    -0.53499762f,
+    -0.53240313f,
+    -0.52980362f,
+    -0.52719913f,
+    -0.52458968f,
+    -0.52197529f,
+    -0.51935599f,
+    -0.51673180f,
+    -0.51410274f,
+    -0.51146885f,
+    -0.50883014f,
+    -0.50618665f,
+    -0.50353838f,
+    -0.50088538f,
+    -0.49822767f,
+    -0.49556526f,
+    -0.49289819f,
+    -0.49022648f,
+    -0.48755016f,
+    -0.48486925f,
+    -0.48218377f,
+    -0.47949376f,
+    -0.47679923f,
+    -0.47410021f,
+    -0.47139674f,
+    -0.46868882f,
+    -0.46597650f,
+    -0.46325978f,
+    -0.46053871f,
+    -0.45781330f,
+    -0.45508359f,
+    -0.45234959f,
+    -0.44961133f,
+    -0.44686884f,
+    -0.44412214f,
+    -0.44137127f,
+    -0.43861624f,
+    -0.43585708f,
+    -0.43309382f,
+    -0.43032648f,
+    -0.42755509f,
+    -0.42477968f,
+    -0.42200027f,
+    -0.41921689f,
+    -0.41642956f,
+    -0.41363831f,
+    -0.41084317f,
+    -0.40804416f,
+    -0.40524131f,
+    -0.40243465f,
+    -0.39962420f,
+    -0.39680999f,
+    -0.39399204f,
+    -0.39117038f,
+    -0.38834505f,
+    -0.38551605f,
+    -0.38268343f,
+    -0.37984721f,
+    -0.37700741f,
+    -0.37416406f,
+    -0.37131719f,
+    -0.36846683f,
+    -0.36561300f,
+    -0.36275572f,
+    -0.35989504f,
+    -0.35703096f,
+    -0.35416353f,
+    -0.35129276f,
+    -0.34841868f,
+    -0.34554132f,
+    -0.34266072f,
+    -0.33977688f,
+    -0.33688985f,
+    -0.33399965f,
+    -0.33110631f,
+    -0.32820984f,
+    -0.32531029f,
+    -0.32240768f,
+    -0.31950203f,
+    -0.31659338f,
+    -0.31368174f,
+    -0.31076715f,
+    -0.30784964f,
+    -0.30492923f,
+    -0.30200595f,
+    -0.29907983f,
+    -0.29615089f,
+    -0.29321916f,
+    -0.29028468f,
+    -0.28734746f,
+    -0.28440754f,
+    -0.28146494f,
+    -0.27851969f,
+    -0.27557182f,
+    -0.27262136f,
+    -0.26966833f,
+    -0.26671276f,
+    -0.26375468f,
+    -0.26079412f,
+    -0.25783110f,
+    -0.25486566f,
+    -0.25189782f,
+    -0.24892761f,
+    -0.24595505f,
+    -0.24298018f,
+    -0.24000302f,
+    -0.23702361f,
+    -0.23404196f,
+    -0.23105811f,
+    -0.22807208f,
+    -0.22508391f,
+    -0.22209362f,
+    -0.21910124f,
+    -0.21610680f,
+    -0.21311032f,
+    -0.21011184f,
+    -0.20711138f,
+    -0.20410897f,
+    -0.20110463f,
+    -0.19809841f,
+    -0.19509032f,
+    -0.19208040f,
+    -0.18906866f,
+    -0.18605515f,
+    -0.18303989f,
+    -0.18002290f,
+    -0.17700422f,
+    -0.17398387f,
+    -0.17096189f,
+    -0.16793829f,
+    -0.16491312f,
+    -0.16188639f,
+    -0.15885814f,
+    -0.15582840f,
+    -0.15279719f,
+    -0.14976453f,
+    -0.14673047f,
+    -0.14369503f,
+    -0.14065824f,
+    -0.13762012f,
+    -0.13458071f,
+    -0.13154003f,
+    -0.12849811f,
+    -0.12545498f,
+    -0.12241068f,
+    -0.11936521f,
+    -0.11631863f,
+    -0.11327095f,
+    -0.11022221f,
+    -0.10717242f,
+    -0.10412163f,
+    -0.10106986f,
+    -0.09801714f,
+    -0.09496350f,
+    -0.09190896f,
+    -0.08885355f,
+    -0.08579731f,
+    -0.08274026f,
+    -0.07968244f,
+    -0.07662386f,
+    -0.07356456f,
+    -0.07050457f,
+    -0.06744392f,
+    -0.06438263f,
+    -0.06132074f,
+    -0.05825826f,
+    -0.05519524f,
+    -0.05213170f,
+    -0.04906767f,
+    -0.04600318f,
+    -0.04293826f,
+    -0.03987293f,
+    -0.03680722f,
+    -0.03374117f,
+    -0.03067480f,
+    -0.02760815f,
+    -0.02454123f,
+    -0.02147408f,
+    -0.01840673f,
+    -0.01533921f,
+    -0.01227154f,
+    -0.00920375f,
+    -0.00613588f,
+    -0.00306796f
+};
+
+int32_t dds_phase_ratef(float frequency)
+{
+    return (int32_t) (frequency*65536.0f*65536.0f/SAMPLE_RATE);
+}
+/*- End of function --------------------------------------------------------*/
+
+float dds_frequencyf(int32_t phase_rate)
+{
+    return (float) phase_rate*(float) SAMPLE_RATE/(65536.0f*65536.0f);
+}
+/*- End of function --------------------------------------------------------*/
+
+float dds_scaling_dbm0f(float level)
+{
+    return powf(10.0f, (level - DBM0_MAX_POWER)/20.0f)*(32767.0f*1.414214f);
+}
+/*- End of function --------------------------------------------------------*/
+
+float dds_scaling_dbovf(float level)
+{
+    return powf(10.0f, (level + 3.02f)/20.0f)*(32767.0f*1.414214f);
+}
+/*- End of function --------------------------------------------------------*/
+
+float ddsf(uint32_t *phase_acc, int32_t phase_rate)
+{
+    float amp;
+
+    amp = sine_table[*phase_acc >> (32 - SLENK)];
+    *phase_acc += phase_rate;
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+
+float dds_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
+{
+    float amp;
+
+    amp = sine_table[*(phase_acc + phase) >> (32 - SLENK)]*scale;
+    *phase_acc += phase_rate;
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* This is a simple direct digital synthesis (DDS) function to generate complex
+   sine waves. */
+complexf_t dds_complexf(uint32_t *phase_acc, int32_t phase_rate)
+{
+    complexf_t amp;
+
+    amp = complex_setf(sine_table[(*phase_acc + (1 << 30)) >> (32 - SLENK)],
+                       sine_table[*phase_acc >> (32 - SLENK)]);
+    *phase_acc += phase_rate;
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* This is a simple direct digital synthesis (DDS) function to generate complex
+   sine waves. */
+complexf_t dds_complex_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
+{
+    complexf_t amp;
+
+    amp = complex_setf(sine_table[(*phase_acc + phase + (1 << 30)) >> (32 - SLENK)]*scale,
+                       sine_table[(*phase_acc + phase) >> (32 - SLENK)]*scale);
+    *phase_acc += phase_rate;
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/complex_filters.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,93 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * complex_filters.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: complex_filters.c,v 1.8 2006/10/24 13:45:25 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+
+#include "spandsp/complex.h"
+#include "spandsp/complex_filters.h"
+
+filter_t *filter_create(fspec_t *fs)
+{
+    int i;
+    filter_t *fi;
+
+    fi = (filter_t *) malloc(sizeof (filter_t) + sizeof (float)*(fs->np + 1));
+    if (fi)
+    {
+    	fi->fs = fs;
+    	fi->sum = 0.0;
+    	fi->ptr = 0;	    /* mvg avg filters only */
+        for (i = 0;  i <= fi->fs->np;  i++)
+            fi->v[i] = 0.0;
+    }
+    return fi;
+}
+
+void filter_delete(filter_t *fi)
+{
+    if (fi)
+    	free(fi);
+}
+
+float filter_step(filter_t *fi, float x)
+{
+    return fi->fs->fsf(fi, x);
+}
+
+cfilter_t *cfilter_create(fspec_t *fs)
+{
+    cfilter_t *cfi;
+
+    cfi = (cfilter_t *) malloc(sizeof (cfilter_t));
+    cfi->ref = filter_create(fs);
+    cfi->imf = filter_create(fs);
+    return  cfi;
+}
+
+void cfilter_delete(cfilter_t *cfi)
+{
+    if (cfi)
+    {
+        filter_delete(cfi->ref);
+        filter_delete(cfi->imf);
+    }
+}
+
+complexf_t cfilter_step(cfilter_t *cfi, const complexf_t *z)
+{
+    complexf_t cc;
+    
+    cc.re = filter_step(cfi->ref, z->re);
+    cc.im = filter_step(cfi->imf, z->im);
+    return cc;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/complex_vector_float.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,52 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * vector_float.c - Floating vector arithmetic routines.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: complex_vector_float.c,v 1.4 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/complex.h"
+#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
+
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/config.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,242 @@
+/* src/config.h.  Generated by configure.  */
+/* config-h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <audiofile.h> header file. */
+#define HAVE_AUDIOFILE_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the <fftw3.h> header file. */
+#define HAVE_FFTW3_H 1
+
+/* Define to 1 if you have the <fftw.h> header file. */
+/* #undef HAVE_FFTW_H */
+
+/* Define to 1 if you have the <float.h> header file. */
+#define HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the <FL/Fl_Audio_Meter.H> header file. */
+/* #undef HAVE_FL_FL_AUDIO_METER_H */
+
+/* Define to 1 if you have the <FL/Fl_Cartesian.H> header file. */
+/* #undef HAVE_FL_FL_CARTESIAN_H */
+
+/* Define to 1 if you have the <FL/fl_draw.H> header file. */
+/* #undef HAVE_FL_FL_DRAW_H */
+
+/* Define to 1 if you have the <FL/Fl.H> header file. */
+/* #undef HAVE_FL_FL_H */
+
+/* Define to 1 if you have the <FL/Fl_Light_Button.H> header file. */
+/* #undef HAVE_FL_FL_LIGHT_BUTTON_H */
+
+/* Define to 1 if you have the <FL/Fl_Overlay_Window.H> header file. */
+/* #undef HAVE_FL_FL_OVERLAY_WINDOW_H */
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `m' library (-lm). */
+#define HAVE_LIBM 1
+
+/* Define to 1 if you have the `tiff' library (-ltiff). */
+#define HAVE_LIBTIFF 1
+
+/* Define to 1 if you have the 'libxml2' library (-lxml2). */
+/* #undef HAVE_LIBXML2 */
+
+/* Define to 1 if you have the <libxml/parser.h> header file. */
+/* #undef HAVE_LIBXML_PARSER_H */
+
+/* Define to 1 if you have the <libxml/xinclude.h> header file. */
+/* #undef HAVE_LIBXML_XINCLUDE_H */
+
+/* Define to 1 if you have the <libxml/xmlmemory.h> header file. */
+/* #undef HAVE_LIBXML_XMLMEMORY_H */
+
+/* Define to 1 if the system has the type `long double'. */
+#define HAVE_LONG_DOUBLE 1
+
+/* Define to 1 if the system has the type `long long'. */
+#define HAVE_LONG_LONG 1
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the <math.h> header file. */
+#define HAVE_MATH_H 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the `pow' function. */
+/* #undef HAVE_POW */
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#define HAVE_PTHREAD_H 1
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#define HAVE_REALLOC 1
+
+/* Define to 1 if you have the `rint' function. */
+/* #undef HAVE_RINT */
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have the <socket.h> header file. */
+/* #undef HAVE_SOCKET_H */
+
+/* Define to 1 if you have the `sqrt' function. */
+/* #undef HAVE_SQRT */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define to 1 if you have the <sys/fcntl.h> header file. */
+#define HAVE_SYS_FCNTL_H 1
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <tgmath.h> header file. */
+#define HAVE_TGMATH_H 1
+
+/* Define to 1 if you have the <tiffio.h> header file. */
+#define HAVE_TIFFIO_H 1
+
+/* Define to 1 if you have the <unicall.h> header file. */
+/* #undef HAVE_UNICALL_H */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the <X11/X.h> header file. */
+#define HAVE_X11_X_H 1
+
+/* Name of package */
+#define PACKAGE "spandsp"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to the type of arg 1 for `select'. */
+#define SELECT_TYPE_ARG1 int
+
+/* Define to the type of args 2, 3 and 4 for `select'. */
+#define SELECT_TYPE_ARG234 (fd_set *)
+
+/* Define to the type of arg 5 for `select'. */
+#define SELECT_TYPE_ARG5 (struct timeval *)
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Version number of package */
+#define VERSION "0.0.3"
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define to rpl_malloc if the replacement function should be used. */
+/* #undef malloc */
+
+/* Define to rpl_realloc if the replacement function should be used. */
+/* #undef realloc */
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+/* #undef volatile */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/dds.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,280 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * dds.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: dds.c,v 1.17 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dds.h"
+
+#if !defined(M_PI)
+# define M_PI           3.14159265358979323846  /* pi */
+#endif
+
+/* In a A-law or u-law channel, and 128 step sine table is adequate to keep the spectral
+   mess due to the DDS at a similar level to the spectral mess due to the A-law or u-law
+   compression. */
+#define SLENK       7
+#define DDS_STEPS   (1 << SLENK)
+#define DDS_SHIFT   (32 - 2 - SLENK)
+
+/* This is a simple set of direct digital synthesis (DDS) functions to generate sine
+   waves. This version uses a 128 entry sin/cos table to cover one quadrant. */
+
+static const int16_t sine_table[DDS_STEPS] =
+{
+       201,
+       603,
+      1005,
+      1407,
+      1809,
+      2210,
+      2611,
+      3012,
+      3412,
+      3812,
+      4211,
+      4609,
+      5007,
+      5404,
+      5800,
+      6195,
+      6590,
+      6983,
+      7376,
+      7767,
+      8157,
+      8546,
+      8933,
+      9319,
+      9704,
+     10088,
+     10469,
+     10850,
+     11228,
+     11605,
+     11980,
+     12354,
+     12725,
+     13095,
+     13463,
+     13828,
+     14192,
+     14553,
+     14912,
+     15269,
+     15624,
+     15976,
+     16326,
+     16673,
+     17018,
+     17361,
+     17700,
+     18037,
+     18372,
+     18703,
+     19032,
+     19358,
+     19681,
+     20001,
+     20318,
+     20632,
+     20943,
+     21251,
+     21555,
+     21856,
+     22154,
+     22449,
+     22740,
+     23028,
+     23312,
+     23593,
+     23870,
+     24144,
+     24414,
+     24680,
+     24943,
+     25202,
+     25457,
+     25708,
+     25956,
+     26199,
+     26439,
+     26674,
+     26906,
+     27133,
+     27357,
+     27576,
+     27791,
+     28002,
+     28209,
+     28411,
+     28610,
+     28803,
+     28993,
+     29178,
+     29359,
+     29535,
+     29707,
+     29875,
+     30038,
+     30196,
+     30350,
+     30499,
+     30644,
+     30784,
+     30920,
+     31050,
+     31177,
+     31298,
+     31415,
+     31527,
+     31634,
+     31737,
+     31834,
+     31927,
+     32015,
+     32099,
+     32177,
+     32251,
+     32319,
+     32383,
+     32442,
+     32496,
+     32546,
+     32590,
+     32629,
+     32664,
+     32693,
+     32718,
+     32738,
+     32753,
+     32762,
+     32767,
+};
+
+int32_t dds_phase_rate(float frequency)
+{
+    return (int32_t) (frequency*65536.0f*65536.0f/SAMPLE_RATE);
+}
+/*- End of function --------------------------------------------------------*/
+
+float dds_frequency(int32_t phase_rate)
+{
+    return (float) phase_rate*(float) SAMPLE_RATE/(65536.0f*65536.0f);
+}
+/*- End of function --------------------------------------------------------*/
+
+int dds_scaling_dbm0(float level)
+{
+    return (int) (powf(10.0f, (level - DBM0_MAX_POWER)/20.0f)*(32767.0f*1.414214f));
+}
+/*- End of function --------------------------------------------------------*/
+
+int dds_scaling_dbov(float level)
+{
+    return (int) (powf(10.0f, (level + 3.02f)/20.0f)*(32767.0f*1.414214f));
+}
+/*- End of function --------------------------------------------------------*/
+
+int16_t dds_lookup(uint32_t phase)
+{
+    uint32_t step;
+    uint32_t fred;
+    int16_t amp;
+
+    phase >>= DDS_SHIFT;
+    step = phase & (DDS_STEPS - 1);
+    fred = step;
+    if ((phase & DDS_STEPS))
+        step = (DDS_STEPS - 1) - step;
+    amp = sine_table[step];
+    if ((phase & (2*DDS_STEPS)))
+    	amp = -amp;
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+
+int16_t dds_offset(uint32_t phase_acc, int32_t phase_offset)
+{
+    return dds_lookup(phase_acc + phase_offset);
+}
+/*- End of function --------------------------------------------------------*/
+
+int16_t dds(uint32_t *phase_acc, int32_t phase_rate)
+{
+    int16_t amp;
+
+    amp = dds_lookup(*phase_acc);
+    *phase_acc += phase_rate;
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+
+int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase)
+{
+    int16_t amp;
+
+    amp = (int16_t) ((dds_lookup(*phase_acc + phase)*scale) >> 15);
+    *phase_acc += phase_rate;
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+
+icomplex_t dds_complex(uint32_t *phase_acc, int32_t phase_rate)
+{
+    icomplex_t amp;
+
+    amp.re = dds_lookup(*phase_acc + (1 << 30));
+    amp.im = dds_lookup(*phase_acc);
+    *phase_acc += phase_rate;
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+
+icomplex_t dds_complex_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase)
+{
+    icomplex_t amp;
+
+    amp.re = (dds_lookup(*phase_acc + phase + (1 << 30))*scale) >> 15;
+    amp.im = (dds_lookup(*phase_acc + phase)*scale) >> 15;
+    *phase_acc += phase_rate;
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/dtmf.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,564 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * dtmf.c - DTMF generation and detection.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001-2003, 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: dtmf.c,v 1.11 2006/11/19 14:07:24 steveu Exp $
+ */
+ 
+/*! \file dtmf.h */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <string.h>
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/tone_detect.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/dtmf.h"
+
+#if !defined(M_PI)
+/* C99 systems may not define M_PI */
+#define M_PI 3.14159265358979323846264338327
+#endif
+
+//#define USE_3DNOW
+
+#define ms_to_samples(t)            (((t)*SAMPLE_RATE)/1000)
+
+#define DTMF_DURATION               ms_to_samples(70)
+#define DTMF_PAUSE                  ms_to_samples(80)
+#define DTMF_CYCLE                  (DTMF_DURATION + DTMF_PAUSE)
+
+#define DTMF_THRESHOLD              8.0e7f
+#define DTMF_NORMAL_TWIST           6.3f    /* 8dB */
+#define DTMF_REVERSE_TWIST          2.5f    /* 4dB */
+#define DTMF_RELATIVE_PEAK_ROW      6.3f    /* 8dB */
+#define DTMF_RELATIVE_PEAK_COL      6.3f    /* 8dB */
+#define DTMF_TO_TOTAL_ENERGY        42.0f
+
+static const float dtmf_row[] =
+{
+     697.0f,  770.0f,  852.0f,  941.0f
+};
+static const float dtmf_col[] =
+{
+    1209.0f, 1336.0f, 1477.0f, 1633.0f
+};
+
+static const char dtmf_positions[] = "123A" "456B" "789C" "*0#D";
+
+static goertzel_descriptor_t dtmf_detect_row[4];
+static goertzel_descriptor_t dtmf_detect_col[4];
+
+static int dtmf_tx_inited = FALSE;
+static tone_gen_descriptor_t dtmf_digit_tones[16];
+
+#if defined(USE_3DNOW)
+static __inline__ void _dtmf_goertzel_update(goertzel_state_t *s,
+                                             float x[],
+                                             int samples)
+{
+    int n;
+    float v;
+    int i;
+    float vv[16];
+
+    vv[4] = s[0].v2;
+    vv[5] = s[1].v2;
+    vv[6] = s[2].v2;
+    vv[7] = s[3].v2;
+    vv[8] = s[0].v3;
+    vv[9] = s[1].v3;
+    vv[10] = s[2].v3;
+    vv[11] = s[3].v3;
+    vv[12] = s[0].fac;
+    vv[13] = s[1].fac;
+    vv[14] = s[2].fac;
+    vv[15] = s[3].fac;
+
+    //v1 = s->v2;
+    //s->v2 = s->v3;
+    //s->v3 = s->fac*s->v2 - v1 + x[0];
+
+    __asm__ __volatile__ (
+             " femms;\n"
+
+             " movq        16(%%edx),%%mm2;\n"
+             " movq        24(%%edx),%%mm3;\n"
+             " movq        32(%%edx),%%mm4;\n"
+             " movq        40(%%edx),%%mm5;\n"
+             " movq        48(%%edx),%%mm6;\n"
+             " movq        56(%%edx),%%mm7;\n"
+
+             " jmp         1f;\n"
+             " .align 32;\n"
+
+             " 1: ;\n"
+             " prefetch    (%%eax);\n"
+             " movq        %%mm3,%%mm1;\n"
+             " movq        %%mm2,%%mm0;\n"
+             " movq        %%mm5,%%mm3;\n"
+             " movq        %%mm4,%%mm2;\n"
+
+             " pfmul       %%mm7,%%mm5;\n"
+             " pfmul       %%mm6,%%mm4;\n"
+             " pfsub       %%mm1,%%mm5;\n"
+             " pfsub       %%mm0,%%mm4;\n"
+
+             " movq        (%%eax),%%mm0;\n"
+             " movq        %%mm0,%%mm1;\n"
+             " punpckldq   %%mm0,%%mm1;\n"
+             " add         $4,%%eax;\n"
+             " pfadd       %%mm1,%%mm5;\n"
+             " pfadd       %%mm1,%%mm4;\n"
+
+             " dec         %%ecx;\n"
+
+             " jnz         1b;\n"
+
+             " movq        %%mm2,16(%%edx);\n"
+             " movq        %%mm3,24(%%edx);\n"
+             " movq        %%mm4,32(%%edx);\n"
+             " movq        %%mm5,40(%%edx);\n"
+
+             " femms;\n"
+             :
+             : "c" (samples), "a" (x), "d" (vv)
+             : "memory", "eax", "ecx");
+
+    s[0].v2 = vv[4];
+    s[1].v2 = vv[5];
+    s[2].v2 = vv[6];
+    s[3].v2 = vv[7];
+    s[0].v3 = vv[8];
+    s[1].v3 = vv[9];
+    s[2].v3 = vv[10];
+    s[3].v3 = vv[11];
+}
+#endif
+/*- End of function --------------------------------------------------------*/
+
+int dtmf_rx(dtmf_rx_state_t *s, const int16_t amp[], int samples)
+{
+    float row_energy[4];
+    float col_energy[4];
+    float famp;
+    float v1;
+    int i;
+    int j;
+    int sample;
+    int best_row;
+    int best_col;
+    int limit;
+    uint8_t hit;
+
+    hit = 0;
+    for (sample = 0;  sample < samples;  sample = limit)
+    {
+        /* The block length is optimised to meet the DTMF specs. */
+        if ((samples - sample) >= (102 - s->current_sample))
+            limit = sample + (102 - s->current_sample);
+        else
+            limit = samples;
+#if defined(USE_3DNOW)
+        _dtmf_goertzel_update(s->row_out, amp + sample, limit - sample);
+        _dtmf_goertzel_update(s->col_out, amp + sample, limit - sample);
+#else
+        /* The following unrolled loop takes only 35% (rough estimate) of the 
+           time of a rolled loop on the machine on which it was developed */
+        for (j = sample;  j < limit;  j++)
+        {
+            famp = amp[j];
+            if (s->filter_dialtone)
+            {
+                /* Sharp notches applied at 350Hz and 440Hz - the two common dialtone frequencies.
+                   These are rather high Q, to achieve the required narrowness, without using lots of
+                   sections. */
+                v1 = 0.98356f*famp + 1.8954426f*s->z350_1 - 0.9691396f*s->z350_2;
+                famp = v1 - 1.9251480f*s->z350_1 + s->z350_2;
+                s->z350_2 = s->z350_1;
+                s->z350_1 = v1;
+
+                v1 = 0.98456f*famp + 1.8529543f*s->z440_1 - 0.9691396f*s->z440_2;
+                famp = v1 - 1.8819938f*s->z440_1 + s->z440_2;
+                s->z440_2 = s->z440_1;
+                s->z440_1 = v1;
+            }
+            s->energy += famp*famp;
+            /* With GCC 2.95, the following unrolled code seems to take about 35%
+               (rough estimate) as long as a neat little 0-3 loop */
+            v1 = s->row_out[0].v2;
+            s->row_out[0].v2 = s->row_out[0].v3;
+            s->row_out[0].v3 = s->row_out[0].fac*s->row_out[0].v2 - v1 + famp;
+    
+            v1 = s->col_out[0].v2;
+            s->col_out[0].v2 = s->col_out[0].v3;
+            s->col_out[0].v3 = s->col_out[0].fac*s->col_out[0].v2 - v1 + famp;
+    
+            v1 = s->row_out[1].v2;
+            s->row_out[1].v2 = s->row_out[1].v3;
+            s->row_out[1].v3 = s->row_out[1].fac*s->row_out[1].v2 - v1 + famp;
+    
+            v1 = s->col_out[1].v2;
+            s->col_out[1].v2 = s->col_out[1].v3;
+            s->col_out[1].v3 = s->col_out[1].fac*s->col_out[1].v2 - v1 + famp;
+    
+            v1 = s->row_out[2].v2;
+            s->row_out[2].v2 = s->row_out[2].v3;
+            s->row_out[2].v3 = s->row_out[2].fac*s->row_out[2].v2 - v1 + famp;
+    
+            v1 = s->col_out[2].v2;
+            s->col_out[2].v2 = s->col_out[2].v3;
+            s->col_out[2].v3 = s->col_out[2].fac*s->col_out[2].v2 - v1 + famp;
+    
+            v1 = s->row_out[3].v2;
+            s->row_out[3].v2 = s->row_out[3].v3;
+            s->row_out[3].v3 = s->row_out[3].fac*s->row_out[3].v2 - v1 + famp;
+
+            v1 = s->col_out[3].v2;
+            s->col_out[3].v2 = s->col_out[3].v3;
+            s->col_out[3].v3 = s->col_out[3].fac*s->col_out[3].v2 - v1 + famp;
+        }
+#endif
+        s->current_sample += (limit - sample);
+        if (s->current_sample < 102)
+            continue;
+
+        /* We are at the end of a DTMF detection block */
+        /* Find the peak row and the peak column */
+        row_energy[0] = goertzel_result(&s->row_out[0]);
+        best_row = 0;
+        col_energy[0] = goertzel_result(&s->col_out[0]);
+        best_col = 0;
+
+        for (i = 1;  i < 4;  i++)
+        {
+            row_energy[i] = goertzel_result(&s->row_out[i]);
+            if (row_energy[i] > row_energy[best_row])
+                best_row = i;
+            col_energy[i] = goertzel_result(&s->col_out[i]);
+            if (col_energy[i] > col_energy[best_col])
+                best_col = i;
+        }
+        hit = 0;
+        /* Basic signal level test and the twist test */
+        if (row_energy[best_row] >= DTMF_THRESHOLD
+            &&
+            col_energy[best_col] >= DTMF_THRESHOLD
+            &&
+            col_energy[best_col] < row_energy[best_row]*s->reverse_twist
+            &&
+            col_energy[best_col]*s->normal_twist > row_energy[best_row])
+        {
+            /* Relative peak test ... */
+            for (i = 0;  i < 4;  i++)
+            {
+                if ((i != best_col  &&  col_energy[i]*DTMF_RELATIVE_PEAK_COL > col_energy[best_col])
+                    ||
+                    (i != best_row  &&  row_energy[i]*DTMF_RELATIVE_PEAK_ROW > row_energy[best_row]))
+                {
+                    break;
+                }
+            }
+            /* ... and fraction of total energy test */
+            if (i >= 4
+                &&
+                (row_energy[best_row] + col_energy[best_col]) > DTMF_TO_TOTAL_ENERGY*s->energy)
+            {
+                hit = dtmf_positions[(best_row << 2) + best_col];
+            }
+        }
+        /* The logic in the next test should ensure the following for different successive hit patterns:
+                -----ABB = start of digit B.
+                ----B-BB = start of digit B
+                ----A-BB = start of digit B
+                BBBBBABB = still in digit B.
+                BBBBBB-- = end of digit B
+                BBBBBBC- = end of digit B
+                BBBBACBB = B ends, then B starts again.
+                BBBBBBCC = B ends, then C starts.
+                BBBBBCDD = B ends, then D starts.
+           This can work with:
+                - Back to back differing digits. Back-to-back digits should
+                  not happen. The spec. says there should be a gap between digits.
+                  However, many real phones do not impose a gap, and rolling across
+                  the keypad can produce little or no gap.
+                - It tolerates nasty phones that give a very wobbly start to a digit.
+                - VoIP can give sample slips. The phase jumps that produces will cause
+                  the block it is in to give no detection. This logic will ride over a
+                  single missed block, and not falsely declare a second digit. If the
+                  hiccup happens in the wrong place on a minimum length digit, however
+                  we would still fail to detect that digit. Could anything be done to
+                  deal with that? Packet loss is clearly a no-go zone.
+                  Note this is only relevant to VoIP using A-law, u-law or similar.
+                  Low bit rate codecs scramble DTMF too much for it to be recognised,
+                  and often slip in units larger than a sample. */
+        if (hit != s->in_digit)
+        {
+            if (s->last_hit != s->in_digit)
+            {
+                /* We have two successive indications that something has changed. */
+                /* To declare digit on, the hits must agree. Otherwise we declare tone off. */
+                hit = (hit  &&  hit == s->last_hit)  ?  hit   :  0;
+                if (s->realtime_callback)
+                {
+                    /* Avoid reporting multiple no digit conditions on flaky hits */
+                    if (s->in_digit  ||  hit)
+                        s->realtime_callback(s->realtime_callback_data, hit);
+                }
+                else
+                {
+                    if (hit)
+                    {
+                        if (s->current_digits < MAX_DTMF_DIGITS)
+                        {
+                            s->digits[s->current_digits++] = (char) hit;
+                            s->digits[s->current_digits] = '\0';
+                            if (s->callback)
+                            {
+                                s->callback(s->callback_data, s->digits, s->current_digits);
+                                s->current_digits = 0;
+                            }
+                        }
+                        else
+                        {
+                            s->lost_digits++;
+                        }
+                    }
+                }
+                s->in_digit = hit;
+            }
+        }
+        s->last_hit = hit;
+        /* Reinitialise the detector for the next block */
+        for (i = 0;  i < 4;  i++)
+        {
+            goertzel_reset(&s->row_out[i]);
+            goertzel_reset(&s->col_out[i]);
+        }
+        s->energy = 0.0;
+        s->current_sample = 0;
+    }
+    if (s->current_digits  &&  s->callback)
+    {
+        s->callback(s->callback_data, s->digits, s->current_digits);
+        s->digits[0] = '\0';
+        s->current_digits = 0;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+size_t dtmf_rx_get(dtmf_rx_state_t *s, char *buf, int max)
+{
+    if (max > s->current_digits)
+        max = s->current_digits;
+    if (max > 0)
+    {
+        memcpy(buf, s->digits, max);
+        memmove(s->digits, s->digits + max, s->current_digits - max);
+        s->current_digits -= max;
+    }
+    buf[max] = '\0';
+    return  max;
+}
+/*- End of function --------------------------------------------------------*/
+
+void dtmf_rx_set_realtime_callback(dtmf_rx_state_t *s,
+                                   void (*callback)(void *user_data, int signal),
+                                   void *user_data)
+{
+    s->realtime_callback = callback;
+    s->realtime_callback_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+void dtmf_rx_parms(dtmf_rx_state_t *s,
+                   int filter_dialtone,
+                   int twist,
+                   int reverse_twist)
+{
+    if (filter_dialtone >= 0)
+    {
+        s->z350_1 = 0.0;
+        s->z350_2 = 0.0;
+        s->z440_1 = 0.0;
+        s->z440_2 = 0.0;
+        s->filter_dialtone = filter_dialtone;
+    }
+    if (twist >= 0)
+        s->normal_twist = powf(10.0, twist/10.0);
+    if (reverse_twist >= 0)
+        s->reverse_twist = powf(10.0, reverse_twist/10.0);
+}
+/*- End of function --------------------------------------------------------*/
+
+dtmf_rx_state_t *dtmf_rx_init(dtmf_rx_state_t *s,
+                              void (*callback)(void *user_data, const char *digits, int len),
+                              void *user_data)
+{
+    int i;
+    static int initialised = FALSE;
+
+    s->callback = callback;
+    s->callback_data = user_data;
+    s->realtime_callback = NULL;
+    s->realtime_callback_data = NULL;
+    s->filter_dialtone = FALSE;
+    s->normal_twist = DTMF_NORMAL_TWIST;
+    s->reverse_twist = DTMF_REVERSE_TWIST;
+
+    s->in_digit = 0;
+    s->last_hit = 0;
+
+    if (!initialised)
+    {
+        for (i = 0;  i < 4;  i++)
+        {
+            make_goertzel_descriptor(&dtmf_detect_row[i], dtmf_row[i], 102);
+            make_goertzel_descriptor(&dtmf_detect_col[i], dtmf_col[i], 102);
+        }
+        initialised = TRUE;
+    }
+    for (i = 0;  i < 4;  i++)
+    {
+        goertzel_init(&s->row_out[i], &dtmf_detect_row[i]);
+        goertzel_init(&s->col_out[i], &dtmf_detect_col[i]);
+    }
+    s->energy = 0.0;
+    s->current_sample = 0;
+    s->lost_digits = 0;
+    s->current_digits = 0;
+    s->digits[0] = '\0';
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void dtmf_tx_initialise(void)
+{
+    int row;
+    int col;
+
+    if (dtmf_tx_inited)
+        return;
+    for (row = 0;  row < 4;  row++)
+    {
+    	for (col = 0;  col < 4;  col++)
+        {
+    	    make_tone_gen_descriptor(&dtmf_digit_tones[row*4 + col],
+                                     (int) dtmf_row[row],
+                                     -10,
+                                     (int) dtmf_col[col],
+                                     -10,
+                                     50,
+                                     55,
+                                     0,
+                                     0,
+                                     FALSE);
+        }
+    }
+    dtmf_tx_inited = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+int dtmf_tx(dtmf_tx_state_t *s, int16_t amp[], int max_samples)
+{
+    int len;
+    size_t dig;
+    char *cp;
+
+    len = 0;
+    if (s->tones.current_section >= 0)
+    {
+        /* Deal with the fragment left over from last time */
+        len = tone_gen(&(s->tones), amp, max_samples);
+    }
+    dig = 0;
+    while (dig < s->current_digits  &&  len < max_samples)
+    {
+        /* Step to the next digit */
+        if ((cp = strchr(dtmf_positions, s->digits[dig++])) == NULL)
+            continue;
+        tone_gen_init(&(s->tones), &(s->tone_descriptors[cp - dtmf_positions]));
+        len += tone_gen(&(s->tones), amp + len, max_samples - len);
+    }
+    if (dig)
+    {
+        /* Shift out the consumed digits */
+        s->current_digits -= dig;
+        memmove(s->digits, s->digits + dig, s->current_digits);
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+size_t dtmf_tx_put(dtmf_tx_state_t *s, const char *digits)
+{
+    size_t len;
+
+    /* This returns the number of characters that would not fit in the buffer.
+       The buffer will only be loaded if the whole string of digits will fit,
+       in which case zero is returned. */
+    if ((len = strlen(digits)) > 0)
+    {
+        if (s->current_digits + len <= MAX_DTMF_DIGITS)
+        {
+            memcpy(s->digits + s->current_digits, digits, len);
+            s->current_digits += len;
+            len = 0;
+        }
+        else
+        {
+            len = MAX_DTMF_DIGITS - s->current_digits;
+        }
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+dtmf_tx_state_t *dtmf_tx_init(dtmf_tx_state_t *s)
+{
+    if (!dtmf_tx_inited)
+        dtmf_tx_initialise();
+    s->tone_descriptors = dtmf_digit_tones;
+    tone_gen_init(&(s->tones), &dtmf_digit_tones[0]);
+    s->current_sample = 0;
+    s->current_digits = 0;
+    s->tones.current_section = -1;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/echo.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,658 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * echo.c - A line echo canceller.  This code is being developed
+ *          against and partially complies with G168.
+ *
+ * Written by Steve Underwood <steveu@coppice.org> 
+ *         and David Rowe <david_at_rowetel_dot_com>
+ *
+ * Copyright (C) 2001, 2003 Steve Underwood, 2007 David Rowe
+ *
+ * Based on a bit from here, a bit from there, eye of toad, ear of
+ * bat, 15 years of failed attempts by David and a few fried brain
+ * cells.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: echo.c,v 1.20 2006/12/01 18:00:48 steveu Exp $
+ */
+
+/*! \file */
+
+/* Implementation Notes
+   David Rowe
+   April 2007
+   
+   This code started life as Steve's NLMS algorithm with a tap
+   rotation algorithm to handle divergence during double talk.  I
+   added a Geigel Double Talk Detector (DTD) [2] and performed some
+   G168 tests.  However I had trouble meeting the G168 requirements,
+   especially for double talk - there were always cases where my DTD
+   failed, for example where near end speech was under the 6dB
+   threshold required for declaring double talk.
+
+   So I tried a two path algorithm [1], which has so far given better
+   results.  The original tap rotation/Geigel algorithm is available
+   in SVN http://svn.rowetel.com/software/oslec/tags/before_16bit.
+   It's probably possible to make it work if some one wants to put some
+   serious work into it.
+   
+   At present no special treatment is provided for tones, which
+   generally cause NLMS algorithms to diverge.  Initial runs of a
+   subset of the G168 tests for tones (e.g ./echo_test 6) show the
+   current algorithm is passing OK, which is kind of surprising.  The
+   full set of tests needs to be performed to confirm this result.
+
+   One other interesting change is that I have managed to get the NLMS
+   code to work with 16 bit coefficients, rather than the original 32
+   bit coefficents.  This reduces the MIPs and storage required.
+   I evaulated the 16 bit port using g168_tests.sh and listening tests
+   on 4 real-world samples.
+
+   I also attempted the implementation of a block based NLMS update
+   [2] but although this passes g168_tests.sh it didn't converge well
+   on the real-world samples.  I have no idea why, perhaps a scaling
+   problem.  The block based code is also available in SVN
+   http://svn.rowetel.com/software/oslec/tags/before_16bit.  If this
+   code can be debugged, it will lead to further reduction in MIPS, as
+   the block update code maps nicely onto DSP instruction sets (it's a
+   dot product) compared to the current sample-by-sample update.
+
+   Steve also has some nice notes on echo cancellers in echo.h
+
+
+   References:
+
+   [1] Ochiai, Areseki, and Ogihara, "Echo Canceller with Two Echo
+       Path Models", IEEE Transactions on communications, COM-25,
+       No. 6, June
+       1977. 
+       http://www.rowetel.com/images/echo/dual_path_paper.pdf
+
+   [2] The classic, very useful paper that tells you how to
+       actually build a real world echo canceller:
+         Messerschmitt, Hedberg, Cole, Haoui, Winship, "Digital Voice
+         Echo Canceller with a TMS320020, 
+         http://www.rowetel.com/images/echo/spra129.pdf
+
+   [3] I have written a series of blog posts on this work, here is
+       Part 1: http://www.rowetel.com/blog/?p=18
+
+   [4] The source code http://svn.rowetel.com/software/oslec/
+
+   [5] A nice reference on LMS filters:
+         http://en.wikipedia.org/wiki/Least_mean_squares_filter
+
+   Credits:
+
+   Thanks to Steve Underwood, Jean-Marc Valin, and Ramakrishnan
+   Muthukrishnan for their suggestions and email discussions.  Thanks
+   also to those people who collected echo samples for me such as
+   Mark, Pawel, and Pavel.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef __KERNEL__
+#include <linux/kernel.h>       /* We're doing kernel work */
+#include <linux/module.h>     
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#define malloc(a) kmalloc((a), GFP_KERNEL)
+#define free(a) kfree(a)
+#else
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <inttypes.h>
+
+#endif
+
+#include "spandsp/bit_operations.h"
+#include "spandsp/echo.h"
+
+#if !defined(NULL)
+#define NULL (void *) 0
+#endif
+#if !defined(FALSE)
+#define FALSE 0
+#endif
+#if !defined(TRUE)
+#define TRUE (!FALSE)
+#endif
+
+#define MIN_TX_POWER_FOR_ADAPTION   64
+#define MIN_RX_POWER_FOR_ADAPTION   64
+#define DTD_HANGOVER               600     /* 600 samples, or 75ms     */
+#define DC_LOG2BETA                  3     /* log2() of DC filter Beta */
+
+/*-----------------------------------------------------------------------*\
+
+                               FUNCTIONS
+
+\*-----------------------------------------------------------------------*/
+
+/* adapting coeffs using the traditional stochastic descent (N)LMS algorithm */
+
+
+#ifdef __BLACKFIN_ASM__
+static void __inline__ lms_adapt_bg(echo_can_state_t *ec, int clean, int shift)
+{
+    int i, j;
+    int offset1;
+    int offset2;
+    int factor;
+    int exp;
+    int16_t *phist;
+    int n;
+
+    if (shift > 0)
+	factor = clean << shift;
+    else
+	factor = clean >> -shift;
+
+    /* Update the FIR taps */
+
+    offset2 = ec->curr_pos;
+    offset1 = ec->taps - offset2;
+    phist = &ec->fir_state_bg.history[offset2];
+
+    /* st: and en: help us locate the assembler in echo.s */
+
+    //asm("st:");
+    n = ec->taps;
+    for (i = 0, j = offset2;  i < n;  i++, j++)
+    {
+       exp = *phist++ * factor;
+       ec->fir_taps16[1][i] += (int16_t) ((exp+(1<<14)) >> 15);
+    }
+    //asm("en:");
+
+    /* Note the asm for the inner loop above generated by Blackfin gcc 
+       4.1.1 is pretty good (note even parallel instructions used):
+
+    	R0 = W [P0++] (X);
+	R0 *= R2;
+	R0 = R0 + R3 (NS) ||
+	R1 = W [P1] (X) ||
+	nop;
+	R0 >>>= 15;
+	R0 = R0 + R1;
+	W [P1++] = R0;
+
+	A block based update algorithm would be much faster but the
+	above can't be improved on much.  Every instruction saved in
+	the loop above is 2 MIPs/ch!  The for loop above is where the
+	Blackfin spends most of it's time - about 17 MIPs/ch measured
+	with speedtest.c with 256 taps (32ms).  Write-back and
+	Write-through cache gave about the same performance.
+    */
+}
+
+/*
+   IDEAS for further optimisation of lms_adapt_bg():
+
+   1/ The rounding is quite costly.  Could we keep as 32 bit coeffs
+   then make filter pluck the MS 16-bits of the coeffs when filtering?
+   However this would lower potential optimisation of filter, as I
+   think the dual-MAC architecture requires packed 16 bit coeffs.
+
+   2/ Block based update would be more efficient, as per comments above,
+   could use dual MAC architecture.
+
+   3/ Look for same sample Blackfin LMS code, see if we can get dual-MAC
+   packing.
+
+   4/ Execute the whole e/c in a block of say 20ms rather than sample
+   by sample.  Processing a few samples every ms is inefficient.
+*/
+
+#else
+static __inline__ void lms_adapt_bg(echo_can_state_t *ec, int clean, int shift)
+{
+    int i;
+
+    int offset1;
+    int offset2;
+    int factor;
+    int exp;
+
+    if (shift > 0)
+	factor = clean << shift;
+    else
+	factor = clean >> -shift;
+
+    /* Update the FIR taps */
+
+    offset2 = ec->curr_pos;
+    offset1 = ec->taps - offset2;
+
+    for (i = ec->taps - 1;  i >= offset1;  i--)
+    {
+       exp = (ec->fir_state_bg.history[i - offset1]*factor);
+       ec->fir_taps16[1][i] += (int16_t) ((exp+(1<<14)) >> 15);
+    }
+    for (  ;  i >= 0;  i--)
+    {
+       exp = (ec->fir_state_bg.history[i + offset2]*factor);
+       ec->fir_taps16[1][i] += (int16_t) ((exp+(1<<14)) >> 15);
+    }
+}
+#endif
+
+/*- End of function --------------------------------------------------------*/
+
+echo_can_state_t *echo_can_create(int len, int adaption_mode)
+{
+    echo_can_state_t *ec;
+    int i;
+    int j;
+
+    ec = (echo_can_state_t *) malloc(sizeof(*ec));
+    if (ec == NULL)
+        return  NULL;
+    memset(ec, 0, sizeof(*ec));
+
+    ec->taps = len;
+    ec->log2taps = top_bit(len);
+    ec->curr_pos = ec->taps - 1;
+    
+    for (i = 0;  i < 2;  i++)
+    {
+        if ((ec->fir_taps16[i] = (int16_t *) malloc((ec->taps)*sizeof(int16_t))) == NULL)
+        {
+            for (j = 0;  j < i;  j++)
+                free(ec->fir_taps16[j]);
+            free(ec);
+            return  NULL;
+        }
+        memset(ec->fir_taps16[i], 0, (ec->taps)*sizeof(int16_t));
+    }
+    
+    fir16_create(&ec->fir_state,
+                 ec->fir_taps16[0],
+                 ec->taps);
+    fir16_create(&ec->fir_state_bg,
+                 ec->fir_taps16[1],
+                 ec->taps);
+
+    for(i=0; i<5; i++) {
+      ec->xvtx[i] = ec->yvtx[i] = ec->xvrx[i] = ec->yvrx[i] = 0;
+    }
+
+    ec->cng_level = 1000;
+    echo_can_adaption_mode(ec, adaption_mode);
+
+    ec->snapshot = (int16_t*)malloc(ec->taps*sizeof(int16_t));
+    memset(ec->snapshot, 0, sizeof(int16_t)*ec->taps);
+
+    ec->cond_met = 0;
+    ec->Pstates = 0;
+    ec->Ltxacc = ec->Lrxacc = ec->Lcleanacc = ec->Lclean_bgacc = 0;
+    ec->Ltx = ec->Lrx = ec->Lclean = ec->Lclean_bg = 0;
+    ec->tx_1 = ec->tx_2 = ec->rx_1 = ec->rx_2 = 0;
+    ec->Lbgn = ec->Lbgn_acc = 0;
+    ec->Lbgn_upper = 200;
+    ec->Lbgn_upper_acc = ec->Lbgn_upper << 13;
+
+    return  ec;
+}
+/*- End of function --------------------------------------------------------*/
+
+void echo_can_free(echo_can_state_t *ec)
+{
+    int i;
+    
+    fir16_free(&ec->fir_state);
+    fir16_free(&ec->fir_state_bg);
+    for (i = 0;  i < 2;  i++)
+        free(ec->fir_taps16[i]);
+    free(ec->snapshot);
+    free(ec);
+}
+/*- End of function --------------------------------------------------------*/
+
+void echo_can_adaption_mode(echo_can_state_t *ec, int adaption_mode)
+{
+    ec->adaption_mode = adaption_mode;
+}
+/*- End of function --------------------------------------------------------*/
+
+void echo_can_flush(echo_can_state_t *ec)
+{
+    int i;
+
+    ec->Ltxacc = ec->Lrxacc = ec->Lcleanacc = ec->Lclean_bgacc = 0;
+    ec->Ltx = ec->Lrx = ec->Lclean = ec->Lclean_bg = 0;
+    ec->tx_1 = ec->tx_2 = ec->rx_1 = ec->rx_2 = 0;
+    
+    ec->Lbgn = ec->Lbgn_acc = 0;
+    ec->Lbgn_upper = 200;
+    ec->Lbgn_upper_acc = ec->Lbgn_upper << 13;
+
+    ec->nonupdate_dwell = 0;
+
+    fir16_flush(&ec->fir_state);
+    fir16_flush(&ec->fir_state_bg);
+    ec->fir_state.curr_pos = ec->taps - 1;
+    ec->fir_state_bg.curr_pos = ec->taps - 1;
+    for (i = 0;  i < 2;  i++)
+        memset(ec->fir_taps16[i], 0, ec->taps*sizeof(int16_t));
+
+    ec->curr_pos = ec->taps - 1;
+    ec->Pstates = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void echo_can_snapshot(echo_can_state_t *ec) {
+    memcpy(ec->snapshot, ec->fir_taps16[0], ec->taps*sizeof(int16_t));
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Dual Path Echo Canceller ------------------------------------------------*/
+
+int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx)
+{
+    int32_t echo_value;
+    int clean_bg;
+    int tmp, tmp1;
+
+    /* Input scaling was found be required to prevent problems when tx
+       starts clipping.  Another possible way to handle this would be the
+       filter coefficent scaling. */
+
+    ec->tx = tx; ec->rx = rx;
+    tx >>=1;
+    rx >>=1;
+
+    /* 
+       Filter DC, 3dB point is 160Hz (I think), note 32 bit precision required
+       otherwise values do not track down to 0. Zero at DC, Pole at (1-Beta)
+       only real axis.  Some chip sets (like Si labs) don't need
+       this, but something like a $10 X100P card does.  Any DC really slows
+       down convergence.
+
+       Note: removes some low frequency from the signal, this reduces
+       the speech quality when listening to samples through headphones
+       but may not be obvious through a telephone handset.
+                                                                    
+       Note that the 3dB frequency in radians is approx Beta, e.g. for
+       Beta = 2^(-3) = 0.125, 3dB freq is 0.125 rads = 159Hz.
+    */
+
+    if (ec->adaption_mode & ECHO_CAN_USE_RX_HPF) {
+      tmp = rx << 15;
+#if 1
+        /* Make sure the gain of the HPF is 1.0. This can still saturate a little under
+           impulse conditions, and it might roll to 32768 and need clipping on sustained peak
+           level signals. However, the scale of such clipping is small, and the error due to
+           any saturation should not markedly affect the downstream processing. */
+        tmp -= (tmp >> 4);
+#endif
+      ec->rx_1 += -(ec->rx_1>>DC_LOG2BETA) + tmp - ec->rx_2;
+
+      /* hard limit filter to prevent clipping.  Note that at this stage
+	 rx should be limited to +/- 16383 due to right shift above */
+      tmp1 = ec->rx_1 >> 15;
+      if (tmp1 > 16383) tmp1 = 16383;
+      if (tmp1 < -16383) tmp1 = -16383;
+      rx = tmp1;
+      ec->rx_2 = tmp;
+    }
+
+    /* Block average of power in the filter states.  Used for
+       adaption power calculation. */
+
+    {
+	int new, old;
+
+	/* efficient "out with the old and in with the new" algorithm so
+	   we don't have to recalculate over the whole block of
+	   samples. */
+	new = (int)tx * (int)tx;
+	old = (int)ec->fir_state.history[ec->fir_state.curr_pos] * 
+              (int)ec->fir_state.history[ec->fir_state.curr_pos];
+	ec->Pstates += ((new - old) + (1<<(ec->log2taps-1))) >> ec->log2taps;
+	if (ec->Pstates < 0) ec->Pstates = 0;
+    }
+
+    /* Calculate short term average levels using simple single pole IIRs */
+    
+    ec->Ltxacc += abs(tx) - ec->Ltx;
+    ec->Ltx = (ec->Ltxacc + (1<<4)) >> 5;
+    ec->Lrxacc += abs(rx) - ec->Lrx;
+    ec->Lrx = (ec->Lrxacc + (1<<4)) >> 5;
+
+    /* Foreground filter ---------------------------------------------------*/
+
+    ec->fir_state.coeffs = ec->fir_taps16[0];
+    echo_value = fir16(&ec->fir_state, tx);
+    ec->clean = rx - echo_value;
+    ec->Lcleanacc += abs(ec->clean) - ec->Lclean;
+    ec->Lclean = (ec->Lcleanacc + (1<<4)) >> 5;
+
+    /* Background filter ---------------------------------------------------*/
+
+    echo_value = fir16(&ec->fir_state_bg, tx);
+    clean_bg = rx - echo_value;
+    ec->Lclean_bgacc += abs(clean_bg) - ec->Lclean_bg;
+    ec->Lclean_bg = (ec->Lclean_bgacc + (1<<4)) >> 5;
+
+    /* Background Filter adaption -----------------------------------------*/
+
+    /* Almost always adap bg filter, just simple DT and energy
+       detection to minimise adaption in cases of strong double talk.
+       However this is not critical for the dual path algorithm.
+    */
+    ec->factor = 0;
+    ec->shift = 0;
+    if ((ec->nonupdate_dwell == 0)) {
+	int   P, logP, shift;
+
+	/* Determine:
+
+	   f = Beta * clean_bg_rx/P ------ (1)
+
+	   where P is the total power in the filter states.
+	   
+	   The Boffins have shown that if we obey (1) we converge
+	   quickly and avoid instability.  
+	   
+	   The correct factor f must be in Q30, as this is the fixed
+	   point format required by the lms_adapt_bg() function,
+	   therefore the scaled version of (1) is:
+
+	   (2^30) * f  = (2^30) * Beta * clean_bg_rx/P    
+	       factor  = (2^30) * Beta * clean_bg_rx/P         ----- (2)
+
+	   We have chosen Beta = 0.25 by experiment, so:
+
+	       factor  = (2^30) * (2^-2) * clean_bg_rx/P  
+
+                                       (30 - 2 - log2(P))
+	       factor  = clean_bg_rx 2                         ----- (3)
+	   
+	   To avoid a divide we approximate log2(P) as top_bit(P),
+	   which returns the position of the highest non-zero bit in
+	   P.  This approximation introduces an error as large as a
+	   factor of 2, but the algorithm seems to handle it OK.
+
+	   Come to think of it a divide may not be a big deal on a 
+	   modern DSP, so its probably worth checking out the cycles
+	   for a divide versus a top_bit() implementation.
+	*/
+
+	P = MIN_TX_POWER_FOR_ADAPTION + ec->Pstates;
+	logP = top_bit(P) + ec->log2taps;
+	shift = 30 - 2 - logP;
+	ec->shift = shift;
+
+	lms_adapt_bg(ec, clean_bg, shift);
+    }
+
+    /* very simple DTD to make sure we dont try and adapt with strong
+       near end speech */
+
+    ec->adapt = 0;
+    if ((ec->Lrx > MIN_RX_POWER_FOR_ADAPTION) && (ec->Lrx > ec->Ltx)) 
+	ec->nonupdate_dwell = DTD_HANGOVER;
+    if (ec->nonupdate_dwell)
+	ec->nonupdate_dwell--;
+
+    /* Transfer logic ------------------------------------------------------*/
+
+    /* These conditions are from the dual path paper [1], I messed with
+       them a bit to improve performance. */
+
+    if ((ec->adaption_mode & ECHO_CAN_USE_ADAPTION) &&
+	(ec->nonupdate_dwell == 0) && 
+	(8*ec->Lclean_bg < 7*ec->Lclean) /* (ec->Lclean_bg < 0.875*ec->Lclean) */ && 
+	(8*ec->Lclean_bg < ec->Ltx)      /* (ec->Lclean_bg < 0.125*ec->Ltx)    */ )       
+    {
+	if (ec->cond_met == 6) {
+	    /* BG filter has had better results for 6 consecutive samples */
+	    ec->adapt = 1;
+	    memcpy(ec->fir_taps16[0], ec->fir_taps16[1], ec->taps*sizeof(int16_t));
+	}
+	else
+	    ec->cond_met++;
+    }
+    else
+	ec->cond_met = 0;
+
+    /* Non-Linear Processing ---------------------------------------------------*/
+
+    ec->clean_nlp = ec->clean;
+    if (ec->adaption_mode & ECHO_CAN_USE_NLP)
+    {
+        /* Non-linear processor - a fancy way to say "zap small signals, to avoid
+           residual echo due to (uLaw/ALaw) non-linearity in the channel.". */
+
+      if ((16*ec->Lclean < ec->Ltx))
+      {
+	/* Our e/c has improved echo by at least 24 dB (each factor of 2 is 6dB,
+	   so 2*2*2*2=16 is the same as 6+6+6+6=24dB) */
+        if (ec->adaption_mode & ECHO_CAN_USE_CNG)
+	{
+	    ec->cng_level = ec->Lbgn;
+
+	    /* Very elementary comfort noise generation.  Just random
+	       numbers rolled off very vaguely Hoth-like.  DR: This
+	       noise doesn't sound quite right to me - I suspect there
+	       are some overlfow issues in the filtering as it's too
+	       "crackly".  TODO: debug this, maybe just play noise at
+	       high level or look at spectrum.
+	    */
+
+	    ec->cng_rndnum = 1664525U*ec->cng_rndnum + 1013904223U;
+	    ec->cng_filter = ((ec->cng_rndnum & 0xFFFF) - 32768 + 5*ec->cng_filter) >> 3;
+	    ec->clean_nlp = (ec->cng_filter*ec->cng_level*8) >> 14;
+
+        }
+        else if (ec->adaption_mode & ECHO_CAN_USE_CLIP)
+	{
+	    /* This sounds much better than CNG */
+	    if (ec->clean_nlp > ec->Lbgn)
+	      ec->clean_nlp = ec->Lbgn;
+	    if (ec->clean_nlp < -ec->Lbgn)
+	      ec->clean_nlp = -ec->Lbgn;
+	}
+	else
+        {
+	  /* just mute the residual, doesn't sound very good, used mainly
+	     in G168 tests */
+          ec->clean_nlp = 0;
+        }
+      }
+      else {
+	  /* Background noise estimator.  I tried a few algorithms
+	     here without much luck.  This very simple one seems to
+	     work best, we just average the level using a slow (1 sec
+	     time const) filter if the current level is less than a
+	     (experimentally derived) constant.  This means we dont
+	     include high level signals like near end speech.  When
+	     combined with CNG or especially CLIP seems to work OK.
+	  */
+	  if (ec->Lclean < 40) {
+	      ec->Lbgn_acc += abs(ec->clean) - ec->Lbgn;
+	      ec->Lbgn = (ec->Lbgn_acc + (1<<11)) >> 12;
+	  }
+       }
+    }
+
+    /* Roll around the taps buffer */
+    if (ec->curr_pos <= 0)
+        ec->curr_pos = ec->taps;
+    ec->curr_pos--;
+
+    if (ec->adaption_mode & ECHO_CAN_DISABLE)
+      ec->clean_nlp = rx;
+
+    /* Output scaled back up again to match input scaling */
+
+    return (int16_t) ec->clean_nlp << 1;
+}
+
+/*- End of function --------------------------------------------------------*/
+
+/* This function is seperated from the echo canceller is it is usually called
+   as part of the tx process.  See rx HP (DC blocking) filter above, it's
+   the same design.
+
+   Some soft phones send speech signals with a lot of low frequency
+   energy, e.g. down to 20Hz.  This can make the hybrid non-linear
+   which causes the echo canceller to fall over.  This filter can help
+   by removing any low frequency before it gets to the tx port of the
+   hybrid.
+
+   It can also help by removing and DC in the tx signal.  DC is bad
+   for LMS algorithms.
+
+   This is one of the classic DC removal filters, adjusted to provide sufficient
+   bass rolloff to meet the above requirement to protect hybrids from things that
+   upset them. The difference between successive samples produces a lousy HPF, and
+   then a suitably placed pole flattens things out. The final result is a nicely
+   rolled off bass end. The filtering is implemented with extended fractional
+   precision, which noise shapes things, giving very clean DC removal.
+*/
+
+int16_t echo_can_hpf_tx(echo_can_state_t *ec, int16_t tx) {
+    int tmp, tmp1;
+
+    if (ec->adaption_mode & ECHO_CAN_USE_TX_HPF) {
+        tmp = tx << 15;
+#if 1
+        /* Make sure the gain of the HPF is 1.0. The first can still saturate a little under
+           impulse conditions, and it might roll to 32768 and need clipping on sustained peak
+           level signals. However, the scale of such clipping is small, and the error due to
+           any saturation should not markedly affect the downstream processing. */
+        tmp -= (tmp >> 4);
+#endif
+        ec->tx_1 += -(ec->tx_1>>DC_LOG2BETA) + tmp - ec->tx_2;
+        tmp1 = ec->tx_1 >> 15;
+	if (tmp1 > 32767) tmp1 = 32767;
+	if (tmp1 < -32767) tmp1 = -32767;
+	tx = tmp1;
+        ec->tx_2 = tmp;
+    }
+    
+    return tx;
+}
+
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/fax.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,617 @@
+//#define LOG_FAX_AUDIO
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fax.c - Analogue line ITU T.30 FAX transfer processing
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003, 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: fax.c,v 1.52 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <fcntl.h>
+#include <time.h>
+#if defined(LOG_FAX_AUDIO)
+#include <unistd.h>
+#endif
+
+#include <tiffio.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/queue.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/complex.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/silence_gen.h"
+#include "spandsp/fsk.h"
+#include "spandsp/v29rx.h"
+#include "spandsp/v29tx.h"
+#include "spandsp/v27ter_rx.h"
+#include "spandsp/v27ter_tx.h"
+#if defined(ENABLE_V17)
+#include "spandsp/v17rx.h"
+#include "spandsp/v17tx.h"
+#endif
+#include "spandsp/t4.h"
+
+#include "spandsp/t30_fcf.h"
+#include "spandsp/t35.h"
+#include "spandsp/t30.h"
+
+#include "spandsp/fax.h"
+
+static void fax_send_hdlc(void *user_data, const uint8_t *msg, int len)
+{
+    fax_state_t *s;
+
+    s = (fax_state_t *) user_data;
+    
+    hdlc_tx_frame(&(s->hdlctx), msg, len);
+    s->first_tx_hdlc_frame = FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int dummy_rx(void *s, const int16_t amp[], int len)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(ENABLE_V17)
+static int early_v17_rx(void *user_data, const int16_t amp[], int len)
+{
+    fax_state_t *s;
+
+    s = (fax_state_t *) user_data;
+    v17_rx(&(s->v17rx), amp, len);
+    fsk_rx(&(s->v21rx), amp, len);
+    if (s->t30_state.rx_trained)
+    {
+        /* The fast modem has trained, so we no longer need to run the slow
+           one in parallel. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.17 + V.21 to V.17 (%.2fdBm0)\n", v17_rx_signal_power(&(s->v17rx)));
+        s->rx_handler = (span_rx_handler_t *) &v17_rx;
+        s->rx_user_data = &(s->v17rx);
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static int early_v27ter_rx(void *user_data, const int16_t amp[], int len)
+{
+    fax_state_t *s;
+
+    s = (fax_state_t *) user_data;
+    v27ter_rx(&(s->v27ter_rx), amp, len);
+    fsk_rx(&(s->v21rx), amp, len);
+    if (s->t30_state.rx_trained)
+    {
+        /* The fast modem has trained, so we no longer need to run the slow
+           one in parallel. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.27ter + V.21 to V.27ter (%.2fdBm0)\n", v27ter_rx_signal_power(&(s->v27ter_rx)));
+        s->rx_handler = (span_rx_handler_t *) &v27ter_rx;
+        s->rx_user_data = &(s->v27ter_rx);
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int early_v29_rx(void *user_data, const int16_t amp[], int len)
+{
+    fax_state_t *s;
+
+    s = (fax_state_t *) user_data;
+    v29_rx(&(s->v29rx), amp, len);
+    fsk_rx(&(s->v21rx), amp, len);
+    if (s->t30_state.rx_trained)
+    {
+        /* The fast modem has trained, so we no longer need to run the slow
+           one in parallel. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.29 + V.21 to V.29 (%.2fdBm0)\n", v29_rx_signal_power(&(s->v29rx)));
+        s->rx_handler = (span_rx_handler_t *) &v29_rx;
+        s->rx_user_data = &(s->v29rx);
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int fax_rx(fax_state_t *s, int16_t *amp, int len)
+{
+    int i;
+
+#if defined(LOG_FAX_AUDIO)
+    if (s->fax_audio_rx_log >= 0)
+        write(s->fax_audio_rx_log, amp, len*sizeof(int16_t));
+#endif
+    for (i = 0;  i < len;  i++)
+        amp[i] = dc_restore(&(s->dc_restore), amp[i]);
+    s->rx_handler(s->rx_user_data, amp, len);
+    t30_timer_update(&(s->t30_state), len);
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int set_next_tx_type(fax_state_t *s)
+{
+    if (s->next_tx_handler)
+    {
+        s->tx_handler = s->next_tx_handler;
+        s->tx_user_data = s->next_tx_user_data;
+        s->next_tx_handler = NULL;
+        return 0;
+    }
+    /* If there is nothing else to change to, so use zero length silence */
+    silence_gen_alter(&(s->silence_gen), 0);
+    s->tx_handler = (span_tx_handler_t *) &silence_gen;
+    s->tx_user_data = &(s->silence_gen);
+    s->next_tx_handler = NULL;
+    s->transmit = FALSE;
+    return -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+int fax_tx(fax_state_t *s, int16_t *amp, int max_len)
+{
+    int len;
+#if defined(LOG_FAX_AUDIO)
+    int required_len;
+    
+    required_len = max_len;
+#endif
+    len = 0;
+    if (s->transmit)
+    {
+        while ((len += s->tx_handler(s->tx_user_data, amp + len, max_len - len)) < max_len)
+        {
+            /* Allow for a change of tx handler within a block */
+            if (set_next_tx_type(s)  &&  s->current_tx_type != T30_MODEM_NONE  &&  s->current_tx_type != T30_MODEM_DONE)
+                t30_send_complete(&(s->t30_state));
+            if (!s->transmit)
+            {
+                if (s->transmit_on_idle)
+                {
+                    /* Pad to the requested length with silence */
+                    memset(amp + len, 0, (max_len - len)*sizeof(int16_t));
+                    len = max_len;        
+                }
+                break;
+            }
+        }
+    }
+    else
+    {
+        if (s->transmit_on_idle)
+        {
+            /* Pad to the requested length with silence */
+            memset(amp, 0, max_len*sizeof(int16_t));
+            len = max_len;        
+        }
+    }
+#if defined(LOG_FAX_AUDIO)
+    if (s->fax_audio_tx_log >= 0)
+    {
+        if (len < required_len)
+            memset(amp + len, 0, (required_len - len)*sizeof(int16_t));
+        write(s->fax_audio_tx_log, amp, required_len*sizeof(int16_t));
+    }
+#endif
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void fax_set_rx_type(void *user_data, int type, int short_train, int use_hdlc)
+{
+    fax_state_t *s;
+    put_bit_func_t put_bit_func;
+    void *put_bit_user_data;
+
+    s = (fax_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Set rx type %d\n", type);
+    if (s->current_rx_type == type)
+        return;
+    s->current_rx_type = type;
+    if (use_hdlc)
+    {
+        put_bit_func = (put_bit_func_t) hdlc_rx_put_bit;
+        put_bit_user_data = (void *) &(s->hdlcrx);
+        hdlc_rx_init(&(s->hdlcrx), FALSE, FALSE, 5, t30_hdlc_accept, &(s->t30_state));
+    }
+    else
+    {
+        put_bit_func = t30_non_ecm_put_bit;
+        put_bit_user_data = (void *) &(s->t30_state);
+    }
+    switch (type)
+    {
+    case T30_MODEM_V21:
+        if (s->flush_handler)
+            s->flush_handler(s, s->flush_user_data, 3);
+        fsk_rx_init(&(s->v21rx), &preset_fsk_specs[FSK_V21CH2], TRUE, (put_bit_func_t) hdlc_rx_put_bit, put_bit_user_data);
+        s->rx_handler = (span_rx_handler_t *) &fsk_rx;
+        s->rx_user_data = &(s->v21rx);
+        break;
+    case T30_MODEM_V27TER_2400:
+        v27ter_rx_restart(&(s->v27ter_rx), 2400, FALSE);
+        v27ter_rx_set_put_bit(&(s->v27ter_rx), put_bit_func, put_bit_user_data);
+        s->rx_handler = (span_rx_handler_t *) &early_v27ter_rx;
+        s->rx_user_data = s;
+        break;
+    case T30_MODEM_V27TER_4800:
+        v27ter_rx_restart(&(s->v27ter_rx), 4800, FALSE);
+        v27ter_rx_set_put_bit(&(s->v27ter_rx), put_bit_func, put_bit_user_data);
+        s->rx_handler = (span_rx_handler_t *) &early_v27ter_rx;
+        s->rx_user_data = s;
+        break;
+    case T30_MODEM_V29_7200:
+        v29_rx_restart(&(s->v29rx), 7200, FALSE);
+        v29_rx_set_put_bit(&(s->v29rx), put_bit_func, put_bit_user_data);
+        s->rx_handler = (span_rx_handler_t *) &early_v29_rx;
+        s->rx_user_data = s;
+        break;
+    case T30_MODEM_V29_9600:
+        v29_rx_restart(&(s->v29rx), 9600, FALSE);
+        v29_rx_set_put_bit(&(s->v29rx), put_bit_func, put_bit_user_data);
+        s->rx_handler = (span_rx_handler_t *) &early_v29_rx;
+        s->rx_user_data = s;
+        break;
+#if defined(ENABLE_V17)
+    case T30_MODEM_V17_7200:
+        v17_rx_restart(&(s->v17rx), 7200, short_train);
+        v17_rx_set_put_bit(&(s->v17rx), put_bit_func, put_bit_user_data);
+        s->rx_handler = (span_rx_handler_t *) &early_v17_rx;
+        s->rx_user_data = s;
+        break;
+    case T30_MODEM_V17_9600:
+        v17_rx_restart(&(s->v17rx), 9600, short_train);
+        v17_rx_set_put_bit(&(s->v17rx), put_bit_func, put_bit_user_data);
+        s->rx_handler = (span_rx_handler_t *) &early_v17_rx;
+        s->rx_user_data = s;
+        break;
+    case T30_MODEM_V17_12000:
+        v17_rx_restart(&(s->v17rx), 12000, short_train);
+        v17_rx_set_put_bit(&(s->v17rx), put_bit_func, put_bit_user_data);
+        s->rx_handler = (span_rx_handler_t *) &early_v17_rx;
+        s->rx_user_data = s;
+        break;
+    case T30_MODEM_V17_14400:
+        v17_rx_restart(&(s->v17rx), 14400, short_train);
+        v17_rx_set_put_bit(&(s->v17rx), put_bit_func, put_bit_user_data);
+        s->rx_handler = (span_rx_handler_t *) &early_v17_rx;
+        s->rx_user_data = s;
+        break;
+#endif
+    case T30_MODEM_DONE:
+        span_log(&s->logging, SPAN_LOG_FLOW, "FAX exchange complete\n");
+    default:
+        s->rx_handler = (span_rx_handler_t *) &dummy_rx;
+        s->rx_user_data = s;
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void fax_set_tx_type(void *user_data, int type, int short_train, int use_hdlc)
+{
+    fax_state_t *s;
+    tone_gen_descriptor_t tone_desc;
+    get_bit_func_t get_bit_func;
+    void *get_bit_user_data;
+
+    s = (fax_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Set tx type %d\n", type);
+    if (s->current_tx_type == type)
+        return;
+    s->first_tx_hdlc_frame = TRUE;
+    if (use_hdlc)
+    {
+        get_bit_func = (get_bit_func_t) hdlc_tx_get_bit;
+        get_bit_user_data = (void *) &(s->hdlctx);
+    }
+    else
+    {
+        get_bit_func = t30_non_ecm_get_bit;
+        get_bit_user_data = (void *) &(s->t30_state);
+    }
+    switch (type)
+    {
+    case T30_MODEM_PAUSE:
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(short_train));
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = NULL;
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_CNG:
+        /* 0.5s of 1100Hz+-38Hz + 3.0s of silence repeating. Timing +-15% */
+        make_tone_gen_descriptor(&tone_desc,
+                                 1100,
+                                 -11,
+                                 0,
+                                 0,
+                                 500,
+                                 3000,
+                                 0,
+                                 0,
+                                 TRUE);
+        tone_gen_init(&(s->tone_gen), &tone_desc);
+        s->tx_handler = (span_tx_handler_t *) &tone_gen;
+        s->tx_user_data = &(s->tone_gen);
+        s->next_tx_handler = NULL;
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_CED:
+        /* 0.2s of silence, then 2.6s to 4s of 2100Hz+-15Hz tone, then 75ms of silence. The 75ms of silence
+           will be inserted by the pre V.21 pause we use for any switch to V.21. */
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(200));
+        make_tone_gen_descriptor(&tone_desc,
+                                 2100,
+                                 -11,
+                                 0,
+                                 0,
+                                 2600,
+                                 0,
+                                 0,
+                                 0,
+                                 FALSE);
+        tone_gen_init(&(s->tone_gen), &tone_desc);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &tone_gen;
+        s->next_tx_user_data = &(s->tone_gen);
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_V21:
+        fsk_tx_init(&(s->v21tx), &preset_fsk_specs[FSK_V21CH2], get_bit_func, get_bit_user_data);
+        /* The spec says 1s +-15% of preamble. So, the minimum is 32 octets. */
+        hdlc_tx_preamble(&(s->hdlctx), 32);
+        /* Pause before switching from phase C, as per T.30 5.3.2.2. If we omit this, the receiver
+           might not see the carrier fall between the high speed and low speed sections. In practice,
+           a 75ms gap before any V.21 transmission is harmless, adds little to the overall length of
+           a call, and ensures the receiving end is ready. */
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(75));
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &fsk_tx;
+        s->next_tx_user_data = &(s->v21tx);
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_V27TER_2400:
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(75));
+        v27ter_tx_restart(&(s->v27ter_tx), 2400, s->use_tep);
+        v27ter_tx_set_get_bit(&(s->v27ter_tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &v27ter_tx;
+        s->next_tx_user_data = &(s->v27ter_tx);
+        hdlc_tx_preamble(&(s->hdlctx), 60);
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_V27TER_4800:
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(75));
+        v27ter_tx_restart(&(s->v27ter_tx), 4800, s->use_tep);
+        v27ter_tx_set_get_bit(&(s->v27ter_tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &v27ter_tx;
+        s->next_tx_user_data = &(s->v27ter_tx);
+        hdlc_tx_preamble(&(s->hdlctx), 120);
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_V29_7200:
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(75));
+        v29_tx_restart(&(s->v29tx), 7200, s->use_tep);
+        v29_tx_set_get_bit(&(s->v29tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &v29_tx;
+        s->next_tx_user_data = &(s->v29tx);
+        hdlc_tx_preamble(&(s->hdlctx), 180);
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_V29_9600:
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(75));
+        v29_tx_restart(&(s->v29tx), 9600, s->use_tep);
+        v29_tx_set_get_bit(&(s->v29tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &v29_tx;
+        s->next_tx_user_data = &(s->v29tx);
+        hdlc_tx_preamble(&(s->hdlctx), 240);
+        s->transmit = TRUE;
+        break;
+#if defined(ENABLE_V17)
+    case T30_MODEM_V17_7200:
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 7200, s->use_tep, short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &v17_tx;
+        s->next_tx_user_data = &(s->v17tx);
+        hdlc_tx_preamble(&(s->hdlctx), 180);
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_V17_9600:
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 9600, s->use_tep, short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &v17_tx;
+        s->next_tx_user_data = &(s->v17tx);
+        hdlc_tx_preamble(&(s->hdlctx), 240);
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_V17_12000:
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 12000, s->use_tep, short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &v17_tx;
+        s->next_tx_user_data = &(s->v17tx);
+        hdlc_tx_preamble(&(s->hdlctx), 300);
+        s->transmit = TRUE;
+        break;
+    case T30_MODEM_V17_14400:
+        silence_gen_alter(&(s->silence_gen), ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 14400, s->use_tep, short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &v17_tx;
+        s->next_tx_user_data = &(s->v17tx);
+        hdlc_tx_preamble(&(s->hdlctx), 360);
+        s->transmit = TRUE;
+        break;
+#endif
+    case T30_MODEM_DONE:
+        span_log(&s->logging, SPAN_LOG_FLOW, "FAX exchange complete\n");
+        /* Fall through */
+    default:
+        silence_gen_alter(&(s->silence_gen), 0);
+        s->tx_handler = (span_tx_handler_t *) &silence_gen;
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = NULL;
+        s->transmit = FALSE;
+        break;
+    }
+    s->current_tx_type = type;
+}
+/*- End of function --------------------------------------------------------*/
+
+void fax_set_transmit_on_idle(fax_state_t *s, int transmit_on_idle)
+{
+    s->transmit_on_idle = transmit_on_idle;
+}
+/*- End of function --------------------------------------------------------*/
+
+void fax_set_tep_mode(fax_state_t *s, int use_tep)
+{
+    s->use_tep = use_tep;
+}
+/*- End of function --------------------------------------------------------*/
+
+int fax_init(fax_state_t *s, int calling_party)
+{
+    memset(s, 0, sizeof(*s));
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "FAX");
+    t30_init(&(s->t30_state),
+             calling_party,
+             fax_set_rx_type,
+             (void *) s,
+             fax_set_tx_type,
+             (void *) s,
+             fax_send_hdlc,
+             (void *) s);
+    t30_set_supported_modems(&(s->t30_state),
+#if defined(ENABLE_V17)
+                             T30_SUPPORT_V27TER | T30_SUPPORT_V29 | T30_SUPPORT_V17);
+#else    
+                             T30_SUPPORT_V27TER | T30_SUPPORT_V29);
+#endif
+    hdlc_rx_init(&(s->hdlcrx), FALSE, FALSE, 5, t30_hdlc_accept, &(s->t30_state));
+    fsk_rx_init(&(s->v21rx), &preset_fsk_specs[FSK_V21CH2], TRUE, (put_bit_func_t) hdlc_rx_put_bit, &(s->hdlcrx));
+    hdlc_tx_init(&(s->hdlctx), FALSE, 2, FALSE, t30_send_complete, &(s->t30_state));
+    s->first_tx_hdlc_frame = TRUE;
+    fsk_tx_init(&(s->v21tx), &preset_fsk_specs[FSK_V21CH2], (get_bit_func_t) hdlc_tx_get_bit, &(s->hdlctx));
+#if defined(ENABLE_V17)
+    v17_rx_init(&(s->v17rx), 14400, t30_non_ecm_put_bit, &(s->t30_state));
+    v17_tx_init(&(s->v17tx), 14400, s->use_tep, t30_non_ecm_get_bit, &(s->t30_state));
+#endif
+    v29_rx_init(&(s->v29rx), 9600, t30_non_ecm_put_bit, &(s->t30_state));
+    v29_rx_signal_cutoff(&(s->v29rx), -45.5);
+    v29_tx_init(&(s->v29tx), 9600, s->use_tep, t30_non_ecm_get_bit, &(s->t30_state));
+    v27ter_rx_init(&(s->v27ter_rx), 4800, t30_non_ecm_put_bit, &(s->t30_state));
+    v27ter_tx_init(&(s->v27ter_tx), 4800, s->use_tep, t30_non_ecm_get_bit, &(s->t30_state));
+    silence_gen_init(&(s->silence_gen), 0);
+    dc_restore_init(&(s->dc_restore));
+    t30_restart(&(s->t30_state));
+#if defined(LOG_FAX_AUDIO)
+    {
+        char buf[100 + 1];
+        struct tm *tm;
+        time_t now;
+
+        time(&now);
+        tm = localtime(&now);
+        sprintf(buf,
+                "/tmp/fax-rx-audio-%x-%02d%02d%02d%02d%02d%02d",
+                s,
+                tm->tm_year%100,
+                tm->tm_mon + 1,
+                tm->tm_mday,
+                tm->tm_hour,
+                tm->tm_min,
+                tm->tm_sec);
+        s->fax_audio_rx_log = open(buf, O_CREAT | O_TRUNC | O_WRONLY, 0666);
+        sprintf(buf,
+                "/tmp/fax-tx-audio-%x-%02d%02d%02d%02d%02d%02d",
+                s,
+                tm->tm_year%100,
+                tm->tm_mon + 1,
+                tm->tm_mday,
+                tm->tm_hour,
+                tm->tm_min,
+                tm->tm_sec);
+        s->fax_audio_tx_log = open(buf, O_CREAT | O_TRUNC | O_WRONLY, 0666);
+    }
+#endif
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int fax_release(fax_state_t *s)
+{
+    t30_release(&s->t30_state);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void fax_set_flush_handler(fax_state_t *s, fax_flush_handler_t *handler, void *user_data)
+{
+    s->flush_handler = handler;
+    s->flush_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/faxfont.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,4638 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * faxfont.h - a simple fixed pitch font for FAX headers
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: faxfont.h,v 1.3 2006/10/24 13:45:25 steveu Exp $
+ */
+
+static const uint32_t header_font[256][16] =
+{
+    { /* 0 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 1 */
+        0x0,
+        0x0,
+        0x3FFC,
+        0xC003,
+        0xCC33,
+        0xC003,
+        0xC003,
+        0xCFF3,
+        0xC3C3,
+        0xC003,
+        0xC003,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 2 */
+        0x0,
+        0x0,
+        0x3FFC,
+        0xFFFF,
+        0xF3CF,
+        0xFFFF,
+        0xFFFF,
+        0xF00F,
+        0xFC3F,
+        0xFFFF,
+        0xFFFF,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 3 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1E78,
+        0x7FFE,
+        0x7FFE,
+        0x7FFE,
+        0x7FFE,
+        0x1FF8,
+        0x7E0,
+        0x180,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 4 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x180,
+        0x7E0,
+        0x1FF8,
+        0x7FFE,
+        0x1FF8,
+        0x7E0,
+        0x180,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 5 */
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0xFF0,
+        0xFF0,
+        0x7C3E,
+        0x7C3E,
+        0x7C3E,
+        0x63C6,
+        0x3C0,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 6 */
+        0x0,
+        0x0,
+        0x0,
+        0x180,
+        0x7E0,
+        0x1FF8,
+        0x7FFE,
+        0x7FFE,
+        0x1FF8,
+        0x180,
+        0x180,
+        0x7E0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 7 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0xFF0,
+        0xFF0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 8 */
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFC3F,
+        0xF00F,
+        0xF00F,
+        0xFC3F,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+    },
+    { /* 9 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFF0,
+        0x3C3C,
+        0x300C,
+        0x300C,
+        0x3C3C,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 10 */
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xF00F,
+        0xC3C3,
+        0xCFF3,
+        0xCFF3,
+        0xC3C3,
+        0xF00F,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+    },
+    { /* 11 */
+        0x0,
+        0x0,
+        0x1FE,
+        0x7E,
+        0x1F6,
+        0x786,
+        0x1FE0,
+        0x3870,
+        0x3870,
+        0x3870,
+        0x3870,
+        0x1FE0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 12 */
+        0x0,
+        0x0,
+        0xFF0,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0xFF0,
+        0x3C0,
+        0x3FFC,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 13 */
+        0x0,
+        0x0,
+        0xFFE,
+        0xF0E,
+        0xFFE,
+        0xE00,
+        0xE00,
+        0xE00,
+        0xE00,
+        0x3E00,
+        0x7E00,
+        0x3C00,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 14 */
+        0x0,
+        0x0,
+        0x1FFE,
+        0x1C0E,
+        0x1FFE,
+        0x1C0E,
+        0x1C0E,
+        0x1C0E,
+        0x1C0E,
+        0x1C1E,
+        0x3C3E,
+        0x7C1C,
+        0x3800,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 15 */
+        0x0,
+        0x0,
+        0x0,
+        0x4002,
+        0x23C4,
+        0x13C8,
+        0xE70,
+        0x781E,
+        0xE70,
+        0x13C8,
+        0x23C4,
+        0x4002,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 16 */
+        0x0,
+        0x3000,
+        0x3C00,
+        0x3F00,
+        0x3FC0,
+        0x3FF0,
+        0x3FF8,
+        0x3FF0,
+        0x3FC0,
+        0x3F00,
+        0x3C00,
+        0x3000,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 17 */
+        0x0,
+        0xC,
+        0x3C,
+        0xFC,
+        0x3FC,
+        0xFFC,
+        0x1FFC,
+        0xFFC,
+        0x3FC,
+        0xFC,
+        0x3C,
+        0xC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 18 */
+        0x0,
+        0x180,
+        0x3C0,
+        0xFF0,
+        0x3FFC,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3FFC,
+        0xFF0,
+        0x3C0,
+        0x180,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 19 */
+        0x0,
+        0x0,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0x0,
+        0x3C3C,
+        0x3C3C,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 20 */
+        0x0,
+        0x0,
+        0x3FFE,
+        0x71CE,
+        0x71CE,
+        0x71CE,
+        0x3FCE,
+        0x1CE,
+        0x1CE,
+        0x1CE,
+        0x1CE,
+        0x1CE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 21 */
+        0x0,
+        0x3FF0,
+        0x7038,
+        0x3C18,
+        0xFC0,
+        0x3CF0,
+        0x7038,
+        0x7038,
+        0x7038,
+        0x3CF0,
+        0xFC0,
+        0x60F0,
+        0x7038,
+        0x3FF0,
+        0x0,
+        0x0,
+    },
+    { /* 22 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3FFC,
+        0x3FFC,
+        0x3FFC,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 23 */
+        0x0,
+        0x180,
+        0x3C0,
+        0xFF0,
+        0x3FFC,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3FFC,
+        0xFF0,
+        0x3C0,
+        0x180,
+        0x3FFC,
+        0x0,
+        0x0,
+    },
+    { /* 24 */
+        0x0,
+        0x0,
+        0x180,
+        0x3C0,
+        0xFF0,
+        0x3FFC,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 25 */
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3FFC,
+        0xFF0,
+        0x3C0,
+        0x180,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 26 */
+        0x0,
+        0x0,
+        0x0,
+        0x40,
+        0x60,
+        0x70,
+        0x78,
+        0x3FFC,
+        0x78,
+        0x70,
+        0x60,
+        0x40,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 27 */
+        0x0,
+        0x0,
+        0x0,
+        0x200,
+        0x600,
+        0xE00,
+        0x1E00,
+        0x3FFC,
+        0x1E00,
+        0xE00,
+        0x600,
+        0x200,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 28 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3800,
+        0x3800,
+        0x3800,
+        0x3800,
+        0x3FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 29 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x420,
+        0xC30,
+        0x1C38,
+        0x3FFC,
+        0x1C38,
+        0xC30,
+        0x420,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 30 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x180,
+        0x7E0,
+        0x7E0,
+        0x1FF8,
+        0x1FF8,
+        0x7FFE,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 31 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFC,
+        0xFFFC,
+        0x3FF0,
+        0x3FF0,
+        0xFC0,
+        0xFC0,
+        0x300,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 32 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 33 */
+        0x0,
+        0x0,
+        0x3C0,
+        0x7E0,
+        0x7E0,
+        0x7E0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 34 */
+        0x0,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0xC30,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 35 */
+        0x0,
+        0x0,
+        0x0,
+        0x1C38,
+        0x1C38,
+        0x7FFE,
+        0x1C38,
+        0x1C38,
+        0x1C38,
+        0x7FFE,
+        0x1C38,
+        0x1C38,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 36 */
+        0x0,
+        0x1E0,
+        0x1E0,
+        0x1FF8,
+        0x781E,
+        0x7806,
+        0x7800,
+        0x1FF8,
+        0x1E,
+        0x601E,
+        0x781E,
+        0x1FF8,
+        0x1E0,
+        0x1E0,
+        0x0,
+        0x0,
+    },
+    { /* 37 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x7806,
+        0x781E,
+        0x78,
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x781E,
+        0x601E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 38 */
+        0x0,
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x1E78,
+        0x7E0,
+        0x1F9E,
+        0x79F8,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 39 */
+        0x0,
+        0xF00,
+        0xF00,
+        0xF00,
+        0x3C00,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 40 */
+        0x0,
+        0x0,
+        0xF0,
+        0x3C0,
+        0xF00,
+        0xF00,
+        0xF00,
+        0xF00,
+        0xF00,
+        0xF00,
+        0x3C0,
+        0xF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 41 */
+        0x0,
+        0x0,
+        0xF00,
+        0x3C0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0x3C0,
+        0xF00,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 42 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C3C,
+        0xFF0,
+        0x7FFE,
+        0xFF0,
+        0x3C3C,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 43 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x3FFC,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 44 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xF00,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 45 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 46 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 47 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x6,
+        0x1E,
+        0x78,
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x7800,
+        0x6000,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 48 */
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x787E,
+        0x799E,
+        0x799E,
+        0x7E1E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 49 */
+        0x0,
+        0x0,
+        0x3C0,
+        0xFC0,
+        0x3FC0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 50 */
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x1E,
+        0x78,
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x7800,
+        0x781E,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 51 */
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x1E,
+        0x1E,
+        0x7F8,
+        0x1E,
+        0x1E,
+        0x1E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 52 */
+        0x0,
+        0x0,
+        0x78,
+        0x1F8,
+        0x7F8,
+        0x1E78,
+        0x7878,
+        0x7FFE,
+        0x78,
+        0x78,
+        0x78,
+        0x1FE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 53 */
+        0x0,
+        0x0,
+        0x7FFE,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x7FF8,
+        0x7E,
+        0x1E,
+        0x1E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 54 */
+        0x0,
+        0x0,
+        0x7E0,
+        0x1E00,
+        0x7800,
+        0x7800,
+        0x7FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 55 */
+        0x0,
+        0x0,
+        0x7FFE,
+        0x781E,
+        0x1E,
+        0x1E,
+        0x78,
+        0x1E0,
+        0x780,
+        0x780,
+        0x780,
+        0x780,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 56 */
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 57 */
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FFE,
+        0x1E,
+        0x1E,
+        0x1E,
+        0x78,
+        0x1FE0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 58 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 59 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0xF00,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 60 */
+        0x0,
+        0x0,
+        0x0,
+        0x3C,
+        0xF0,
+        0x3C0,
+        0xF00,
+        0x3C00,
+        0xF00,
+        0x3C0,
+        0xF0,
+        0x3C,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 61 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 62 */
+        0x0,
+        0x0,
+        0x0,
+        0x3C00,
+        0xF00,
+        0x3C0,
+        0xF0,
+        0x3C,
+        0xF0,
+        0x3C0,
+        0xF00,
+        0x3C00,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 63 */
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x78,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x0,
+        0x1E0,
+        0x1E0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 64 */
+        0x0,
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x79FE,
+        0x79FE,
+        0x79FE,
+        0x79F8,
+        0x7800,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 65 */
+        0x0,
+        0x0,
+        0x180,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x781E,
+        0x7FFE,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 66 */
+        0x0,
+        0x0,
+        0x7FF8,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1FF8,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x7FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 67 */
+        0x0,
+        0x0,
+        0x7F8,
+        0x1E1E,
+        0x7806,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x7806,
+        0x1E1E,
+        0x7F8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 68 */
+        0x0,
+        0x0,
+        0x7FE0,
+        0x1E78,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E78,
+        0x7FE0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 69 */
+        0x0,
+        0x0,
+        0x7FFE,
+        0x1E1E,
+        0x1E06,
+        0x1E60,
+        0x1FE0,
+        0x1E60,
+        0x1E00,
+        0x1E06,
+        0x1E1E,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 70 */
+        0x0,
+        0x0,
+        0x7FFE,
+        0x1E1E,
+        0x1E06,
+        0x1E60,
+        0x1FE0,
+        0x1E60,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x7F80,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 71 */
+        0x0,
+        0x0,
+        0x7F8,
+        0x1E1E,
+        0x7806,
+        0x7800,
+        0x7800,
+        0x79FE,
+        0x781E,
+        0x781E,
+        0x1E1E,
+        0x7E6,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 72 */
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x7FFE,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 73 */
+        0x0,
+        0x0,
+        0x7F8,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x7F8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 74 */
+        0x0,
+        0x0,
+        0x1FE,
+        0x78,
+        0x78,
+        0x78,
+        0x78,
+        0x78,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1FE0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 75 */
+        0x0,
+        0x0,
+        0x7E1E,
+        0x1E1E,
+        0x1E78,
+        0x1E78,
+        0x1FE0,
+        0x1FE0,
+        0x1E78,
+        0x1E1E,
+        0x1E1E,
+        0x7E1E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 76 */
+        0x0,
+        0x0,
+        0x7F80,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x1E06,
+        0x1E1E,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 77 */
+        0x0,
+        0x0,
+        0x781E,
+        0x7E7E,
+        0x7FFE,
+        0x7FFE,
+        0x799E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 78 */
+        0x0,
+        0x0,
+        0x781E,
+        0x7E1E,
+        0x7F9E,
+        0x7FFE,
+        0x79FE,
+        0x787E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 79 */
+        0x0,
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1E78,
+        0x7E0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 80 */
+        0x0,
+        0x0,
+        0x7FF8,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1FF8,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x7F80,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 81 */
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x799E,
+        0x79FE,
+        0x1FF8,
+        0x78,
+        0x7E,
+        0x0,
+        0x0,
+    },
+    { /* 82 */
+        0x0,
+        0x0,
+        0x7FF8,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1FF8,
+        0x1E78,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x7E1E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 83 */
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x1E00,
+        0x7E0,
+        0x78,
+        0x1E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 84 */
+        0x0,
+        0x0,
+        0x1FFE,
+        0x1FFE,
+        0x19E6,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x7F8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 85 */
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 86 */
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1E78,
+        0x7E0,
+        0x180,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 87 */
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x799E,
+        0x799E,
+        0x7FFE,
+        0x1E78,
+        0x1E78,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 88 */
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x1E78,
+        0x1E78,
+        0x7E0,
+        0x7E0,
+        0x1E78,
+        0x1E78,
+        0x781E,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 89 */
+        0x0,
+        0x0,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0xFF0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 90 */
+        0x0,
+        0x0,
+        0x7FFE,
+        0x781E,
+        0x601E,
+        0x78,
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x7806,
+        0x781E,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 91 */
+        0x0,
+        0x0,
+        0xFF0,
+        0xF00,
+        0xF00,
+        0xF00,
+        0xF00,
+        0xF00,
+        0xF00,
+        0xF00,
+        0xF00,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 92 */
+        0x0,
+        0x0,
+        0x0,
+        0x6000,
+        0x7800,
+        0x7E00,
+        0x1F80,
+        0x7E0,
+        0x1F8,
+        0x7E,
+        0x1E,
+        0x6,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 93 */
+        0x0,
+        0x0,
+        0xFF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 94 */
+        0x180,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 95 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFF,
+        0x0,
+        0x0,
+    },
+    { /* 96 */
+        0xF00,
+        0xF00,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 97 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1FE0,
+        0x78,
+        0x1FF8,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 98 */
+        0x0,
+        0x0,
+        0x7E00,
+        0x1E00,
+        0x1E00,
+        0x1FE0,
+        0x1E78,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x79F8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 99 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 100 */
+        0x0,
+        0x0,
+        0x1F8,
+        0x78,
+        0x78,
+        0x7F8,
+        0x1E78,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 101 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x7FFE,
+        0x7800,
+        0x7800,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 102 */
+        0x0,
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x1E18,
+        0x1E00,
+        0x7F80,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x7F80,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 103 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1F9E,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1FF8,
+        0x78,
+        0x7878,
+        0x1FE0,
+        0x0,
+    },
+    { /* 104 */
+        0x0,
+        0x0,
+        0x7E00,
+        0x1E00,
+        0x1E00,
+        0x1E78,
+        0x1F9E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x7E1E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 105 */
+        0x0,
+        0x0,
+        0x1E0,
+        0x1E0,
+        0x0,
+        0x7E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x7F8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 106 */
+        0x0,
+        0x0,
+        0x1E,
+        0x1E,
+        0x0,
+        0x7E,
+        0x1E,
+        0x1E,
+        0x1E,
+        0x1E,
+        0x1E,
+        0x1E,
+        0x1E1E,
+        0x1E1E,
+        0x7F8,
+        0x0,
+    },
+    { /* 107 */
+        0x0,
+        0x0,
+        0x7E00,
+        0x1E00,
+        0x1E00,
+        0x1E1E,
+        0x1E78,
+        0x1FE0,
+        0x1FE0,
+        0x1E78,
+        0x1E1E,
+        0x7E1E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 108 */
+        0x0,
+        0x0,
+        0x7E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x7F8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 109 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x7E78,
+        0x7FFE,
+        0x799E,
+        0x799E,
+        0x799E,
+        0x799E,
+        0x799E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 110 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x79F8,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 111 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 112 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x79F8,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1FF8,
+        0x1E00,
+        0x1E00,
+        0x7F80,
+        0x0,
+    },
+    { /* 113 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1F9E,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1FF8,
+        0x78,
+        0x78,
+        0x1FE,
+        0x0,
+    },
+    { /* 114 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x79F8,
+        0x1F9E,
+        0x1E06,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x7F80,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 115 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x1E00,
+        0x7E0,
+        0x78,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 116 */
+        0x0,
+        0x0,
+        0x180,
+        0x780,
+        0x780,
+        0x7FF8,
+        0x780,
+        0x780,
+        0x780,
+        0x780,
+        0x79E,
+        0x1F8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 117 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 118 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x7F8,
+        0x1E0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 119 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x799E,
+        0x799E,
+        0x7FFE,
+        0x1E78,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 120 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x781E,
+        0x1E78,
+        0x7E0,
+        0x7E0,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 121 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FFE,
+        0x1E,
+        0x78,
+        0x7FE0,
+        0x0,
+    },
+    { /* 122 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x7FFE,
+        0x7878,
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x781E,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 123 */
+        0x0,
+        0x0,
+        0xFC,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xF00,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 124 */
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x0,
+    },
+    { /* 125 */
+        0x0,
+        0x0,
+        0x3F00,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xF0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3F00,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 126 */
+        0x0,
+        0x0,
+        0x1F9E,
+        0x79F8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 127 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x180,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 128 */
+        0x0,
+        0x0,
+        0x7F8,
+        0x1E1E,
+        0x7806,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x7806,
+        0x1E1E,
+        0x7F8,
+        0x78,
+        0x1E,
+        0x1FF8,
+        0x0,
+        0x0,
+    },
+    { /* 129 */
+        0x0,
+        0x0,
+        0x7878,
+        0x7878,
+        0x0,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 130 */
+        0x0,
+        0x78,
+        0x1E0,
+        0x780,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x7FFE,
+        0x7800,
+        0x7800,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 131 */
+        0x0,
+        0x180,
+        0x7E0,
+        0x1E78,
+        0x0,
+        0x1FE0,
+        0x78,
+        0x1FF8,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 132 */
+        0x0,
+        0x0,
+        0x7878,
+        0x7878,
+        0x0,
+        0x1FE0,
+        0x78,
+        0x1FF8,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 133 */
+        0x0,
+        0x1E00,
+        0x780,
+        0x1E0,
+        0x0,
+        0x1FE0,
+        0x78,
+        0x1FF8,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 134 */
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x7E0,
+        0x0,
+        0x1FE0,
+        0x78,
+        0x1FF8,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 135 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFF0,
+        0x3C3C,
+        0x3C00,
+        0x3C00,
+        0x3C3C,
+        0xFF0,
+        0xF0,
+        0x3C,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 136 */
+        0x0,
+        0x180,
+        0x7E0,
+        0x1E78,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x7FFE,
+        0x7800,
+        0x7800,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 137 */
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x7FFE,
+        0x7800,
+        0x7800,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 138 */
+        0x0,
+        0x1E00,
+        0x780,
+        0x1E0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x7FFE,
+        0x7800,
+        0x7800,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 139 */
+        0x0,
+        0x0,
+        0x3C3C,
+        0x3C3C,
+        0x0,
+        0xFC0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 140 */
+        0x0,
+        0x3C0,
+        0xFF0,
+        0x3C3C,
+        0x0,
+        0xFC0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 141 */
+        0x0,
+        0x3C00,
+        0xF00,
+        0x3C0,
+        0x0,
+        0xFC0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 142 */
+        0x0,
+        0x781E,
+        0x781E,
+        0x180,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x781E,
+        0x7FFE,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 143 */
+        0x7E0,
+        0x1E78,
+        0x7E0,
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x781E,
+        0x7FFE,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 144 */
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x0,
+        0x7FFE,
+        0x1E1E,
+        0x1E00,
+        0x1FF8,
+        0x1E00,
+        0x1E00,
+        0x1E1E,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 145 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x7878,
+        0x1F9E,
+        0x79E,
+        0x1FFE,
+        0x79E0,
+        0x79E0,
+        0x1E7E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 146 */
+        0x0,
+        0x0,
+        0x7FE,
+        0x1E78,
+        0x7878,
+        0x7878,
+        0x7FFE,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x787E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 147 */
+        0x0,
+        0x180,
+        0x7E0,
+        0x1E78,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 148 */
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 149 */
+        0x0,
+        0x1E00,
+        0x780,
+        0x1E0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 150 */
+        0x0,
+        0x780,
+        0x1FE0,
+        0x7878,
+        0x0,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 151 */
+        0x0,
+        0x1E00,
+        0x780,
+        0x1E0,
+        0x0,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 152 */
+        0x0,
+        0x0,
+        0x781E,
+        0x781E,
+        0x0,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FFE,
+        0x1E,
+        0x78,
+        0x1FE0,
+        0x0,
+    },
+    { /* 153 */
+        0x0,
+        0x781E,
+        0x781E,
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1E78,
+        0x7E0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 154 */
+        0x0,
+        0x781E,
+        0x781E,
+        0x0,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 155 */
+        0x0,
+        0x3C0,
+        0x3C0,
+        0xFF0,
+        0x3C3C,
+        0x3C00,
+        0x3C00,
+        0x3C00,
+        0x3C3C,
+        0xFF0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 156 */
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x1E18,
+        0x1E00,
+        0x7F80,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x1E00,
+        0x7E1E,
+        0x7FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 157 */
+        0x0,
+        0x0,
+        0x3C3C,
+        0x3C3C,
+        0xFF0,
+        0x3C0,
+        0x3FFC,
+        0x3C0,
+        0x3FFC,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 158 */
+        0x0,
+        0x7FE0,
+        0x7878,
+        0x7878,
+        0x7FE0,
+        0x7818,
+        0x7878,
+        0x79FE,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 159 */
+        0x0,
+        0xFC,
+        0x3CF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3FFC,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xF3C0,
+        0x3F00,
+        0x0,
+        0x0,
+    },
+    { /* 160 */
+        0x0,
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x0,
+        0x1FE0,
+        0x78,
+        0x1FF8,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 161 */
+        0x0,
+        0xF0,
+        0x3C0,
+        0xF00,
+        0x0,
+        0xFC0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 162 */
+        0x0,
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 163 */
+        0x0,
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x0,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x7878,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 164 */
+        0x0,
+        0x0,
+        0x1F9E,
+        0x79F8,
+        0x0,
+        0x79F8,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 165 */
+        0x1F9E,
+        0x79F8,
+        0x0,
+        0x781E,
+        0x7E1E,
+        0x7F9E,
+        0x7FFE,
+        0x79FE,
+        0x787E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 166 */
+        0x0,
+        0xFF0,
+        0x3CF0,
+        0x3CF0,
+        0xFFC,
+        0x0,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 167 */
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x1E78,
+        0x7E0,
+        0x0,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 168 */
+        0x0,
+        0x0,
+        0x780,
+        0x780,
+        0x0,
+        0x780,
+        0x780,
+        0x1E00,
+        0x7800,
+        0x781E,
+        0x781E,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 169 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFC,
+        0xF000,
+        0xF000,
+        0xF000,
+        0xF000,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 170 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFC,
+        0x3C,
+        0x3C,
+        0x3C,
+        0x3C,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 171 */
+        0x0,
+        0x7000,
+        0x7000,
+        0x700C,
+        0x703C,
+        0x70F0,
+        0x3C0,
+        0xF00,
+        0x3C00,
+        0xF0FC,
+        0xC30E,
+        0x3C,
+        0xF0,
+        0x3FE,
+        0x0,
+        0x0,
+    },
+    { /* 172 */
+        0x0,
+        0x7000,
+        0x7000,
+        0x700C,
+        0x703C,
+        0x70F0,
+        0x3C0,
+        0xF00,
+        0x3C3C,
+        0xF0FC,
+        0xC38C,
+        0x7FE,
+        0x3C,
+        0xFE,
+        0x0,
+        0x0,
+    },
+    { /* 173 */
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x7E0,
+        0x7E0,
+        0x7E0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 174 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xE0E,
+        0x3C3C,
+        0x7070,
+        0x3C3C,
+        0xE0E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 175 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x7070,
+        0x3C3C,
+        0xE0E,
+        0x3C3C,
+        0x7070,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 176 */
+        0x303,
+        0x3030,
+        0x303,
+        0x3030,
+        0x303,
+        0x3030,
+        0x303,
+        0x3030,
+        0x303,
+        0x3030,
+        0x303,
+        0x3030,
+        0x303,
+        0x3030,
+        0x303,
+        0x3030,
+    },
+    { /* 177 */
+        0xAAAA,
+        0x5555,
+        0xAAAA,
+        0x5555,
+        0xAAAA,
+        0x5555,
+        0xAAAA,
+        0x5555,
+        0xAAAA,
+        0x5555,
+        0xAAAA,
+        0x5555,
+        0xAAAA,
+        0x5555,
+        0xAAAA,
+        0x5555,
+    },
+    { /* 178 */
+        0xF3F3,
+        0x3F3F,
+        0xF3F3,
+        0x3F3F,
+        0xF3F3,
+        0x3F3F,
+        0xF3F3,
+        0x3F3F,
+        0xF3F3,
+        0x3F3F,
+        0xF3F3,
+        0x3F3F,
+        0xF3F3,
+        0x3F3F,
+        0xF3F3,
+        0x3F3F,
+    },
+    { /* 179 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 180 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFFC0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 181 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFFC0,
+        0x3C0,
+        0xFFC0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 182 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xFF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 183 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFC,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 184 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFC0,
+        0x3C0,
+        0xFFC0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 185 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xFF3C,
+        0x3C,
+        0xFF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 186 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 187 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFC,
+        0x3C,
+        0xFF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 188 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xFF3C,
+        0x3C,
+        0xFFFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 189 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xFFFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 190 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFFC0,
+        0x3C0,
+        0xFFC0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 191 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFC0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 192 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3FF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 193 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFFFF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 194 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 195 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3FF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 196 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 197 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFFFF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 198 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3FF,
+        0x3C0,
+        0x3FF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 199 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3F,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 200 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3F,
+        0xF00,
+        0xFFF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 201 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFF,
+        0xF00,
+        0xF3F,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 202 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xFF3F,
+        0x0,
+        0xFFFF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 203 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFF,
+        0x0,
+        0xFF3F,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 204 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3F,
+        0xF00,
+        0xF3F,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 205 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFF,
+        0x0,
+        0xFFFF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 206 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xFF3F,
+        0x0,
+        0xFF3F,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 207 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFFFF,
+        0x0,
+        0xFFFF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 208 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xFFFF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 209 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFF,
+        0x0,
+        0xFFFF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 210 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFF,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 211 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xFFF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 212 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3FF,
+        0x3C0,
+        0x3FF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 213 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3FF,
+        0x3C0,
+        0x3FF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 214 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFF,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 215 */
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xFFFF,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+        0xF3C,
+    },
+    { /* 216 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFFFF,
+        0x3C0,
+        0xFFFF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 217 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xFFC0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 218 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3FF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 219 */
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+    },
+    { /* 220 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+    },
+    { /* 221 */
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+        0xFF00,
+    },
+    { /* 222 */
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+        0xFF,
+    },
+    { /* 223 */
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0xFFFF,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 224 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1F9E,
+        0x79F8,
+        0x79E0,
+        0x79E0,
+        0x79E0,
+        0x79F8,
+        0x1F9E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 225 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x7FF8,
+        0x781E,
+        0x7FF8,
+        0x781E,
+        0x781E,
+        0x7FF8,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x0,
+        0x0,
+    },
+    { /* 226 */
+        0x0,
+        0x0,
+        0x7FFE,
+        0x781E,
+        0x781E,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x7800,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 227 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x7FFE,
+        0x7FFE,
+        0x1E78,
+        0x1E78,
+        0x1E78,
+        0x1E78,
+        0x1E78,
+        0x1E78,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 228 */
+        0x0,
+        0x0,
+        0x0,
+        0x7FFE,
+        0x781E,
+        0x1E00,
+        0x780,
+        0x1E0,
+        0x780,
+        0x1E00,
+        0x781E,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 229 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1FFE,
+        0x79E0,
+        0x79E0,
+        0x79E0,
+        0x79E0,
+        0x79E0,
+        0x1F80,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 230 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1E1E,
+        0x1FF8,
+        0x1E00,
+        0x1E00,
+        0x7800,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 231 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1F9E,
+        0x79F8,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x1E0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 232 */
+        0x0,
+        0x0,
+        0x0,
+        0x3FFC,
+        0x3C0,
+        0xFF0,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0xFF0,
+        0x3C0,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 233 */
+        0x0,
+        0x0,
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x781E,
+        0x7FFE,
+        0x781E,
+        0x781E,
+        0x1E78,
+        0x7E0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 234 */
+        0x0,
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x1E78,
+        0x1E78,
+        0x1E78,
+        0x1E78,
+        0x7E7E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 235 */
+        0x0,
+        0x0,
+        0x3FC,
+        0xF00,
+        0x3C0,
+        0xF0,
+        0xFFC,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0x3C3C,
+        0xFF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 236 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3E7C,
+        0x73CE,
+        0x73CE,
+        0x73CE,
+        0x3E7C,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 237 */
+        0x0,
+        0x0,
+        0x0,
+        0xF,
+        0x3C,
+        0x3FFC,
+        0xF0FF,
+        0xF3CF,
+        0xFF0F,
+        0x3FFC,
+        0x3C00,
+        0xF000,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 238 */
+        0x0,
+        0x0,
+        0x3F0,
+        0xF00,
+        0x1C00,
+        0x1C00,
+        0x1FF0,
+        0x1C00,
+        0x1C00,
+        0x1C00,
+        0xF00,
+        0x3F0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 239 */
+        0x0,
+        0x0,
+        0x0,
+        0x1FF8,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x781E,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 240 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x7FFE,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 241 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x3FFC,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x3FFC,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 242 */
+        0x0,
+        0x0,
+        0x0,
+        0xF00,
+        0x3C0,
+        0xF0,
+        0x38,
+        0xF0,
+        0x3C0,
+        0xF00,
+        0x0,
+        0xFF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 243 */
+        0x0,
+        0x0,
+        0x0,
+        0xF0,
+        0x3C0,
+        0xF00,
+        0x1C00,
+        0xF00,
+        0x3C0,
+        0xF0,
+        0x0,
+        0x1FF0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 244 */
+        0x0,
+        0x0,
+        0xFC,
+        0x3CF,
+        0x3CF,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+    },
+    { /* 245 */
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0x3C0,
+        0xF3C0,
+        0xF3C0,
+        0xF3C0,
+        0x3F00,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 246 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x3FFC,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 247 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1F9E,
+        0x79F8,
+        0x0,
+        0x1F9E,
+        0x79F8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 248 */
+        0x0,
+        0x7E0,
+        0x1E78,
+        0x1E78,
+        0x7E0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 249 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 250 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x3C0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 251 */
+        0x0,
+        0xFF,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0xF0,
+        0x70F0,
+        0x38F0,
+        0x1CF0,
+        0xFF0,
+        0x3F0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 252 */
+        0x0,
+        0x79E0,
+        0x1E78,
+        0x1E78,
+        0x1E78,
+        0x1E78,
+        0x1E78,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 253 */
+        0x0,
+        0x1F80,
+        0x61E0,
+        0x780,
+        0x1E00,
+        0x7860,
+        0x7FE0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 254 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x1FF8,
+        0x1FF8,
+        0x1FF8,
+        0x1FF8,
+        0x1FF8,
+        0x1FF8,
+        0x1FF8,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+    { /* 255 */
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+        0x0,
+    },
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/fsk.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,358 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fsk.c - FSK modem transmit and receive parts
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: fsk.c,v 1.27 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/complex.h"
+#include "spandsp/dds.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/async.h"
+#include "spandsp/fsk.h"
+
+fsk_spec_t preset_fsk_specs[] =
+{
+    {
+        "V21 ch 1",
+        1080 + 100,
+        1080 - 100,
+        -14,
+        -30,
+        300
+    },
+    {
+        "V21 ch 2",
+        1750 + 100,
+        1750 - 100,
+        -14,
+        -30,
+        300
+    },
+    {
+        "V23 ch 1",
+        2100,
+        1300,
+        -14,
+        -30,
+        1200
+    },
+    {
+        "V23 ch 2",
+        450,
+        390,
+        -14,
+        -30,
+        75
+    },
+    {
+        "Bell103 ch 1",
+        2125 - 100,
+        2125 + 100,
+        -14,
+        -30,
+        300
+    },
+    {
+        "Bell103 ch 2",
+        1170 - 100,
+        1170 + 100,
+        -14,
+        -30,
+        300
+    },
+    {
+        "Bell202",
+        2200,
+        1200,
+        -14,
+        -30,
+        1200
+    },
+    {
+        "Weitbrecht",   /* Used for TDD (Telecomc Device for the Deaf) */
+        1800,
+        1400,
+        -14,
+        -30,
+         45             /* Actually 45.45 */
+    }
+};
+
+fsk_tx_state_t *fsk_tx_init(fsk_tx_state_t *s,
+                            fsk_spec_t *spec,
+                            get_bit_func_t get_bit,
+                            void *user_data)
+{
+    s->baud_rate = spec->baud_rate;
+    s->get_bit = get_bit;
+    s->user_data = user_data;
+
+    s->phase_rates[0] = dds_phase_rate((float) spec->freq_zero);
+    s->phase_rates[1] = dds_phase_rate((float) spec->freq_one);
+    s->scaling = dds_scaling_dbm0((float) spec->tx_level);
+    /* Initialise fractional sample baud generation. */
+    s->phase_acc = 0;
+    s->baud_inc = (s->baud_rate*0x10000)/SAMPLE_RATE;
+    s->baud_frac = 0;
+    s->current_phase_rate = s->phase_rates[1];
+    
+    s->shutdown = FALSE;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int fsk_tx(fsk_tx_state_t *s, int16_t *amp, int len)
+{
+    int sample;
+    int bit;
+
+    if (s->shutdown)
+        return 0;
+    /* Make the transitions between 0 and 1 phase coherent, but instantaneous
+       jumps. There is currently no interpolation for bauds that end mid-sample.
+       Mainstream users will not care. Some specialist users might have a problem
+       with they, if they care about accurate transition timing. */
+    for (sample = 0;  sample < len;  sample++)
+    {
+        if ((s->baud_frac += s->baud_inc) >= 0x10000)
+        {
+            s->baud_frac -= 0x10000;
+            if ((bit = s->get_bit(s->user_data)) == PUTBIT_END_OF_DATA)
+            {
+                s->shutdown = TRUE;
+                break;
+            }
+            s->current_phase_rate = s->phase_rates[bit & 1];
+        }
+        amp[sample] = dds_mod(&(s->phase_acc), s->current_phase_rate, s->scaling, 0);
+    }
+    return sample;
+}
+/*- End of function --------------------------------------------------------*/
+
+void fsk_tx_power(fsk_tx_state_t *s, float power)
+{
+    s->scaling = dds_scaling_dbm0(power);
+}
+/*- End of function --------------------------------------------------------*/
+
+void fsk_tx_set_get_bit(fsk_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
+{
+    s->get_bit = get_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+void fsk_rx_signal_cutoff(fsk_rx_state_t *s, float cutoff)
+{
+    s->min_power = power_meter_level_dbm0(cutoff);
+}
+/*- End of function --------------------------------------------------------*/
+
+float fsk_rx_signal_power(fsk_rx_state_t *s)
+{
+    return power_meter_dbm0(&s->power);
+}
+/*- End of function --------------------------------------------------------*/
+
+void fsk_rx_set_put_bit(fsk_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
+{
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+fsk_rx_state_t *fsk_rx_init(fsk_rx_state_t *s,
+                            fsk_spec_t *spec,
+                            int sync_mode,
+                            put_bit_func_t put_bit,
+                            void *user_data)
+{
+    int chop;
+
+    memset(s, 0, sizeof(*s));
+    s->baud_rate = spec->baud_rate;
+    s->sync_mode = sync_mode;
+    s->min_power = power_meter_level_dbm0((float) spec->min_level);
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+
+    /* Detect by correlating against the tones we want, over a period
+       of one baud. The correlation must be quadrature. */
+    
+    /* First we need the quadrature tone generators to correlate
+       against. */
+    s->phase_rate[0] = dds_phase_rate((float) spec->freq_zero);
+    s->phase_rate[1] = dds_phase_rate((float) spec->freq_one);
+    s->phase_acc[0] = 0;
+    s->phase_acc[1] = 0;
+    s->last_sample = 0;
+
+    /* The correlation should be over one baud. */
+    s->correlation_span = SAMPLE_RATE/spec->baud_rate;
+    /* But limit it for very slow baud rates, so we do not overflow our
+       buffer. */
+    if (s->correlation_span > FSK_MAX_WINDOW_LEN)
+        s->correlation_span = FSK_MAX_WINDOW_LEN;
+
+    /* We need to scale, to avoid overflow in the correlation. */
+    s->scaling_shift = 0;
+    chop = s->correlation_span;
+    while (chop != 0)
+    {
+        s->scaling_shift++;
+        chop >>= 1;
+    }
+
+    /* Initialise the baud/bit rate tracking. */
+    s->baud_inc = (s->baud_rate*0x10000)/SAMPLE_RATE;
+    s->baud_pll = 0;
+    
+    /* Initialise a power detector, so sense when a signal is present. */
+    power_meter_init(&(s->power), 4);
+    s->carrier_present = FALSE;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int fsk_rx(fsk_rx_state_t *s, const int16_t *amp, int len)
+{
+    int buf_ptr;
+    int baudstate;
+    int sample;
+    int j;
+    int32_t dot;
+    int32_t sum;
+    int32_t power;
+    icomplex_t ph;
+
+    buf_ptr = s->buf_ptr;
+
+    for (sample = 0;  sample < len;  sample++)
+    {
+        /* If there isn't much signal, don't demodulate - it will only produce
+           useless junk results. */
+        /* TODO: The carrier signal has no hysteresis! */
+        power = power_meter_update(&(s->power), amp[sample] - s->last_sample);
+        s->last_sample = amp[sample];
+        if (power < s->min_power)
+        {
+            if (s->carrier_present)
+            {
+                s->put_bit(s->user_data, PUTBIT_CARRIER_DOWN);
+                s->carrier_present = FALSE;
+            }
+            continue;
+        }
+        if (!s->carrier_present)
+        {
+            s->put_bit(s->user_data, PUTBIT_CARRIER_UP);
+            s->carrier_present = TRUE;
+        }
+        /* Non-coherent FSK demodulation by correlation with the target tones
+           over a one baud interval. The slow V.xx specs. are too open ended
+           to allow anything fancier to be used. The dot products are calculated
+           using a sliding window approach, so the compute load is not that great. */
+        /* The *totally* asynchronous character to character behaviour of these
+           modems, when carrying async. data, seems to force a sample by sample
+           approach. */
+        for (j = 0;  j < 2;  j++)
+        {
+            s->dot_i[j] -= s->window_i[j][buf_ptr];
+            s->dot_q[j] -= s->window_q[j][buf_ptr];
+
+            ph = dds_complex(&(s->phase_acc[j]), s->phase_rate[j]);
+            s->window_i[j][buf_ptr] = (ph.re*amp[sample]) >> s->scaling_shift;
+            s->window_q[j][buf_ptr] = (ph.im*amp[sample]) >> s->scaling_shift;
+
+            s->dot_i[j] += s->window_i[j][buf_ptr];
+            s->dot_q[j] += s->window_q[j][buf_ptr];
+        }
+        dot = s->dot_i[0] >> 15;
+        sum = dot*dot;
+        dot = s->dot_q[0] >> 15;
+        sum += dot*dot;
+        dot = s->dot_i[1] >> 15;
+        sum -= dot*dot;
+        dot = s->dot_q[1] >> 15;
+        sum -= dot*dot;
+        baudstate = (sum < 0);
+
+        if (s->lastbit != baudstate)
+        {
+            s->lastbit = baudstate;
+            if (s->sync_mode)
+            {
+                /* For synchronous use (e.g. HDLC channels in FAX modems), nudge
+                   the baud phase gently, trying to keep it centred on the bauds. */
+                if (s->baud_pll < 0x8000)
+                    s->baud_pll += (s->baud_inc >> 3);
+                else
+                    s->baud_pll -= (s->baud_inc >> 3);
+            }
+            else
+            {
+                /* For async. operation, believe transitions completely, and
+                   sample appropriately. This allows instant start on the first
+                   transition. */
+                /* We must now be about half way to a sampling point. We do not do
+                   any fractional sample estimation of the transitions, so this is
+                   the most accurate baud alignment we can do. */
+                s->baud_pll = 0x8000;
+            }
+
+        }
+        if ((s->baud_pll += s->baud_inc) >= 0x10000)
+        {
+            /* We should be in the middle of a baud now, so report the current
+               state as the next bit */
+            s->baud_pll -= 0x10000;
+            s->put_bit(s->user_data, baudstate);
+        }
+        if (++buf_ptr >= s->correlation_span)
+            buf_ptr = 0;
+    }
+    s->buf_ptr = buf_ptr;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/g711.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,105 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g711.c - A-law and u-law transcoding routines
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: g711.c,v 1.4 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/g711.h"
+
+/* Copied from the CCITT G.711 specification */
+static const uint8_t ulaw_to_alaw_table[256] =
+{
+     42,  43,  40,  41,  46,  47,  44,  45,  34,  35,  32,  33,  38,  39,  36,  37,
+     58,  59,  56,  57,  62,  63,  60,  61,  50,  51,  48,  49,  54,  55,  52,  53,
+     10,  11,   8,   9,  14,  15,  12,  13,   2,   3,   0,   1,   6,   7,   4,  26,
+     27,  24,  25,  30,  31,  28,  29,  18,  19,  16,  17,  22,  23,  20,  21, 106,
+    104, 105, 110, 111, 108, 109,  98,  99,  96,  97, 102, 103, 100, 101, 122, 120,
+    126, 127, 124, 125, 114, 115, 112, 113, 118, 119, 116, 117,  75,  73,  79,  77,
+     66,  67,  64,  65,  70,  71,  68,  69,  90,  91,  88,  89,  94,  95,  92,  93,
+     82,  82,  83,  83,  80,  80,  81,  81,  86,  86,  87,  87,  84,  84,  85,  85,
+    170, 171, 168, 169, 174, 175, 172, 173, 162, 163, 160, 161, 166, 167, 164, 165,
+    186, 187, 184, 185, 190, 191, 188, 189, 178, 179, 176, 177, 182, 183, 180, 181,
+    138, 139, 136, 137, 142, 143, 140, 141, 130, 131, 128, 129, 134, 135, 132, 154,
+    155, 152, 153, 158, 159, 156, 157, 146, 147, 144, 145, 150, 151, 148, 149, 234,
+    232, 233, 238, 239, 236, 237, 226, 227, 224, 225, 230, 231, 228, 229, 250, 248,
+    254, 255, 252, 253, 242, 243, 240, 241, 246, 247, 244, 245, 203, 201, 207, 205,
+    194, 195, 192, 193, 198, 199, 196, 197, 218, 219, 216, 217, 222, 223, 220, 221,
+    210, 210, 211, 211, 208, 208, 209, 209, 214, 214, 215, 215, 212, 212, 213, 213
+};
+
+/* These transcoding tables are copied from the CCITT G.711 specification. To achieve
+   optimal results, do not change them. */
+
+static const uint8_t alaw_to_ulaw_table[256] =
+{
+     42,  43,  40,  41,  46,  47,  44,  45,  34,  35,  32,  33,  38,  39,  36,  37,
+     57,  58,  55,  56,  61,  62,  59,  60,  49,  50,  47,  48,  53,  54,  51,  52,
+     10,  11,   8,   9,  14,  15,  12,  13,   2,   3,   0,   1,   6,   7,   4,   5,
+     26,  27,  24,  25,  30,  31,  28,  29,  18,  19,  16,  17,  22,  23,  20,  21,
+     98,  99,  96,  97, 102, 103, 100, 101,  93,  93,  92,  92,  95,  95,  94,  94,
+    116, 118, 112, 114, 124, 126, 120, 122, 106, 107, 104, 105, 110, 111, 108, 109,
+     72,  73,  70,  71,  76,  77,  74,  75,  64,  65,  63,  63,  68,  69,  66,  67,
+     86,  87,  84,  85,  90,  91,  88,  89,  79,  79,  78,  78,  82,  83,  80,  81,
+    170, 171, 168, 169, 174, 175, 172, 173, 162, 163, 160, 161, 166, 167, 164, 165,
+    185, 186, 183, 184, 189, 190, 187, 188, 177, 178, 175, 176, 181, 182, 179, 180,
+    138, 139, 136, 137, 142, 143, 140, 141, 130, 131, 128, 129, 134, 135, 132, 133,
+    154, 155, 152, 153, 158, 159, 156, 157, 146, 147, 144, 145, 150, 151, 148, 149,
+    226, 227, 224, 225, 230, 231, 228, 229, 221, 221, 220, 220, 223, 223, 222, 222,
+    244, 246, 240, 242, 252, 254, 248, 250, 234, 235, 232, 233, 238, 239, 236, 237,
+    200, 201, 198, 199, 204, 205, 202, 203, 192, 193, 191, 191, 196, 197, 194, 195,
+    214, 215, 212, 213, 218, 219, 216, 217, 207, 207, 206, 206, 210, 211, 208, 209
+};
+
+uint8_t alaw_to_ulaw(uint8_t alaw)
+{
+    return alaw_to_ulaw_table[alaw];
+}
+/*- End of function --------------------------------------------------------*/
+
+uint8_t ulaw_to_alaw(uint8_t ulaw)
+{
+    return ulaw_to_alaw_table[ulaw];
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/g722_decode.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,391 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g722_decode.c - The ITU G.722 codec, decode part.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Based in part on a single channel G.722 codec which is:
+ *
+ * Copyright (c) CMU 1993
+ * Computer Science, Speech Group
+ * Chengxiang Lu and Alex Hauptmann
+ *
+ * $Id: g722_decode.c,v 1.18 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <memory.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/g722.h"
+
+static void block4(g722_decode_state_t *s, int band, int d);
+
+static void block4(g722_decode_state_t *s, int band, int d)
+{
+    int wd1;
+    int wd2;
+    int wd3;
+    int i;
+
+    /* Block 4, RECONS */
+    s->band[band].d[0] = d;
+    s->band[band].r[0] = saturate(s->band[band].s + d);
+
+    /* Block 4, PARREC */
+    s->band[band].p[0] = saturate(s->band[band].sz + d);
+
+    /* Block 4, UPPOL2 */
+    for (i = 0;  i < 3;  i++)
+        s->band[band].sg[i] = s->band[band].p[i] >> 15;
+    wd1 = saturate(s->band[band].a[1] << 2);
+
+    wd2 = (s->band[band].sg[0] == s->band[band].sg[1])  ?  -wd1  :  wd1;
+    if (wd2 > 32767)
+        wd2 = 32767;
+    wd3 = (s->band[band].sg[0] == s->band[band].sg[2])  ?  128  :  -128;
+    wd3 += (wd2 >> 7);
+    wd3 += (s->band[band].a[2]*32512) >> 15;
+    if (wd3 > 12288)
+        wd3 = 12288;
+    else if (wd3 < -12288)
+        wd3 = -12288;
+    s->band[band].ap[2] = wd3;
+
+    /* Block 4, UPPOL1 */
+    s->band[band].sg[0] = s->band[band].p[0] >> 15;
+    s->band[band].sg[1] = s->band[band].p[1] >> 15;
+    wd1 = (s->band[band].sg[0] == s->band[band].sg[1])  ?  192  :  -192;
+    wd2 = (s->band[band].a[1]*32640) >> 15;
+
+    s->band[band].ap[1] = saturate(wd1 + wd2);
+    wd3 = saturate(15360 - s->band[band].ap[2]);
+    if (s->band[band].ap[1] > wd3)
+        s->band[band].ap[1] = wd3;
+    else if (s->band[band].ap[1] < -wd3)
+        s->band[band].ap[1] = -wd3;
+
+    /* Block 4, UPZERO */
+    wd1 = (d == 0)  ?  0  :  128;
+    s->band[band].sg[0] = d >> 15;
+    for (i = 1;  i < 7;  i++)
+    {
+        s->band[band].sg[i] = s->band[band].d[i] >> 15;
+        wd2 = (s->band[band].sg[i] == s->band[band].sg[0])  ?  wd1  :  -wd1;
+        wd3 = (s->band[band].b[i]*32640) >> 15;
+        s->band[band].bp[i] = saturate(wd2 + wd3);
+    }
+
+    /* Block 4, DELAYA */
+    for (i = 6;  i > 0;  i--)
+    {
+        s->band[band].d[i] = s->band[band].d[i - 1];
+        s->band[band].b[i] = s->band[band].bp[i];
+    }
+    
+    for (i = 2;  i > 0;  i--)
+    {
+        s->band[band].r[i] = s->band[band].r[i - 1];
+        s->band[band].p[i] = s->band[band].p[i - 1];
+        s->band[band].a[i] = s->band[band].ap[i];
+    }
+
+    /* Block 4, FILTEP */
+    wd1 = saturate(s->band[band].r[1] + s->band[band].r[1]);
+    wd1 = (s->band[band].a[1]*wd1) >> 15;
+    wd2 = saturate(s->band[band].r[2] + s->band[band].r[2]);
+    wd2 = (s->band[band].a[2]*wd2) >> 15;
+    s->band[band].sp = saturate(wd1 + wd2);
+
+    /* Block 4, FILTEZ */
+    s->band[band].sz = 0;
+    for (i = 6;  i > 0;  i--)
+    {
+        wd1 = saturate(s->band[band].d[i] + s->band[band].d[i]);
+        s->band[band].sz += (s->band[band].b[i]*wd1) >> 15;
+    }
+    s->band[band].sz = saturate(s->band[band].sz);
+
+    /* Block 4, PREDIC */
+    s->band[band].s = saturate(s->band[band].sp + s->band[band].sz);
+}
+/*- End of function --------------------------------------------------------*/
+
+g722_decode_state_t *g722_decode_init(g722_decode_state_t *s, int rate, int options)
+{
+    if (s == NULL)
+    {
+        if ((s = (g722_decode_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    if (rate == 48000)
+        s->bits_per_sample = 6;
+    else if (rate == 56000)
+        s->bits_per_sample = 7;
+    else
+        s->bits_per_sample = 8;
+    if ((options & G722_SAMPLE_RATE_8000))
+        s->eight_k = TRUE;
+    if ((options & G722_PACKED)  &&  s->bits_per_sample != 8)
+        s->packed = TRUE;
+    else
+        s->packed = FALSE;
+    s->band[0].det = 32;
+    s->band[1].det = 8;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int g722_decode_release(g722_decode_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len)
+{
+    static const int wl[8] = {-60, -30, 58, 172, 334, 538, 1198, 3042 };
+    static const int rl42[16] = {0, 7, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3,  2, 1, 0 };
+    static const int ilb[32] =
+    {
+        2048, 2093, 2139, 2186, 2233, 2282, 2332,
+        2383, 2435, 2489, 2543, 2599, 2656, 2714,
+        2774, 2834, 2896, 2960, 3025, 3091, 3158,
+        3228, 3298, 3371, 3444, 3520, 3597, 3676,
+        3756, 3838, 3922, 4008
+    };
+    static const int wh[3] = {0, -214, 798};
+    static const int rh2[4] = {2, 1, 2, 1};
+    static const int qm2[4] = {-7408, -1616,  7408,   1616};
+    static const int qm4[16] = 
+    {
+              0, -20456, -12896,  -8968, 
+          -6288,  -4240,  -2584,  -1200,
+          20456,  12896,   8968,   6288,
+           4240,   2584,   1200,      0
+    };
+    static const int qm5[32] =
+    {
+           -280,   -280, -23352, -17560,
+         -14120, -11664,  -9752,  -8184,
+          -6864,  -5712,  -4696,  -3784,
+          -2960,  -2208,  -1520,   -880,
+          23352,  17560,  14120,  11664,
+           9752,   8184,   6864,   5712,
+           4696,   3784,   2960,   2208,
+           1520,    880,    280,   -280
+    };
+    static const int qm6[64] =
+    {
+           -136,   -136,   -136,   -136,
+         -24808, -21904, -19008, -16704,
+         -14984, -13512, -12280, -11192,
+         -10232,  -9360,  -8576,  -7856,
+          -7192,  -6576,  -6000,  -5456,
+          -4944,  -4464,  -4008,  -3576,
+          -3168,  -2776,  -2400,  -2032,
+          -1688,  -1360,  -1040,   -728,
+          24808,  21904,  19008,  16704,
+          14984,  13512,  12280,  11192,
+          10232,   9360,   8576,   7856,
+           7192,   6576,   6000,   5456,
+           4944,   4464,   4008,   3576,
+           3168,   2776,   2400,   2032,
+           1688,   1360,   1040,    728,
+            432,    136,   -432,   -136
+    };
+    static const int qmf_coeffs[12] =
+    {
+           3,  -11,   12,   32, -210,  951, 3876, -805,  362, -156,   53,  -11,
+    };
+
+    int dlowt;
+    int rlow;
+    int ihigh;
+    int dhigh;
+    int rhigh;
+    int xout1;
+    int xout2;
+    int wd1;
+    int wd2;
+    int wd3;
+    int code;
+    int outlen;
+    int i;
+    int j;
+
+    outlen = 0;
+    rhigh = 0;
+    for (j = 0;  j < len;  )
+    {
+        if (s->packed)
+        {
+            /* Unpack the code bits */
+            if (s->in_bits < s->bits_per_sample)
+            {
+                s->in_buffer |= (g722_data[j++] << s->in_bits);
+                s->in_bits += 8;
+            }
+            code = s->in_buffer & ((1 << s->bits_per_sample) - 1);
+            s->in_buffer >>= s->bits_per_sample;
+            s->in_bits -= s->bits_per_sample;
+        }
+        else
+        {
+            code = g722_data[j++];
+        }
+
+        switch (s->bits_per_sample)
+        {
+        default:
+        case 8:
+            wd1 = code & 0x3F;
+            ihigh = (code >> 6) & 0x03;
+            wd2 = qm6[wd1];
+            wd1 >>= 2;
+            break;
+        case 7:
+            wd1 = code & 0x1F;
+            ihigh = (code >> 5) & 0x03;
+            wd2 = qm5[wd1];
+            wd1 >>= 1;
+            break;
+        case 6:
+            wd1 = code & 0x0F;
+            ihigh = (code >> 4) & 0x03;
+            wd2 = qm4[wd1];
+            break;
+        }
+        /* Block 5L, LOW BAND INVQBL */
+        wd2 = (s->band[0].det*wd2) >> 15;
+        /* Block 5L, RECONS */
+        rlow = s->band[0].s + wd2;
+        /* Block 6L, LIMIT */
+        if (rlow > 16383)
+            rlow = 16383;
+        else if (rlow < -16384)
+            rlow = -16384;
+
+        /* Block 2L, INVQAL */
+        wd2 = qm4[wd1];
+        dlowt = (s->band[0].det*wd2) >> 15;
+
+        /* Block 3L, LOGSCL */
+        wd2 = rl42[wd1];
+        wd1 = (s->band[0].nb*127) >> 7;
+        wd1 += wl[wd2];
+        if (wd1 < 0)
+            wd1 = 0;
+        else if (wd1 > 18432)
+            wd1 = 18432;
+        s->band[0].nb = wd1;
+            
+        /* Block 3L, SCALEL */
+        wd1 = (s->band[0].nb >> 6) & 31;
+        wd2 = 8 - (s->band[0].nb >> 11);
+        wd3 = (wd2 < 0)  ?  (ilb[wd1] << -wd2)  :  (ilb[wd1] >> wd2);
+        s->band[0].det = wd3 << 2;
+
+        block4(s, 0, dlowt);
+        
+        if (!s->eight_k)
+        {
+            /* Block 2H, INVQAH */
+            wd2 = qm2[ihigh];
+            dhigh = (s->band[1].det*wd2) >> 15;
+            /* Block 5H, RECONS */
+            rhigh = dhigh + s->band[1].s;
+            /* Block 6H, LIMIT */
+            if (rhigh > 16383)
+                rhigh = 16383;
+            else if (rhigh < -16384)
+                rhigh = -16384;
+
+            /* Block 2H, INVQAH */
+            wd2 = rh2[ihigh];
+            wd1 = (s->band[1].nb*127) >> 7;
+            wd1 += wh[wd2];
+            if (wd1 < 0)
+                wd1 = 0;
+            else if (wd1 > 22528)
+                wd1 = 22528;
+            s->band[1].nb = wd1;
+            
+            /* Block 3H, SCALEH */
+            wd1 = (s->band[1].nb >> 6) & 31;
+            wd2 = 10 - (s->band[1].nb >> 11);
+            wd3 = (wd2 < 0)  ?  (ilb[wd1] << -wd2)  :  (ilb[wd1] >> wd2);
+            s->band[1].det = wd3 << 2;
+
+            block4(s, 1, dhigh);
+        }
+
+        if (s->itu_test_mode)
+        {
+            amp[outlen++] = (int16_t) (rlow << 1);
+            amp[outlen++] = (int16_t) (rhigh << 1);
+        }
+        else
+        {
+            if (s->eight_k)
+            {
+                amp[outlen++] = (int16_t) rlow;
+            }
+            else
+            {
+                /* Apply the receive QMF */
+                for (i = 0;  i < 22;  i++)
+                    s->x[i] = s->x[i + 2];
+                s->x[22] = rlow + rhigh;
+                s->x[23] = rlow - rhigh;
+
+                xout1 = 0;
+                xout2 = 0;
+                for (i = 0;  i < 12;  i++)
+                {
+                    xout2 += s->x[2*i]*qmf_coeffs[i];
+                    xout1 += s->x[2*i + 1]*qmf_coeffs[11 - i];
+                }
+                amp[outlen++] = (int16_t) (xout1 >> 12);
+                amp[outlen++] = (int16_t) (xout2 >> 12);
+            }
+        }
+    }
+    return outlen;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/g722_encode.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,391 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g722_encode.c - The ITU G.722 codec, encode part.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Based on a single channel 64kbps only G.722 codec which is:
+ *
+ *****    Copyright (c) CMU    1993      *****
+ * Computer Science, Speech Group
+ * Chengxiang Lu and Alex Hauptmann
+ *
+ * $Id: g722_encode.c,v 1.16 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <memory.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/g722.h"
+
+static void block4(g722_encode_state_t *s, int band, int d)
+{
+    int wd1;
+    int wd2;
+    int wd3;
+    int i;
+
+    /* Block 4, RECONS */
+    s->band[band].d[0] = d;
+    s->band[band].r[0] = saturate(s->band[band].s + d);
+
+    /* Block 4, PARREC */
+    s->band[band].p[0] = saturate(s->band[band].sz + d);
+
+    /* Block 4, UPPOL2 */
+    for (i = 0;  i < 3;  i++)
+        s->band[band].sg[i] = s->band[band].p[i] >> 15;
+    wd1 = saturate(s->band[band].a[1] << 2);
+
+    wd2 = (s->band[band].sg[0] == s->band[band].sg[1])  ?  -wd1  :  wd1;
+    if (wd2 > 32767)
+        wd2 = 32767;
+    wd3 = (wd2 >> 7) + ((s->band[band].sg[0] == s->band[band].sg[2])  ?  128  :  -128);
+    wd3 += (s->band[band].a[2]*32512) >> 15;
+    if (wd3 > 12288)
+        wd3 = 12288;
+    else if (wd3 < -12288)
+        wd3 = -12288;
+    s->band[band].ap[2] = wd3;
+
+    /* Block 4, UPPOL1 */
+    s->band[band].sg[0] = s->band[band].p[0] >> 15;
+    s->band[band].sg[1] = s->band[band].p[1] >> 15;
+    wd1 = (s->band[band].sg[0] == s->band[band].sg[1])  ?  192  :  -192;
+    wd2 = (s->band[band].a[1]*32640) >> 15;
+
+    s->band[band].ap[1] = saturate(wd1 + wd2);
+    wd3 = saturate(15360 - s->band[band].ap[2]);
+    if (s->band[band].ap[1] > wd3)
+        s->band[band].ap[1] = wd3;
+    else if (s->band[band].ap[1] < -wd3)
+        s->band[band].ap[1] = -wd3;
+
+    /* Block 4, UPZERO */
+    wd1 = (d == 0)  ?  0  :  128;
+    s->band[band].sg[0] = d >> 15;
+    for (i = 1;  i < 7;  i++)
+    {
+        s->band[band].sg[i] = s->band[band].d[i] >> 15;
+        wd2 = (s->band[band].sg[i] == s->band[band].sg[0])  ?  wd1  :  -wd1;
+        wd3 = (s->band[band].b[i]*32640) >> 15;
+        s->band[band].bp[i] = saturate(wd2 + wd3);
+    }
+
+    /* Block 4, DELAYA */
+    for (i = 6;  i > 0;  i--)
+    {
+        s->band[band].d[i] = s->band[band].d[i - 1];
+        s->band[band].b[i] = s->band[band].bp[i];
+    }
+    
+    for (i = 2;  i > 0;  i--)
+    {
+        s->band[band].r[i] = s->band[band].r[i - 1];
+        s->band[band].p[i] = s->band[band].p[i - 1];
+        s->band[band].a[i] = s->band[band].ap[i];
+    }
+
+    /* Block 4, FILTEP */
+    wd1 = saturate(s->band[band].r[1] + s->band[band].r[1]);
+    wd1 = (s->band[band].a[1]*wd1) >> 15;
+    wd2 = saturate(s->band[band].r[2] + s->band[band].r[2]);
+    wd2 = (s->band[band].a[2]*wd2) >> 15;
+    s->band[band].sp = saturate(wd1 + wd2);
+
+    /* Block 4, FILTEZ */
+    s->band[band].sz = 0;
+    for (i = 6;  i > 0;  i--)
+    {
+        wd1 = saturate(s->band[band].d[i] + s->band[band].d[i]);
+        s->band[band].sz += (s->band[band].b[i]*wd1) >> 15;
+    }
+    s->band[band].sz = saturate(s->band[band].sz);
+
+    /* Block 4, PREDIC */
+    s->band[band].s = saturate(s->band[band].sp + s->band[band].sz);
+}
+/*- End of function --------------------------------------------------------*/
+
+g722_encode_state_t *g722_encode_init(g722_encode_state_t *s, int rate, int options)
+{
+    if (s == NULL)
+    {
+        if ((s = (g722_encode_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    if (rate == 48000)
+        s->bits_per_sample = 6;
+    else if (rate == 56000)
+        s->bits_per_sample = 7;
+    else
+        s->bits_per_sample = 8;
+    if ((options & G722_SAMPLE_RATE_8000))
+        s->eight_k = TRUE;
+    if ((options & G722_PACKED)  &&  s->bits_per_sample != 8)
+        s->packed = TRUE;
+    else
+        s->packed = FALSE;
+    s->band[0].det = 32;
+    s->band[1].det = 8;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int g722_encode_release(g722_encode_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len)
+{
+    static const int q6[32] =
+    {
+           0,   35,   72,  110,  150,  190,  233,  276,
+         323,  370,  422,  473,  530,  587,  650,  714,
+         786,  858,  940, 1023, 1121, 1219, 1339, 1458,
+        1612, 1765, 1980, 2195, 2557, 2919,    0,    0
+    };
+    static const int iln[32] =
+    {
+         0, 63, 62, 31, 30, 29, 28, 27,
+        26, 25, 24, 23, 22, 21, 20, 19,
+        18, 17, 16, 15, 14, 13, 12, 11,
+        10,  9,  8,  7,  6,  5,  4,  0
+    };
+    static const int ilp[32] =
+    {
+         0, 61, 60, 59, 58, 57, 56, 55,
+        54, 53, 52, 51, 50, 49, 48, 47,
+        46, 45, 44, 43, 42, 41, 40, 39,
+        38, 37, 36, 35, 34, 33, 32,  0
+    };
+    static const int wl[8] =
+    {
+        -60, -30, 58, 172, 334, 538, 1198, 3042
+    };
+    static const int rl42[16] =
+    {
+        0, 7, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 0
+    };
+    static const int ilb[32] =
+    {
+        2048, 2093, 2139, 2186, 2233, 2282, 2332,
+        2383, 2435, 2489, 2543, 2599, 2656, 2714,
+        2774, 2834, 2896, 2960, 3025, 3091, 3158,
+        3228, 3298, 3371, 3444, 3520, 3597, 3676,
+        3756, 3838, 3922, 4008
+    };
+    static const int qm4[16] =
+    {
+             0, -20456, -12896, -8968,
+         -6288,  -4240,  -2584, -1200,
+         20456,  12896,   8968,  6288,
+          4240,   2584,   1200,     0
+    };
+    static const int qm2[4] =
+    {
+        -7408,  -1616,   7408,   1616
+    };
+    static const int qmf_coeffs[12] =
+    {
+           3,  -11,   12,   32, -210,  951, 3876, -805,  362, -156,   53,  -11,
+    };
+    static const int ihn[3] = {0, 1, 0};
+    static const int ihp[3] = {0, 3, 2};
+    static const int wh[3] = {0, -214, 798};
+    static const int rh2[4] = {2, 1, 2, 1};
+
+    int dlow;
+    int dhigh;
+    int el;
+    int wd;
+    int wd1;
+    int ril;
+    int wd2;
+    int il4;
+    int ih2;
+    int wd3;
+    int eh;
+    int mih;
+    int i;
+    int j;
+    /* Low and high band PCM from the QMF */
+    int xlow;
+    int xhigh;
+    int g722_bytes;
+    /* Even and odd tap accumulators */
+    int sumeven;
+    int sumodd;
+    int ihigh;
+    int ilow;
+    int code;
+
+    g722_bytes = 0;
+    xhigh = 0;
+    for (j = 0;  j < len;  )
+    {
+        if (s->itu_test_mode)
+        {
+            xlow =
+            xhigh = amp[j++] >> 1;
+        }
+        else
+        {
+            if (s->eight_k)
+            {
+                xlow = amp[j++];
+            }
+            else
+            {
+                /* Apply the transmit QMF */
+                /* Shuffle the buffer down */
+                for (i = 0;  i < 22;  i++)
+                    s->x[i] = s->x[i + 2];
+                s->x[22] = amp[j++];
+                s->x[23] = amp[j++];
+    
+                /* Discard every other QMF output */
+                sumeven = 0;
+                sumodd = 0;
+                for (i = 0;  i < 12;  i++)
+                {
+                    sumodd += s->x[2*i]*qmf_coeffs[i];
+                    sumeven += s->x[2*i + 1]*qmf_coeffs[11 - i];
+                }
+                xlow = (sumeven + sumodd) >> 13;
+                xhigh = (sumeven - sumodd) >> 13;
+            }
+        }
+        /* Block 1L, SUBTRA */
+        el = saturate(xlow - s->band[0].s);
+
+        /* Block 1L, QUANTL */
+        wd = (el >= 0)  ?  el  :  -(el + 1);
+
+        for (i = 1;  i < 30;  i++)
+        {
+            wd1 = (q6[i]*s->band[0].det) >> 12;
+            if (wd < wd1)
+                break;
+        }
+        ilow = (el < 0)  ?  iln[i]  :  ilp[i];
+
+        /* Block 2L, INVQAL */
+        ril = ilow >> 2;
+        wd2 = qm4[ril];
+        dlow = (s->band[0].det*wd2) >> 15;
+
+        /* Block 3L, LOGSCL */
+        il4 = rl42[ril];
+        wd = (s->band[0].nb*127) >> 7;
+        s->band[0].nb = wd + wl[il4];
+        if (s->band[0].nb < 0)
+            s->band[0].nb = 0;
+        else if (s->band[0].nb > 18432)
+            s->band[0].nb = 18432;
+
+        /* Block 3L, SCALEL */
+        wd1 = (s->band[0].nb >> 6) & 31;
+        wd2 = 8 - (s->band[0].nb >> 11);
+        wd3 = (wd2 < 0)  ?  (ilb[wd1] << -wd2)  :  (ilb[wd1] >> wd2);
+        s->band[0].det = wd3 << 2;
+
+        block4(s, 0, dlow);
+        
+        if (s->eight_k)
+        {
+            /* Just leave the high bits as zero */
+            code = (0xC0 | ilow) >> (8 - s->bits_per_sample);
+        }
+        else
+        {
+            /* Block 1H, SUBTRA */
+            eh = saturate(xhigh - s->band[1].s);
+
+            /* Block 1H, QUANTH */
+            wd = (eh >= 0)  ?  eh  :  -(eh + 1);
+            wd1 = (564*s->band[1].det) >> 12;
+            mih = (wd >= wd1)  ?  2  :  1;
+            ihigh = (eh < 0)  ?  ihn[mih]  :  ihp[mih];
+
+            /* Block 2H, INVQAH */
+            wd2 = qm2[ihigh];
+            dhigh = (s->band[1].det*wd2) >> 15;
+
+            /* Block 3H, LOGSCH */
+            ih2 = rh2[ihigh];
+            wd = (s->band[1].nb*127) >> 7;
+            s->band[1].nb = wd + wh[ih2];
+            if (s->band[1].nb < 0)
+                s->band[1].nb = 0;
+            else if (s->band[1].nb > 22528)
+                s->band[1].nb = 22528;
+
+            /* Block 3H, SCALEH */
+            wd1 = (s->band[1].nb >> 6) & 31;
+            wd2 = 10 - (s->band[1].nb >> 11);
+            wd3 = (wd2 < 0)  ?  (ilb[wd1] << -wd2)  :  (ilb[wd1] >> wd2);
+            s->band[1].det = wd3 << 2;
+
+            block4(s, 1, dhigh);
+            code = ((ihigh << 6) | ilow) >> (8 - s->bits_per_sample);
+        }
+
+        if (s->packed)
+        {
+            /* Pack the code bits */
+            s->out_buffer |= (code << s->out_bits);
+            s->out_bits += s->bits_per_sample;
+            if (s->out_bits >= 8)
+            {
+                g722_data[g722_bytes++] = (uint8_t) (s->out_buffer & 0xFF);
+                s->out_bits -= 8;
+                s->out_buffer >>= 8;
+            }
+        }
+        else
+        {
+            g722_data[g722_bytes++] = (uint8_t) code;
+        }
+    }
+    return g722_bytes;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/g726.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1178 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g726.c - The ITU G.726 codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Based on G.721/G.723 code which is:
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use.  Users may copy or modify this source code without
+ * charge.
+ *
+ * SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
+ * THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ *
+ * $Id: g726.c,v 1.17 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <memory.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/bitstream.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/g711.h"
+#include "spandsp/g726.h"
+
+/*
+ * Maps G.726_16 code word to reconstructed scale factor normalized log
+ * magnitude values.
+ */
+static const int g726_16_dqlntab[4] =
+{
+    116, 365, 365, 116
+};
+
+/* Maps G.726_16 code word to log of scale factor multiplier. */
+static const int g726_16_witab[4] =
+{
+    -704, 14048, 14048, -704
+};
+
+/*
+ * Maps G.726_16 code words to a set of values whose long and short
+ * term averages are computed and then compared to give an indication
+ * how stationary (steady state) the signal is.
+ */
+static const int g726_16_fitab[4] =
+{
+    0x000, 0xE00, 0xE00, 0x000
+};
+
+static const int qtab_726_16[1] =
+{
+    261
+};
+
+/*
+ * Maps G.726_24 code word to reconstructed scale factor normalized log
+ * magnitude values.
+ */
+static const int g726_24_dqlntab[8] =
+{
+    -2048, 135, 273, 373, 373, 273, 135, -2048
+};
+
+/* Maps G.726_24 code word to log of scale factor multiplier. */
+static const int g726_24_witab[8] =
+{
+    -128, 960, 4384, 18624, 18624, 4384, 960, -128
+};
+
+/*
+ * Maps G.726_24 code words to a set of values whose long and short
+ * term averages are computed and then compared to give an indication
+ * how stationary (steady state) the signal is.
+ */
+static const int g726_24_fitab[8] =
+{
+    0x000, 0x200, 0x400, 0xE00, 0xE00, 0x400, 0x200, 0x000
+};
+
+static const int qtab_726_24[3] =
+{
+    8, 218, 331
+};
+
+/*
+ * Maps G.726_32 code word to reconstructed scale factor normalized log
+ * magnitude values.
+ */
+static const int g726_32_dqlntab[16] =
+{
+    -2048,   4, 135, 213, 273, 323, 373,   425,
+      425, 373, 323, 273, 213, 135,   4, -2048
+};
+
+/* Maps G.726_32 code word to log of scale factor multiplier. */
+static const int g726_32_witab[16] =
+{
+     -384,   576,  1312,  2048,  3584,  6336, 11360, 35904,
+    35904, 11360,  6336,  3584,  2048,  1312,   576,  -384
+};
+
+/*
+ * Maps G.726_32 code words to a set of values whose long and short
+ * term averages are computed and then compared to give an indication
+ * how stationary (steady state) the signal is.
+ */
+static const int g726_32_fitab[16] =
+{
+    0x000, 0x000, 0x000, 0x200, 0x200, 0x200, 0x600, 0xE00,
+    0xE00, 0x600, 0x200, 0x200, 0x200, 0x000, 0x000, 0x000
+};
+
+static const int qtab_726_32[7] =
+{
+    -124, 80, 178, 246, 300, 349, 400
+};
+
+/*
+ * Maps G.726_40 code word to ructeconstructed scale factor normalized log
+ * magnitude values.
+ */
+static const int g726_40_dqlntab[32] =
+{
+    -2048, -66, 28, 104, 169, 224, 274, 318,
+      358, 395, 429, 459, 488, 514, 539, 566,
+      566, 539, 514, 488, 459, 429, 395, 358,
+      318, 274, 224, 169, 104, 28, -66, -2048
+};
+
+/* Maps G.726_40 code word to log of scale factor multiplier. */
+static const int g726_40_witab[32] =
+{
+      448,   448,   768,  1248,  1280,  1312,  1856,  3200,
+     4512,  5728,  7008,  8960, 11456, 14080, 16928, 22272,
+    22272, 16928, 14080, 11456,  8960,  7008,  5728,  4512,
+     3200,  1856,  1312,  1280,  1248,   768,   448,   448
+};
+
+/*
+ * Maps G.726_40 code words to a set of values whose long and short
+ * term averages are computed and then compared to give an indication
+ * how stationary (steady state) the signal is.
+ */
+static const int g726_40_fitab[32] =
+{
+    0x000, 0x000, 0x000, 0x000, 0x000, 0x200, 0x200, 0x200,
+    0x200, 0x200, 0x400, 0x600, 0x800, 0xA00, 0xC00, 0xC00,
+    0xC00, 0xC00, 0xA00, 0x800, 0x600, 0x400, 0x200, 0x200,
+    0x200, 0x200, 0x200, 0x000, 0x000, 0x000, 0x000, 0x000
+};
+
+static const int qtab_726_40[15] =
+{
+    -122, -16,  68, 139, 198, 250, 298, 339,
+     378, 413, 445, 475, 502, 528, 553
+};
+
+/*
+ * returns the integer product of the 14-bit integer "an" and
+ * "floating point" representation (4-bit exponent, 6-bit mantessa) "srn".
+ */
+static int16_t fmult(int16_t an, int16_t srn)
+{
+    int16_t anmag;
+    int16_t anexp;
+    int16_t anmant;
+    int16_t wanexp;
+    int16_t wanmant;
+    int16_t retval;
+
+    anmag = (an > 0)  ?  an  :  ((-an) & 0x1FFF);
+    anexp = (int16_t) (top_bit(anmag) - 5);
+    anmant = (anmag == 0)  ?  32  :  (anexp >= 0)  ?  (anmag >> anexp)  :  (anmag << -anexp);
+    wanexp = anexp + ((srn >> 6) & 0xF) - 13;
+
+    wanmant = (anmant*(srn & 0x3F) + 0x30) >> 4;
+    retval = (wanexp >= 0)  ?  ((wanmant << wanexp) & 0x7FFF)  :  (wanmant >> -wanexp);
+
+    return (((an ^ srn) < 0)  ?  -retval  :  retval);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Compute the estimated signal from the 6-zero predictor.
+ */
+static __inline__ int16_t predictor_zero(g726_state_t *s)
+{
+    int i;
+    int sezi;
+
+    sezi = fmult(s->b[0] >> 2, s->dq[0]);
+    /* ACCUM */
+    for (i = 1;  i < 6;  i++)
+        sezi += fmult(s->b[i] >> 2, s->dq[i]);
+    return (int16_t) sezi;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Computes the estimated signal from the 2-pole predictor.
+ */
+static __inline__ int16_t predictor_pole(g726_state_t *s)
+{
+    return (fmult(s->a[1] >> 2, s->sr[1]) + fmult(s->a[0] >> 2, s->sr[0]));
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Computes the quantization step size of the adaptive quantizer.
+ */
+static int step_size(g726_state_t *s)
+{
+    int y;
+    int dif;
+    int al;
+
+    if (s->ap >= 256)
+        return s->yu;
+    y = s->yl >> 6;
+    dif = s->yu - y;
+    al = s->ap >> 2;
+    if (dif > 0)
+        y += (dif*al) >> 6;
+    else if (dif < 0)
+        y += (dif*al + 0x3F) >> 6;
+    return y;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Given a raw sample, 'd', of the difference signal and a
+ * quantization step size scale factor, 'y', this routine returns the
+ * ADPCM codeword to which that sample gets quantized.  The step
+ * size scale factor division operation is done in the log base 2 domain
+ * as a subtraction.
+ */
+static int16_t quantize(int d,                  /* Raw difference signal sample */
+                        int y,                  /* Step size multiplier */
+                        const int table[],     /* quantization table */
+                        int quantizer_states)   /* table size of int16_t integers */
+{
+    int16_t dqm;    /* Magnitude of 'd' */
+    int16_t exp;    /* Integer part of base 2 log of 'd' */
+    int16_t mant;   /* Fractional part of base 2 log */
+    int16_t dl;     /* Log of magnitude of 'd' */
+    int16_t dln;    /* Step size scale factor normalized log */
+    int i;
+    int size;
+
+    /*
+     * LOG
+     *
+     * Compute base 2 log of 'd', and store in 'dl'.
+     */
+    dqm = (int16_t) abs(d);
+    exp = (int16_t) (top_bit(dqm >> 1) + 1);
+    /* Fractional portion. */
+    mant = ((dqm << 7) >> exp) & 0x7F;
+    dl = (exp << 7) + mant;
+
+    /*
+     * SUBTB
+     *
+     * "Divide" by step size multiplier.
+     */
+    dln = dl - (int16_t) (y >> 2);
+
+    /*
+     * QUAN
+     *
+     * Search for codword i for 'dln'.
+     */
+    size = (quantizer_states - 1) >> 1;
+    for (i = 0;  i < size;  i++)
+    {
+        if (dln < table[i])
+            break;
+    }
+    if (d < 0)
+    {
+        /* Take 1's complement of i */
+        return (int16_t) ((size << 1) + 1 - i);
+    }
+    if (i == 0  &&  (quantizer_states & 1))
+    {
+        /* Zero is only valid if there are an even number of states, so
+           take the 1's complement if the code is zero. */
+        return (int16_t) quantizer_states;
+    }
+    return (int16_t) i;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Returns reconstructed difference signal 'dq' obtained from
+ * codeword 'i' and quantization step size scale factor 'y'.
+ * Multiplication is performed in log base 2 domain as addition.
+ */
+static int16_t reconstruct(int sign,    /* 0 for non-negative value */
+                           int dqln,    /* G.72x codeword */
+                           int y)       /* Step size multiplier */
+{
+    int16_t dql;    /* Log of 'dq' magnitude */
+    int16_t dex;    /* Integer part of log */
+    int16_t dqt;
+    int16_t dq;     /* Reconstructed difference signal sample */
+
+    dql = (int16_t) (dqln + (y >> 2));  /* ADDA */
+
+    if (dql < 0)
+        return ((sign)  ?  -0x8000  :  0);
+    /* ANTILOG */
+    dex = (dql >> 7) & 15;
+    dqt = 128 + (dql & 127);
+    dq = (dqt << 7) >> (14 - dex);
+    return ((sign)  ?  (dq - 0x8000)  :  dq);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * updates the state variables for each output code
+ */
+static void update(g726_state_t *s,
+                   int y,       /* quantizer step size */
+                   int wi,      /* scale factor multiplier */
+                   int fi,      /* for long/short term energies */
+                   int dq,      /* quantized prediction difference */
+                   int sr,      /* reconstructed signal */
+                   int dqsez)   /* difference from 2-pole predictor */
+{
+    int16_t mag;
+    int16_t exp;
+    int16_t a2p;        /* LIMC */
+    int16_t a1ul;       /* UPA1 */
+    int16_t pks1;       /* UPA2 */
+    int16_t fa1;
+    int16_t ylint;
+    int16_t dqthr;
+    int16_t ylfrac;
+    int16_t thr;
+    int16_t pk0;
+    int i;
+    int tr;
+
+    a2p = 0;
+    /* Needed in updating predictor poles */
+    pk0 = (dqsez < 0)  ?  1  :  0;
+
+    /* prediction difference magnitude */
+    mag = (int16_t) (dq & 0x7FFF);
+    /* TRANS */
+    ylint = (int16_t) (s->yl >> 15);            /* exponent part of yl */
+    ylfrac = (int16_t) ((s->yl >> 10) & 0x1F);  /* fractional part of yl */
+    /* Limit threshold to 31 << 10 */
+    thr = (ylint > 9)  ?  (31 << 10)  :  ((32 + ylfrac) << ylint);
+    dqthr = (thr + (thr >> 1)) >> 1;            /* dqthr = 0.75 * thr */
+    if (!s->td)                                 /* signal supposed voice */
+        tr = FALSE;
+    else if (mag <= dqthr)                      /* supposed data, but small mag */
+        tr = FALSE;                             /* treated as voice */
+    else                                        /* signal is data (modem) */
+        tr = TRUE;
+
+    /*
+     * Quantizer scale factor adaptation.
+     */
+
+    /* FUNCTW & FILTD & DELAY */
+    /* update non-steady state step size multiplier */
+    s->yu = (int16_t) (y + ((wi - y) >> 5));
+
+    /* LIMB */
+    if (s->yu < 544)
+        s->yu = 544;
+    else if (s->yu > 5120)
+        s->yu = 5120;
+
+    /* FILTE & DELAY */
+    /* update steady state step size multiplier */
+    s->yl += s->yu + ((-s->yl) >> 6);
+
+    /*
+     * Adaptive predictor coefficients.
+     */
+    if (tr)
+    {
+        /* Reset the a's and b's for a modem signal */
+        s->a[0] = 0;
+        s->a[1] = 0;
+        s->b[0] = 0;
+        s->b[1] = 0;
+        s->b[2] = 0;
+        s->b[3] = 0;
+        s->b[4] = 0;
+        s->b[5] = 0;
+    }
+    else
+    {
+        /* Update the a's and b's */
+        /* UPA2 */
+        pks1 = pk0 ^ s->pk[0];
+
+        /* Update predictor pole a[1] */
+        a2p = s->a[1] - (s->a[1] >> 7);
+        if (dqsez != 0)
+        {
+            fa1 = (pks1)  ?  s->a[0]  :  -s->a[0];
+            /* a2p = function of fa1 */
+            if (fa1 < -8191)
+                a2p -= 0x100;
+            else if (fa1 > 8191)
+                a2p += 0xFF;
+            else
+                a2p += fa1 >> 5;
+
+            if (pk0 ^ s->pk[1])
+            {
+                /* LIMC */
+                if (a2p <= -12160)
+                    a2p = -12288;
+                else if (a2p >= 12416)
+                    a2p = 12288;
+                else
+                    a2p -= 0x80;
+            }
+            else if (a2p <= -12416)
+                a2p = -12288;
+            else if (a2p >= 12160)
+                a2p = 12288;
+            else
+                a2p += 0x80;
+        }
+
+        /* TRIGB & DELAY */
+        s->a[1] = a2p;
+
+        /* UPA1 */
+        /* Update predictor pole a[0] */
+        s->a[0] -= s->a[0] >> 8;
+        if (dqsez != 0)
+        {
+            if (pks1 == 0)
+                s->a[0] += 192;
+            else
+                s->a[0] -= 192;
+        }
+        /* LIMD */
+        a1ul = 15360 - a2p;
+        if (s->a[0] < -a1ul)
+            s->a[0] = -a1ul;
+        else if (s->a[0] > a1ul)
+            s->a[0] = a1ul;
+
+        /* UPB : update predictor zeros b[6] */
+        for (i = 0;  i < 6;  i++)
+        {
+            /* Distinguish 40Kbps mode from the others */
+            s->b[i] -= s->b[i] >> ((s->bits_per_sample == 5)  ?  9  :  8);
+            if (dq & 0x7FFF)
+            {
+                /* XOR */
+                if ((dq ^ s->dq[i]) >= 0)
+                    s->b[i] += 128;
+                else
+                    s->b[i] -= 128;
+            }
+        }
+    }
+
+    for (i = 5;  i > 0;  i--)
+        s->dq[i] = s->dq[i - 1];
+    /* FLOAT A : convert dq[0] to 4-bit exp, 6-bit mantissa f.p. */
+    if (mag == 0)
+    {
+        s->dq[0] = (dq >= 0)  ?  0x20  :  0xFC20;
+    }
+    else
+    {
+        exp = (int16_t) (top_bit(mag) + 1);
+        s->dq[0] = (dq >= 0)
+                 ?  ((exp << 6) + ((mag << 6) >> exp))
+                 :  ((exp << 6) + ((mag << 6) >> exp) - 0x400);
+    }
+
+    s->sr[1] = s->sr[0];
+    /* FLOAT B : convert sr to 4-bit exp., 6-bit mantissa f.p. */
+    if (sr == 0)
+    {
+        s->sr[0] = 0x20;
+    }
+    else if (sr > 0)
+    {
+        exp = (int16_t) (top_bit(sr) + 1);
+        s->sr[0] = (int16_t) ((exp << 6) + ((sr << 6) >> exp));
+    }
+    else if (sr > -32768)
+    {
+        mag = (int16_t) -sr;
+        exp = (int16_t) (top_bit(mag) + 1);
+        s->sr[0] =  (exp << 6) + ((mag << 6) >> exp) - 0x400;
+    }
+    else
+    {
+        s->sr[0] = (uint16_t) 0xFC20;
+    }
+
+    /* DELAY A */
+    s->pk[1] = s->pk[0];
+    s->pk[0] = pk0;
+
+    /* TONE */
+    if (tr)                 /* this sample has been treated as data */
+        s->td = FALSE;      /* next one will be treated as voice */
+    else if (a2p < -11776)  /* small sample-to-sample correlation */
+        s->td = TRUE;       /* signal may be data */
+    else                    /* signal is voice */
+        s->td = FALSE;
+
+    /* Adaptation speed control. */
+    /* FILTA */
+    s->dms += ((int16_t) fi - s->dms) >> 5;
+    /* FILTB */
+    s->dml += (((int16_t) (fi << 2) - s->dml) >> 7);
+
+    if (tr)
+        s->ap = 256;
+    else if (y < 1536)                      /* SUBTC */
+        s->ap += (0x200 - s->ap) >> 4;
+    else if (s->td)
+        s->ap += (0x200 - s->ap) >> 4;
+    else if (abs((s->dms << 2) - s->dml) >= (s->dml >> 3))
+        s->ap += (0x200 - s->ap) >> 4;
+    else
+        s->ap += (-s->ap) >> 4;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int16_t tandem_adjust_alaw(int16_t sr,   /* decoder output linear PCM sample */
+                                  int se,       /* predictor estimate sample */
+                                  int y,        /* quantizer step size */
+                                  int i,        /* decoder input code */
+                                  int sign,
+                                  const int qtab[],
+                                  int quantizer_states)
+{
+    uint8_t sp; /* A-law compressed 8-bit code */
+    int16_t dx; /* prediction error */
+    int id;     /* quantized prediction error */
+    int sd;     /* adjusted A-law decoded sample value */
+
+    if (sr <= -32768)
+        sr = -1;
+    sp = linear_to_alaw((sr >> 1) << 3);
+    /* 16-bit prediction error */
+    dx = (int16_t) ((alaw_to_linear(sp) >> 2) - se);
+    id = quantize(dx, y, qtab, quantizer_states);
+    if (id == i)
+    {
+        /* No adjustment of sp required */
+        return (int16_t) sp;
+    }
+    /* sp adjustment needed */
+    /* ADPCM codes : 8, 9, ... F, 0, 1, ... , 6, 7 */
+    /* 2's complement to biased unsigned */
+    if ((id ^ sign) > (i ^ sign))
+    {
+        /* sp adjusted to next lower value */
+        if (sp & 0x80)
+            sd = (sp == 0xD5)  ?  0x55  :  (((sp ^ 0x55) - 1) ^ 0x55);
+        else
+            sd = (sp == 0x2A)  ?  0x2A  :  (((sp ^ 0x55) + 1) ^ 0x55);
+    }
+    else
+    {
+        /* sp adjusted to next higher value */
+        if (sp & 0x80)
+            sd = (sp == 0xAA)  ?  0xAA  :  (((sp ^ 0x55) + 1) ^ 0x55);
+        else
+            sd = (sp == 0x55)  ?  0xD5  :  (((sp ^ 0x55) - 1) ^ 0x55);
+    }
+    return (int16_t) sd;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int16_t tandem_adjust_ulaw(int16_t sr,   /* decoder output linear PCM sample */
+                                  int se,       /* predictor estimate sample */
+                                  int y,        /* quantizer step size */
+                                  int i,        /* decoder input code */
+                                  int sign,
+                                  const int qtab[],
+                                  int quantizer_states)
+{
+    uint8_t sp; /* u-law compressed 8-bit code */
+    int16_t dx; /* prediction error */
+    int id;     /* quantized prediction error */
+    int sd;     /* adjusted u-law decoded sample value */
+
+    if (sr <= -32768)
+        sr = 0;
+    sp = linear_to_ulaw(sr << 2);
+    /* 16-bit prediction error */
+    dx = (int16_t) ((ulaw_to_linear(sp) >> 2) - se);
+    id = quantize(dx, y, qtab, quantizer_states);
+    if (id == i)
+    {
+        /* No adjustment of sp required. */
+        return (int16_t) sp;
+    }
+    /* ADPCM codes : 8, 9, ... F, 0, 1, ... , 6, 7 */
+    /* 2's complement to biased unsigned */
+    if ((id ^ sign) > (i ^ sign))
+    {
+        /* sp adjusted to next lower value */
+        if (sp & 0x80)
+            sd = (sp == 0xFF)  ?  0x7E  :  (sp + 1);
+        else
+            sd = (sp == 0x00)  ?  0x00  :  (sp - 1);
+    }
+    else
+    {
+        /* sp adjusted to next higher value */
+        if (sp & 0x80)
+            sd = (sp == 0x80)  ?  0x80  :  (sp - 1);
+        else
+            sd = (sp == 0x7F)  ?  0xFE  :  (sp + 1);
+    }
+    return (int16_t) sd;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Encodes a linear PCM, A-law or u-law input sample and returns its 3-bit code.
+ */
+static uint8_t g726_16_encoder(g726_state_t *s, int16_t amp)
+{
+    int y;
+    int16_t sei;
+    int16_t sezi;
+    int16_t se;
+    int16_t d;
+    int16_t sr;
+    int16_t dqsez;
+    int16_t dq;
+    int16_t i;
+    
+    sezi = predictor_zero(s);
+    sei = sezi + predictor_pole(s);
+    se = sei >> 1;
+    d = amp - se;
+
+    /* Quantize prediction difference */
+    y = step_size(s);
+    i = quantize(d, y, qtab_726_16, 4);
+    dq = reconstruct(i & 2, g726_16_dqlntab[i], y);
+
+    /* Reconstruct the signal */
+    sr = (dq < 0)  ?  (se - (dq & 0x3FFF))  :  (se + dq);
+
+    /* Pole prediction difference */
+    dqsez = sr + (sezi >> 1) - se;
+    
+    update(s, y, g726_16_witab[i], g726_16_fitab[i], dq, sr, dqsez);
+    return (uint8_t) i;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Decodes a 2-bit CCITT G.726_16 ADPCM code and returns
+ * the resulting 16-bit linear PCM, A-law or u-law sample value.
+ */
+static int16_t g726_16_decoder(g726_state_t *s, uint8_t code)
+{
+    int16_t sezi;
+    int16_t sei;
+    int16_t se;
+    int16_t sr;
+    int16_t dq;
+    int16_t dqsez;
+    int y;
+
+    /* Mask to get proper bits */
+    code &= 0x03;
+    sezi = predictor_zero(s);
+    sei = sezi + predictor_pole(s);
+
+    y = step_size(s);
+    dq = reconstruct(code & 2, g726_16_dqlntab[code], y);
+
+    /* Reconstruct the signal */
+    se = sei >> 1;
+    sr = (dq < 0)  ?  (se - (dq & 0x3FFF))  :  (se + dq);
+
+    /* Pole prediction difference */
+    dqsez = sr + (sezi >> 1) - se;
+
+    update(s, y, g726_16_witab[code], g726_16_fitab[code], dq, sr, dqsez);
+
+    switch (s->ext_coding)
+    {
+    case G726_ENCODING_ALAW:
+        return tandem_adjust_alaw(sr, se, y, code, 2, qtab_726_16, 4);
+    case G726_ENCODING_ULAW:
+        return tandem_adjust_ulaw(sr, se, y, code, 2, qtab_726_16, 4);
+    }
+    return (sr << 2);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Encodes a linear PCM, A-law or u-law input sample and returns its 3-bit code.
+ */
+static uint8_t g726_24_encoder(g726_state_t *s, int16_t amp)
+{
+    int16_t sei;
+    int16_t sezi;
+    int16_t se;
+    int16_t d;
+    int16_t sr;
+    int16_t dqsez;
+    int16_t dq;
+    int16_t i;
+    int y;
+    
+    sezi = predictor_zero(s);
+    sei = sezi + predictor_pole(s);
+    se = sei >> 1;
+    d = amp - se;
+
+    /* Quantize prediction difference */
+    y = step_size(s);
+    i = quantize(d, y, qtab_726_24, 7);
+    dq = reconstruct(i & 4, g726_24_dqlntab[i], y);
+
+    /* Reconstruct the signal */
+    sr = (dq < 0)  ?  (se - (dq & 0x3FFF))  :  (se + dq);
+
+    /* Pole prediction difference */
+    dqsez = sr + (sezi >> 1) - se;
+    
+    update(s, y, g726_24_witab[i], g726_24_fitab[i], dq, sr, dqsez);
+    return (uint8_t) i;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Decodes a 3-bit CCITT G.726_24 ADPCM code and returns
+ * the resulting 16-bit linear PCM, A-law or u-law sample value.
+ */
+static int16_t g726_24_decoder(g726_state_t *s, uint8_t code)
+{
+    int16_t sezi;
+    int16_t sei;
+    int16_t se;
+    int16_t sr;
+    int16_t dq;
+    int16_t dqsez;
+    int y;
+
+    /* Mask to get proper bits */
+    code &= 0x07;
+    sezi = predictor_zero(s);
+    sei = sezi + predictor_pole(s);
+
+    y = step_size(s);
+    dq = reconstruct(code & 4, g726_24_dqlntab[code], y);
+
+    /* Reconstruct the signal */
+    se = sei >> 1;
+    sr = (dq < 0)  ?  (se - (dq & 0x3FFF))  :  (se + dq);
+
+    /* Pole prediction difference */
+    dqsez = sr + (sezi >> 1) - se;
+
+    update(s, y, g726_24_witab[code], g726_24_fitab[code], dq, sr, dqsez);
+
+    switch (s->ext_coding)
+    {
+    case G726_ENCODING_ALAW:
+        return tandem_adjust_alaw(sr, se, y, code, 4, qtab_726_24, 7);
+    case G726_ENCODING_ULAW:
+        return tandem_adjust_ulaw(sr, se, y, code, 4, qtab_726_24, 7);
+    }
+    return (sr << 2);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Encodes a linear input sample and returns its 4-bit code.
+ */
+static uint8_t g726_32_encoder(g726_state_t *s, int16_t amp)
+{
+    int16_t sei;
+    int16_t sezi;
+    int16_t se;
+    int16_t d;
+    int16_t sr;
+    int16_t dqsez;
+    int16_t dq;
+    int16_t i;
+    int y;
+    
+    sezi = predictor_zero(s);
+    sei = sezi + predictor_pole(s);
+    se = sei >> 1;
+    d = amp - se;
+
+    /* Quantize the prediction difference */
+    y = step_size(s);
+    i = quantize(d, y, qtab_726_32, 15);
+    dq = reconstruct(i & 8, g726_32_dqlntab[i], y);
+
+    /* Reconstruct the signal */
+    sr = (dq < 0)  ?  (se - (dq & 0x3FFF))  :  (se + dq);
+
+    /* Pole prediction difference */
+    dqsez = sr + (sezi >> 1) - se;
+
+    update(s, y, g726_32_witab[i], g726_32_fitab[i], dq, sr, dqsez);
+    return (uint8_t) i;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Decodes a 4-bit CCITT G.726_32 ADPCM code and returns
+ * the resulting 16-bit linear PCM, A-law or u-law sample value.
+ */
+static int16_t g726_32_decoder(g726_state_t *s, uint8_t code)
+{
+    int16_t sezi;
+    int16_t sei;
+    int16_t se;
+    int16_t sr;
+    int16_t dq;
+    int16_t dqsez;
+    int y;
+
+    /* Mask to get proper bits */
+    code &= 0x0F;
+    sezi = predictor_zero(s);
+    sei = sezi + predictor_pole(s);
+
+    y = step_size(s);
+    dq = reconstruct(code & 8, g726_32_dqlntab[code], y);
+
+    /* Reconstruct the signal */
+    se = sei >> 1;
+    sr = (dq < 0)  ?  (se - (dq & 0x3FFF))  :  (se + dq);
+
+    /* Pole prediction difference */
+    dqsez = sr + (sezi >> 1) - se;
+
+    update(s, y, g726_32_witab[code], g726_32_fitab[code], dq, sr, dqsez);
+
+    switch (s->ext_coding)
+    {
+    case G726_ENCODING_ALAW:
+        return tandem_adjust_alaw(sr, se, y, code, 8, qtab_726_32, 15);
+    case G726_ENCODING_ULAW:
+        return tandem_adjust_ulaw(sr, se, y, code, 8, qtab_726_32, 15);
+    }
+    return (sr << 2);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Encodes a 16-bit linear PCM, A-law or u-law input sample and retuens
+ * the resulting 5-bit CCITT G.726 40Kbps code.
+ */
+static uint8_t g726_40_encoder(g726_state_t *s, int16_t amp)
+{
+    int16_t sei;
+    int16_t sezi;
+    int16_t se;
+    int16_t d;
+    int16_t sr;
+    int16_t dqsez;
+    int16_t dq;
+    int16_t i;
+    int y;
+    
+    sezi = predictor_zero(s);
+    sei = sezi + predictor_pole(s);
+    se = sei >> 1;
+    d = amp - se;
+
+    /* Quantize prediction difference */
+    y = step_size(s);
+    i = quantize(d, y, qtab_726_40, 31);
+    dq = reconstruct(i & 0x10, g726_40_dqlntab[i], y);
+
+    /* Reconstruct the signal */
+    sr = (dq < 0)  ?  (se - (dq & 0x7FFF))  :  (se + dq);
+
+    /* Pole prediction difference */
+    dqsez = sr + (sezi >> 1) - se;
+
+    update(s, y, g726_40_witab[i], g726_40_fitab[i], dq, sr, dqsez);
+    return (uint8_t) i;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Decodes a 5-bit CCITT G.726 40Kbps code and returns
+ * the resulting 16-bit linear PCM, A-law or u-law sample value.
+ */
+static int16_t g726_40_decoder(g726_state_t *s, uint8_t code)
+{
+    int16_t sezi;
+    int16_t sei;
+    int16_t se;
+    int16_t sr;
+    int16_t dq;
+    int16_t dqsez;
+    int y;
+
+    /* Mask to get proper bits */
+    code &= 0x1F;
+    sezi = predictor_zero(s);
+    sei = sezi + predictor_pole(s);
+        
+    y = step_size(s);
+    dq = reconstruct(code & 0x10, g726_40_dqlntab[code], y);
+
+    /* Reconstruct the signal */
+    se = sei >> 1;
+    sr = (dq < 0)  ?  (se - (dq & 0x7FFF))  :  (se + dq);
+
+    /* Pole prediction difference */
+    dqsez = sr + (sezi >> 1) - se;
+
+    update(s, y, g726_40_witab[code], g726_40_fitab[code], dq, sr, dqsez);
+
+    switch (s->ext_coding)
+    {
+    case G726_ENCODING_ALAW:
+        return tandem_adjust_alaw(sr, se, y, code, 0x10, qtab_726_40, 31);
+    case G726_ENCODING_ULAW:
+        return tandem_adjust_ulaw(sr, se, y, code, 0x10, qtab_726_40, 31);
+    }
+    return (sr << 2);
+}
+/*- End of function --------------------------------------------------------*/
+
+g726_state_t *g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing)
+{
+    int i;
+
+    if (bit_rate != 16000  &&  bit_rate != 24000  &&  bit_rate != 32000  &&  bit_rate != 40000)
+        return NULL;
+    if (s == NULL)
+    {
+        if ((s = (g726_state_t *) malloc(sizeof(*s))) == NULL)
+            return  NULL;
+    }
+    s->yl = 34816;
+    s->yu = 544;
+    s->dms = 0;
+    s->dml = 0;
+    s->ap = 0;
+    s->rate = bit_rate;
+    s->ext_coding = ext_coding;
+    s->packing = packing;
+    for (i = 0; i < 2; i++)
+    {
+        s->a[i] = 0;
+        s->pk[i] = 0;
+        s->sr[i] = 32;
+    }
+    for (i = 0; i < 6; i++)
+    {
+        s->b[i] = 0;
+        s->dq[i] = 32;
+    }
+    s->td = FALSE;
+    switch (bit_rate)
+    {
+    case 16000:
+        s->enc_func = g726_16_encoder;
+        s->dec_func = g726_16_decoder;
+        s->bits_per_sample = 2;
+        break;
+    case 24000:
+        s->enc_func = g726_24_encoder;
+        s->dec_func = g726_24_decoder;
+        s->bits_per_sample = 3;
+        break;
+    case 32000:
+    default:
+        s->enc_func = g726_32_encoder;
+        s->dec_func = g726_32_decoder;
+        s->bits_per_sample = 4;
+        break;
+    case 40000:
+        s->enc_func = g726_40_encoder;
+        s->dec_func = g726_40_decoder;
+        s->bits_per_sample = 5;
+        break;
+    }
+    bitstream_init(&s->bs);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int g726_release(g726_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int g726_decode(g726_state_t *s,
+                int16_t amp[],
+                const uint8_t g726_data[],
+                int g726_bytes)
+{
+    int i;
+    int samples;
+    uint8_t code;
+    int sl;
+
+    for (samples = i = 0;  ;  )
+    {
+        if (s->packing != G726_PACKING_NONE)
+        {
+            /* Unpack the code bits */
+            if (s->packing != G726_PACKING_LEFT)
+            {
+                if (s->bs.residue < s->bits_per_sample)
+                {
+                    if (i >= g726_bytes)
+                        break;
+                    s->bs.bitstream |= (g726_data[i++] << s->bs.residue);
+                    s->bs.residue += 8;
+                }
+                code = (uint8_t) (s->bs.bitstream & ((1 << s->bits_per_sample) - 1));
+                s->bs.bitstream >>= s->bits_per_sample;
+            }
+            else
+            {
+                if (s->bs.residue < s->bits_per_sample)
+                {
+                    if (i >= g726_bytes)
+                        break;
+                    s->bs.bitstream = (s->bs.bitstream << 8) | g726_data[i++];
+                    s->bs.residue += 8;
+                }
+                code = (uint8_t) ((s->bs.bitstream >> (s->bs.residue - s->bits_per_sample)) & ((1 << s->bits_per_sample) - 1));
+            }
+            s->bs.residue -= s->bits_per_sample;
+        }
+        else
+        {
+            if (i >= g726_bytes)
+                break;
+            code = g726_data[i++];
+        }
+        sl = s->dec_func(s, code);
+        if (s->ext_coding != G726_ENCODING_LINEAR)
+            ((uint8_t *) amp)[samples++] = (uint8_t) sl;
+        else
+            amp[samples++] = (int16_t) sl;
+    }
+    return samples;
+}
+/*- End of function --------------------------------------------------------*/
+
+int g726_encode(g726_state_t *s,
+                uint8_t g726_data[],
+                const int16_t amp[],
+                int len)
+{
+    int i;
+    int g726_bytes;
+    int16_t sl;
+    uint8_t code;
+
+    for (g726_bytes = i = 0;  i < len;  i++)
+    {
+        /* Linearize the input sample to 14-bit PCM */
+        switch (s->ext_coding)
+        {
+        case G726_ENCODING_ALAW:
+            sl = alaw_to_linear(((const uint8_t *) amp)[i]) >> 2;
+            break;
+        case G726_ENCODING_ULAW:
+            sl = ulaw_to_linear(((const uint8_t *) amp)[i]) >> 2;
+            break;
+        default:
+            sl = amp[i] >> 2;
+            break;
+        }
+        code = s->enc_func(s, sl);
+        if (s->packing != G726_PACKING_NONE)
+        {
+            /* Pack the code bits */
+            if (s->packing != G726_PACKING_LEFT)
+            {
+                s->bs.bitstream |= (code << s->bs.residue);
+                s->bs.residue += s->bits_per_sample;
+                if (s->bs.residue >= 8)
+                {
+                    g726_data[g726_bytes++] = (uint8_t) (s->bs.bitstream & 0xFF);
+                    s->bs.bitstream >>= 8;
+                    s->bs.residue -= 8;
+                }
+            }
+            else
+            {
+                s->bs.bitstream = (s->bs.bitstream << s->bits_per_sample) | code;
+                s->bs.residue += s->bits_per_sample;
+                if (s->bs.residue >= 8)
+                {
+                    g726_data[g726_bytes++] = (uint8_t) ((s->bs.bitstream >> (s->bs.residue - 8)) & 0xFF);
+                    s->bs.residue -= 8;
+                }
+            }
+        }
+        else
+        {
+            g726_data[g726_bytes++] = (uint8_t) code;
+        }
+    }
+    return g726_bytes;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_decode.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,227 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610_decode.c - GSM 06.10 full rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the widely used GSM 06.10 code available from
+ * http://kbs.cs.tu-berlin.de/~jutta/toast.html
+ *
+ * $Id: gsm0610_decode.c,v 1.12 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdlib.h>
+#include <memory.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/bitstream.h"
+#include "spandsp/gsm0610.h"
+
+#include "gsm0610_local.h"
+
+/* 4.3 FIXED POINT IMPLEMENTATION OF THE RPE-LTP DECODER */
+
+static void postprocessing(gsm0610_state_t *s, int16_t amp[])
+{
+    int k;
+    int16_t msr;
+    int16_t tmp;
+
+    msr = s->msr;
+    for (k = 0;  k < GSM0610_FRAME_LEN;  k++)
+    {
+        tmp = gsm_mult_r(msr, 28180);
+        /* De-emphasis */
+        msr = gsm_add(amp[k], tmp);
+        /* Truncation & upscaling */
+        amp[k] = (int16_t) (gsm_add(msr, msr) & 0xFFF8);
+    }
+    /*endfor*/
+    s->msr = msr;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void decode_a_frame(gsm0610_state_t *s,
+                           int16_t amp[GSM0610_FRAME_LEN],
+                           gsm0610_frame_t *f)
+{
+    int j;
+    int k;
+    int16_t erp[40];
+    int16_t wt[GSM0610_FRAME_LEN];
+    int16_t *drp;
+
+    drp = s->dp0 + 120;
+    for (j = 0;  j < 4;  j++)
+    {
+        gsm0610_rpe_decoding(s, f->xmaxc[j], f->Mc[j], f->xMc[j], erp);
+        gsm0610_long_term_synthesis_filtering(s, f->Nc[j], f->bc[j], erp, drp);
+        for (k = 0;  k < 40;  k++)
+            wt[j*40 + k] = drp[k];
+        /*endfor*/
+    }
+    /*endfor*/
+
+    gsm0610_short_term_synthesis_filter(s, f->LARc, wt, amp);
+    postprocessing(s, amp);
+}
+/*- End of function --------------------------------------------------------*/
+
+int gsm0610_unpack_none(gsm0610_frame_t *s, const uint8_t c[])
+{
+    int i;
+    int j;
+    int k;
+    
+    i = 0;
+    for (j = 0;  j < 8;  j++)
+        s->LARc[j] = c[i++];
+    for (j = 0;  j < 4;  j++)
+    {
+        s->Nc[j] = c[i++];
+        s->bc[j] = c[i++];
+        s->Mc[j] = c[i++];
+        s->xmaxc[j] = c[i++];
+        for (k = 0;  k < 13;  k++)
+            s->xMc[j][k] = c[i++];
+    }
+    return 76;
+}
+/*- End of function --------------------------------------------------------*/
+
+int gsm0610_unpack_wav49(gsm0610_frame_t *s, const uint8_t code[], int half)
+{
+    int i;
+    int j;
+    static bitstream_state_t bs;
+    const uint8_t *c;
+
+    c = code;
+    if (half)
+        bitstream_init(&bs);
+    s->LARc[0] = (int16_t) bitstream_get(&bs, &c, 6);
+    s->LARc[1] = (int16_t) bitstream_get(&bs, &c, 6);
+    s->LARc[2] = (int16_t) bitstream_get(&bs, &c, 5);
+    s->LARc[3] = (int16_t) bitstream_get(&bs, &c, 5);
+    s->LARc[4] = (int16_t) bitstream_get(&bs, &c, 4);
+    s->LARc[5] = (int16_t) bitstream_get(&bs, &c, 4);
+    s->LARc[6] = (int16_t) bitstream_get(&bs, &c, 3);
+    s->LARc[7] = (int16_t) bitstream_get(&bs, &c, 3);
+    for (i = 0;  i < 4;  i++)
+    {
+        s->Nc[i] = (int16_t) bitstream_get(&bs, &c, 7);
+        s->bc[i] = (int16_t) bitstream_get(&bs, &c, 2);
+        s->Mc[i] = (int16_t) bitstream_get(&bs, &c, 2);
+        s->xmaxc[i] = (int16_t) bitstream_get(&bs, &c, 6);
+        for (j = 0;  j < 13;  j++)
+            s->xMc[i][j] = (int16_t) bitstream_get(&bs, &c, 3);
+    }
+    return (half)  ?  33  :  32;
+}
+/*- End of function --------------------------------------------------------*/
+
+int gsm0610_unpack_voip(gsm0610_frame_t *s, const uint8_t code[])
+{
+    int i;
+    int j;
+    const uint8_t *c;
+    unsigned int magic;
+    bitstream_state_t bs;
+
+    c = code;
+    bitstream_init(&bs);
+    magic = bitstream_get2(&bs, &c, 4);
+    if (magic != GSM0610_MAGIC)
+        return -1;
+    s->LARc[0] = (int16_t) bitstream_get2(&bs, &c, 6);
+    s->LARc[1] = (int16_t) bitstream_get2(&bs, &c, 6);
+    s->LARc[2] = (int16_t) bitstream_get2(&bs, &c, 5);
+    s->LARc[3] = (int16_t) bitstream_get2(&bs, &c, 5);
+    s->LARc[4] = (int16_t) bitstream_get2(&bs, &c, 4);
+    s->LARc[5] = (int16_t) bitstream_get2(&bs, &c, 4);
+    s->LARc[6] = (int16_t) bitstream_get2(&bs, &c, 3);
+    s->LARc[7] = (int16_t) bitstream_get2(&bs, &c, 3);
+    for (i = 0;  i < 4;  i++)
+    {
+        s->Nc[i] = (int16_t) bitstream_get2(&bs, &c, 7);
+        s->bc[i] = (int16_t) bitstream_get2(&bs, &c, 2);
+        s->Mc[i] = (int16_t) bitstream_get2(&bs, &c, 2);
+        s->xmaxc[i] = (int16_t) bitstream_get2(&bs, &c, 6);
+        for (j = 0;  j < 13;  j++)
+            s->xMc[i][j] = (int16_t) bitstream_get2(&bs, &c, 3);
+    }
+    return 33;
+}
+/*- End of function --------------------------------------------------------*/
+
+int gsm0610_decode(gsm0610_state_t *s, int16_t amp[], const uint8_t code[], int quant)
+{
+    gsm0610_frame_t frame;
+    const uint8_t *c;
+    int bytes;
+    int i;
+
+    if (s->packing == GSM0610_PACKING_WAV49)
+        quant <<= 1;
+    c = code;
+    for (i = 0;  i < quant;  i++)
+    {
+        switch (s->packing)
+        {
+        default:
+        case GSM0610_PACKING_NONE:
+            bytes = gsm0610_unpack_none(&frame, c);
+            break;
+        case GSM0610_PACKING_WAV49:
+            s->frame_index = !s->frame_index;
+            bytes = gsm0610_unpack_wav49(&frame, c, s->frame_index);
+            break;
+        case GSM0610_PACKING_VOIP:
+            bytes = gsm0610_unpack_voip(&frame, c);
+            break;
+        }
+        /*endswitch*/
+        if (bytes < 0)
+            return 0;
+        decode_a_frame(s, amp, &frame);
+        c += bytes;
+        amp += GSM0610_FRAME_LEN;
+    }
+    /*endwhile*/
+    return quant*GSM0610_FRAME_LEN;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_encode.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,332 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610_encode.c - GSM 06.10 full rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the widely used GSM 06.10 code available from
+ * http://kbs.cs.tu-berlin.de/~jutta/toast.html
+ *
+ * $Id: gsm0610_encode.c,v 1.12 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdlib.h>
+#include <memory.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/bitstream.h"
+#include "spandsp/gsm0610.h"
+
+#include "gsm0610_local.h"
+
+/* 4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER */
+
+/* The RPE-LTD coder works on a frame by frame basis.  The length of
+   the frame is equal to 160 samples.  Some computations are done
+   once per frame to produce at the output of the coder the
+   LARc[1..8] parameters which are the coded LAR coefficients and 
+   also to realize the inverse filtering operation for the entire
+   frame (160 samples of signal d[0..159]).  These parts produce at
+   the output of the coder:
+
+   Procedure 4.2.11 to 4.2.18 are to be executed four times per
+   frame.  That means once for each sub-segment RPE-LTP analysis of
+   40 samples.  These parts produce at the output of the coder.
+*/
+static void encode_a_frame(gsm0610_state_t *s, const int16_t amp[], gsm0610_frame_t *f)
+{
+    int k;
+    int16_t *dp;
+    int16_t *dpp;
+    int16_t so[GSM0610_FRAME_LEN];
+    int i;
+
+    dp = s->dp0 + 120;
+    dpp = dp;
+    gsm0610_preprocess(s, amp, so);
+    gsm0610_lpc_analysis(s, so, f->LARc);
+    gsm0610_short_term_analysis_filter(s, f->LARc, so);
+
+    for (k = 0;  k < 4;  k++)
+    {
+        gsm0610_long_term_predictor(s,
+                                    so + k*40,
+                                    dp,
+                                    s->e + 5,
+                                    dpp,
+                                    &f->Nc[k],
+                                    &f->bc[k]);
+        gsm0610_rpe_encoding(s, s->e + 5, &f->xmaxc[k], &f->Mc[k], f->xMc[k]);
+
+        for (i = 0;  i < 40;  i++)
+            dp[i] = gsm_add(s->e[5 + i], dpp[i]);
+        /*endfor*/
+        dp += 40;
+        dpp += 40;
+    }
+    /*endfor*/
+    memcpy ((char *) s->dp0,
+            (char *) (s->dp0 + GSM0610_FRAME_LEN),
+            120*sizeof(*s->dp0));
+}
+/*- End of function --------------------------------------------------------*/
+
+gsm0610_state_t *gsm0610_init(gsm0610_state_t *s, int packing)
+{
+    if (s == NULL)
+    {
+        s = (gsm0610_state_t *) malloc(sizeof (gsm0610_state_t));
+        if (s == NULL)
+            return  NULL;
+        /*endif*/
+    }
+    /*endif*/
+    memset((char *) s, '\0', sizeof (gsm0610_state_t));
+    s->nrp = 40;
+    s->packing = packing;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int gsm0610_release(gsm0610_state_t *s)
+{
+    if (s)
+        free(s);
+    /*endif*/
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int gsm0610_pack_none(uint8_t c[], gsm0610_frame_t *s)
+{
+    int i;
+    int j;
+    int k;
+    
+    i = 0;
+    for (j = 0;  j < 8;  j++)
+        c[i++] = (uint8_t) s->LARc[j];
+    for (j = 0;  j < 4;  j++)
+    {
+        c[i++] = (uint8_t) s->Nc[j];
+        c[i++] = (uint8_t) s->bc[j];
+        c[i++] = (uint8_t) s->Mc[j];
+        c[i++] = (uint8_t) s->xmaxc[j];
+        for (k = 0;  k < 13;  k++)
+            c[i++] = (uint8_t) s->xMc[j][k];
+    }
+    return 76;
+}
+/*- End of function --------------------------------------------------------*/
+
+int gsm0610_pack_wav49(uint8_t code[], gsm0610_frame_t *s, int half)
+{
+    int i;
+    int j;
+    uint8_t *c;
+    bitstream_state_t bs;
+
+    c = code;
+    if (half)
+        bitstream_init(&bs);
+    bitstream_put(&bs, &c, s->LARc[0], 6);
+    bitstream_put(&bs, &c, s->LARc[1], 6);
+    bitstream_put(&bs, &c, s->LARc[2], 5);
+    bitstream_put(&bs, &c, s->LARc[3], 5);
+    bitstream_put(&bs, &c, s->LARc[4], 4);
+    bitstream_put(&bs, &c, s->LARc[5], 4);
+    bitstream_put(&bs, &c, s->LARc[6], 3);
+    bitstream_put(&bs, &c, s->LARc[7], 3);
+    for (i = 0;  i < 4;  i++)
+    {
+        bitstream_put(&bs, &c, s->Nc[i], 7);
+        bitstream_put(&bs, &c, s->bc[i], 2);
+        bitstream_put(&bs, &c, s->Mc[i], 2);
+        bitstream_put(&bs, &c, s->xmaxc[i], 6);
+        for (j = 0;  j < 13;  j++)
+            bitstream_put(&bs, &c, s->xMc[i][j], 3);
+    }
+    return (half)  ?  32  :  33;
+}
+/*- End of function --------------------------------------------------------*/
+
+int gsm0610_pack_voip(uint8_t code[], gsm0610_frame_t *s)
+{
+    int i;
+    int j;
+    uint8_t *c;
+    bitstream_state_t bs;
+
+    c = code;
+    bitstream_init(&bs);
+    bitstream_put2(&bs, &c, GSM0610_MAGIC, 4);
+    bitstream_put2(&bs, &c, s->LARc[0], 6);
+    bitstream_put2(&bs, &c, s->LARc[1], 6);
+    bitstream_put2(&bs, &c, s->LARc[2], 5);
+    bitstream_put2(&bs, &c, s->LARc[3], 5);
+    bitstream_put2(&bs, &c, s->LARc[4], 4);
+    bitstream_put2(&bs, &c, s->LARc[5], 4);
+    bitstream_put2(&bs, &c, s->LARc[6], 3);
+    bitstream_put2(&bs, &c, s->LARc[7], 3);
+    for (i = 0;  i < 4;  i++)
+    {
+        bitstream_put2(&bs, &c, s->Nc[i], 7);
+        bitstream_put2(&bs, &c, s->bc[i], 2);
+        bitstream_put2(&bs, &c, s->Mc[i], 2);
+        bitstream_put2(&bs, &c, s->xmaxc[i], 6);
+        for (j = 0;  j < 13;  j++)
+            bitstream_put2(&bs, &c, s->xMc[i][j], 3);
+    }
+    return 33;
+}
+/*- End of function --------------------------------------------------------*/
+
+int gsm0610_encode(gsm0610_state_t *s, uint8_t code[], const int16_t amp[], int quant)
+{
+    gsm0610_frame_t frame;
+    uint8_t *c;
+    int i;
+
+    c = code;
+    if (s->packing == GSM0610_PACKING_WAV49)
+        quant <<= 1;
+    for (i = 0;  i < quant;  i++)
+    {
+        encode_a_frame(s, &amp[i*GSM0610_FRAME_LEN], &frame);
+        /*  variable    size
+
+            LARc[0]     6
+            LARc[1]     6
+            LARc[2]     5
+            LARc[3]     5
+            LARc[4]     4
+            LARc[5]     4
+            LARc[6]     3
+            LARc[7]     3
+    
+            Nc[0]       7
+            bc[0]       2
+            Mc[0]       2
+            xmaxc[0]    6
+            xMc[0]      3
+            xMc[1]      3
+            xMc[2]      3
+            xMc[3]      3
+            xMc[4]      3
+            xMc[5]      3
+            xMc[6]      3
+            xMc[7]      3
+            xMc[8]      3
+            xMc[9]      3
+            xMc[10]     3
+            xMc[11]     3
+            xMc[12]     3
+
+            Nc[1]       7
+            bc[1]       2
+            Mc[1]       2
+            xmaxc[1]    6
+            xMc[13]     3
+            xMc[14]     3
+            xMc[15]     3
+            xMc[16]     3
+            xMc[17]     3
+            xMc[18]     3
+            xMc[19]     3
+            xMc[20]     3
+            xMc[21]     3
+            xMc[22]     3
+            xMc[23]     3
+            xMc[24]     3
+            xMc[25]     3
+
+            Nc[2]       7
+            bc[2]       2
+            Mc[2]       2
+            xmaxc[2]    6
+            xMc[26]     3
+            xMc[27]     3
+            xMc[28]     3
+            xMc[29]     3
+            xMc[30]     3
+            xMc[31]     3
+            xMc[32]     3
+            xMc[33]     3
+            xMc[34]     3
+            xMc[35]     3
+            xMc[36]     3
+            xMc[37]     3
+            xMc[38]     3
+
+            Nc[3]       7
+            bc[3]       2
+            Mc[3]       2
+            xmaxc[3]    6
+            xMc[39]     3
+            xMc[40]     3
+            xMc[41]     3
+            xMc[42]     3
+            xMc[43]     3
+            xMc[44]     3
+            xMc[45]     3
+            xMc[46]     3
+            xMc[47]     3
+            xMc[48]     3
+            xMc[49]     3
+            xMc[50]     3
+            xMc[51]     3
+        */
+
+        switch (s->packing)
+        {
+        case GSM0610_PACKING_NONE:
+            c += gsm0610_pack_none(c, &frame);
+            break;
+        case GSM0610_PACKING_WAV49:
+            s->frame_index = !s->frame_index;
+            c += gsm0610_pack_wav49(c, &frame, s->frame_index);
+            break;
+        case GSM0610_PACKING_VOIP:
+            c += gsm0610_pack_voip(c, &frame);
+            break;
+        }
+        /*endswitch*/
+    }
+    /*endwhile*/
+    return (int) (c - code);
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_local.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,229 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610_local.h - GSM 06.10 full rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the widely used GSM 06.10 code available from
+ * http://kbs.cs.tu-berlin.de/~jutta/toast.html
+ *
+ * $Id: gsm0610_local.h,v 1.6 2006/10/24 13:45:25 steveu Exp $
+ */
+
+#if !defined(_GSM0610_LOCAL_H_)
+#define _GSM0610_LOCAL_H_
+
+#define GSM0610_FRAME_LEN               160
+
+#define	GSM0610_MAGIC                   0xD
+
+static __inline__ int16_t gsm_add(int16_t a, int16_t b)
+{
+#if defined(__GNUC__)  &&  defined(__i386__)
+    __asm__ __volatile__(
+        " addw %2,%0;\n"
+        " jno 0f;\n"
+        " movw $0x7fff,%0;\n"
+        " adcw $0,%0;\n"
+        "0:"
+        : "=r" (a)
+        : "0" (a), "ir" (b)
+        : "cc"
+    );
+    return a;
+#else
+    int32_t sum;
+
+    sum = (int32_t) a + (int32_t) b;
+    return  saturate(sum);
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int32_t gsm_l_add(int32_t a, int32_t b)
+{
+#if defined(__i386__)
+    __asm__ __volatile__(
+        " addl %2,%0;\n"
+        " jno 0f;\n"
+        " movl $0x7fffffff,%0;\n"
+        " adcl $0,%0;\n"
+        "0:"
+        : "=r" (a)
+        : "0" (a), "ir" (b)
+        : "cc"
+    );
+    return a;
+#else
+    uint32_t A;
+
+    if (a < 0)
+    {
+        if (b >= 0)
+            return  a + b;
+        /*endif*/
+        A = (uint32_t) -(a + 1) + (uint32_t) -(b + 1);
+        return  (A >= INT32_MAX)  ?  INT32_MIN  :  -(int32_t) A - 2;
+    }
+    /*endif*/
+    if (b <= 0)
+        return  a + b;
+    /*endif*/
+    A = (uint32_t) a + (uint32_t) b;
+    return  (A > INT32_MAX)  ?  INT32_MAX  :  A;
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t gsm_sub(int16_t a, int16_t b)
+{
+    int32_t diff;
+
+    diff = (int32_t) a - (int32_t) b;
+    return  saturate(diff);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t gsm_mult(int16_t a, int16_t b)
+{
+    if (a == INT16_MIN  &&  b == INT16_MIN)
+        return  INT16_MAX;
+    /*endif*/
+    return  ((int32_t) a * (int32_t) b) >> 15;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int32_t gsm_l_mult(int16_t a, int16_t b)
+{
+    assert (a != INT16_MIN  ||  b != INT16_MIN);
+    return  ((int32_t) a * (int32_t) b) << 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t gsm_mult_r(int16_t a, int16_t b)
+{
+    int32_t prod;
+
+    if (b == INT16_MIN  &&  a == INT16_MIN)
+        return  INT16_MAX;
+    /*endif*/
+    prod = (int32_t) a * (int32_t) b + 16384;
+    prod >>= 15;
+    return  prod & 0xFFFF;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t gsm_abs(int16_t a)
+{
+    return  (a == INT16_MIN)  ?  INT16_MAX  :  abs(a);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t gsm_asr(int16_t a, int n)
+{
+    if (n >= 16)
+        return  -(a < 0);
+    /*endif*/
+    if (n <= -16)
+        return  0;
+    /*endif*/
+    if (n < 0)
+        return a << -n;
+    /*endif*/
+    return  a >> n;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t gsm_asl(int16_t a, int n)
+{
+    if (n >= 16)
+        return  0;
+    /*endif*/
+    if (n <= -16)
+        return  -(a < 0);
+    /*endif*/
+    if (n < 0)
+        return  gsm_asr(a, -n);
+    /*endif*/
+    return  a << n;
+}
+/*- End of function --------------------------------------------------------*/
+
+extern void gsm0610_long_term_predictor(gsm0610_state_t *s,
+                                        int16_t d[40],
+                                        int16_t *dp,        /* [-120..-1] d'        IN  */
+                                        int16_t e[40],
+                                        int16_t dpp[40],
+                                        int16_t *Nc,
+                                        int16_t *bc);
+
+extern void gsm0610_lpc_analysis(gsm0610_state_t *s,
+                                 int16_t amp[160],
+                                 int16_t LARc[8]);
+
+extern void gsm0610_preprocess(gsm0610_state_t *s,
+                               const int16_t amp[],
+                               int16_t so[]);
+
+extern void gsm0610_short_term_analysis_filter(gsm0610_state_t *s,
+                                               int16_t LARc[8],
+                                               int16_t amp[160]);
+
+extern void gsm0610_long_term_synthesis_filtering(gsm0610_state_t *s,
+                                                  int16_t Ncr,
+                                                  int16_t bcr,
+                                                  int16_t erp[40],
+                                                  int16_t *drp);             /* [-120..-1] IN, [0..40] OUT */
+
+extern void gsm0610_rpe_decoding(gsm0610_state_t *s,
+                                 int16_t xmaxcr,
+                                 int16_t Mcr,
+                                 int16_t *xMcr,             /* [0..12], 3 bits             IN      */
+                                 int16_t erp[40]);
+
+extern void gsm0610_rpe_encoding(gsm0610_state_t *s,
+                                 int16_t *e,                /* [-5..-1][0..39][40..44]     IN/OUT  */
+                                 int16_t *xmaxc,
+                                 int16_t *Mc,
+                                 int16_t xMc[13]);
+
+extern void gsm0610_short_term_synthesis_filter(gsm0610_state_t *s,
+                                                int16_t LARcr[8],
+                                                int16_t drp[40],
+                                                int16_t amp[160]);
+
+extern int16_t gsm0610_norm(int32_t a);
+
+#if defined(__GNUC__)  &&  defined(__i386__)
+
+void gsm0610_vec_vsraw(const int16_t *p, int n, int bits);
+
+int32_t gsm0610_vec_iprod(const int16_t *p, const int16_t *q, int n);
+
+int32_t gsm0610_vec_maxmin(const int16_t *p, int n, int16_t *out);
+
+int32_t gsm0610_max_cross_corr(const int16_t *wt, const int16_t *dp, int16_t *Nc_out);
+
+#endif
+
+#endif
+
+/*- End of include ---------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_long_term.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,407 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610_long_term.c - GSM 06.10 full rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the widely used GSM 06.10 code available from
+ * http://kbs.cs.tu-berlin.de/~jutta/toast.html
+ *
+ * $Id: gsm0610_long_term.c,v 1.9 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdlib.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/gsm0610.h"
+
+#include "gsm0610_local.h"
+
+/* Table 4.3a  Decision level of the LTP gain quantizer */
+static const int16_t gsm_DLB[4] =
+{
+    6554,    16384,    26214,     32767
+};
+
+/* Table 4.3b   Quantization levels of the LTP gain quantizer */
+static const int16_t gsm_QLB[4] =
+{
+    3277,    11469,    21299,     32767
+};
+
+/* 4.2.11 .. 4.2.12 LONG TERM PREDICTOR (LTP) SECTION */
+
+#if defined(__GNUC__)  &&  defined(__i386__)
+int32_t gsm0610_max_cross_corr(const int16_t *wt, const int16_t *dp, int16_t *Nc_out)
+{
+    int32_t lmax;
+    int32_t out;
+
+    __asm__ __volatile__(
+        " emms;\n"
+        " pushl %%ebx;\n"
+        " movl $0,%%edx;\n"             /* Will be maximum inner-product */
+        " movl $40,%%ebx;\n"
+        " movl %%ebx,%%ecx;\n"          /* Will be index of max inner-product */
+        " subl $80,%%esi;\n"
+        " .p2align 2;\n"
+        "1:\n"
+        " movq (%%edi),%%mm0;\n"
+        " movq (%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm0;\n"
+        " movq 8(%%edi),%%mm1;\n"
+        " movq 8(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 16(%%edi),%%mm1;\n"
+        " movq 16(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 24(%%edi),%%mm1;\n"
+        " movq 24(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 32(%%edi),%%mm1;\n"
+        " movq 32(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 40(%%edi),%%mm1;\n"
+        " movq 40(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 48(%%edi),%%mm1;\n"
+        " movq 48(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 56(%%edi),%%mm1;\n"
+        " movq 56(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 64(%%edi),%%mm1;\n"
+        " movq 64(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 72(%%edi),%%mm1;\n"
+        " movq 72(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq %%mm0,%%mm1;\n"
+        " punpckhdq %%mm0,%%mm1;\n"        /* mm1 has high int32 of mm0 dup'd */
+        " paddd %%mm1,%%mm0;\n"
+        " movd %%mm0,%%eax;\n"                /* eax has result */
+        " cmpl %%edx,%%eax;\n"
+        " jle 2f;\n"
+        " movl %%eax,%%edx;\n"
+        " movl %%ebx,%%ecx;\n"
+        " .p2align 2;\n"
+        "2:\n"
+        " subl $2,%%esi;\n"
+        " incl %%ebx;\n"
+        " cmpl $120,%%ebx;\n"
+        " jle 1b;\n"
+        " popl %%ebx;\n"
+        " emms;\n"
+        : "=d" (lmax), "=c" (out)
+        : "D" (wt), "S" (dp)
+        : "eax"
+    );
+    *Nc_out = out;
+    return  lmax;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+/* This procedure computes the LTP gain (bc) and the LTP lag (Nc)
+   for the long term analysis filter.   This is done by calculating a
+   maximum of the cross-correlation function between the current
+   sub-segment short term residual signal d[0..39] (output of
+   the short term analysis filter; for simplification the index
+   of this array begins at 0 and ends at 39 for each sub-segment of the
+   RPE-LTP analysis) and the previous reconstructed short term
+   residual signal dp[ -120 .. -1 ].  A dynamic scaling must be
+   performed to avoid overflow. */
+
+/* This procedure exists in three versions.  First, the integer
+   version; then, the two floating point versions (as another
+   function), with or without scaling. */
+
+static int16_t evaluate_ltp_parameters(int16_t d[40],
+                                       int16_t *dp,   // [-120..-1]   IN
+                                       int16_t *Nc_out)
+{
+    int k;
+    int16_t Nc;
+    int16_t bc;
+    int16_t wt[40];
+    int32_t L_max;
+    int32_t L_power;
+    int16_t R;
+    int16_t S;
+    int16_t dmax;
+    int16_t scale;
+    int16_t temp;
+    int32_t L_temp;
+#if !(defined(__GNUC__)  &&  defined(__i386__))
+    int16_t lambda;
+#endif
+
+    /* Search of the optimum scaling of d[0..39]. */
+    dmax = 0;
+    for (k = 0;  k < 40;  k++)
+    {
+        temp = d[k];
+        temp = gsm_abs(temp);
+        if (temp > dmax)
+            dmax = temp;
+        /*endif*/
+    }
+    /*endfor*/
+
+    if (dmax == 0)
+    {
+        temp = 0;
+    }
+    else
+    {
+        assert(dmax > 0);
+        temp = gsm0610_norm((int32_t) dmax << 16);
+    }
+    /*endif*/
+
+    if (temp > 6)
+        scale = 0;
+    else
+        scale = (int16_t) (6 - temp);
+    /*endif*/
+    assert(scale >= 0);
+
+    /* Initialization of a working array wt */
+    for (k = 0;  k < 40;  k++)
+        wt[k] = d[k] >> scale;
+    /*endfor*/
+
+    /* Search for the maximum cross-correlation and coding of the LTP lag */
+#if defined(__GNUC__)  &&  defined(__i386__)
+    L_max = gsm0610_max_cross_corr(wt, dp, &Nc);
+#else
+    L_max = 0;
+    Nc = 40; /* index for the maximum cross-correlation */
+
+    for (lambda = 40;  lambda <= 120;  lambda++)
+    {
+        int32_t L_result;
+
+        L_result  = (wt[0]*dp[0 - lambda])
+                  + (wt[1]*dp[1 - lambda])
+                  + (wt[2]*dp[2 - lambda])
+                  + (wt[3]*dp[3 - lambda])
+                  + (wt[4]*dp[4 - lambda])
+                  + (wt[5]*dp[5 - lambda])
+                  + (wt[6]*dp[6 - lambda])
+                  + (wt[7]*dp[7 - lambda])
+                  + (wt[8]*dp[8 - lambda])
+                  + (wt[9]*dp[9 - lambda])
+                  + (wt[10]*dp[10 - lambda])
+                  + (wt[11]*dp[11 - lambda])
+                  + (wt[12]*dp[12 - lambda])
+                  + (wt[13]*dp[13 - lambda])
+                  + (wt[14]*dp[14 - lambda])
+                  + (wt[15]*dp[15 - lambda])
+                  + (wt[16]*dp[16 - lambda])
+                  + (wt[17]*dp[17 - lambda])
+                  + (wt[18]*dp[18 - lambda])
+                  + (wt[19]*dp[19 - lambda])
+                  + (wt[20]*dp[20 - lambda])
+                  + (wt[21]*dp[21 - lambda])
+                  + (wt[22]*dp[22 - lambda])
+                  + (wt[23]*dp[23 - lambda])
+                  + (wt[24]*dp[24 - lambda])
+                  + (wt[25]*dp[25 - lambda])
+                  + (wt[26]*dp[26 - lambda])
+                  + (wt[27]*dp[27 - lambda])
+                  + (wt[28]*dp[28 - lambda])
+                  + (wt[29]*dp[29 - lambda])
+                  + (wt[30]*dp[30 - lambda])
+                  + (wt[31]*dp[31 - lambda])
+                  + (wt[32]*dp[32 - lambda])
+                  + (wt[33]*dp[33 - lambda])
+                  + (wt[34]*dp[34 - lambda])
+                  + (wt[35]*dp[35 - lambda])
+                  + (wt[36]*dp[36 - lambda])
+                  + (wt[37]*dp[37 - lambda])
+                  + (wt[38]*dp[38 - lambda])
+                  + (wt[39]*dp[39 - lambda]);
+
+        if (L_result > L_max)
+        {
+            Nc = lambda;
+            L_max = L_result;
+        }
+        /*endif*/
+    }
+    /*endfor*/
+#endif
+    *Nc_out = Nc;
+
+    L_max <<= 1;
+
+    /* Rescaling of L_max */
+    assert(scale <= 100  &&  scale >=  -100);
+    L_max = L_max >> (6 - scale);
+
+    assert(Nc <= 120  &&  Nc >= 40);
+
+    /* Compute the power of the reconstructed short term residual signal dp[..] */
+    L_power = 0;
+    for (k = 0;  k < 40;  k++)
+    {
+        L_temp = dp[k - Nc] >> 3;
+        L_power += L_temp*L_temp;
+    }
+    /*endfor*/
+    L_power <<= 1;  /* from L_MULT */
+
+    /* Normalization of L_max and L_power */
+    if (L_max <= 0)
+        return  0;
+    /*endif*/
+    if (L_max >= L_power)
+        return  3;
+    /*endif*/
+    temp = gsm0610_norm(L_power);
+
+    R = (int16_t) ((L_max << temp) >> 16);
+    S = (int16_t) ((L_power << temp) >> 16);
+
+    /* Coding of the LTP gain */
+
+    /* Table 4.3a must be used to obtain the level DLB[i] for the
+       quantization of the LTP gain b to get the coded version bc. */
+    for (bc = 0;  bc <= 2;  bc++)
+    {
+        if (R <= gsm_mult(S, gsm_DLB[bc]))
+            break;
+        /*endif*/
+    }
+    /*endfor*/
+    return  bc;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.12 */
+static void long_term_analysis_filtering(int16_t bc,
+                                         int16_t Nc,
+                                         int16_t *dp,    // previous d   [-120..-1]      IN
+                                         int16_t d[40],
+                                         int16_t dpp[40],
+                                         int16_t e[40])
+{
+    int k;
+
+    /* In this part, we have to decode the bc parameter to compute
+       the samples of the estimate dpp[0..39].  The decoding of bc needs the
+       use of table 4.3b.  The long term residual signal e[0..39]
+       is then calculated to be fed to the RPE encoding section. */
+    for (k = 0;  k < 40;  k++)
+    {
+        dpp[k] = gsm_mult_r(gsm_QLB[bc], dp[k - Nc]);
+        e[k] = gsm_sub(d[k], dpp[k]);
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4x for 160 samples */
+void gsm0610_long_term_predictor(gsm0610_state_t *s,
+                                 int16_t d[40],
+                                 int16_t *dp,        // [-120..-1] d'    IN
+                                 int16_t e[40],
+                                 int16_t dpp[40],
+                                 int16_t *Nc,
+                                 int16_t *bc)
+{
+    assert(d);
+    assert(dp);
+    assert(e);
+    assert(dpp);
+    assert(Nc);
+    assert(bc);
+
+    *bc = evaluate_ltp_parameters(d, dp, Nc);
+    long_term_analysis_filtering(*bc, *Nc, dp, d, dpp, e);
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.3.2 */
+void gsm0610_long_term_synthesis_filtering(gsm0610_state_t *s,
+                                           int16_t Ncr,
+                                           int16_t bcr,
+                                           int16_t erp[40],
+                                           int16_t *drp)    // [-120..-1] IN, [0..40] OUT
+{
+    int k;
+    int16_t brp;
+    int16_t drpp;
+    int16_t Nr;
+
+    /* This procedure uses the bcr and Ncr parameter to realize the
+       long term synthesis filter.  The decoding of bcr needs
+       table 4.3b. */
+
+    /* Check the limits of Nr. */
+    Nr = (Ncr < 40  ||  Ncr > 120)  ?  s->nrp  :  Ncr;
+    s->nrp = Nr;
+    assert (Nr >= 40  &&  Nr <= 120);
+
+    /* Decode the LTP gain, bcr */
+    brp = gsm_QLB[bcr];
+
+    /* Compute the reconstructed short term residual signal, drp[0..39] */
+    assert(brp != INT16_MIN);
+    for (k = 0;  k < 40;  k++)
+    {
+        drpp = gsm_mult_r(brp, drp[k - Nr]);
+        drp[k] = gsm_add(erp[k], drpp);
+    }
+    /*endfor*/
+
+    /* Update the reconstructed short term residual signal, drp[-1..-120] */
+    for (k = 0;  k < 120;  k++)
+        drp[k - 120] = drp[k - 80];
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_lpc.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,532 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610_lpc.c - GSM 06.10 full rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the widely used GSM 06.10 code available from
+ * http://kbs.cs.tu-berlin.de/~jutta/toast.html
+ *
+ * $Id: gsm0610_lpc.c,v 1.13 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdlib.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/vector_int.h"
+#include "spandsp/gsm0610.h"
+
+#include "gsm0610_local.h"
+
+/* 4.2.4 .. 4.2.7 LPC ANALYSIS SECTION */
+
+/* The number of left shifts needed to normalize the 32 bit
+   variable x for positive values on the interval
+   with minimum of
+   minimum of 1073741824  (01000000000000000000000000000000) and 
+   maximum of 2147483647  (01111111111111111111111111111111)
+   and for negative values on the interval with
+   minimum of -2147483648 (-10000000000000000000000000000000) and
+   maximum of -1073741824 ( -1000000000000000000000000000000).
+  
+   In order to normalize the result, the following
+   operation must be done: norm_var1 = x << gsm0610_norm(x);
+  
+   (That's 'ffs', only from the left, not the right..)
+*/
+
+int16_t gsm0610_norm(int32_t x)
+{
+    assert(x != 0);
+
+    if (x < 0)
+    {
+        if (x <= -1073741824)
+            return  0;
+        /*endif*/
+        x = ~x;
+    }
+    /*endif*/
+    return 30 - top_bit(x);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+   (From p. 46, end of section 4.2.5)
+  
+   NOTE: The following lines gives [sic] one correct implementation
+         of the div(num, denum) arithmetic operation.  Compute div
+         which is the integer division of num by denom: with
+         denom >= num > 0
+*/
+static int16_t gsm_div(int16_t num, int16_t denom)
+{
+    int32_t num32;
+    int32_t denom32;
+    int16_t div;
+    int k;
+
+    /* The parameter num sometimes becomes zero.
+       Although this is explicitly guarded against in 4.2.5,
+       we assume that the result should then be zero as well. */
+
+    assert(num >= 0  &&  denom >= num);
+    if (num == 0)
+        return  0;
+    /*endif*/
+    num32 = num;
+    denom32 = denom;
+    div = 0;
+    k = 15;
+    while (k--)
+    {
+        div <<= 1;
+        num32 <<= 1;
+
+        if (num32 >= denom32)
+        {
+            num32 -= denom32;
+            div++;
+        }
+        /*endif*/
+    }
+    /*endwhile*/
+
+    return  div;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(__GNUC__)  &&  defined(__i386__)
+void gsm0610_vec_vsraw(const int16_t *p, int n, int bits)
+{
+    static const int64_t ones = 0x0001000100010001LL;
+
+    if (n == 0)
+        return;
+    /*endif*/
+    __asm__ __volatile__(
+        " leal -16(%%esi,%%eax,2),%%edx;\n"         /* edx = top - 16 */
+        " emms;\n"
+        " movd %%ecx,%%mm3;\n"
+        " movq %[ones],%%mm2;\n"
+        " psllw %%mm3,%%mm2;\n"
+        " psrlw $1,%%mm2;\n"
+        " cmpl %%edx,%%esi;"
+        " ja 4f;\n"
+
+         " .p2align 2;\n"
+        /* 8 words per iteration */
+        "6:\n"
+        " movq (%%esi),%%mm0;\n"
+        " movq 8(%%esi),%%mm1;\n"
+        " paddsw %%mm2,%%mm0;\n"
+        " psraw %%mm3,%%mm0;\n"
+        " paddsw %%mm2,%%mm1;\n"
+        " psraw %%mm3,%%mm1;\n"
+        " movq %%mm0,(%%esi);\n"
+        " movq %%mm1,8(%%esi);\n"
+        " addl $16,%%esi;\n"
+        " cmpl %%edx,%%esi;\n"
+        " jbe 6b;\n"
+
+        " .p2align 2;\n"
+        "4:\n"
+        " addl $12,%%edx;\n"                        /* now edx = top-4 */
+        " cmpl %%edx,%%esi;\n"
+        " ja 3f;\n"
+
+        " .p2align 2;\n"
+        /* do up to 6 words, two per iteration */
+        "5:\n"
+        " movd  (%%esi),%%mm0;\n"
+        " paddsw %%mm2,%%mm0;\n"
+        " psraw %%mm3,%%mm0;\n"
+        " movd %%mm0,(%%esi);\n"
+        " addl $4,%%esi;\n"
+        " cmpl %%edx,%%esi;\n"
+        " jbe 5b;\n"
+
+        " .p2align 2;\n"
+        "3:\n"
+        " addl $2,%%edx;\n"                        /* now edx = top-2 */
+        " cmpl %%edx,%%esi;\n"
+        " ja 2f;\n"
+        
+        " movzwl (%%esi),%%eax;\n"
+        " movd %%eax,%%mm0;\n"
+        " paddsw %%mm2,%%mm0;\n"
+        " psraw %%mm3,%%mm0;\n"
+        " movd %%mm0,%%eax;\n"
+        " movw %%ax,(%%esi);\n"
+
+        " .p2align 2;\n"
+        "2:\n"
+        " emms;\n"
+        :
+        : "S" (p), "a" (n), "c" (bits), [ones] "m" (ones)
+        : "edx"
+    );
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+/* 4.2.4 */
+static void autocorrelation(int16_t amp[GSM0610_FRAME_LEN], int32_t L_ACF[9])
+{
+    int k;
+    int16_t smax;
+    int16_t scalauto;
+#if !(defined(__GNUC__)  &&  defined(__i386__))
+    int i;
+    int temp;
+    int16_t *sp;
+    int16_t sl;
+#endif
+    
+    /* The goal is to compute the array L_ACF[k].  The signal s[i] must
+       be scaled in order to avoid an overflow situation. */
+
+    /* Dynamic scaling of the array  s[0..159] */
+    /* Search for the maximum. */
+#if defined(__GNUC__)  &&  defined(__i386__)
+    smax = saturate(vec_min_maxi16(amp, GSM0610_FRAME_LEN, NULL));
+#else
+    for (smax = 0, k = 0;  k < GSM0610_FRAME_LEN;  k++)
+    {
+        temp = gsm_abs(amp[k]);
+        if (temp > smax)
+            smax = temp;
+        /*endif*/
+    }
+    /*endfor*/
+#endif
+
+    /* Computation of the scaling factor. */
+    if (smax == 0)
+    {
+        scalauto = 0;
+    }
+    else
+    {
+        assert(smax > 0);
+        scalauto = (int16_t) (4 - gsm0610_norm((int32_t) smax << 16));
+    }
+    /*endif*/
+
+    /* Scaling of the array s[0...159] */
+#if defined(__GNUC__)  &&  defined(__i386__)
+    if (scalauto > 0)
+        gsm0610_vec_vsraw(amp, GSM0610_FRAME_LEN, scalauto);
+    /*endif*/
+#else
+    if (scalauto > 0)
+    {
+        for (k = 0;  k < GSM0610_FRAME_LEN;  k++)
+            amp[k] = gsm_mult_r(amp[k], 16384 >> (scalauto - 1));
+        /*endfor*/
+    }
+    /*endif*/
+#endif
+
+    /* Compute the L_ACF[..]. */
+#if defined(__GNUC__)  &&  defined(__i386__)
+    for (k = 0;  k < 9;  k++)
+        L_ACF[k] = vec_dot_prodi16(amp, amp + k, GSM0610_FRAME_LEN - k) << 1;
+    /*endfor*/
+#else
+    sp = amp;
+    sl = *sp;
+    L_ACF[0] = ((int32_t) sl*sp[0]);
+    sl = *++sp;
+    L_ACF[0] += ((int32_t) sl*sp[0]);
+    L_ACF[1] = ((int32_t) sl*sp[-1]);
+    sl = *++sp;
+    L_ACF[0] += ((int32_t) sl*sp[0]);
+    L_ACF[1] += ((int32_t) sl*sp[-1]);
+    L_ACF[2] = ((int32_t) sl*sp[-2]);
+    sl = *++sp;
+    L_ACF[0] += ((int32_t) sl*sp[0]);
+    L_ACF[1] += ((int32_t) sl*sp[-1]);
+    L_ACF[2] += ((int32_t) sl*sp[-2]);
+    L_ACF[3] = ((int32_t) sl*sp[-3]);
+    sl = *++sp;
+    L_ACF[0] += ((int32_t) sl*sp[0]);
+    L_ACF[1] += ((int32_t) sl*sp[-1]);
+    L_ACF[2] += ((int32_t) sl*sp[-2]);
+    L_ACF[3] += ((int32_t) sl*sp[-3]);
+    L_ACF[4] = ((int32_t) sl*sp[-4]);
+    sl = *++sp;
+    L_ACF[0] += ((int32_t) sl*sp[0]);
+    L_ACF[1] += ((int32_t) sl*sp[-1]);
+    L_ACF[2] += ((int32_t) sl*sp[-2]);
+    L_ACF[3] += ((int32_t) sl*sp[-3]);
+    L_ACF[4] += ((int32_t) sl*sp[-4]);
+    L_ACF[5] = ((int32_t) sl*sp[-5]);
+    sl = *++sp;
+    L_ACF[0] += ((int32_t) sl*sp[0]);
+    L_ACF[1] += ((int32_t) sl*sp[-1]);
+    L_ACF[2] += ((int32_t) sl*sp[-2]);
+    L_ACF[3] += ((int32_t) sl*sp[-3]);
+    L_ACF[4] += ((int32_t) sl*sp[-4]);
+    L_ACF[5] += ((int32_t) sl*sp[-5]);
+    L_ACF[6] = ((int32_t) sl*sp[-6]);
+    sl = *++sp;
+    L_ACF[0] += ((int32_t) sl*sp[0]);
+    L_ACF[1] += ((int32_t) sl*sp[-1]);
+    L_ACF[2] += ((int32_t) sl*sp[-2]);
+    L_ACF[3] += ((int32_t) sl*sp[-3]);
+    L_ACF[4] += ((int32_t) sl*sp[-4]);
+    L_ACF[5] += ((int32_t) sl*sp[-5]);
+    L_ACF[6] += ((int32_t) sl*sp[-6]);
+    L_ACF[7] = ((int32_t) sl*sp[-7]);
+    sl = *++sp;
+    L_ACF[0] += ((int32_t) sl*sp[0]);
+    L_ACF[1] += ((int32_t) sl*sp[-1]);
+    L_ACF[2] += ((int32_t) sl*sp[-2]);
+    L_ACF[3] += ((int32_t) sl*sp[-3]);
+    L_ACF[4] += ((int32_t) sl*sp[-4]);
+    L_ACF[5] += ((int32_t) sl*sp[-5]);
+    L_ACF[6] += ((int32_t) sl*sp[-6]);
+    L_ACF[7] += ((int32_t) sl*sp[-7]);
+    L_ACF[8] = ((int32_t) sl*sp[-8]);
+    for (i = 9;  i < GSM0610_FRAME_LEN;  i++)
+    {
+        sl = *++sp;
+        L_ACF[0] += ((int32_t) sl*sp[0]);
+        L_ACF[1] += ((int32_t) sl*sp[-1]);
+        L_ACF[2] += ((int32_t) sl*sp[-2]);
+        L_ACF[3] += ((int32_t) sl*sp[-3]);
+        L_ACF[4] += ((int32_t) sl*sp[-4]);
+        L_ACF[5] += ((int32_t) sl*sp[-5]);
+        L_ACF[6] += ((int32_t) sl*sp[-6]);
+        L_ACF[7] += ((int32_t) sl*sp[-7]);
+        L_ACF[8] += ((int32_t) sl*sp[-8]);
+    }
+    /*endfor*/
+    for (k = 0;  k < 9;  k++)
+        L_ACF[k] <<= 1;
+    /*endfor*/
+#endif
+    /* Rescaling of the array s[0..159] */
+    if (scalauto > 0)
+    {
+        assert(scalauto <= 4); 
+        for (k = 0;  k < GSM0610_FRAME_LEN;  k++)
+            amp[k] <<= scalauto;
+        /*endfor*/
+    }
+    /*endif*/
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.5 */
+static void reflection_coefficients(int32_t L_ACF[9], int16_t r[8])
+{
+    int i;
+    int m;
+    int n;
+    int16_t temp;
+    int16_t ACF[9];
+    int16_t P[9];
+    int16_t K[9];
+
+    /* Schur recursion with 16 bits arithmetic. */
+    if (L_ACF[0] == 0)
+    {
+        for (i = 8;  i--;  *r++ = 0)
+            ;
+        /*endfor*/
+        return;
+    }
+    /*endif*/
+
+    assert(L_ACF[0] != 0);
+    temp = gsm0610_norm(L_ACF[0]);
+
+    assert(temp >= 0  &&  temp < 32);
+
+    /* ? overflow ? */
+    for (i = 0;  i <= 8;  i++)
+        ACF[i] = (int16_t) ((L_ACF[i] << temp) >> 16);
+    /*endfor*/
+
+    /* Initialize array P[..] and K[..] for the recursion. */
+    for (i = 1;  i <= 7;  i++)
+        K[i] = ACF[i];
+    /*endfor*/
+    for (i = 0;  i <= 8;  i++)
+        P[i] = ACF[i];
+    /*endfor*/
+    /* Compute reflection coefficients */
+    for (n = 1;  n <= 8;  n++, r++)
+    {
+        temp = P[1];
+        temp = gsm_abs (temp);
+        if (P[0] < temp)
+        {
+            for (i = n;  i <= 8;  i++)
+                *r++ = 0;
+            /*endfor*/
+            return;
+        }
+        /*endif*/
+
+        *r = gsm_div(temp, P[0]);
+
+        assert(*r >= 0);
+        if (P[1] > 0)
+            *r = -*r;     /* r[n] = sub(0, r[n]) */
+        /*endif*/
+        assert(*r != INT16_MIN);
+        if (n == 8)
+            return; 
+        /*endif*/
+
+        /* Schur recursion */
+        temp = gsm_mult_r(P[1], *r);
+        P[0] = gsm_add(P[0], temp);
+
+        for (m = 1;  m <= 8 - n;  m++)
+        {
+            temp = gsm_mult_r(K[m], *r);
+            P[m] = gsm_add(P[m + 1], temp);
+
+            temp = gsm_mult_r(P[m + 1], *r);
+            K[m] = gsm_add(K[m], temp);
+        }
+        /*endfor*/
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.6 */
+static void transform_to_log_area_ratios(int16_t r[8])
+{
+    int16_t temp;
+    int i;
+
+    /* The following scaling for r[..] and LAR[..] has been used:
+      
+       r[..]   = integer (real_r[..]*32768.); -1 <= real_r < 1.
+       LAR[..] = integer (real_LAR[..] * 16384);
+       with -1.625 <= real_LAR <= 1.625
+    */
+
+    /* Computation of the LAR[0..7] from the r[0..7] */
+    for (i = 1;  i <= 8;  i++, r++)
+    {
+        temp = *r;
+        temp = gsm_abs(temp);
+        assert(temp >= 0);
+
+        if (temp < 22118)
+        {
+            temp >>= 1;
+        }
+        else if (temp < 31130)
+        {
+            assert(temp >= 11059);
+            temp -= 11059;
+        }
+        else
+        {
+            assert(temp >= 26112);
+            temp -= 26112;
+            temp <<= 2;
+        }
+        /*endif*/
+
+        *r = (*r < 0)  ?  -temp  :  temp;
+        assert(*r != INT16_MIN);
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.7 */
+static void quantization_and_coding(int16_t LAR[8])
+{
+    int16_t temp;
+
+    /* This procedure needs four tables; the following equations
+       give the optimum scaling for the constants:
+        
+       A[0..7] = integer(real_A[0..7] * 1024)
+       B[0..7] = integer(real_B[0..7] *  512)
+       MAC[0..7] = maximum of the LARc[0..7]
+       MIC[0..7] = minimum of the LARc[0..7] */
+
+#undef STEP
+#define STEP(A,B,MAC,MIC)                                       \
+        temp = gsm_mult(A, *LAR);                               \
+        temp = gsm_add(temp, B);                                \
+        temp = gsm_add(temp, 256);                              \
+        temp >>= 9;                                             \
+        *LAR  = (int16_t) ((temp > MAC)                         \
+                         ?                                      \
+                         MAC - MIC                              \
+                         :                                      \
+                         ((temp < MIC)  ?  0  :  temp - MIC));  \
+        LAR++;
+
+    STEP(20480,     0,  31, -32);
+    STEP(20480,     0,  31, -32);
+    STEP(20480,  2048,  15, -16);
+    STEP(20480, -2560,  15, -16);
+
+    STEP(13964,    94,   7,  -8);
+    STEP(15360, -1792,   7,  -8);
+    STEP( 8534,  -341,   3,  -4);
+    STEP( 9036, -1144,   3,  -4);
+#undef STEP
+}
+/*- End of function --------------------------------------------------------*/
+
+void gsm0610_lpc_analysis(gsm0610_state_t *s,
+                          int16_t amp[GSM0610_FRAME_LEN],
+                          int16_t LARc[8])
+{
+    int32_t L_ACF[9];
+
+    autocorrelation(amp, L_ACF);
+    reflection_coefficients(L_ACF, LARc);
+    transform_to_log_area_ratios(LARc);
+    quantization_and_coding(LARc);
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_preprocess.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,148 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610_preprocess.c - GSM 06.10 full rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the widely used GSM 06.10 code available from
+ * http://kbs.cs.tu-berlin.de/~jutta/toast.html
+ *
+ * $Id: gsm0610_preprocess.c,v 1.7 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdlib.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/gsm0610.h"
+
+#include "gsm0610_local.h"
+
+/*
+    4.2.0 .. 4.2.3  PREPROCESSING SECTION
+    
+    After A-law to linear conversion (or directly from the
+    A to D converter) the following scaling is assumed for
+    input to the RPE-LTP algorithm:
+  
+    in:  0.1.....................12
+         S.v.v.v.v.v.v.v.v.v.v.v.v.*.*.*
+  
+    Where S is the sign bit, v a valid bit, and * a "don't care" bit.
+    The original signal is called sop[..]
+  
+    out:   0.1................... 12 
+         S.S.v.v.v.v.v.v.v.v.v.v.v.v.0.0
+*/
+
+void gsm0610_preprocess(gsm0610_state_t *s, const int16_t amp[GSM0610_FRAME_LEN], int16_t so[GSM0610_FRAME_LEN])
+{
+    int16_t z1;
+    int16_t mp;
+    int16_t s1;
+    int16_t msp;
+    int16_t SO;
+    int32_t L_z2;
+    int32_t L_s2;
+    int32_t L_temp;
+#if !defined(__GNUC__)
+    int16_t lsp;
+#endif
+    int k;
+
+    z1 = s->z1;
+    L_z2 = s->L_z2;
+    mp = s->mp;
+    for (k = 0;  k < GSM0610_FRAME_LEN;  k++)
+    {
+        /* 4.2.1   Downscaling of the input signal */
+        SO = (amp[k] >> 1) & ~3;
+
+        assert(SO >= -0x4000); // downscaled by
+        assert(SO <=  0x3FFC); // previous routine.
+
+        /* 4.2.2   Offset compensation */
+
+        /*  This part implements a high-pass filter and requires extended
+            arithmetic precision for the recursive part of this filter.
+            The input of this procedure is the array so[0...159] and the
+            output the array sof[ 0...159 ].
+        */
+        /* Compute the non-recursive part */
+        s1 = SO - z1;
+        z1 = SO;
+
+        assert(s1 != INT16_MIN);
+
+        /* Compute the recursive part */
+        L_s2 = s1;
+        L_s2 <<= 15;
+
+        /* Perform a 31 by 16 bits multiplication */
+#if defined(__GNUC__)
+        L_z2 = ((int64_t) L_z2*32735 + 0x4000) >> 15;
+        /* Alternate (ANSI) version of below line does slightly different rounding:
+         * L_temp = L_z2 >> 9;
+         * L_temp += L_temp >> 5;
+         * L_temp = (++L_temp) >> 1;
+         * L_z2 = L_z2 - L_temp;
+         */
+        L_z2 = gsm_l_add(L_z2, L_s2);
+#else
+        /* This does L_z2  = L_z2 * 0x7FD5/0x8000 + L_s2 */
+        msp = (int16_t) (L_z2 >> 15);
+        lsp = (int16_t) (L_z2 - ((int32_t) msp << 15));
+
+        L_s2 += gsm_mult_r(lsp, 32735);
+        L_temp = (int32_t) msp*32735;
+        L_z2 = gsm_l_add(L_temp, L_s2);
+#endif
+
+        /* Compute sof[k] with rounding */
+        L_temp = gsm_l_add(L_z2, 16384);
+
+        /* 4.2.3  Preemphasis */
+        msp = gsm_mult_r(mp, -28180);
+        mp = (int16_t) (L_temp >> 15);
+        so[k] = gsm_add(mp, msp);
+    }
+    /*endfor*/
+
+    s->z1 = z1;
+    s->L_z2 = L_z2;
+    s->mp = mp;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_rpe.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,530 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610_rpe.c - GSM 06.10 full rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the widely used GSM 06.10 code available from
+ * http://kbs.cs.tu-berlin.de/~jutta/toast.html
+ *
+ * $Id: gsm0610_rpe.c,v 1.13 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdlib.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/gsm0610.h"
+
+#include "gsm0610_local.h"
+
+/* 4.2.13 .. 4.2.17  RPE ENCODING SECTION */
+
+/* 4.2.13 */
+static void weighting_filter(const int16_t *e,     // signal [-5..0.39.44] IN
+                             int16_t x[40])
+{
+#if defined(__GNUC__)  &&  defined(__i386__)
+    /* Table 4.4   Coefficients of the weighting filter */
+    /* This must be padded to a multiple of 4 for MMX to work */
+    static const int16_t gsm_H[12] =
+    {
+        -134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134, 0
+    };
+
+    __asm__ __volatile__(
+        " emms;\n"
+        " addl $-10,%%ecx;\n"
+        " movl $0x1000,%%eax;\n"
+        " movd %%eax,%%mm5;\n"              /* for rounding */
+        " movq %[gsm_H],%%mm1;\n"
+        " movq %[gsm_H8],%%mm2;\n"
+        " movq %[gsm_H16],%%mm3;\n"
+        " xorl %%esi,%%esi;\n"
+        " .p2align 2;\n"
+        "1:;\n"
+        " movq (%%ecx,%%esi,2),%%mm0;\n"
+        " pmaddwd %%mm1,%%mm0;\n"
+ 
+        " movq 8(%%ecx,%%esi,2),%%mm4;\n"
+        " pmaddwd %%mm2,%%mm4;\n"
+        " paddd %%mm4,%%mm0;\n"
+
+        " movq 16(%%ecx,%%esi,2),%%mm4;\n"
+        " pmaddwd %%mm3,%%mm4;\n"
+        " paddd %%mm4,%%mm0;\n"
+
+        " movq %%mm0,%%mm4;\n"
+        " punpckhdq %%mm0,%%mm4;\n"         /* mm4 has high int32 of mm0 dup'd */
+        " paddd %%mm4,%%mm0;\n"
+
+        " paddd %%mm5,%%mm0;\n"             /* Add for roundoff */
+        " psrad $13,%%mm0;\n"
+        " packssdw %%mm0,%%mm0;\n"        
+        " movd %%mm0,%%eax;\n"              /* eax has result */
+        " movw %%ax,(%%edi,%%esi,2);\n"
+        " incl %%esi;\n"
+        " cmpl $39,%%esi;\n"
+        " jle 1b;\n"
+        " emms;\n"
+        :
+        : "c" (e), "D" (x), [gsm_H] "X" (*((int64_t *) gsm_H)), [gsm_H8] "X" (*((int64_t *) (gsm_H + 4))), [gsm_H16] "X" (*((int64_t *) (gsm_H + 8)))
+        : "eax", "edx", "esi"
+    );
+#else
+    int32_t L_result;
+    int k;
+
+    /* The coefficients of the weighting filter are stored in a table
+       (see table 4.4).  The following scaling is used:
+      
+        H[0..10] = integer(real_H[0..10] * 8192); 
+    */
+    /* Initialization of a temporary working array wt[0...49] */
+
+    /* for (k =  0;  k <=  4;  k++) wt[k] = 0;
+     * for (k =  5;  k <= 44;  k++) wt[k] = *e++;
+     * for (k = 45;  k <= 49;  k++) wt[k] = 0;
+     *
+     *  (e[-5..-1] and e[40..44] are allocated by the caller,
+     *  are initially zero and are not written anywhere.)
+     */
+    e -= 5;
+
+    /* Compute the signal x[0..39] */
+    for (k = 0;  k < 40;  k++)
+    {
+        L_result = 8192 >> 1;
+
+        /* for (i = 0; i <= 10; i++)
+         * {
+         *      L_temp   = gsm_l_mult(wt[k + i], gsm_H[i]);
+         *      L_result = gsm_l_add(L_result, L_temp);
+         * }
+         */
+
+#undef STEP
+#define STEP(i,H) (e[k + i] * (int32_t) H)
+
+        /* Every one of these multiplications is done twice,
+           but I don't see an elegant way to optimize this. 
+           Do you?
+        */
+        L_result += STEP( 0,  -134);
+        L_result += STEP( 1,  -374);
+              // += STEP( 2,  0   );
+        L_result += STEP( 3,  2054);
+        L_result += STEP( 4,  5741);
+        L_result += STEP( 5,  8192);
+        L_result += STEP( 6,  5741);
+        L_result += STEP( 7,  2054);
+              // += STEP( 8,  0   );
+        L_result += STEP( 9,  -374);
+        L_result += STEP(10,  -134);
+
+        /* 2 adds vs. >> 16 => 14, minus one shift to compensate for
+           those we lost when replacing L_MULT by '*'. */
+        L_result >>= 13;
+        x[k] = saturate(L_result);
+    }
+    /*endfor*/
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.14 */
+static void rpe_grid_selection(int16_t x[40], int16_t xM[13], int16_t *Mc_out)
+{
+    int i;
+    int32_t L_result;
+    int32_t L_temp;
+    int32_t EM;     /* xxx should be L_EM? */
+    int16_t Mc;
+    int32_t L_common_0_3;
+
+    /* The signal x[0..39] is used to select the RPE grid which is
+       represented by Mc. */
+
+    EM = 0;
+    Mc = 0;
+
+#undef STEP
+#define STEP(m,i)                           \
+    L_temp = x[m + 3*i] >> 2;               \
+    L_result += L_temp*L_temp;
+
+    /* Common part of 0 and 3 */
+    L_result = 0;
+    STEP(0, 1);
+    STEP(0, 2);
+    STEP(0, 3);
+    STEP(0, 4);
+    STEP(0, 5);
+    STEP(0, 6);
+    STEP(0, 7);
+    STEP(0, 8);
+    STEP(0, 9);
+    STEP(0, 10);
+    STEP(0, 11);
+    STEP(0, 12);
+    L_common_0_3 = L_result;
+
+    /* i = 0 */
+
+    STEP(0, 0);
+    L_result <<= 1; /* implicit in L_MULT */
+    EM = L_result;
+
+    /* i = 1 */
+
+    L_result = 0;
+    STEP(1, 0);
+    STEP(1, 1);
+    STEP(1, 2);
+    STEP(1, 3);
+    STEP(1, 4);
+    STEP(1, 5);
+    STEP(1, 6);
+    STEP(1, 7);
+    STEP(1, 8);
+    STEP(1, 9);
+    STEP(1, 10);
+    STEP(1, 11);
+    STEP(1, 12);
+    L_result <<= 1;
+    if (L_result > EM)
+    {
+        Mc = 1;
+        EM = L_result;
+    }
+    /*endif*/
+
+    /* i = 2 */
+
+    L_result = 0;
+    STEP(2, 0);
+    STEP(2, 1);
+    STEP(2, 2);
+    STEP(2, 3);
+    STEP(2, 4);
+    STEP(2, 5);
+    STEP(2, 6);
+    STEP(2, 7);
+    STEP(2, 8);
+    STEP(2, 9);
+    STEP(2, 10);
+    STEP(2, 11);
+    STEP(2, 12);
+    L_result <<= 1;
+    if (L_result > EM)
+    {
+        Mc = 2;
+        EM = L_result;
+    }
+    /*endif*/
+
+    /* i = 3 */
+
+    L_result = L_common_0_3;
+    STEP(3, 12);
+    L_result <<= 1;
+    if (L_result > EM)
+    {
+        Mc = 3;
+        EM = L_result;
+    }
+    /*endif*/
+
+    /* Down-sampling by a factor 3 to get the selected xM[0..12]
+       RPE sequence. */
+    for (i = 0;  i < 13;  i++)
+        xM[i] = x[Mc + 3*i];
+    /*endfor*/
+    *Mc_out = Mc;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.12.15 */
+static void apcm_quantization_xmaxc_to_exp_mant(int16_t xmaxc,
+                                                int16_t *exp_out,
+                                                int16_t *mant_out)
+{
+    int16_t exp;
+    int16_t mant;
+
+    /* Compute exponent and mantissa of the decoded version of xmaxc */
+    exp = 0;
+    if (xmaxc > 15)
+        exp = (int16_t) ((xmaxc >> 3) - 1);
+    /*endif*/
+    mant = xmaxc - (exp << 3);
+
+    if (mant == 0)
+    {
+        exp = -4;
+        mant = 7;
+    }
+    else
+    {
+        while (mant <= 7)
+        {
+            mant = (int16_t) (mant << 1 | 1);
+            exp--;
+        }
+        /*endwhile*/
+        mant -= 8;
+    }
+    /*endif*/
+
+    assert(exp >= -4  &&  exp <= 6);
+    assert(mant >= 0  &&  mant <= 7);
+
+    *exp_out  = exp;
+    *mant_out = mant;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void apcm_quantization(int16_t xM[13],
+                              int16_t xMc[13],
+                              int16_t *mant_out,
+                              int16_t *exp_out,
+                              int16_t *xmaxc_out)
+{
+    /* Table 4.5   Normalized inverse mantissa used to compute xM/xmax */
+    static const int16_t gsm_NRFAC[8] =
+    {
+        29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384
+    };
+    int i;
+    int itest;
+    int16_t xmax;
+    int16_t xmaxc;
+    int16_t temp;
+    int16_t temp1;
+    int16_t temp2;
+    int16_t exp;
+    int16_t mant;
+
+    /* Find the maximum absolute value xmax of xM[0..12]. */
+    xmax = 0;
+    for (i = 0;  i < 13;  i++)
+    {
+        temp = xM[i];
+        temp = gsm_abs(temp);
+        if (temp > xmax)
+            xmax = temp;
+        /*endif*/
+    }
+    /*endfor*/
+
+    /* Quantizing and coding of xmax to get xmaxc. */
+    exp = 0;
+    temp = xmax >> 9;
+    itest = 0;
+
+    for (i = 0;  i <= 5;  i++)
+    {
+        itest |= (temp <= 0);
+        temp >>= 1;
+
+        assert(exp <= 5);
+        if (itest == 0)
+            exp++;
+        /*endif*/
+    }
+    /*endfor*/
+
+    assert(exp <= 6  &&  exp >= 0);
+    temp = (int16_t) (exp + 5);
+
+    assert(temp <= 11  &&  temp >= 0);
+    xmaxc = gsm_add((xmax >> temp), exp << 3);
+
+    /* Quantizing and coding of the xM[0..12] RPE sequence
+       to get the xMc[0..12] */
+    apcm_quantization_xmaxc_to_exp_mant(xmaxc, &exp, &mant);
+
+    /* This computation uses the fact that the decoded version of xmaxc
+       can be calculated by using the exponent and the mantissa part of
+       xmaxc (logarithmic table).
+       So, this method avoids any division and uses only a scaling
+       of the RPE samples by a function of the exponent.  A direct 
+       multiplication by the inverse of the mantissa (NRFAC[0..7]
+       found in table 4.5) gives the 3 bit coded version xMc[0..12]
+       of the RPE samples.
+    */
+    /* Direct computation of xMc[0..12] using table 4.5 */
+    assert(exp <= 4096  &&  exp >= -4096);
+    assert(mant >= 0  &&  mant <= 7); 
+
+    temp1 = (int16_t) (6 - exp);    /* Normalization by the exponent */
+    temp2 = gsm_NRFAC[mant];        /* Inverse mantissa */
+
+    for (i = 0;  i < 13;  i++)
+    {
+        assert(temp1 >= 0  &&  temp1 < 16);
+
+        temp = xM[i] << temp1;
+        temp = gsm_mult(temp, temp2);
+        temp >>= 12;
+        xMc[i] = (int16_t) (temp + 4);      /* See note below */
+    }
+    /*endfor*/
+
+    /* NOTE: This equation is used to make all the xMc[i] positive. */
+    *mant_out  = mant;
+    *exp_out   = exp;
+    *xmaxc_out = xmaxc;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.16 */
+static void apcm_inverse_quantization(int16_t xMc[13],
+                                      int16_t mant,
+                                      int16_t exp,
+                                      int16_t xMp[13])
+{
+    /* Table 4.6   Normalized direct mantissa used to compute xM/xmax */
+    static const int16_t gsm_FAC[8] =
+    {
+        18431, 20479, 22527, 24575, 26623, 28671, 30719, 32767
+    };
+    int i;
+    int16_t temp;
+    int16_t temp1;
+    int16_t temp2;
+    int16_t temp3;
+
+    /* This part is for decoding the RPE sequence of coded xMc[0..12]
+       samples to obtain the xMp[0..12] array.  Table 4.6 is used to get
+       the mantissa of xmaxc (FAC[0..7]).
+    */
+    assert(mant >= 0  &&  mant <= 7);
+
+    temp1 = gsm_FAC[mant];          /* See 4.2-15 for mant */
+    temp2 = gsm_sub(6, exp);        /* See 4.2-15 for exp */
+    temp3 = gsm_asl(1, gsm_sub (temp2, 1));
+
+    for (i = 0;  i < 13;  i++)
+    {
+        assert(xMc[i] >= 0  &&  xMc[i] <= 7);   /* 3 bit unsigned */
+
+        temp = (int16_t) ((xMc[i] << 1) - 7);   /* Restore sign */
+        assert(temp <= 7  &&  temp >= -7);      /* 4 bit signed */
+
+        temp <<= 12;                            /* 16 bit signed */
+        temp = gsm_mult_r(temp1, temp);
+        temp = gsm_add(temp, temp3);
+        xMp[i] = gsm_asr(temp, temp2);
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.17 */
+static void rpe_grid_positioning(int16_t Mc,
+                                 int16_t xMp[13],
+                                 int16_t ep[40])
+{
+    int i = 13;
+
+    /* This procedure computes the reconstructed long term residual signal
+       ep[0..39] for the LTP analysis filter.  The inputs are the Mc
+       which is the grid position selection and the xMp[0..12] decoded
+       RPE samples which are upsampled by a factor of 3 by inserting zero
+       values.
+    */
+    assert(0 <= Mc  &&  Mc <= 3);
+
+    switch (Mc)
+    {
+    case 3:
+        *ep++ = 0;
+    case 2:
+        do
+        {
+            *ep++ = 0;
+    case 1:
+            *ep++ = 0;
+    case 0:
+            *ep++ = *xMp++;
+        }
+        while (--i);
+    }
+    /*endswitch*/
+    while (++Mc < 4)
+        *ep++ = 0;
+    /*endwhile*/
+}
+/*- End of function --------------------------------------------------------*/
+
+void gsm0610_rpe_encoding(gsm0610_state_t *s,
+                          int16_t *e,          // [-5..-1][0..39][40..44]
+                          int16_t *xmaxc,
+                          int16_t *Mc,
+                          int16_t xMc[13])
+{
+    int16_t x[40];
+    int16_t xM[13];
+    int16_t xMp[13];
+    int16_t mant;
+    int16_t exp;
+
+    weighting_filter(e, x);
+    rpe_grid_selection(x, xM, Mc);
+
+    apcm_quantization(xM, xMc, &mant, &exp, xmaxc);
+    apcm_inverse_quantization(xMc, mant, exp, xMp);
+
+    rpe_grid_positioning(*Mc, xMp, e);
+}
+/*- End of function --------------------------------------------------------*/
+
+void gsm0610_rpe_decoding(gsm0610_state_t *s,
+                          int16_t xmaxc,
+                          int16_t Mcr,
+                          int16_t xMcr[13],
+                          int16_t erp[40])
+{
+    int16_t exp;
+    int16_t mant;
+    int16_t xMp[13];
+
+    apcm_quantization_xmaxc_to_exp_mant(xmaxc, &exp, &mant);
+    apcm_inverse_quantization(xMcr, mant, exp, xMp);
+    rpe_grid_positioning(Mcr, xMp, erp);
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/gsm0610_short_term.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,360 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610_short_term.c - GSM 06.10 full rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the widely used GSM 06.10 code available from
+ * http://kbs.cs.tu-berlin.de/~jutta/toast.html
+ *
+ * $Id: gsm0610_short_term.c,v 1.9 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdlib.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/gsm0610.h"
+
+#include "gsm0610_local.h"
+
+/* SHORT TERM ANALYSIS FILTERING SECTION */
+
+/* 4.2.8 */
+static void decode_log_area_ratios(int16_t LARc[8], int16_t *LARpp)
+{
+    int16_t temp1;
+
+    /* This procedure requires for efficient implementation
+       two tables.
+       INVA[1..8] = integer((32768*8)/real_A[1..8])
+       MIC[1..8]  = minimum value of the LARc[1..8]
+    */
+
+    /* Compute the LARpp[1..8] */
+
+#undef STEP
+#define STEP(B,MIC,INVA)                        \
+    temp1 = gsm_add(*LARc++, MIC) << 10;       \
+    temp1 = gsm_sub(temp1, B << 1);            \
+    temp1 = gsm_mult_r (INVA, temp1);           \
+    *LARpp++ = gsm_add(temp1, temp1);
+
+    STEP(    0,  -32,  13107);
+    STEP(    0,  -32,  13107);
+    STEP( 2048,  -16,  13107);
+    STEP(-2560,  -16,  13107);
+
+    STEP(   94,   -8,  19223);
+    STEP(-1792,   -8,  17476);
+    STEP( -341,   -4,  31454);
+    STEP(-1144,   -4,  29708);
+
+    /* NOTE: the addition of *MIC is used to restore the sign of *LARc. */
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.9 */
+
+/* Computation of the quantized reflection coefficients */
+
+/* 4.2.9.1  Interpolation of the LARpp[1..8] to get the LARp[1..8] */
+
+/* Within each frame of 160 analyzed speech samples the short term
+   analysis and synthesis filters operate with four different sets of
+   coefficients, derived from the previous set of decoded LARs(LARpp(j - 1))
+   and the actual set of decoded LARs (LARpp(j))
+  
+   (Initial value: LARpp(j - 1)[1..8] = 0.)
+*/
+
+static void coefficients_0_12(int16_t *LARpp_j_1,
+                              int16_t *LARpp_j,
+                              int16_t *LARp)
+{
+    int i;
+
+    for (i = 1;  i <= 8;  i++, LARp++, LARpp_j_1++, LARpp_j++)
+    {
+        *LARp = gsm_add(*LARpp_j_1 >> 2, *LARpp_j >> 2);
+        *LARp = gsm_add(*LARp, *LARpp_j_1 >> 1);
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void coefficients_13_26(int16_t *LARpp_j_1,
+                               int16_t *LARpp_j,
+                               int16_t *LARp)
+{
+    int i;
+
+    for (i = 1;  i <= 8;  i++, LARpp_j_1++, LARpp_j++, LARp++)
+        *LARp = gsm_add(*LARpp_j_1 >> 1, *LARpp_j >> 1);
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void coefficients_27_39(int16_t *LARpp_j_1,
+                               int16_t *LARpp_j,
+                               int16_t *LARp)
+{
+    int i;
+
+    for (i = 1;  i <= 8;  i++, LARpp_j_1++, LARpp_j++, LARp++)
+    {
+        *LARp = gsm_add(*LARpp_j_1 >> 2, *LARpp_j >> 2);
+        *LARp = gsm_add(*LARp, *LARpp_j >> 1);
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void coefficients_40_159(int16_t *LARpp_j, int16_t *LARp)
+{
+    int i;
+
+    for (i = 1;  i <= 8;  i++)
+        *LARp++ = *LARpp_j++;
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.9.2 */
+static void larp_to_rp(int16_t LARp[8])
+{
+    int i;
+    int16_t *LARpx;
+    int16_t temp;
+
+    /* The input to this procedure is the interpolated LARp[0..7] array.
+       The reflection coefficients, rp[i], are used in the analysis
+       filter and in the synthesis filter.
+    */
+
+    LARpx = LARp;
+    for (i = 1;  i <= 8;  i++, LARpx++)
+    {
+        temp = *LARpx;
+        if (temp < 0)
+        {
+            if (temp == INT16_MIN)
+                temp = INT16_MAX;
+            else
+                temp = -temp;
+            /*endif*/
+            if (temp < 11059)
+                temp <<= 1;
+            else if (temp < 20070)
+                temp += 11059;
+            else
+                temp = gsm_add(temp >> 2, 26112);
+            /*endif*/
+            *LARpx = -temp;
+        }
+        else
+        {
+            if (temp < 11059)
+                temp <<= 1;
+            else if (temp < 20070)
+                temp += 11059;
+            else
+                temp = gsm_add(temp >> 2, 26112);
+            /*endif*/
+            *LARpx = temp;
+        }
+        /*endif*/
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 4.2.10 */
+static void short_term_analysis_filtering(gsm0610_state_t *s,
+                                          int16_t rp[8],
+                                          int k_n,          // k_end - k_start
+                                          int16_t amp[])    // [0..n-1]     IN/OUT
+{
+    /* This procedure computes the short term residual signal d[..] to be fed
+       to the RPE-LTP loop from the s[..] signal and from the local rp[..]
+       array (quantized reflection coefficients).  As the call of this
+       procedure can be done in many ways (see the interpolation of the LAR
+       coefficient), it is assumed that the computation begins with index
+       k_start (for arrays d[..] and s[..]) and stops with index k_end
+       (k_start and k_end are defined in 4.2.9.1).  This procedure also
+       needs to keep the array u[0..7] in memory for each call.
+    */
+    int16_t *u0;
+    int16_t *u_top;
+    int i;
+    int16_t *u;
+    int16_t *rpx;
+    int32_t di;
+    int32_t u_out;
+
+    u0 = s->u;
+    u_top = u0 + 8;
+
+    for (i = 0;  i < k_n;  i++)
+    {
+        di =
+        u_out = amp[i];
+        for (rpx = rp, u = u0;  u < u_top;  )
+        {
+            int32_t ui;
+            int32_t rpi;
+
+            ui = *u;
+            *u++ = (int16_t) u_out;
+            rpi = *rpx++;
+            u_out = ui + (((rpi*di) + 0x4000) >> 15);
+            di = di + (((rpi*ui) + 0x4000) >> 15);
+            u_out = saturate(u_out);
+            di = saturate(di);
+        }
+        /*endfor*/
+        amp[i] = (int16_t) di;
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void short_term_synthesis_filtering(gsm0610_state_t *s,
+                                           int16_t rrp[8],
+                                           int k,          // k_end - k_start
+                                           int16_t *wt,    // [0..k - 1]
+                                           int16_t *sr)    // [0..k - 1]
+{
+    int16_t *v;
+    int i;
+    int16_t sri;
+    int16_t tmp1;
+    int16_t tmp2;
+
+    v = s->v;
+    while (k--)
+    {
+        sri = *wt++;
+        for (i = 8;  i--;  )
+        {
+            tmp1 = rrp[i];
+            tmp2 = v[i];
+            tmp2 = ((tmp1 == INT16_MIN  &&  tmp2 == INT16_MIN)
+                   ?
+                   INT16_MAX
+                   :
+                   (int16_t) (((int32_t) tmp1*(int32_t) tmp2 + 16384) >> 15) & 0xFFFF);
+
+            sri = gsm_sub(sri, tmp2);
+
+            tmp1 = ((tmp1 == INT16_MIN  &&  sri == INT16_MIN)
+                    ?
+                    INT16_MAX
+                    :
+                    (int16_t) (((int32_t) tmp1*(int32_t) sri + 16384) >> 15) & 0xFFFF);
+
+            v[i + 1] = gsm_add(v[i], tmp1);
+        }
+        /*endfor*/
+        *sr++ =
+        v[0] = sri;
+    }
+    /*endwhile*/
+}
+/*- End of function --------------------------------------------------------*/
+
+void gsm0610_short_term_analysis_filter(gsm0610_state_t *s,
+                                        int16_t LARc[8],
+                                        int16_t amp[GSM0610_FRAME_LEN])
+{
+    int16_t *LARpp_j;
+    int16_t *LARpp_j_1;
+    int16_t LARp[8];
+
+    LARpp_j = s->LARpp[s->j];
+    LARpp_j_1 = s->LARpp[s->j ^= 1];
+
+    decode_log_area_ratios(LARc, LARpp_j);
+
+    coefficients_0_12(LARpp_j_1, LARpp_j, LARp);
+    larp_to_rp(LARp);
+    short_term_analysis_filtering(s, LARp, 13, amp);
+
+    coefficients_13_26(LARpp_j_1, LARpp_j, LARp);
+    larp_to_rp(LARp);
+    short_term_analysis_filtering(s, LARp, 14, amp + 13);
+
+    coefficients_27_39(LARpp_j_1, LARpp_j, LARp);
+    larp_to_rp(LARp);
+    short_term_analysis_filtering(s, LARp, 13, amp + 27);
+
+    coefficients_40_159(LARpp_j, LARp);
+    larp_to_rp(LARp);
+    short_term_analysis_filtering(s, LARp, 120, amp + 40);
+}
+/*- End of function --------------------------------------------------------*/
+
+void gsm0610_short_term_synthesis_filter(gsm0610_state_t *s,
+                                         int16_t LARcr[8],
+                                         int16_t wt[GSM0610_FRAME_LEN],
+                                         int16_t amp[GSM0610_FRAME_LEN])
+{
+    int16_t *LARpp_j;
+    int16_t *LARpp_j_1;
+    int16_t LARp[8];
+
+    LARpp_j = s->LARpp[s->j];
+    LARpp_j_1 = s->LARpp[s->j ^= 1];
+
+    decode_log_area_ratios(LARcr, LARpp_j);
+
+    coefficients_0_12(LARpp_j_1, LARpp_j, LARp);
+    larp_to_rp(LARp);
+    short_term_synthesis_filtering(s, LARp, 13, wt, amp);
+
+    coefficients_13_26(LARpp_j_1, LARpp_j, LARp);
+    larp_to_rp(LARp);
+    short_term_synthesis_filtering(s, LARp, 14, wt + 13, amp + 13);
+
+    coefficients_27_39(LARpp_j_1, LARpp_j, LARp);
+    larp_to_rp(LARp);
+    short_term_synthesis_filtering(s, LARp, 13, wt + 27, amp + 27);
+
+    coefficients_40_159(LARpp_j, LARp);
+    larp_to_rp(LARp);
+    short_term_synthesis_filtering(s, LARp, 120, wt + 40, amp + 40);
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/hdlc.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,678 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * hdlc.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: hdlc.c,v 1.44 2006/11/28 16:59:56 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/fsk.h"
+#include "spandsp/bit_operations.h"
+
+#include "spandsp/timing.h"
+
+static const uint32_t crc_itu32_table[] =
+{
+    0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 
+    0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 
+    0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 
+    0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 
+    0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 
+    0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 
+    0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 
+    0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, 
+    0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 
+    0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 
+    0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 
+    0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 
+    0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 
+    0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, 
+    0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 
+    0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 
+    0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 
+    0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, 
+    0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 
+    0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, 
+    0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 
+    0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 
+    0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 
+    0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, 
+    0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 
+    0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 
+    0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 
+    0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 
+    0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 
+    0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, 
+    0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 
+    0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 
+    0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 
+    0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 
+    0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 
+    0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 
+    0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 
+    0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 
+    0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 
+    0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 
+    0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 
+    0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 
+    0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 
+    0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, 
+    0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 
+    0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 
+    0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 
+    0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, 
+    0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 
+    0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, 
+    0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 
+    0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 
+    0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 
+    0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, 
+    0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 
+    0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 
+    0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 
+    0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 
+    0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 
+    0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 
+    0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 
+    0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 
+    0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 
+    0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+};
+
+uint32_t crc_itu32_calc(const uint8_t *buf, int len, uint32_t crc)
+{
+    int i;
+
+    for (i = 0;  i < len;  i++)
+        crc = ((crc >> 8) & 0x00FFFFFF) ^ crc_itu32_table[(crc ^ buf[i]) & 0xFF];
+    return crc;
+}
+/*- End of function --------------------------------------------------------*/
+
+int crc_itu32_append(uint8_t *buf, int len)
+{
+    uint32_t crc;
+    int new_len;
+    int i;
+
+    crc = 0xFFFFFFFF;
+    new_len = len + 4;
+    for (i = 0;  i < len;  i++)
+        crc = ((crc >> 8) & 0x00FFFFFF) ^ crc_itu32_table[(crc ^ buf[i]) & 0xFF];
+    crc ^= 0xFFFFFFFF;
+    buf[i++] = (uint8_t) crc;
+    buf[i++] = (uint8_t) (crc >> 8);
+    buf[i++] = (uint8_t) (crc >> 16);
+    buf[i++] = (uint8_t) (crc >> 24);
+    return new_len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int crc_itu32_check(const uint8_t *buf, int len)
+{
+    uint32_t crc;
+    int i;
+
+    crc = 0xFFFFFFFF;
+    for (i = 0;  i < len;  i++)
+        crc = ((crc >> 8) & 0x00FFFFFF) ^ crc_itu32_table[(crc ^ buf[i]) & 0xFF];
+    return (crc == 0xDEBB20E3);
+}
+/*- End of function --------------------------------------------------------*/
+
+static const uint16_t crc_itu16_table[] =
+{
+    0x0000, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF,
+    0x8C48, 0x9DC1, 0xAF5A, 0xBED3, 0xCA6C, 0xDBE5, 0xE97E, 0xF8F7,
+    0x1081, 0x0108, 0x3393, 0x221A, 0x56A5, 0x472C, 0x75B7, 0x643E,
+    0x9CC9, 0x8D40, 0xBFDB, 0xAE52, 0xDAED, 0xCB64, 0xF9FF, 0xE876,
+    0x2102, 0x308B, 0x0210, 0x1399, 0x6726, 0x76AF, 0x4434, 0x55BD,
+    0xAD4A, 0xBCC3, 0x8E58, 0x9FD1, 0xEB6E, 0xFAE7, 0xC87C, 0xD9F5,
+    0x3183, 0x200A, 0x1291, 0x0318, 0x77A7, 0x662E, 0x54B5, 0x453C,
+    0xBDCB, 0xAC42, 0x9ED9, 0x8F50, 0xFBEF, 0xEA66, 0xD8FD, 0xC974,
+    0x4204, 0x538D, 0x6116, 0x709F, 0x0420, 0x15A9, 0x2732, 0x36BB,
+    0xCE4C, 0xDFC5, 0xED5E, 0xFCD7, 0x8868, 0x99E1, 0xAB7A, 0xBAF3,
+    0x5285, 0x430C, 0x7197, 0x601E, 0x14A1, 0x0528, 0x37B3, 0x263A,
+    0xDECD, 0xCF44, 0xFDDF, 0xEC56, 0x98E9, 0x8960, 0xBBFB, 0xAA72,
+    0x6306, 0x728F, 0x4014, 0x519D, 0x2522, 0x34AB, 0x0630, 0x17B9,
+    0xEF4E, 0xFEC7, 0xCC5C, 0xDDD5, 0xA96A, 0xB8E3, 0x8A78, 0x9BF1,
+    0x7387, 0x620E, 0x5095, 0x411C, 0x35A3, 0x242A, 0x16B1, 0x0738,
+    0xFFCF, 0xEE46, 0xDCDD, 0xCD54, 0xB9EB, 0xA862, 0x9AF9, 0x8B70,
+    0x8408, 0x9581, 0xA71A, 0xB693, 0xC22C, 0xD3A5, 0xE13E, 0xF0B7,
+    0x0840, 0x19C9, 0x2B52, 0x3ADB, 0x4E64, 0x5FED, 0x6D76, 0x7CFF,
+    0x9489, 0x8500, 0xB79B, 0xA612, 0xD2AD, 0xC324, 0xF1BF, 0xE036,
+    0x18C1, 0x0948, 0x3BD3, 0x2A5A, 0x5EE5, 0x4F6C, 0x7DF7, 0x6C7E,
+    0xA50A, 0xB483, 0x8618, 0x9791, 0xE32E, 0xF2A7, 0xC03C, 0xD1B5,
+    0x2942, 0x38CB, 0x0A50, 0x1BD9, 0x6F66, 0x7EEF, 0x4C74, 0x5DFD,
+    0xB58B, 0xA402, 0x9699, 0x8710, 0xF3AF, 0xE226, 0xD0BD, 0xC134,
+    0x39C3, 0x284A, 0x1AD1, 0x0B58, 0x7FE7, 0x6E6E, 0x5CF5, 0x4D7C,
+    0xC60C, 0xD785, 0xE51E, 0xF497, 0x8028, 0x91A1, 0xA33A, 0xB2B3,
+    0x4A44, 0x5BCD, 0x6956, 0x78DF, 0x0C60, 0x1DE9, 0x2F72, 0x3EFB,
+    0xD68D, 0xC704, 0xF59F, 0xE416, 0x90A9, 0x8120, 0xB3BB, 0xA232,
+    0x5AC5, 0x4B4C, 0x79D7, 0x685E, 0x1CE1, 0x0D68, 0x3FF3, 0x2E7A,
+    0xE70E, 0xF687, 0xC41C, 0xD595, 0xA12A, 0xB0A3, 0x8238, 0x93B1,
+    0x6B46, 0x7ACF, 0x4854, 0x59DD, 0x2D62, 0x3CEB, 0x0E70, 0x1FF9,
+    0xF78F, 0xE606, 0xD49D, 0xC514, 0xB1AB, 0xA022, 0x92B9, 0x8330,
+    0x7BC7, 0x6A4E, 0x58D5, 0x495C, 0x3DE3, 0x2C6A, 0x1EF1, 0x0F78
+};
+
+uint16_t crc_itu16_calc(const uint8_t *buf, int len, uint16_t crc)
+{
+    int i;
+
+    for (i = 0;  i < len;  i++)
+        crc = (crc >> 8) ^ crc_itu16_table[(crc ^ buf[i]) & 0xFF];
+    return crc;
+}
+/*- End of function --------------------------------------------------------*/
+
+int crc_itu16_append(uint8_t *buf, int len)
+{
+    uint16_t crc;
+    int new_len;
+    int i;
+
+    crc = 0xFFFF;
+    new_len = len + 2;
+    for (i = 0;  i < len;  i++)
+        crc = (crc >> 8) ^ crc_itu16_table[(crc ^ buf[i]) & 0xFF];
+    crc ^= 0xFFFF;
+    buf[i++] = (uint8_t) crc;
+    buf[i++] = (uint8_t) (crc >> 8);
+    return new_len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int crc_itu16_check(const uint8_t *buf, int len)
+{
+    uint16_t crc;
+    int i;
+
+    crc = 0xFFFF;
+    for (i = 0;  i < len;  i++)
+        crc = (crc >> 8) ^ crc_itu16_table[(crc ^ buf[i]) & 0xFF];
+    return (crc & 0xFFFF) == 0xF0B8;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void rx_special_condition(hdlc_rx_state_t *s, int condition)
+{
+    /* Special conditions */
+    switch (condition)
+    {
+    case PUTBIT_CARRIER_UP:
+    case PUTBIT_TRAINING_SUCCEEDED:
+        /* Reset the HDLC receiver. */
+        s->len = 0;
+        s->num_bits = 0;
+        s->flags_seen = 0;
+        s->framing_ok_announced = FALSE;
+        /* Fall through */
+    case PUTBIT_CARRIER_DOWN:
+    case PUTBIT_TRAINING_FAILED:
+    case PUTBIT_END_OF_DATA:
+        s->frame_handler(s->user_data, TRUE, NULL, condition);
+        break;
+    default:
+        //printf("Eh!\n");
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void rx_flag_or_abort(hdlc_rx_state_t *s)
+{
+    if ((s->raw_bit_stream & 0x8000))
+    {
+        /* Hit HDLC abort */
+        s->rx_aborts++;
+        s->frame_handler(s->user_data, TRUE, NULL, PUTBIT_ABORT);
+        if (s->flags_seen < s->framing_ok_threshold)
+            s->flags_seen = 0;
+    }
+    else
+    {
+        /* Hit HDLC flag */
+        if (s->flags_seen >= s->framing_ok_threshold)
+        {
+            /* Announce framing OK between frames. */
+            if (!s->framing_ok_announced)
+            {
+                s->frame_handler(s->user_data, TRUE, NULL, PUTBIT_FRAMING_OK);
+                s->framing_ok_announced = TRUE;
+            }
+            /* We may have a frame, or we may have back to back flags */
+            if (s->len)
+            {
+                if (s->len >= s->crc_bytes  &&  s->len <= (int) sizeof(s->buffer))
+                {
+                    if ((s->crc_bytes == 2  &&  crc_itu16_check(s->buffer, s->len))
+                        ||
+                        (s->crc_bytes != 2  &&  crc_itu32_check(s->buffer, s->len)))
+                    {
+                        s->rx_frames++;
+                        s->rx_bytes += s->len - s->crc_bytes;
+                        s->frame_handler(s->user_data,
+                                         TRUE,
+                                         s->buffer,
+                                         s->len - s->crc_bytes);
+                    }
+                    else
+                    {
+                        s->rx_crc_errors++;
+                        if (s->report_bad_frames)
+                        {
+                            s->frame_handler(s->user_data,
+                                             FALSE,
+                                             s->buffer,
+                                             s->len - s->crc_bytes);
+                        }
+                    }
+                    s->framing_ok_announced = FALSE;
+                }
+                else
+                {
+                    /* Frame too short or too long */
+                    if (s->report_bad_frames)
+                    {
+                        s->frame_handler(s->user_data,
+                                         FALSE,
+                                         s->buffer,
+                                         s->len - s->crc_bytes);
+                    }
+                    s->rx_length_errors++;
+                }
+            }
+        }
+        else
+        {
+            /* Check the flags are back-to-back when testing for valid preamble. This
+               greatly reduces the chances of false preamble detection, and anything
+               which doesn't send them back-to-back is badly broken. */
+            if (s->flags_seen  &&  s->num_bits != 7)
+                s->flags_seen = 0;
+            if (++s->flags_seen == s->framing_ok_threshold  &&  !s->framing_ok_announced)
+            {
+                s->frame_handler(s->user_data, TRUE, NULL, PUTBIT_FRAMING_OK);
+                s->framing_ok_announced = TRUE;
+            }
+        }
+    }
+    s->len = 0;
+    s->num_bits = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void hdlc_rx_put_bit(hdlc_rx_state_t *s, int new_bit)
+{
+    if (new_bit < 0)
+    {
+        rx_special_condition(s, new_bit);
+        return;
+    }
+    s->raw_bit_stream = (s->raw_bit_stream << 1) | ((new_bit << 8) & 0x100);
+    if ((s->raw_bit_stream & 0x3F00) == 0x3E00)
+    {
+        if ((s->raw_bit_stream & 0x4000))
+        {
+            rx_flag_or_abort(s);
+        }
+        else
+        {
+            if (s->flags_seen < s->framing_ok_threshold)
+                s->num_bits++;
+        }
+    }
+    else
+    {
+        s->num_bits++;
+        if (s->flags_seen >= s->framing_ok_threshold)
+        {
+            s->byte_in_progress = (s->byte_in_progress | (s->raw_bit_stream & 0x100)) >> 1;
+            if (s->num_bits == 8)
+            {
+                /* Ensure we do not overflow our buffer */
+                if (s->len < (int) sizeof(s->buffer))
+                    s->buffer[s->len++] = (uint8_t) s->byte_in_progress;
+                else
+                    s->len = (int) sizeof(s->buffer) + 1;
+                s->num_bits = 0;
+            }
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void hdlc_rx_put_byte(hdlc_rx_state_t *s, int new_byte)
+{
+    int i;
+
+    if (new_byte < 0)
+    {
+        rx_special_condition(s, new_byte);
+        return;
+    }
+    s->raw_bit_stream |= new_byte;
+
+    i = 0;
+    if (s->flags_seen < s->framing_ok_threshold)
+    {
+        for (  ;  i < 8;  i++)
+        {
+            s->raw_bit_stream <<= 1;
+            if ((s->raw_bit_stream & 0x7F00) == 0x7E00)
+            {
+                rx_flag_or_abort(s);
+                if (s->flags_seen >= s->framing_ok_threshold)
+                {
+                    i++;
+                    break;
+                }
+            }
+            else
+            {
+                s->num_bits++;
+            }
+        }
+    }
+    for (  ;  i < 8;  i++)
+    {
+        s->raw_bit_stream <<= 1;
+        if ((s->raw_bit_stream & 0x3F00) == 0x3E00)
+        {
+            if ((s->raw_bit_stream & 0x4000))
+                rx_flag_or_abort(s);
+        }
+        else
+        {
+            s->byte_in_progress = (s->byte_in_progress | (s->raw_bit_stream & 0x100)) >> 1;
+            if (++s->num_bits == 8)
+            {
+                /* Ensure we do not overflow our buffer */
+                if (s->len < (int) sizeof(s->buffer))
+                    s->buffer[s->len++] = (uint8_t) s->byte_in_progress;
+                else
+                    s->len = (int) sizeof(s->buffer) + 1;
+                s->num_bits = 0;
+            }
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int hdlc_tx_frame(hdlc_tx_state_t *s, const uint8_t *frame, int len)
+{
+    if (len <= 0)
+    {
+        s->tx_end = TRUE;
+        return 0;
+    }
+    if (s->len + len > s->max_frame_len)
+        return -1;
+    if (s->progressive)
+    {
+        /* Only lock out if we are in the CRC section. */
+        if (s->pos >= HDLC_MAXFRAME_LEN)
+            return -1;
+    }
+    else
+    {
+        /* Lock out if there is anything in the buffer. */
+        if (s->len)
+            return -1;
+    }
+    memcpy(s->buffer + s->len, frame, len);
+    if (s->crc_bytes == 2)
+        s->crc = crc_itu16_calc(frame, len, (uint16_t) s->crc);
+    else
+        s->crc = crc_itu32_calc(frame, len, s->crc);
+    if (s->progressive)
+        s->len += len;
+    else
+        s->len = len;
+    s->tx_end = FALSE;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int hdlc_tx_preamble(hdlc_tx_state_t *s, int len)
+{
+    /* Some HDLC applications require the ability to force a period of HDLC
+       flag words. */
+    if (s->pos)
+        return -1;
+    if (len < 0)
+        s->flag_octets += -len;
+    else
+        s->flag_octets = len;
+    s->report_flag_underflow = TRUE;
+    s->tx_end = FALSE;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int hdlc_tx_corrupt_frame(hdlc_tx_state_t *s)
+{
+    if (s->len <= 0)
+        return -1;
+    s->crc ^= 0xFFFF;
+    s->buffer[HDLC_MAXFRAME_LEN] ^= 0xFF;
+    s->buffer[HDLC_MAXFRAME_LEN + 1] ^= 0xFF;
+    s->buffer[HDLC_MAXFRAME_LEN + 2] ^= 0xFF;
+    s->buffer[HDLC_MAXFRAME_LEN + 3] ^= 0xFF;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int hdlc_tx_get_byte(hdlc_tx_state_t *s)
+{
+    int i;
+    int byte_in_progress;
+    int txbyte;
+
+    if (s->flag_octets > 0)
+    {
+        /* We are in a timed flag section (preamble, inter frame gap, etc.) */
+        if (--s->flag_octets <= 0  &&  s->report_flag_underflow)
+        {
+            if (s->len == 0)
+            {
+                /* The timed preamble has finished, there is nothing else queued to go,
+                   and we have been told to report this underflow. */
+                if (s->underflow_handler)
+                    s->underflow_handler(s->user_data);
+            }
+            s->report_flag_underflow = FALSE;
+        }
+        return s->idle_octet;
+    }
+    if (s->len)
+    {
+        if (s->num_bits >= 8)
+        {
+            s->num_bits -= 8;
+            return (s->octets_in_progress >> s->num_bits) & 0xFF;
+        }
+        if (s->pos >= s->len)
+        {
+            if (s->pos == s->len)
+            {
+                s->crc ^= 0xFFFFFFFF;
+                s->buffer[HDLC_MAXFRAME_LEN] = (uint8_t) s->crc;
+                s->buffer[HDLC_MAXFRAME_LEN + 1] = (uint8_t) (s->crc >> 8);
+                if (s->crc_bytes == 4)
+                {
+                    s->buffer[HDLC_MAXFRAME_LEN + 2] = (uint8_t) (s->crc >> 16);
+                    s->buffer[HDLC_MAXFRAME_LEN + 3] = (uint8_t) (s->crc >> 24);
+                }
+                s->pos = HDLC_MAXFRAME_LEN;
+            }
+            else if (s->pos == HDLC_MAXFRAME_LEN + s->crc_bytes)
+            {
+                /* Finish off the current byte with some flag bits. If we are at the
+                   start of a byte we need a at least one whole byte of flag to ensure
+                   we cannot end up with back to back frames, and no flag octet at all */
+                txbyte = (uint8_t) ((s->octets_in_progress << (8 - s->num_bits)) | (0x7E >> s->num_bits));
+                /* Create a rotated octet of flag for idling... */
+                s->idle_octet = (0x7E7E >> s->num_bits) & 0xFF;
+                /* ...and the partial flag octet needed to start off the next message. */
+                s->octets_in_progress = s->idle_octet >> (8 - s->num_bits);
+                s->flag_octets = s->inter_frame_flags - 1;
+                s->len = 0;
+                s->pos = 0;
+                if (s->crc_bytes == 2)
+                    s->crc = 0xFFFF;
+                else
+                    s->crc = 0xFFFFFFFF;
+                /* Report the underflow now. If there is a timed preamble still in progress, loading the
+                   next frame right now will be harmless. */
+                s->report_flag_underflow = FALSE;
+                if (s->underflow_handler)
+                    s->underflow_handler(s->user_data);
+                /* Make sure we finish off with at least one flag octet, if the underflow report did not result
+                   in a new frame being sent. */
+                if (s->len == 0  &&  s->flag_octets < 2)
+                    s->flag_octets = 2;
+                return txbyte;
+            }
+        }
+        byte_in_progress = s->buffer[s->pos++];
+        i = bottom_bit(byte_in_progress | 0x100);
+        s->octets_in_progress <<= i;
+        byte_in_progress >>= i;
+        for (  ;  i < 8;  i++)
+        {
+            s->octets_in_progress = (s->octets_in_progress << 1) | (byte_in_progress & 0x01);
+            byte_in_progress >>= 1;
+            if ((s->octets_in_progress & 0x1F) == 0x1F)
+            {
+                /* There are 5 ones - stuff */
+                s->octets_in_progress <<= 1;
+                s->num_bits++;
+            }
+        }
+        /* An input byte will generate between 8 and 10 output bits */
+        return (s->octets_in_progress >> s->num_bits) & 0xFF;
+    }
+    /* Untimed idling on flags */
+    if (s->tx_end)
+    {
+        s->tx_end = FALSE;
+        return PUTBIT_END_OF_DATA;
+    }
+    return s->idle_octet;
+}
+/*- End of function --------------------------------------------------------*/
+
+int hdlc_tx_get_bit(hdlc_tx_state_t *s)
+{
+    int txbit;
+
+    if (s->bits == 0)
+    {
+        if ((s->byte = hdlc_tx_get_byte(s)) < 0)
+            return s->byte;
+        s->bits = 8;
+    }
+    s->bits--;
+    txbit = (s->byte >> s->bits) & 0x01;
+    return  txbit;
+}
+/*- End of function --------------------------------------------------------*/
+
+hdlc_rx_state_t *hdlc_rx_init(hdlc_rx_state_t *s,
+                              int crc32,
+                              int report_bad_frames,
+                              int framing_ok_threshold,
+                              hdlc_frame_handler_t handler,
+                              void *user_data)
+{
+    memset(s, 0, sizeof(*s));
+    s->frame_handler = handler;
+    s->user_data = user_data;
+    s->crc_bytes = (crc32)  ?  4  :  2;
+    s->report_bad_frames = report_bad_frames;
+    s->framing_ok_threshold = (framing_ok_threshold < 1)  ?  1  :  framing_ok_threshold;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int hdlc_rx_get_stats(hdlc_rx_state_t *s,
+                      hdlc_rx_stats_t *t)
+{
+    t->bytes = s->rx_bytes;
+    t->good_frames = s->rx_frames;
+    t->crc_errors = s->rx_crc_errors;
+    t->length_errors = s->rx_length_errors;
+    t->aborts = s->rx_aborts;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void hdlc_tx_set_max_frame_len(hdlc_tx_state_t *s, int max_len)
+{
+    s->max_frame_len = (max_len <= HDLC_MAXFRAME_LEN)  ?  max_len  :  HDLC_MAXFRAME_LEN;
+}
+/*- End of function --------------------------------------------------------*/
+
+hdlc_tx_state_t *hdlc_tx_init(hdlc_tx_state_t *s,
+                              int crc32,
+                              int inter_frame_flags,
+                              int progressive,
+                              hdlc_underflow_handler_t handler,
+                              void *user_data)
+{
+    memset(s, 0, sizeof(*s));
+    s->idle_octet = 0x7E;
+    s->underflow_handler = handler;
+    s->user_data = user_data;
+    s->inter_frame_flags = (inter_frame_flags < 1)  ?  1  :  inter_frame_flags;
+    if (crc32)
+    {
+        s->crc_bytes = 4;
+        s->crc = 0xFFFFFFFF;
+    }
+    else
+    {
+        s->crc_bytes = 2;
+        s->crc = 0xFFFF;
+    }
+    s->progressive = progressive;
+    s->max_frame_len = HDLC_MAXFRAME_LEN;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/ima_adpcm.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,387 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * ima_adpcm.c - Conversion routines between linear 16 bit PCM data and
+ *                 IMA/DVI/Intel ADPCM format.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001, 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: ima_adpcm.c,v 1.18 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/ima_adpcm.h"
+
+/*
+ * Intel/DVI ADPCM coder/decoder.
+ *
+ * The algorithm for this coder was taken from the IMA Compatability Project
+ * proceedings, Vol 2, Number 2; May 1992.
+ *
+ * The RTP payload specs. reference a variant of DVI, called VDVI. This attempts to
+ * further compresses, in a variable bit rate manner, by expressing the 4 bit codes
+ * from the DVI codec as:
+ *
+ *  0 00
+ *  1 010
+ *  2 1100
+ *  3 11100
+ *  4 111100
+ *  5 1111100
+ *  6 11111100
+ *  7 11111110
+ *  8 10
+ *  9 011
+ * 10 1101
+ * 11 11101
+ * 12 111101
+ * 13 1111101
+ * 14 11111101
+ * 15 11111111
+ *
+ * Any left over bits in the last octet of an encoded burst are set to one.
+ */
+
+/* Intel ADPCM step variation table */
+static const int step_size[89] =
+{
+        7,     8,     9,   10,     11,    12,    13,    14,    16,    17,
+       19,    21,    23,   25,     28,    31,    34,    37,    41,    45,
+       50,    55,    60,   66,     73,    80,    88,    97,   107,   118,
+      130,   143,   157,   173,   190,   209,   230,   253,   279,   307,
+      337,   371,   408,   449,   494,   544,   598,   658,   724,   796,
+      876,   963,  1060,  1166,  1282,  1411,  1552,  1707,  1878,  2066,
+     2272,  2499,  2749,  3024,  3327,  3660,  4026,  4428,  4871,  5358,
+     5894,  6484,  7132,  7845,  8630,  9493, 10442, 11487, 12635, 13899,
+    15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
+};
+
+static const int step_adjustment[8] =
+{
+    -1, -1, -1, -1, 2, 4, 6, 8
+};
+
+static const struct
+{
+    uint8_t code;
+    uint8_t bits;
+} vdvi_encode[] =
+{
+    {0x00,       2},
+    {0x02,       3},
+    {0x0C,       4},
+    {0x1C,       5},
+    {0x3C,       6},
+    {0x7C,       7},
+    {0xFC,       8},
+    {0xFE,       8},
+    {0x02,       2},
+    {0x03,       3},
+    {0x0D,       4},
+    {0x1D,       5},
+    {0x3D,       6},
+    {0x7D,       7},
+    {0xFD,       8},
+    {0xFF,       8}
+};
+
+static const struct
+{
+    uint16_t code;
+    uint16_t mask;
+    uint8_t bits;
+} vdvi_decode[] =
+{
+    {0x0000,    0xC000,     2},
+    {0x4000,    0xE000,     3},
+    {0xC000,    0xF000,     4},
+    {0xE000,    0xF800,     5},
+    {0xF000,    0xFC00,     6},
+    {0xF800,    0xFE00,     7},
+    {0xFC00,    0xFF00,     8},
+    {0xFE00,    0xFF00,     8},
+    {0x8000,    0xC000,     2},
+    {0x6000,    0xE000,     3},
+    {0xD000,    0xF000,     4},
+    {0xE800,    0xF800,     5},
+    {0xF400,    0xFC00,     6},
+    {0xFA00,    0xFE00,     7},
+    {0xFD00,    0xFF00,     8},
+    {0xFF00,    0xFF00,     8}
+};
+
+static int16_t decode(ima_adpcm_state_t *s, uint8_t adpcm)
+{
+    int e;
+    int ss;
+    int16_t linear;
+
+    /* e = (adpcm+0.5)*step/4 */
+
+    ss = step_size[s->step_index];
+    e = ss >> 3;
+    if (adpcm & 0x01)
+        e += (ss >> 2);
+    /*endif*/
+    if (adpcm & 0x02)
+        e += (ss >> 1);
+    /*endif*/
+    if (adpcm & 0x04)
+        e += ss;
+    /*endif*/
+    if (adpcm & 0x08)
+        e = -e;
+    /*endif*/
+    linear = saturate(s->last + e);
+    s->last = linear;
+    s->step_index += step_adjustment[adpcm & 0x07];
+    if (s->step_index < 0)
+        s->step_index = 0;
+    else if (s->step_index > 88)
+        s->step_index = 88;
+    /*endif*/
+    return linear;
+}
+/*- End of function --------------------------------------------------------*/
+
+static uint8_t encode(ima_adpcm_state_t *s, int16_t linear)
+{
+    int e;
+    int ss;
+    int adpcm;
+    int diff;
+    int initial_e;
+
+    ss = step_size[s->step_index];
+    initial_e =
+    e = linear - s->last;
+    diff = ss >> 3;
+    adpcm = (uint8_t) 0x00;
+    if (e < 0)
+    {
+        adpcm = (uint8_t) 0x08;
+        e = -e;
+    }
+    /*endif*/
+    if (e >= ss)
+    {
+        adpcm |= (uint8_t) 0x04;
+        e -= ss;
+    }
+    /*endif*/
+    ss >>= 1;
+    if (e >= ss)
+    {
+        adpcm |= (uint8_t) 0x02;
+        e -= ss;
+    }
+    /*endif*/
+    ss >>= 1;
+    if (e >= ss)
+    {
+        adpcm |= (uint8_t) 0x01;
+        e -= ss;
+    }
+    /*endif*/
+
+    if (initial_e < 0)
+        diff = -(diff - initial_e - e);
+    else
+        diff = diff + initial_e - e;
+    /*endif*/
+    s->last = saturate(diff + s->last);
+    s->step_index += step_adjustment[adpcm & 0x07];
+    if (s->step_index < 0)
+        s->step_index = 0;
+    else if (s->step_index > 88)
+        s->step_index = 88;
+    /*endif*/
+    return (uint8_t) adpcm;
+}
+/*- End of function --------------------------------------------------------*/
+
+ima_adpcm_state_t *ima_adpcm_init(ima_adpcm_state_t *s, int variant)
+{
+    if (s == NULL)
+    {
+        if ((s = (ima_adpcm_state_t *) malloc(sizeof(*s))) == NULL)
+            return  NULL;
+    }
+    /*endif*/
+    memset(s, 0, sizeof(*s));
+    s->variant = variant;
+    return  s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int ima_adpcm_release(ima_adpcm_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int ima_adpcm_decode(ima_adpcm_state_t *s,
+                     int16_t amp[],
+                     const uint8_t ima_data[],
+                     int ima_bytes)
+{
+    int i;
+    int j;
+    int samples;
+    uint16_t code;
+
+    samples = 0;
+    if (s->variant == IMA_ADPCM_VDVI)
+    {
+        code = 0;
+        s->bits = 0;
+        for (i = 0;  ;  )
+        {
+            if (s->bits <= 8)
+            {
+                if (i >= ima_bytes)
+                    break;
+                /*endif*/
+                code |= ((uint16_t) ima_data[i++] << (8 - s->bits));
+                s->bits += 8;
+            }
+            /*endif*/
+            for (j = 0;  j < 8;  j++)
+            {
+                if ((vdvi_decode[j].mask & code) == vdvi_decode[j].code)
+                    break;
+                if ((vdvi_decode[j + 8].mask & code) == vdvi_decode[j + 8].code)
+                {
+                    j += 8;
+                    break;
+                }
+                /*endif*/
+            }
+            /*endfor*/
+            amp[samples++] = decode(s, (uint8_t) j);
+            code <<= vdvi_decode[j].bits;
+            s->bits -= vdvi_decode[j].bits;
+        }
+        /*endfor*/
+        /* Use up the remanents of the last octet */
+        while (s->bits > 0)
+        {
+            for (j = 0;  j < 8;  j++)
+            {
+                if ((vdvi_decode[j].mask & code) == vdvi_decode[j].code)
+                    break;
+                /*endif*/
+                if ((vdvi_decode[j + 8].mask & code) == vdvi_decode[j + 8].code)
+                {
+                    j += 8;
+                    break;
+                }
+                /*endif*/
+            }
+            /*endfor*/
+            if (vdvi_decode[j].bits > s->bits)
+                break;
+            /*endif*/
+            amp[samples++] = decode(s, (uint8_t) j);
+            code <<= vdvi_decode[j].bits;
+            s->bits -= vdvi_decode[j].bits;
+        }
+        /*endfor*/
+    }
+    else
+    {
+        for (i = 0;  i < ima_bytes;  i++)
+        {
+            amp[samples++] = decode(s, ima_data[i] & 0xF);
+            amp[samples++] = decode(s, (ima_data[i] >> 4) & 0xF);
+        }
+        /*endwhile*/
+    }
+    /*endif*/
+    return samples;
+}
+/*- End of function --------------------------------------------------------*/
+
+int ima_adpcm_encode(ima_adpcm_state_t *s,
+                     uint8_t ima_data[],
+                     const int16_t amp[],
+                     int len)
+{
+    int i;
+    int bytes;
+    uint8_t code;
+
+    bytes = 0;
+    if (s->variant == IMA_ADPCM_VDVI)
+    {
+        s->bits = 0;
+        for (i = 0;  i < len;  i++)
+        {
+            code = encode(s, amp[i]);
+            s->ima_byte = (s->ima_byte << vdvi_encode[code].bits) | vdvi_encode[code].code;
+            s->bits += vdvi_encode[code].bits;
+            if (s->bits >= 8)
+            {
+                s->bits -= 8;
+                ima_data[bytes++] = (uint8_t) (s->ima_byte >> s->bits);
+            }
+            /*endif*/
+        }
+        /*endfor*/
+        if (s->bits)
+        {
+            ima_data[bytes++] = (uint8_t) (((s->ima_byte << 8) | 0xFF) >> s->bits);
+        }
+        /*endif*/
+    }
+    else
+    {
+        for (i = 0;  i < len;  i++)
+        {
+            s->ima_byte = (uint8_t) ((s->ima_byte >> 4) | (encode(s, amp[i]) << 4));
+            if ((s->bits++ & 1))
+                ima_data[bytes++] = (uint8_t) s->ima_byte;
+            /*endif*/
+        }
+        /*endfor*/
+    }
+    /*endif*/
+    return  bytes;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/libspandsp.sln	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,29 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libspandsp.vcproj", "{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1CED5987-A529-46DC-B30F-870D85FF9C94} = {1CED5987-A529-46DC-B30F-870D85FF9C94}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "at_dictionary_gen", "src\msvc\at_dictionary_gen.vcproj", "{1CED5987-A529-46DC-B30F-870D85FF9C94}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.ActiveCfg = Debug|Win32
+		{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.Build.0 = Debug|Win32
+		{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.ActiveCfg = Release|Win32
+		{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.Build.0 = Release|Win32
+		{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.Build.0 = Debug|Win32
+		{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.ActiveCfg = Release|Win32
+		{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/logging.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,256 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * logging.c - error and debug logging.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: logging.c,v 1.22 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#include <errno.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+
+static void default_message_handler(int level, const char *text);
+
+static message_handler_func_t __span_message = *default_message_handler;
+static error_handler_func_t __span_error = NULL;
+
+static const char *severities[] =
+{
+    "NONE",
+    "ERROR",
+    "WARNING",
+    "PROTOCOL_ERROR",
+    "PROTOCOL_WARNING",
+    "FLOW",
+    "FLOW 2",
+    "FLOW 3",
+    "DEBUG 1",
+    "DEBUG 2",
+    "DEBUG 3"
+};
+
+static void default_message_handler(int level, const char *text)
+{
+    fprintf(stderr, "%s", text);
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_log_test(logging_state_t *s, int level)
+{
+    if (s  &&  (s->level & SPAN_LOG_SEVERITY_MASK) >= (level & SPAN_LOG_SEVERITY_MASK))
+        return TRUE;
+    return FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_log(logging_state_t *s, int level, const char *format, ...)
+{
+    char msg[1024 + 1];
+    va_list arg_ptr;
+    int len;
+    struct tm *tim;
+    struct timeval nowx;
+    time_t now;
+
+    if (span_log_test(s, level))
+    {
+        va_start(arg_ptr, format);
+        len = 0;
+        if ((level & SPAN_LOG_SUPPRESS_LABELLING) == 0)
+        {
+            if ((s->level & SPAN_LOG_SHOW_DATE))
+            {
+                gettimeofday(&nowx, NULL);
+                now = nowx.tv_sec;
+                tim = gmtime(&now);
+                snprintf(msg + len,
+                         1024 - len,
+                         "%04d/%02d/%02d %02d:%02d:%02d.%03d ",
+                         tim->tm_year + 1900,
+                         tim->tm_mon + 1,
+                         tim->tm_mday,
+                         tim->tm_hour,
+                         tim->tm_min,
+                         tim->tm_sec,
+                         (int) nowx.tv_usec/1000);
+                len += (int) strlen(msg + len);
+            }
+            /*endif*/
+            if ((s->level & SPAN_LOG_SHOW_SAMPLE_TIME))
+            {
+                now = s->elapsed_samples/s->samples_per_second;
+                tim = gmtime(&now);
+                snprintf(msg + len,
+                         1024 - len,
+                         "%02d:%02d:%02d.%03d ",
+                         tim->tm_hour,
+                         tim->tm_min,
+                         tim->tm_sec,
+                         (int) (s->elapsed_samples%s->samples_per_second)*1000/s->samples_per_second);
+                len += (int) strlen(msg + len);
+            }
+            /*endif*/
+            if ((s->level & SPAN_LOG_SHOW_SEVERITY)  &&  (level & SPAN_LOG_SEVERITY_MASK) <= SPAN_LOG_DEBUG_3)
+                len += snprintf(msg + len, 1024 - len, "%s ", severities[level & SPAN_LOG_SEVERITY_MASK]);
+            /*endif*/
+            if ((s->level & SPAN_LOG_SHOW_PROTOCOL)  &&  s->protocol)
+                len += snprintf(msg + len, 1024 - len, "%s ", s->protocol);
+            /*endif*/
+            if ((s->level & SPAN_LOG_SHOW_TAG)  &&  s->tag)
+                len += snprintf(msg + len, 1024 - len, "%s ", s->tag);
+            /*endif*/
+        }
+        /*endif*/
+        len += vsnprintf(msg + len, 1024 - len, format, arg_ptr);
+        if (s->span_error  &&  level == SPAN_LOG_ERROR)
+            s->span_error(msg);
+        else if (__span_error  &&  level == SPAN_LOG_ERROR)
+            __span_error(msg);
+        else if (s->span_message)
+            s->span_message(level, msg);
+        else if (__span_message)
+            __span_message(level, msg);
+        /*endif*/
+        va_end(arg_ptr);
+        return  1;
+    }
+    /*endif*/
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len)
+{
+    char msg[1024];
+    int i;
+    int msg_len;
+
+    if (span_log_test(s, level))
+    {
+        msg_len = 0;
+        if (tag)
+            msg_len += snprintf(msg + msg_len, 1024 - msg_len, "%s", tag);
+        for (i = 0;  i < len  &&  msg_len < 800;  i++)
+            msg_len += snprintf(msg + msg_len, 1024 - msg_len, " %02x", buf[i]);
+        msg_len += snprintf(msg + msg_len, 1024 - msg_len, "\n");
+        return span_log(s, level, msg);
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_log_init(logging_state_t *s, int level, const char *tag)
+{
+    s->span_error = __span_error;
+    s->span_message = __span_message;
+    s->level = level;
+    s->tag = tag;
+    s->protocol = NULL;
+    s->samples_per_second = SAMPLE_RATE;
+    s->elapsed_samples = 0;
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_log_set_level(logging_state_t *s, int level)
+{
+    s->level = level;
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_log_set_tag(logging_state_t *s, const char *tag)
+{
+    s->tag = tag;
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_log_set_protocol(logging_state_t *s, const char *protocol)
+{
+    s->protocol = protocol;
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_log_set_sample_rate(logging_state_t *s, int samples_per_second)
+{
+    s->samples_per_second = samples_per_second;
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_log_bump_samples(logging_state_t *s, int samples)
+{
+    s->elapsed_samples += samples;
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void span_log_set_message_handler(logging_state_t *s, message_handler_func_t func)
+{
+    s->span_message = func;
+}
+/*- End of function --------------------------------------------------------*/
+
+void span_log_set_error_handler(logging_state_t *s, error_handler_func_t func)
+{
+    s->span_error = func;
+}
+/*- End of function --------------------------------------------------------*/
+
+void span_set_message_handler(message_handler_func_t func)
+{
+    __span_message = func;
+}
+/*- End of function --------------------------------------------------------*/
+
+void span_set_error_handler(error_handler_func_t func)
+{
+    __span_error = func;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/lpc10_analyse.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,712 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * lpc10_analyse.c - LPC10 low bit rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the U.S. Department of Defense reference
+ * implementation of the LPC-10 2400 bps Voice Coder. They do not
+ * exert copyright claims on their code, and it may be freely used.
+ *
+ * $Id: lpc10_analyse.c,v 1.12 2006/11/30 15:41:47 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/lpc10.h"
+
+#include "lpc10_encdecs.h"
+
+static __inline__ float energyf(float amp[], int len)
+{
+    int i;
+    float rms;
+
+    rms = 0.0f;
+    for (i = 0;  i < len;  i++)
+	    rms += amp[i]*amp[i];
+    rms = sqrtf(rms/len);
+    return rms;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void remove_dc_bias(float speech[], int len, float sigout[])
+{
+    float bias;
+    int i;
+
+    bias = 0.0f;
+    for (i = 0;  i < len;  i++)
+        bias += speech[i];
+    bias /= len;
+    for (i = 0; i < len;  i++)
+        sigout[i] = speech[i] - bias;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void eval_amdf(float speech[],
+                       int32_t lpita,
+                       const int32_t tau[], 
+                       int32_t ltau,
+                       int32_t maxlag,
+                       float amdf[],
+                       int32_t *minptr,
+                       int32_t *maxptr)
+{
+    float sum;
+    int i;
+    int j;
+    int n1;
+    int n2;
+
+    *minptr = 0;
+    *maxptr = 0;
+    for (i = 0;  i < ltau;  i++)
+    {
+        n1 = (maxlag - tau[i])/2 + 1;
+        n2 = n1 + lpita - 1;
+        sum = 0.0f;
+        for (j = n1;  j <= n2;  j += 4)
+            sum += fabsf(speech[j - 1] - speech[j + tau[i] - 1]);
+        amdf[i] = sum;
+        if (amdf[i] < amdf[*minptr])
+            *minptr = i;
+        if (amdf[i] > amdf[*maxptr])
+            *maxptr = i;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void eval_highres_amdf(float speech[],
+                              int32_t lpita,
+                              const int32_t tau[], 
+                              int32_t ltau,
+                              float amdf[],
+                              int32_t *minptr,
+                              int32_t *maxptr,
+                              int32_t *mintau)
+{
+    float amdf2[6];
+    int32_t tau2[6];
+    int32_t minp2;
+    int32_t ltau2;
+    int32_t maxp2;
+    int32_t minamd;
+    int i;
+    int i2;
+    int ptr;
+
+    /* Compute full AMDF using log spaced lags, find coarse minimum */
+    eval_amdf(speech, lpita, tau, ltau, tau[ltau - 1], amdf, minptr, maxptr);
+    *mintau = tau[*minptr];
+    minamd = (int32_t) amdf[*minptr];
+
+    /* Build table containing all lags within +/- 3 of the AMDF minimum,
+       excluding all that have already been computed */
+    ltau2 = 0;
+    ptr = *minptr - 2;
+    i2 = min(*mintau + 4, tau[ltau - 1]);
+    for (i = max(*mintau - 3, 41);  i < i2;  i++)
+    {
+        while (tau[ptr] < i)
+            ptr++;
+        if (tau[ptr] != i)
+            tau2[ltau2++] = i;
+    }
+    /* Compute AMDF of the new lags, if there are any, and choose one
+       if it is better than the coarse minimum */
+    if (ltau2 > 0)
+    {
+        eval_amdf(speech, lpita, tau2, ltau2, tau[ltau - 1], amdf2, &minp2, &maxp2);
+        if (amdf2[minp2] < (float) minamd)
+        {
+            *mintau = tau2[minp2];
+            minamd = (int32_t) amdf2[minp2];
+        }
+    }
+    /* Check one octave up, if there are any lags not yet computed */
+    if (*mintau >= 80)
+    {
+        i = *mintau/2;
+        if ((i & 1) == 0)
+        {
+            ltau2 = 2;
+            tau2[0] = i - 1;
+            tau2[1] = i + 1;
+        }
+        else
+        {
+            ltau2 = 1;
+            tau2[0] = i;
+        }
+        eval_amdf(speech, lpita, tau2, ltau2, tau[ltau - 1], amdf2, &minp2, &maxp2);
+        if (amdf2[minp2] < (float) minamd)
+        {
+            *mintau = tau2[minp2];
+            minamd = (int32_t) amdf2[minp2];
+            *minptr -= 20;
+        }
+    }
+    /* Force minimum of the AMDF array to the high resolution minimum */
+    amdf[*minptr] = (float) minamd;
+    /* Find maximum of AMDF within 1/2 octave of minimum */
+    *maxptr = max(*minptr - 5, 0);
+    i2 = min(*minptr + 6, ltau);
+    for (i = *maxptr;  i < i2;  i++)
+    {
+        if (amdf[i] > amdf[*maxptr])
+            *maxptr = i;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void dynamic_pitch_tracking(lpc10_encode_state_t *s,
+                                   float amdf[],
+                                   int32_t ltau,
+                                   int32_t *minptr,
+                                   int32_t voice,
+                                   int32_t *pitch,
+                                   int32_t *midx)
+{
+    int32_t pbar;
+    float sbar;
+    int32_t path[2];
+    int32_t i;
+    int32_t j;
+    float alpha;
+    float minsc;
+    float maxsc;
+
+    /* Calculate the confidence factor ALPHA, used as a threshold slope in */
+    /* SEESAW.  If unvoiced, set high slope so that every point in P array */
+    /*is marked as a potential pitch frequency.  A scaled up version (ALPHAX )*/
+    /* is used to maintain arithmetic precision. */
+    if (voice == 1)
+        s->alphax = s->alphax*0.75f + amdf[*minptr - 1]*0.5f;
+    else
+        s->alphax *= 0.984375f;
+    alpha = s->alphax/16;
+    if (voice == 0  &&  s->alphax < 128.0f)
+        alpha = 8.0f;
+    /* SEESAW: Construct a pitch pointer array and intermediate winner function */
+    /* Left to right pass: */
+    s->p[s->ipoint][0] = 1;
+    pbar = 1;
+    sbar = s->s[0];
+    for (i = 0;  i < ltau;  i++)
+    {
+        sbar += alpha;
+        if (sbar < s->s[i])
+        {
+            s->s[i] = sbar;
+        }
+        else
+        {
+            pbar = i + 1;
+            sbar = s->s[i];
+        }
+        s->p[s->ipoint][i] = pbar;
+    }
+    /* Right to left pass: */
+    sbar = s->s[pbar - 1];
+    for (i = pbar - 2;  i >= 0;  i--)
+    {
+        sbar += alpha;
+        if (sbar < s->s[i])
+        {
+            s->s[i] = sbar;
+            s->p[s->ipoint][i] = pbar;
+        }
+        else
+        {
+            pbar = s->p[s->ipoint][i];
+            i = pbar - 1;
+            sbar = s->s[i];
+        }
+    }
+    /* Update S using AMDF */
+    /* Find maximum, minimum, and location of minimum */
+    s->s[0] += amdf[0]/2;
+    minsc = s->s[0];
+    maxsc = minsc;
+    *midx = 1;
+    for (i = 1;  i < ltau;  i++)
+    {
+        s->s[i] += amdf[i]/2;
+        if (s->s[i] > maxsc)
+            maxsc = s->s[i];
+        if (s->s[i] < minsc)
+        {
+            *midx = i + 1;
+            minsc = s->s[i];
+        }
+    }
+    /* Subtract MINSC from S to prevent overflow */
+    for (i = 0;  i < ltau;  i++)
+        s->s[i] -= minsc;
+    maxsc -= minsc;
+    /* Use higher octave pitch if significant null there */
+    j = 0;
+    for (i = 20;  i <= 40;  i += 10)
+    {
+        if (*midx > i)
+        {
+            if (s->s[*midx - i - 1] < maxsc / 4)
+                j = i;
+        }
+    }
+    *midx -= j;
+    /* TRACE: look back two frames to find minimum cost pitch estimate */
+    *pitch = *midx;
+    for (i = 0, j = s->ipoint;  i < 2;  i++, j++)
+    {
+        *pitch = s->p[j & 1][*pitch - 1];
+        path[i] = *pitch;
+    }
+
+    /* The following statement subtracts one from IPOINT, mod DEPTH.  I */
+    /* think the author chose to add DEPTH-1, instead of subtracting 1, */
+    /* because then it will work even if MOD doesn't work as desired on */
+    /* negative arguments. */
+    s->ipoint = (s->ipoint + 1) & 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Detection of onsets in (or slightly preceding) the futuremost frame of speech. */
+static void onset(lpc10_encode_state_t *s,
+                   float *pebuf,
+                   int32_t osbuf[],
+                   int32_t *osptr,
+                   int32_t oslen,
+                   int32_t sbufl,
+                   int32_t sbufh,
+                   int32_t lframe)
+{
+    int32_t i;
+    float r1;
+    float l2sum2;
+
+    pebuf -= sbufl;
+
+    if (s->hyst)
+    	s->lasti -= lframe;
+    for (i = sbufh - lframe + 1;  i <= sbufh;  i++)
+    {
+        /* Compute FPC; Use old FPC on divide by zero; Clamp FPC to +/- 1. */
+        s->n = (pebuf[i]*pebuf[i - 1] + s->n*63.0f)/64.0f;
+        /* Computing 2nd power */
+        r1 = pebuf[i - 1];
+        s->d__ = (r1*r1 + s->d__*63.0f)/64.0f;
+        if (s->d__ != 0.0f)
+        {
+            if (fabsf(s->n) > s->d__)
+                s->fpc = r_sign(1.0f, s->n);
+            else
+                s->fpc = s->n/s->d__;
+        }
+        /* Filter FPC */
+        l2sum2 = s->l2buf[s->l2ptr1 - 1];
+        s->l2sum1 = s->l2sum1 - s->l2buf[s->l2ptr2 - 1] + s->fpc;
+        s->l2buf[s->l2ptr2 - 1] = s->l2sum1;
+        s->l2buf[s->l2ptr1 - 1] = s->fpc;
+        s->l2ptr1 = (s->l2ptr1 & 0xF) + 1;
+        s->l2ptr2 = (s->l2ptr2 & 0xF) + 1;
+        if (fabsf(s->l2sum1 - l2sum2) > 1.7f)
+        {
+            if (!s->hyst)
+            {
+                /* Ignore if buffer full */
+                if (*osptr <= oslen)
+                {
+                    osbuf[*osptr - 1] = i - 9;
+                    (*osptr)++;
+                }
+                s->hyst = TRUE;
+            }
+            s->lasti = i;
+            /* After one onset detection, at least OSHYST sample times must go */
+            /* by before another is allowed to occur. */
+        }
+        else if (s->hyst  &&  i - s->lasti >= 10)
+        {
+            s->hyst = FALSE;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Load a covariance matrix. */
+static void mload(int32_t order, int32_t awins, int32_t awinf, float speech[], float phi[], float psi[])
+{
+    int32_t start;
+    int i;
+    int r;
+
+    start = awins + order;
+    for (r = 1;  r <= order;  r++)
+    {
+        phi[r - 1] = 0.0f;
+        for (i = start;  i <= awinf;  i++)
+            phi[r - 1] += speech[i - 2]*speech[i - r - 1];
+    }
+
+    /* Load last element of vector PSI */
+    psi[order - 1] = 0.0f;
+    for (i = start - 1;  i < awinf;  i++)
+        psi[order - 1] += speech[i]*speech[i - order];
+    /* End correct to get additional columns of phi */
+    for (r = 1;  r < order;  r++)
+    {
+        for (i = 1;  i <= r;  i++)
+        {
+            phi[i*order + r] = phi[(i - 1)*order + r - 1]
+                             - speech[awinf - (r + 1)]*speech[awinf - (i + 1)]
+                             + speech[start - (r + 2)]*speech[start - (i + 2)];
+        }
+    }
+    /* End correct to get additional elements of PSI */
+    for (i = 0;  i < order - 1;  i++)
+    {
+        psi[i] = phi[i + 1]
+               - speech[start - 2]*speech[start - i - 3]
+               + speech[awinf - 1]*speech[awinf - i - 2];
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Preemphasize speech with a single-zero filter. */
+/* (When coef = .9375, preemphasis is as in LPC43.) */
+static float preemp(float inbuf[], float pebuf[], int nsamp, float coeff, float z)
+{
+    float temp;
+    int i;
+
+    for (i = 0;  i < nsamp;  i++)
+    {
+        temp = inbuf[i] - coeff*z;
+        z = inbuf[i];
+        pebuf[i] = temp;
+    }
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Invert a covariance matrix using Choleski decomposition method. */
+static void invert(int32_t order, float phi[], float psi[], float rc[])
+{
+    float r1;
+    int32_t i;
+    int32_t j;
+    int32_t k;
+    float v[10][10];
+
+    for (j = 0;  j < order;  j++)
+    {
+        for (i = j;  i < order;  i++)
+            v[j][i] = phi[i + j*order];
+        for (k = 0;  k < j;  k++)
+        {
+            r1 = v[k][j]*v[k][k];
+            for (i = j;  i <= order;  i++)
+                v[j][i] -= v[k][i]*r1;
+        }
+        /* Compute intermediate results, which are similar to RC's */
+        if (fabsf(v[j][j]) < 1.0e-10f)
+        {
+            for (i = j;  i < order;  i++)
+                rc[i] = 0.0f;
+            return;
+        }
+        rc[j] = psi[j];
+        for (k = 0;  k < j;  k++)
+            rc[j] -= rc[k]*v[k][j];
+        v[j][j] = 1.0f/v[j][j];
+        rc[j] *= v[j][j];
+        r1 = min(rc[j], 0.999f);
+        rc[j] = max(r1, -0.999f);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Check RC's, repeat previous frame's RC's if unstable */
+static int rcchk(int order, float rc1f[], float rc2f[])
+{
+    int i;
+
+    for (i = 0;  i < order;  i++)
+    {
+        if (fabsf(rc2f[i]) > 0.99f)
+        {
+            for (i = 0;  i < order;  i++)
+                rc2f[i] = rc1f[i];
+            break;
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lpfilt(float inbuf[], float lpbuf[], int32_t len, int32_t nsamp)
+{
+    int32_t j;
+    float t;
+
+    /* 31 point equiripple FIR LPF */
+    /* Linear phase, delay = 15 samples */
+    /* Passband:  ripple = 0.25 dB, cutoff =  800 Hz */
+    /* Stopband:  atten. =  40. dB, cutoff = 1240 Hz */
+
+    for (j = len - nsamp;  j < len;  j++)
+    {
+        t = (inbuf[j] + inbuf[j - 30]) * -0.0097201988f;
+        t += (inbuf[j - 1] + inbuf[j - 29]) * -0.0105179986f;
+        t += (inbuf[j - 2] + inbuf[j - 28]) * -0.0083479648f;
+        t += (inbuf[j - 3] + inbuf[j - 27]) * 5.860774e-4f;
+        t += (inbuf[j - 4] + inbuf[j - 26]) * 0.0130892089f;
+        t += (inbuf[j - 5] + inbuf[j - 25]) * 0.0217052232f;
+        t += (inbuf[j - 6] + inbuf[j - 24]) * 0.0184161253f;
+        t += (inbuf[j - 7] + inbuf[j - 23]) * 3.39723e-4f;
+        t += (inbuf[j - 8] + inbuf[j - 22]) * -0.0260797087f;
+        t += (inbuf[j - 9] + inbuf[j - 21]) * -0.0455563702f;
+        t += (inbuf[j - 10] + inbuf[j - 20]) * -0.040306855f;
+        t += (inbuf[j - 11] + inbuf[j - 19]) * 5.029835e-4f;
+        t += (inbuf[j - 12] + inbuf[j - 18]) * 0.0729262903f;
+        t += (inbuf[j - 13] + inbuf[j - 17]) * 0.1572008878f;
+        t += (inbuf[j - 14] + inbuf[j - 16]) * 0.2247288674f;
+        t += inbuf[j - 15] * 0.250535965f;
+        lpbuf[j] = t;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 2nd order inverse filter, speech is decimated 4:1 */
+static void ivfilt(float lpbuf[], float ivbuf[], int32_t len, int32_t nsamp, float ivrc[])
+{
+    int32_t i;
+    int32_t j;
+    int32_t k;
+    float r[3];
+    float pc1;
+    float pc2;
+
+    /* Calculate autocorrelations */
+    for (i = 1;  i <= 3;  i++)
+    {
+        r[i - 1] = 0.0f;
+        k = (i - 1) << 2;
+        for (j = (i << 2) + len - nsamp;  j <= len;  j += 2)
+            r[i - 1] += lpbuf[j - 1]*lpbuf[j - k - 1];
+    }
+    /* Calculate predictor coefficients */
+    pc1 = 0.0f;
+    pc2 = 0.0f;
+    ivrc[0] = 0.0f;
+    ivrc[1] = 0.0f;
+    if (r[0] > 1.0e-10f)
+    {
+        ivrc[0] = r[1]/r[0];
+        ivrc[1] = (r[2] - ivrc[0]*r[1])/(r[0] - ivrc[0]*r[1]);
+        pc1 = ivrc[0] - ivrc[0]*ivrc[1];
+        pc2 = ivrc[1];
+    }
+    /* Inverse filter LPBUF into IVBUF */
+    for (i = len - nsamp;  i < len;  i++)
+        ivbuf[i] = lpbuf[i] - pc1*lpbuf[i - 4] - pc2*lpbuf[i - 8];
+}
+/*- End of function --------------------------------------------------------*/
+
+void lpc10_analyse(lpc10_encode_state_t *s, float speech[], int32_t voice[], int32_t *pitch, float *rms, float rc[])
+{
+    static const int32_t tau[60] =
+    {
+        20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 
+        35, 36, 37, 38, 39, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
+        60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 84, 88, 92, 96,
+        100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144,
+        148, 152, 156
+    };
+    static const int32_t buflim[4] =
+    {
+        181, 720, 25, 720
+    };
+    static const float precoef = 0.9375f;
+
+    float amdf[60];
+    float abuf[156];
+    float ivrc[2];
+    float temp;
+    float phi[100]    /* was [10][10] */;
+    float psi[10];
+    int32_t half;
+    int32_t midx;
+    int32_t ewin[3][2];
+    int32_t i;
+    int32_t j;
+    int32_t lanal;
+    int32_t ipitch;
+    int32_t mintau;
+    int32_t minptr;
+    int32_t maxptr;
+
+    /* Calculations are done on future frame due to requirements
+       of the pitch tracker.  Delay RMS and RC's 2 frames to give
+       current frame parameters on return. */
+
+    for (i = 0;  i <= 720 - LPC10_SAMPLES_PER_FRAME - 181;  i++)
+    {
+        s->inbuf[i] = s->inbuf[LPC10_SAMPLES_PER_FRAME + i];
+        s->pebuf[i] = s->pebuf[LPC10_SAMPLES_PER_FRAME + i];
+    }
+    for (i = 0;  i <= 540 - LPC10_SAMPLES_PER_FRAME - 229;  i++)
+        s->ivbuf[i] = s->ivbuf[LPC10_SAMPLES_PER_FRAME + i];
+    for (i = 0;  i <= 720 - LPC10_SAMPLES_PER_FRAME - 25;  i++)
+        s->lpbuf[i] = s->lpbuf[LPC10_SAMPLES_PER_FRAME + i];
+    for (i = 0, j = 0;  i < s->osptr - 1;  i++)
+    {
+        if (s->osbuf[i] > LPC10_SAMPLES_PER_FRAME)
+            s->osbuf[j++] = s->osbuf[i] - LPC10_SAMPLES_PER_FRAME;
+    }
+    s->osptr = j + 1;
+    s->voibuf[0][0] = s->voibuf[1][0];
+    s->voibuf[0][1] = s->voibuf[1][1];
+    for (i = 0;  i < 2;  i++)
+    {
+        s->vwin[i][0] = s->vwin[i + 1][0] - LPC10_SAMPLES_PER_FRAME;
+        s->vwin[i][1] = s->vwin[i + 1][1] - LPC10_SAMPLES_PER_FRAME;
+        s->awin[i][0] = s->awin[i + 1][0] - LPC10_SAMPLES_PER_FRAME;
+        s->awin[i][1] = s->awin[i + 1][1] - LPC10_SAMPLES_PER_FRAME;
+        s->obound[i] = s->obound[i + 1];
+        s->voibuf[i + 1][0] = s->voibuf[i + 2][0];
+        s->voibuf[i + 1][1] = s->voibuf[i + 2][1];
+        s->rmsbuf[i] = s->rmsbuf[i + 1];
+        for (j = 0;  j < LPC10_ORDER;  j++)
+            s->rcbuf[i][j] = s->rcbuf[i + 1][j];
+    }
+    /* If the average value in the frame was over 1/4096 (after current
+       BIAS correction), then subtract that much more from samples in the
+       next frame.  If the average value in the frame was under
+       -1/4096, add 1/4096 more to samples in next frame.  In all other
+       cases, keep BIAS the same. */
+    temp = 0.0f;
+    for (i = 0;  i < LPC10_SAMPLES_PER_FRAME;  i++)
+    {
+        s->inbuf[720 - 2*LPC10_SAMPLES_PER_FRAME + i] = speech[i]*4096.0f - s->bias;
+        temp += s->inbuf[720 - 2*LPC10_SAMPLES_PER_FRAME + i];
+    }
+    if (temp > (float) LPC10_SAMPLES_PER_FRAME)
+        s->bias++;
+    else if (temp < (float) (-LPC10_SAMPLES_PER_FRAME))
+        s->bias--;
+    /* Place voicing window */
+    i = 721 - LPC10_SAMPLES_PER_FRAME;
+    s->zpre = preemp(&s->inbuf[i - 181], &s->pebuf[i - 181], LPC10_SAMPLES_PER_FRAME, precoef, s->zpre);
+    onset(s, s->pebuf, s->osbuf, &s->osptr, 10, 181, 720, LPC10_SAMPLES_PER_FRAME);
+
+    lpc10_placev(s->osbuf, &s->osptr, 10, &s->obound[2], s->vwin, 3, LPC10_SAMPLES_PER_FRAME, 90, 156, 307, 462);
+    /* The Pitch Extraction algorithm estimates the pitch for a frame
+       of speech by locating the minimum of the average magnitude difference
+       function (AMDF).  The AMDF operates on low-pass, inverse filtered
+       speech.  (The low-pass filter is an 800 Hz, 19 tap, equiripple, FIR
+       filter and the inverse filter is a 2nd-order LPC filter.)  The pitch
+       estimate is later refined by dynamic tracking.  However, since some
+       of the tracking parameters are a function of the voicing decisions,
+       a voicing decision must precede the final pitch estimation. */
+    /* See subroutines LPFILT, IVFILT, and eval_highres_amdf. */
+    /* LPFILT reads indices LBUFH-LFRAME-29 = 511 through LBUFH = 720
+       of INBUF, and writes indices LBUFH+1-LFRAME = 541 through LBUFH
+       = 720 of LPBUF. */
+    lpfilt(&s->inbuf[228], &s->lpbuf[384], 312, LPC10_SAMPLES_PER_FRAME);
+    /* IVFILT reads indices (PWINH-LFRAME-7) = 353 through PWINH = 540
+       of LPBUF, and writes indices (PWINH-LFRAME+1) = 361 through
+       PWINH = 540 of IVBUF. */
+    ivfilt(&s->lpbuf[204], s->ivbuf, 312, LPC10_SAMPLES_PER_FRAME, ivrc);
+    /* eval_highres_amdf reads indices PWINL = 229 through
+       (PWINL-1)+MAXWIN+(TAU(LTAU)-TAU(1))/2 = 452 of IVBUF, and writes
+       indices 1 through LTAU = 60 of AMDF. */
+    eval_highres_amdf(s->ivbuf, 156, tau, 60, amdf, &minptr, &maxptr, &mintau);
+    /* Voicing decisions are made for each half frame of input speech.
+       An initial voicing classification is made for each half of the
+       analysis frame, and the voicing decisions for the present frame
+       are finalized.  See subroutine VOICIN. */
+    /*        The voicing detector (VOICIN) classifies the input signal as
+       unvoiced (including silence) or voiced using the AMDF windowed
+       maximum-to-minimum ratio, the zero crossing rate, energy measures,
+       reflection coefficients, and prediction gains. */
+    /*        The pitch and voicing rules apply smoothing and isolated
+       corrections to the pitch and voicing estimates and, in the process,
+       introduce two frames of delay into the corrected pitch estimates and
+       voicing decisions. */
+    for (half = 0;  half < 2;  half++)
+    {
+        lpc10_voicing(s,
+                      &s->vwin[2][0],
+                      s->inbuf,
+                      s->lpbuf,
+                      buflim,
+                      half,
+                      &amdf[minptr],
+                      &amdf[maxptr],
+                      &mintau,
+                      ivrc,
+                      s->obound);
+    }
+    /* Find the minimum cost pitch decision over several frames,
+       given the current voicing decision and the AMDF array */
+    minptr++;
+    dynamic_pitch_tracking(s, amdf, 60, &minptr, s->voibuf[3][1], pitch, &midx);
+    ipitch = tau[midx - 1];
+    /* Place spectrum analysis and energy windows */
+    lpc10_placea(&ipitch, s->voibuf, &s->obound[2], 3, s->vwin, s->awin, ewin, LPC10_SAMPLES_PER_FRAME, 156);
+    /* Remove short term DC bias over the analysis window. */
+    lanal = s->awin[2][1] + 1 - s->awin[2][0];
+    remove_dc_bias(&s->pebuf[s->awin[2][0] - 181], lanal, abuf);
+    /* Compute RMS over integer number of pitch periods within the analysis window. */
+    /* Note that in a hardware implementation this computation may be
+       simplified by using diagonal elements of phi computed by mload(). */
+    s->rmsbuf[2] = energyf(&abuf[ewin[2][0] - s->awin[2][0]], ewin[2][1] - ewin[2][0] + 1);
+    /* Matrix load and invert, check RC's for stability */
+    mload(LPC10_ORDER, 1, lanal, abuf, phi, psi);
+    invert(LPC10_ORDER, phi, psi, &s->rcbuf[2][0]);
+    rcchk(LPC10_ORDER, &s->rcbuf[1][0], &s->rcbuf[2][0]);
+    /* Set return parameters */
+    voice[0] = s->voibuf[1][0];
+    voice[1] = s->voibuf[1][1];
+    *rms = s->rmsbuf[0];
+    for (i = 0;  i < LPC10_ORDER;  i++)
+        rc[i] = s->rcbuf[0][i];
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/lpc10_decode.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1102 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * lpc10_decode.c - LPC10 low bit rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the U.S. Department of Defense reference
+ * implementation of the LPC-10 2400 bps Voice Coder. They do not
+ * exert copyright claims on their code, and it may be freely used.
+ *
+ * $Id: lpc10_decode.c,v 1.14 2006/11/30 15:41:47 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <memory.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/lpc10.h"
+
+#define LPC10_ORDER     10
+
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+
+/* Pseudo random number generator based on Knuth, Vol 2, p. 27. */
+/* lpc10_random - int32_t variable, uniformly distributed over -32768 to 32767 */
+static int32_t lpc10_random(lpc10_decode_state_t *s)
+{
+    int32_t ret_val;
+
+    /* The following is a 16 bit 2's complement addition,
+       with overflow checking disabled */
+    s->y[s->k] += s->y[s->j];
+    ret_val = s->y[s->k];
+    if (--s->k < 0)
+        s->k = 4;
+    if (--s->j < 0)
+        s->j = 4;
+    return ret_val;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int32_t pow_ii(int32_t x, int32_t n)
+{
+    int32_t pow;
+    uint32_t u;
+
+    if (n <= 0)
+    {
+        if (n == 0  ||  x == 1)
+            return 1;
+        if (x != -1)
+            return (x == 0)  ?  1/x  :  0;
+        n = -n;
+    }
+    u = n;
+    for (pow = 1;  ;  )
+    {
+        if ((u & 1))
+            pow *= x;
+        if ((u >>= 1) == 0)
+            break;
+        x *= x;
+    }
+    return pow;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Synthesize one pitch epoch */
+static void bsynz(lpc10_decode_state_t *s,
+                  float coef[],
+                  int32_t ip,
+                  int32_t *iv,
+                  float sout[],
+                  float rms,
+                  float ratio,
+                  float g2pass)
+{
+    static const int32_t kexc[25] =
+    {
+          8,  -16,   26, -48,  86, -162, 294, -502, 718, -728, 184, 
+        672, -610, -672, 184, 728,  718, 502,  294, 162,   86,  48, 26, 16, 8
+    };
+    int32_t i;
+    int32_t j;
+    int32_t k;
+    int32_t px;
+    float noise[166];
+    float pulse;
+    float r1;
+    float gain;
+    float xssq;
+    float sscale;
+    float xy;
+    float sum;
+    float ssq;
+    float lpi0;
+    float hpi0;
+
+    /* MAXPIT + MAXORD = 166 */
+    /* Calculate history scale factor XY and scale filter state */
+    /* Computing MIN */
+    r1 = s->rmso_bsynz/(rms + 1.0e-6f);
+    xy = min(r1, 8.0f);
+    s->rmso_bsynz = rms;
+    for (i = 0;  i < LPC10_ORDER;  i++)
+        s->exc2[i] = s->exc2[s->ipo + i]*xy;
+    s->ipo = ip;
+    if (*iv == 0)
+    {
+        /* Generate white noise for unvoiced */
+        for (i = 0;  i < ip;  i++)
+            s->exc[LPC10_ORDER + i] = (float) (lpc10_random(s)/64);
+        /* Impulse double excitation for plosives */
+        px = (lpc10_random(s) + 32768)*(ip - 1)/65536 + LPC10_ORDER + 1;
+        r1 = ratio/4.0f;
+        pulse = r1*342;
+        if (pulse > 2.0e3f)
+            pulse = 2.0e3f;
+        s->exc[px - 1] += pulse;
+        s->exc[px] -= pulse;
+    }
+    else
+    {
+        sscale = sqrtf((float) ip)/6.928f;
+        for (i = 0;  i < ip;  i++)
+        {
+            s->exc[LPC10_ORDER + i] = 0.0f;
+            if (i < 25)
+                s->exc[LPC10_ORDER + i] = sscale*kexc[i];
+            lpi0 = s->exc[LPC10_ORDER + i];
+            s->exc[LPC10_ORDER + i] = s->exc[LPC10_ORDER + i]*0.125f + s->lpi[0]*0.75f + s->lpi[1]*0.125f;
+            s->lpi[1] = s->lpi[0];
+            s->lpi[0] = lpi0;
+        }
+        for (i = 0;  i < ip;  i++)
+        {
+            noise[LPC10_ORDER + i] = lpc10_random(s)/64.0f;
+            hpi0 = noise[LPC10_ORDER + i];
+            noise[LPC10_ORDER + i] = noise[LPC10_ORDER + i]*-0.125f + s->hpi[0]*0.25f + s->hpi[1]*-0.125f;
+            s->hpi[1] = s->hpi[0];
+            s->hpi[0] = hpi0;
+        }
+        for (i = 0;  i < ip;  i++)
+            s->exc[LPC10_ORDER + i] += noise[LPC10_ORDER + i];
+    }
+    /* Synthesis filters: */
+    /* Modify the excitation with all-zero filter 1 + G*SUM */
+    xssq = 0.0f;
+    for (i = 0;  i < ip;  i++)
+    {
+        k = LPC10_ORDER + i;
+        sum = 0.0f;
+        for (j = 0;  j < LPC10_ORDER;  j++)
+            sum += coef[j]*s->exc[k - j - 1];
+        sum *= g2pass;
+        s->exc2[k] = sum + s->exc[k];
+    }
+    /* Synthesize using the all pole filter 1/(1 - SUM) */
+    for (i = 0;  i < ip;  i++)
+    {
+        k = LPC10_ORDER + i;
+        sum = 0.0f;
+        for (j = 0;  j < LPC10_ORDER;  j++)
+            sum += coef[j]*s->exc2[k - j - 1];
+        s->exc2[k] = sum + s->exc2[k];
+        xssq += s->exc2[k]*s->exc2[k];
+    }
+    /* Save filter history for next epoch */
+    for (i = 0;  i < LPC10_ORDER;  i++)
+    {
+        s->exc[i] = s->exc[ip + i];
+        s->exc2[i] = s->exc2[ip + i];
+    }
+    /* Apply gain to match RMS */
+    ssq = rms*rms*ip;
+    gain = sqrtf(ssq/xssq);
+    for (i = 0;  i < ip;  i++)
+        sout[i] = gain*s->exc2[LPC10_ORDER + i];
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Synthesize a single pitch epoch */
+static int pitsyn(lpc10_decode_state_t *s,
+                  int voice[], 
+                  int32_t *pitch,
+                  float *rms,
+                  float *rc,
+                  int32_t ivuv[], 
+                  int32_t ipiti[],
+                  float *rmsi,
+                  float *rci,
+                  int32_t *nout,
+                  float *ratio)
+{
+    int32_t rci_dim1;
+    int32_t rci_offset;
+    int32_t i1;
+    int32_t i;
+    int32_t j;
+    int32_t vflag;
+    int32_t jused;
+    int32_t lsamp;
+    int32_t ip;
+    int32_t nl;
+    int32_t ivoice;
+    int32_t istart;
+    float r1;
+    float alrn;
+    float alro;
+    float yarc[10];
+    float prop;
+    float slope;
+    float uvpit;
+    float xxy;
+
+    rci_dim1 = LPC10_ORDER;
+    rci_offset = rci_dim1 + 1;
+    rci -= rci_offset;
+
+    if (*rms < 1.0f)
+        *rms = 1.0f;
+    if (s->rmso < 1.0f)
+        s->rmso = 1.0f;
+    uvpit = 0.0f;
+    *ratio = *rms/(s->rmso + 8.0f);
+    if (s->first_pitsyn)
+    {
+        lsamp = 0;
+        ivoice = voice[1];
+        if (ivoice == 0)
+            *pitch = LPC10_SAMPLES_PER_FRAME/4;
+        *nout = LPC10_SAMPLES_PER_FRAME / *pitch;
+        s->jsamp = LPC10_SAMPLES_PER_FRAME - *nout * *pitch;
+
+        i1 = *nout;
+        for (i = 0;  i < i1;  i++)
+        {
+            for (j = 0;  j < LPC10_ORDER;  j++)
+                rci[j + (i + 1)*rci_dim1 + 1] = rc[j];
+            ivuv[i] = ivoice;
+            ipiti[i] = *pitch;
+            rmsi[i] = *rms;
+        }
+        s->first_pitsyn = FALSE;
+    }
+    else
+    {
+        vflag = 0;
+        lsamp = LPC10_SAMPLES_PER_FRAME + s->jsamp;
+        slope = (*pitch - s->ipito)/(float) lsamp;
+        *nout = 0;
+        jused = 0;
+        istart = 1;
+        if (voice[0] == s->ivoico  &&  voice[1] == voice[0])
+        {
+            if (voice[1] == 0)
+            {
+                /* SSUV - -   0  ,  0  ,  0 */
+                *pitch = LPC10_SAMPLES_PER_FRAME/4;
+                s->ipito = *pitch;
+                if (*ratio > 8.0f)
+                    s->rmso = *rms;
+            }
+            /* SSVC - -   1  ,  1  ,  1 */
+            slope = (*pitch - s->ipito)/(float) lsamp;
+            ivoice = voice[1];
+        }
+        else
+        {
+            if (s->ivoico != 1)
+            {
+                if (s->ivoico == voice[0])
+                {
+                    /* UV2VC2 - -  0  ,  0  ,  1 */
+                    nl = lsamp - LPC10_SAMPLES_PER_FRAME/4;
+                }
+                else
+                {
+                    /* UV2VC1 - -  0  ,  1  ,  1 */
+                    nl = lsamp - LPC10_SAMPLES_PER_FRAME*3/4;
+                }
+                ipiti[0] = nl/2;
+                ipiti[1] = nl - ipiti[0];
+                ivuv[0] = 0;
+                ivuv[1] = 0;
+                rmsi[0] = s->rmso;
+                rmsi[1] = s->rmso;
+                for (i = 0;  i < LPC10_ORDER;  i++)
+                {
+                    rci[i + rci_dim1 + 1] = s->rco[i];
+                    rci[i + (rci_dim1 << 1) + 1] = s->rco[i];
+                    s->rco[i] = rc[i];
+                }
+                slope = 0.0f;
+                *nout = 2;
+                s->ipito = *pitch;
+                jused = nl;
+                istart = nl + 1;
+                ivoice = 1;
+            }
+            else
+            {
+                if (s->ivoico != voice[0])
+                {
+                    /* VC2UV1 - -   1  ,  0  ,  0 */
+                    lsamp = LPC10_SAMPLES_PER_FRAME/4 + s->jsamp;
+                }
+                else
+                {
+                    /* VC2UV2 - -   1  ,  1  ,  0 */
+                    lsamp = LPC10_SAMPLES_PER_FRAME*3/4 + s->jsamp;
+                }
+                for (i = 0;  i < LPC10_ORDER;  i++)
+                {
+                    yarc[i] = rc[i];
+                    rc[i] = s->rco[i];
+                }
+                ivoice = 1;
+                slope = 0.0f;
+                vflag = 1;
+            }
+        }
+        /* Here is the value of most variables that are used below, depending on */
+        /* the values of IVOICO, VOICE(1), and VOICE(2).  VOICE(1) and VOICE(2) */
+        /* are input arguments, and IVOICO is the value of VOICE(2) on the */
+        /* previous call (see notes for the IF (NOUT .NE. 0) statement near the */
+        /* end).  Each of these three values is either 0 or 1.  These three */
+        /* values below are given as 3-bit long strings, in the order IVOICO, */
+        /* VOICE(1), and VOICE(2).  It appears that the code above assumes that */
+        /* the bit sequences 010 and 101 never occur, but I wonder whether a */
+        /* large enough number of bit errors in the channel could cause such a */
+        /* thing to happen, and if so, could that cause NOUT to ever go over 11? */
+
+        /* Note that all of the 180 values in the table are floatly LFRAME, but */
+        /* 180 has fewer characters, and it makes the table a little more */
+        /* concrete.  If LFRAME is ever changed, keep this in mind.  Similarly, */
+        /* 135's are 3*LFRAME/4, and 45's are LFRAME/4.  If LFRAME is not a */
+        /* multiple of 4, then the 135 for NL-JSAMP is actually LFRAME-LFRAME/4, */
+        /* and the 45 for NL-JSAMP is actually LFRAME-3*LFRAME/4. */
+
+        /* Note that LSAMP-JSAMP is given as the variable.  This was just for */
+        /* brevity, to avoid adding "+JSAMP" to all of the column entries. */
+        /* Similarly for NL-JSAMP. */
+
+        /* Variable    | 000  001    011,010  111       110       100,101 */
+        /* ------------+-------------------------------------------------- */
+        /* ISTART      | 1    NL+1   NL+1     1         1         1 */
+        /* LSAMP-JSAMP | 180  180    180      180       135       45 */
+        /* IPITO       | 45   PITCH  PITCH    oldPITCH  oldPITCH  oldPITCH */
+        /* SLOPE       | 0    0      0        seebelow  0         0 */
+        /* JUSED       | 0    NL     NL       0         0         0 */
+        /* PITCH       | 45   PITCH  PITCH    PITCH     PITCH     PITCH */
+        /* NL-JSAMP    | --   135    45       --        --        -- */
+        /* VFLAG       | 0    0      0        0         1         1 */
+        /* NOUT        | 0    2      2        0         0         0 */
+        /* IVOICE      | 0    1      1        1         1         1 */
+
+        /* while_loop  | once once   once     once      twice     twice */
+
+        /* ISTART      | --   --     --       --        JUSED+1   JUSED+1 */
+        /* LSAMP-JSAMP | --   --     --       --        180       180 */
+        /* IPITO       | --   --     --       --        oldPITCH  oldPITCH */
+        /* SLOPE       | --   --     --       --        0         0 */
+        /* JUSED       | --   --     --       --        ??        ?? */
+        /* PITCH       | --   --     --       --        PITCH     PITCH */
+        /* NL-JSAMP    | --   --     --       --        --        -- */
+        /* VFLAG       | --   --     --       --        0         0 */
+        /* NOUT        | --   --     --       --        ??        ?? */
+        /* IVOICE      | --   --     --       --        0         0 */
+
+        /* UVPIT is always 0.0 on the first pass through the DO WHILE (TRUE)
+           loop below. */
+
+        /* The only possible non-0 value of SLOPE (in column 111) is
+           (PITCH-IPITO)/FLOAT(LSAMP) */
+
+        /* Column 101 is identical to 100.  Any good properties we can prove
+           for 100 will also hold for 101.  Similarly for 010 and 011. */
+
+        /* synths() calls this subroutine with PITCH restricted to the range 20 to
+           156.  IPITO is similarly restricted to this range, after the first
+           call.  IP below is also restricted to this range, given the
+           definitions of IPITO, SLOPE, UVPIT, and that I is in the range ISTART
+           to LSAMP. */
+
+        for (;;)
+        {
+            for (i = istart;  i <= lsamp;  i++)
+            {
+                r1 = s->ipito + slope*i;
+                ip = r1 + 0.5f;
+                if (uvpit != 0.0f)
+                    ip = uvpit;
+                if (ip <= i - jused)
+                {
+                    ++(*nout);
+                    ipiti[*nout - 1] = ip;
+                    *pitch = ip;
+                    ivuv[*nout - 1] = ivoice;
+                    jused += ip;
+                    prop = (jused - ip/2)/(float) lsamp;
+                    for (j = 0;  j < LPC10_ORDER;  j++)
+                    {
+                        alro = log((s->rco[j] + 1)/(1 - s->rco[j]));
+                        alrn = log((rc[j] + 1)/(1 - rc[j]));
+                        xxy = alro + prop*(alrn - alro);
+                        xxy = expf(xxy);
+                        rci[j + *nout*rci_dim1 + 1] = (xxy - 1.0f)/(xxy + 1.0f);
+                    }
+                    rmsi[*nout - 1] = logf(s->rmso) + prop*(logf(*rms) - logf(s->rmso));
+                    rmsi[*nout - 1] = expf(rmsi[*nout - 1]);
+                }
+            }
+            if (vflag != 1)
+                break;
+
+            vflag = 0;
+            istart = jused + 1;
+            lsamp = LPC10_SAMPLES_PER_FRAME + s->jsamp;
+            slope = 0.0f;
+            ivoice = 0;
+            uvpit = (float) ((lsamp - istart)/2);
+            if (uvpit > 90.0f)
+                uvpit /= 2;
+            s->rmso = *rms;
+            for (i = 0;  i < LPC10_ORDER;  i++)
+            {
+                rc[i] = yarc[i];
+                s->rco[i] = yarc[i];
+            }
+        }
+        s->jsamp = lsamp - jused;
+    }
+    if (*nout != 0)
+    {
+        s->ivoico = voice[1];
+        s->ipito = *pitch;
+        s->rmso = *rms;
+        for (i = 0;  i < LPC10_ORDER;  i++)
+            s->rco[i] = rc[i];
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void deemp(lpc10_decode_state_t *s, float x[], int len)
+{
+    int i;
+    float r1;
+    float dei0;
+
+    for (i = 0;  i < len;  i++)
+    {
+        dei0 = x[i];
+        r1 = x[i] - s->dei[0]*1.9998f + s->dei[1];
+        x[i] = r1 + s->deo[0]*2.5f - s->deo[1]*2.0925f + s->deo[2]*0.585f;
+        s->dei[1] = s->dei[0];
+        s->dei[0] = dei0;
+        s->deo[2] = s->deo[1];
+        s->deo[1] = s->deo[0];
+        s->deo[0] = x[i];
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Convert reflection coefficients to predictor coefficients */
+static float reflection_coeffs_to_predictor_coeffs(float rc[], float pc[], float gprime)
+{
+    float temp[10];
+    float g2pass;
+    int i;
+    int j;
+
+    g2pass = 1.0f;
+    for (i = 0;  i < LPC10_ORDER;  i++)
+        g2pass *= 1.0f - rc[i]*rc[i];
+    g2pass = gprime*sqrtf(g2pass);
+    pc[0] = rc[0];
+    for (i = 1;  i < LPC10_ORDER;  i++)
+    {
+        for (j = 0;  j < i;  j++)
+            temp[j] = pc[j] - rc[i]*pc[i - j - 1];
+        for (j = 0;  j < i;  j++)
+            pc[j] = temp[j];
+        pc[i] = rc[i];
+    }
+    return g2pass;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int synths(lpc10_decode_state_t *s,
+                  int voice[],
+                  int32_t *pitch,
+                  float *rms,
+                  float *rc,
+                  float speech[])
+{
+    int32_t i1;
+    int32_t ivuv[16];
+    int32_t ipiti[16];
+    int32_t nout;
+    int32_t i;
+    int32_t j;
+    float rmsi[16];
+    float ratio;
+    float g2pass;
+    float pc[10];
+    float rci[160];
+
+    i1 = min(*pitch, 156);
+    *pitch = max(i1, 20);
+    for (i = 0;  i < LPC10_ORDER;  i++)
+        rc[i] = max(min(rc[i], 0.99f), -0.99f);
+    pitsyn(s, voice, pitch, rms, rc, ivuv, ipiti, rmsi, rci, &nout, &ratio);
+    if (nout > 0)
+    {
+        for (j = 0;  j < nout;  j++)
+        {
+            /* Add synthesized speech for pitch period J to the end of s->buf. */
+            g2pass = reflection_coeffs_to_predictor_coeffs(&rci[j*10], pc, 0.7f);
+            bsynz(s, pc, ipiti[j], &ivuv[j], &s->buf[s->buflen], rmsi[j], ratio, g2pass);
+            deemp(s, &s->buf[s->buflen], ipiti[j]);
+            s->buflen += ipiti[j];
+        }
+        /* Copy first MAXFRM samples from BUF to output array speech (scaling them),
+           and then remove them from the beginning of s->buf. */
+
+        for (i = 0;  i < LPC10_SAMPLES_PER_FRAME;  i++)
+            speech[i] = s->buf[i]/4096.0f;
+        s->buflen -= LPC10_SAMPLES_PER_FRAME;
+        for (i = 0;  i < s->buflen;  i++)
+            s->buf[i] = s->buf[i + LPC10_SAMPLES_PER_FRAME];
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lpc10_unpack(lpc10_frame_t *t, const uint8_t ibits[])
+{
+    static const int bit[10] =
+    {
+        2, 4, 8, 8, 8, 8, 16, 16, 16, 16
+    };
+    static const int iblist[53] =
+    {
+        13, 12, 11,  1,  2, 13, 12, 11,  1,  2,
+        13, 10, 11,  2,  1, 10, 13, 12, 11, 10,
+         2, 13, 12, 11, 10,  2,  1, 12,  7,  6,
+         1, 10,  9,  8,  7,  4,  6,  9,  8,  7,
+         5,  1,  9,  8,  4,  6,  1,  5,  9,  8,
+         7,  5,  6
+    };
+    int32_t itab[13];
+    int x;
+    int i;
+
+    /* ibits is 54 bits of LPC data ordered as follows: */
+    /*     R1-0, R2-0, R3-0,  P-0,  A-0, */
+    /*     R1-1, R2-1, R3-1,  P-1,  A-1, */
+    /*     R1-2, R4-0, R3-2,  A-2,  P-2, R4-1, */
+    /*     R1-3, R2-2, R3-3, R4-2,  A-3, */
+    /*     R1-4, R2-3, R3-4, R4-3,  A-4, */
+    /*      P-3, R2-4, R7-0, R8-0,  P-4, R4-4, */
+    /*     R5-0, R6-0, R7-1,R10-0, R8-1, */
+    /*     R5-1, R6-1, R7-2, R9-0,  P-5, */
+    /*     R5-2, R6-2,R10-1, R8-2,  P-6, R9-1, */
+    /*     R5-3, R6-3, R7-3, R9-2, R8-3, SYNC */
+
+    /* Reconstruct ITAB */
+    for (i = 0;  i < 13;  i++)
+        itab[i] = 0;
+    for (i = 0;  i < 53;  i++)
+    {
+        x = 52 - i;
+        x = (ibits[x >> 3] >> (7 - (x & 7))) & 1;
+        itab[iblist[52 - i] - 1] = (itab[iblist[52 - i] - 1] << 1) | x;
+    }
+    /* Sign extend the RC's */
+    for (i = 0;  i < LPC10_ORDER;  i++)
+    {
+        if ((itab[i + 3] & bit[i]))
+            itab[i + 3] -= (bit[i] << 1);
+    }
+    /* Restore variables */
+    t->ipitch = itab[0];
+    t->irms = itab[1];
+    for (i = 0;  i < LPC10_ORDER;  i++)
+        t->irc[i] = itab[LPC10_ORDER - 1 - i + 3];
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Hamming 8, 4 decoder - can correct 1 out of seven bits
+   and can detect up to two errors. */
+
+/* This subroutine is entered with an eight bit word in INPUT.  The 8th */
+/* bit is parity and is stripped off.  The remaining 7 bits address the */
+/* hamming 8, 4 table and the output OUTPUT from the table gives the 4 */
+/* bits of corrected data.  If bit 4 is set,  no error was detected. */
+/* ERRCNT is the number of errors counted. */
+
+static int32_t hamming_84_decode(int32_t input, int *errcnt)
+{
+    static const uint8_t dactab[128] =
+    {
+        16,  0,  0,  3,  0,  5, 14,  7,  0,  9, 14, 11, 14, 13, 30, 14,
+         0,  9,  2,  7,  4,  7,  7, 23,  9, 25, 10,  9, 12,  9, 14,  7,
+         0,  5,  2, 11,  5, 21,  6,  5,  8, 11, 11, 27, 12,  5, 14, 11,
+         2,  1, 18,  2, 12,  5,  2,  7, 12,  9,  2, 11, 28, 12, 12, 15,
+         0,  3,  3, 19,  4, 13,  6,  3,  8, 13, 10,  3, 13, 29, 14, 13,
+         4,  1, 10,  3, 20,  4,  4,  7, 10,  9, 26, 10,  4, 13, 10, 15,
+         8,  1,  6,  3,  6,  5, 22,  6, 24,  8,  8, 11,  8, 13,  6, 15,
+         1, 17 , 2,  1,  4,  1,  6, 15,  8,  1, 10, 15, 12, 15, 15, 31
+    };
+    int i;
+    int parity;
+    int32_t output;
+
+    parity = input & 255;
+    parity ^= parity >> 4;
+    parity ^= parity >> 2;
+    parity ^= parity >> 1;
+    parity &= 1;
+    i = dactab[input & 127];
+    output = i & 15;
+    if ((i & 16))
+    {
+        /* No errors detected in seven bits */
+        if (parity)
+            (*errcnt)++;
+    }
+    else
+    {
+        /* One or two errors detected */
+        (*errcnt)++;
+        if (parity == 0)
+        {
+            /* Two errors detected */
+            (*errcnt)++;
+            output = -1;
+        }
+    }
+    return output;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int32_t median(int32_t d1, int32_t d2, int32_t d3)
+{
+    int32_t ret_val;
+
+    ret_val = d2;
+    if (d2 > d1  &&  d2 > d3)
+    {
+        ret_val = d1;
+        if (d3 > d1)
+            ret_val = d3;
+    }
+    else if (d2 < d1  &&  d2 < d3)
+    {
+        ret_val = d1;
+        if (d3 < d1)
+            ret_val = d3;
+    }
+    return ret_val;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void decode(lpc10_decode_state_t *s,
+                   lpc10_frame_t *t,
+                   int voice[],
+                   int32_t *pitch,
+                   float *rms,
+                   float rc[])
+{
+    static const int32_t ivtab[32] =
+    {
+        24960, 24960, 24960, 24960, 25480, 25480, 25483, 25480,
+        16640,  1560,  1560,  1560, 16640,  1816,  1563,  1560,
+        24960, 24960, 24859, 24856, 26001, 25881, 25915, 25913,
+         1560,  1560,  7800,  3640,  1561,  1561,  3643,  3641
+    };
+    static const float corth[32] =
+    {
+        32767.0f, 10.0f, 5.0f, 0.0f, 32767.0f,  8.0f, 4.0f, 0.0f,
+           32.0f,  6.4f, 3.2f, 0.0f,    32.0f,  6.4f, 3.2f, 0.0f,
+           32.0f, 11.2f, 6.4f, 0.0f,    32.0f, 11.2f, 6.4f, 0.0f,
+           16.0f,  5.6f, 3.2f, 0.0f,    16.0f,  5.6f, 3.2f, 0.0f
+    };
+    static const int32_t detau[128] =
+    {
+          0,   0,   0,   3,   0,   3,   3,  31,
+          0,   3,   3,  21,   3,   3,  29,  30,
+          0,   3,   3,  20,   3,  25,  27,  26,
+          3,  23,  58,  22,   3,  24,  28,   3,
+          0,   3,   3,   3,   3,  39,  33,  32,
+          3,  37,  35,  36,   3,  38,  34,   3,
+          3,  42,  46,  44,  50,  40,  48,   3,
+         54,   3,  56,   3,  52,   3,   3,   1,
+          0,   3,   3, 108,   3,  78, 100, 104,
+          3,  84,  92,  88, 156,  80,  96,   3,
+          3,  74,  70,  72,  66,  76,  68,   3,
+         62,   3,  60,   3,  64,   3,   3,   1,
+          3, 116, 132, 112, 148, 152,   3,   3,
+        140,   3, 136,   3, 144,   3,   3,   1,
+        124, 120, 128,   3,   3,   3,   3,   1,
+          3,   3,   3,   1,   3,   1,   1,   1
+    };
+    static const int32_t rmst[64] =
+    {
+        1024,  936,  856,  784,  718,  656,  600,  550,
+         502,  460,  420,  384,  352,  328,  294,  270,
+         246,  226,  206,  188,  172,  158,  144,  132,
+         120,  110,  102,   92,   84,   78,   70,   64,
+          60,   54,   50,   46,   42,   38,   34,   32,
+          30,   26,   24,   22,   20,   18,   17,   16,
+          15,   14,   13,   12,   11,   10,    9,    8,
+           7,    6,    5,    4,    3,    2,    1,    0
+    };
+    static const int32_t detab7[32] =
+    {
+          4,  11,  18,  25,  32,  39,  46,  53,
+         60,  66,  72,  77,  82,  87,  92,  96,
+        101, 104, 108, 111, 114, 115, 117, 119,
+        121, 122, 123, 124, 125, 126, 127, 127
+    };
+    static const float descl[8] =
+    {
+        0.6953f, 0.625f, 0.5781f, 0.5469f, 0.5312f, 0.5391f, 0.4688f, 0.3828f
+    };
+    static const int32_t deadd[8] =
+    {
+        1152, -2816, -1536, -3584, -1280, -2432, 768, -1920
+    };
+    static const int32_t qb[8] =
+    {
+        511, 511, 1023, 1023, 1023, 1023, 2047, 4095
+    };
+    static const int32_t nbit[10] =
+    {
+        8, 8, 5, 5, 4, 4, 4, 4, 3, 2
+    };
+    static const int32_t zrc[10] =
+    {
+        0, 0, 0, 0, 0, 3, 0, 2, 0, 0
+    };
+    static const int32_t bit[5] =
+    {
+        2, 4, 8, 16, 32
+    };
+    int32_t ipit;
+    int32_t iout;
+    int32_t i;
+    int32_t icorf;
+    int32_t index;
+    int32_t ivoic;
+    int32_t ixcor;
+    int32_t i1;
+    int32_t i2;
+    int32_t i4;
+    int32_t ishift;
+    int32_t lsb;
+    int errcnt;
+
+    /* If no error correction, do pitch and voicing then jump to decode */
+    i4 = detau[t->ipitch];
+    if (!s->error_correction)
+    {
+        voice[0] = 1;
+        voice[1] = 1;
+        if (t->ipitch <= 1)
+            voice[0] = 0;
+        if (t->ipitch == 0  ||  t->ipitch == 2)
+            voice[1] = 0;
+        if (i4 <= 4)
+            i4 = s->iptold;
+        *pitch = i4;
+        if (voice[0] == 1  &&  voice[1] == 1)
+            s->iptold = *pitch;
+        if (voice[0] != voice[1])
+            *pitch = s->iptold;
+    }
+    else
+    {
+        /* Do error correction pitch and voicing */
+        if (i4 > 4)
+        {
+            s->dpit[0] = i4;
+            ivoic = 2;
+            s->iavgp = (s->iavgp*15 + i4 + 8)/16;
+        }
+        else
+        {
+            s->dpit[0] = s->iavgp;
+            ivoic = i4;
+        }
+        s->drms[0] = t->irms;
+        for (i = 0;  i < LPC10_ORDER;  i++)
+            s->drc[i][0] = t->irc[i];
+        /* Determine index to IVTAB from V/UV decision */
+        /* If error rate is high then use alternate table */
+        index = (s->ivp2h << 4) + (s->iovoic << 2) + ivoic + 1;
+        i1 = ivtab[index - 1];
+        ipit = i1 & 3;
+        icorf = i1 >> 3;
+        if (s->erate < 2048)
+            icorf /= 64;
+        /* Determine error rate:  4=high    1=low */
+        ixcor = 4;
+        if (s->erate < 2048)
+            ixcor = 3;
+        if (s->erate < 1024)
+            ixcor = 2;
+        if (s->erate < 128)
+            ixcor = 1;
+        /* Voice/unvoice decision determined from bits 0 and 1 of IVTAB */
+        voice[0] = icorf/2 & 1;
+        voice[1] = icorf & 1;
+        /* Skip decoding on first frame because present data not yet available */
+        if (s->first)
+        {
+            s->first = FALSE;
+            /* Assign PITCH a "default" value on the first call, since */
+            /* otherwise it would be left uninitialized.  The two lines */
+            /* below were copied from above, since it seemed like a */
+            /* reasonable thing to do for the first call. */
+            if (i4 <= 4)
+                i4 = s->iptold;
+            *pitch = i4;
+        }
+        else
+        {
+            /* If bit 4 of ICORF is set then correct RMS and RC(1) - RC(4). */
+            /* Determine error rate and correct errors using a Hamming 8,4 code */
+            /* during transition of unvoiced frames.  If IOUT is negative, */
+            /* more than 1 error occurred, use previous frame's parameters. */
+            if ((icorf & bit[3]) != 0)
+            {
+                errcnt = 0;
+                lsb = s->drms[1] & 1;
+                index = (s->drc[7][1] << 4) + s->drms[1]/2;
+                iout = hamming_84_decode(index, &errcnt);
+                s->drms[1] = s->drms[2];
+                if (iout >= 0)
+                    s->drms[1] = (iout << 1) + lsb;
+                for (i = 1;  i <= 4;  i++)
+                {
+                    if (i == 1)
+                        i1 = ((s->drc[8][1] & 7) << 1) + (s->drc[9][1] & 1);
+                    else
+                        i1 = s->drc[8 - i][1] & 15;
+                    i2 = s->drc[4 - i][1] & 31;
+                    lsb = i2 & 1;
+                    index = (i1 << 4) + (i2 >> 1);
+                    iout = hamming_84_decode(index, &errcnt);
+                    if (iout >= 0)
+                    {
+                        iout = (iout << 1) + lsb;
+                        if ((iout & 16) == 16)
+                            iout -= 32;
+                    }
+                    else
+                    {
+                        iout = s->drc[4 - i][2];
+                    }
+                    s->drc[4 - i][1] = iout;
+                }
+                /* Determine error rate */
+                s->erate = s->erate*0.96875f + errcnt*102.0f;
+            }
+            /* Get unsmoothed RMS, RC's, and PITCH */
+            t->irms = s->drms[1];
+            for (i = 0;  i < LPC10_ORDER;  i++)
+                t->irc[i] = s->drc[i][1];
+            if (ipit == 1)
+                s->dpit[1] = s->dpit[2];
+            if (ipit == 3)
+                s->dpit[1] = s->dpit[0];
+            *pitch = s->dpit[1];
+            /* If bit 2 of ICORF is set then smooth RMS and RC's, */
+            if ((icorf & bit[1]) != 0)
+            {
+                if ((float) abs(s->drms[1] - s->drms[0]) >= corth[ixcor + 3] 
+                    &&
+                    (float) abs(s->drms[1] - s->drms[2]) >= corth[ixcor + 3])
+                {
+                    t->irms = median(s->drms[2], s->drms[1], s->drms[0]);
+                }
+                for (i = 0;  i < 6;  i++)
+                {
+                    if ((float) abs(s->drc[i][1] - s->drc[i][0]) >= corth[ixcor + ((i + 3) << 2) - 5]
+                        &&
+                        (float) abs(s->drc[i][1] - s->drc[i][2]) >= corth[ixcor + ((i + 3) << 2) - 5])
+                    {
+                        t->irc[i] = median(s->drc[i][2], s->drc[i][1], s->drc[i][0]);
+                    }
+                }
+            }
+            /* If bit 3 of ICORF is set then smooth pitch */
+            if ((icorf & bit[2]) != 0)
+            {
+                if ((float) abs(s->dpit[1] - s->dpit[0]) >= corth[ixcor - 1] 
+                    &&
+                    (float) abs(s->dpit[1] - s->dpit[2]) >= corth[ixcor - 1])
+                {
+                    *pitch = median(s->dpit[2], s->dpit[1], s->dpit[0]);
+                }
+            }
+            /* If bit 5 of ICORF is set then RC(5) - RC(10) are loaded with
+               values so that after quantization bias is removed in decode
+               the values will be zero. */
+        }
+        if ((icorf & bit[4]) != 0)
+        {
+            for (i = 4;  i < LPC10_ORDER;  i++)
+                t->irc[i] = zrc[i];
+        }
+        /* Housekeeping  - one frame delay */
+        s->iovoic = ivoic;
+        s->ivp2h = voice[1];
+        s->dpit[2] = s->dpit[1];
+        s->dpit[1] = s->dpit[0];
+        s->drms[2] = s->drms[1];
+        s->drms[1] = s->drms[0];
+        for (i = 0;  i < LPC10_ORDER;  i++)
+        {
+            s->drc[i][2] = s->drc[i][1];
+            s->drc[i][1] = s->drc[i][0];
+        }
+    }
+    /* Decode RMS */
+    t->irms = rmst[(31 - t->irms)*2];
+    /* Decode RC(1) and RC(2) from log-area-ratios */
+    /* Protect from illegal coded value (-16) caused by bit errors */
+    for (i = 0;  i < 2;  i++)
+    {
+        i2 = t->irc[i];
+        i1 = 0;
+        if (i2 < 0)
+        {
+            i1 = 1;
+            i2 = -i2;
+            if (i2 > 15)
+                i2 = 0;
+        }
+        i2 = detab7[i2*2];
+        if (i1 == 1)
+            i2 = -i2;
+        ishift = 15 - nbit[i];
+        t->irc[i] = i2*pow_ii(2, ishift);
+    }
+    /* Decode RC(3)-RC(10) to sign plus 14 bits */
+    for (i = 2;  i < LPC10_ORDER;  i++)
+    {
+        ishift = 15 - nbit[i];
+        i2 = t->irc[i]*pow_ii(2, ishift) + qb[i - 2];
+        t->irc[i] = i2*descl[i - 2] + deadd[i - 2];
+    }
+    /* Scale RMS and RC's to floats */
+    *rms = (float) t->irms;
+    for (i = 0;  i < LPC10_ORDER;  i++)
+        rc[i] = t->irc[i]/16384.0f;
+}
+/*- End of function --------------------------------------------------------*/
+
+lpc10_decode_state_t *lpc10_decode_init(lpc10_decode_state_t *s, int error_correction)
+{
+    static const int16_t rand_init[] =
+    {
+        -21161,
+         -8478,
+         30892,
+        -10216,
+         16950
+    };
+    int i;
+    int j;
+
+    if (s == NULL)
+    {
+        if ((s = (lpc10_decode_state_t *) malloc(sizeof(lpc10_decode_state_t))) == NULL)
+            return NULL;
+    }
+
+    s->error_correction = error_correction;
+
+    /* State used by function decode */
+    s->iptold = 60;
+    s->first = TRUE;
+    s->ivp2h = 0;
+    s->iovoic = 0;
+    s->iavgp = 60;
+    s->erate = 0;
+    for (i = 0;  i < 3;  i++)
+    {
+        for (j = 0;  j < 10;  j++)
+            s->drc[j][i] = 0;
+        s->dpit[i] = 0;
+        s->drms[i] = 0;
+    }
+
+    /* State used by function synths */
+    for (i = 0;  i < 360;  i++)
+        s->buf[i] = 0.0f;
+    s->buflen = LPC10_SAMPLES_PER_FRAME;
+
+    /* State used by function pitsyn */
+    s->rmso = 1.0f;
+    s->first_pitsyn = TRUE;
+
+    /* State used by function bsynz */
+    s->ipo = 0;
+    for (i = 0;  i < 166;  i++)
+    {
+        s->exc[i] = 0.0f;
+        s->exc2[i] = 0.0f;
+    }
+    for (i = 0;  i < 3;  i++)
+    {
+        s->lpi[i] = 0.0f;
+        s->hpi[i] = 0.0f;
+    }
+    s->rmso_bsynz = 0.0f;
+
+    /* State used by function lpc10_random */
+    s->j = 1;
+    s->k = 4;
+    for (i = 0;  i < 5;  i++)
+        s->y[i] = rand_init[i];
+
+    /* State used by function deemp */
+    for (i = 0;  i < 2;  i++)
+        s->dei[i] = 0.0f;
+    for (i = 0;  i < 3;  i++)
+        s->deo[i] = 0.0f;
+    
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int lpc10_decode_release(lpc10_decode_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int quant)
+{
+    int voice[2];
+    int32_t pitch;
+    float speech[LPC10_SAMPLES_PER_FRAME];
+    float rc[LPC10_ORDER];
+    lpc10_frame_t frame;
+    float rms;
+    int i;
+    int j;
+
+    /* Decode 54 bits to LPC10_SAMPLES_PER_FRAME speech samples. */
+    for (i = 0;  i < quant;  i++)
+    {
+        lpc10_unpack(&frame, &code[i*7]);
+        decode(s, &frame, voice, &pitch, &rms, rc);
+        synths(s, voice, &pitch, &rms, rc, speech);
+        for (j = 0;  j < LPC10_SAMPLES_PER_FRAME;  j++)
+            amp[i*LPC10_SAMPLES_PER_FRAME + j] = rintf(32768.0f*speech[j]);
+    }
+
+    return quant*LPC10_SAMPLES_PER_FRAME;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/lpc10_encdecs.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,107 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * lpc10_encdecs.h - LPC10 low bit rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: lpc10_encdecs.h,v 1.9 2006/11/30 15:41:47 steveu Exp $
+ */
+
+#define LPC10_ORDER     10
+
+#if !defined(min)
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#endif
+#if !defined(max)
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+#endif
+
+void lpc10_placea(int32_t *ipitch,
+                  int32_t voibuf[4][2],
+                  int32_t *obound,
+                  int32_t af,
+                  int32_t vwin[3][2],
+                  int32_t awin[3][2],
+                  int32_t ewin[3][2], 
+                  int32_t lframe,
+                  int32_t maxwin);
+
+void lpc10_placev(int32_t *osbuf,
+                  int32_t *osptr,
+                  int32_t oslen, 
+                  int32_t *obound,
+                  int32_t vwin[3][2],
+                  int32_t af,
+                  int32_t lframe,
+                  int32_t minwin,
+                  int32_t maxwin,
+                  int32_t dvwinl,
+                  int32_t dvwinh);
+
+void lpc10_voicing(lpc10_encode_state_t *st,
+                   int32_t *vwin,
+                   float *inbuf,
+                   float *lpbuf,
+                   const int32_t buflim[],
+                   int32_t half,
+                   float *minamd,
+                   float *maxamd, 
+	               int32_t *mintau,
+                   float *ivrc,
+                   int32_t *obound);
+
+void lpc10_analyse(lpc10_encode_state_t *st, float *speech, int32_t *voice, int32_t *pitch, float *rms, float rc[]);
+
+static __inline__ int32_t pow_ii(int32_t x, int32_t n)
+{
+    int32_t pow;
+    uint32_t u;
+
+    if (n <= 0)
+    {
+        if (n == 0  ||  x == 1)
+            return 1;
+        if (x != -1)
+            return (x == 0)  ?  1/x  :  0;
+        n = -n;
+    }
+    u = n;
+    for (pow = 1;  ;  )
+    {
+        if ((u & 1))
+            pow *= x;
+        if ((u >>= 1) == 0)
+            break;
+        x *= x;
+    }
+    return pow;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ float r_sign(float a, float b)
+{
+    float x;
+
+    x = fabsf(a);
+    return (b >= 0.0f)  ?  x  :  -x;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/lpc10_encode.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,394 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * lpc10_encode.c - LPC10 low bit rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the U.S. Department of Defense reference
+ * implementation of the LPC-10 2400 bps Voice Coder. They do not
+ * exert copyright claims on their code, and it may be freely used.
+ *
+ * $Id: lpc10_encode.c,v 1.15 2006/11/21 13:57:40 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/lpc10.h"
+
+#include "lpc10_encdecs.h"
+
+static void lpc10_pack(lpc10_encode_state_t *s, uint8_t ibits[], lpc10_frame_t *t)
+{
+    static const int iblist[53] =
+    {
+        13, 12, 11,  1,  2, 13, 12, 11,  1,  2,
+        13, 10, 11,  2,  1, 10, 13, 12, 11, 10,
+         2, 13, 12, 11, 10,  2,  1, 12,  7,  6,
+         1, 10,  9,  8,  7,  4,  6,  9,  8,  7,
+         5,  1,  9,  8,  4,  6,  1,  5,  9,  8,
+         7,  5,  6
+    };
+    int32_t itab[13];
+    int x;
+    int i;
+
+    /* ibits is 54 bits of LPC data ordered as follows: */
+    /*     R1-0, R2-0, R3-0,  P-0,  A-0, */
+    /*     R1-1, R2-1, R3-1,  P-1,  A-1, */
+    /*     R1-2, R4-0, R3-2,  A-2,  P-2, R4-1, */
+    /*     R1-3, R2-2, R3-3, R4-2,  A-3, */
+    /*     R1-4, R2-3, R3-4, R4-3,  A-4, */
+    /*      P-3, R2-4, R7-0, R8-0,  P-4, R4-4, */
+    /*     R5-0, R6-0, R7-1,R10-0, R8-1, */
+    /*     R5-1, R6-1, R7-2, R9-0,  P-5, */
+    /*     R5-2, R6-2,R10-1, R8-2,  P-6, R9-1, */
+    /*     R5-3, R6-3, R7-3, R9-2, R8-3, SYNC */
+
+    itab[0] = t->ipitch;
+    itab[1] = t->irms;
+    itab[2] = 0;
+    for (i = 0;  i < LPC10_ORDER;  i++)
+        itab[i + 3] = t->irc[LPC10_ORDER - 1 - i] & 0x7FFF;
+    /* Put 54 bits into the output buffer */
+    x = 0;
+    for (i = 0;  i < 53;  i++)
+    {
+        x = (x << 1) | (itab[iblist[i] - 1] & 1);
+        if ((i & 7) == 7)
+            ibits[i >> 3] = x & 0xFF;
+        itab[iblist[i] - 1] >>= 1;
+    }
+    x = (x << 1) | (s->isync & 1);
+    s->isync ^= 1;
+    x <<= 2;
+    ibits[6] = x & 0xFF;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Quantize LPC parameters for transmission */
+static int encode(lpc10_encode_state_t *s,
+                  lpc10_frame_t *t,
+                  int32_t *voice,
+                  int32_t pitch,
+                  float rms,
+                  float *rc)
+{
+    static const int32_t enctab[16] =
+    {
+        0, 7, 11, 12, 13, 10, 6, 1, 14, 9, 5, 2, 3, 4, 8, 15
+    };
+    static const int32_t entau[60] =
+    {
+        19, 11, 27, 25, 29, 21, 23, 22, 30, 14, 15,  7, 39, 38, 46, 
+        42, 43, 41, 45, 37, 53, 49, 51, 50, 54, 52, 60, 56, 58, 26,
+        90, 88, 92, 84, 86, 82, 83, 81, 85, 69, 77, 73, 75, 74, 78,
+        70, 71, 67, 99, 97, 113, 112, 114, 98, 106, 104, 108, 100,
+        101, 76
+    };
+    static const int32_t enadd[8] =
+    {
+        1920, -768, 2432, 1280, 3584, 1536, 2816, -1152
+    };
+    static const float enscl[8] =
+    {
+        0.0204f, 0.0167f, 0.0145f, 0.0147f, 0.0143f, 0.0135f, 0.0125f, 0.0112f
+    };
+    static const int32_t enbits[8] =
+    {
+        6, 5, 4, 4, 4, 4, 3, 3
+    };
+    static const int32_t entab6[64] =
+    {
+        0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3,
+        3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6,
+        7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 11, 11, 12, 13, 14, 15
+    };
+    static const int32_t rmst[64] =
+    {
+        1024, 936, 856, 784, 718, 656, 600, 550, 502,
+        460, 420, 384, 352, 328, 294, 270, 246, 226,
+        206, 188, 172, 158, 144, 132, 120, 110, 102, 
+        92, 84, 78, 70, 64, 60, 54, 50,
+        46, 42, 38, 34, 32, 30, 26, 24,
+        22, 20, 18, 17, 16, 15, 14, 13,
+        12, 11, 10, 9, 8, 7, 6, 5, 4,
+        3, 2, 1, 0
+    };
+
+    int32_t idel;
+    int32_t nbit;
+    int32_t i;
+    int32_t j;
+    int32_t i2;
+    int32_t i3;
+    int32_t mrk;
+
+    /* Scale RMS and RC's to int32_ts */
+    t->irms = rms;
+    for (i = 0;  i < LPC10_ORDER;  i++)
+        t->irc[i] = rc[i]*32768.0f;
+    if (voice[0] != 0  &&  voice[1] != 0)
+    {
+        t->ipitch = entau[pitch - 1];
+    }
+    else
+    {
+        if (s->error_correction)
+        {
+            t->ipitch = 0;
+            if (voice[0] != voice[1])
+                t->ipitch = 127;
+        }
+        else
+        {
+            t->ipitch = (voice[0] << 1) + voice[1];
+        }
+    }
+    /* Encode RMS by binary table search */
+    j = 32;
+    idel = 16;
+    t->irms = min(t->irms, 1023);
+    while (idel > 0)
+    {
+        if (t->irms > rmst[j - 1])
+            j -= idel;
+        if (t->irms < rmst[j - 1])
+            j += idel;
+        idel /= 2;
+    }
+    if (t->irms > rmst[j - 1])
+        --j;
+    t->irms = 31 - j/2;
+    /* Encode RC(1) and (2) as log-area-ratios */
+    for (i = 0;  i < 2;  i++)
+    {
+        i2 = t->irc[i];
+        mrk = 0;
+        if (i2 < 0)
+        {
+            i2 = -i2;
+            mrk = 1;
+        }
+        i2 = min(i2/512, 63);
+        i2 = entab6[i2];
+        if (mrk != 0)
+            i2 = -i2;
+        t->irc[i] = i2;
+    }
+    /* Encode RC(3) - (10) linearly, remove bias then scale */
+    for (i = 2;  i < LPC10_ORDER;  i++)
+    {
+        i2 = (t->irc[i]/2 + enadd[LPC10_ORDER - 1 - i])*enscl[LPC10_ORDER - 1 - i];
+        i2 = max(i2, -127);
+        i2 = min(i2, 127);
+        nbit = enbits[LPC10_ORDER - 1 - i];
+        i3 = (i2 < 0);
+        i2 /= pow_ii(2, nbit);
+        if (i3)
+            i2--;
+        t->irc[i] = i2;
+    }
+    /* Protect the most significant bits of the most
+       important parameters during non-voiced frames.
+       RC(1) - RC(4) are protected using 20 parity bits
+       replacing RC(5) - RC(10). */
+    if (s->error_correction)
+    {
+        if (t->ipitch == 0  ||  t->ipitch == 127)
+        {
+            t->irc[4] = enctab[(t->irc[0] & 0x1E) >> 1];
+            t->irc[5] = enctab[(t->irc[1] & 0x1E) >> 1];
+            t->irc[6] = enctab[(t->irc[2] & 0x1E) >> 1];
+            t->irc[7] = enctab[(t->irms & 0x1E) >> 1];
+            t->irc[8] = enctab[(t->irc[3] & 0x1E) >> 1] >> 1;
+            t->irc[9] = enctab[(t->irc[3] & 0x1E) >> 1] & 1;
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void high_pass_100hz(lpc10_encode_state_t *s, float speech[], int start, int len)
+{
+    float si;
+    float err;
+    int i;
+
+    /* 100 Hz high pass filter */
+    for (i = start;  i < len;  i++)
+    {
+        si = speech[i];
+        err = si + s->z11*1.859076f - s->z21*0.8648249f;
+        si = err - s->z11*2.0f + s->z21;
+        s->z21 = s->z11;
+        s->z11 = err;
+        err = si + s->z12*1.935715f - s->z22*0.9417004f;
+        si = err - s->z12*2.0f + s->z22;
+        s->z22 = s->z12;
+        s->z12 = err;
+        speech[i] = si*0.902428f;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+lpc10_encode_state_t *lpc10_encode_init(lpc10_encode_state_t *s, int error_correction)
+{
+    int i;
+    int j;
+
+    if (s == NULL)
+    {
+        if ((s = (lpc10_encode_state_t *) malloc(sizeof(lpc10_encode_state_t))) == NULL)
+            return NULL;
+    }
+
+    s->error_correction = error_correction;
+
+    /* State used only by function high_pass_100hz */
+    s->z11 = 0.0f;
+    s->z21 = 0.0f;
+    s->z12 = 0.0f;
+    s->z22 = 0.0f;
+    
+    /* State used by function lpc10_analyse */
+    for (i = 0;  i < 540;  i++)
+    {
+        s->inbuf[i] = 0.0f;
+        s->pebuf[i] = 0.0f;
+    }
+    for (i = 0;  i < 696;  i++)
+        s->lpbuf[i] = 0.0f;
+    for (i = 0;  i < 312;  i++)
+        s->ivbuf[i] = 0.0f;
+    s->bias = 0.0f;
+    s->osptr = 1;
+    for (i = 0;  i < 3;  i++)
+        s->obound[i] = 0;
+    s->vwin[2][0] = 307;
+    s->vwin[2][1] = 462;
+    s->awin[2][0] = 307;
+    s->awin[2][1] = 462;
+    for (i = 0;  i < 4;  i++)
+    {
+        s->voibuf[i][0] = 0;
+        s->voibuf[i][1] = 0;
+    }
+    for (i = 0;  i < 3;  i++)
+        s->rmsbuf[i] = 0.0f;
+    for (i = 0;  i < 3;  i++)
+    {
+        for (j = 0;  j < 10;  j++)
+            s->rcbuf[i][j] = 0.0f;
+    }
+    s->zpre = 0.0f;
+
+    /* State used by function onset */
+    s->n = 0.0f;
+    s->d__ = 1.0f;
+    for (i = 0;  i < 16;  i++)
+        s->l2buf[i] = 0.0f;
+    s->l2sum1 = 0.0f;
+    s->l2ptr1 = 1;
+    s->l2ptr2 = 9;
+    s->hyst = FALSE;
+
+    /* State used by function lpc10_voicing */
+    s->dither = 20.0f;
+    s->maxmin = 0.0f;
+    for (i = 0;  i < 3;  i++)
+    {
+        s->voice[i][0] = 0.0f;
+        s->voice[i][1] = 0.0f;
+    }
+    s->lbve = 3000;
+    s->fbve = 3000;
+    s->fbue = 187;
+    s->ofbue = 187;
+    s->sfbue = 187;
+    s->lbue = 93;
+    s->olbue = 93;
+    s->slbue = 93;
+    s->snr = (float) (s->fbve / s->fbue << 6);
+
+    /* State used by function dynamic_pitch_tracking */
+    for (i = 0;  i < 60;  i++)
+        s->s[i] = 0.0f;
+    for (i = 0;  i < 2;  i++)
+    {
+        for (j = 0;  j < 60;  j++)
+            s->p[i][j] = 0;
+    }
+    s->ipoint = 0;
+    s->alphax = 0.0f;
+
+    /* State used by function lpc10_pack */
+    s->isync = 0;
+    
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int lpc10_encode_release(lpc10_encode_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int quant)
+{
+    int32_t voice[2];
+    int32_t pitch;
+    float speech[LPC10_SAMPLES_PER_FRAME];
+    float rc[LPC10_ORDER];
+    float rms;
+    lpc10_frame_t frame;
+    int i;
+    int j;
+
+    for (i = 0;  i < quant;  i++)
+    {
+        for (j = 0;  j < LPC10_SAMPLES_PER_FRAME;  j++)
+            speech[j] = (float) amp[i*LPC10_SAMPLES_PER_FRAME + j]/32768.0f;
+        high_pass_100hz(s, speech, 0, LPC10_SAMPLES_PER_FRAME);
+        lpc10_analyse(s, speech, voice, &pitch, &rms, rc);
+        encode(s, &frame, voice, pitch, rms, rc);
+        lpc10_pack(s, &code[7*i], &frame);
+    }
+    return quant*7;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/lpc10_placev.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,335 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * lpc10_placev.c - LPC10 low bit rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the U.S. Department of Defense reference
+ * implementation of the LPC-10 2400 bps Voice Coder. They do not
+ * exert copyright claims on their code, and it may be freely used.
+ *
+ * $Id: lpc10_placev.c,v 1.11 2006/11/21 13:32:27 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/lpc10.h"
+
+#include "lpc10_encdecs.h"
+
+#define subsc(x,y) (((x) << 1) + (y))
+
+void lpc10_placea(int32_t *ipitch,
+                  int32_t voibuf[3][2],
+                  int32_t *obound,
+                  int32_t af,
+                  int32_t vwin[3][2],
+                  int32_t awin[3][2],
+                  int32_t ewin[3][2], 
+                  int32_t lframe,
+                  int32_t maxwin)
+{
+    int allv;
+    int winv;
+    int32_t i;
+    int32_t j;
+    int32_t k;
+    int32_t l;
+    int32_t hrange;
+    int ephase;
+    int32_t lrange;
+    
+    lrange = (af - 2)*lframe + 1;
+    hrange = af*lframe;
+
+    /* Place the analysis window based on the voicing window placement,
+       onsets, tentative voicing decision, and pitch. */
+
+    /* Case 1:  Sustained voiced speech
+       If the five most recent voicing decisions are
+       voiced, then the window is placed phase-synchronously with the
+       previous window, as close to the present voicing window if possible.
+       If onsets bound the voicing window, then preference is given to
+       a phase-synchronous placement which does not overlap these onsets. */
+
+    /* Case 2:  Voiced transition
+       If at least one voicing decision in AF is voicied, and there are no
+       onsets, then the window is placed as in case 1. */
+
+    /* Case 3:  Unvoiced speech or onsets
+       If both voicing decisions in AF are unvoiced, or there are onsets
+       then the window is placed coincident with the voicing window. */
+
+    /* Note:  During phase-synchronous placement of windows, the length
+       is not altered from MAXWIN, since this would defeat the purpose
+       of phase-synchronous placement. */
+
+    /* Check for case 1 and case 2 */
+    allv = voibuf[af - 2][1] == 1
+           &&
+           voibuf[af - 1][0] == 1
+           &&
+           voibuf[af - 1][1] == 1
+           &&
+           voibuf[af][0] == 1
+           &&
+           voibuf[af][1] == 1;
+    winv = voibuf[af][0] == 1  ||  voibuf[af][1] == 1;
+    if (allv  ||  (winv  &&  *obound == 0))
+    {
+        /* APHASE:  Phase synchronous window placement. */
+        /* Get minimum lower index of the window. */
+        i = (lrange + *ipitch - 1 - awin[af - 2][0]) / *ipitch;
+        i *= *ipitch;
+        i += awin[af - 2][0];
+        /* l = the actual length of this frame's analysis window. */
+        l = maxwin;
+        /* Calculate the location where a perfectly centered window would start. */
+        k = (vwin[af - 1][0] + vwin[af - 1][1] + 1 - l)/2;
+        /* Choose the actual location to be the pitch multiple closest to this */
+        awin[af - 1][0] = i + lroundf((float) (k - i) / (float) *ipitch) * *ipitch;
+        awin[af - 1][1] = awin[af - 1][0] + l - 1;
+        /* If there is an onset bounding the right of the voicing window and the
+           analysis window overlaps that, then move the analysis window backward
+           to avoid this onset. */
+        if (*obound >= 2  &&  awin[af - 1][1] > vwin[af - 1][1])
+        {
+            awin[af - 1][0] -= *ipitch;
+            awin[af - 1][1] -= *ipitch;
+        }
+        /* Similarly for the left of the voicing window. */
+        if ((*obound == 1  ||  *obound == 3)  &&  awin[af - 1][0] < vwin[af - 1][0])
+        {
+            awin[af - 1][0] += *ipitch;
+            awin[af - 1][1] += *ipitch;
+        }
+        /* If this placement puts the analysis window above HRANGE, then
+           move it backward an integer number of pitch periods. */
+        while (awin[af - 1][1] > hrange)
+        {
+            awin[af - 1][0] -= *ipitch;
+            awin[af - 1][1] -= *ipitch;
+        }
+        /* Similarly if the placement puts the analysis window below LRANGE. */
+        while (awin[af - 1][0] < lrange)
+        {
+            awin[af - 1][0] += *ipitch;
+            awin[af - 1][1] += *ipitch;
+        }
+        /* Make energy window be phase-synchronous. */
+        ephase = TRUE;
+    }
+    else
+    {
+        /* Case 3 */
+        awin[af - 1][0] = vwin[af - 1][0];
+        awin[af - 1][1] = vwin[af - 1][1];
+        ephase = FALSE;
+    }
+    /* RMS is computed over an integer number of pitch periods in the analysis
+       window.  When it is not placed phase-synchronously, it is placed as close
+       as possible to onsets. */
+    j = (awin[af - 1][1] - awin[af - 1][0] + 1) / *ipitch * *ipitch;
+    if (j == 0  ||  !winv)
+    {
+        ewin[af - 1][0] = vwin[af - 1][0];
+        ewin[af - 1][1] = vwin[af - 1][1];
+    }
+    else if (!ephase  &&  *obound == 2)
+    {
+        ewin[af - 1][0] = awin[af - 1][1] - j + 1;
+        ewin[af - 1][1] = awin[af - 1][1];
+    }
+    else
+    {
+        ewin[af - 1][0] = awin[af - 1][0];
+        ewin[af - 1][1] = awin[af - 1][0] + j - 1;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void lpc10_placev(int32_t *osbuf,
+                  int32_t *osptr,
+                  int32_t oslen, 
+                  int32_t *obound,
+                  int32_t vwin[3][2],
+                  int32_t af,
+                  int32_t lframe,
+                  int32_t minwin,
+                  int32_t maxwin,
+                  int32_t dvwinl,
+                  int32_t dvwinh)
+{
+    int32_t i1;
+    int32_t i2;
+    int crit;
+    int32_t q;
+    int32_t osptr1;
+    int32_t hrange;
+    int32_t lrange;
+    int i;
+
+    /* Voicing window placement */
+
+    /*         __________________ __________________ ______________ */
+    /*        |                  |                  |               */
+    /*        |        1F        |        2F        |        3F ... */
+    /*        |__________________|__________________|______________ */
+
+    /*    Previous | */
+    /*      Window | */
+    /*  ...________| */
+
+    /*             |                                | */
+    /*      ------>| This window's placement range  |<------ */
+    /*             |                                | */
+
+    /* There are three cases.  Note these are different from those
+       given in the LPC-10e phase 1 report. */
+
+    /* 1.  If there are no onsets in this range, then the voicing window
+       is centered in the pitch window.  If such a placement is not within
+       the window's placement range, then the window is placed in the left-most
+       portion of the placement range.  Its length is always MAXWIN. */
+
+    /* 2.  If the first onset is in 2F and there is sufficient room to place
+       the window immediately before this onset, then the window is placed
+       there, and its length is set to the maximum possible under these
+       constraints. */
+
+    /* "Critical Region Exception":  If there is another onset in 2F
+       such that a window can be placed between the two onsets, the
+       window is placed there (ie, as in case 3). */
+
+    /* 3.  Otherwise, the window is placed immediately after the onset.  The
+       window's length is the longest length that can fit in the range under these
+       constraints, except that the window may be shortened even further to avoid
+       overlapping other onsets in the placement range.  In any case, the window's
+       length is at least MINWIN. */
+
+    /* Note that the values of MINWIN and LFRAME must be chosen such
+       that case 2 = false implies case 3 = true.   This means that
+       MINWIN <= LFRAME/2.  If this were not the case, then a fourth case
+       would have to be added for when the window cannot fit either before
+       or after the onset. */
+
+    /* Note also that onsets which weren't in 2F last time may be in 1F this
+       time, due to the filter delays in computing onsets.  The result is that
+       occasionally a voicing window will overlap that onset.  The only way
+       to circumvent this problem is to add more delay in processing input
+       speech.  In the trade-off between delay and window-placement, window
+       placement lost. */
+
+    /* Compute the placement range */
+
+    /* Computing MAX */
+    i1 = vwin[af - 2][1] + 1;
+    i2 = (af - 2)*lframe + 1;
+    lrange = max(i1, i2);
+    hrange = af*lframe;
+    /* Compute OSPTR1, so the following code only looks at relevant onsets. */
+    for (osptr1 = *osptr - 1;  osptr1 >= 1;  osptr1--)
+    {
+        if (osbuf[osptr1 - 1] <= hrange)
+            break;
+    }
+    osptr1++;
+    /* Check for case 1 first (fast case) */
+    if (osptr1 <= 1  ||  osbuf[osptr1 - 2] < lrange)
+    {
+        /* Compute max */
+        i1 = vwin[af - 2][1] + 1;
+        vwin[af - 1][0] = max(i1, dvwinl);
+        vwin[af - 1][1] = vwin[af - 1][0] + maxwin - 1;
+        *obound = 0;
+    }
+    else
+    {
+        /* Search backward in OSBUF for first onset in range. */
+        /* This code relies on the above check being performed first. */
+        for (q = osptr1 - 1;  q >= 1;  q--)
+        {
+            if (osbuf[q - 1] < lrange)
+                break;
+        }
+        q++;
+        /* Check for case 2 (placement before onset): */
+        /* Check for critical region exception: */
+        crit = FALSE;
+        for (i = q + 1;  i < osptr1;  i++)
+        {
+            if (osbuf[i - 1] - osbuf[q - 1] >= minwin)
+            {
+                crit = TRUE;
+                break;
+            }
+        }
+        /* Compute max */
+        i1 = (af - 1)*lframe;
+        i2 = lrange + minwin - 1;
+        if (!crit  &&  osbuf[q - 1] > max(i1, i2))
+        {
+            vwin[af - 1][1] = osbuf[q - 1] - 1;
+            /* Compute max */
+            i2 = vwin[af - 1][1] - maxwin + 1;
+            vwin[af - 1][0] = max(lrange, i2);
+            *obound = 2;
+        }
+        else
+        {
+            /* Case 3 (placement after onset) */
+            vwin[af - 1][0] = osbuf[q - 1];
+            do
+            {
+                if (++q >= osptr1
+                    ||
+                    osbuf[q - 1] > vwin[af - 1][0] + maxwin)
+                {
+                    /* Compute min */
+                    i1 = vwin[af - 1][0] + maxwin - 1;
+                    vwin[af - 1][1] = min(i1, hrange);
+                    *obound = 1;
+                    return;
+                }
+            }
+            while (osbuf[q - 1] < vwin[af - 1][0] + minwin);
+            vwin[af - 1][1] = osbuf[q - 1] - 1;
+            *obound = 3;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/lpc10_voicing.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,487 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * lpc10_voicing.c - LPC10 low bit rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is based on the U.S. Department of Defense reference
+ * implementation of the LPC-10 2400 bps Voice Coder. They do not
+ * exert copyright claims on their code, and it may be freely used.
+ *
+ * $Id: lpc10_voicing.c,v 1.7 2006/11/30 15:41:47 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/lpc10.h"
+
+#include "lpc10_encdecs.h"
+
+static void vparms(int32_t vwin[],
+                    float *inbuf,
+                    float *lpbuf,
+                    const int32_t buflim[],
+                    int32_t half,
+                    float *dither,
+                    int32_t *mintau,
+                    int32_t *zc, 
+                    int32_t *lbe,
+                    int32_t *fbe,
+                    float *qs,
+                    float *rc1,
+                    float *ar_b,
+                    float *ar_f)
+{
+    int32_t inbuf_offset;
+    int32_t lpbuf_offset;
+    int32_t vlen;
+    int32_t stop;
+    int32_t i;
+    int32_t start;
+    float r1;
+    float r2;
+    float e_pre;
+    float ap_rms;
+    float e_0;
+    float oldsgn;
+    float lp_rms;
+    float e_b;
+    float e_f;
+    float r_b;
+    float r_f;
+    float e0ap;
+
+    /* Calculate zero crossings (ZC) and several energy and correlation */
+    /* measures on low band and full band speech.  Each measure is taken */
+    /* over either the first or the second half of the voicing window, */
+    /* depending on the variable HALF. */
+    lpbuf_offset = buflim[2];
+    lpbuf -= lpbuf_offset;
+    inbuf_offset = buflim[0];
+    inbuf -= inbuf_offset;
+
+    lp_rms = 0.0f;
+    ap_rms = 0.0f;
+    e_pre = 0.0f;
+    e0ap = 0.0f;
+    *rc1 = 0.0f;
+    e_0 = 0.0f;
+    e_b = 0.0f;
+    e_f = 0.0f;
+    r_f = 0.0f;
+    r_b = 0.0f;
+    *zc = 0;
+    vlen = vwin[1] - vwin[0] + 1;
+    start = vwin[0] + half*vlen/2 + 1;
+    stop = start + vlen/2 - 1;
+
+    /* I'll use the symbol HVL in the table below to represent the value */
+    /* VLEN/2.  Note that if VLEN is odd, then HVL should be rounded down, */
+    /* i.e., HVL = (VLEN-1)/2. */
+
+    /* HALF  START          STOP */
+
+    /* 1     VWIN(1)+1      VWIN(1)+HVL */
+    /* 2     VWIN(1)+HVL+1  VWIN(1)+2*HVL */
+    oldsgn = r_sign(1.0f, inbuf[start - 1] - *dither);
+    for (i = start;  i <= stop;  i++)
+    {
+        lp_rms += fabsf(lpbuf[i]);
+        ap_rms += fabsf(inbuf[i]);
+        e_pre += fabsf(inbuf[i] - inbuf[i - 1]);
+        r1 = inbuf[i];
+        e0ap += r1*r1;
+        *rc1 += inbuf[i]*inbuf[i - 1];
+        r1 = lpbuf[i];
+        e_0 += r1*r1;
+        r1 = lpbuf[i - *mintau];
+        e_b += r1*r1;
+        r1 = lpbuf[i + *mintau];
+        e_f += r1*r1;
+        r_f += lpbuf[i]*lpbuf[i + *mintau];
+        r_b += lpbuf[i]*lpbuf[i - *mintau];
+        r1 = inbuf[i] + *dither;
+        if (r_sign(1.0f, r1) != oldsgn)
+        {
+            ++(*zc);
+            oldsgn = -oldsgn;
+        }
+        *dither = -(*dither);
+    }
+    /* Normalized short-term autocovariance coefficient at unit sample delay */
+    *rc1 /= max(e0ap, 1.0f);
+    /* Ratio of the energy of the first difference signal (6 dB/oct preemphasis)*/
+    /* to the energy of the full band signal */
+    /* Computing MAX */
+    r1 = ap_rms*2.0f;
+    *qs = e_pre/max(r1, 1.0f);
+    /* aR_b is the product of the forward and reverse prediction gains, */
+    /* looking backward in time (the causal case). */
+    *ar_b = r_b/max(e_b, 1.0f)*(r_b/max(e_0, 1.0f));
+    /* aR_f is the same as aR_b, but looking forward in time (non causal case).*/
+    *ar_f = r_f/max(e_f, 1.0f)*(r_f/max(e_0, 1.0f));
+    /* Normalize ZC, LBE, and FBE to old fixed window length of 180. */
+    /* (The fraction 90/VLEN has a range of 0.58 to 1) */
+    r2 = (float) (*zc << 1);
+    *zc = lrintf(r2*(90.0f/vlen));
+    r1 = lp_rms/4*(90.0f/vlen);
+    *lbe = min(lrintf(r1), 32767);
+    r1 = ap_rms/4*(90.0f/vlen);
+    *fbe = min(lrintf(r1), 32767);
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Voicing detection makes voicing decisions for each half */
+/* frame of input speech.  Tentative voicing decisions are made two frames*/
+/* in the future (2F) for each half frame.  These decisions are carried */
+/* through one frame in the future (1F) to the present (P) frame where */
+/* they are examined and smoothed, resulting in the final voicing */
+/* decisions for each half frame. */
+
+/* The voicing parameter (signal measurement) column vector (VALUE) */
+/* is based on a rectangular window of speech samples determined by the */
+/* window placement algorithm.  The voicing parameter vector contains the*/
+/* AMDF windowed maximum-to-minimum ratio, the zero crossing rate, energy*/
+/* measures, reflection coefficients, and prediction gains.  The voicing */
+/* window is placed to avoid contamination of the voicing parameter vector*/
+/* with speech onsets. */
+
+/* The input signal is then classified as unvoiced (including */
+/* silence) or voiced.  This decision is made by a linear discriminant */
+/* function consisting of a dot product of the voicing decision */
+/* coefficient (VDC) row vector with the measurement column vector */
+/* (VALUE).  The VDC vector is 2-dimensional, each row vector is optimized*/
+/* for a particular signal-to-noise ratio (SNR).  So, before the dot */
+/* product is performed, the SNR is estimated to select the appropriate */
+/* VDC vector. */
+
+/* The smoothing algorithm is a modified median smoother.  The */
+/* voicing discriminant function is used by the smoother to determine how*/
+/* strongly voiced or unvoiced a signal is.  The smoothing is further */
+/* modified if a speech onset and a voicing decision transition occur */
+/* within one half frame.  In this case, the voicing decision transition */
+/* is extended to the speech onset.  For transmission purposes, there are*/
+/* constraints on the duration and transition of voicing decisions.  The */
+/* smoother takes these constraints into account. */
+
+/* Finally, the energy estimates are updated along with the dither */
+/* threshold used to calculate the zero crossing rate (ZC). */
+
+void lpc10_voicing(lpc10_encode_state_t *s,
+                   int32_t vwin[],
+                   float *inbuf,
+                   float *lpbuf,
+                   const int32_t buflim[],
+                   int32_t half,
+                   float *minamd,
+                   float *maxamd, 
+                   int32_t *mintau,
+                   float ivrc[],
+                   int32_t obound[])
+{
+    static const float vdc[100] =
+    {
+        0.0f, 1714.0f, -110.0f, 334.0f, -4096.0f,  -654.0f, 3752.0f, 3769.0f, 0.0f,  1181.0f,
+        0.0f,  874.0f,  -97.0f, 300.0f, -4096.0f, -1021.0f, 2451.0f, 2527.0f, 0.0f,  -500.0f,
+        0.0f,  510.0f,  -70.0f, 250.0f, -4096.0f, -1270.0f, 2194.0f, 2491.0f, 0.0f, -1500.0f,
+        0.0f,  500.0f,  -10.0f, 200.0f, -4096.0f, -1300.0f,  2.0e3f,  2.0e3f, 0.0f,  -2.0e3f,
+        0.0f,  500.0f,    0.0f,   0.0f, -4096.0f, -1300.0f,  2.0e3f,  2.0e3f, 0.0f, -2500.0f,
+        0.0f,    0.0f,    0.0f,   0.0f,     0.0f,     0.0f,    0.0f,    0.0f, 0.0f,     0.0f,
+        0.0f,    0.0f,    0.0f,   0.0f,     0.0f,     0.0f,    0.0f,    0.0f, 0.0f,     0.0f,
+        0.0f,    0.0f,    0.0f,   0.0f,     0.0f,     0.0f,    0.0f,    0.0f, 0.0f,     0.0f,
+        0.0f,    0.0f,    0.0f,   0.0f,     0.0f,     0.0f,    0.0f,    0.0f, 0.0f,     0.0f,
+        0.0f,    0.0f,    0.0f,   0.0f,     0.0f,     0.0f,    0.0f,    0.0f, 0.0f,     0.0f
+    };
+    static const int nvdcl = 5;
+    static const float vdcl[10] =
+    {
+        600.0f, 450.0f, 300.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f
+    };
+
+    int32_t inbuf_offset;
+    int32_t lpbuf_offset;
+    int32_t i1;
+    float r1;
+    float r2;
+    float ar_b;
+    float ar_f;
+    int32_t snrl;
+    int32_t i;
+    float value[9];
+    int32_t zc;
+    int ot;
+    float qs;
+    int32_t vstate;
+    float rc1;
+    int32_t fbe;
+    int32_t lbe;
+    float snr2;
+
+    inbuf_offset = 0;
+    lpbuf_offset = 0;
+    if (inbuf)
+    {
+        inbuf_offset = buflim[0];
+        inbuf -= inbuf_offset;
+    }
+    if (lpbuf)
+    {
+        lpbuf_offset = buflim[2];
+        lpbuf -= lpbuf_offset;
+    }
+
+    /* Voicing Decision Parameter vector (* denotes zero coefficient): */
+
+    /*     * MAXMIN */
+    /*       LBE/LBVE */
+    /*       ZC */
+    /*       RC1 */
+    /*       QS */
+    /*       IVRC2 */
+    /*       aR_B */
+    /*       aR_F */
+    /*     * LOG(LBE/LBVE) */
+    /* Define 2-D voicing decision coefficient vector according to the voicing */
+    /* parameter order above.  Each row (VDC vector) is optimized for a specific */
+    /*   SNR.  The last element of the vector is the constant. */
+    /*              E    ZC    RC1    Qs   IVRC2  aRb   aRf        c */
+
+    /* The VOICE array contains the result of the linear discriminant function*/
+    /* (analog values).  The VOIBUF array contains the hard-limited binary */
+    /* voicing decisions.  The VOICE and VOIBUF arrays, according to FORTRAN */
+    /* memory allocation, are addressed as: */
+
+    /*        (half-frame number, future-frame number) */
+
+    /*        |   Past    |  Present  |  Future1  |  Future2  | */
+    /*        | 1,0 | 2,0 | 1,1 | 2,1 | 1,2 | 2,2 | 1,3 | 2,3 |  --->  time */
+
+    /* Update linear discriminant function history each frame: */
+    if (half == 0)
+    {
+        s->voice[0][0] = s->voice[1][0];
+        s->voice[0][1] = s->voice[1][1];
+        s->voice[1][0] = s->voice[2][0];
+        s->voice[1][1] = s->voice[2][1];
+        s->maxmin = *maxamd / max(*minamd, 1.0f);
+    }
+    /* Calculate voicing parameters twice per frame */
+    vparms(vwin,
+           &inbuf[inbuf_offset],
+           &lpbuf[lpbuf_offset],
+           buflim, 
+           half,
+           &s->dither,
+           mintau,
+           &zc,
+           &lbe,
+           &fbe,
+           &qs,
+           &rc1,
+           &ar_b,
+           &ar_f);
+    /* Estimate signal-to-noise ratio to select the appropriate VDC vector. */
+    /* The SNR is estimated as the running average of the ratio of the */
+    /* running average full-band voiced energy to the running average */
+    /* full-band unvoiced energy. SNR filter has gain of 63. */
+    r1 = (s->snr + s->fbve/(float) max(s->fbue, 1))*63/64.0f;
+    s->snr = (float) lrintf(r1);
+    snr2 = s->snr*s->fbue/max(s->lbue, 1);
+    /* Quantize SNR to SNRL according to VDCL thresholds. */
+    i1 = nvdcl - 1;
+    for (snrl = 0;  snrl < i1;  snrl++)
+    {
+        if (snr2 > vdcl[snrl])
+            break;
+    }
+    /* (Note:  SNRL = NVDCL here) */
+    /* Linear discriminant voicing parameters: */
+    value[0] = s->maxmin;
+    value[1] = (float) lbe/max(s->lbve, 1);
+    value[2] = (float) zc;
+    value[3] = rc1;
+    value[4] = qs;
+    value[5] = ivrc[1];
+    value[6] = ar_b;
+    value[7] = ar_f;
+    /* Evaluation of linear discriminant function: */
+    s->voice[2][half] = vdc[snrl*10 + 9];
+    for (i = 0;  i < 8;  i++)
+        s->voice[2][half] += vdc[snrl*10 + i]*value[i];
+    /* Classify as voiced if discriminant > 0, otherwise unvoiced */
+    /* Voicing decision for current half-frame:  1 = Voiced; 0 = Unvoiced */
+    s->voibuf[3][half] = (s->voice[2][half] > 0.0f)  ?  1  :  0;
+    /* Skip voicing decision smoothing in first half-frame: */
+    /* Give a value to VSTATE, so that trace statements below will print */
+    /* a consistent value from one call to the next when HALF .EQ. 1. */
+    /* The value of VSTATE is not used for any other purpose when this is */
+    /* true. */
+    vstate = -1;
+    if (half != 0)
+    {
+        /* Voicing decision smoothing rules (override of linear combination): */
+
+        /*     Unvoiced half-frames:  At least two in a row. */
+        /*     -------------------- */
+
+        /*     Voiced half-frames:    At least two in a row in one frame. */
+        /*     -------------------    Otherwise at least three in a row. */
+        /*                    (Due to the way transition frames are encoded) */
+
+        /* In many cases, the discriminant function determines how to smooth. */
+        /* In the following chart, the decisions marked with a * may be overridden. */
+
+        /* Voicing override of transitions at onsets: */
+        /* If a V/UV or UV/V voicing decision transition occurs within one-half */
+        /* frame of an onset bounding a voicing window, then the transition is */
+        /* moved to occur at the onset. */
+
+        /*     P    1F */
+        /*     -----    ----- */
+        /*     0   0   0   0 */
+        /*     0   0   0*  1    (If there is an onset there) */
+        /*     0   0   1*  0*    (Based on 2F and discriminant distance) */
+        /*     0   0   1   1 */
+        /*     0   1*  0   0    (Always) */
+        /*     0   1*  0*  1    (Based on discriminant distance) */
+        /*     0*  1   1   0*    (Based on past, 2F, and discriminant distance) */
+        /*     0   1*  1   1    (If there is an onset there) */
+        /*     1   0*  0   0    (If there is an onset there) */
+        /*     1   0   0   1 */
+        /*     1   0*  1*  0    (Based on discriminant distance) */
+        /*     1   0*  1   1    (Always) */
+        /*     1   1   0   0 */
+        /*     1   1   0*  1*    (Based on 2F and discriminant distance) */
+        /*     1   1   1*  0    (If there is an onset there) */
+        /*     1   1   1   1 */
+
+        /* Determine if there is an onset transition between P and 1F. */
+        /* OT (Onset Transition) is true if there is an onset between */
+        /* P and 1F but not after 1F. */
+        ot = ((obound[0] & 2) != 0  ||  obound[1] == 1)  &&  (obound[2] & 1) == 0;
+        /* Multi-way dispatch on voicing decision history: */
+        vstate = (s->voibuf[1][0] << 3) + (s->voibuf[1][1] << 2) + (s->voibuf[2][0] << 1) + s->voibuf[2][1];
+        switch (vstate + 1)
+        {
+        case 2:
+            if (ot  &&  s->voibuf[3][0] == 1)
+                s->voibuf[2][0] = 1;
+            break;
+        case 3:
+            if (s->voibuf[3][0] == 0  ||  s->voice[1][0] < -s->voice[1][1])
+                s->voibuf[2][0] = 0;
+            else
+                s->voibuf[2][1] = 1;
+            break;
+        case 5:
+            s->voibuf[1][1] = 0;
+            break;
+        case 6:
+            if (s->voice[0][1] < -s->voice[1][0])
+                s->voibuf[1][1] = 0;
+            else
+                s->voibuf[2][0] = 1;
+            break;
+        case 7:
+            if (s->voibuf[0][0] == 1  ||  s->voibuf[3][0] == 1  ||  s->voice[1][1] > s->voice[0][0])
+                s->voibuf[2][1] = 1;
+            else
+                s->voibuf[1][0] = 1;
+            break;
+        case 8:
+            if (ot)
+                s->voibuf[1][1] = 0;
+            break;
+        case 9:
+            if (ot)
+                s->voibuf[1][1] = 1;
+            break;
+        case 11:
+            if (s->voice[1][9] < -s->voice[0][1])
+                s->voibuf[2][0] = 0;
+            else
+                s->voibuf[1][1] = 1;
+            break;
+        case 12:
+            s->voibuf[1][1] = 1;
+            break;
+        case 14:
+            if (s->voibuf[3][0] == 0  &&  s->voice[1][1] < -s->voice[1][0])
+                s->voibuf[2][1] = 0;
+            else
+                s->voibuf[2][0] = 1;
+            break;
+        case 15:
+            if (ot  &&  s->voibuf[3][0] == 0)
+                s->voibuf[2][0] = 0;
+            break;
+        }
+    }
+    /* During unvoiced half-frames, update the low band and full band unvoiced*/
+    /* energy estimates (LBUE and FBUE) and also the zero crossing */
+    /* threshold (DITHER).  (The input to the unvoiced energy filters is */
+    /* restricted to be less than 10dB above the previous inputs of the */
+    /* filters.) */
+    /* During voiced half-frames, update the low-pass (LBVE) and all-pass */
+    /* (FBVE) voiced energy estimates. */
+    if (s->voibuf[3][half] == 0)
+    {
+        r1 = (s->sfbue*63 + (min(fbe, s->ofbue*3) << 3))/64.0f;
+        s->sfbue = lrintf(r1);
+        s->fbue = s->sfbue/8;
+        s->ofbue = fbe;
+        r1 = (s->slbue*63 + (min(lbe, s->olbue*3) << 3))/64.0f;
+        s->slbue = lrintf(r1);
+        s->lbue = s->slbue/8;
+        s->olbue = lbe;
+    }
+    else
+    {
+        s->lbve = lrintf((s->lbve*63 + lbe)/64.0f);
+        s->fbve = lrintf((s->fbve*63 + fbe)/64.0f);
+    }
+    /* Set dither threshold to yield proper zero crossing rates in the */
+    /* presence of low frequency noise and low level signal input. */
+    /* NOTE: The divisor is a function of REF, the expected energies. */
+    /* Computing MIN */
+    /* Computing MAX */
+    r2 = sqrtf((float) (s->lbue*s->lbve))*64/3000;
+    r1 = max(r2, 1.0f);
+    s->dither = min(r1, 20.0f);
+    /* Voicing decisions are returned in VOIBUF. */
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/modem_connect_tones.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,321 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * modem_connect_tones.c - Generation and detection of tones
+ * associated with modems calling and answering calls.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: modem_connect_tones.c,v 1.6 2006/11/30 15:41:47 steveu Exp $
+ */
+ 
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dds.h"
+#include "spandsp/tone_detect.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/super_tone_rx.h"
+#include "spandsp/modem_connect_tones.h"
+
+int modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
+                           int16_t amp[],
+                           int len)
+{
+    int mod;
+    int i;
+
+    switch (s->tone_type)
+    {
+    case MODEM_CONNECT_TONES_FAX_CNG:
+    case MODEM_CONNECT_TONES_FAX_CED:
+        len = tone_gen(&s->tone_tx, amp, len);
+        break;
+    case MODEM_CONNECT_TONES_EC_DISABLE:
+        for (i = 0;  i < len;  i++)
+        {
+            if (--s->hop_timer <= 0)
+            {
+                s->hop_timer = ms_to_samples(450);
+                s->tone_phase += 0x80000000;
+            }
+            amp[i] = dds_mod(&s->tone_phase, s->tone_phase_rate, s->level, 0);
+        }
+        break;
+    case MODEM_CONNECT_TONES_EC_DISABLE_MOD:
+        for (i = 0;  i < len;  i++)
+        {
+            mod = s->level + dds_mod(&s->mod_phase, s->mod_phase_rate, s->mod_level, 0);
+            if (--s->hop_timer <= 0)
+            {
+                s->hop_timer = ms_to_samples(450);
+                s->tone_phase += 0x80000000;
+            }
+            amp[i] = dds_mod(&s->tone_phase, s->tone_phase_rate, mod, 0);
+        }
+        break;
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+modem_connect_tones_tx_state_t *modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
+                                                            int tone_type)
+{
+    tone_gen_descriptor_t tone_desc;
+
+    s->tone_type = tone_type;
+    switch (s->tone_type)
+    {
+    case MODEM_CONNECT_TONES_FAX_CNG:
+        make_tone_gen_descriptor(&tone_desc,
+                                 1100,
+                                 -11,
+                                 0,
+                                 0,
+                                 500,
+                                 3000,
+                                 0,
+                                 0,
+                                 TRUE);
+        tone_gen_init(&s->tone_tx, &tone_desc);
+        break;
+    case MODEM_CONNECT_TONES_FAX_CED:
+        make_tone_gen_descriptor(&tone_desc,
+                                 2100,
+                                 -11,
+                                 0,
+                                 0,
+                                 2600,
+                                 0,
+                                 0,
+                                 0,
+                                 FALSE);
+        tone_gen_init(&s->tone_tx, &tone_desc);
+        break;
+    case MODEM_CONNECT_TONES_EC_DISABLE:
+    case MODEM_CONNECT_TONES_EC_DISABLE_MOD:
+        s->tone_phase_rate = dds_phase_rate(2100.0);
+        s->mod_phase_rate = dds_phase_rate(15.0);
+        s->tone_phase = 0;
+        s->mod_phase = 0;
+        s->hop_timer = ms_to_samples(450);
+        s->level = dds_scaling_dbm0(-12);
+        if (s->tone_type == MODEM_CONNECT_TONES_EC_DISABLE_MOD)
+            s->mod_level = s->level/5;
+        else
+            s->mod_level = 0;
+    }
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, const int16_t amp[], int len)
+{
+    int i;
+    int16_t notched;
+    float v1;
+    float famp;
+    
+    switch (s->tone_type)
+    {
+    case MODEM_CONNECT_TONES_FAX_CNG:
+        for (i = 0;  i < len;  i++)
+        {
+            /* A Cauer notch at 1100Hz, spread just wide enough to meet our detection bandwidth
+               criteria. */
+            famp = amp[i];
+            v1 = 0.792928f*famp + 1.0018744927985f*s->z1 - 0.54196833412465f*s->z2;
+            famp = v1 - 1.2994747954630f*s->z1 + s->z2;
+            s->z2 = s->z1;
+            s->z1 = v1;
+            notched = rintf(famp);
+
+            /* Estimate the overall energy in the channel, and the energy in
+               the notch (i.e. overall channel energy - tone energy => noise).
+               Use abs instead of multiply for speed (is it really faster?). */
+            s->channel_level += ((abs(amp[i]) - s->channel_level) >> 5);
+            s->notch_level += ((abs(notched) - s->notch_level) >> 5);
+            if (s->channel_level > 70  &&  s->notch_level*6 < s->channel_level)
+            {
+                /* There is adequate energy in the channel, and it is mostly at 1100Hz. */
+                if (!s->tone_present)
+                {
+                    if (++s->tone_cycle_duration >= ms_to_samples(415))
+                    {
+                        if (s->tone_callback)
+                            s->tone_callback(s->callback_data, TRUE);
+                        else
+                            s->hit = TRUE;
+                        s->tone_present = TRUE;
+                    }
+                }
+            }
+            else
+            {
+                s->tone_cycle_duration = 0;
+            }
+        }
+        break;
+    case MODEM_CONNECT_TONES_FAX_CED:
+        for (i = 0;  i < len;  i++)
+        {
+            /* A Cauer notch at 2100Hz, spread just wide enough to meet our detection bandwidth
+               criteria. */
+            famp = amp[i];
+            v1 = 0.76000f*famp - 0.1183852f*s->z1 - 0.5104039f*s->z2;
+            famp = v1 + 0.1567596f*s->z1 + s->z2;
+            s->z2 = s->z1;
+            s->z1 = v1;
+            notched = rintf(famp);
+            /* Estimate the overall energy in the channel, and the energy in
+               the notch (i.e. overall channel energy - tone energy => noise).
+               Use abs instead of multiply for speed (is it really faster?). */
+            s->channel_level += ((abs(amp[i]) - s->channel_level) >> 5);
+            s->notch_level += ((abs(notched) - s->notch_level) >> 5);
+            if (s->channel_level > 70  &&  s->notch_level*6 < s->channel_level)
+            {
+                /* There is adequate energy in the channel, and it is mostly at 2100Hz. */
+                if (!s->tone_present)
+                {
+                    if (++s->tone_cycle_duration >= ms_to_samples(500))
+                    {
+                        if (s->tone_callback)
+                            s->tone_callback(s->callback_data, TRUE);
+                        else
+                            s->hit = TRUE;
+                        s->tone_present = TRUE;
+                    }
+                }
+            }
+            else
+            {
+                s->tone_cycle_duration = 0;
+            }
+        }
+        break;
+    case MODEM_CONNECT_TONES_EC_DISABLE:
+    case MODEM_CONNECT_TONES_EC_DISABLE_MOD:
+        for (i = 0;  i < len;  i++)
+        {
+            /* A Cauer notch at 2100Hz, spread just wide enough to meet our detection bandwidth
+               criteria. */
+            /* This is actually centred at 2095Hz, but gets the balance we want, due
+               to the asymmetric walls of the notch */
+            famp = amp[i];
+            v1 = 0.76000f*famp - 0.1183852f*s->z1 - 0.5104039f*s->z2;
+            famp = v1 + 0.1567596f*s->z1 + s->z2;
+            s->z2 = s->z1;
+            s->z1 = v1;
+            notched = rintf(famp);
+            /* Estimate the overall energy in the channel, and the energy in
+               the notch (i.e. overall channel energy - tone energy => noise).
+               Use abs instead of multiply for speed (is it really faster?).
+               Damp the overall energy a little more for a stable result.
+               Damp the notch energy a little less, so we don't damp out the
+               blip every time the phase reverses */
+            s->channel_level += ((abs(amp[i]) - s->channel_level) >> 5);
+            s->notch_level += ((abs(notched) - s->notch_level) >> 4);
+            if (s->channel_level > 280)
+            {
+                /* There is adequate energy in the channel. Is it mostly at 2100Hz? */
+                if (s->notch_level*6 < s->channel_level)
+                {
+                    /* The notch says yes, so we have the tone. */
+                    if (!s->tone_present)
+                    {
+                        /* Do we get a kick every 450+-25ms? */
+                        if (s->tone_cycle_duration >= ms_to_samples(425)
+                            &&
+                            s->tone_cycle_duration <= ms_to_samples(475))
+                        {
+                            if (++s->good_cycles > 2)
+                            {
+                                if (s->tone_callback)
+                                    s->tone_callback(s->callback_data, TRUE);
+                                else
+                                    s->hit = TRUE;
+                            }
+                        }
+                        s->tone_cycle_duration = 0;
+                        s->tone_present = TRUE;
+                    }
+                }
+                else
+                {
+                    s->tone_present = FALSE;
+                }
+                s->tone_cycle_duration++;
+            }
+            else
+            {
+                s->tone_present = FALSE;
+                s->tone_cycle_duration = 0;
+                s->good_cycles = 0;
+            }
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s)
+{
+    int x;
+    
+    x = s->hit;
+    s->hit = FALSE;
+    return x;
+}
+/*- End of function --------------------------------------------------------*/
+
+modem_connect_tones_rx_state_t *modem_connect_tones_rx_init(modem_connect_tones_rx_state_t *s,
+                                                            int tone_type,
+                                                            tone_report_func_t tone_callback,
+                                                            void *user_data)
+{
+    s->tone_type = tone_type;
+    s->channel_level = 0;
+    s->notch_level = 0;    
+    s->tone_present = FALSE;
+    s->tone_cycle_duration = 0;
+    s->good_cycles = 0;
+    s->hit = FALSE;
+    s->tone_callback = tone_callback;
+    s->callback_data = user_data;
+    s->z1 = 0.0f;
+    s->z2 = 0.0f;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/modem_echo.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,176 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * modem_echo.c - An echo cancellor, suitable for electrical echos in GSTN modems
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001, 2003, 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: modem_echo.c,v 1.17 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+/* The FIR taps must be adapted as 32 bit values, to get the necessary finesse
+   in the adaption process. However, they are applied as 16 bit values (bits 30-15
+   of the 32 bit values) in the FIR. For the working 16 bit values, we need 4 sets.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/modem_echo.h"
+
+modem_echo_can_state_t *modem_echo_can_create(int len)
+{
+    modem_echo_can_state_t *ec;
+
+    ec = (modem_echo_can_state_t *) malloc(sizeof(*ec));
+    if (ec == NULL)
+        return  NULL;
+    memset(ec, 0, sizeof(*ec));
+    ec->taps = len;
+    ec->curr_pos = ec->taps - 1;
+    if ((ec->fir_taps32 = (int32_t *) malloc(ec->taps*sizeof(int32_t))) == NULL)
+    {
+        free(ec);
+        return  NULL;
+    }
+    memset(ec->fir_taps32, 0, ec->taps*sizeof(int32_t));
+    if ((ec->fir_taps16 = (int16_t *) malloc(ec->taps*sizeof(int16_t))) == NULL)
+    {
+        free(ec->fir_taps32);
+        free(ec);
+        return  NULL;
+    }
+    memset(ec->fir_taps16, 0, ec->taps*sizeof(int16_t));
+    if (fir16_create(&ec->fir_state, ec->fir_taps16, ec->taps) == NULL)
+    {
+        free(ec->fir_taps16);
+        free(ec->fir_taps32);
+        free(ec);
+        return  NULL;
+    }
+    return  ec;
+}
+/*- End of function --------------------------------------------------------*/
+
+void modem_echo_can_free(modem_echo_can_state_t *ec)
+{
+    fir16_free(&ec->fir_state);
+    free(ec->fir_taps32);
+    free(ec->fir_taps16);
+    free(ec);
+}
+/*- End of function --------------------------------------------------------*/
+
+void modem_echo_can_flush(modem_echo_can_state_t *ec)
+{
+    ec->tx_power = 0;
+
+    fir16_flush(&ec->fir_state);
+    ec->fir_state.curr_pos = ec->taps - 1;
+    memset(ec->fir_taps32, 0, ec->taps*sizeof(int32_t));
+    memset(ec->fir_taps16, 0, ec->taps*sizeof(int16_t));
+    ec->curr_pos = ec->taps - 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+void modem_echo_can_adaption_mode(modem_echo_can_state_t *ec, int adapt)
+{
+    ec->adapt = adapt;
+}
+/*- End of function --------------------------------------------------------*/
+
+int16_t modem_echo_can_update(modem_echo_can_state_t *ec, int16_t tx, int16_t rx)
+{
+    int32_t echo_value;
+    int clean_rx;
+    int shift;
+    int i;
+    int offset1;
+    int offset2;
+
+    /* Evaluate the echo - i.e. apply the FIR filter */
+    /* Assume the gain of the FIR does not exceed unity. Exceeding unity
+       would seem like a rather poor thing for an echo cancellor to do :)
+       This means we can compute the result with a total disregard for
+       overflows. 16bits x 16bits -> 31bits, so no overflow can occur in
+       any multiply. While accumulating we may overflow and underflow the
+       32 bit scale often. However, if the gain does not exceed unity,
+       everything should work itself out, and the final result will be
+       OK, without any saturation logic. */
+    /* Overflow is very much possible here, and we do nothing about it because
+       of the compute costs */
+    echo_value = fir16(&ec->fir_state, tx);
+
+    /* And the answer is..... */
+    clean_rx = rx - echo_value;
+    //printf("%8d %8d %8d %8d\n", tx, rx, echo_value, clean_rx);
+    if (ec->adapt)
+    {
+        /* Calculate short term power levels using very simple single pole IIRs */
+        /* TODO: Is the nasty modulus approach the fastest, or would a real
+                 tx*tx power calculation actually be faster? Using the squares
+                 makes the numbers grow a lot! */
+        ec->tx_power += ((tx*tx - ec->tx_power) >> 5);
+
+        shift = 1;
+        /* Update the FIR taps */
+        offset2 = ec->curr_pos;
+        offset1 = ec->taps - offset2;
+        for (i = ec->taps - 1;  i >= offset1;  i--)
+        {
+            /* Leak to avoid the coefficients drifting beyond the ability of the
+               adaption process to bring them back under control. */
+            ec->fir_taps32[i] -= (ec->fir_taps32[i] >> 23);
+            ec->fir_taps32[i] += (ec->fir_state.history[i - offset1]*clean_rx) >> shift;
+            ec->fir_taps16[i] = (int16_t) (ec->fir_taps32[i] >> 15);
+        }
+        for (  ;  i >= 0;  i--)
+        {
+            ec->fir_taps32[i] -= (ec->fir_taps32[i] >> 23);
+            ec->fir_taps32[i] += (ec->fir_state.history[i + offset2]*clean_rx) >> shift;
+            ec->fir_taps16[i] = (int16_t) (ec->fir_taps32[i] >> 15);
+        }
+    }
+
+    /* Roll around the rolling buffer */
+    if (ec->curr_pos <= 0)
+        ec->curr_pos = ec->taps;
+    ec->curr_pos--;
+    return  (int16_t) clean_rx;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/gettimeofday.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,14 @@
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
+
+#include "windows.h"
+
+void gettimeofday(struct timeval *tv, void *tz)
+{
+    long int l = GetTickCount();
+ 
+    tv->tv_sec = l / 1000;
+    tv->tv_usec = (l % 1000) * 1000;
+    return;
+} 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/inttypes.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,71 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * inttypes.h - a fudge for MSVC, which lacks this header
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Michael Jerris
+ *
+ *
+ * This file is released in the public domain.
+ *
+ */
+
+#if !defined(_INTTYPES_H_)
+#define _INTTYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef _MSC_VER
+#if (_MSC_VER >= 1400) // VC8+
+#ifndef _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE
+#endif
+#ifndef _CRT_NONSTDC_NO_DEPRECATE
+#define _CRT_NONSTDC_NO_DEPRECATE
+#endif
+#endif // VC8+
+#include "windows.h"
+typedef unsigned __int8		uint8_t;
+typedef unsigned __int16	uint16_t;
+typedef unsigned __int32	uint32_t;
+typedef unsigned __int64    uint64_t;
+typedef __int8		int8_t;
+typedef __int16		int16_t;
+typedef __int32		int32_t;
+typedef __int64		int64_t;
+#define inline __inline
+#define __inline__ __inline
+#define  INT16_MAX   0x7fff 
+#define  INT16_MIN   (-INT16_MAX - 1) 
+#define _MMX_H_
+
+/* disable the following warnings 
+ * C4100: The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored. 
+ * C4200: Non standard extension C zero sized array
+ * C4706: assignment within conditional expression
+ * C4244: conversion from 'type1' to 'type2', possible loss of data
+ * C4295: array is too small to include a terminating null character
+ * C4125: decimal digit terminates octal escape sequence
+ */
+#pragma warning(disable:4100 4200 4706 4295 4125)
+
+#pragma comment(lib, "ws2_32.lib")
+
+#define strncasecmp _strnicmp
+#define strcasecmp _stricmp
+#define snprintf _snprintf
+
+#if !defined(INFINITY)
+#define INFINITY 0x7fffffff
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/msvcproj.foot	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,7 @@
+
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/msvcproj.head	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,92 @@
+# Microsoft Developer Studio Project File - Name="spandsp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=spandsp - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "spandsp.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "spandsp.mak" CFG="spandsp - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "spandsp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "spandsp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "spandsp - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libspandsp.dll"
+
+!ELSEIF  "$(CFG)" == "spandsp - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c
+# SUBTRACT CPP /WX /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libspandsp.dll" /pdbtype:sept
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF 
+
+# Begin Target
+
+# Name "spandsp - Win32 Release"
+# Name "spandsp - Win32 Debug"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/spandsp.def	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,304 @@
+EXPORTS
+adsi_rx_init
+adsi_rx
+adsi_tx_init
+adsi_send_alert_tone
+adsi_put_message
+adsi_next_field
+adsi_add_field
+async_tx_init
+async_rx_init
+awgn
+bert_init
+bert_get_bit
+bert_put_bit
+bert_set_report
+bert_result
+filter_create
+filter_delete
+filter_step
+cfilter_create
+cfilter_delete
+cfilter_step
+dds_phase_rate
+dds_frequency
+dds_scaling_dbm0
+dds_scaling_dbov
+dds_lookup
+dds_offset
+dds
+dds_mod
+dds_complex
+dds_complex_mod
+dds_phase_ratef
+dds_frequencyf
+dds_scaling_dbm0f
+dds_scaling_dbovf
+ddsf
+dds_modf
+dds_complexf
+dds_complex_modf
+echo_can_create
+echo_can_free
+echo_can_flush
+echo_can_adaption_mode
+echo_can_update
+fax_rx
+fax_tx
+fax_set_flush_handler
+fax_init
+fax_release
+fsk_tx_init
+fsk_tx_power
+fsk_tx_set_get_bit
+fsk_tx
+fsk_rx_signal_power
+fsk_rx_signal_cutoff
+fsk_rx_init
+fsk_rx
+fsk_rx_set_put_bit
+g722_encode_init
+g722_encode_release
+g722_encode
+g722_decode_init
+g722_decode_release
+g722_decode
+g726_init
+g726_release
+crc_itu32_calc
+crc_itu32_append
+crc_itu32_check
+crc_itu16_calc
+crc_itu16_append
+crc_itu16_check
+hdlc_rx_init
+hdlc_rx_get_stats
+hdlc_tx_init
+hdlc_tx_frame
+hdlc_tx_preamble
+ima_adpcm_init
+ima_adpcm_release
+span_log_test
+span_log
+span_log_buf
+span_log_init
+span_log_set_protocol
+span_set_message_handler
+span_set_error_handler
+modem_echo_can_create
+modem_echo_can_free
+modem_echo_can_flush
+modem_echo_can_adaption_mode
+modem_echo_can_update
+noise
+oki_adpcm_init
+oki_adpcm_release
+playout_put
+playout_get
+playout_get_unconditional
+playout_current_length
+playout_next_due
+playout_new
+playout_free
+playout_restart
+plc_rx
+plc_fillin
+plc_init
+plc_release
+power_meter_init
+power_meter_damping
+power_meter_update
+power_meter_dbm0
+power_meter_dbov
+power_meter_level_dbm0
+power_meter_level_dbov
+queue_empty
+queue_free_space
+queue_contents
+queue_flush
+queue_view
+queue_read
+queue_write
+queue_test_msg
+queue_read_msg
+queue_write_msg
+queue_create
+queue_delete
+sig_tone_init
+sig_tone_rx
+sig_tone_tx
+super_tone_rx_make_descriptor
+super_tone_rx_add_tone
+super_tone_rx_add_element
+super_tone_rx_init
+super_tone_rx_free
+super_tone_rx_segment_callback
+super_tone_rx
+super_tone_tx_make_step
+super_tone_tx_free
+super_tone_tx_init
+super_tone_tx
+t30_init
+t30_release
+t30_restart
+t30_create
+t30_free
+t30_frametype
+t30_decode_dis_dtc_dcs
+t30_completion_code_to_str
+t30_set_header_info
+t30_set_local_ident
+t30_get_sub_address
+t30_get_header_info
+t30_get_local_ident
+t30_get_far_ident
+t30_get_transfer_statistics
+t30_set_phase_b_handler
+t30_set_phase_d_handler
+t30_set_phase_e_handler
+t30_set_document_handler
+t30_set_rx_file
+t30_set_tx_file
+t30_local_interrupt_request
+t30_send_complete
+t30_hdlc_accept
+t30_timer_update
+t31_call_event
+t31_at_rx
+t31_rx
+t31_tx
+t31_init
+t31_release
+t35_decode
+t38_indicator
+t38_data_type
+t38_field_type
+t38_terminal_init
+t38_gateway_init
+t4_rx_create
+t4_rx_init
+t4_rx_start_page
+t4_rx_end_page
+t4_rx_delete
+t4_rx_end
+t4_rx_set_rx_encoding
+t4_rx_set_sub_address
+t4_rx_set_far_ident
+t4_rx_set_vendor
+t4_rx_set_model
+t4_tx_create
+t4_tx_init
+t4_tx_start_page
+t4_tx_restart_page
+t4_tx_end_page
+t4_tx_delete
+t4_tx_end
+t4_tx_set_tx_encoding
+t4_tx_set_min_row_bits
+t4_tx_set_local_ident
+t4_tx_set_header_info
+t4_get_transfer_statistics
+t4_encoding_to_str
+time_scale_init
+time_scale_rate
+time_scale
+make_goertzel_descriptor
+goertzel_init
+goertzel_update
+goertzel_result
+dtmf_rx_init
+dtmf_rx_set_realtime_callback
+dtmf_rx_parms
+dtmf_rx
+make_tone_descriptor
+make_tone_gen_descriptor
+tone_gen_init
+tone_gen
+dtmf_tx_init
+dtmf_tx
+v17_rx_init
+v17_rx_restart
+v17_rx_release
+v17_rx_set_put_bit
+v17_rx
+v17_rx_equalizer_state
+v17_rx_carrier_frequency
+v17_rx_symbol_timing_correction
+v17_rx_signal_power
+v17_rx_signal_cutoff
+v17_rx_set_qam_report_handler
+v17_tx_power
+v17_tx_init
+v17_tx_restart
+v17_tx_release
+v17_tx_set_get_bit
+v17_tx
+v22bis_rx_restart
+v22bis_rx
+v22bis_rx_equalizer_state
+v22bis_rx_carrier_frequency
+v22bis_rx_symbol_timing_correction
+v22bis_rx_signal_power
+v22bis_rx_set_qam_report_handler
+v22bis_tx
+v22bis_tx_power
+v22bis_restart
+v22bis_init
+v22bis_set_get_bit
+v22bis_set_put_bit
+v27ter_rx_init
+v27ter_rx_restart
+v27ter_rx_release
+v27ter_rx_set_put_bit
+v27ter_rx
+v27ter_rx_equalizer_state
+v27ter_rx_carrier_frequency
+v27ter_rx_symbol_timing_correction
+v27ter_rx_signal_power
+v27ter_rx_signal_cutoff
+v27ter_rx_set_qam_report_handler
+v27ter_tx_power
+v27ter_tx_init
+v27ter_tx_restart
+v27ter_tx_release
+v27ter_tx_set_get_bit
+v27ter_tx
+v29_rx_init
+v29_rx_restart
+v29_rx_release
+v29_rx_set_put_bit
+v29_rx
+v29_rx_equalizer_state
+v29_rx_carrier_frequency
+v29_rx_symbol_timing_correction
+v29_rx_signal_power
+v29_rx_signal_cutoff
+v29_rx_set_qam_report_handler
+v29_tx_power
+v29_tx_init
+v29_tx_restart
+v29_tx_release
+v29_tx_set_get_bit
+v29_tx
+lapm_dump
+lapm_receive
+lapm_tx
+lapm_tx_iframe
+v42_set_status_callback
+v42_rx_bit
+v42_tx_bit
+v42_init
+v42_restart
+v42_release
+v42bis_compress
+v42bis_compress_flush
+v42bis_decompress
+v42bis_decompress_flush
+v42bis_init
+v42bis_release
+v8_init
+v8_release
+v8_tx
+v8_rx
+v8_log_supported_modulations
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/sys/time.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1 @@
+extern void gettimeofday(struct timeval *tv, void *tz);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/tgmath.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,60 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * tgmath.h - a fudge for MSVC, which lacks this header
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Michael Jerris
+ *
+ *
+ * This file is released in the public domain.
+ *
+ */
+
+#if !defined(_TGMATH_H_)
+#define _TGMATH_H_
+
+#include <math.h>
+
+#if !defined(M_PI)
+/* C99 systems may not define M_PI */
+#define M_PI 3.14159265358979323846264338327
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* A kindofa rint() for VC++ (only kindofa, because rint should be type generic,
+   and this one is purely float to int */
+static inline long int lrintf(float a)
+{
+    long int i;
+    
+    __asm
+    {
+        fld   a
+        fistp i
+    }
+    return i;
+}
+
+static inline long int lrint(double a)
+{
+    long int i;
+    
+    __asm
+    {
+        fld   a
+        fistp i
+    }
+    return i;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/unistd.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,31 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * inttypes.h - a fudge for MSVC, which lacks this header
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Michael Jerris
+ *
+ *
+ * This file is released in the public domain.
+ *
+ */
+
+#if !defined(_INTTYPES_H_)
+#define _INTTYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define open _open
+#define write _write
+
+extern int gethostname (char *name, size_t len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/vc8proj.foot	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,11 @@
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/msvc/vc8proj.head	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="libspandsp"
+	ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
+	RootNamespace="libspandsp"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="src; src\spandsp; src\msvc"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				ModuleDefinitionFile="src/msvc/spandsp.def"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="src; src\spandsp; src\msvc"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				ModuleDefinitionFile="src/msvc/spandsp.def"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/noise.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,108 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * noise.c - A low complexity audio noise generator, suitable for
+ *           real time generation (current AWGN, and Hoth)
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: noise.c,v 1.17 2006/11/28 16:59:56 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/noise.h"
+
+int16_t noise(noise_state_t *s)
+{
+    int32_t val;
+    int i;
+
+    /* The central limit theorem says if you add a few random numbers together,
+       the result starts to look Gaussian. Quantities above 7 give diminishing
+       returns. Quantites above 20 are exceedingly Gaussian. */
+    val = 0;
+    for (i = 0;  i < s->quality;  i++)
+    {
+        s->rndnum = 1664525U*s->rndnum + 1013904223U;
+        val += ((int32_t) s->rndnum) >> 22;
+    }
+    if (s->class_of_noise == NOISE_CLASS_HOTH)
+    {
+        /* Hoth noise is room-like. It should be sculpted, at the high and low ends,
+           and roll off at 5dB/octave across the main part of the band. However,
+           merely rolling off at 6dB/octave across the band gets you close
+           to the subjective effect. */
+        s->state = (3*val + 5*s->state) >> 3;
+        /* Bring the overall power level back to the pre-filtered level. This
+           simple approx. leaves the signal about 0.35dB low. */
+        val = s->state << 1;
+    }
+    return saturate((val*s->rms) >> 10);
+}
+/*- End of function --------------------------------------------------------*/
+
+noise_state_t *noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
+{
+    return noise_init_dbov(s, seed, (level - DBM0_MAX_POWER), class_of_noise, quality);
+}
+/*- End of function --------------------------------------------------------*/
+
+noise_state_t *noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
+{
+    float rms;
+
+    memset(s, 0, sizeof(*s));
+    s->rndnum = (uint32_t) seed;
+    rms = 32768.0f*powf(10.0f, level/20.0f);
+    if (quality < 4)
+        s->quality = 4;
+    else if (quality > 20)
+        s->quality = 20;
+    else
+        s->quality = quality;
+    if (class_of_noise == NOISE_CLASS_HOTH)
+    {
+        /* Allow for the gain of the filter */
+        rms *= 1.043f;
+    }
+    s->rms = (int32_t) (rms*sqrt(12.0/quality));
+    s->class_of_noise = class_of_noise;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/oki_adpcm.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,376 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * oki_adpcm.c - Conversion routines between linear 16 bit PCM data and
+ *               OKI (Dialogic) ADPCM format. Supports with the 32kbps
+ *               and 24kbps variants used by Dialogic.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001, 2004 Steve Underwood
+ *
+ * The actual OKI ADPCM encode and decode method is derived from freely
+ * available code, whose exact origins seem uncertain.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: oki_adpcm.c,v 1.22 2006/11/28 16:59:56 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/oki_adpcm.h"
+
+/* Routines to convert 12 bit linear samples to the Oki ADPCM coding format,
+   widely used in CTI, because Dialogic use it. */
+
+static const int16_t step_size[49] =
+{
+      16,   17,   19,   21,   23,   25,   28,   31,
+      34,   37,   41,   45,   50,   55,   60,   66,
+      73,   80,   88,   97,  107,  118,  130,  143,
+     157,  173,  190,  209,  230,  253,  279,  307,
+     337,  371,  408,  449,  494,  544,  598,  658,
+     724,  796,  876,  963, 1060, 1166, 1282, 1408,
+    1552
+};
+
+static const int16_t step_adjustment[8] =
+{
+    -1, -1, -1, -1, 2, 4, 6, 8
+};
+
+/* Band limiting filter, to allow sample rate conversion to and
+   from 6k samples/second. */
+static const float cutoff_coeffs[] =
+{
+    -3.648392e-4f,
+     5.062391e-4f,
+     1.206247e-3f,
+     1.804452e-3f,
+     1.691750e-3f,
+     4.083405e-4f,
+    -1.931085e-3f,
+    -4.452107e-3f,
+    -5.794821e-3f,
+    -4.778489e-3f,
+    -1.161266e-3f,
+     3.928504e-3f,
+     8.259786e-3f,
+     9.500425e-3f,
+     6.512800e-3f,
+     2.227856e-4f,
+    -6.531275e-3f,
+    -1.026843e-2f,
+    -8.718062e-3f,
+    -2.280487e-3f,
+     5.817733e-3f,
+     1.096777e-2f,
+     9.634404e-3f,
+     1.569301e-3f,
+    -9.522632e-3f,
+    -1.748273e-2f,
+    -1.684408e-2f,
+    -6.100054e-3f,
+     1.071206e-2f,
+     2.525209e-2f,
+     2.871779e-2f,
+     1.664411e-2f,
+    -7.706268e-3f,
+    -3.331083e-2f,
+    -4.521249e-2f,
+    -3.085962e-2f,
+     1.373653e-2f,
+     8.089593e-2f,
+     1.529060e-1f,
+     2.080487e-1f,
+     2.286834e-1f,
+     2.080487e-1f,
+     1.529060e-1f,
+     8.089593e-2f,
+     1.373653e-2f,
+    -3.085962e-2f,
+    -4.521249e-2f,
+    -3.331083e-2f,
+    -7.706268e-3f,
+     1.664411e-2f,
+     2.871779e-2f,
+     2.525209e-2f,
+     1.071206e-2f,
+    -6.100054e-3f,
+    -1.684408e-2f,
+    -1.748273e-2f,
+    -9.522632e-3f,
+     1.569301e-3f,
+     9.634404e-3f,
+     1.096777e-2f,
+     5.817733e-3f,
+    -2.280487e-3f,
+    -8.718062e-3f,
+    -1.026843e-2f,
+    -6.531275e-3f,
+     2.227856e-4f,
+     6.512800e-3f,
+     9.500425e-3f,
+     8.259786e-3f,
+     3.928504e-3f,
+    -1.161266e-3f,
+    -4.778489e-3f,
+    -5.794821e-3f,
+    -4.452107e-3f,
+    -1.931085e-3f,
+     4.083405e-4f,
+     1.691750e-3f,
+     1.804452e-3f,
+     1.206247e-3f,
+     5.062391e-4f,
+    -3.648392e-4f
+};
+
+static int16_t decode(oki_adpcm_state_t *s, uint8_t adpcm)
+{
+    int16_t e;
+    int16_t ss;
+    int16_t linear;
+
+    /* Doing the next part as follows:
+     *
+     * x = adpcm & 0x07;
+     * e = (step_size[s->step_index]*(x + x + 1)) >> 3;
+     * 
+     * Seems an obvious improvement on a modern machine, but remember
+     * the truncation errors do not come out the same. It would
+     * not, therefore, be an exact match for what this code is doing.
+     *
+     * Just what a Dialogic card does, I do not know!
+     */
+
+    ss = step_size[s->step_index];
+    e = ss >> 3;
+    if (adpcm & 0x01)
+        e += (ss >> 2);
+    /*endif*/
+    if (adpcm & 0x02)
+        e += (ss >> 1);
+    /*endif*/
+    if (adpcm & 0x04)
+        e += ss;
+    /*endif*/
+    if (adpcm & 0x08)
+        e = -e;
+    /*endif*/
+    linear = s->last + e;
+
+    /* Saturate the values to +/- 2^11 (supposed to be 12 bits) */
+    if (linear > 2047)
+        linear = 2047;
+    else if (linear < -2048)
+        linear = -2048;
+    /*endif*/
+
+    s->last = linear;
+    s->step_index += step_adjustment[adpcm & 0x07];
+    if (s->step_index < 0)
+        s->step_index = 0;
+    else if (s->step_index > 48)
+        s->step_index = 48;
+    /*endif*/
+    /* Note: the result here is a 12 bit value */
+    return linear;
+}
+/*- End of function --------------------------------------------------------*/
+
+static uint8_t encode(oki_adpcm_state_t *s, int16_t linear)
+{
+    int16_t e;
+    int16_t ss;
+    uint8_t adpcm;
+
+    ss = step_size[s->step_index];
+    e = (linear >> 4) - s->last;
+    adpcm = (uint8_t) 0x00;
+    if (e < 0)
+    {
+        adpcm = (uint8_t) 0x08;
+        e = -e;
+    }
+    /*endif*/
+    if (e >= ss)
+    {
+        adpcm |= (uint8_t) 0x04;
+        e -= ss;
+    }
+    /*endif*/
+    if (e >= (ss >> 1))
+    {
+        adpcm |= (uint8_t) 0x02;
+        e -= ss;
+    }
+    /*endif*/
+    if (e >= (ss >> 2))
+        adpcm |= (uint8_t) 0x01;
+    /*endif*/
+
+    /* Use the decoder to set the estimate of the last sample. */
+    /* It also will adjust the step_index for us. */
+    s->last = decode(s, adpcm);
+    return adpcm;
+}
+/*- End of function --------------------------------------------------------*/
+
+oki_adpcm_state_t *oki_adpcm_init(oki_adpcm_state_t *s, int bit_rate)
+{
+    if (bit_rate != 32000  &&  bit_rate != 24000)
+        return NULL;
+    if (s == NULL)
+    {
+        if ((s = (oki_adpcm_state_t *) malloc(sizeof(*s))) == NULL)
+            return  NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    s->bit_rate = bit_rate;
+    
+    return  s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int oki_adpcm_release(oki_adpcm_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int oki_adpcm_decode(oki_adpcm_state_t *s,
+                     int16_t amp[],
+                     const uint8_t oki_data[],
+                     int oki_bytes)
+{
+    int i;
+    int x;
+    int l;
+    int n;
+    int samples;
+    float z;
+
+    samples = 0;
+    if (s->bit_rate == 32000)
+    {
+        for (i = 0;  i < oki_bytes;  i++)
+        {
+            amp[samples++] = decode(s, (oki_data[i] >> 4) & 0xF) << 4;
+            amp[samples++] = decode(s, oki_data[i] & 0xF) << 4;
+        }
+        /*endwhile*/
+    }
+    else
+    {
+        n = 0;
+        for (i = 0;  i < oki_bytes;  )
+        {
+            /* 6k to 8k sample/second conversion */
+            if (s->phase)
+            {
+                s->history[s->ptr++] =
+                    decode(s, (n++ & 1)  ?  (oki_data[i++] & 0xF)  :  ((oki_data[i] >> 4) & 0xF)) << 4;
+                s->ptr &= (32 - 1);
+            }
+            /*endif*/
+            z = 0.0f;
+            for (l = 80 - 3 + s->phase, x = s->ptr - 1;  l >= 0;  l -= 4, x--)
+                z += cutoff_coeffs[l]*s->history[x & (32 - 1)];
+            amp[samples++] = (int16_t) (z*4.0f);
+            if (++s->phase > 3)
+                s->phase = 0;
+            /*endif*/
+        }
+        /*endfor*/
+    }
+    /*endif*/
+    return  samples;
+}
+/*- End of function --------------------------------------------------------*/
+
+int oki_adpcm_encode(oki_adpcm_state_t *s,
+                     uint8_t oki_data[],
+                     const int16_t amp[],
+                     int len)
+{
+    int x;
+    int l;
+    int n;
+    int bytes;
+    float z;
+
+    bytes = 0;
+    if (s->bit_rate == 32000)
+    {
+        for (n = 0;  n < len;  n++)
+        {
+            s->oki_byte = (s->oki_byte << 4) | encode(s, amp[n]);
+            if ((s->mark++ & 1))
+                oki_data[bytes++] = s->oki_byte;
+            /*endif*/
+        }
+        /*endfor*/
+    }
+    else
+    {
+        n = 0;
+        for (;;)
+        {
+            /* 8k to 6k sample/second conversion */
+            if (s->phase > 2)
+            {
+                s->history[s->ptr++] = amp[n];
+                s->ptr &= (32 - 1);
+                s->phase = 0;
+                if (++n >= len)
+                    break;
+                /*endif*/
+            }
+            /*endif*/
+            s->history[s->ptr++] = amp[n];
+            s->ptr &= (32 - 1);
+            z = 0.0f;
+            for (l = 80 - s->phase, x = s->ptr - 1;  l >= 0;  l -= 3, x--)
+                z += cutoff_coeffs[l]*s->history[x & (32 - 1)];
+            /*endfor*/
+            s->oki_byte = (s->oki_byte << 4) | encode(s, (int16_t) (z*3.0f));
+            if ((s->mark++ & 1))
+                oki_data[bytes++] = s->oki_byte;
+            /*endif*/
+            s->phase++;
+            if (++n >= len)
+                break;
+            /*endif*/
+        }
+        /*endfor*/
+    }
+    /*endif*/
+    return  bytes;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/playout.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,367 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * playout.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This was kicked off from jitter buffering code
+ *      Copyright (C) 2004, Horizon Wimba, Inc.
+ *      Author Steve Kann <stevek@stevek.com>
+ * However, there isn't a lot of the original left, now. The original
+ * was licenced under the LGPL, so any remaining fragments are
+ * compatible with the GPL licence used here.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: playout.c,v 1.10 2006/10/24 13:45:26 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/playout.h"
+
+static playout_frame_t *queue_get(playout_state_t *s, timestamp_t sender_stamp)
+{
+    playout_frame_t *frame;
+
+    if ((frame = s->first_frame) == NULL)
+        return NULL;
+
+    if (sender_stamp >= frame->sender_stamp)
+    {
+        /* Remove this frame from the queue */
+        if (frame->later)
+        {
+            frame->later->earlier = NULL;
+            s->first_frame = frame->later;
+        }
+        else
+        {
+            /* The queue is now empty */
+            s->first_frame = NULL;
+            s->last_frame = NULL;
+        }
+        return frame;
+    } 
+
+    return NULL;
+}
+/*- End of function --------------------------------------------------------*/
+
+timestamp_t playout_next_due(playout_state_t *s)
+{
+    return s->last_speech_sender_stamp + s->last_speech_sender_len;
+}
+/*- End of function --------------------------------------------------------*/
+
+timestamp_t playout_current_length(playout_state_t *s)
+{
+    return s->target_buffer_length;
+}
+/*- End of function --------------------------------------------------------*/
+
+playout_frame_t *playout_get_unconditional(playout_state_t *s)
+{
+    playout_frame_t *frame;
+    
+    if ((frame = queue_get(s, 0x7FFFFFFF)))
+    {
+        /* Put it on the free list */
+        frame->later = s->free_frames;
+        s->free_frames = frame;
+
+        /* We return the frame pointer, even though it's on the free list.
+           The caller *must* copy the data before this frame has any chance
+           of being reused. */
+    }
+    return frame;
+}
+/*- End of function --------------------------------------------------------*/
+
+int playout_get(playout_state_t *s, playout_frame_t *frameout, timestamp_t now)
+{
+    playout_frame_t *frame;
+
+    /* Make the last_speech_sender_stamp the current expected one. */
+    s->last_speech_sender_stamp += s->last_speech_sender_len;
+    if ((frame = queue_get(s, s->last_speech_sender_stamp)) == NULL)
+    {
+        /* The required frame was not received (or at least not in time) */
+        s->frames_missing++;
+        return PLAYOUT_FILLIN;
+    }
+
+    if (s->dynamic  &&  frame->type == PLAYOUT_TYPE_SPEECH)
+    {
+        /* Assess whether the buffer length is appropriate */
+        if (!s->not_first)
+        {
+            /* Prime things the first time through */
+            s->not_first = TRUE;
+            s->latest_expected = frame->receiver_stamp + s->min_length;
+        }
+        /* Leaky integrate the rate of occurance of frames received just in time and late */
+        s->state_late += ((((frame->receiver_stamp > s->latest_expected)  ?  0x10000000  :  0) - s->state_late) >> 8);
+        s->state_just_in_time += ((((frame->receiver_stamp > s->latest_expected - frame->sender_len)  ?  0x10000000  :  0) - s->state_just_in_time) >> 8);
+        s->latest_expected += frame->sender_len;
+        
+        if (s->state_late > s->dropable_threshold)
+        {
+            if (s->since_last_step < 10)
+            {
+                if (s->target_buffer_length < s->max_length - 2)
+                {
+                    /* The late bin is too big - increase buffering */
+                    s->target_buffer_length += 3*frame->sender_len;
+                    s->latest_expected += 3*frame->sender_len;
+                    s->state_just_in_time = s->dropable_threshold;
+                    s->state_late = 0;
+                    s->since_last_step = 0;
+
+                    s->last_speech_sender_stamp -= 3*s->last_speech_sender_len;
+                }
+            }
+            else
+            {
+                if (s->target_buffer_length < s->max_length)
+                {
+                    /* The late bin is too big - increase buffering */
+                    s->target_buffer_length += frame->sender_len;
+                    s->latest_expected += frame->sender_len;
+                    s->state_just_in_time = s->dropable_threshold;
+                    s->state_late = 0;
+                    s->since_last_step = 0;
+
+                    s->last_speech_sender_stamp -= s->last_speech_sender_len;
+                }
+            }
+        }
+        else if (s->since_last_step > 500  &&  s->state_just_in_time < s->dropable_threshold)
+        {
+            if (s->target_buffer_length > s->min_length)
+            {
+                /* The just-in-time bin is pretty small - decrease buffering */
+                s->target_buffer_length -= frame->sender_len;
+                s->latest_expected -= frame->sender_len;
+                s->state_just_in_time = s->dropable_threshold;
+                s->state_late = 0;
+                s->since_last_step = 0;
+    
+                s->last_speech_sender_stamp += s->last_speech_sender_len;
+            }
+        }
+        s->since_last_step++;
+    }
+
+    /* If its not a speech frame, just return it. */
+    if (frame->type != PLAYOUT_TYPE_SPEECH)
+    {
+        /* Rewind last_speech_sender_stamp, since this isn't speech */
+        s->last_speech_sender_stamp -= s->last_speech_sender_len;
+            
+        *frameout = *frame;
+        /* Put it on the free list */
+        frame->later = s->free_frames;
+        s->free_frames = frame;
+        
+        s->frames_out++;
+        return PLAYOUT_OK;
+    }
+    if (frame->sender_stamp < s->last_speech_sender_stamp)
+    {
+        /* This speech frame is late */
+        *frameout = *frame;
+        /* Put it on the free list */
+        frame->later = s->free_frames;
+        s->free_frames = frame;
+
+        /* Rewind last_speech_sender_stamp, since we're just dumping */
+        s->last_speech_sender_stamp -= s->last_speech_sender_len;
+        s->frames_out++;
+        s->frames_late++;
+        s->frames_missing--;
+        return PLAYOUT_DROP;
+    }
+    /* Keep track of frame sizes, to allow for variable sized frames */
+    if (frame->sender_len > 0)
+        s->last_speech_sender_len = frame->sender_len;
+
+    /* Normal case. Return the frame, and increment stuff */
+    *frameout = *frame;
+    /* Put it on the free list */
+    frame->later = s->free_frames;
+    s->free_frames = frame;
+
+    s->frames_out++;
+    return PLAYOUT_OK;
+}
+/*- End of function --------------------------------------------------------*/
+
+int playout_put(playout_state_t *s, void *data, int type, timestamp_t sender_len, timestamp_t sender_stamp, timestamp_t receiver_stamp)
+{
+    playout_frame_t *frame;
+    playout_frame_t *p;
+
+    /* When a frame arrives we just queue it in order. We leave all the tricky stuff until frames
+       are read from the queue. */
+    s->frames_in++;
+
+    /* Acquire a frame */
+    if ((frame = s->free_frames))
+    {
+        s->free_frames = frame->later;
+    }
+    else
+    {
+        if ((frame = (playout_frame_t *) malloc(sizeof(playout_frame_t))) == NULL)
+            return PLAYOUT_ERROR;
+    }
+
+    /* Fill out the frame */
+    frame->data = data;
+    frame->type = type;
+    frame->sender_stamp = sender_stamp;
+    frame->sender_len = sender_len;
+    frame->receiver_stamp = receiver_stamp;
+
+    /* Frames are kept in a list, sorted by the timestamp assigned by the sender. */
+    if (s->last_frame == NULL)
+    {
+        /* The queue is empty. */
+        frame->later = NULL;
+        frame->earlier = NULL;
+        s->first_frame = frame;
+        s->last_frame = frame;
+    }
+    else if (sender_stamp >= s->last_frame->sender_stamp)
+    {
+        /* Frame goes at the end of the queue. */
+        frame->later = NULL;
+        frame->earlier = s->last_frame;
+        s->last_frame->later = frame;
+        s->last_frame = frame;
+    }
+    else
+    {
+        /* Frame is out of sequence. */
+        s->frames_oos++;
+
+        /* Find where it should go in the queue */
+        p = s->last_frame;
+        while (sender_stamp < p->sender_stamp  &&  p->earlier) 
+            p = p->earlier;
+
+        if (p->earlier)
+        {
+            /* It needs to go somewhere in the queue */
+            frame->later = p->later;
+            frame->earlier = p;
+            p->later->earlier = frame;
+            p->later = frame;
+        }
+        else
+        {
+            /* It needs to go at the very beginning of the queue */
+            frame->later = p;
+            frame->earlier = NULL;
+            p->earlier = frame;
+            s->first_frame = frame;
+        }
+    }
+
+    if (s->start  &&  type == PLAYOUT_TYPE_SPEECH)
+    {
+        s->last_speech_sender_stamp = sender_stamp - sender_len - s->min_length;
+        s->last_speech_sender_len = sender_len;
+        s->start = FALSE;
+    }
+
+    return PLAYOUT_OK;
+}
+/*- End of function --------------------------------------------------------*/
+
+void playout_restart(playout_state_t *s, int min_length, int max_length)
+{
+    playout_frame_t *frame;
+    playout_frame_t *next;
+
+    /* Free all the frames on the free list */
+    for (frame = s->free_frames;  frame;  frame = next)
+    {
+        next = frame->later;
+        free(frame);
+    }
+
+    memset(s, 0, sizeof(*s));
+    s->dynamic = (min_length < max_length);
+    s->min_length = min_length;
+    s->max_length = (max_length > min_length)  ?  max_length  :  min_length;
+    s->dropable_threshold = 1*0x10000000/100;
+    s->start = TRUE;
+    s->since_last_step = 0x7FFFFFFF;
+    /* Start with the minimum buffer length allowed, and work from there */
+    s->actual_buffer_length = 
+    s->target_buffer_length = (s->max_length - s->min_length)/2;
+}
+/*- End of function --------------------------------------------------------*/
+
+playout_state_t *playout_new(int min_length, int max_length)
+{
+    playout_state_t *s;
+
+    if ((s = (playout_state_t *) malloc(sizeof(playout_state_t))) == NULL)
+        return NULL;
+    memset(s, 0, sizeof(*s));
+    playout_restart(s, min_length, max_length);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+void playout_free(playout_state_t *s)
+{
+    playout_frame_t *frame;
+    playout_frame_t *next;
+    
+    /* Free all the frames in the queue. In most cases these should have been
+       removed already, so their associated data could be freed. */
+    for (frame = s->first_frame;  frame;  frame = next)
+    {
+        next = frame->later;
+        free(frame);
+    }
+    /* Free all the frames on the free list */
+    for (frame = s->free_frames;  frame;  frame = next)
+    {
+        next = frame->later;
+        free(frame);
+    }
+    /* Finally, free ourselves! */ 
+    free(s);
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/plc.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,255 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * plc.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: plc.c,v 1.16 2006/11/19 14:07:24 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <limits.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/plc.h"
+
+/* We do a straight line fade to zero volume in 50ms when we are filling in for missing data. */
+#define ATTENUATION_INCREMENT       0.0025f     /* Attenuation per sample */
+
+#define ms_to_samples(t)            (((t)*SAMPLE_RATE)/1000)
+
+static void save_history(plc_state_t *s, int16_t *buf, int len)
+{
+    if (len >= PLC_HISTORY_LEN)
+    {
+        /* Just keep the last part of the new data, starting at the beginning of the buffer */
+        memcpy(s->history, buf + len - PLC_HISTORY_LEN, sizeof(int16_t)*PLC_HISTORY_LEN);
+        s->buf_ptr = 0;
+        return;
+    }
+    if (s->buf_ptr + len > PLC_HISTORY_LEN)
+    {
+        /* Wraps around - must break into two sections */
+        memcpy(s->history + s->buf_ptr, buf, sizeof(int16_t)*(PLC_HISTORY_LEN - s->buf_ptr));
+        len -= (PLC_HISTORY_LEN - s->buf_ptr);
+        memcpy(s->history, buf + (PLC_HISTORY_LEN - s->buf_ptr), sizeof(int16_t)*len);
+        s->buf_ptr = len;
+        return;
+    }
+    /* Can use just one section */
+    memcpy(s->history + s->buf_ptr, buf, sizeof(int16_t)*len);
+    s->buf_ptr += len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void normalise_history(plc_state_t *s)
+{
+    int16_t tmp[PLC_HISTORY_LEN];
+
+    if (s->buf_ptr == 0)
+        return;
+    memcpy(tmp, s->history, sizeof(int16_t)*s->buf_ptr);
+    memcpy(s->history, s->history + s->buf_ptr, sizeof(int16_t)*(PLC_HISTORY_LEN - s->buf_ptr));
+    memcpy(s->history + PLC_HISTORY_LEN - s->buf_ptr, tmp, sizeof(int16_t)*s->buf_ptr);
+    s->buf_ptr = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int amdf_pitch(int min_pitch, int max_pitch, int16_t amp[], int len)
+{
+    int i;
+    int j;
+    int acc;
+    int min_acc;
+    int pitch;
+
+    pitch = min_pitch;
+    min_acc = INT_MAX;
+    for (i = max_pitch;  i <= min_pitch;  i++)
+    {
+        acc = 0;
+        for (j = 0;  j < len;  j++)
+            acc += abs(amp[i + j] - amp[j]);
+        if (acc < min_acc)
+        {
+            min_acc = acc;
+            pitch = i;
+        }
+    }
+    return pitch;
+}
+/*- End of function --------------------------------------------------------*/
+
+int plc_rx(plc_state_t *s, int16_t amp[], int len)
+{
+    int i;
+    int pitch_overlap;
+    float old_step;
+    float new_step;
+    float old_weight;
+    float new_weight;
+    float gain;
+    
+    if (s->missing_samples)
+    {
+        /* Although we have a real signal, we need to smooth it to fit well
+           with the synthetic signal we used for the previous block */
+
+        /* The start of the real data is overlapped with the next 1/4 cycle
+           of the synthetic data. */
+        pitch_overlap = s->pitch >> 2;
+        if (pitch_overlap > len)
+            pitch_overlap = len;
+        gain = 1.0f - s->missing_samples*ATTENUATION_INCREMENT;
+        if (gain < 0.0f)
+            gain = 0.0f;
+        new_step = 1.0f/pitch_overlap;
+        old_step = new_step*gain;
+        new_weight = new_step;
+        old_weight = (1.0f - new_step)*gain;
+        for (i = 0;  i < pitch_overlap;  i++)
+        {
+            amp[i] = fsaturate(old_weight*s->pitchbuf[s->pitch_offset] + new_weight*amp[i]);
+            if (++s->pitch_offset >= s->pitch)
+                s->pitch_offset = 0;
+            new_weight += new_step;
+            old_weight -= old_step;
+            if (old_weight < 0.0f)
+                old_weight = 0.0f;
+        }
+        s->missing_samples = 0;
+    }
+    save_history(s, amp, len);
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int plc_fillin(plc_state_t *s, int16_t amp[], int len)
+{
+    int i;
+    int pitch_overlap;
+    float old_step;
+    float new_step;
+    float old_weight;
+    float new_weight;
+    float gain;
+    int16_t *orig_amp;
+    int orig_len;
+
+    orig_amp = amp;
+    orig_len = len;
+    if (s->missing_samples == 0)
+    {
+        /* As the gap in real speech starts we need to assess the last known pitch,
+           and prepare the synthetic data we will use for fill-in */
+        normalise_history(s);
+        s->pitch = amdf_pitch(PLC_PITCH_MIN, PLC_PITCH_MAX, s->history + PLC_HISTORY_LEN - CORRELATION_SPAN - PLC_PITCH_MIN, CORRELATION_SPAN);
+        /* We overlap a 1/4 wavelength */
+        pitch_overlap = s->pitch >> 2;
+        /* Cook up a single cycle of pitch, using a single of the real signal with 1/4
+           cycle OLA'ed to make the ends join up nicely */
+        /* The first 3/4 of the cycle is a simple copy */
+        for (i = 0;  i < s->pitch - pitch_overlap;  i++)
+            s->pitchbuf[i] = s->history[PLC_HISTORY_LEN - s->pitch + i];
+        /* The last 1/4 of the cycle is overlapped with the end of the previous cycle */
+        new_step = 1.0f/pitch_overlap;
+        new_weight = new_step;
+        for (  ;  i < s->pitch;  i++)
+        {
+            s->pitchbuf[i] = s->history[PLC_HISTORY_LEN - s->pitch + i]*(1.0f - new_weight) + s->history[PLC_HISTORY_LEN - 2*s->pitch + i]*new_weight;
+            new_weight += new_step;
+        }
+        /* We should now be ready to fill in the gap with repeated, decaying cycles
+           of what is in pitchbuf */
+
+        gain = 1.0f;
+        /* We need to OLA the first 1/4 wavelength of the synthetic data, to smooth
+           it into the previous real data. To avoid the need to introduce a delay
+           in the stream, reverse the last 1/4 wavelength, and OLA with that. */
+        new_step = 1.0f/pitch_overlap;
+        old_step = new_step;
+        new_weight = new_step;
+        old_weight = 1.0f - new_step;
+        for (i = 0;  i < pitch_overlap;  i++)
+        {
+            amp[i] = fsaturate(old_weight*s->history[PLC_HISTORY_LEN - 1 - i] + new_weight*s->pitchbuf[i]);
+            new_weight += new_step;
+            old_weight -= old_step;
+            if (old_weight < 0.0f)
+                old_weight = 0.0f;
+        }
+        s->pitch_offset = i;
+    }
+    else
+    {
+        gain = 1.0f - s->missing_samples*ATTENUATION_INCREMENT;
+        i = 0;
+    }
+    for (  ;  gain > 0.0f  &&  i < len;  i++)
+    {
+        amp[i] = (int16_t) (s->pitchbuf[s->pitch_offset]*gain);
+        gain -= ATTENUATION_INCREMENT;
+        if (++s->pitch_offset >= s->pitch)
+            s->pitch_offset = 0;
+    }
+    for (  ;  i < len;  i++)
+        amp[i] = 0;
+    s->missing_samples += orig_len;
+    save_history(s, amp, len);
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+plc_state_t *plc_init(plc_state_t *s)
+{
+    if (s == NULL)
+    {
+        if ((s = (plc_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int plc_release(plc_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/power_meter.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,114 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * power_meter.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: power_meter.c,v 1.18 2006/11/19 14:07:25 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#include <float.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/power_meter.h"
+
+power_meter_t *power_meter_init(power_meter_t *s, int shift)
+{
+    if (s == NULL)
+        return NULL;
+    s->shift = shift;
+    s->reading = 0;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+power_meter_t *power_meter_damping(power_meter_t *s, int shift)
+{
+    s->shift = shift;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int32_t power_meter_update(power_meter_t *s, int16_t amp)
+{
+    s->reading += ((amp*amp - s->reading) >> s->shift);
+    return s->reading;
+}
+/*- End of function --------------------------------------------------------*/
+
+int32_t power_meter_level_dbm0(float level)
+{
+    float l;
+
+    level -= DBM0_MAX_POWER;
+    if (level > 0.0)
+        level = 0.0;
+    l = powf(10.0f, level/10.0f)*(32767.0f*32767.0f);
+    return (int32_t) l;
+}
+/*- End of function --------------------------------------------------------*/
+
+int32_t power_meter_level_dbov(float level)
+{
+    float l;
+
+    if (level > 0.0)
+        level = 0.0;
+    l = powf(10.0f, level/10.0f)*(32767.0f*32767.0f);
+    return (int32_t) l;
+}
+/*- End of function --------------------------------------------------------*/
+
+float power_meter_dbm0(power_meter_t *s)
+{
+    if (s->reading <= 0)
+        return FLT_MIN;
+    /* This is based on A-law, but u-law is only 0.03dB different, so don't worry. */
+    return log10f((float) s->reading/(32767.0f*32767.0f))*10.0f + DBM0_MAX_POWER;
+}
+/*- End of function --------------------------------------------------------*/
+
+float power_meter_dbov(power_meter_t *s)
+{
+    if (s->reading <= 0)
+        return FLT_MIN;
+    return log10f((float) s->reading/(32767.0f*32767.0f))*10.0f;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/queue.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,292 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * queue.c - simple in process message queuing
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: queue.c,v 1.10 2006/11/19 14:07:25 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <sys/types.h>
+
+#include <tiffio.h>
+
+#include "spandsp/queue.h"
+
+int queue_empty(queue_t *p)
+{
+    return (p->iptr == p->optr);
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_free_space(queue_t *p)
+{
+    if (p->iptr < p->optr)
+        return ((p->optr - p->iptr) - 1);
+    /*endif*/
+    return (p->len - (p->iptr - p->optr));
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_contents(queue_t *p)
+{
+    if (p->iptr < p->optr)
+        return (p->len - (p->optr - p->iptr) + 1);
+    /*endif*/
+    return (p->iptr - p->optr);
+}
+/*- End of function --------------------------------------------------------*/
+
+void queue_flush(queue_t *p)
+{
+    p->iptr =
+    p->optr = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_view(queue_t *p, uint8_t *buf, int len)
+{
+    int real_len;
+    int to_end;
+
+    real_len = queue_contents(p);
+    if (real_len < len)
+    {
+        if (p->flags & QUEUE_READ_ATOMIC)
+            return -1;
+        /*endif*/
+    }
+    else
+    {
+        real_len = len;
+    }
+    /*endif*/
+    if (real_len == 0)
+        return 0;
+    /*endif*/
+    to_end = p->len + 1 - p->optr;
+    if (p->iptr < p->optr  &&  to_end < real_len)
+    {
+        /* A two step process */
+        if (buf)
+        {
+            memcpy(buf, p->data + p->optr, to_end);
+            memcpy(buf + to_end, p->data, real_len - to_end);
+        }
+        /*endif*/
+    }
+    else
+    {
+        /* A one step process */
+        if (buf)
+            memcpy(buf, p->data + p->optr, real_len);
+        /*endif*/
+    }
+    /*endif*/
+    return real_len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_read(queue_t *p, uint8_t *buf, int len)
+{
+    int real_len;
+    int to_end;
+
+    real_len = queue_contents(p);
+    if (real_len < len)
+    {
+        if (p->flags & QUEUE_READ_ATOMIC)
+            return -1;
+        /*endif*/
+    }
+    else
+    {
+        real_len = len;
+    }
+    /*endif*/
+    if (real_len == 0)
+        return 0;
+    /*endif*/
+    to_end = p->len + 1 - p->optr;
+    if (p->iptr < p->optr  &&  to_end < real_len)
+    {
+        /* A two step process */
+        if (buf)
+        {
+            memcpy(buf, p->data + p->optr, to_end);
+            memcpy(buf + to_end, p->data, real_len - to_end);
+        }
+        /*endif*/
+        p->optr += (real_len - p->len + 1);
+    }
+    else
+    {
+        /* A one step process */
+        if (buf)
+            memcpy(buf, p->data + p->optr, real_len);
+        /*endif*/
+        p->optr += real_len;
+        if (p->optr > (p->len + 1))
+            p->optr = 0;
+        /*endif*/
+    }
+    /*endif*/
+    return real_len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_write(queue_t *p, const uint8_t *buf, int len)
+{
+    int real_len;
+    int to_end;
+
+    real_len = queue_free_space(p);
+    if (real_len < len)
+    {
+        if (p->flags & QUEUE_WRITE_ATOMIC)
+            return -1;
+        /*endif*/
+    }
+    else
+    {
+        real_len = len;
+    }
+    /*endif*/
+    if (real_len == 0)
+        return 0;
+    /*endif*/
+    to_end = p->len + 1 - p->iptr;
+    if (p->iptr < p->optr  ||  to_end >= real_len)
+    {
+        /* A one step process */
+        memcpy(p->data + p->iptr, buf, real_len);
+        p->iptr += real_len;
+        if (p->iptr > (p->len + 1))
+            p->iptr = 0;
+        /*endif*/
+    }
+    else
+    {
+        /* A two step process */
+        memcpy(p->data + p->iptr, buf, to_end);
+        memcpy(p->data, buf + to_end, real_len - to_end);
+        p->iptr += (real_len - p->len + 1);
+    }
+    /*endif*/
+    return real_len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_test_msg(queue_t *p)
+{
+    uint16_t lenx;
+
+    if (queue_view(p, (uint8_t *) &lenx, sizeof(uint16_t)) != sizeof(uint16_t))
+        return -1;
+    /*endif*/
+    return lenx;
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_read_msg(queue_t *p, uint8_t *buf, int len)
+{
+    uint16_t lenx;
+
+    if (queue_read(p, (uint8_t *) &lenx, sizeof(uint16_t)) != sizeof(uint16_t))
+        return -1;
+    /*endif*/
+    if (lenx == 0)
+        return 0;
+    /*endif*/
+    if ((int) lenx > len)
+    {
+        len = queue_read(p, buf, len);
+        /* Discard the rest of the message */
+        queue_read(p, NULL, lenx - len);
+        return len;
+    }
+    /*endif*/
+    return queue_read(p, buf, lenx);
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_write_msg(queue_t *p, const uint8_t *buf, int len)
+{
+    uint16_t lenx;
+
+    if (queue_free_space(p) < (int) (len + sizeof(uint16_t)))
+        return 0;
+    /*endif*/
+    lenx = (uint16_t) len;
+    if (queue_write(p, (uint8_t *) &lenx, sizeof(uint16_t)) != sizeof(uint16_t))
+        return -1;
+    /*endif*/
+    if (len == 0)
+        return 0;
+    return queue_write(p, buf, len);
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_create(queue_t *p, int len, int flags)
+{
+    p->iptr =
+    p->optr = 0;
+    p->flags = flags;
+    p->len = len;
+    p->data = malloc(len + 1);
+    if (p->data == NULL)
+    {
+        p->flags = 0;
+        p->len = 0;
+        return -1;
+    }
+    /*endif*/
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int queue_delete(queue_t *p)
+{
+    p->flags = 0;
+    p->iptr =
+    p->optr = 0;
+    p->len = 0;
+    if (p->data)
+    {
+        free(p->data);
+        p->data = NULL;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/schedule.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,146 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * schedule.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: schedule.c,v 1.12 2006/10/24 13:45:26 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <memory.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/schedule.h"
+
+int span_schedule_event(span_sched_state_t *s, int ms, span_sched_callback_func_t function, void *user_data)
+{
+    int i;
+
+    for (i = 0;  i < s->max_to_date;  i++)
+    {
+        if (s->sched[i].callback == NULL)
+            break;
+        /*endif*/
+    }
+    /*endfor*/
+    if (i >= s->allocated)
+    {
+        s->allocated += 5;
+        s->sched = (span_sched_t *) realloc(s->sched, sizeof(span_sched_t)*s->allocated);
+    }
+    /*endif*/
+    if (i >= s->max_to_date)
+        s->max_to_date = i + 1;
+    /*endif*/
+    s->sched[i].when = s->ticker + ms*SAMPLE_RATE/1000;
+    s->sched[i].callback = function;
+    s->sched[i].user_data = user_data;
+    return i;
+}
+/*- End of function --------------------------------------------------------*/
+
+uint64_t span_schedule_next(span_sched_state_t *s)
+{
+    int i;
+    uint64_t earliest;
+
+    earliest = ~((uint64_t) 0);
+    for (i = 0;  i < s->max_to_date;  i++)
+    {
+        if (s->sched[i].callback  &&  earliest > s->sched[i].when)
+            earliest = s->sched[i].when;
+        /*endif*/
+    }
+    /*endfor*/
+    return earliest;
+}
+/*- End of function --------------------------------------------------------*/
+
+uint64_t span_schedule_time(span_sched_state_t *s)
+{
+    return s->ticker;
+}
+/*- End of function --------------------------------------------------------*/
+
+void span_schedule_update(span_sched_state_t *s, int samples)
+{
+    int i;
+    span_sched_callback_func_t callback;
+    void *user_data;
+
+    s->ticker += samples;
+    for (i = 0;  i < s->max_to_date;  i++)
+    {
+        if (s->sched[i].callback  &&  s->sched[i].when <= s->ticker)
+        {
+            callback = s->sched[i].callback;
+            user_data = s->sched[i].user_data;
+            s->sched[i].callback = NULL;
+            s->sched[i].user_data = NULL;
+            callback(s, user_data);
+        }
+        /*endif*/
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+void span_schedule_del(span_sched_state_t *s, int i)
+{
+    if (i >= s->max_to_date
+        ||
+        i < 0
+        ||
+        s->sched[i].callback == NULL)
+    {
+        fprintf(stderr, "Asked to delete scheduled ID %d???\n", i);
+        return;
+    }
+    /*endif*/
+    s->sched[i].callback = NULL;
+}
+/*- End of function --------------------------------------------------------*/
+
+span_sched_state_t *span_schedule_init(span_sched_state_t *s)
+{
+    memset(s, 0, sizeof(*s));
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int span_schedule_release(span_sched_state_t *s)
+{
+    if (s->sched)
+    {
+        free(s->sched);
+        s->sched = NULL;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/sig_tone.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,524 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * sig_tone.c - Signalling tone processing for the 2280Hz, 2600Hz and similar
+ *              signalling tone used in older protocols.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: sig_tone.c,v 1.15 2006/11/19 14:07:25 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <memory.h>
+#include <string.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/dds.h"
+#include "spandsp/sig_tone.h"
+
+#define PI 3.14159265358979323
+
+/* The coefficients for the data notch filter. This filter is also the
+   guard filter for tone detection. */
+
+sig_tone_descriptor_t sig_tones[4] =
+{
+    {
+        /* 2280Hz (e.g. AC15, and many other European protocols) */
+        {2280,  0},
+        {-10, -20},
+        400*8,
+    
+        225*8,
+    
+        225*8,
+        TRUE,
+    
+        24,
+        64,
+    
+        {  3600,  14397,  32767},
+        {     0,  -9425, -28954},
+        {     0,  14196,  32767},
+        {     0, -17393, -28954},
+        12,
+/*
+    0.1098633,  0.4393615,   1.0,
+    0,         -0.2876274,  -0.8836059,
+    0,          0.4332275,   1.0,
+    0,         -0.5307922,  -0.8836059,
+*/
+        { 12900, -16384, -16384}, 
+        {     0,  -8578, -11796},
+        15,
+
+        31744,
+        1024,
+    
+        31744,
+        187,
+    
+        31744,
+        187,
+    
+        -1,
+        -32,
+    
+        57
+    },
+    {
+        /* 2600Hz (e.g. many US protocols) */
+        {2600, 0},
+        {-8, -8},
+        400*8,
+    
+        225*8,
+    
+        225*8,
+        FALSE,
+    
+        24,
+        64,
+    
+        {  3539,  29569,  32767},
+        {     0, -24010, -28341},
+        {     0,  29844,  32767},
+        {     0, -31208, -28341},
+        12,
+/*
+    0.1080017,  0.9023743,   1.0,
+    0,         -0.7327271,  -0.86489868,
+    0,          0.9107666,   1.0,
+    0,         -0.9523925,  -0.86489868,
+*/
+        { 32768,      0,      0},
+        {     0,      0,      0},
+        15,
+    
+        31744,
+        1024,
+    
+        31744,
+        170,
+    
+        31744,
+        170,
+    
+        -1,
+        -32,
+    
+        52
+    },
+    {
+        /* 2400Hz / 2600Hz (e.g. SS5 and SS5bis) */
+        {2400, 2600},
+        {-8, -8},
+        400*8,
+    
+        225*8,
+    
+        225*8,
+        FALSE,
+    
+        24,
+        64,
+    
+        {  3539,  20349,  32767},
+        {     0, -22075, -31856},
+        {     0,  20174,  32767},
+        {     0, -17832, -31836},
+        12,
+/*
+    0.1080017,  0.6210065,   1.0,
+    0,         -0.6736673,  -0.9721678,
+    0,          0.6156693,   1.0,
+    0,         -0.5441804,  -0.9715460,
+*/
+    
+        { 32768,      0,      0},
+        {     0,      0,      0},
+        15,
+    
+        31744,
+        1024,
+    
+        31744,
+        170,
+    
+        31744,
+        170,
+    
+        -1,
+        -32,
+    
+        52
+    }
+};
+
+int sig_tone_rx(sig_tone_state_t *s, int16_t amp[], int len)
+{
+    int32_t x;
+    int32_t notched_signal;
+    int32_t bandpass_signal;
+    int i;
+
+    for (i = 0;  i < len;  i++)
+    {
+        if (s->signaling_state_duration < 0xFFFF)
+            s->signaling_state_duration++;
+        /*endif*/
+        /* The notch filter is two cascaded biquads. */
+        notched_signal = amp[i];
+        
+        notched_signal *= s->desc->notch_a1[0];
+        notched_signal += s->notch_z1[1]*s->desc->notch_b1[1];
+        notched_signal += s->notch_z1[2]*s->desc->notch_b1[2];
+        x = notched_signal;
+        notched_signal += s->notch_z1[1]*s->desc->notch_a1[1];
+        notched_signal += s->notch_z1[2]*s->desc->notch_a1[2];
+        s->notch_z1[2] = s->notch_z1[1];
+        s->notch_z1[1] = x >> 15;
+        
+        notched_signal += s->notch_z2[1]*s->desc->notch_b2[1];
+        notched_signal += s->notch_z2[2]*s->desc->notch_b2[2];
+        x = notched_signal;
+        notched_signal += s->notch_z2[1]*s->desc->notch_a2[1];
+        notched_signal += s->notch_z2[2]*s->desc->notch_a2[2];
+        s->notch_z2[2] = s->notch_z2[1];
+        s->notch_z2[1] = x >> 15;
+        
+        notched_signal >>= s->desc->notch_postscale;
+
+        /* Modulus and leaky integrate the notched data. The result of
+           this isn't used in low tone detect mode, but we must keep notch_zl
+           rolling along. */
+        s->notch_zl = ((s->notch_zl*s->desc->notch_slugi) >> 15)
+                    + ((abs(notched_signal)*s->desc->notch_slugp) >> 15);
+
+        /* Mow the grass to weed out the noise! */
+        s->mown_notch = s->notch_zl & s->desc->notch_threshold;
+
+        if (s->tone_present)
+        {
+            if (s->flat_mode_timeout <= 0)
+                s->flat_mode = TRUE;
+            else
+                s->flat_mode_timeout--;
+            /*endif*/
+        }
+        else
+        {
+            s->flat_mode_timeout = s->desc->sharp_flat_timeout;
+            s->flat_mode = FALSE;
+        }
+        /*endif*/
+
+        if (s->flat_mode)
+        {
+            /* Flat mode */
+    
+            /* The bandpass filter is a single bi-quad stage */
+            bandpass_signal = amp[i];
+            bandpass_signal *= s->desc->broad_a[0];
+            bandpass_signal += s->broad_z[1]*s->desc->broad_b[1];
+            bandpass_signal += s->broad_z[2]*s->desc->broad_b[2];
+            x = bandpass_signal;
+            bandpass_signal += s->broad_z[1]*s->desc->broad_a[1];
+            bandpass_signal += s->broad_z[2]*s->desc->broad_a[2];
+            s->broad_z[2] = s->broad_z[1];
+            s->broad_z[1] = x >> 15;
+            bandpass_signal >>= s->desc->broad_postscale;
+    
+            /* Leaky integrate the bandpassed data */
+            s->broad_zl = ((s->broad_zl*s->desc->broad_slugi) >> 15)
+                        + ((abs(bandpass_signal)*s->desc->broad_slugp) >> 15);
+    
+            /* For the broad band receiver we use a simple linear threshold! */
+            if (s->tone_present)
+            {
+                s->tone_present = (s->broad_zl > s->desc->broad_threshold);
+                if (!s->tone_present)
+                {
+                    if (s->sig_update)
+                        s->sig_update(s->user_data, SIG_TONE_1_CHANGE | (s->signaling_state_duration << 16));
+                    /*endif*/
+                    s->signaling_state_duration = 0;
+                }
+                /*endif*/
+            }
+            else
+            {
+                s->tone_present = (s->broad_zl > s->desc->broad_threshold);
+                if (s->tone_present)
+                {
+                    if (s->sig_update)
+                        s->sig_update(s->user_data, SIG_TONE_1_CHANGE | SIG_TONE_1_PRESENT | (s->signaling_state_duration << 16));
+                    /*endif*/
+                    s->signaling_state_duration = 0;
+                }
+                /*endif*/
+            }
+            /*endif*/
+            /* Notch insertion logic */
+    
+            /* tone_present and tone_on are equivalent in flat mode */
+            if (s->tone_present)
+            {
+                s->notch_enabled = s->desc->notch_allowed;
+                s->notch_insertion_timeout = s->desc->notch_lag_time;
+            }
+            else
+            {
+                if (s->notch_insertion_timeout > 0)
+                    s->notch_insertion_timeout--;
+                else
+                    s->notch_enabled = FALSE;
+                /*endif*/
+            }
+            /*endif*/
+        }
+        else
+        {
+            /* Sharp mode */
+
+            /* Modulus and leaky integrate the data */
+            s->broad_zl = ((s->broad_zl*s->desc->unfiltered_slugi) >> 15)
+                        + ((abs(amp[i])*s->desc->unfiltered_slugp) >> 15);
+     
+            /* Mow the grass to weed out the noise! */
+            s->mown_bandpass = s->broad_zl & s->desc->unfiltered_threshold;
+    
+            /* Persistence checking and notch insertion logic */
+            if (!s->tone_present)
+            {
+                if (s->mown_notch < s->mown_bandpass)
+                {
+                    /* Tone is detected this sample */
+                    if (s->tone_persistence_timeout <= 0)
+                    {
+                        s->tone_present = TRUE;
+                        s->notch_enabled = s->desc->notch_allowed;
+                        s->tone_persistence_timeout = s->desc->tone_off_check_time;
+                        s->notch_insertion_timeout = s->desc->notch_lag_time;
+                        if (s->sig_update)
+                            s->sig_update(s->user_data, SIG_TONE_1_CHANGE | SIG_TONE_1_PRESENT | (s->signaling_state_duration << 16));
+                        /*endif*/
+                        s->signaling_state_duration = 0;
+                    }
+                    else
+                    {
+                        s->tone_persistence_timeout--;
+                        if (s->notch_insertion_timeout > 0)
+                            s->notch_insertion_timeout--;
+                        else
+                            s->notch_enabled = FALSE;
+                        /*endif*/
+                    }
+                    /*endif*/
+                }
+                else
+                {
+                    s->tone_persistence_timeout = s->desc->tone_on_check_time;
+                    if (s->notch_insertion_timeout > 0)
+                        s->notch_insertion_timeout--;
+                    else
+                        s->notch_enabled = FALSE;
+                    /*endif*/
+                }
+                /*endif*/
+            }
+            else
+            {
+                if (s->mown_notch > s->mown_bandpass)
+                {
+                    /* Tone is not detected this sample */
+                    if (s->tone_persistence_timeout <= 0)
+                    {
+                        s->tone_present = FALSE;
+                        s->tone_persistence_timeout = s->desc->tone_on_check_time;
+                        if (s->sig_update)
+                            s->sig_update(s->user_data, SIG_TONE_1_CHANGE | (s->signaling_state_duration << 16));
+                        /*endif*/
+                        s->signaling_state_duration = 0;
+                    }
+                    else
+                    {
+                        s->tone_persistence_timeout--;
+                    }
+                    /*endif*/
+                }
+                else
+                {
+                    s->tone_persistence_timeout = s->desc->tone_off_check_time;
+                }
+                /*endif*/
+            }
+            /*endif*/
+        }
+        /*endif*/
+
+        if ((s->current_tx_tone & SIG_TONE_RX_PASSTHROUGH))
+        {
+            //if (s->notch_enabled)
+                amp[i] = (int16_t) notched_signal;
+            /*endif*/
+        }
+        else
+        {
+            amp[i] = 0;
+        }
+        /*endif*/
+    }
+    /*endfor*/
+    return  len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int sig_tone_tx(sig_tone_state_t *s, int16_t amp[], int len)
+{
+    int i;
+    int16_t tone;
+    int update;
+    int high_low;
+
+    if (s->current_tx_tone & SIG_TONE_1_PRESENT)
+    {
+        for (i = 0;  i < len;  i++)
+        {
+            if (s->high_low_timer > 0  &&  --s->high_low_timer > 0)
+                high_low = 1;
+            else
+                high_low = 0;
+            /*endif*/
+            tone = dds_mod(&(s->phase_acc[0]), s->phase_rate[0], s->tone_scaling[high_low], 0);
+            if (s->current_tx_tone & SIG_TONE_TX_PASSTHROUGH)
+                amp[i] = saturate(amp[i] + tone);
+            else
+                amp[i] = tone;
+            /*endif*/
+            if (--s->current_tx_timeout <= 0)
+            {
+                if (s->sig_update)
+                {
+                    update = s->sig_update(s->user_data, SIG_TONE_UPDATE_REQUEST);
+                    if ((update & 0x03) == 0x03  &&  !(s->current_tx_tone & SIG_TONE_1_PRESENT))
+                        s->high_low_timer = s->desc->high_low_timeout;
+                    /*endif*/
+                    s->current_tx_tone = update & 0xFFFF;
+                    s->current_tx_timeout = (update >> 16) & 0xFFFF;
+                }
+                /*endif*/
+            }
+            /*endif*/
+        }
+        /*endfor*/
+    }
+    else
+    {
+        for (i = 0;  i < len;  )
+        {
+            if (s->current_tx_timeout < len - i)
+            {
+                if (!(s->current_tx_tone & SIG_TONE_TX_PASSTHROUGH))
+                {
+                    /* Zap any audio in the buffer */
+                    memset(amp + i, 0, sizeof(int16_t)*s->current_tx_timeout);
+                }
+                /*endif*/
+                i += s->current_tx_timeout;
+                if (s->sig_update)
+                {
+                    update = s->sig_update(s->user_data, SIG_TONE_UPDATE_REQUEST);
+                    if ((update & 0x03) == 0x03)
+                        s->high_low_timer = s->desc->high_low_timeout;
+                    /*endif*/
+                    s->current_tx_tone = update & 0xFFFF;
+                    s->current_tx_timeout = (update >> 16) & 0xFFFF;
+                }
+                /*endif*/
+            }
+            else
+            {
+                s->current_tx_timeout -= (len - i);
+                if (!(s->current_tx_tone & SIG_TONE_TX_PASSTHROUGH))
+                {
+                    /* Zap any audio in the buffer */
+                    memset(amp + i, 0, sizeof(int16_t)*(len - i));
+                    i = len;
+                }
+                /*endif*/
+            }
+            /*endif*/
+        }
+        /*endfor*/
+    }
+    /*endif*/
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+sig_tone_state_t *sig_tone_init(sig_tone_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data)
+{
+    if (tone_type <= 0  ||  tone_type > 3)
+        return NULL;
+    /*endif*/
+
+    memset(s, 0, sizeof(*s));
+
+    s->sig_update = sig_update;
+    s->user_data = user_data;
+
+    s->desc = &sig_tones[tone_type - 1];
+
+    /* Set up the transmit side */
+    s->phase_rate[0] = dds_phase_rate((float) s->desc->tone_freq[0]);
+    if (s->desc->tone_freq[1])
+        s->phase_rate[1] = dds_phase_rate((float) s->desc->tone_freq[1]);
+    else
+        s->phase_rate[1] = 0;
+    /*endif*/
+    s->tone_scaling[0] = dds_scaling_dbm0((float) s->desc->tone_amp[0]);
+    s->tone_scaling[1] = dds_scaling_dbm0((float) s->desc->tone_amp[1]);
+
+    /* Set up the receive side */
+    s->flat_mode_timeout = 0;
+    s->notch_insertion_timeout = 0;
+    s->tone_persistence_timeout = 0;
+    s->signaling_state_duration = 0;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/silence_gen.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,112 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * silence_gen.c - A silence generator, for inserting timed silences.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: silence_gen.c,v 1.6 2006/11/19 14:07:25 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <limits.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/silence_gen.h"
+
+int silence_gen(silence_gen_state_t *s, int16_t *amp, int max_len)
+{
+    if (s->remaining_samples != INT_MAX)
+    {
+        if (max_len > s->remaining_samples)
+            max_len = s->remaining_samples;
+        s->remaining_samples -= max_len;
+    }
+    if (INT_MAX - s->total_samples >= max_len)
+        s->total_samples += max_len;
+    memset(amp, 0, max_len*sizeof(int16_t));
+    return max_len;
+}
+/*- End of function --------------------------------------------------------*/
+
+void silence_gen_always(silence_gen_state_t *s)
+{
+    s->remaining_samples = INT_MAX;
+}
+/*- End of function --------------------------------------------------------*/
+
+void silence_gen_set(silence_gen_state_t *s, int silent_samples)
+{
+    s->remaining_samples = silent_samples;
+    s->total_samples = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void silence_gen_alter(silence_gen_state_t *s, int silent_samples)
+{
+    /* Block negative silences */
+    if (silent_samples < 0)
+    {
+        if (-silent_samples > s->remaining_samples)
+            silent_samples = -s->remaining_samples;
+    }
+    s->remaining_samples += silent_samples;
+    s->total_samples += silent_samples;
+}
+/*- End of function --------------------------------------------------------*/
+
+int silence_gen_remainder(silence_gen_state_t *s)
+{
+    return s->remaining_samples;
+}
+/*- End of function --------------------------------------------------------*/
+
+int silence_gen_generated(silence_gen_state_t *s)
+{
+    return s->total_samples;
+}
+/*- End of function --------------------------------------------------------*/
+
+silence_gen_state_t *silence_gen_init(silence_gen_state_t *s, int silent_samples)
+{
+    memset(s, 0, sizeof(*s));
+    s->remaining_samples = silent_samples;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,108 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * spandsp.h - The head guy amongst the headers
+ *
+ * Written by Steve Underwood <spandsp/steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: spandsp.h,v 1.46 2006/10/24 13:45:26 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_SPANDSP_H_)
+#define _SPANDSP_H_
+
+#include <inttypes.h>
+#include <limits.h>
+#include <time.h>
+#include <tiffio.h>
+
+#include <spandsp/telephony.h>
+#include <spandsp/logging.h>
+#include <spandsp/complex.h>
+#include <spandsp/bit_operations.h>
+#include <spandsp/bitstream.h>
+#include <spandsp/queue.h>
+#include <spandsp/schedule.h>
+#include <spandsp/g711.h>
+#include <spandsp/timing.h>
+#include <spandsp/vector_float.h>
+#include <spandsp/complex_vector_float.h>
+#include <spandsp/vector_int.h>
+#include <spandsp/arctan2.h>
+#include <spandsp/biquad.h>
+#include <spandsp/fir.h>
+#include <spandsp/awgn.h>
+#include <spandsp/bert.h>
+#include <spandsp/power_meter.h>
+#include <spandsp/complex_filters.h>
+#include <spandsp/dc_restore.h>
+#include <spandsp/dds.h>
+#include <spandsp/echo.h>
+#include <spandsp/modem_echo.h>
+#include <spandsp/hdlc.h>
+#include <spandsp/async.h>
+#include <spandsp/noise.h>
+#include <spandsp/time_scale.h>
+#include <spandsp/tone_detect.h>
+#include <spandsp/tone_generate.h>
+#include <spandsp/dtmf.h>
+#include <spandsp/bell_r2_mf.h>
+#include <spandsp/super_tone_rx.h>
+#include <spandsp/super_tone_tx.h>
+#include <spandsp/modem_connect_tones.h>
+#include <spandsp/sig_tone.h>
+#include <spandsp/fsk.h>
+#include <spandsp/silence_gen.h>
+#include <spandsp/v29rx.h>
+#include <spandsp/v29tx.h>
+#if defined(ENABLE_V17)
+#include <spandsp/v17rx.h>
+#include <spandsp/v17tx.h>
+#endif
+#include <spandsp/v22bis.h>
+#include <spandsp/v27ter_rx.h>
+#include <spandsp/v27ter_tx.h>
+#include <spandsp/v8.h>
+#include <spandsp/v42.h>
+#include <spandsp/v42bis.h>
+#include <spandsp/t4.h>
+#include <spandsp/t30.h>
+#include <spandsp/t30_fcf.h>
+#include <spandsp/t35.h>
+#include <spandsp/at_interpreter.h>
+#include <spandsp/t38_core.h>
+#include <spandsp/t38_gateway.h>
+#include <spandsp/t38_terminal.h>
+#include <spandsp/t31.h>
+#include <spandsp/fax.h>
+#include <spandsp/adsi.h>
+#include <spandsp/oki_adpcm.h>
+#include <spandsp/ima_adpcm.h>
+#include <spandsp/g722.h>
+#include <spandsp/g726.h>
+#include <spandsp/lpc10.h>
+#include <spandsp/gsm0610.h>
+#include <spandsp/plc.h>
+#include <spandsp/playout.h>
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/adsi.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,407 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * adsi.h - Analogue display services interface and other call ID related handling.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: adsi.h,v 1.15 2006/10/24 13:22:01 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_ADSI_H_)
+#define _ADSI_H_
+
+/*! \page adsi_page ADSI transmission and reception
+\section adsi_page_sec_1 What does it do?
+Although ADSI has a specific meaning in some places, the term is used here to indicate
+any form of Analogue Display Service Interface, which includes caller ID, SMS, and others.
+
+The ADSI module provides for the transmission and reception of ADSI messages
+in various formats. Currently, the supported formats are:
+    - CLASS (Custom Local Area Signaling Services) standard, published by Bellcore:
+
+    - ACLIP (Analog Calling Line Identity Presentation) standard, published by the
+      Telecommunications Authority of Singapore:
+
+    - CLIP (Calling Line Identity Presentation) standard, published by ETSI.
+
+    - JCLIP (Japanese Calling Line Identity Presentation) standard, published by NTT.
+        
+    - TDD (Telecommunications Device for the Deaf).
+
+\section adsi_page_sec_2 How does it work?
+
+\section adsi_page_sec_2a The Bellcore CLASS specification
+Most FSK based CLI formats are similar to the US CLASS one, which is as follows:
+
+The alert tone for CLI during a call is at least 100ms of silence, then
+2130Hz + 2750Hz for 88ms to 110ms. When CLI is presented at ringing time,
+this tone is not sent. In the US, CLI is usually sent between the first
+two rings. This silence period is long in the US, so the message fits easily.
+In other places, where the standard ring tone has much smaller silences,
+a line voltage reversal is used to wake up a power saving receiver, then the
+message is sent, then the phone begins to ring.
+    
+The message is sent using a Bell 202 FSK modem. The data rate is 1200 bits
+per second. The message protocol uses 8-bit data words (bytes), each bounded
+by a start bit and a stop bit.
+
+Channel     Carrier     Message     Message     Data        Checksum
+Seizure     Signal      Type        Length      Word(s)     Word
+Signal                  Word        Word
+    
+\section adsi_page_sec_2a1 CHANNEL SEIZURE SIGNAL
+The channel seizure is 30 continuous bytes of 55h (01010101), including
+the start and stop bits (i.e. 300 bits of alternations in total).
+This provides a detectable alternating function to the CPE (i.e. the
+modem data pump).
+    
+\section adsi_page_sec_2a2 CARRIER SIGNAL
+The carrier signal consists of 180 bits of 1s. This may be reduced to 80
+bits of 1s for caller ID on call waiting.
+    
+\section adsi_page_sec_2a3 MESSAGE TYPE WORD
+Various message types are defined. The common ones for the US CLASS 
+standard are:
+    - Type 0x04 (SDMF) - single data message. Simple caller ID (CND)
+    - Type 0x80 (MDMF) - multiple data message. A more flexible caller ID,
+                         with extra information.
+    
+\section adsi_page_sec_2a4 MESSAGE LENGTH WORD
+The message length word specifies the total number of data words
+to follow.
+    
+\section adsi_page_sec_2a5 DATA WORDS
+The data words contain the actual message.
+    
+\section adsi_page_sec_2a6 CHECKSUM WORD
+The Checksum Word contains the twos complement of the modulo 256
+sum of the other words in the data message (i.e., message type,
+message length, and data words).  The receiving equipment may
+calculate the modulo 256 sum of the received words and add this
+sum to the received checksum word.  A result of zero generally
+indicates that the message was correctly received.  Message
+retransmission is not supported. The sumcheck word should be followed
+by a minimum of two stop bits.
+
+\section adsi_page_sec_2b The ETSI CLIP specification
+The ETSI CLIP specification uses similar messages to the Bellcore specification.
+They are not, however, identical. First, ETSI use the V.23 modem standard, rather
+than Bell 202. Second, different fields, and different message types are available.
+
+\section adsi_page_sec_2e The ETSI caller ID by DTMF specification
+CLI by DTMF is usually sent in a very simple way. The exchange does not give
+any prior warning (no reversal, or ring) to wake up the receiver. It just
+sends one of the following DTMF strings:
+    
+    - A<phone number>#
+    - D1#     Number not available because the caller has restricted it.
+    - D2#     Number not available because the call is international.
+    - D3#     Number not available due to technical reasons.
+*/
+
+enum
+{
+    ADSI_STANDARD_NONE = 0,
+    ADSI_STANDARD_CLASS = 1,
+    ADSI_STANDARD_CLIP = 2,
+    ADSI_STANDARD_ACLIP = 3,
+    ADSI_STANDARD_JCLIP = 4,
+    ADSI_STANDARD_CLIP_DTMF = 5,
+    ADSI_STANDARD_TDD = 6
+};
+
+/* In some of the messages code characters are used, as follows:
+        'C' for public callbox
+        'L' for long distance
+        'O' for overseas
+        'P' for private
+        'S' for service conflict */
+
+/*! Definitions for generic caller ID message type IDs */
+/*! Complete caller ID message */
+#define CLIDINFO_CMPLT          0x100
+/*! Date, time, phone #, name */
+#define CLIDINFO_GENERAL        0x101
+/*! Caller ID */
+#define CLIDINFO_CALLID         0x102
+/*! See frame type equates */
+#define CLIDINFO_FRAMETYPE      0x103
+
+/*! Definitions for CLASS (Custom Local Area Signaling Services) */
+/*! Single data message caller ID */
+#define CLASS_SDMF_CALLERID     0x04
+/*! Multiple data message caller ID */
+#define CLASS_MDMF_CALLERID     0x80
+/*! Single data message message waiting */
+#define CLASS_SDMF_MSG_WAITING  0x06
+/*! Multiple data message message waiting */
+#define CLASS_MDMF_MSG_WAITING  0x82
+
+/*! CLASS MDMF message IDs */
+/*! Date and time (MMDDHHMM) */
+#define MCLASS_DATETIME         0x01
+/*! Caller number */
+#define MCLASS_CALLER_NUMBER    0x02
+/*! Dialed number */
+#define MCLASS_DIALED_NUMBER    0x03
+/*! Caller number absent: 'O' or 'P' */
+#define MCLASS_ABSENCE1         0x04
+/*! Call forward: universal ('0'), on busy ('1'), or on unanswered ('2') */
+#define MCLASS_REDIRECT         0x05
+/*! Long distance: 'L' */
+#define MCLASS_QUALIFIER        0x06
+/*! Caller's name */
+#define MCLASS_CALLER_NAME      0x07
+/*! Caller's name absent: 'O' or 'P' */
+#define MCLASS_ABSENCE2         0x08
+
+/*! CLASS MDMF message waiting message IDs */
+/*! Message waiting/not waiting */
+#define MCLASS_VISUAL_INDICATOR 0x0B
+
+/*! Definitions for CLIP (Calling Line Identity Presentation) */
+/*! Multiple data message caller ID */
+#define CLIP_MDMF_CALLERID      0x80
+/*! Multiple data message message waiting */
+#define CLIP_MDMF_MSG_WAITING   0x82
+/*! Multiple data message charge information */
+#define CLIP_MDMF_CHARGE_INFO   0x86
+/*! Multiple data message SMS */
+#define CLIP_MDMF_SMS           0x89
+
+/*! CLIP message IDs */
+/*! Date and time (MMDDHHMM) */
+#define CLIP_DATETIME           0x01
+/*! Caller number */
+#define CLIP_CALLER_NUMBER      0x02
+/*! Dialed number */
+#define CLIP_DIALED_NUMBER      0x03
+/*! Caller number absent: 'O' or 'P' */
+#define CLIP_ABSENCE1           0x04
+/*! Caller's name */
+#define CLIP_CALLER_NAME        0x07
+/*! Caller's name absent: 'O' or 'P' */
+#define CLIP_ABSENCE2           0x08
+/*! Visual indicator */
+#define CLIP_VISUAL_INDICATOR   0x0B
+/*! Message ID */
+#define CLIP_MESSAGE_ID         0x0D
+/*! Voice call, ring-back-when-free call, or msg waiting call */
+#define CLIP_CALLTYPE           0x11
+/*! Number of messages */
+#define CLIP_NUM_MSG            0x13
+/*! Redirecting number */
+#define CLIP_REDIR_NUMBER       0x03
+/*! Charge */
+#define CLIP_CHARGE             0x20
+/*! Duration of the call */
+#define CLIP_DURATION           0x23
+/*! Additional charge */
+#define CLIP_ADD_CHARGE         0x21
+/*! Display information */
+#define CLIP_DISPLAY_INFO       0x50
+/*! Service information */
+#define CLIP_SERVICE_INFO       0x55
+
+/*! Definitions for A-CLIP (Analog Calling Line Identity Presentation) */
+/*! Single data message caller ID frame   */
+#define ACLIP_SDMF_CALLERID     0x04
+/*! Multiple data message caller ID frame */
+#define ACLIP_MDMF_CALLERID     0x80
+
+/*! A-CLIP MDM message IDs */
+/*! Date and time (MMDDHHMM) */
+#define ACLIP_DATETIME          0x01
+/*! Caller number */
+#define ACLIP_CALLER_NUMBER     0x02
+/*! Dialed number */
+#define ACLIP_DIALED_NUMBER     0x03
+/*! Caller number absent: 'O' or 'P' */
+#define ACLIP_ABSENCE1          0x04
+/*! Call forward: universal, on busy, or on unanswered */
+#define ACLIP_REDIRECT          0x05
+/*! Long distance call: 'L' */
+#define ACLIP_QUALIFIER         0x06
+/*! Caller's name */
+#define ACLIP_CALLER_NAME       0x07
+/*! Caller's name absent: 'O' or 'P' */
+#define ACLIP_ABSENCE2          0x08
+
+/*! Definitions for J-CLIP (Japan Calling Line Identity Presentation) */
+/*! Multiple data message caller ID frame */
+#define JCLIP_MDMF_CALLERID     0x40
+
+/*! J-CLIP MDM message IDs */
+/*! Caller number */
+#define JCLIP_CALLER_NUMBER     0x02
+/*! Caller number data extension signal */
+#define JCLIP_CALLER_NUM_DES    0x21
+/*! Dialed number */
+#define JCLIP_DIALED_NUMBER     0x09
+/*! Dialed number data extension signal */
+#define JCLIP_DIALED_NUM_DES    0x22
+/*! Caller number absent: 'C', 'O', 'P' or 'S' */
+#define JCLIP_ABSENCE           0x04
+
+/*! Definitions for CLIP-DTMF */
+/*! Caller number */
+#define CLIP_DTMF_CALLER_NUMBER 'A'
+/*! Caller number absent: private (1), overseas (2) or not available (3) */
+#define CLIP_DTMF_ABSENCE1      'D'
+
+/*!
+    ADSI transmitter descriptor. This contains all the state information for an ADSI
+    (caller ID, CLASS, CLIP, ACLIP) transmit channel.
+ */
+typedef struct
+{
+    int standard;
+
+    tone_gen_descriptor_t alert_tone_desc;
+    tone_gen_state_t alert_tone_gen;
+    fsk_tx_state_t fsktx;
+    dtmf_tx_state_t dtmftx;
+    async_tx_state_t asynctx;
+    
+    int tx_signal_on;
+    
+    int byteno;
+    int bitpos;
+    int bitno;
+    uint8_t msg[256];
+    int msg_len;
+    int ones_len;
+    int baudot_shift;
+    
+    logging_state_t logging;
+} adsi_tx_state_t;
+
+/*!
+    ADSI receiver descriptor. This contains all the state information for an ADSI
+    (caller ID, CLASS, CLIP, ACLIP) receive channel.
+ */
+typedef struct
+{
+    put_msg_func_t put_msg;
+    void *user_data;
+    int standard;
+
+    fsk_rx_state_t fskrx;
+    dtmf_rx_state_t dtmfrx;
+    async_rx_state_t asyncrx;
+    
+    int consecutive_ones;
+    int bitpos;
+    int in_progress;
+    uint8_t msg[256];
+    int msg_len;
+    int baudot_shift;
+    
+    /*! A count of the framing errors. */
+    int framing_errors;
+
+    logging_state_t logging;
+} adsi_rx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Initialise an ADSI receive context.
+    \param s The ADSI receive context.
+    \param standard The code for the ADSI standard to be used.
+    \param put_msg A callback routine called to deliver the received messages
+           to the application.
+    \param user_data An opaque pointer for the callback routine.
+*/
+void adsi_rx_init(adsi_rx_state_t *s, int standard, put_msg_func_t put_msg, void *user_data);
+
+/*! \brief Receive a chunk of ADSI audio.
+    \param s The ADSI receive context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+*/
+void adsi_rx(adsi_rx_state_t *s, const int16_t *amp, int len);
+
+/*! \brief Initialise an ADSI transmit context.
+    \param s The ADSI transmit context.
+    \param standard The code for the ADSI standard to be used.
+*/
+void adsi_tx_init(adsi_tx_state_t *s, int standard);
+
+/*! \brief Generate a block of ADSI audio samples.
+    \param s The ADSI transmit context.
+    \param amp The audio sample buffer.
+    \param max_len The number of samples to be generated.
+    \return The number of samples actually generated.
+*/
+int adsi_tx(adsi_tx_state_t *s, int16_t *amp, int max_len);
+
+/*! \brief Request generation of an ADSI alert tone.
+    \param s The ADSI transmit context.
+*/
+void adsi_send_alert_tone(adsi_tx_state_t *s);
+
+/*! \brief Put a message into the input buffer of an ADSI transmit context.
+    \param s The ADSI transmit context.
+    \param msg The message.
+    \param len The length of the message.
+    \return The length actually added. If a message is already in progress
+            in the transmitter, this function will return zero, as it will
+            not successfully add the message to the buffer.
+*/
+int adsi_put_message(adsi_tx_state_t *s, uint8_t *msg, int len);
+
+/*! \brief Get a field from an ADSI message.
+    \param s The ADSI receive context.
+    \param msg The message buffer.
+    \param msg_len The length of the message.
+    \param pos Current position within the message. Set to -1 when starting a message.
+    \param field_type The type code for the field.
+    \param field_body Pointer to the body of the field.
+    \param field_len The length of the field, or -1 for no more fields, or -2 for message structure corrupt.
+*/
+int adsi_next_field(adsi_rx_state_t *s, const uint8_t *msg, int msg_len, int pos, uint8_t *field_type, uint8_t const **field_body, int *field_len);
+
+/*! \brief Insert the header or a field into an ADSI message.
+    \param s The ADSI transmit context.
+    \param msg The message buffer.
+    \param len The current length of the message.
+    \param field_type The type code for the new field.
+    \param field_body Pointer to the body of the new field.
+    \param field_len The length of the new field.
+*/
+int adsi_add_field(adsi_tx_state_t *s, uint8_t *msg, int len, uint8_t field_type, uint8_t const *field_body, int field_len);
+
+/*! \brief Return a short name for an ADSI standard
+    \param standard The code for the standard.
+    \return A pointer to the name.
+*/
+const char *adsi_standard_to_str(int standard);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/arctan2.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,78 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * arctan2.h - A quick rough approximate arc tan
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: arctan2.h,v 1.7 2006/10/24 13:22:01 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_ARCTAN2_H_)
+#define _ARCTAN2_H_
+
+/*! \page arctan2_page Fast approximate four quadrant arc-tangent
+\section arctan2_page_sec_1 What does it do?
+This module provides a fast approximate 4-quadrant arc tangent function,
+based on something at dspguru.com. The worst case error is about 4.07 degrees.
+This is fine for many "where am I" type evaluations in comms. work.
+
+\section arctan2_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* This returns its answer as a signed 32 bit integer phase value. */
+static __inline__ int32_t arctan2(float y, float x)
+{
+    float abs_y;
+    float angle;
+
+    if (x == 0.0  ||  y == 0.0)
+        return 0;
+    
+    abs_y = fabsf(y);
+
+    /* If we are in quadrant II or III, flip things around */
+    if (x < 0.0)
+        angle = 3.0f - (x + abs_y)/(abs_y - x);
+    else
+        angle = 1.0f - (x - abs_y)/(abs_y + x);
+    angle *= 536870912.0;
+
+    /* If we are in quadrant III or IV, negate to return an
+       answer in the range +-pi */
+    if (y < 0.0)
+        angle = -angle;
+    return (int32_t) angle;
+}
+/*- End of function --------------------------------------------------------*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/async.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,220 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * async.h - Asynchronous serial bit stream encoding and decoding
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: async.h,v 1.6 2006/10/24 13:22:01 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page async_page Asynchronous bit stream processing
+\section async_page_sec_1 What does it do?
+The asynchronous serial bit stream processing module provides
+generation and decoding facilities for most asynchronous data
+formats. It supports:
+ - 1 or 2 stop bits.
+ - Odd, even or no parity.
+ - 5, 6, 7, or 8 bit characters.
+ - V.14 rate adaption.
+The input to this module is a bit stream. This means any symbol synchronisation
+and decoding must occur before data is fed to this module.
+
+\section async_page_sec_2 The transmitter
+???.
+
+\section async_page_sec_3 The receiver
+???.
+*/
+
+#if !defined(_ASYNC_H_)
+#define _ASYNC_H_
+
+/* Special "bit" values for the put and get bit functions */
+enum
+{
+    /*! \brief The carrier signal has dropped. */
+    PUTBIT_CARRIER_DOWN = -1,
+    /*! \brief The carrier signal is up. This merely indicates that carrier
+         energy has been seen. It is not an indication that the carrier is either
+         valid, or of the expected type. */
+    PUTBIT_CARRIER_UP = -2,
+    /*! \brief The modem is training. This is an early indication that the
+        signal seems to be of the right type. This may be needed in time critical
+        applications, like T.38, to forward an early indication of what is happening
+        on the wire. */
+    PUTBIT_TRAINING_IN_PROGRESS = -3,
+    /*! \brief The modem has trained, and is ready for data exchange. */
+    PUTBIT_TRAINING_SUCCEEDED = -4,
+    /*! \brief The modem has failed to train. */
+    PUTBIT_TRAINING_FAILED = -5,
+    /*! \brief Packet framing (e.g. HDLC framing) is OK. */
+    PUTBIT_FRAMING_OK = -6,
+    /*! \brief The data stream has ended. */
+    PUTBIT_END_OF_DATA = -7,
+    /*! \brief An abort signal (e.g. an HDLC abort) has been received. */
+    PUTBIT_ABORT = -8,
+    /*! \brief A break signal (e.g. an async break) has been received. */
+    PUTBIT_BREAK = -9
+};
+
+/*! Message put function for data pumps */
+typedef void (*put_msg_func_t)(void *user_data, const uint8_t *msg, int len);
+
+/*! Message get function for data pumps */
+typedef int (*get_msg_func_t)(void *user_data, uint8_t *msg, int max_len);
+
+/*! Byte put function for data pumps */
+typedef void (*put_byte_func_t)(void *user_data, int byte);
+
+/*! Byte get function for data pumps */
+typedef int (*get_byte_func_t)(void *user_data);
+
+/*! Bit put function for data pumps */
+typedef void (*put_bit_func_t)(void *user_data, int bit);
+
+/*! Bit get function for data pumps */
+typedef int (*get_bit_func_t)(void *user_data);
+
+/*! No parity bit should be used */
+#define ASYNC_PARITY_NONE   0
+/*! An even parity bit will exist, after the data bits */
+#define ASYNC_PARITY_EVEN   1
+/*! An odd parity bit will exist, after the data bits */
+#define ASYNC_PARITY_ODD    2
+
+/*!
+    Asynchronous data transmit descriptor. This defines the state of a single
+    working instance of a byte to asynchronous serial converter, for use
+    in FSK modems.
+*/
+typedef struct
+{
+    /*! \brief The number of data bits per character. */
+    int data_bits;
+    /*! \brief The type of parity. */
+    int parity;
+    /*! \brief The number of stop bits per character. */
+    int stop_bits;
+    /*! \brief A pointer to the callback routine used to get characters to be transmitted. */
+    get_byte_func_t get_byte;
+    /*! \brief An opaque pointer passed when calling get_byte. */
+    void *user_data;
+
+    /*! \brief A current, partially transmitted, character. */
+    int byte_in_progress;
+    /*! \brief The current bit position within a partially transmitted character. */
+    int bitpos;
+    int parity_bit;
+} async_tx_state_t;
+
+/*!
+    Asynchronous data receive descriptor. This defines the state of a single
+    working instance of an asynchronous serial to byte converter, for use
+    in FSK modems.
+*/
+typedef struct
+{
+    /*! \brief The number of data bits per character. */
+    int data_bits;
+    /*! \brief The type of parity. */
+    int parity;
+    /*! \brief The number of stop bits per character. */
+    int stop_bits;
+    /*! \brief TRUE if V.14 rate adaption processing should be performed. */
+    int use_v14;
+    /*! \brief A pointer to the callback routine used to handle received characters. */
+    put_byte_func_t put_byte;
+    /*! \brief An opaque pointer passed when calling put_byte. */
+    void *user_data;
+
+    /*! \brief A current, partially complete, character. */
+    int byte_in_progress;
+    /*! \brief The current bit position within a partially complete character. */
+    int bitpos;
+    int parity_bit;
+
+    int parity_errors;
+    int framing_errors;
+} async_rx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise an asynchronous data transmit context.
+    \brief Initialise an asynchronous data transmit context.
+    \param s The transmitter context.
+    \param data_bits The number of data bit.
+    \param parity_bits The type of parity.
+    \param stop_bits The number of stop bits.
+    \param use_v14 TRUE if V.14 rate adaption processing should be used.
+    \param get_byte The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer. */
+void async_tx_init(async_tx_state_t *s,
+                   int data_bits,
+                   int parity_bits,
+                   int stop_bits,
+                   int use_v14,
+                   get_byte_func_t get_byte,
+                   void *user_data);
+
+/*! Get the next bit of a transmitted serial bit stream.
+    \brief Get the next bit of a transmitted serial bit stream.
+    \param user_data An opaque point which must point to a transmitter context.
+    \return the next bit, or PUTBIT_END_OF_DATA to indicate the data stream has ended. */
+int async_tx_get_bit(void *user_data);
+
+/*! Initialise an asynchronous data receiver context.
+    \brief Initialise an asynchronous data receiver context.
+    \param s The receiver context.
+    \param data_bits The number of data bits.
+    \param parity_bits The type of parity.
+    \param stop_bits The number of stop bits.
+    \param use_v14 TRUE if V.14 rate adaption processing should be used.
+    \param put_byte The callback routine used to put the received data.
+    \param user_data An opaque pointer. */
+void async_rx_init(async_rx_state_t *s,
+                   int data_bits,
+                   int parity_bits,
+                   int stop_bits,
+                   int use_v14,
+                   put_byte_func_t put_byte,
+                   void *user_data);
+
+/*! Accept a bit from a received serial bit stream
+    \brief Accept a bit from a received serial bit stream
+    \param user_data An opaque point which must point to a receiver context.
+    \param bit The new bit. Some special values are supported for this field.
+        - PUTBIT_CARRIER_UP
+        - PUTBIT_CARRIER_DOWN
+        - PUTBIT_TRAINING_SUCCEEDED
+        - PUTBIT_TRAINING_FAILED
+        - PUTBIT_END_OF_DATA */
+void async_rx_put_bit(void *user_data, int bit);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/at_interpreter.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,267 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * at_interpreter.h - AT command interpreter to V.251, V.252, V.253, T.31 and the 3GPP specs.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004, 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: at_interpreter.h,v 1.10 2006/10/24 13:45:27 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_AT_INTERPRETER_H_)
+#define _AT_INTERPRETER_H_
+
+/*! \page at_page AT command interpreter
+\section at_page_sec_1 What does it do?
+The AT interpreter module implements V.251, V.252, V.253, T.31 and various 3GPP
+modem control commands.
+
+\section at_page_sec_2 How does it work?
+*/
+
+typedef struct at_state_s at_state_t;
+
+typedef int (at_modem_control_handler_t)(at_state_t *s, void *user_data, int op, const char *num);
+typedef int (at_tx_handler_t)(at_state_t *s, void *user_data, const uint8_t *buf, size_t len);
+typedef int (at_class1_handler_t)(at_state_t *s, void *user_data, int direction, int operation, int val);
+
+enum at_rx_mode_e
+{
+    AT_MODE_ONHOOK_COMMAND,
+    AT_MODE_OFFHOOK_COMMAND,
+    AT_MODE_CONNECTED,
+    AT_MODE_DELIVERY,
+    AT_MODE_HDLC,
+    AT_MODE_STUFFED
+};
+
+enum at_call_event_e
+{
+    AT_CALL_EVENT_ALERTING = 1,
+    AT_CALL_EVENT_CONNECTED,
+    AT_CALL_EVENT_ANSWERED,
+    AT_CALL_EVENT_BUSY,
+    AT_CALL_EVENT_NO_DIALTONE,
+    AT_CALL_EVENT_NO_ANSWER,
+    AT_CALL_EVENT_HANGUP
+};
+
+enum at_modem_control_operation_e
+{
+    AT_MODEM_CONTROL_CALL,
+    AT_MODEM_CONTROL_ANSWER,
+    AT_MODEM_CONTROL_HANGUP,
+    AT_MODEM_CONTROL_OFFHOOK,
+    AT_MODEM_CONTROL_ONHOOK,
+    AT_MODEM_CONTROL_DTR,
+    AT_MODEM_CONTROL_RTS,
+    AT_MODEM_CONTROL_CTS,
+    AT_MODEM_CONTROL_CAR,
+    AT_MODEM_CONTROL_RNG,
+    AT_MODEM_CONTROL_DSR,
+    AT_MODEM_CONTROL_SETID,
+    /* The remainder of the control functions should not get past the modem, to the
+       application. */
+    AT_MODEM_CONTROL_RESTART,
+    AT_MODEM_CONTROL_DTE_TIMEOUT
+};
+
+enum
+{
+    AT_RESPONSE_CODE_OK = 0,
+    AT_RESPONSE_CODE_CONNECT,
+    AT_RESPONSE_CODE_RING,
+    AT_RESPONSE_CODE_NO_CARRIER,
+    AT_RESPONSE_CODE_ERROR,
+    AT_RESPONSE_CODE_XXX,
+    AT_RESPONSE_CODE_NO_DIALTONE,
+    AT_RESPONSE_CODE_BUSY,
+    AT_RESPONSE_CODE_NO_ANSWER,
+    AT_RESPONSE_CODE_FCERROR,
+    AT_RESPONSE_CODE_FRH3
+};
+
+/*!
+    AT profile.
+*/
+typedef struct
+{
+    /*! TRUE if character echo is enabled */
+    int echo;
+    /*! TRUE if verbose reporting is enabled */
+    int verbose;
+    /*! TRUE if result codes are verbose */
+    int result_code_format;
+    /*! TRUE if pulse dialling is the default */
+    int pulse_dial;
+    /*! ??? */
+    int double_escape;
+    /*! ??? */
+    int adaptive_receive;
+    /*! The state of all possible S registers */
+    uint8_t s_regs[100];
+} at_profile_t;
+
+/*!
+    AT descriptor. This defines the working state for a single instance of
+    the AT interpreter.
+*/
+struct at_state_s
+{
+    at_profile_t p;
+    /*! Value set by +GCI */
+    int country_of_installation;
+    /*! Value set by +FIT */
+    int dte_inactivity_timeout;
+    /*! Value set by +FIT */
+    int dte_inactivity_action;
+    /*! Value set by L */
+    int speaker_volume;
+    /*! Value set by M */
+    int speaker_mode;
+    /*! This is no real DTE rate. This variable is for compatibility this serially
+        connected modems. */
+    /*! Value set by +IPR/+FPR */
+    int dte_rate;
+    /*! Value set by +ICF */
+    int dte_char_format;
+    /*! Value set by +ICF */
+    int dte_parity;
+    /*! Value set by &C */
+    int rlsd_behaviour;
+    /*! Value set by &D */
+    int dtr_behaviour;
+    /*! Value set by +FCL */
+    int carrier_loss_timeout;
+    /*! Value set by X */
+    int result_code_mode;
+    /*! Value set by +IDSR */
+    int dsr_option;
+    /*! Value set by +ILSD */
+    int long_space_disconnect_option;
+    /*! Value set by +ICLOK */
+    int sync_tx_clock_source;
+    /*! Value set by +EWIND */
+    int rx_window;
+    /*! Value set by +EWIND */
+    int tx_window;
+    
+    int v8bis_signal;
+    int v8bis_1st_message;
+    int v8bis_2nd_message;
+    int v8bis_sig_en;
+    int v8bis_msg_en;
+    int v8bis_supp_delay;
+
+    uint8_t rx_data[256];
+    int rx_data_bytes;
+
+    int display_call_info;
+    int call_info_displayed;
+    char *call_date;
+    char *call_time;
+    char *originating_name;
+    char *originating_number;
+    char *originating_ani;
+    char *destination_number;
+    char *local_id;
+    /*! The currently select FAX modem class. 0 = data modem mode. */
+    int fclass_mode;
+    int at_rx_mode;
+    int rings_indicated;
+    int do_hangup;
+    int silent_dial;
+    int ok_is_pending;
+    int dte_is_waiting;
+    /*! \brief TRUE if a carrier is presnt. Otherwise FALSE. */
+    int rx_signal_present;
+    /*! \brief TRUE if a modem has trained, Otherwise FALSE. */
+    int rx_trained;
+    int transmit;
+
+    char line[256];
+    int line_ptr;
+
+    at_modem_control_handler_t *modem_control_handler;
+    void *modem_control_user_data;
+    at_tx_handler_t *at_tx_handler;
+    void *at_tx_user_data;
+    at_class1_handler_t *class1_handler;
+    void *class1_user_data;
+
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void at_set_at_rx_mode(at_state_t *s, int new_mode);
+
+void at_put_response(at_state_t *s, const char *t);
+
+void at_put_numeric_response(at_state_t *s, int val);
+
+void at_put_response_code(at_state_t *s, int code);
+
+void at_reset_call_info(at_state_t *s);
+
+/*! Set the call information for an AT interpreter.
+    \brief Set the call information for an AT interpreter.
+    \param s The AT interpreter context.
+    \param call_date .
+    \param call_time .
+    \param originating_name .
+    \param originating_number .
+    \param originating_ani .
+    \param destination_number . */
+void at_set_call_info(at_state_t *s,
+                      char const *call_date,
+                      char const *call_time,
+                      char const *originating_name,
+                      char const *originating_number,
+                      char const *originating_ani,
+                      char const *destination_number);
+
+void at_display_call_info(at_state_t *s);
+
+int at_modem_control(at_state_t *s, int op, const char *num);
+
+void at_call_event(at_state_t *s, int event);
+
+void at_interpreter(at_state_t *s, const char *cmd, int len);
+
+void at_set_class1_handler(at_state_t *s, at_class1_handler_t handler, void *user_data);
+
+at_state_t *at_init(at_state_t *s,
+                    at_tx_handler_t *at_tx_handler,
+                    void *at_tx_user_data,
+                    at_modem_control_handler_t *modem_control_handler,
+                    void *modem_control_user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/awgn.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,100 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * awgn.h - An additive Gaussian white noise generator
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: awgn.h,v 1.8 2006/10/24 13:45:27 steveu Exp $
+ */
+
+/*! \file */
+
+/* This code is based on some demonstration code in a research
+   paper somewhere. I can't track down where I got the original from,
+   so that due recognition can be given. The original had no explicit
+   copyright notice, and I hope nobody objects to its use here.
+   
+   Having a reasonable Gaussian noise generator is pretty important for
+   telephony testing (in fact, pretty much any DSP testing), and this
+   one seems to have served me OK. Since the generation of Gaussian
+   noise is only for test purposes, and not a core system component,
+   I don't intend to worry excessively about copyright issues, unless
+   someone worries me.
+        
+   The non-core nature of this code also explains why it is unlikely
+   to ever be optimised. */
+
+#if !defined(_AWGN_H_)
+#define _AWGN_H_
+
+/*! \page awgn_page Additive white gaussian noise (AWGN) generation
+
+\section awgn_page_sec_1 What does it do?
+Adding noise is not the most useful thing in most DSP applications, but it is
+awfully useful for test suites. 
+
+\section awgn_page_sec_2 How does it work?
+
+This code is based on some demonstration code in a research paper somewhere. I
+can't track down where I got the original from, so that due recognition can be
+given. The original had no explicit copyright notice, and I hope nobody objects
+to its use here. 
+
+Having a reasonable Gaussian noise generator is pretty important for telephony
+testing (in fact, pretty much any DSP testing), and this one seems to have
+served me OK. Since the generation of Gaussian noise is only for test purposes,
+and not a core system component, I don't intend to worry excessively about
+copyright issues, unless someone worries me. 
+
+The non-core nature of this code also explains why it is unlikely to ever be
+optimised.
+*/
+
+/*!
+    AWGN generator descriptor. This contains all the state information for an AWGN generator.
+ */
+typedef struct
+{
+    double rms;
+    long int ix1;
+    long int ix2;
+    long int ix3;
+    double r[98];
+    double gset;
+    int iset;
+} awgn_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void awgn_init_dbm0(awgn_state_t *s, int idum, float level);
+
+void awgn_init_dbov(awgn_state_t *s, int idum, float level);
+
+int16_t awgn(awgn_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/bell_r2_mf.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,257 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bell_r2_mf.h - Bell MF and MFC/R2 tone generation and detection.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bell_r2_mf.h,v 1.5 2006/10/24 13:22:01 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_BELL_R2_MF_H_)
+#define _BELL_R2_MF_H_
+
+/*! \page mfc_r2_tone_generation_page MFC/R2 tone generation
+\section mfc_r2_tone_generation_page_sec_1 What does it do?
+The MFC/R2 tone generation module provides for the generation of the
+repertoire of 15 dual tones needs for the digital MFC/R2 signalling protocol. 
+
+\section mfc_r2_tone_generation_page_sec_2 How does it work?
+*/
+
+/*! \page bell_mf_tone_generation_page Bell MF tone generation
+\section bell_mf_tone_generation_page_sec_1 What does it do?
+The Bell MF tone generation module provides for the generation of the
+repertoire of 15 dual tones needs for various Bell MF signalling protocols. 
+
+\section bell_mf_tone_generation_page_sec_2 How does it work?
+Basic Bell MF tone generation specs:
+    - Tone on time = KP: 100+-7ms. All other signals: 68+-7ms
+    - Tone off time (between digits) = 68+-7ms
+    - Frequency tolerance +- 1.5%
+    - Signal level -7+-1dBm per frequency
+*/
+
+/*! \page mfc_r2_tone_rx_page MFC/R2 tone receiver
+
+\section mfc_r2_tone_rx_page_sec_1 What does it do?
+The MFC/R2 tone receiver module provides for the detection of the
+repertoire of 15 dual tones needs for the digital MFC/R2 signalling protocol. 
+It is compliant with ITU-T Q.441D.
+
+\section mfc_r2_tone_rx_page_sec_2 How does it work?
+Basic MFC/R2 tone detection specs:
+    - Receiver response range: -5dBm to -35dBm
+    - Difference in level for a pair of frequencies
+        - Adjacent tones: <5dB
+        - Non-adjacent tones: <7dB
+    - Receiver not to detect a signal of 2 frequencies of level -5dB and
+      duration <7ms.
+    - Receiver not to recognise a signal of 2 frequencies having a difference
+      in level >=20dB.
+    - Max received signal frequency error: +-10Hz
+    - The sum of the operate and release times of a 2 frequency signal not to
+      exceed 80ms (there are no individual specs for the operate and release
+      times).
+    - Receiver not to release for signal interruptions <=7ms.
+    - System malfunction due to signal interruptions >7ms (typically 20ms) is
+      prevented by further logic elements.
+*/
+
+/*! \page bell_mf_tone_rx_page Bell MF tone receiver
+
+\section bell_mf_tone_rx_page_sec_1 What does it do?
+The Bell MF tone receiver module provides for the detection of the
+repertoire of 15 dual tones needs for various Bell MF signalling protocols. 
+It is compliant with ITU-T Q.320, ITU-T Q.322, ITU-T Q.323B.
+
+\section bell_mf_tone_rx_page_sec_2 How does it work?
+Basic Bell MF tone detection specs:
+    - Frequency tolerance +- 1.5% +-10Hz
+    - Signal level -14dBm to 0dBm
+    - Perform a "two and only two tones present" test.
+    - Twist <= 6dB accepted
+    - Receiver sensitive to signals above -22dBm per frequency
+    - Test for a minimum of 55ms if KP, or 30ms of other signals.
+    - Signals to be recognised if the two tones arrive within 8ms of each other.
+    - Invalid signals result in the return of the re-order tone.
+
+Note: Above -3dBm the signal starts to clip. We can detect with a little clipping,
+      but not up to 0dBm, which the above spec seems to require. There isn't a lot
+      we can do about that. Is the spec. incorrectly worded about the dBm0 reference
+      point, or have I misunderstood it?
+*/
+
+#define MAX_BELL_MF_DIGITS 128
+
+typedef enum
+{
+    BELL_MF_TONES,
+    R2_MF_TONES,
+    SOCOTEL_TONES
+} mf_tone_types_e;
+
+/*!
+    Bell MF generator state descriptor. This defines the state of a single
+    working instance of a Bell MF generator.
+*/
+typedef struct
+{
+    tone_gen_descriptor_t *tone_descriptors;
+    tone_gen_state_t tones;
+    char digits[MAX_BELL_MF_DIGITS + 1];
+    int current_sample;
+    size_t current_digits;
+} bell_mf_tx_state_t;
+
+/*!
+    Bell MF digit detector descriptor.
+*/
+typedef struct
+{
+    /*! Optional callback funcion to deliver received digits. */
+    void (*callback)(void *data, const char *digits, int len);
+    /*! An opaque pointer passed to the callback function. */
+    void *callback_data;
+    /*! Tone detector working states */
+    goertzel_state_t out[6];
+    /*! Short term history of results from the tone detection, using in persistence checking */
+    uint8_t hits[5];
+    /*! The current sample number within a processing block. */
+    int current_sample;
+
+    /*! The received digits buffer. This is a NULL terminated string. */
+    char digits[MAX_BELL_MF_DIGITS + 1];
+    /*! The number of digits currently in the digit buffer. */
+    int current_digits;
+    /*! The number of digits which have been lost due to buffer overflows. */
+    int lost_digits;
+} bell_mf_rx_state_t;
+
+/*!
+    MFC/R2 tone detector descriptor.
+*/
+typedef struct
+{
+    tone_gen_state_t tone;
+} r2_mf_tx_state_t;
+
+/*!
+    MFC/R2 tone detector descriptor.
+*/
+typedef struct
+{
+    /*! TRUE is we are detecting forward tones. FALSE if we are detecting backward tones */
+    int fwd;
+    /*! Tone detector working states */
+    goertzel_state_t out[6];
+    int samples;
+    int current_sample;
+} r2_mf_rx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Generate a buffer of Bell MF tones.
+    \param s The Bell MF generator context.
+    \param amp The buffer for the generated signal.
+    \param max_samples The required number of generated samples.
+    \return The number of samples actually generated. This may be less than 
+            samples if the input buffer empties. */
+int bell_mf_tx(bell_mf_tx_state_t *s, int16_t amp[], int max_samples);
+
+/*! \brief Put a string of digits in a Bell MF generator's input buffer.
+    \param s The Bell MF generator context.
+    \param digits The string of digits to be added.
+    \return The number of digits actually added. This may be less than the
+            length of the digit string, if the buffer fills up. */
+size_t bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits);
+
+/*! \brief Initialise a Bell MF generator context.
+    \param s The Bell MF generator context.
+    \return A pointer to the Bell MF generator context.*/
+bell_mf_tx_state_t *bell_mf_tx_init(bell_mf_tx_state_t *s);
+
+/*! \brief Generate a block of R2 MF tones.
+    \param s The R2 MF generator context.
+    \param amp The buffer for the generated signal.
+    \param samples The required number of generated samples.
+    \param fwd TRUE to use the forward tone set. FALSE to use the reverse tone set.
+    \param digit The digit to be generated. When continuing to generate the same
+           digit as during the last call to this function, digit should be set to 0x7F.
+    \return The number of samples actually generated. */
+int r2_mf_tx(r2_mf_tx_state_t *s, int16_t amp[], int samples, int fwd, char digit);
+
+/*! \brief Initialise an MFC/R2 tone generator context.
+    \param s The R2 MF generator context.
+    \return A pointer to the MFC/R2 generator context.*/
+r2_mf_tx_state_t *r2_mf_tx_init(r2_mf_tx_state_t *s);
+
+/*! Process a block of received Bell MF audio samples.
+    \brief Process a block of received Bell MF audio samples.
+    \param s The Bell MF receiver context.
+    \param amp The audio sample buffer.
+    \param samples The number of samples in the buffer.
+    \return The number of samples unprocessed. */
+int bell_mf_rx(bell_mf_rx_state_t *s, const int16_t amp[], int samples);
+
+/*! \brief Get a string of digits from a Bell MF receiver's output buffer.
+    \param s The Bell MF receiver context.
+    \param digits The buffer for the received digits.
+    \param max The maximum  number of digits to be returned,
+    \return The number of digits actually returned. */
+size_t bell_mf_rx_get(bell_mf_rx_state_t *s, char *buf, int max);
+
+/*! \brief Initialise a Bell MF receiver context.
+    \param s The Bell MF receiver context.
+    \param callback An optional callback routine, used to report received digits. If
+           no callback routine is set, digits may be collected, using the bell_mf_rx_get()
+           function.
+    \param user_data An opaque pointer which is associated with the context,
+           and supplied in callbacks.
+    \return A pointer to the Bell MF receiver context.*/
+bell_mf_rx_state_t *bell_mf_rx_init(bell_mf_rx_state_t *s,
+                                    void (*callback)(void *user_data, const char *digits, int len),
+                                    void *user_data);
+
+/*! Process a block of received R2 MF audio samples.
+    \brief Process a block of received R2 MF audio samples.
+    \param s The R2 MF receiver context.
+    \param amp The audio sample buffer.
+    \param samples The number of samples in the buffer.
+    \return The number of samples unprocessed. */
+int r2_mf_rx(r2_mf_rx_state_t *s, const int16_t amp[], int samples);
+
+/*! \brief Initialise an R2 MF receiver context.
+    \param s The R2 MF receiver context.
+    \param fwd TRUE if the context is for forward signals. FALSE if the
+           context is for backward signals.
+    \return A pointer to the R2 MF receiver context. */
+r2_mf_rx_state_t *r2_mf_rx_init(r2_mf_rx_state_t *s, int fwd);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/bert.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,199 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bert.h - Bit error rate tests.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bert.h,v 1.13 2006/10/24 13:45:27 steveu Exp $
+ */
+
+#if !defined(_BERT_H_)
+#define _BERT_H_
+
+/*! \page bert_page The Bit Error Rate tester
+\section bert_page_sec_1 What does it do?
+The Bit Error Rate tester generates a pseudo random bit stream. It also accepts such
+a pattern, synchronises to it, and checks the bit error rate in this stream.
+
+\section bert_page_sec_2 How does it work?
+The Bit Error Rate tester generates a bit stream, with a repeating 2047 bit pseudo
+random pattern, using an 11 stage polynomial generator. It also accepts such a pattern,
+synchronises to it, and checks the bit error rate in this stream. If the error rate is
+excessive the tester assumes synchronisation has been lost, and it attempts to
+resynchronise with the stream.
+
+The bit error rate is continuously assessed against decadic ranges -
+    > 1 in 10^2
+    > 1 in 10^3
+    > 1 in 10^4
+    > 1 in 10^5
+    > 1 in 10^6
+    > 1 in 10^7
+    < 1 in 10^7
+To ensure fairly smooth results from this assessment, each decadic level is assessed
+over 10/error rate bits. That is, to assess if the signal's BER is above or below 1 in 10^5
+the software looks over 10*10^5 => 10^6 bits.
+*/
+
+enum
+{
+    BERT_REPORT_SYNCED,
+    BERT_REPORT_UNSYNCED,
+    BERT_REPORT_REGULAR,
+    BERT_REPORT_GT_10_2,
+    BERT_REPORT_LT_10_2,
+    BERT_REPORT_LT_10_3,
+    BERT_REPORT_LT_10_4,
+    BERT_REPORT_LT_10_5,
+    BERT_REPORT_LT_10_6,
+    BERT_REPORT_LT_10_7
+};
+
+/* The QBF strings should be:
+    "VoyeZ Le BricK GeanT QuE J'ExaminE PreS Du WharF 123 456 7890 + - * : = $ % ( )"
+    "ThE QuicK BrowN FoX JumpS OveR ThE LazY DoG 123 456 7890 + - * : = $ % ( )"
+*/
+
+enum
+{
+    BERT_PATTERN_ZEROS,
+    BERT_PATTERN_ONES,
+    BERT_PATTERN_7_TO_1,
+    BERT_PATTERN_3_TO_1,
+    BERT_PATTERN_1_TO_1,
+    BERT_PATTERN_1_TO_3,
+    BERT_PATTERN_1_TO_7,
+    BERT_PATTERN_QBF,
+    BERT_PATTERN_ITU_O151_23,
+    BERT_PATTERN_ITU_O151_20,
+    BERT_PATTERN_ITU_O151_15,
+    BERT_PATTERN_ITU_O152_11,
+    BERT_PATTERN_ITU_O153_9
+};
+
+/*!
+    Bit error rate tester (BERT) results descriptor. This is used to report the
+    results of a BER test.
+*/
+typedef struct
+{
+    int total_bits;
+    int bad_bits;
+    int resyncs;
+} bert_results_t;
+
+typedef void (*bert_report_func_t)(void *user_data, int reason, bert_results_t *bert_results);
+
+/*!
+    Bit error rate tester (BERT) descriptor. This defines the working state for a
+    single instance of the BERT.
+*/
+typedef struct
+{
+    int pattern;
+    int pattern_class;
+    bert_report_func_t reporter;
+    void *user_data;
+    int report_frequency;
+    int limit;
+
+    uint32_t tx_reg;
+    int tx_step;
+    int tx_step_bit;
+    int tx_bits;
+    int tx_zeros;
+
+    uint32_t rx_reg;
+    uint32_t ref_reg;
+    uint32_t master_reg;
+    int rx_step;
+    int rx_step_bit;
+    int resync;
+    int rx_bits;
+    int rx_zeros;
+    int resync_len;
+    int resync_percent;
+    int resync_bad_bits;
+    int resync_cnt;
+    
+    uint32_t mask;
+    int shift;
+    int shift2;
+    int max_zeros;
+    int invert;
+    int resync_time;
+
+    int decade_ptr[8];
+    int decade_bad[8][10];
+    int step;
+    int error_rate;
+
+    int bit_error_status;
+    int report_countdown;
+
+    bert_results_t results;
+
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} bert_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a BERT context.
+    \param s The BERT context.
+    \param limit The maximum test duration.
+    \param pattern One of the supported BERT signal patterns.
+    \param resync_len ???
+    \param resync_percent The percentage of bad bits which will cause a resync.
+    \return The BERT context. */
+bert_state_t *bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent);
+
+/*! Get the next bit of the BERT sequence from the generator.
+    \param s The BERT context.
+    \return The bit. */
+int bert_get_bit(bert_state_t *s);
+
+/*! Put the next bit of the BERT sequence to the analyser.
+    \param s The BERT context.
+    \param bit The bit. */
+void bert_put_bit(bert_state_t *s, int bit);
+
+/*! Set the callback function for reporting the test status.
+    \param s The BERT context.
+    \param freq The required frequency of regular reports.
+    \param reporter The callback function.
+    \param user_data An opaque pointer passed to the reporter routine. */
+void bert_set_report(bert_state_t *s, int freq, bert_report_func_t reporter, void *user_data);
+
+/*! Get the results of the BERT.
+    \param s The BERT context.
+    \param results The results.
+    \return The size of the result structure. */
+int bert_result(bert_state_t *s, bert_results_t *results);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/biquad.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,116 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * biquad.h - General telephony bi-quad section routines (currently this just
+ *            handles canonic/type 2 form)
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: biquad.h,v 1.9 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \page biquad_page Bi-quadratic filter sections
+\section biquad_page_sec_1 What does it do?
+???.
+
+\section biquad_page_sec_2 How does it work?
+???.
+*/
+
+#if !defined(_BIQUAD_H_)
+#define _BIQUAD_H_
+
+typedef struct
+{
+    int32_t gain;
+    int32_t a1;
+    int32_t a2;
+    int32_t b1;
+    int32_t b2;
+
+    int32_t z1;
+    int32_t z2;
+
+#if FIRST_ORDER_NOISE_SHAPING
+    int32_t residue;
+#elif SECOND_ORDER_NOISE_SHAPING
+    int32_t residue1;
+    int32_t residue2;
+#endif
+} biquad2_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static __inline__ void biquad2_init(biquad2_state_t *bq,
+                                    int32_t gain,
+                                    int32_t a1,
+                                    int32_t a2,
+                                    int32_t b1,
+                                    int32_t b2)
+{
+    bq->gain = gain;
+    bq->a1 = a1;
+    bq->a2 = a2;
+    bq->b1 = b1;
+    bq->b2 = b2;
+    
+    bq->z1 = 0;
+    bq->z2 = 0;    
+
+#if FIRST_ORDER_NOISE_SHAPING
+    bq->residue = 0;
+#elif SECOND_ORDER_NOISE_SHAPING
+    bq->residue1 = 0;
+    bq->residue2 = 0;
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t biquad2(biquad2_state_t *bq, int16_t sample)
+{
+    int32_t y;
+    int32_t z0;
+    
+    z0 = sample*bq->gain + bq->z1*bq->a1 + bq->z2*bq->a2;
+    y = z0 + bq->z1*bq->b1 + bq->z2*bq->b2;
+
+    bq->z2 = bq->z1;
+    bq->z1 = z0 >> 15;
+#if FIRST_ORDER_NOISE_SHAPING
+    y += bq->residue; 
+    bq->residue = y & 0x7FFF;
+#elif SECOND_ORDER_NOISE_SHAPING
+    y += (2*bq->residue1 - bq->residue2);
+    bq->residue2 = bq->residue1;
+    bq->residue1 = y & 0x7FFF;
+#endif
+    y >>= 15;
+    return (int16_t) y;
+}
+/*- End of function --------------------------------------------------------*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/bit_operations.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,253 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bit_operations.h - Various bit level operations, such as bit reversal
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bit_operations.h,v 1.11 2006/11/28 15:37:03 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_BIT_OPERATIONS_H_)
+#define _BIT_OPERATIONS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__i386__)  ||  defined(__x86_64__)
+/*! \brief Find the bit position of the highest set bit in a word
+    \param bits The word to be searched
+    \return The bit number of the highest set bit, or -1 if the word is zero. */
+static __inline__ int top_bit(unsigned int bits)
+{
+    int res;
+    
+    __asm__ (" xorl %[res],%[res];\n"
+             " decl %[res];\n"
+             " bsrl %[bits],%[res]\n"
+             : [res] "=&r" (res)
+             : [bits] "rm" (bits));
+    return res;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*! \brief Find the bit position of the lowest set bit in a word
+    \param bits The word to be searched
+    \return The bit number of the lowest set bit, or -1 if the word is zero. */
+static __inline__ int bottom_bit(unsigned int bits)
+{
+    int res;
+    
+    __asm__ (" xorl %[res],%[res];\n"
+             " decl %[res];\n"
+             " bsfl %[bits],%[res]\n"
+             : [res] "=&r" (res)
+             : [bits] "rm" (bits));
+    return res;
+}
+/*- End of function --------------------------------------------------------*/
+#else
+static __inline__ int top_bit(unsigned int bits)
+{
+    int i;
+    
+    if (bits == 0)
+        return -1;
+    i = 0;
+    if (bits & 0xFFFF0000)
+    {
+        bits &= 0xFFFF0000;
+        i += 16;
+    }
+    if (bits & 0xFF00FF00)
+    {
+        bits &= 0xFF00FF00;
+        i += 8;
+    }
+    if (bits & 0xF0F0F0F0)
+    {
+        bits &= 0xF0F0F0F0;
+        i += 4;
+    }
+    if (bits & 0xCCCCCCCC)
+    {
+        bits &= 0xCCCCCCCC;
+        i += 2;
+    }
+    if (bits & 0xAAAAAAAA)
+    {
+        bits &= 0xAAAAAAAA;
+        i += 1;
+    }
+    return i;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int bottom_bit(unsigned int bits)
+{
+    int i;
+    
+    if (bits == 0)
+        return -1;
+    i = 32;
+    if (bits & 0x0000FFFF)
+    {
+        bits &= 0x0000FFFF;
+        i -= 16;
+    }
+    if (bits & 0x00FF00FF)
+    {
+        bits &= 0x00FF00FF;
+        i -= 8;
+    }
+    if (bits & 0x0F0F0F0F)
+    {
+        bits &= 0x0F0F0F0F;
+        i -= 4;
+    }
+    if (bits & 0x33333333)
+    {
+        bits &= 0x33333333;
+        i -= 2;
+    }
+    if (bits & 0x55555555)
+    {
+        bits &= 0x55555555;
+        i -= 1;
+    }
+    return i;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+/*! \brief Bit reverse a byte.
+    \param data The byte to be reversed.
+    \return The bit reversed version of data. */
+static __inline__ uint8_t bit_reverse8(uint8_t x)
+{
+#if defined(__i386__)  ||  defined(__x86_64__)
+    /* If multiply is fast */
+    return ((x*0x0802U & 0x22110U) | (x*0x8020U & 0x88440U))*0x10101U >> 16;
+#else
+    /* If multiply is slow, but we have a barrel shifter */
+    x = (x >> 4) | (x << 4);
+    x = ((x & 0xCC) >> 2) | ((x & 0x33) << 2);
+    return ((x & 0xAA) >> 1) | ((x & 0x55) << 1);
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+/*! \brief Bit reverse a 16 bit word.
+    \param data The word to be reversed.
+    \return The bit reversed version of data. */
+uint16_t bit_reverse16(uint16_t data);
+
+/*! \brief Bit reverse a 32 bit word.
+    \param data The word to be reversed.
+    \return The bit reversed version of data. */
+uint32_t bit_reverse32(uint32_t data);
+
+/*! \brief Bit reverse each of the four bytes in a 32 bit word.
+    \param data The word to be reversed.
+    \return The bit reversed version of data. */
+uint32_t bit_reverse_4bytes(uint32_t data);
+
+/*! \brief Find the number of set bits in a 32 bit word.
+    \param x The word to be searched.
+    \return The number of set bits. */
+int one_bits32(uint32_t x);
+
+/*! \brief Create a mask as wide as the number in a 32 bit word.
+    \param x The word to be searched.
+    \return The mask. */
+uint32_t make_mask32(uint32_t x);
+
+/*! \brief Create a mask as wide as the number in a 16 bit word.
+    \param x The word to be searched.
+    \return The mask. */
+uint16_t make_mask16(uint16_t x);
+
+/*! \brief Find the least significant one in a word, and return a word
+           with just that bit set.
+    \param x The word to be searched.
+    \return The word with the single set bit. */
+static __inline__ uint32_t least_significant_one32(uint32_t x)
+{
+    return (x & (-(int32_t) x));
+}
+/*- End of function --------------------------------------------------------*/
+
+/*! \brief Find the most significant one in a word, and return a word
+           with just that bit set.
+    \param x The word to be searched.
+    \return The word with the single set bit. */
+static __inline__ uint32_t most_significant_one32(uint32_t x)
+{
+#if defined(__i386__)  ||  defined(__x86_64__)
+    return 1 << top_bit(x);
+#else
+    x = make_mask32(x);
+    return (x ^ (x >> 1));
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+/*! \brief Find the parity of a byte.
+    \param x The byte to be checked.
+    \return 1 for odd, or 0 for even. */
+static __inline__ int parity8(uint8_t x)
+{
+    x = (x ^ (x >> 4)) & 0x0F;
+    return (0x6996 >> x) & 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*! \brief Find the parity of a 16 bit word.
+    \param x The word to be checked.
+    \return 1 for odd, or 0 for even. */
+static __inline__ int parity16(uint16_t x)
+{
+    x ^= (x >> 8);
+    x = (x ^ (x >> 4)) & 0x0F;
+    return (0x6996 >> x) & 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*! \brief Find the parity of a 32 bit word.
+    \param x The word to be checked.
+    \return 1 for odd, or 0 for even. */
+static __inline__ int parity32(uint32_t x)
+{
+    x ^= (x >> 16);
+    x ^= (x >> 8);
+    x = (x ^ (x >> 4)) & 0x0F;
+    return (0x6996 >> x) & 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/bitstream.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,69 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bitstream.h - Bitstream composition and decomposition routines.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bitstream.h,v 1.3 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_BITSTREAM_H_)
+#define _BITSTREAM_H_
+
+/*! \page bitstream_page Bitstream composition and decomposition
+\section bitstream_page_sec_1 What does it do?
+
+\section bitstream_page_sec_2 How does it work?
+*/
+
+typedef struct
+{
+    unsigned int bitstream;
+    unsigned int residue;
+} bitstream_state_t;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bitstream_state_t *bitstream_init(bitstream_state_t *s);
+
+void bitstream_put(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits);
+
+void bitstream_flush(bitstream_state_t *s, uint8_t **c);
+
+void bitstream_put2(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits);
+
+void bitstream_flush2(bitstream_state_t *s, uint8_t **c);
+
+unsigned int bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits);
+
+unsigned int bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/complex.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,364 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * complex.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: complex.h,v 1.8 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page complex_page Complex number support
+\section complex_page_sec_1 What does it do?
+Complex number support is part of the C99 standard. However, support for this
+in C compilers is still patchy. A set of complex number feaures is provided as
+a "temporary" measure, until native C language complex number support is
+widespread.
+*/
+
+#if !defined(_COMPLEX_H_)
+#define _COMPLEX_H_
+
+/*!
+    Floating complex type.
+*/
+typedef struct
+{
+    float re;
+    float im;
+} complexf_t;
+
+/*!
+    Floating complex type.
+*/
+typedef struct
+{
+    double re;
+    double im;
+} complex_t;
+
+#if defined(HAVE_LONG_DOUBLE)
+/*!
+    Long double complex type.
+*/
+typedef struct
+{
+    long double re;
+    long double im;
+} complexl_t;
+#endif
+
+/*!
+    Complex integer type.
+*/
+typedef struct
+{
+    int re;
+    int im;
+} icomplex_t;
+
+/*!
+    Complex 16 bit integer type.
+*/
+typedef struct
+{
+    int16_t re;
+    int16_t im;
+} i16complex_t;
+
+/*!
+    Complex 32 bit integer type.
+*/
+typedef struct
+{
+    int32_t re;
+    int32_t im;
+} i32complex_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static __inline__ complexf_t complex_setf(float re, float im)
+{
+    complexf_t z;
+
+    z.re = re;
+    z.im = im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complex_t complex_set(float re, float im)
+{
+    complex_t z;
+
+    z.re = re;
+    z.im = im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ complexl_t complex_setl(long double re, long double im)
+{
+    complexl_t z;
+
+    z.re = re;
+    z.im = im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static __inline__ icomplex_t icomplex_set(int re, int im)
+{
+    icomplex_t z;
+
+    z.re = re;
+    z.im = im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complexf_t complex_addf(const complexf_t *x, const complexf_t *y)
+{
+    complexf_t z;
+
+    z.re = x->re + y->re;
+    z.im = x->im + y->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complex_t complex_add(const complex_t *x, const complex_t *y)
+{
+    complex_t z;
+
+    z.re = x->re + y->re;
+    z.im = x->im + y->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ complexl_t complex_addl(const complexl_t *x, const complexl_t *y)
+{
+    complexl_t z;
+
+    z.re = x->re + y->re;
+    z.im = x->im + y->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static __inline__ icomplex_t icomplex_add(const icomplex_t *x, const icomplex_t *y)
+{
+    icomplex_t z;
+
+    z.re = x->re + y->re;
+    z.im = x->im + y->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complexf_t complex_subf(const complexf_t *x, const complexf_t *y)
+{
+    complexf_t z;
+
+    z.re = x->re - y->re;
+    z.im = x->im - y->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complex_t complex_sub(const complex_t *x, const complex_t *y)
+{
+    complex_t z;
+
+    z.re = x->re - y->re;
+    z.im = x->im - y->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ complexl_t complex_subl(const complexl_t *x, const complexl_t *y)
+{
+    complexl_t z;
+
+    z.re = x->re - y->re;
+    z.im = x->im - y->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static __inline__ icomplex_t icomplex_sub(const icomplex_t *x, const icomplex_t *y)
+{
+    icomplex_t z;
+
+    z.re = x->re - y->re;
+    z.im = x->im - y->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complexf_t complex_mulf(const complexf_t *x, const complexf_t *y)
+{
+    complexf_t z;
+
+    z.re = x->re*y->re - x->im*y->im;
+    z.im = x->re*y->im + x->im*y->re;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complex_t complex_mul(const complex_t *x, const complex_t *y)
+{
+    complex_t z;
+
+    z.re = x->re*y->re - x->im*y->im;
+    z.im = x->re*y->im + x->im*y->re;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ complexl_t complex_mull(const complexl_t *x, const complexl_t *y)
+{
+    complexl_t z;
+
+    z.re = x->re*y->re - x->im*y->im;
+    z.im = x->re*y->im + x->im*y->re;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static __inline__ complexf_t complex_divf(const complexf_t *x, const complexf_t *y)
+{
+    complexf_t z;
+    float f;
+    
+    f = y->re*y->re + y->im*y->im;
+    z.re = ( x->re*y->re + x->im*y->im)/f;
+    z.im = (-x->re*y->im + x->im*y->re)/f;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complex_t complex_div(const complex_t *x, const complex_t *y)
+{
+    complex_t z;
+    double f;
+    
+    f = y->re*y->re + y->im*y->im;
+    z.re = ( x->re*y->re + x->im*y->im)/f;
+    z.im = (-x->re*y->im + x->im*y->re)/f;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ complexl_t complex_divl(const complexl_t *x, const complexl_t *y)
+{
+    complexl_t z;
+    long double f;
+    
+    f = y->re*y->re + y->im*y->im;
+    z.re = ( x->re*y->re + x->im*y->im)/f;
+    z.im = (-x->re*y->im + x->im*y->re)/f;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static __inline__ complexf_t complex_conjf(const complexf_t *x)
+{
+    complexf_t z;
+
+    z.re = x->re;
+    z.im = -x->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complex_t complex_conj(const complex_t *x)
+{
+    complex_t z;
+
+    z.re = x->re;
+    z.im = -x->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ complexl_t complex_conjl(const complexl_t *x)
+{
+    complexl_t z;
+
+    z.re = x->re;
+    z.im = -x->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static __inline__ icomplex_t icomplex_conj(const icomplex_t *x)
+{
+    icomplex_t z;
+
+    z.re = x->re;
+    z.im = -x->im;
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ float powerf(const complexf_t *x)
+{
+    return x->re*x->re + x->im*x->im;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ double power(const complex_t *x)
+{
+    return x->re*x->re + x->im*x->im;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ long double powerl(const complexl_t *x)
+{
+    return x->re*x->re + x->im*x->im;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/complex_filters.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,73 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * complex_filters.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: complex_filters.h,v 1.6 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_COMPLEX_FILTERS_H_)
+#define _COMPLEX_FILTERS_H_
+
+typedef struct filter_s filter_t;
+
+typedef float (*filter_step_func_t)(filter_t *fi, float x);
+
+typedef struct
+{
+    int                 nz;
+    int                 np;
+    filter_step_func_t  fsf;
+} fspec_t;
+
+struct filter_s
+{
+    fspec_t             *fs;
+    float               sum;
+    int                 ptr;		/* for moving average filters only */
+    float               v[];
+};
+
+typedef struct
+{
+    filter_t            *ref;
+    filter_t            *imf;
+} cfilter_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+filter_t *filter_create(fspec_t *fs);
+void filter_delete(filter_t *fi);
+float filter_step(filter_t *fi, float x);
+
+cfilter_t *cfilter_create(fspec_t *fs);
+void cfilter_delete(cfilter_t *cfi);
+complexf_t cfilter_step(cfilter_t *cfi, const complexf_t *z);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/complex_vector_float.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,127 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * complex_vector_float.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: complex_vector_float.h,v 1.3 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_COMPLEX_VECTOR_FLOAT_H_)
+#define _COMPLEX_VECTOR_FLOAT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static __inline__ void cvec_copyf(complexf_t z[], const complexf_t x[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i];
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void cvec_copy(complex_t z[], const complex_t x[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i];
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ void cvec_copyl(complexl_t z[], const complexl_t x[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i];
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static __inline__ void cvec_zerof(complexf_t z[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = complex_setf(0.0f, 0.0f);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void cvec_zero(complex_t z[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = complex_set(0.0, 0.0);
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ void cvec_zerol(complexl_t z[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = complex_setl(0.0, 0.0);
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static __inline__ void cvec_setf(complexf_t z[], complexf_t *x, int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = *x;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void cvec_set(complex_t z[], complex_t *x, int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = *x;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+static __inline__ void cvec_setl(complexl_t z[], complexl_t *x, int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = *x;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/dc_restore.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,126 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * dc_restore.h - General telephony routines to restore the zero D.C.
+ *                level to audio which has a D.C. bias.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: dc_restore.h,v 1.15 2006/12/01 18:00:48 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_DC_RESTORE_H_)
+#define _DC_RESTORE_H_
+
+/*! \page dc_restore_page Removing DC bias from a signal
+
+\section dc_restore_page_sec_1 What does it do?
+
+Telecoms signals often contain considerable DC, but DC upsets a lot of signal
+processing functions. Placing a zero DC restorer at the front of the processing
+chain can often simplify the downstream processing. 
+
+\section dc_restore_page_sec_2 How does it work?
+
+The DC restorer uses a leaky integrator to provide a long-ish term estimate of
+the DC bias in the signal. A 32 bit estimate is used for the 16 bit audio, so
+the noise introduced by the estimation can be keep in the lower bits, and the 16
+bit DC value, which is subtracted from the signal, is fairly clean. The
+following code fragment shows the algorithm used. dc_bias is a 32 bit integer,
+while the sample and the resulting clean_sample are 16 bit integers. 
+
+    dc_bias += ((((int32_t) sample << 15) - dc_bias) >> 14);
+    clean_sample = sample - (dc_bias >> 15); 
+*/
+
+/*!
+    Zero DC restoration descriptor. This defines the working state for a single
+    instance of DC content filter.
+*/
+typedef struct
+{
+    int32_t state;
+} dc_restore_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static __inline__ void dc_restore_init(dc_restore_state_t *dc)
+{
+    dc->state = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t dc_restore(dc_restore_state_t *dc, int16_t sample)
+{
+    dc->state += ((((int32_t) sample << 15) - dc->state) >> 14);
+    return (int16_t) (sample - (dc->state >> 15));
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t dc_restore_estimate(dc_restore_state_t *dc)
+{
+    return (int16_t) (dc->state >> 15);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t saturate(int32_t amp)
+{
+    int16_t amp16;
+
+    /* Hopefully this is optimised for the common case - not clipping */
+    amp16 = (int16_t) amp;
+    if (amp == amp16)
+        return amp16;
+    if (amp > INT16_MAX)
+        return  INT16_MAX;
+    return  INT16_MIN;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t fsaturatef(float famp)
+{
+    if (famp > 32767.0)
+        return  INT16_MAX;
+    if (famp < -32768.0)
+        return  INT16_MIN;
+    return (int16_t) rintf(famp);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t fsaturate(double damp)
+{
+    if (damp > 32767.0)
+        return  INT16_MAX;
+    if (damp < -32768.0)
+        return  INT16_MIN;
+    return (int16_t) rint(damp);
+}
+/*- End of function --------------------------------------------------------*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/dds.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,145 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * dds.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: dds.h,v 1.9 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_DDS_H_)
+#define _DDS_H_
+
+#include "complex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Find the phase rate value to achieve a particular frequency.
+    \param frequency The desired frequency, in Hertz.
+    \return The phase rate which while achieve the desired frequency.
+*/
+int32_t dds_phase_rate(float frequency);
+
+float dds_frequency(int32_t phase_rate);
+
+/*! \brief Find the scaling factor needed to achieve a specified level in dBm0.
+    \param level The desired signal level, in dBm0.
+    \return The scaling factor.
+*/
+int dds_scaling_dbm0(float level);
+
+int dds_scaling_dbov(float level);
+
+/*! \brief Find the amplitude for a particular phase.
+    \param phase The desired phase 32 bit phase.
+    \return The signal amplitude.
+*/
+int16_t dds_lookup(uint32_t phase);
+
+/*! \brief Find the amplitude for a particular phase offset from an accumulated phase.
+    \param phase_acc The accumulated phase.
+    \param phase_offset The phase offset.
+    \return The signal amplitude.
+*/
+int16_t dds_offset(uint32_t phase_acc, int32_t phase_offset);
+
+/*! \brief Generate an integer tone sample.
+    \param phase_acc A pointer to a phase accumulator value.
+    \param phase_rate The phase increment to be applied.
+    \return The signal amplitude, between -32767 and 32767.
+*/
+int16_t dds(uint32_t *phase_acc, int32_t phase_rate);
+
+/*! \brief Generate an integer tone sample, with modulation.
+    \param phase_acc A pointer to a phase accumulator value.
+    \param phase_rate The phase increment to be applied.
+    \param scale The scaling factor.
+    \param phase The phase offset.
+    \return The signal amplitude.
+*/
+int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase);
+
+/*! \brief Generate a complex integer tone sample.
+    \param phase_acc A pointer to a phase accumulator value.
+    \param phase_rate The phase increment to be applied.
+    \return The complex signal amplitude, between -32767 and 32767.
+*/
+icomplex_t dds_complex(uint32_t *phase_acc, int32_t phase_rate);
+
+/*! \brief Generate a complex integer tone sample, with modulation.
+    \param phase_acc A pointer to a phase accumulator value.
+    \param phase_rate The phase increment to be applied.
+    \param scale The scaling factor.
+    \param phase The phase offset.
+    \return The complex signal amplitude.
+*/
+icomplex_t dds_complex_mod(uint32_t *phase_acc, int32_t phase_rate, int scale, int32_t phase);
+
+int32_t dds_phase_ratef(float frequency);
+
+float dds_frequencyf(int32_t phase_rate);
+
+float dds_scaling_dbm0f(float level);
+
+float dds_scaling_dbovf(float level);
+
+/*! \brief Generate a floating point tone sample.
+    \param phase_acc A pointer to a phase accumulator value.
+    \param phase_rate The phase increment to be applied.
+    \return The signal amplitude, between -32767 and 32767.
+*/
+float ddsf(uint32_t *phase_acc, int32_t phase_rate);
+
+/*! \brief Generate a floating point tone sample, with modulation.
+    \param phase_acc A pointer to a phase accumulator value.
+    \param phase_rate The phase increment to be applied.
+    \param scale The scaling factor.
+    \param phase The phase offset.
+    \return The signal amplitude.
+*/
+float dds_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase);
+
+/*! \brief Generate a complex floating point tone sample.
+    \param phase_acc A pointer to a phase accumulator value.
+    \param phase_rate The phase increment to be applied.
+    \return The complex signal amplitude, between -32767 and 32767.
+*/
+complexf_t dds_complexf(uint32_t *phase_acc, int32_t phase_rate);
+
+/*! \brief Generate a complex floating point tone sample, with modulation.
+    \param phase_acc A pointer to a phase accumulator value.
+    \param phase_rate The phase increment to be applied.
+    \param scale The scaling factor.
+    \param phase The phase offset.
+    \return The complex signal amplitude.
+*/
+complexf_t dds_complex_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/dtmf.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,213 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * dtmf.h - 
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001, 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: dtmf.h,v 1.5 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_DTMF_H_)
+#define _DTMF_H_
+
+/*! \page dtmf_rx_page DTMF receiver
+\section dtmf_rx_page_sec_1 What does it do?
+The DTMF receiver detects the standard DTMF digits. It is compliant with
+ITU-T Q.23, ITU-T Q.24, and the local DTMF specifications of most administrations.
+Its passes the test suites. It also scores *very* well on the standard
+talk-off tests. 
+
+The current design uses floating point extensively. It is not tolerant of DC.
+It is expected that a DC restore stage will be placed before the DTMF detector.
+Unless the dial tone filter is switched on, the detector has poor tolerance
+of dial tone. Whether this matter depends on your application. If you are using
+the detector in an IVR application you will need proper echo cancellation to
+get good performance in the presence of speech prompts, so dial tone will not
+exist. If you do need good dial tone tolerance, a dial tone filter can be
+enabled in the detector.
+
+\section dtmf_rx_page_sec_2 How does it work?
+Like most other DSP based DTMF detector's, this one uses the Goertzel algorithm
+to look for the DTMF tones. What makes each detector design different is just how
+that algorithm is used.
+
+Basic DTMF specs:
+    - Minimum tone on = 40ms
+    - Minimum tone off = 50ms
+    - Maximum digit rate = 10 per second
+    - Normal twist <= 8dB accepted
+    - Reverse twist <= 4dB accepted
+    - S/N >= 15dB will detect OK
+    - Attenuation <= 26dB will detect OK
+    - Frequency tolerance +- 1.5% will detect, +-3.5% will reject
+
+TODO:
+*/
+
+/*! \page dtmf_tx_page DTMF tone generation
+\section dtmf_tx_page_sec_1 What does it do?
+
+The DTMF tone generation module provides for the generation of the
+repertoire of 16 DTMF dual tones. 
+
+\section dtmf_tx_page_sec_2 How does it work?
+*/
+
+#define MAX_DTMF_DIGITS 128
+
+/*!
+    DTMF generator state descriptor. This defines the state of a single
+    working instance of a DTMF generator.
+*/
+typedef struct
+{
+    tone_gen_descriptor_t *tone_descriptors;
+    tone_gen_state_t tones;
+    char digits[MAX_DTMF_DIGITS + 1];
+    int current_sample;
+    size_t current_digits;
+} dtmf_tx_state_t;
+
+/*!
+    DTMF digit detector descriptor.
+*/
+typedef struct
+{
+    /*! Optional callback funcion to deliver received digits. */
+    void (*callback)(void *data, const char *digits, int len);
+    /*! An opaque pointer passed to the callback function. */
+    void *callback_data;
+    /*! Optional callback funcion to deliver real time digit state changes. */
+    void (*realtime_callback)(void *data, int signal);
+    /*! An opaque pointer passed to the real time callback function. */
+    void *realtime_callback_data;
+    /*! TRUE if dialtone should be filtered before processing */
+    int filter_dialtone;
+    /*! Maximum acceptable "normal" (lower bigger than higher) twist ratio */
+    float normal_twist;
+    /*! Maximum acceptable "reverse" (higher bigger than lower) twist ratio */
+    float reverse_twist;
+
+    /*! 350Hz filter state for the optional dialtone filter */
+    float z350_1;
+    float z350_2;
+    /*! 440Hz filter state for the optional dialtone filter */
+    float z440_1;
+    float z440_2;
+
+    /*! Tone detector working states */
+    goertzel_state_t row_out[4];
+    goertzel_state_t col_out[4];
+    /*! The accumlating total energy on the same period over which the Goertzels work. */
+    float energy;
+    /*! The result of the last tone analysis. */
+    uint8_t last_hit;
+    /*! The confirmed digit we are currently receiving */
+    uint8_t in_digit;
+    /*! The current sample number within a processing block. */
+    int current_sample;
+
+    /*! The received digits buffer. This is a NULL terminated string. */
+    char digits[MAX_DTMF_DIGITS + 1];
+    /*! The number of digits currently in the digit buffer. */
+    int current_digits;
+    /*! The number of digits which have been lost due to buffer overflows. */
+    int lost_digits;
+} dtmf_rx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Generate a buffer of DTMF tones.
+    \param s The DTMF generator context.
+    \param amp The buffer for the generated signal.
+    \param max_samples The required number of generated samples.
+    \return The number of samples actually generated. This may be less than 
+            samples if the input buffer empties. */
+int dtmf_tx(dtmf_tx_state_t *s, int16_t amp[], int max_samples);
+
+/*! \brief Put a string of digits in a DTMF generator's input buffer.
+    \param s The DTMF generator context.
+    \param digits The string of digits to be added.
+    \return The number of digits actually added. This may be less than the
+            length of the digit string, if the buffer fills up. */
+size_t dtmf_tx_put(dtmf_tx_state_t *s, const char *digits);
+
+/*! \brief Initialise a DTMF tone generator context.
+    \param s The DTMF generator context.
+    \return A pointer to the DTMF generator context. */
+dtmf_tx_state_t *dtmf_tx_init(dtmf_tx_state_t *s);
+
+/*! Set a optional realtime callback for a DTMF receiver context. This function
+    is called immediately a confirmed state change occurs in the received DTMF. It
+    is called with the ASCII value for a DTMF tone pair, or zero to indicate no tone
+    is being received.
+    \brief Set a realtime callback for a DTMF receiver context.
+    \param s The DTMF receiver context.
+    \param callback Callback routine used to report the start and end of digits.
+    \param user_data An opaque pointer which is associated with the context,
+           and supplied in callbacks. */
+void dtmf_rx_set_realtime_callback(dtmf_rx_state_t *s,
+                                   void (*callback)(void *user_data, int signal),
+                                   void *user_data);
+
+/*! \brief Adjust a DTMF receiver context.
+    \param s The DTMF receiver context.
+    \param filter_dialtone TRUE to enable filtering of dialtone, FALSE
+           to disable, < 0 to leave unchanged.
+    \param twist Acceptable twist, in dB. < 0 to leave unchanged.
+    \param reverse_twist Acceptable reverse twist, in dB. < 0 to leave unchanged. */
+void dtmf_rx_parms(dtmf_rx_state_t *s, int filter_dialtone, int twist, int reverse_twist);
+
+/*! Process a block of received DTMF audio samples.
+    \brief Process a block of received DTMF audio samples.
+    \param s The DTMF receiver context.
+    \param amp The audio sample buffer.
+    \param samples The number of samples in the buffer.
+    \return The number of samples unprocessed. */
+int dtmf_rx(dtmf_rx_state_t *s, const int16_t amp[], int samples);
+
+/*! \brief Get a string of digits from a DTMF receiver's output buffer.
+    \param s The DTMF receiver context.
+    \param digits The buffer for the received digits.
+    \param max The maximum  number of digits to be returned,
+    \return The number of digits actually returned. */
+size_t dtmf_rx_get(dtmf_rx_state_t *s, char *digits, int max);
+
+/*! \brief Initialise a DTMF receiver context.
+    \param s The DTMF receiver context.
+    \param callback An optional callback routine, used to report received digits. If
+           no callback routine is set, digits may be collected, using the dtmf_rx_get()
+           function.
+    \param user_data An opaque pointer which is associated with the context,
+           and supplied in callbacks.
+    \return A pointer to the DTMF receiver context. */
+dtmf_rx_state_t *dtmf_rx_init(dtmf_rx_state_t *s,
+                              void (*callback)(void *user_data, const char *digits, int len),
+                              void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/echo.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,220 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * echo.c - A line echo canceller.  This code is being developed
+ *          against and partially complies with G168.
+ *
+ * Written by Steve Underwood <steveu@coppice.org> 
+ *         and David Rowe <david_at_rowetel_dot_com>
+ *
+ * Copyright (C) 2001 Steve Underwood and 2007 David Rowe
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: echo.h,v 1.9 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_ECHO_H_)
+#define _ECHO_H_
+
+/*! \page echo_can_page Line echo cancellation for voice
+
+\section echo_can_page_sec_1 What does it do?
+This module aims to provide G.168-2002 compliant echo cancellation, to remove
+electrical echoes (e.g. from 2-4 wire hybrids) from voice calls.
+
+\section echo_can_page_sec_2 How does it work?
+The heart of the echo cancellor is FIR filter. This is adapted to match the echo
+impulse response of the telephone line. It must be long enough to adequately cover
+the duration of that impulse response. The signal transmitted to the telephone line
+is passed through the FIR filter. Once the FIR is properly adapted, the resulting
+output is an estimate of the echo signal received from the line. This is subtracted
+from the received signal. The result is an estimate of the signal which originated
+at the far end of the line, free from echos of our own transmitted signal. 
+
+The least mean squares (LMS) algorithm is attributed to Widrow and Hoff, and was
+introduced in 1960. It is the commonest form of filter adaption used in things
+like modem line equalisers and line echo cancellers. There it works very well.
+However, it only works well for signals of constant amplitude. It works very poorly
+for things like speech echo cancellation, where the signal level varies widely.
+This is quite easy to fix. If the signal level is normalised - similar to applying
+AGC - LMS can work as well for a signal of varying amplitude as it does for a modem
+signal. This normalised least mean squares (NLMS) algorithm is the commonest one used
+for speech echo cancellation. Many other algorithms exist - e.g. RLS (essentially
+the same as Kalman filtering), FAP, etc. Some perform significantly better than NLMS.
+However, factors such as computational complexity and patents favour the use of NLMS.
+
+A simple refinement to NLMS can improve its performance with speech. NLMS tends
+to adapt best to the strongest parts of a signal. If the signal is white noise,
+the NLMS algorithm works very well. However, speech has more low frequency than
+high frequency content. Pre-whitening (i.e. filtering the signal to flatten
+its spectrum) the echo signal improves the adapt rate for speech, and ensures the
+final residual signal is not heavily biased towards high frequencies. A very low
+complexity filter is adequate for this, so pre-whitening adds little to the
+compute requirements of the echo canceller.
+
+An FIR filter adapted using pre-whitened NLMS performs well, provided certain
+conditions are met: 
+
+    - The transmitted signal has poor self-correlation.
+    - There is no signal being generated within the environment being cancelled.
+
+The difficulty is that neither of these can be guaranteed.
+
+If the adaption is performed while transmitting noise (or something fairly noise
+like, such as voice) the adaption works very well. If the adaption is performed
+while transmitting something highly correlative (typically narrow band energy
+such as signalling tones or DTMF), the adaption can go seriously wrong. The reason
+is there is only one solution for the adaption on a near random signal - the impulse
+response of the line. For a repetitive signal, there are any number of solutions
+which converge the adaption, and nothing guides the adaption to choose the generalised
+one. Allowing an untrained canceller to converge on this kind of narrowband
+energy probably a good thing, since at least it cancels the tones. Allowing a well
+converged canceller to continue converging on such energy is just a way to ruin
+its generalised adaption. A narrowband detector is needed, so adapation can be
+suspended at appropriate times.
+
+The adaption process is based on trying to eliminate the received signal. When
+there is any signal from within the environment being cancelled it may upset the
+adaption process. Similarly, if the signal we are transmitting is small, noise
+may dominate and disturb the adaption process. If we can ensure that the
+adaption is only performed when we are transmitting a significant signal level,
+and the environment is not, things will be OK. Clearly, it is easy to tell when
+we are sending a significant signal. Telling, if the environment is generating a
+significant signal, and doing it with sufficient speed that the adaption will
+not have diverged too much more we stop it, is a little harder. 
+
+The key problem in detecting when the environment is sourcing significant energy
+is that we must do this very quickly. Given a reasonably long sample of the
+received signal, there are a number of strategies which may be used to assess
+whether that signal contains a strong far end component. However, by the time
+that assessment is complete the far end signal will have already caused major
+mis-convergence in the adaption process. An assessment algorithm is needed which
+produces a fairly accurate result from a very short burst of far end energy. 
+
+\section echo_can_page_sec_3 How do I use it?
+The echo cancellor processes both the transmit and receive streams sample by
+sample. The processing function is not declared inline. Unfortunately,
+cancellation requires many operations per sample, so the call overhead is only a
+minor burden. 
+*/
+
+#include "fir.h"
+
+/* Mask bits for the adaption mode */
+
+#define ECHO_CAN_USE_ADAPTION       0x01
+#define ECHO_CAN_USE_NLP            0x02
+#define ECHO_CAN_USE_CNG            0x04
+#define ECHO_CAN_USE_CLIP           0x08
+#define ECHO_CAN_USE_TX_HPF         0x10
+#define ECHO_CAN_USE_RX_HPF         0x20
+#define ECHO_CAN_DISABLE            0x40
+
+/*!
+    G.168 echo canceller descriptor. This defines the working state for a line
+    echo canceller.
+*/
+typedef struct
+{
+    int16_t tx,rx;
+    int16_t clean;
+    int16_t clean_nlp;
+
+    int nonupdate_dwell;
+    int curr_pos;	
+    int taps;
+    int log2taps;
+    int adaption_mode;
+
+    int cond_met;
+    int32_t Pstates;
+    int16_t adapt;
+    int32_t factor;
+    int16_t shift;
+
+    /* Average levels and averaging filter states */ 
+    int Ltxacc, Lrxacc, Lcleanacc, Lclean_bgacc;
+    int Ltx, Lrx;
+    int Lclean;
+    int Lclean_bg;
+    int Lbgn, Lbgn_acc, Lbgn_upper, Lbgn_upper_acc;
+
+    /* foreground and background filter states */
+    fir16_state_t fir_state;
+    fir16_state_t fir_state_bg;
+    int16_t *fir_taps16[2];
+    
+    /* DC blocking filter states */
+    int tx_1, tx_2, rx_1, rx_2;
+   
+    /* optional High Pass Filter states */
+    int32_t xvtx[5], yvtx[5];
+    int32_t xvrx[5], yvrx[5];
+   
+    /* Parameters for the optional Hoth noise generator */
+    int cng_level;
+    int cng_rndnum;
+    int cng_filter;
+    
+    /* snapshot sample of coeffs used for development */
+    int16_t *snapshot;       
+
+} echo_can_state_t;
+
+/*! Create a voice echo canceller context.
+    \param len The length of the canceller, in samples.
+    \return The new canceller context, or NULL if the canceller could not be created.
+*/
+echo_can_state_t *echo_can_create(int len, int adaption_mode);
+
+/*! Free a voice echo canceller context.
+    \param ec The echo canceller context.
+*/
+void echo_can_free(echo_can_state_t *ec);
+
+/*! Flush (reinitialise) a voice echo canceller context.
+    \param ec The echo canceller context.
+*/
+void echo_can_flush(echo_can_state_t *ec);
+
+/*! Set the adaption mode of a voice echo canceller context.
+    \param ec The echo canceller context.
+    \param adapt The mode.
+*/
+void echo_can_adaption_mode(echo_can_state_t *ec, int adaption_mode);
+
+void echo_can_snapshot(echo_can_state_t *ec);
+
+/*! Process a sample through a voice echo canceller.
+    \param ec The echo canceller context.
+    \param tx The transmitted audio sample.
+    \param rx The received audio sample.
+    \return The clean (echo cancelled) received sample.
+*/
+int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx);
+
+/*! Process to high pass filter the tx signal.
+    \param ec The echo canceller context.
+    \param tx The transmitted auio sample.
+    \return The HP filtered transmit sample, send this to your D/A.
+*/
+int16_t echo_can_hpf_tx(echo_can_state_t *ec, int16_t tx);
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/fax.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,197 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fax.h - definitions for analogue line ITU T.30 fax processing
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: fax.h,v 1.20 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_FAX_H_)
+#define _FAX_H_
+
+/*! \page fax_page FAX over analogue modem handling
+
+\section fax_page_sec_1 What does it do?
+
+\section fax_page_sec_2 How does it work?
+*/
+
+typedef struct fax_state_s fax_state_t;
+
+typedef void (fax_flush_handler_t)(fax_state_t *s, void *user_data, int which);
+
+/*!
+    Analogue line T.30 FAX channel descriptor. This defines the state of a single working
+    instance of an analogue line soft-FAX machine.
+*/
+struct fax_state_s
+{
+    /* This must be kept the first thing in the structure, so it can be pointed
+       to reliably as the structures change over time. */
+    t30_state_t t30_state;
+
+    /*! TRUE is talker echo protection should be sent for the image modems */
+    int use_tep;
+
+    fax_flush_handler_t *flush_handler;
+    void *flush_user_data;
+
+    /*! The current receive signal handler */
+    span_rx_handler_t *rx_handler;
+    void *rx_user_data;
+
+    /*! The current transmit signal handler */
+    span_tx_handler_t *tx_handler;
+    void *tx_user_data;
+    int tx_hdlc_preamble_len;
+    /*! The transmit signal handler to be used when the current one has finished sending. */
+    span_tx_handler_t *next_tx_handler;
+    void *next_tx_user_data;
+    
+    /*! If TRUE, transmission is in progress */
+    int transmit;
+
+    /*! If TRUE, transmit silence when there is nothing else to transmit. If FALSE return only
+        the actual generated audio. Note that this only affects untimed silences. Timed silences
+        (e.g. the 75ms silence between V.21 and a high speed modem) will alway be transmitted as
+        silent audio. */
+    int transmit_on_idle;
+
+    /*! \brief A tone generator context used to generate supervisory tones during
+               FAX handling. */
+    tone_gen_state_t tone_gen;
+    /*! \brief An HDLC context used when receiving HDLC over V.21 messages. */
+    hdlc_rx_state_t hdlcrx;
+    /*! \brief An HDLC context used when transmitting HDLC over V.21 messages. */
+    hdlc_tx_state_t hdlctx;
+    /*! \brief A V.21 FSK modem context used when transmitting HDLC over V.21
+               messages. */
+    fsk_tx_state_t v21tx;
+    /*! \brief A V.21 FSK modem context used when receiving HDLC over V.21
+               messages. */
+    fsk_rx_state_t v21rx;
+#if defined(ENABLE_V17)
+    /*! \brief A V.17 modem context used when sending FAXes at 7200bps, 9600bps
+               12000bps or 14400bps*/
+    v17_tx_state_t v17tx;
+    /*! \brief A V.29 modem context used when receiving FAXes at 7200bps, 9600bps
+               12000bps or 14400bps*/
+    v17_rx_state_t v17rx;
+#endif
+    /*! \brief A V.27ter modem context used when sending FAXes at 2400bps or
+               4800bps */
+    v27ter_tx_state_t v27ter_tx;
+    /*! \brief A V.27ter modem context used when receiving FAXes at 2400bps or
+               4800bps */
+    v27ter_rx_state_t v27ter_rx;
+    /*! \brief A V.29 modem context used when sending FAXes at 7200bps or
+               9600bps */
+    v29_tx_state_t v29tx;
+    /*! \brief A V.29 modem context used when receiving FAXes at 7200bps or
+               9600bps */
+    v29_rx_state_t v29rx;
+    /*! \brief Used to insert timed silences. */
+    silence_gen_state_t silence_gen;
+    /*! \brief */
+    dc_restore_state_t dc_restore;
+
+    /*! \brief TRUE is the short training sequence should be used. */
+    int short_train;
+
+    /*! The currently select receiver type */
+    int current_rx_type;
+    /*! The currently select transmitter type */
+    int current_tx_type;
+
+    int first_tx_hdlc_frame;
+
+    /*! Audio logging file handles */
+    int fax_audio_rx_log;
+    int fax_audio_tx_log;
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Apply T.30 receive processing to a block of audio samples.
+    \brief Apply T.30 receive processing to a block of audio samples.
+    \param s The FAX context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples unprocessed. This should only be non-zero if
+            the software has reached the end of the FAX call.
+*/
+int fax_rx(fax_state_t *s, int16_t *amp, int len);
+
+/*! Apply T.30 transmit processing to generate a block of audio samples.
+    \brief Apply T.30 transmit processing to generate a block of audio samples.
+    \param s The FAX context.
+    \param amp The audio sample buffer.
+    \param max_len The number of samples to be generated.
+    \return The number of samples actually generated. This will be zero when
+            there is nothing to send.
+*/
+int fax_tx(fax_state_t *s, int16_t *amp, int max_len);
+
+void fax_set_flush_handler(fax_state_t *s, fax_flush_handler_t *handler, void *user_data);
+
+/*! Select whether silent audio will be sent when FAX transmit is idle.
+    \brief Select whether silent audio will be sent when FAX transmit is idle.
+    \param s The FAX context.
+    \param transmit_on_idle TRUE if silent audio should be output when the FAX transmitter is
+           idle. FALSE to transmit zero length audio when the FAX transmitter is idle. The default
+           behaviour is FALSE.
+*/
+void fax_set_transmit_on_idle(fax_state_t *s, int transmit_on_idle);
+
+/*! Select whether talker echo protection tone will be sent for the image modems.
+    \brief Select whether TEP will be sent for the image modems.
+    \param s The FAX context.
+    \param use_tep TRUE if TEP should be sent.
+*/
+void fax_set_tep_mode(fax_state_t *s, int use_tep);
+
+/*! Initialise a FAX context.
+    \brief Initialise a FAX context.
+    \param s The FAX context.
+    \param calling_party TRUE if the context is for a calling party. FALSE if the
+           context is for an answering party.
+    \return 0 for OK, else -1.
+*/
+int fax_init(fax_state_t *s, int calling_party);
+
+/*! Release a FAX context.
+    \brief Release a FAX context.
+    \param s The FAX context. */
+int fax_release(fax_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/fir.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,369 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fir.h - General telephony FIR routines
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2002 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: fir.h,v 1.8 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \page fir_page FIR filtering
+\section fir_page_sec_1 What does it do?
+???.
+
+\section fir_page_sec_2 How does it work?
+???.
+*/
+
+#if !defined(_FIR_H_)
+#define _FIR_H_
+
+/* 
+   Blackfin NOTES & IDEAS:
+
+   A simple dot product function is used to implement the filter.  This performs
+   just one MAC/cycle which is inefficient but was easy to implement as a first
+   pass.  The current Blackfin code also uses an unrolled form of the filter
+   history to avoid 0 length hardware loop issues.  This is wasteful of 
+   memory.
+
+   Ideas for improvement:
+
+   1/ Rewrite filter for dual MAC inner loop.  The issue here is handling
+   history sample offsets that are 16 bit aligned - the dual MAC needs
+   32 bit aligmnent.  There are some good examples in libbfdsp.
+
+   2/ Use the hardware circular buffer facility tohalve memory usage.
+
+   3/ Consider using internal memory.
+
+   Using less memory might also improve speed as cache misses will be
+   reduced. A drop in MIPs and memory approaching 50% should be
+   possible.
+
+   The foreground and background filters currenlty use a total of
+   about 10 MIPs/ch as measured with speedtest.c on a 256 TAP echo
+   can.
+*/
+
+#if defined(USE_MMX)  ||  defined(USE_SSE2)
+#include "mmx.h"
+#endif
+
+/*!
+    16 bit integer FIR descriptor. This defines the working state for a single
+    instance of an FIR filter using 16 bit integer coefficients.
+*/
+typedef struct
+{
+    int taps;
+    int curr_pos;
+    const int16_t *coeffs;
+    int16_t *history;
+} fir16_state_t;
+
+/*!
+    32 bit integer FIR descriptor. This defines the working state for a single
+    instance of an FIR filter using 32 bit integer coefficients, and filtering
+    16 bit integer data.
+*/
+typedef struct
+{
+    int taps;
+    int curr_pos;
+    const int32_t *coeffs;
+    int16_t *history;
+} fir32_state_t;
+
+/*!
+    Floating point FIR descriptor. This defines the working state for a single
+    instance of an FIR filter using floating point coefficients and data.
+*/
+typedef struct
+{
+    int taps;
+    int curr_pos;
+    const float *coeffs;
+    float *history;
+} fir_float_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static __inline__ const int16_t *fir16_create(fir16_state_t *fir,
+                                              const int16_t *coeffs,
+                                              int taps)
+{
+    fir->taps = taps;
+    fir->curr_pos = taps - 1;
+    fir->coeffs = coeffs;
+#if defined(USE_MMX)  ||  defined(USE_SSE2) || defined(__BLACKFIN_ASM__)
+    if ((fir->history = malloc(2*taps*sizeof(int16_t))))
+        memset(fir->history, 0, 2*taps*sizeof(int16_t));
+#else
+    if ((fir->history = (int16_t *) malloc(taps*sizeof(int16_t))))
+        memset(fir->history, 0, taps*sizeof(int16_t));
+#endif
+    return fir->history;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void fir16_flush(fir16_state_t *fir)
+{
+#if defined(USE_MMX)  ||  defined(USE_SSE2) || defined(__BLACKFIN_ASM__)
+    memset(fir->history, 0, 2*fir->taps*sizeof(int16_t));
+#else
+    memset(fir->history, 0, fir->taps*sizeof(int16_t));
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void fir16_free(fir16_state_t *fir)
+{
+    free(fir->history);
+}
+/*- End of function --------------------------------------------------------*/
+
+#ifdef __BLACKFIN_ASM__
+static inline int32_t dot_asm(short *x, short *y, int len)
+{
+   int dot;
+
+   len--;
+
+   __asm__ 
+   (
+   "I0 = %1;\n\t"
+   "I1 = %2;\n\t"
+   "A0 = 0;\n\t"
+   "R0.L = W[I0++] || R1.L = W[I1++];\n\t"
+   "LOOP dot%= LC0 = %3;\n\t"
+   "LOOP_BEGIN dot%=;\n\t"
+      "A0 += R0.L * R1.L (IS) || R0.L = W[I0++] || R1.L = W[I1++];\n\t"
+   "LOOP_END dot%=;\n\t"
+   "A0 += R0.L*R1.L (IS);\n\t"
+   "R0 = A0;\n\t"
+   "%0 = R0;\n\t"
+   : "=&d" (dot)
+   : "a" (x), "a" (y), "a" (len)
+   : "I0", "I1", "A1", "A0", "R0", "R1"
+   );
+
+   return dot;
+}
+#endif
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t fir16(fir16_state_t *fir, int16_t sample)
+{
+    int32_t y;
+#if defined(USE_MMX)
+    int i;
+    mmx_t *mmx_coeffs;
+    mmx_t *mmx_hist;
+
+    fir->history[fir->curr_pos] = sample;
+    fir->history[fir->curr_pos + fir->taps] = sample;
+
+    mmx_coeffs = (mmx_t *) fir->coeffs;
+    mmx_hist = (mmx_t *) &fir->history[fir->curr_pos];
+    i = fir->taps;
+    pxor_r2r(mm4, mm4);
+    /* 8 samples per iteration, so the filter must be a multiple of 8 long. */
+    while (i > 0)
+    {
+        movq_m2r(mmx_coeffs[0], mm0);
+        movq_m2r(mmx_coeffs[1], mm2);
+        movq_m2r(mmx_hist[0], mm1);
+        movq_m2r(mmx_hist[1], mm3);
+        mmx_coeffs += 2;
+        mmx_hist += 2;
+        pmaddwd_r2r(mm1, mm0);
+        pmaddwd_r2r(mm3, mm2);
+        paddd_r2r(mm0, mm4);
+        paddd_r2r(mm2, mm4);
+        i -= 8;
+    }
+    movq_r2r(mm4, mm0);
+    psrlq_i2r(32, mm0);
+    paddd_r2r(mm0, mm4);
+    movd_r2m(mm4, y);
+    emms();
+#elif defined(USE_SSE2)
+    int i;
+    xmm_t *xmm_coeffs;
+    xmm_t *xmm_hist;
+
+    fir->history[fir->curr_pos] = sample;
+    fir->history[fir->curr_pos + fir->taps] = sample;
+
+    xmm_coeffs = (xmm_t *) fir->coeffs;
+    xmm_hist = (xmm_t *) &fir->history[fir->curr_pos];
+    i = fir->taps;
+    pxor_r2r(xmm4, xmm4);
+    /* 16 samples per iteration, so the filter must be a multiple of 16 long. */
+    while (i > 0)
+    {
+        movdqu_m2r(xmm_coeffs[0], xmm0);
+        movdqu_m2r(xmm_coeffs[1], xmm2);
+        movdqu_m2r(xmm_hist[0], xmm1);
+        movdqu_m2r(xmm_hist[1], xmm3);
+        xmm_coeffs += 2;
+        xmm_hist += 2;
+        pmaddwd_r2r(xmm1, xmm0);
+        pmaddwd_r2r(xmm3, xmm2);
+        paddd_r2r(xmm0, xmm4);
+        paddd_r2r(xmm2, xmm4);
+        i -= 16;
+    }
+    movdqa_r2r(xmm4, xmm0);
+    psrldq_i2r(8, xmm0);
+    paddd_r2r(xmm0, xmm4);
+    movdqa_r2r(xmm4, xmm0);
+    psrldq_i2r(4, xmm0);
+    paddd_r2r(xmm0, xmm4);
+    movd_r2m(xmm4, y);
+#elif defined(__BLACKFIN_ASM__)
+    fir->history[fir->curr_pos] = sample;
+    fir->history[fir->curr_pos + fir->taps] = sample;
+    y = dot_asm((int16_t*)fir->coeffs, &fir->history[fir->curr_pos], fir->taps);
+#else
+    int i;
+    int offset1;
+    int offset2;
+
+    fir->history[fir->curr_pos] = sample;
+
+    offset2 = fir->curr_pos;
+    offset1 = fir->taps - offset2;
+    y = 0;
+    for (i = fir->taps - 1;  i >= offset1;  i--)
+        y += fir->coeffs[i]*fir->history[i - offset1];
+    for (  ;  i >= 0;  i--)
+        y += fir->coeffs[i]*fir->history[i + offset2];
+#endif
+    if (fir->curr_pos <= 0)
+    	fir->curr_pos = fir->taps;
+    fir->curr_pos--;
+    return (int16_t) (y >> 15);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ const int16_t *fir32_create(fir32_state_t *fir,
+                                              const int32_t *coeffs,
+                                              int taps)
+{
+    fir->taps = taps;
+    fir->curr_pos = taps - 1;
+    fir->coeffs = coeffs;
+    fir->history = (int16_t *) malloc(taps*sizeof(int16_t));
+    if (fir->history)
+    	memset(fir->history, '\0', taps*sizeof(int16_t));
+    return fir->history;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void fir32_flush(fir32_state_t *fir)
+{
+    memset(fir->history, 0, fir->taps*sizeof(int16_t));
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void fir32_free(fir32_state_t *fir)
+{
+    free(fir->history);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t fir32(fir32_state_t *fir, int16_t sample)
+{
+    int i;
+    int32_t y;
+    int offset1;
+    int offset2;
+
+    fir->history[fir->curr_pos] = sample;
+    offset2 = fir->curr_pos;
+    offset1 = fir->taps - offset2;
+    y = 0;
+    for (i = fir->taps - 1;  i >= offset1;  i--)
+        y += fir->coeffs[i]*fir->history[i - offset1];
+    for (  ;  i >= 0;  i--)
+        y += fir->coeffs[i]*fir->history[i + offset2];
+    if (fir->curr_pos <= 0)
+    	fir->curr_pos = fir->taps;
+    fir->curr_pos--;
+    return (int16_t) (y >> 15);
+}
+/*- End of function --------------------------------------------------------*/
+
+#ifndef __KERNEL__
+static __inline__ const float *fir_float_create(fir_float_state_t *fir,
+                                                const float *coeffs,
+    	    	    	                        int taps)
+{
+    fir->taps = taps;
+    fir->curr_pos = taps - 1;
+    fir->coeffs = coeffs;
+    fir->history = (float *) malloc(taps*sizeof(float));
+    if (fir->history)
+        memset(fir->history, '\0', taps*sizeof(float));
+    return fir->history;
+}
+/*- End of function --------------------------------------------------------*/
+    
+static __inline__ void fir_float_free(fir_float_state_t *fir)
+{
+    free(fir->history);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int16_t fir_float(fir_float_state_t *fir, int16_t sample)
+{
+    int i;
+    float y;
+    int offset1;
+    int offset2;
+
+    fir->history[fir->curr_pos] = sample;
+
+    offset2 = fir->curr_pos;
+    offset1 = fir->taps - offset2;
+    y = 0;
+    for (i = fir->taps - 1;  i >= offset1;  i--)
+        y += fir->coeffs[i]*fir->history[i - offset1];
+    for (  ;  i >= 0;  i--)
+        y += fir->coeffs[i]*fir->history[i + offset2];
+    if (fir->curr_pos <= 0)
+    	fir->curr_pos = fir->taps;
+    fir->curr_pos--;
+    return  (int16_t) y;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/fsk.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,242 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fsk.h - FSK modem transmit and receive parts
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: fsk.h,v 1.17 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page fsk_page FSK modems
+\section fsk_page_sec_1 What does it do?
+Most of the oldest telephony modems use incorent FSK modulation. This module can
+be used to implement both the trasmit and receive sides of a number of these
+modems. There are integrated definitions for: 
+
+ - V.21
+ - V.23
+ - Bell 103
+ - Bell 202
+ - Weitbrecht (Used for TDD - Telecoms Device for the Deaf)
+
+The audio output or input is a stream of 16 bit samples, at 8000 samples/second.
+The transmit and receive sides can be used independantly. 
+
+\section fsk_page_sec_2 The transmitter
+
+The FSK transmitter uses a DDS generator to synthesise the waveform. This
+naturally produces phase coherent transitions, as the phase update rate is
+switched, producing a clean spectrum. The symbols are not generally an integer
+number of samples long. However, the symbol time for the fastest data rate
+generally used (1200bps) is more than 7 samples long. The jitter resulting from
+switching at the nearest sample is, therefore, acceptable. No interpolation is
+used. 
+
+\section fsk_page_sec_3 The receiver
+
+The FSK receiver uses a quadrature correlation technique to demodulate the
+signal. Two DDS quadrature oscillators are used. The incoming signal is
+correlated with the oscillator signals over a period of one symbol. The
+oscillator giving the highest net correlation from its I and Q outputs is the
+one that matches the frequency being transmitted during the correlation
+interval. Because the transmission is totally asynchronous, the demodulation
+process must run sample by sample to find the symbol transitions. The
+correlation is performed on a sliding window basis, so the computational load of
+demodulating sample by sample is not great. 
+
+Two modes of symbol synchronisation are provided:
+
+    - In synchronous mode, symbol transitions are smoothed, to track their true
+      position in the prescence of high timing jitter. This provides the most
+      reliable symbol recovery in poor signal to noise conditions. However, it
+      takes a little time to settle, so it not really suitable for data streams
+      which must start up instantaneously (e.g. the TDD systems used by hearing
+      impaired people).
+
+    - In asynchronous mode each transition is taken at face value, with no temporal
+      smoothing. There is no settling time for this mode, but when the signal to
+      noise ratio is very poor it does not perform as well as the synchronous mode.
+*/
+
+#if !defined(_FSK_H_)
+#define _FSK_H_
+
+/*!
+    FSK modem specification. This defines the frequencies, signal levels and
+    baud rate (== bit rate for simple FSK) for a single channel of an FSK modem.
+*/
+typedef struct
+{
+    const char *name;
+    int freq_zero;
+    int freq_one;
+    int tx_level;
+    int min_level;
+    int baud_rate;
+} fsk_spec_t;
+
+/* Predefined FSK modem channels */
+enum
+{
+    FSK_V21CH1 = 0,
+    FSK_V21CH2,
+    FSK_V23CH1,
+    FSK_V23CH2,
+    FSK_BELL103CH1,
+    FSK_BELL103CH2,
+    FSK_BELL202,
+    FSK_WEITBRECHT,     /* Used for TDD (Telecom Device for the Deaf) */
+};
+
+extern fsk_spec_t preset_fsk_specs[];
+
+/*!
+    FSK modem transmit descriptor. This defines the state of a single working
+    instance of an FSK modem transmitter.
+*/
+typedef struct
+{
+    int baud_rate;
+    get_bit_func_t get_bit;
+    void *user_data;
+
+    int32_t phase_rates[2];
+    int scaling;
+    int32_t current_phase_rate;
+    uint32_t phase_acc;
+    int baud_frac;
+    int baud_inc;
+    int shutdown;
+} fsk_tx_state_t;
+
+/* The longest window will probably be 106 for 75 baud */
+#define FSK_MAX_WINDOW_LEN 128
+
+/*!
+    FSK modem receive descriptor. This defines the state of a single working
+    instance of an FSK modem receiver.
+*/
+typedef struct
+{
+    int baud_rate;
+    int sync_mode;
+    put_bit_func_t put_bit;
+    void *user_data;
+
+    int min_power;
+    power_meter_t power;
+    int carrier_present;
+    int16_t last_sample;
+
+    int32_t phase_rate[2];
+    uint32_t phase_acc[2];
+
+    int correlation_span;
+
+    int32_t window_i[2][FSK_MAX_WINDOW_LEN];
+    int32_t window_q[2][FSK_MAX_WINDOW_LEN];
+    int32_t dot_i[2];
+    int32_t dot_q[2];
+    int buf_ptr;
+
+    int baud_inc;
+    int baud_pll;
+    int lastbit;
+    int scaling_shift;
+} fsk_rx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise an FSK modem transmit context.
+    \brief Initialise an FSK modem transmit context.
+    \param s The modem context.
+    \param spec The specification of the modem tones and rate.
+    \param get_bit The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer.
+    \return A pointer to the modem context, or NULL if there was a problem. */
+fsk_tx_state_t *fsk_tx_init(fsk_tx_state_t *s,
+                            fsk_spec_t *spec,
+                            get_bit_func_t get_bit,
+                            void *user_data);
+
+/*! Adjust an FSK modem transmit context's power output.
+    \brief Adjust an FSK modem transmit context's power output.
+    \param s The modem context.
+    \param power The power level, in dBm0 */
+void fsk_tx_power(fsk_tx_state_t *s, float power);
+
+void fsk_tx_set_get_bit(fsk_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
+
+/*! Generate a block of FSK modem audio samples.
+    \brief Generate a block of FSK modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples to be generated.
+    \return The number of samples actually generated.
+*/
+int fsk_tx(fsk_tx_state_t *s, int16_t *amp, int len);
+
+/*! Get the current received signal power.
+    \param s The modem context.
+    \return The signal power, in dBm0. */
+float fsk_rx_signal_power(fsk_rx_state_t *s);
+
+/*! Adjust an FSK modem receive context's carrier detect power threshold.
+    \brief Adjust an FSK modem receive context's carrier detect power threshold.
+    \param s The modem context.
+    \param power The power level, in dBm0 */
+void fsk_rx_signal_cutoff(fsk_rx_state_t *s, float cutoff);
+
+/*! Initialise an FSK modem receive context.
+    \brief Initialise an FSK modem receive context.
+    \param s The modem context.
+    \param spec The specification of the modem tones and rate.
+    \param sync_mode TRUE for synchronous modem. FALSE for asynchronous mode.
+    \param put_bit The callback routine used to put the received data.
+    \param user_data An opaque pointer.
+    \return A pointer to the modem context, or NULL if there was a problem. */
+fsk_rx_state_t *fsk_rx_init(fsk_rx_state_t *s,
+                            fsk_spec_t *spec,
+                            int sync_mode,
+                            put_bit_func_t put_bit,
+                            void *user_data);
+
+/*! Process a block of received FSK modem audio samples.
+    \brief Process a block of received FSK modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples unprocessed.
+*/
+int fsk_rx(fsk_rx_state_t *s, const int16_t *amp, int len);
+
+void fsk_rx_set_put_bit(fsk_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/g168models.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,332 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g168models.h - line models for echo cancellation tests against the G.168
+ *  	          spec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: g168models.h,v 1.5 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_G168MODELS_H_)
+#define _G168MODELS_H_
+
+/*! \page g168_test_data_page The test data from the G.168 specification
+*/
+
+/*!
+    The line model from section D.2 of G.168.
+
+    These are the coefficients for the line simulation model defined in
+    section D.2 of G.168. It may be used with the fir32_xxx
+    routines to build a line simulator.
+*/
+const int32_t line_model_d2_coeffs[] =
+{
+      -436,   -829,  -2797,  -4208, -17968, -11215,  46150,  34480,
+    -10427,   9049,  -1309,  -6320,    390,  -8191,  -1751,  -6051,
+     -3796,  -4055,  -3948,  -2557,  -3372,  -1808,  -2259,  -1300, 
+     -1098,   -618,   -340,    -61,    323,    419,    745,    716,
+       946,    880,   1014,    976,   1033,   1091,   1053,   1042,
+       794,    831,    899,    716,    390,    313,    304,    304, 
+        73,   -119,   -109,   -176,   -359,   -407,   -512,   -580,
+      -704,   -618,   -685,   -791,   -772,   -820,   -839,   -724  
+};
+
+/*!
+    The line model from section D.3 of G.168.
+
+    These are the coefficients for the line simulation model defined in
+    section D.3 of G.168. It may be used with the fir32_xxx
+    routines to build a line simulator.
+*/
+const int32_t line_model_d3_coeffs[] =
+{
+      -381,    658,   1730,    -51,  -3511,  -1418,   7660,   8861,
+     -8106, -21370,  -5307,  23064,  24020,   1020, -12374, -16296,
+    -19524,  -7480,  13509,  17115,  13952,  13952,     97,  -9326,
+     -9046, -15208,  -9853,  -3858,  -1979,   6029,   5616,   7214,
+      6820,   3935,   3919,    921,   1316,   -693,   -759,  -1517,
+     -2176,  -2028,  -2654,  -1814,  -2077,  -1468,  -1221,   -842,
+      -463,   -298,    -68,     64,    493,    723,    789,    954,
+       756,    839,    872,   1020,    789,    822,    558,    658,
+       476,    377,    377,    262,     97,    -68,   -183,   -232,
+      -331,   -347,   -430,   -314,   -430,   -463,   -463,   -414,
+      -381,   -479,   -479,   -512,   -479,   -397,   -430,   -397,
+      -298,   -265,   -249,   -216,   -249,   -265,   -166,   -232
+};
+
+/*!
+    The line model from section D.4 of G.168.
+
+    These are the coefficients for the line simulation model defined in
+    section D.4 of G.168. It may be used with the fir32_xxx
+    routines to build a line simulator.
+*/
+const int32_t line_model_d4_coeffs[] =
+{
+      -448,   -436,   2230,   2448,  -4178,  -7050,   5846,  18581,
+      2322, -26261, -16249,  21637,  25649,  -2267, -10311,  -4693,
+    -12690,  -7428,  14164,  13467,   4438,   8627,    456, -11879,
+     -6352,  -5104,  -7496,   3271,   6566,   4277,  11131,   7562,
+      1475,   3728,  -3525,  -7301,  -3101,  -9269,  -6146,  -2553,
+     -6272,    811,    124,    788,   5147,   2172,   5387,   4598,
+      3535,   4004,   2311,   2150,   1017,    330,   -139,   -573,
+     -1100,  -1157,  -1180,  -1455,  -1123,  -1386,  -1123,  -1066,
+     -1020,  -1100,  -1008,  -1077,  -1088,   -917,   -917,   -963,
+      -814,   -871,   -734,   -642,   -562,   -356,   -379,   -345,
+      -230,   -233,   -333,   -356,   -390,   -310,   -265,   -368,
+      -310,   -310,   -390,   -482,   -459,   -482,   -551,   -573
+};
+
+/*!
+    The line model from section D.5 of G.168.
+
+    These are the coefficients for the line simulation model defined in
+    section D.5 of G.168. It may be used with the fir32_xxx
+    routines to build a line simulator.
+*/
+const int32_t line_model_d5_coeffs[] =
+{
+       160,    312,   -241,   -415,    897,    908,  -1326,  -1499,
+      2405,   3347,  -3624,  -7733,   4041,  14484,  -1477, -21739,
+     -4470,  25356,  11458, -19696, -11800,   5766,    789,   6633,
+     14624,  -6975, -17156,   -187,    149,   1515,  14907,   4345,
+     -7128,  -2757, -10185,  -7083,   6850,   3944,   6969,   8694,
+     -4068,  -3852,  -5793,  -9371,    453,   1060,   3965,   9463, 
+      2393,   2784,   -892,  -7366,  -3376,  -5847,  -2399,   3011,
+      1537,   6623,   4205,   1602,   1592,  -4752,  -3646,  -5207,
+     -5577,   -501,  -1174,   4041,   5647,   4628,   7252,   2123, 
+      2654,   -881,  -4113,  -3244,  -7289,  -3830,  -4600,  -2508,
+       431,   -144,   4184,   2372,   4617,   3576,   2382,   2839,
+      -404,    539,  -1803,  -1401,  -1705,  -2269,   -783,  -1608, 
+      -220,   -306,    257,    615,    225,    561,      8,    344,
+       127,    -57,    182,     41,    203,   -111,     95,    -79,
+        30,     84,    -13,    -68,   -241,    -68,    -24,     19, 
+       -57,    -24,     30,    -68,     84,   -155,    -68,     19
+};
+
+/*!
+    The line model from section D.6 of G.168.
+
+    These are the coefficients for the line simulation model defined in
+    section D.6 of G.168. It may be used with the fir32_xxx
+    routines to build a line simulator.
+*/
+const int32_t line_model_d6_coeffs[] =
+{
+       293,    268,    475,    460,    517,    704,    581,    879,
+       573,    896,    604,    787,    561,    538,    440,     97,
+       265,   -385,     20,   -938,   -523,  -1438,  -1134,  -1887,
+     -1727,  -1698,  -4266, -22548, -43424,   2743,  25897,   7380,
+     21499,  11983,  10400,  11667,   3889,   7241,    925,   2018,
+      -821,  -2068,  -2236,  -4283,  -3406,  -5022,  -4039,  -4842,
+     -4104,  -4089,  -3582,  -2978,  -2734,  -1805,  -1608,   -645,
+      -495,    279,    471,    947,   1186,   1438,   1669,   1640,
+      1901,   1687,   1803,   1543,   1566,   1342,   1163,    963, 
+       733,    665,    323,    221,    -14,   -107,   -279,   -379,
+      -468,   -513,   -473,   -588,   -612,   -652,   -616,   -566,
+      -515,   -485,   -404,   -344,   -290,   -202,   -180,   -123
+};
+
+/*!
+    The line model from section D.7 of G.168.
+
+    These are the coefficients for the line simulation model defined in
+    section D.8 of G.168. It may be used with the fir32_xxx
+    routines to build a line simulator.
+*/
+const int32_t line_model_d7_coeffs[] =
+{
+        29,    109,    -83,    198,   -294,   -135,   -415,   -202,
+      -444,   -337,   -313,   -450,   -105,   -503,    145,   -490,
+       267,   -231,    340,     77,    343,    783,    158,   1341,
+       195,   1798,    344,   1845,    629,   1604,   1182,    940,
+      5163,  19522,   8421, -50953,  -9043,  18046, -13553,  13336,
+     -3471,   -107,   1788,  -7409,   2469,  -7994,    490,  -3860,
+      -837,    490,   -636,   3682,   1141,   5019,   2635,   5025,
+      3946,   4414,   4026,   3005,   3380,   1616,   2007,    158,
+       388,  -1198,  -1117,  -2134,  -2547,  -2589,  -3310,  -2778,
+     -3427,  -2779,  -3116,  -2502,  -2399,  -1956,  -1539,  -1239,
+      -570,   -377,    251,    331,    964,   1177,   1449,   1564, 
+      1724,   1871,   1767,   1802,   1630,   1632,   1379,   1271,
+      1063,    856,    711,    482,    289,     54,   -137,   -321,
+      -490,   -638,   -764,   -836,   -800,   -859,   -838,   -837,
+      -834,   -740,   -673,   -581,   -493,   -436,   -327,   -201
+};
+
+/*!
+    The line model from section D.8 of G.168.
+
+    These are the coefficients for the line simulation model defined in
+    section D.8 of G.168. It may be used with the fir32_xxx
+    routines to build a line simulator.
+*/
+const int32_t line_model_d8_coeffs[] =
+{
+       258,   -111,    337,   -319,    347,   -434,    192,   -450,
+      -108,   -343,   -596,   -177,  -1187,    -52,  -1781,   -147,
+     -1959,   -326,  -1601,  -1389, -13620,   -720,  33818, -10683,
+     -6742,  12489,  -9862,   8950,  -1574,    758,   3526,  -3118,
+      2421,  -8966,  -4901,  11385,  18072, -14410,  -7473,  19836,
+    -16854,  -3115,   9483, -17799,   7399,  -4342,  -7415,   7929,
+    -10726,   6239,  -2526,  -1317,   5345,  -4565,   6868,  -2195,
+      3425,   1969,   -109,   3963,  -1275,   3087,   -892,   1239,
+         2,   -427,    596,  -1184,    551,  -1244,    141,   -743, 
+      -415,   -372,   -769,   -183,   -785,   -270,   -659,   -377,
+      -523,   -325,   -245,   -255,    -60,     35,    218,    149,
+       340,    233,    365,    303,    251,    230,    209,    179
+};
+
+/*!
+    The line model from section D.9 of G.168.
+
+    These are the coefficients for the line simulation model defined in
+    section D.9 of G.168. It may be used with the fir32_xxx
+    routines to build a line simulator.
+*/
+const int32_t line_model_d9_coeffs[] =
+{
+        80,     31,      4,     42,     42,    -61,    -81,    -64,
+       121,   -102,    -26,   1002,  -9250, -22562,  39321,  35681,
+    -35289,  25312,  -1457,   -229,  15659,  -6786,  16791,   3860,
+      2239, -28730, -11885,  33871,   -176, -16421,  18173,  -9669,
+    -10163,   9941, -19365,   3592,  -5907, -10257,   5336, -12933,
+      4348,  -4802,  -1791,   3035,  -4433,   5553,  -2596,   3992,
+      1255,   1450,   4079,    324,   4340,   1059,   3083,   1917,
+      1756,   2478,   1027,   1871,    845,   1284,    813,    806,
+       869,    471,    646,    438,    449,    432,    473,    394,
+       452,    538,    717,    723,    850,    756,    753,    899,
+       555,    669,    619,    500,    650,    615,    516,    492,
+       427,    291,    356,    147,    107,    -50,    -88,    -59,
+      -238,   -165,   -183
+};
+
+/*!
+    The filter coefficients for the bandpass filter specified for level measurements
+    in G.168.
+*/
+const float level_measurement_bp_coeffs[] =
+{
+    0.0000,    0.0006,    0.0005,    0.0004,    0.0011,
+    0.0000,    0.0015,   -0.0003,    0.0012,   -0.0002,
+    0.0000,    0.0002,   -0.0020,    0.0005,   -0.0040,
+    0.0000,   -0.0047,   -0.0019,   -0.0033,   -0.0047,
+    0.0000,   -0.0068,    0.0036,   -0.0057,    0.0054,
+    0.0000,    0.0044,    0.0095,    0.0017,    0.0188,
+    0.0000,    0.0225,    0.0024,    0.0163,    0.0092,
+    0.0000,    0.0164,   -0.0210,    0.0161,   -0.0375,
+    0.0000,   -0.0406,   -0.0357,   -0.0267,   -0.0871,
+    0.0000,   -0.1420,    0.0289,   -0.1843,    0.0475,
+    0.8006,    0.0475,   -0.1843,    0.0289,   -0.1420,
+    0.0000,   -0.0871,   -0.0267,   -0.0357,   -0.0406,
+    0.0000,   -0.0375,    0.0161,   -0.0210,    0.0164,
+    0.0000,    0.0092,    0.0163,    0.0024,    0.0225,
+    0.0000,    0.0188,    0.0017,    0.0095,    0.0044,
+    0.0000,    0.0054,   -0.0057,    0.0036,   -0.0068,
+    0.0000,   -0.0047,   -0.0033,   -0.0019,   -0.0047,
+    0.0000,   -0.0040,    0.0005,   -0.0020,    0.0002,
+    0.0000,   -0.0002,    0.0012,   -0.0003,    0.0015,
+    0.0000,    0.0011,    0.0004,    0.0005,    0.0006,
+    0.0000
+};
+
+/*!
+    The composite source signal "voiced" section from section C.1 of G.168.
+*/
+const int css_c1[] =
+{
+     -155,   276,   517,   578,   491,   302,    86,  -103,
+     -207,  -198,    60,   190,   543,   948,  1362,  1741,
+     2043,  2276,  2422,  2500,  2552,  2595,  2655,  2758,
+     2896,  3060,  3224,  3370,  3500,  3569,  3603,  3603,
+     3595,  3586,  3595,  3638,  3724,  3819,  3922,  4000,
+     4043,  4034,  3974,  3862,  3724,  3577,  3439,  3336,
+     3267,  3224,  3198,  3172,  3129,  3043,  2914,  2750,
+     2560,  2353,  2155,  1991,  1853,  1750,  1672,  1603,
+     1534,  1440,  1310,  1146,   965,   776,   603,   448,
+      345,   276,   250,   250,   267,   267,   241,   190,
+      103,    -9,  -138,  -267,  -388,  -491,  -569,  -638,
+     -698,  -759,  -813,  -888,  -957, -1034, -1103, -1146,
+    -1181, -1190, -1198, -1215, -1259, -1327, -1457, -1629,
+    -1853, -2121, -2414, -2707, -3017, -3319, -3612, -3913,
+    -4224, -4560, -4922, -5301, -5715, -6137, -6560, -6948,
+    -7301, -7568, -7732, -7758, -7620, -7310, -6810, -6155,
+    -5344, -4439, -3474, -2508, -1595,  -802
+};
+
+/*!
+    The composite source signal "voiced" section from section C.3 of G.168.
+*/
+const int css_c3[] =
+{
+     -198,  -112,    -9,   103,   233,   388,   543,   724,
+      896,  1060,  1233,  1388,  1517,  1638,  1747,  1810,
+     1845,  1845,  1802,  1707,  1569,  1379,  1146,   871,
+      560,   233,  -121,  -491,  -871, -1250, -1638, -2043,
+    -2465, -2896, -3345, -3819, -4310, -4810, -5319, -5836,
+    -6353, -6853, -7353, -7836, -8292, -8715, -9077, -9370,
+    -9542, -9542, -9361, -8956, -8327, -7465, -6396, -5163,
+    -3827, -2448, -1103,   155,  1293,  2241,  3034,  3655,
+     4138,  4517,  4827,  5094,  5344,  5594,  5827,  6043,
+     6215,  6344,  6413,  6422,  6379,  6310,  6215,  6120,
+     6051,  6000,  5991,  5991,  6000,  6008,  5991,  5939,
+     5853,  5715,  5560,  5387,  5215,  5043,  4879,  4732,
+     4586,  4439,  4276,  4086,  3870,  3629,  3370,  3086,
+     2801,  2534,  2267,  2034,  1819,  1612,  1422,  1224,
+     1026,   819,   603,   388,   181,     9,  -181,  -328,
+     -448,  -543,  -629,  -707,  -784,  -871,  -948, -1026,
+    -1112, -1181, -1241, -1276, -1293, -1302, -1293, -1267,
+    -1250, -1233, -1224, -1224, -1224, -1224, -1215, -1198,
+    -1172, -1129, -1077, -1026,  -974,  -922,  -888,  -871,
+     -845,  -828,  -810,  -793,  -767,  -741,  -698,  -672,
+     -638,  -603,  -595,  -586,  -595,  -603,  -621,  -629,
+     -938,  -638,  -638,  -638,  -638,  -638,  -647,  -664,
+     -690,  -724,  -767,  -793,  -819,  -845,  -853,  -871,
+     -879,  -888,  -896,  -922,  -948,  -974, -1009, -1026,
+    -1052, -1069, -1077, -1069, -1060, -1060, -1052, -1043,
+    -1043, -1052, -1060, -1060, -1060, -1052, -1034, -1017,
+     -991,  -957,  -931,  -905,  -888,  -862,  -845,  -819,
+     -793,  -767,  -724,  -672,  -621,  -560,  -509,  -457,
+     -397,  -345,  -276,  -207,  -112
+};
+
+/*!
+    From section 6.4.2.7 of G.168 - Test No. 6 Non-divergence on narrow-band signals.
+    These tones and tone pairs are each applied for 5 seconds.
+*/
+const int tones_6_4_2_7[][2] =
+{
+    { 697,    0},
+    { 941,    0},
+    {1336,    0},
+    {1633,    0},
+    { 697, 1209},
+    { 770, 1336},
+    { 852, 1477},
+    { 941, 1633},
+    {   0,    0}
+};
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/g711.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,254 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g711.h - In line A-law and u-law conversion routines
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: g711.h,v 1.3 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page g711_page A-law and mu-law handling
+Lookup tables for A-law and u-law look attractive, until you consider the impact
+on the CPU cache. If it causes a substantial area of your processor cache to get
+hit too often, cache sloshing will severely slow things down. The main reason
+these routines are slow in C, is the lack of direct access to the CPU's "find
+the first 1" instruction. A little in-line assembler fixes that, and the
+conversion routines can be faster than lookup tables, in most real world usage.
+A "find the first 1" instruction is available on most modern CPUs, and is a
+much underused feature. 
+
+If an assembly language method of bit searching is not available, these routines
+revert to a method that can be a little slow, so the cache thrashing might not
+seem so bad :(
+
+Feel free to submit patches to add fast "find the first 1" support for your own
+favourite processor.
+
+Look up tables are used for transcoding between A-law and u-law, since it is
+difficult to achieve the precise transcoding procedure laid down in the G.711
+specification by other means.
+*/
+
+#if !defined(_G711_H_)
+#define _G711_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* N.B. It is tempting to use look-up tables for A-law and u-law conversion.
+ *      However, you should consider the cache footprint.
+ *
+ *      A 64K byte table for linear to x-law and a 512 byte table for x-law to
+ *      linear sound like peanuts these days, and shouldn't an array lookup be
+ *      real fast? No! When the cache sloshes as badly as this one will, a tight
+ *      calculation may be better. The messiest part is normally finding the
+ *      segment, but a little inline assembly can fix that on an i386, x86_64 and
+ *      many other modern processors.
+ */
+ 
+/*
+ * Mu-law is basically as follows:
+ *
+ *      Biased Linear Input Code        Compressed Code
+ *      ------------------------        ---------------
+ *      00000001wxyza                   000wxyz
+ *      0000001wxyzab                   001wxyz
+ *      000001wxyzabc                   010wxyz
+ *      00001wxyzabcd                   011wxyz
+ *      0001wxyzabcde                   100wxyz
+ *      001wxyzabcdef                   101wxyz
+ *      01wxyzabcdefg                   110wxyz
+ *      1wxyzabcdefgh                   111wxyz
+ *
+ * Each biased linear code has a leading 1 which identifies the segment
+ * number. The value of the segment number is equal to 7 minus the number
+ * of leading 0's. The quantization interval is directly available as the
+ * four bits wxyz.  * The trailing bits (a - h) are ignored.
+ *
+ * Ordinarily the complement of the resulting code word is used for
+ * transmission, and so the code word is complemented before it is returned.
+ *
+ * For further information see John C. Bellamy's Digital Telephony, 1982,
+ * John Wiley & Sons, pps 98-111 and 472-476.
+ */
+
+//#define ULAW_ZEROTRAP                 /* turn on the trap as per the MIL-STD */
+#define ULAW_BIAS        0x84           /* Bias for linear code. */
+
+/*! \brief Encode a linear sample to u-law
+    \param linear The sample to encode.
+    \return The u-law value.
+*/
+static __inline__ uint8_t linear_to_ulaw(int linear)
+{
+    uint8_t u_val;
+    int mask;
+    int seg;
+
+    /* Get the sign and the magnitude of the value. */
+    if (linear < 0)
+    {
+        linear = ULAW_BIAS - linear;
+        mask = 0x7F;
+    }
+    else
+    {
+        linear = ULAW_BIAS + linear;
+        mask = 0xFF;
+    }
+
+    seg = top_bit(linear | 0xFF) - 7;
+
+    /*
+     * Combine the sign, segment, quantization bits,
+     * and complement the code word.
+     */
+    if (seg >= 8)
+        u_val = (uint8_t) (0x7F ^ mask);
+    else
+        u_val = (uint8_t) (((seg << 4) | ((linear >> (seg + 3)) & 0xF)) ^ mask);
+#ifdef ULAW_ZEROTRAP
+    /* Optional ITU trap */
+    if (u_val == 0)
+        u_val = 0x02;
+#endif
+    return  u_val;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*! \brief Decode an u-law sample to a linear value.
+    \param ulaw The u-law sample to decode.
+    \return The linear value.
+*/
+static __inline__ int16_t ulaw_to_linear(uint8_t ulaw)
+{
+    int t;
+    
+    /* Complement to obtain normal u-law value. */
+    ulaw = ~ulaw;
+    /*
+     * Extract and bias the quantization bits. Then
+     * shift up by the segment number and subtract out the bias.
+     */
+    t = (((ulaw & 0x0F) << 3) + ULAW_BIAS) << (((int) ulaw & 0x70) >> 4);
+    return  (int16_t) ((ulaw & 0x80)  ?  (ULAW_BIAS - t)  :  (t - ULAW_BIAS));
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * A-law is basically as follows:
+ *
+ *      Linear Input Code        Compressed Code
+ *      -----------------        ---------------
+ *      0000000wxyza             000wxyz
+ *      0000001wxyza             001wxyz
+ *      000001wxyzab             010wxyz
+ *      00001wxyzabc             011wxyz
+ *      0001wxyzabcd             100wxyz
+ *      001wxyzabcde             101wxyz
+ *      01wxyzabcdef             110wxyz
+ *      1wxyzabcdefg             111wxyz
+ *
+ * For further information see John C. Bellamy's Digital Telephony, 1982,
+ * John Wiley & Sons, pps 98-111 and 472-476.
+ */
+
+#define ALAW_AMI_MASK       0x55
+
+/*! \brief Encode a linear sample to A-law
+    \param linear The sample to encode.
+    \return The A-law value.
+*/
+static __inline__ uint8_t linear_to_alaw(int linear)
+{
+    int mask;
+    int seg;
+    
+    if (linear >= 0)
+    {
+        /* Sign (bit 7) bit = 1 */
+        mask = ALAW_AMI_MASK | 0x80;
+    }
+    else
+    {
+        /* Sign (bit 7) bit = 0 */
+        mask = ALAW_AMI_MASK;
+        linear = -linear - 8;
+    }
+
+    /* Convert the scaled magnitude to segment number. */
+    seg = top_bit(linear | 0xFF) - 7;
+    if (seg >= 8)
+    {
+        if (linear >= 0)
+        {
+            /* Out of range. Return maximum value. */
+            return (uint8_t) (0x7F ^ mask);
+        }
+        /* We must be just a tiny step below zero */
+        return (uint8_t) (0x00 ^ mask);
+    }
+    /* Combine the sign, segment, and quantization bits. */
+    return (uint8_t) (((seg << 4) | ((linear >> ((seg)  ?  (seg + 3)  :  4)) & 0x0F)) ^ mask);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*! \brief Decode an A-law sample to a linear value.
+    \param alaw The A-law sample to decode.
+    \return The linear value.
+*/
+static __inline__ int16_t alaw_to_linear(uint8_t alaw)
+{
+    int i;
+    int seg;
+
+    alaw ^= ALAW_AMI_MASK;
+    i = ((alaw & 0x0F) << 4);
+    seg = (((int) alaw & 0x70) >> 4);
+    if (seg)
+        i = (i + 0x108) << (seg - 1);
+    else
+        i += 8;
+    return (int16_t) ((alaw & 0x80)  ?  i  :  -i);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*! \brief Transcode from A-law to u-law, using the procedure defined in G.711.
+    \param alaw The A-law sample to transcode.
+    \return The best matching u-law value.
+*/
+uint8_t alaw_to_ulaw(uint8_t alaw);
+
+/*! \brief Transcode from u-law to A-law, using the procedure defined in G.711.
+    \param alaw The u-law sample to transcode.
+    \return The best matching A-law value.
+*/
+uint8_t ulaw_to_alaw(uint8_t ulaw);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/g722.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,179 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g722.h - The ITU G.722 codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Based on a single channel G.722 codec which is:
+ *
+ *****    Copyright (c) CMU    1993      *****
+ * Computer Science, Speech Group
+ * Chengxiang Lu and Alex Hauptmann
+ *
+ * $Id: g722.h,v 1.13 2006/10/24 13:45:28 steveu Exp $
+ */
+
+
+/*! \file */
+
+#if !defined(_G722_H_)
+#define _G722_H_
+
+/*! \page g722_page G.722 encoding and decoding
+\section g722_page_sec_1 What does it do?
+The G.722 module is a bit exact implementation of the ITU G.722 specification for all three
+specified bit rates - 64000bps, 56000bps and 48000bps. It passes the ITU tests.
+
+To allow fast and flexible interworking with narrow band telephony, the encoder and decoder
+support an option for the linear audio to be an 8k samples/second stream. In this mode the
+codec is considerably faster, and still fully compatible with wideband terminals using G.722.
+
+\section g722_page_sec_2 How does it work?
+???.
+*/
+
+enum
+{
+    G722_SAMPLE_RATE_8000 = 0x0001,
+    G722_PACKED = 0x0002
+};
+
+typedef struct
+{
+    /*! TRUE if the operating in the special ITU test mode, with the band split filters
+             disabled. */
+    int itu_test_mode;
+    /*! TRUE if the G.722 data is packed */
+    int packed;
+    /*! TRUE if encode from 8k samples/second */
+    int eight_k;
+    /*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */
+    int bits_per_sample;
+
+    /*! Signal history for the QMF */
+    int x[24];
+
+    struct
+    {
+        int s;
+        int sp;
+        int sz;
+        int r[3];
+        int a[3];
+        int ap[3];
+        int p[3];
+        int d[7];
+        int b[7];
+        int bp[7];
+        int sg[7];
+        int nb;
+        int det;
+    } band[2];
+
+    unsigned int in_buffer;
+    int in_bits;
+    unsigned int out_buffer;
+    int out_bits;
+} g722_encode_state_t;
+
+typedef struct
+{
+    /*! TRUE if the operating in the special ITU test mode, with the band split filters
+             disabled. */
+    int itu_test_mode;
+    /*! TRUE if the G.722 data is packed */
+    int packed;
+    /*! TRUE if decode to 8k samples/second */
+    int eight_k;
+    /*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */
+    int bits_per_sample;
+
+    /*! Signal history for the QMF */
+    int x[24];
+
+    struct
+    {
+        int s;
+        int sp;
+        int sz;
+        int r[3];
+        int a[3];
+        int ap[3];
+        int p[3];
+        int d[7];
+        int b[7];
+        int bp[7];
+        int sg[7];
+        int nb;
+        int det;
+    } band[2];
+    
+    unsigned int in_buffer;
+    int in_bits;
+    unsigned int out_buffer;
+    int out_bits;
+} g722_decode_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise an G.722 encode context.
+    \param s The G.722 encode context.
+    \param rate The required bit rate for the G.722 data.
+           The valid rates are 64000, 56000 and 48000.
+    \param options
+    \return A pointer to the G.722 encode context, or NULL for error. */
+g722_encode_state_t *g722_encode_init(g722_encode_state_t *s, int rate, int options);
+
+int g722_encode_release(g722_encode_state_t *s);
+
+/*! Encode a buffer of linear PCM data to G.722
+    \param s The G.722 context.
+    \param g722_data The G.722 data produced.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of bytes of G.722 data produced. */
+int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len);
+
+/*! Initialise an G.722 decode context.
+    \param s The G.722 decode context.
+    \param rate The bit rate of the G.722 data.
+           The valid rates are 64000, 56000 and 48000.
+    \param options
+    \return A pointer to the G.722 decode context, or NULL for error. */
+g722_decode_state_t *g722_decode_init(g722_decode_state_t *s, int rate, int options);
+
+int g722_decode_release(g722_decode_state_t *s);
+
+/*! Decode a buffer of G.722 data to linear PCM.
+    \param s The G.722 context.
+    \param amp The audio sample buffer.
+    \param g722_data
+    \param len
+    \return The number of samples returned. */
+int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/g726.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,191 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g726.h - ITU G.726 codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Based on G.721/G.723 code which is:
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use.  Users may copy or modify this source code without
+ * charge.
+ *
+ * SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
+ * THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ *
+ * $Id: g726.h,v 1.13 2006/11/28 16:59:57 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_G726_H_)
+#define _G726_H_
+
+/*! \page g726_page G.726 encoding and decoding
+\section g726_page_sec_1 What does it do?
+
+The G.726 module is a bit exact implementation of the full ITU G.726 specification.
+It supports:
+    - 16 kbps, 24kbps, 32kbps, and 40kbps operation.
+    - Tandem adjustment, for interworking with A-law and u-law.
+    - Annex A support, for use in environments not using A-law or u-law.
+
+It passes the ITU tests.
+
+\section g726_page_sec_2 How does it work?
+???.
+*/
+
+enum
+{
+    G726_ENCODING_LINEAR = 0,   /* Interworking with 16 bit signed linear */
+    G726_ENCODING_ULAW,         /* Interworking with u-law */
+    G726_ENCODING_ALAW          /* Interworking with A-law */
+};
+
+enum
+{
+    G726_PACKING_NONE = 0,
+    G726_PACKING_LEFT = 1,
+    G726_PACKING_RIGHT = 2
+};
+
+struct g726_state_s;
+
+typedef int16_t (*g726_decoder_func_t)(struct g726_state_s *s, uint8_t code);
+
+typedef uint8_t (*g726_encoder_func_t)(struct g726_state_s *s, int16_t amp);
+
+/*
+ * The following is the definition of the state structure
+ * used by the G.726 encoder and decoder to preserve their internal
+ * state between successive calls.  The meanings of the majority
+ * of the state structure fields are explained in detail in the
+ * CCITT Recommendation G.721.  The field names are essentially indentical
+ * to variable names in the bit level description of the coding algorithm
+ * included in this Recommendation.
+ */
+typedef struct g726_state_s
+{
+    /*! The bit rate */
+    int rate;
+    /*! The external coding, for tandem operation */
+    int ext_coding;
+    /*! The number of bits per sample */
+    unsigned int bits_per_sample;
+    /*! One fo the G.726_PACKING_xxx options */
+    int packing;
+
+    /*! Locked or steady state step size multiplier. */
+    int32_t yl;
+    /*! Unlocked or non-steady state step size multiplier. */
+    int16_t yu;
+    /*! int16_t term energy estimate. */
+    int16_t dms;
+    /*! Long term energy estimate. */
+    int16_t dml;
+    /*! Linear weighting coefficient of 'yl' and 'yu'. */
+    int16_t ap;
+    
+    /*! Coefficients of pole portion of prediction filter. */
+    int16_t a[2];
+    /*! Coefficients of zero portion of prediction filter. */
+    int16_t b[6];
+    /*! Signs of previous two samples of a partially reconstructed signal. */
+    int16_t pk[2];
+    /*! Previous 6 samples of the quantized difference signal represented in
+        an internal floating point format. */
+    int16_t dq[6];
+    /*! Previous 2 samples of the quantized difference signal represented in an
+        internal floating point format. */
+    int16_t sr[2];
+    /*! Delayed tone detect */
+    int td;
+    
+    bitstream_state_t bs;
+
+    g726_encoder_func_t enc_func;
+    g726_decoder_func_t dec_func;
+} g726_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a G.726 encode or decode context.
+    \param s The G.726 context.
+    \param bit_rate The required bit rate for the ADPCM data.
+           The valid rates are 16000, 24000, 32000 and 40000.
+    \param ext_coding The coding used outside G.726.
+    \param packing One of the G.726_PACKING_xxx options.
+    \return A pointer to the G.726 context, or NULL for error. */
+g726_state_t *g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing);
+
+/*! Free a G.726 encode or decode context.
+    \param s The G.726 context.
+    \return 0 for OK. */
+int g726_release(g726_state_t *s);
+
+/*! Decode a buffer of G.726 ADPCM data to linear PCM, a-law or u-law.
+    \param s The G.726 context.
+    \param amp The audio sample buffer.
+    \param g726_data
+    \param g726_bytes
+    \return The number of samples returned. */
+int g726_decode(g726_state_t *s,
+                int16_t amp[],
+                const uint8_t g726_data[],
+                int g726_bytes);
+
+/*! Encode a buffer of linear PCM data to G.726 ADPCM.
+    \param s The G.726 context.
+    \param g726_data The G.726 data produced.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of bytes of G.726 data produced. */
+int g726_encode(g726_state_t *s,
+                uint8_t g726_data[],
+                const int16_t amp[],
+                int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/gsm0610.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,144 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610.h - GSM 06.10 full rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: gsm0610.h,v 1.7 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_GSM0610_H_)
+#define _GSM0610_H_
+
+/*! \page gsm0610_page GSM 06.10 encoding and decoding
+\section gsm0610_page_sec_1 What does it do?
+
+The GSM 06.10 module is an version of the widely used GSM FR codec software
+available from http://kbs.cs.tu-berlin.de/~jutta/toast.html. This version
+was produced since some versions of this codec are not bit exact, or not
+very efficient on modern processors. This implementation can use MMX instructions
+on Pentium class processors, or alternative methods on other processors. It
+passes all the ETSI test vectors. That is, it is a tested bit exact implementation.
+
+This implementation supports encoded data in one of three packing formats:
+    - Unpacked, with the 76 parameters of a GSM 06.10 code frame each occupying a
+      separate byte. (note that none of the parameters exceed 8 bits).
+    - Packed the the 33 byte per frame, used for VoIP, where 4 bits per frame are wasted.
+    - Packed in WAV49 format, where 2 frames are packed into 65 bytes.
+
+\section gsm0610_page_sec_2 How does it work?
+???.
+*/
+
+enum
+{
+    GSM0610_PACKING_NONE,
+    GSM0610_PACKING_WAV49,
+    GSM0610_PACKING_VOIP
+};
+
+/*!
+    GSM 06.10 FR codec unpacked frame.
+*/
+typedef struct
+{
+    int16_t LARc[8];
+    int16_t Nc[4];
+    int16_t bc[4];
+    int16_t Mc[4];
+    int16_t xmaxc[4];
+    int16_t xMc[4][13];
+} gsm0610_frame_t;
+
+/*!
+    GSM 06.10 FR codec state descriptor. This defines the state of
+    a single working instance of the GSM 06.10 FR encoder or decoder.
+*/
+typedef struct
+{
+    /*! \brief One of the packing modes */
+    int packing;
+
+    int16_t dp0[280];
+
+    int16_t z1;         /* preprocessing,   Offset_com. */
+    int32_t L_z2;       /*                  Offset_com. */
+    int16_t mp;         /*                  Preemphasis */
+
+    int16_t u[8];       /* short_term_delay_filter */
+    int16_t LARpp[2][8];
+    int16_t j;
+
+    int16_t nrp;        /* long term synthesis */
+    int16_t v[9];       /* short term synthesis */
+    int16_t msr;        /* decoder postprocessing */
+
+    int16_t e[50];      /* encoder */
+    uint8_t	frame_index;
+    uint8_t	frame_chain;
+} gsm0610_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a GSM 06.10 encode or decode context.
+    \param s The GSM 06.10 context
+    \param packing One of the GSM0610_PACKING_xxx options.
+    \return A pointer to the GSM 06.10 context, or NULL for error. */
+gsm0610_state_t *gsm0610_init(gsm0610_state_t *s, int packing);
+
+int gsm0610_release(gsm0610_state_t *s);
+
+/*! Encode a buffer of linear PCM data to GSM 06.10.
+    \param s The GSM 06.10 context.
+    \param ima_data The GSM 06.10 data produced.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of bytes of GSM 06.10 data produced. */
+int gsm0610_encode(gsm0610_state_t *s, uint8_t code[], const int16_t amp[], int quant);
+
+/*! Decode a buffer of GSM 06.10 data to linear PCM.
+    \param s The GSM 06.10 context.
+    \param amp The audio sample buffer.
+    \param code The GSM 06.10 data.
+    \param quant The number of frames of GSM 06.10 data to be decoded.
+    \return The number of samples returned. */
+int gsm0610_decode(gsm0610_state_t *s, int16_t amp[], const uint8_t code[], int quant);
+
+int gsm0610_pack_none(uint8_t c[], gsm0610_frame_t *s);
+
+int gsm0610_pack_wav49(uint8_t c[], gsm0610_frame_t *s, int half);
+
+int gsm0610_pack_voip(uint8_t c[], gsm0610_frame_t *s);
+
+int gsm0610_unpack_none(gsm0610_frame_t *s, const uint8_t c[]);
+
+int gsm0610_unpack_wav49(gsm0610_frame_t *s, const uint8_t c[], int half);
+
+int gsm0610_unpack_voip(gsm0610_frame_t *s, const uint8_t c[]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of include ---------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/hdlc.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,309 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * hdlc.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: hdlc.h,v 1.27 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page hdlc_page HDLC
+
+\section hdlc_page_sec_1 What does it do?
+The HDLC module provides bit stuffing, destuffing, framing and deframing,
+according to the HDLC protocol. It also provides 16 and 32 bit CRC generation
+and checking services for HDLC frames.
+
+HDLC may not be a DSP function, but is needed to accompany several DSP components.
+
+\section hdlc_page_sec_2 How does it work?
+*/
+
+
+#if !defined(_HDLC_H_)
+#define _HDLC_H_
+
+/*! 
+    HDLC_MAXFRAME_LEN is the maximum length of a stuffed HDLC frame, excluding the CRC.
+*/
+#define HDLC_MAXFRAME_LEN       400	
+
+typedef void (*hdlc_frame_handler_t)(void *user_data, int ok, const uint8_t *pkt, int len);
+typedef void (*hdlc_underflow_handler_t)(void *user_data);
+
+/*!
+    HDLC receive descriptor. This contains all the state information for an HDLC receiver.
+ */
+typedef struct
+{
+    /*! 2 for CRC-16, 4 for CRC-32 */
+    int crc_bytes;
+    /*! \brief The callback routine called to process each good received frame. */
+    hdlc_frame_handler_t frame_handler;
+    /*! \brief An opaque parameter passed to the callback routine. */
+    void *user_data;
+    /*! \brief TRUE if bad frames are to be reported. */
+    int report_bad_frames;
+    /*! \brief The number of consecutive flags which must be seen before framing is
+        declared OK. */
+    int framing_ok_threshold;
+    /*! \brief TRUE if framing OK has been announced. */
+    int framing_ok_announced;
+    /*! \brief Number of consecutive flags seen so far. */
+    int flags_seen;
+
+    /*! \brief The raw (stuffed) bit stream buffer. */
+    unsigned int raw_bit_stream;
+    /*! \brief The destuffed bit stream buffer. */
+    unsigned int byte_in_progress;
+    /*! \brief The current number of bits in byte_in_progress. */
+    int num_bits;
+	
+    /*! \brief Buffer for a frame in progress. */
+    uint8_t buffer[HDLC_MAXFRAME_LEN + 4];
+    /*! \brief Length of a frame in progress. */
+    int len;
+
+    /*! \brief The number of bytes of good frames received (CRC not included). */
+    unsigned long int rx_bytes;
+    /*! \brief The number of good frames received. */
+    unsigned long int rx_frames;
+    /*! \brief The number of frames with CRC errors received. */
+    unsigned long int rx_crc_errors;
+    /*! \brief The number of too short and too long frames received. */
+    unsigned long int rx_length_errors;
+    /*! \brief The number of HDLC aborts received. */
+    unsigned long int rx_aborts;
+} hdlc_rx_state_t;
+
+/*!
+    HDLC received data statistics.
+ */
+typedef struct
+{
+    /*! \brief The number of bytes of good frames received (CRC not included). */
+    unsigned long int bytes;
+    /*! \brief The number of good frames received. */
+    unsigned long int good_frames;
+    /*! \brief The number of frames with CRC errors received. */
+    unsigned long int crc_errors;
+    /*! \brief The number of too short and too long frames received. */
+    unsigned long int length_errors;
+    /*! \brief The number of HDLC aborts received. */
+    unsigned long int aborts;
+} hdlc_rx_stats_t;
+
+/*!
+    HDLC transmit descriptor. This contains all the state information for an
+    HDLC transmitter.
+ */
+typedef struct
+{
+    /*! 2 for CRC-16, 4 for CRC-32 */
+    int crc_bytes;
+    /*! \brief The callback routine called to indicate transmit underflow. */
+    hdlc_underflow_handler_t underflow_handler;
+    /*! \brief An opaque parameter passed to the callback routine. */
+    void *user_data;
+    /*! \brief The minimum flag octets to insert between frames. */
+    int inter_frame_flags;
+    /*! \brief TRUE if frame creation works in progressive mode. */
+    int progressive;
+    /*! \brief Maximum permitted frame length. */
+    int max_frame_len;
+
+    /*! \brief The stuffed bit stream being created. */
+    uint32_t octets_in_progress;
+    /*! \brief The number of bits currently in octets_in_progress. */
+    int num_bits;
+    /*! \brief The currently rotated state of the flag octet. */
+    int idle_octet;
+    /*! \brief The number of flag octets to send for a timed burst of flags. */
+    int flag_octets;
+    /*! \brief TRUE if the next underflow of timed flag octets should be reported */
+    int report_flag_underflow;
+
+    /*! \brief The current message being transmitted, with its CRC attached. */
+    uint8_t buffer[HDLC_MAXFRAME_LEN + 4];
+    /*! \brief The length of the message in the buffer. */
+    int len;
+    /*! \brief The current send position within the buffer. */
+    int pos;
+    /*! \brief The running CRC, as data fills the frame buffer. */
+    uint32_t crc;
+
+    /*! \brief The current byte being broken into bits for transmission. */
+    int byte;
+    /*! \brief The number of bits remaining in byte. */
+    int bits;
+    
+    /*! \brief TRUE if transmission should end on buffer underflow .*/
+    int tx_end;
+} hdlc_tx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Calculate the ITU/CCITT CRC-32 value in buffer.
+    \param buf The buffer containing the data.
+    \param len The length of the frame.
+    \param crc The initial CRC value. This is usually 0xFFFFFFFF, or 0 for a new block (it depends on
+           the application). It is previous returned CRC value for the continuation of a block.
+    \return The CRC value.
+*/
+uint32_t crc_itu32_calc(const uint8_t *buf, int len, uint32_t crc);
+
+/*! \brief Append an ITU/CCITT CRC-32 value to a frame.
+    \param buf The buffer containing the frame. This must be at least 2 bytes longer than
+               the frame it contains, to allow room for the CRC value.
+    \param len The length of the frame.
+    \return The new length of the frame.
+*/
+int crc_itu32_append(uint8_t *buf, int len);
+
+/*! \brief Check the ITU/CCITT CRC-32 value in a frame.
+    \param buf The buffer containing the frame.
+    \param len The length of the frame.
+    \return TRUE if the CRC is OK, else FALSE.
+*/
+int crc_itu32_check(const uint8_t *buf, int len);
+
+/*! \brief Calculate the ITU/CCITT CRC-16 value in buffer.
+    \param buf The buffer containing the data.
+    \param len The length of the frame.
+    \param crc The initial CRC value. This is usually 0xFFFF, or 0 for a new block (it depends on
+           the application). It is previous returned CRC value for the continuation of a block.
+    \return The CRC value.
+*/
+uint16_t crc_itu16_calc(const uint8_t *buf, int len, uint16_t crc);
+
+/*! \brief Append an ITU/CCITT CRC-16 value to a frame.
+    \param buf The buffer containing the frame. This must be at least 2 bytes longer than
+               the frame it contains, to allow room for the CRC value.
+    \param len The length of the frame.
+    \return The new length of the frame.
+*/
+int crc_itu16_append(uint8_t *buf, int len);
+
+/*! \brief Check the ITU/CCITT CRC-16 value in a frame.
+    \param buf The buffer containing the frame.
+    \param len The length of the frame.
+    \return TRUE if the CRC is OK, else FALSE.
+*/
+int crc_itu16_check(const uint8_t *buf, int len);
+
+/*! \brief Initialise an HDLC receiver context.
+    \param s A pointer to an HDLC receiver context.
+    \param crc32 TRUE to use ITU CRC32. FALSE to use ITU CRC16.
+    \param report_bad_frames TRUE to request the reporting of bad frames.
+    \param framing_ok_threshold The number of back-to-back flags needed to
+           start the framing OK condition. This may be used where a series of
+           flag octets is used as a preamble, such as in the T.30 protocol.
+    \param handler The function to be called when a good HDLC frame is received.
+    \param user_data An opaque parameter for the callback routine.
+    \return A pointer to the HDLC receiver context.
+*/
+hdlc_rx_state_t *hdlc_rx_init(hdlc_rx_state_t *s,
+                              int crc32,
+                              int report_bad_frames,
+                              int framing_ok_threshold,
+                              hdlc_frame_handler_t handler,
+                              void *user_data);
+
+/*! \brief Get the current receive statistics.
+    \param s A pointer to an HDLC receiver context.
+    \param t A pointer to the buffer for the statistics.
+    \return 0 for OK, else -1.
+*/
+int hdlc_rx_get_stats(hdlc_rx_state_t *s,
+                      hdlc_rx_stats_t *t);
+
+/* Use either the bit-by-bit or byte-by-byte routines. Do not mix them is a
+   single instance of HDLC */
+void hdlc_rx_put_bit(hdlc_rx_state_t *s, int new_bit);
+void hdlc_rx_put_byte(hdlc_rx_state_t *s, int new_byte);
+
+/*! \brief Initialise an HDLC transmitter context.
+    \param s A pointer to an HDLC transmitter context.
+    \param crc32 TRUE to use ITU CRC32. FALSE to use ITU CRC16.
+    \param inter_frame_flags The minimum flag octets to insert between frames (usually one).
+    \param progressive TRUE if frame creation works in progressive mode.
+    \param handler The callback function called when the HDLC transmitter underflows.
+    \param user_data An opaque parameter for the callback routine.
+    \return A pointer to the HDLC transmitter context.
+*/
+hdlc_tx_state_t *hdlc_tx_init(hdlc_tx_state_t *s,
+                              int crc32,
+                              int inter_frame_flags,
+                              int progressive,
+                              hdlc_underflow_handler_t handler,
+                              void *user_data);
+
+/*! \brief Set the maximum frame length for an HDLC transmitter context.
+    \param s A pointer to an HDLC transmitter context.
+    \param max_len The maximum length.
+*/
+void hdlc_tx_set_max_frame_len(hdlc_tx_state_t *s, int max_len);
+
+/*! \brief Transmit a frame.
+    \param s A pointer to an HDLC transmitter context.
+    \param frame A pointer to the frame to be transmitted.
+    \param len The length of the frame to be transmitted.
+    \return 0 if the frame was accepted for transmission, else -1.
+*/
+int hdlc_tx_frame(hdlc_tx_state_t *s, const uint8_t *frame, int len);
+
+/*! \brief Corrupt the frame currently being transmitted, by giving it the wrong CRC.
+    \param s A pointer to an HDLC transmitter context.
+    \return 0 if the frame was corrupted, else -1.
+*/
+int hdlc_tx_corrupt_frame(hdlc_tx_state_t *s);
+
+/*! \brief Transmit a specified quantity of flag octets as a preamble.
+    \param s A pointer to an HDLC transmitter context.
+    \param len The length of the required preamble, in flag octets. If len is zero this
+           requests that HDLC transmission be terminated when the buffers have fully
+           drained.
+    \return 0 if the preamble was accepted for transmission, else -1.
+*/
+int hdlc_tx_preamble(hdlc_tx_state_t *s, int len);
+
+/*! \brief Get the next bit for transmission.
+    \param s A pointer to an HDLC transmitter context.
+    \return The next bit for transmission.
+*/
+int hdlc_tx_get_bit(hdlc_tx_state_t *s);
+
+/*! \brief Get the next byte for transmission.
+    \param s A pointer to an HDLC transmitter context.
+    \return The next byte for transmission.
+*/
+int hdlc_tx_get_byte(hdlc_tx_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/ima_adpcm.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,109 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * imaadpcm.c - Conversion routines between linear 16 bit PCM data and
+ *		        IMA/DVI/Intel ADPCM format.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * Based on a bit from here, a bit from there, eye of toad,
+ * ear of bat, etc - plus, of course, my own 2 cents.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: ima_adpcm.h,v 1.12 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_IMA_ADPCM_H_)
+#define _IMA_ADPCM_H_
+
+/*! \page ima_adpcm_page IMA/DVI/Intel ADPCM encoding and decoding
+\section ima_adpcm_page_sec_1 What does it do?
+IMA ADPCM offers a good balance of simplicity and quality at a rate of
+32kbps.
+
+\section ima_adpcm_page_sec_2 How does it work?
+
+\section ima_adpcm_page_sec_3 How do I use it?
+*/
+
+enum
+{
+    IMA_ADPCM_DVI4 = 0,
+    IMA_ADPCM_VDVI = 1
+};
+
+/*!
+    IMA (DVI/Intel) ADPCM conversion state descriptor. This defines the state of
+    a single working instance of the IMA ADPCM converter. This is used for
+    either linear to ADPCM or ADPCM to linear conversion.
+*/
+typedef struct
+{
+    int variant;
+    int last;
+    int step_index;
+    uint16_t ima_byte;
+    int bits;
+} ima_adpcm_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise an IMA ADPCM encode or decode context.
+    \param s The IMA ADPCM context
+    \param variant ???
+    \return A pointer to the IMA ADPCM context, or NULL for error. */
+ima_adpcm_state_t *ima_adpcm_init(ima_adpcm_state_t *s, int variant);
+
+/*! Free an IMA ADPCM encode or decode context.
+    \param s The IMA ADPCM context.
+    \return 0 for OK. */
+int ima_adpcm_release(ima_adpcm_state_t *s);
+
+/*! Encode a buffer of linear PCM data to IMA ADPCM.
+    \param s The IMA ADPCM context.
+    \param ima_data The IMA ADPCM data produced.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of bytes of IMA ADPCM data produced. */
+int ima_adpcm_encode(ima_adpcm_state_t *s,
+                     uint8_t ima_data[],
+                     const int16_t amp[],
+                     int len);
+
+/*! Decode a buffer of IMA ADPCM data to linear PCM.
+    \param s The IMA ADPCM context.
+    \param amp The audio sample buffer.
+    \param ima_data
+    \param ima_bytes
+    \return The number of samples returned. */
+int ima_adpcm_decode(ima_adpcm_state_t *s,
+                     int16_t amp[],
+                     const uint8_t ima_data[],
+                     int ima_bytes);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/logging.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,146 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * logging.h - definitions for error and debug logging.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: logging.h,v 1.10 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page logging_page Logging
+\section logging_page_sec_1 What does it do?
+???.
+*/
+
+#if !defined(_LOGGING_H_)
+#define _LOGGING_H_
+
+/*! General logging function for spandsp logging. */
+typedef void (*message_handler_func_t)(int level, const char *text);
+
+/*! Error logging function for spandsp logging. */
+typedef void (*error_handler_func_t)(const char *text);
+
+/* Logging elements */
+enum
+{
+    SPAN_LOG_SEVERITY_MASK          = 0x00FF,
+    SPAN_LOG_SHOW_DATE              = 0x0100,
+    SPAN_LOG_SHOW_SAMPLE_TIME       = 0x0200,
+    SPAN_LOG_SHOW_SEVERITY          = 0x0400,
+    SPAN_LOG_SHOW_PROTOCOL          = 0x0800,
+    SPAN_LOG_SHOW_VARIANT           = 0x1000,
+    SPAN_LOG_SHOW_TAG               = 0x2000,
+    SPAN_LOG_SUPPRESS_LABELLING     = 0x8000
+};
+
+/* Logging severity levels */
+enum
+{
+    SPAN_LOG_NONE                       = 0,
+    SPAN_LOG_ERROR                      = 1,
+    SPAN_LOG_WARNING                    = 2,
+    SPAN_LOG_PROTOCOL_ERROR             = 3,
+    SPAN_LOG_PROTOCOL_WARNING           = 4,
+    SPAN_LOG_FLOW                       = 5,
+    SPAN_LOG_FLOW_2                     = 6,
+    SPAN_LOG_FLOW_3                     = 7,
+    SPAN_LOG_DEBUG                      = 8,
+    SPAN_LOG_DEBUG_2                    = 9,
+    SPAN_LOG_DEBUG_3                    = 10
+};
+
+/*!
+    Logging descriptor. This defines the working state for a single instance of
+    the logging facility for spandsp.
+*/
+typedef struct
+{
+    int level;
+    int samples_per_second;
+    int64_t elapsed_samples;
+    const char *tag;
+    const char *protocol;
+
+    message_handler_func_t span_message;
+    error_handler_func_t span_error;
+} logging_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Test if logging of a specified severity level is enabled.
+    \brief Test if logging of a specified severity level is enabled.
+    \param s The logging context.
+    \param level The severity level to be tested.
+    \return TRUE if logging is enable, else FALSE.
+*/
+int span_log_test(logging_state_t *s, int level);
+
+/*! Generate a log entry.
+    \brief Generate a log entry.
+    \param s The logging context.
+    \param level The severity level of the entry.
+    \param format ???
+    \return 0 if no output generated, else 1.
+*/
+int span_log(logging_state_t *s, int level, const char *format, ...);
+
+/*! Generate a log entry displaying the contents of a buffer.
+    \brief Generate a log entry displaying the contents of a buffer
+    \param s The logging context.
+    \param level The severity level of the entry.
+    \param tag A label for the log entry.
+    \param buf The buffer to be dumped to the log.
+    \param len The length of buf.
+    \return 0 if no output generated, else 1.
+*/
+int span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len);
+
+int span_log_init(logging_state_t *s, int level, const char *tag);
+
+int span_log_set_level(logging_state_t *s, int level);
+
+int span_log_set_tag(logging_state_t *s, const char *tag);
+
+int span_log_set_protocol(logging_state_t *s, const char *protocol);
+
+int span_log_set_sample_rate(logging_state_t *s, int samples_per_second);
+
+int span_log_bump_samples(logging_state_t *s, int samples);
+
+void span_log_set_message_handler(logging_state_t *s, message_handler_func_t func);
+
+void span_log_set_error_handler(logging_state_t *s, error_handler_func_t func);
+
+void span_set_message_handler(message_handler_func_t func);
+
+void span_set_error_handler(error_handler_func_t func);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/lpc10.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,212 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * lpc10.h - LPC10 low bit rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: lpc10.h,v 1.10 2006/11/21 13:57:40 steveu Exp $
+ */
+
+#if !defined(_LPC10_H_)
+#define _LPC10_H_
+
+/*! \page lpc10_page LPC10 encoding and decoding
+\section lpc10_page_sec_1 What does it do?
+The LPC10 module implements the US Department of Defense LPC10
+codec. This codec produces compressed data at 2400bps. At such
+a low rate high fidelity cannot be expected. However, the speech
+clarity is quite good, and this codec is unencumbered by patent
+or other restrictions.
+
+\section lpc10_page_sec_2 How does it work?
+???.
+*/
+
+#define LPC10_SAMPLES_PER_FRAME 180
+#define LPC10_BITS_IN_COMPRESSED_FRAME 54
+
+/*!
+    LPC10 codec unpacked frame.
+*/
+typedef struct
+{
+    int32_t ipitch;
+    int32_t irms;
+    int32_t irc[10];
+} lpc10_frame_t;
+
+/*!
+    LPC10 codec encoder state descriptor. This defines the state of
+    a single working instance of the LPC10 encoder.
+*/
+typedef struct
+{
+    int error_correction;
+
+    /* State used only by function high_pass_100hz */
+    float z11;
+    float z21;
+    float z12;
+    float z22;
+    
+    /* State used by function lpc10_analyse */
+    float inbuf[LPC10_SAMPLES_PER_FRAME*3];
+    float pebuf[LPC10_SAMPLES_PER_FRAME*3];
+    float lpbuf[696];
+    float ivbuf[312];
+    float bias;
+    int32_t osbuf[10];      /* No initial value necessary */
+    int32_t osptr;          /* Initial value 1 */
+    int32_t obound[3];
+    int32_t vwin[3][2];     /* Initial value vwin[2][0] = 307; vwin[2][1] = 462; */
+    int32_t awin[3][2];     /* Initial value awin[2][0] = 307; awin[2][1] = 462; */
+    int32_t voibuf[4][2];
+    float rmsbuf[3];
+    float rcbuf[3][10];
+    float zpre;
+
+    /* State used by function onset */
+    float n;
+    float d__;          /* Initial value 1.0f */
+    float fpc;          /* No initial value necessary */
+    float l2buf[16];
+    float l2sum1;
+    int32_t l2ptr1;     /* Initial value 1 */
+    int32_t l2ptr2;     /* Initial value 9 */
+    int32_t lasti;      /* No initial value necessary */
+    int hyst;           /* Initial value FALSE */
+
+    /* State used by function lpc10_voicing */
+    float dither;       /* Initial value 20.0f */
+    float snr;
+    float maxmin;
+    float voice[3][2];  /* Initial value is probably unnecessary */
+    int32_t lbve;
+    int32_t lbue;
+    int32_t fbve;
+    int32_t fbue;
+    int32_t ofbue;
+    int32_t sfbue;
+    int32_t olbue;
+    int32_t slbue;
+
+    /* State used by function dynamic_pitch_tracking */
+    float s[60];
+    int32_t p[2][60];
+    int32_t ipoint;
+    float alphax;
+
+    /* State used by function lpc10_pack */
+    int32_t isync;
+} lpc10_encode_state_t;
+
+/*!
+    LPC10 codec decoder state descriptor. This defines the state of
+    a single working instance of the LPC10 decoder.
+*/
+typedef struct
+{
+    int error_correction;
+
+    /* State used by function decode */
+    int32_t iptold;     /* Initial value 60 */
+    int first;          /* Initial value TRUE */
+    int32_t ivp2h;
+    int32_t iovoic;
+    int32_t iavgp;      /* Initial value 60 */
+    int32_t erate;
+    int32_t drc[10][3];
+    int32_t dpit[3];
+    int32_t drms[3];
+
+    /* State used by function synths */
+    float buf[LPC10_SAMPLES_PER_FRAME*2];
+    int32_t buflen;     /* Initial value LPC10_SAMPLES_PER_FRAME */
+
+    /* State used by function pitsyn */
+    int32_t ivoico;     /* No initial value necessary as long as first_pitsyn is initially TRUE_ */
+    int32_t ipito;      /* No initial value necessary as long as first_pitsyn is initially TRUE_ */
+    float rmso;         /* Initial value 1.0f */
+    float rco[10];      /* No initial value necessary as long as first_pitsyn is initially TRUE_ */
+    int32_t jsamp;      /* Nno initial value necessary as long as first_pitsyn is initially TRUE_ */
+    int first_pitsyn;   /* Initial value TRUE */
+
+    /* State used by function bsynz */
+    int32_t ipo;
+    float exc[166];
+    float exc2[166];
+    float lpi[3];
+    float hpi[3];
+    float rmso_bsynz;
+
+    /* State used by function random */
+    int32_t j;
+    int32_t k;
+    int16_t y[5];
+
+    /* State used by function deemp */
+    float dei[2];
+    float deo[3];
+} lpc10_decode_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise an LPC10e encode context.
+    \param s The LPC10e context
+    \param error_correction ???
+    \return A pointer to the LPC10e context, or NULL for error. */
+lpc10_encode_state_t *lpc10_encode_init(lpc10_encode_state_t *s, int error_correction);
+
+int lpc10_encode_release(lpc10_encode_state_t *s);
+
+/*! Encode a buffer of linear PCM data to LPC10e.
+    \param s The LPC10e context.
+    \param ima_data The LPC10e data produced.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of bytes of LPC10e data produced. */
+int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int quant);
+
+/*! Initialise an LPC10e decode context.
+    \param s The LPC10e context
+    \param error_correction ???
+    \return A pointer to the LPC10e context, or NULL for error. */
+lpc10_decode_state_t *lpc10_decode_init(lpc10_decode_state_t *st, int error_correction);
+
+int lpc10_decode_release(lpc10_decode_state_t *s);
+
+/*! Decode a buffer of LPC10e data to linear PCM.
+    \param s The LPC10e context.
+    \param amp The audio sample buffer.
+    \param code The LPC10e data.
+    \param quant The number of frames of LPC10e data to be decoded.
+    \return The number of samples returned. */
+int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int quant);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of include ---------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/mmx.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,288 @@
+/*
+ * mmx.h
+ * Copyright (C) 1997-2001 H. Dietz and R. Fisher
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef AVCODEC_I386MMX_H
+#define AVCODEC_I386MMX_H
+
+/*
+ * The type of an value that fits in an MMX register (note that long
+ * long constant values MUST be suffixed by LL and unsigned long long
+ * values by ULL, lest they be truncated by the compiler)
+ */
+
+typedef        union {
+        long long               q;      /* Quadword (64-bit) value */
+        unsigned long long      uq;     /* Unsigned Quadword */
+        int                     d[2];   /* 2 Doubleword (32-bit) values */
+        unsigned int            ud[2];  /* 2 Unsigned Doubleword */
+        short                   w[4];   /* 4 Word (16-bit) values */
+        unsigned short          uw[4];  /* 4 Unsigned Word */
+        char                    b[8];   /* 8 Byte (8-bit) values */
+        unsigned char           ub[8];  /* 8 Unsigned Byte */
+        float                   s[2];   /* Single-precision (32-bit) value */
+} mmx_t;        /* On an 8-byte (64-bit) boundary */
+
+/* SSE registers */
+typedef union {
+	char b[16];
+} xmm_t;
+
+
+#define         mmx_i2r(op,imm,reg) \
+        __asm__ __volatile__ (#op " %0, %%" #reg \
+                              : /* nothing */ \
+                              : "i" (imm) )
+
+#define         mmx_m2r(op,mem,reg) \
+        __asm__ __volatile__ (#op " %0, %%" #reg \
+                              : /* nothing */ \
+                              : "m" (mem))
+
+#define         mmx_r2m(op,reg,mem) \
+        __asm__ __volatile__ (#op " %%" #reg ", %0" \
+                              : "=m" (mem) \
+                              : /* nothing */ )
+
+#define         mmx_r2r(op,regs,regd) \
+        __asm__ __volatile__ (#op " %" #regs ", %" #regd)
+
+
+#define         emms() __asm__ __volatile__ ("emms")
+
+#define         movd_m2r(var,reg)           mmx_m2r (movd, var, reg)
+#define         movd_r2m(reg,var)           mmx_r2m (movd, reg, var)
+#define         movd_r2r(regs,regd)         mmx_r2r (movd, regs, regd)
+
+#define         movq_m2r(var,reg)           mmx_m2r (movq, var, reg)
+#define         movq_r2m(reg,var)           mmx_r2m (movq, reg, var)
+#define         movq_r2r(regs,regd)         mmx_r2r (movq, regs, regd)
+
+#define         packssdw_m2r(var,reg)       mmx_m2r (packssdw, var, reg)
+#define         packssdw_r2r(regs,regd)     mmx_r2r (packssdw, regs, regd)
+#define         packsswb_m2r(var,reg)       mmx_m2r (packsswb, var, reg)
+#define         packsswb_r2r(regs,regd)     mmx_r2r (packsswb, regs, regd)
+
+#define         packuswb_m2r(var,reg)       mmx_m2r (packuswb, var, reg)
+#define         packuswb_r2r(regs,regd)     mmx_r2r (packuswb, regs, regd)
+
+#define         paddb_m2r(var,reg)          mmx_m2r (paddb, var, reg)
+#define         paddb_r2r(regs,regd)        mmx_r2r (paddb, regs, regd)
+#define         paddd_m2r(var,reg)          mmx_m2r (paddd, var, reg)
+#define         paddd_r2r(regs,regd)        mmx_r2r (paddd, regs, regd)
+#define         paddw_m2r(var,reg)          mmx_m2r (paddw, var, reg)
+#define         paddw_r2r(regs,regd)        mmx_r2r (paddw, regs, regd)
+
+#define         paddsb_m2r(var,reg)         mmx_m2r (paddsb, var, reg)
+#define         paddsb_r2r(regs,regd)       mmx_r2r (paddsb, regs, regd)
+#define         paddsw_m2r(var,reg)         mmx_m2r (paddsw, var, reg)
+#define         paddsw_r2r(regs,regd)       mmx_r2r (paddsw, regs, regd)
+
+#define         paddusb_m2r(var,reg)        mmx_m2r (paddusb, var, reg)
+#define         paddusb_r2r(regs,regd)      mmx_r2r (paddusb, regs, regd)
+#define         paddusw_m2r(var,reg)        mmx_m2r (paddusw, var, reg)
+#define         paddusw_r2r(regs,regd)      mmx_r2r (paddusw, regs, regd)
+
+#define         pand_m2r(var,reg)           mmx_m2r (pand, var, reg)
+#define         pand_r2r(regs,regd)         mmx_r2r (pand, regs, regd)
+
+#define         pandn_m2r(var,reg)          mmx_m2r (pandn, var, reg)
+#define         pandn_r2r(regs,regd)        mmx_r2r (pandn, regs, regd)
+
+#define         pcmpeqb_m2r(var,reg)        mmx_m2r (pcmpeqb, var, reg)
+#define         pcmpeqb_r2r(regs,regd)      mmx_r2r (pcmpeqb, regs, regd)
+#define         pcmpeqd_m2r(var,reg)        mmx_m2r (pcmpeqd, var, reg)
+#define         pcmpeqd_r2r(regs,regd)      mmx_r2r (pcmpeqd, regs, regd)
+#define         pcmpeqw_m2r(var,reg)        mmx_m2r (pcmpeqw, var, reg)
+#define         pcmpeqw_r2r(regs,regd)      mmx_r2r (pcmpeqw, regs, regd)
+
+#define         pcmpgtb_m2r(var,reg)        mmx_m2r (pcmpgtb, var, reg)
+#define         pcmpgtb_r2r(regs,regd)      mmx_r2r (pcmpgtb, regs, regd)
+#define         pcmpgtd_m2r(var,reg)        mmx_m2r (pcmpgtd, var, reg)
+#define         pcmpgtd_r2r(regs,regd)      mmx_r2r (pcmpgtd, regs, regd)
+#define         pcmpgtw_m2r(var,reg)        mmx_m2r (pcmpgtw, var, reg)
+#define         pcmpgtw_r2r(regs,regd)      mmx_r2r (pcmpgtw, regs, regd)
+
+#define         pmaddwd_m2r(var,reg)        mmx_m2r (pmaddwd, var, reg)
+#define         pmaddwd_r2r(regs,regd)      mmx_r2r (pmaddwd, regs, regd)
+
+#define         pmulhw_m2r(var,reg)         mmx_m2r (pmulhw, var, reg)
+#define         pmulhw_r2r(regs,regd)       mmx_r2r (pmulhw, regs, regd)
+
+#define         pmullw_m2r(var,reg)         mmx_m2r (pmullw, var, reg)
+#define         pmullw_r2r(regs,regd)       mmx_r2r (pmullw, regs, regd)
+
+#define         por_m2r(var,reg)            mmx_m2r (por, var, reg)
+#define         por_r2r(regs,regd)          mmx_r2r (por, regs, regd)
+
+#define         pslld_i2r(imm,reg)          mmx_i2r (pslld, imm, reg)
+#define         pslld_m2r(var,reg)          mmx_m2r (pslld, var, reg)
+#define         pslld_r2r(regs,regd)        mmx_r2r (pslld, regs, regd)
+#define         psllq_i2r(imm,reg)          mmx_i2r (psllq, imm, reg)
+#define         psllq_m2r(var,reg)          mmx_m2r (psllq, var, reg)
+#define         psllq_r2r(regs,regd)        mmx_r2r (psllq, regs, regd)
+#define         psllw_i2r(imm,reg)          mmx_i2r (psllw, imm, reg)
+#define         psllw_m2r(var,reg)          mmx_m2r (psllw, var, reg)
+#define         psllw_r2r(regs,regd)        mmx_r2r (psllw, regs, regd)
+
+#define         psrad_i2r(imm,reg)          mmx_i2r (psrad, imm, reg)
+#define         psrad_m2r(var,reg)          mmx_m2r (psrad, var, reg)
+#define         psrad_r2r(regs,regd)        mmx_r2r (psrad, regs, regd)
+#define         psraw_i2r(imm,reg)          mmx_i2r (psraw, imm, reg)
+#define         psraw_m2r(var,reg)          mmx_m2r (psraw, var, reg)
+#define         psraw_r2r(regs,regd)        mmx_r2r (psraw, regs, regd)
+
+#define         psrld_i2r(imm,reg)          mmx_i2r (psrld, imm, reg)
+#define         psrld_m2r(var,reg)          mmx_m2r (psrld, var, reg)
+#define         psrld_r2r(regs,regd)        mmx_r2r (psrld, regs, regd)
+#define         psrlq_i2r(imm,reg)          mmx_i2r (psrlq, imm, reg)
+#define         psrlq_m2r(var,reg)          mmx_m2r (psrlq, var, reg)
+#define         psrlq_r2r(regs,regd)        mmx_r2r (psrlq, regs, regd)
+#define         psrlw_i2r(imm,reg)          mmx_i2r (psrlw, imm, reg)
+#define         psrlw_m2r(var,reg)          mmx_m2r (psrlw, var, reg)
+#define         psrlw_r2r(regs,regd)        mmx_r2r (psrlw, regs, regd)
+
+#define         psubb_m2r(var,reg)          mmx_m2r (psubb, var, reg)
+#define         psubb_r2r(regs,regd)        mmx_r2r (psubb, regs, regd)
+#define         psubd_m2r(var,reg)          mmx_m2r (psubd, var, reg)
+#define         psubd_r2r(regs,regd)        mmx_r2r (psubd, regs, regd)
+#define         psubw_m2r(var,reg)          mmx_m2r (psubw, var, reg)
+#define         psubw_r2r(regs,regd)        mmx_r2r (psubw, regs, regd)
+
+#define         psubsb_m2r(var,reg)         mmx_m2r (psubsb, var, reg)
+#define         psubsb_r2r(regs,regd)       mmx_r2r (psubsb, regs, regd)
+#define         psubsw_m2r(var,reg)         mmx_m2r (psubsw, var, reg)
+#define         psubsw_r2r(regs,regd)       mmx_r2r (psubsw, regs, regd)
+
+#define         psubusb_m2r(var,reg)        mmx_m2r (psubusb, var, reg)
+#define         psubusb_r2r(regs,regd)      mmx_r2r (psubusb, regs, regd)
+#define         psubusw_m2r(var,reg)        mmx_m2r (psubusw, var, reg)
+#define         psubusw_r2r(regs,regd)      mmx_r2r (psubusw, regs, regd)
+
+#define         punpckhbw_m2r(var,reg)      mmx_m2r (punpckhbw, var, reg)
+#define         punpckhbw_r2r(regs,regd)    mmx_r2r (punpckhbw, regs, regd)
+#define         punpckhdq_m2r(var,reg)      mmx_m2r (punpckhdq, var, reg)
+#define         punpckhdq_r2r(regs,regd)    mmx_r2r (punpckhdq, regs, regd)
+#define         punpckhwd_m2r(var,reg)      mmx_m2r (punpckhwd, var, reg)
+#define         punpckhwd_r2r(regs,regd)    mmx_r2r (punpckhwd, regs, regd)
+
+#define         punpcklbw_m2r(var,reg)      mmx_m2r (punpcklbw, var, reg)
+#define         punpcklbw_r2r(regs,regd)    mmx_r2r (punpcklbw, regs, regd)
+#define         punpckldq_m2r(var,reg)      mmx_m2r (punpckldq, var, reg)
+#define         punpckldq_r2r(regs,regd)    mmx_r2r (punpckldq, regs, regd)
+#define         punpcklwd_m2r(var,reg)      mmx_m2r (punpcklwd, var, reg)
+#define         punpcklwd_r2r(regs,regd)    mmx_r2r (punpcklwd, regs, regd)
+
+#define         pxor_m2r(var,reg)           mmx_m2r (pxor, var, reg)
+#define         pxor_r2r(regs,regd)         mmx_r2r (pxor, regs, regd)
+
+
+/* 3DNOW extensions */
+
+#define         pavgusb_m2r(var,reg)        mmx_m2r (pavgusb, var, reg)
+#define         pavgusb_r2r(regs,regd)      mmx_r2r (pavgusb, regs, regd)
+
+
+/* AMD MMX extensions - also available in intel SSE */
+
+
+#define         mmx_m2ri(op,mem,reg,imm) \
+        __asm__ __volatile__ (#op " %1, %0, %%" #reg \
+                              : /* nothing */ \
+                              : "m" (mem), "i" (imm))
+#define         mmx_r2ri(op,regs,regd,imm) \
+        __asm__ __volatile__ (#op " %0, %%" #regs ", %%" #regd \
+                              : /* nothing */ \
+                              : "i" (imm) )
+
+#define         mmx_fetch(mem,hint) \
+        __asm__ __volatile__ ("prefetch" #hint " %0" \
+                              : /* nothing */ \
+                              : "m" (mem))
+
+
+#define         maskmovq(regs,maskreg)      mmx_r2ri (maskmovq, regs, maskreg)
+
+#define         movntq_r2m(mmreg,var)       mmx_r2m (movntq, mmreg, var)
+
+#define         pavgb_m2r(var,reg)          mmx_m2r (pavgb, var, reg)
+#define         pavgb_r2r(regs,regd)        mmx_r2r (pavgb, regs, regd)
+#define         pavgw_m2r(var,reg)          mmx_m2r (pavgw, var, reg)
+#define         pavgw_r2r(regs,regd)        mmx_r2r (pavgw, regs, regd)
+
+#define         pextrw_r2r(mmreg,reg,imm)   mmx_r2ri (pextrw, mmreg, reg, imm)
+
+#define         pinsrw_r2r(reg,mmreg,imm)   mmx_r2ri (pinsrw, reg, mmreg, imm)
+
+#define         pmaxsw_m2r(var,reg)         mmx_m2r (pmaxsw, var, reg)
+#define         pmaxsw_r2r(regs,regd)       mmx_r2r (pmaxsw, regs, regd)
+
+#define         pmaxub_m2r(var,reg)         mmx_m2r (pmaxub, var, reg)
+#define         pmaxub_r2r(regs,regd)       mmx_r2r (pmaxub, regs, regd)
+
+#define         pminsw_m2r(var,reg)         mmx_m2r (pminsw, var, reg)
+#define         pminsw_r2r(regs,regd)       mmx_r2r (pminsw, regs, regd)
+
+#define         pminub_m2r(var,reg)         mmx_m2r (pminub, var, reg)
+#define         pminub_r2r(regs,regd)       mmx_r2r (pminub, regs, regd)
+
+#define         pmovmskb(mmreg,reg) \
+        __asm__ __volatile__ ("movmskps %" #mmreg ", %" #reg)
+
+#define         pmulhuw_m2r(var,reg)        mmx_m2r (pmulhuw, var, reg)
+#define         pmulhuw_r2r(regs,regd)      mmx_r2r (pmulhuw, regs, regd)
+
+#define         prefetcht0(mem)             mmx_fetch (mem, t0)
+#define         prefetcht1(mem)             mmx_fetch (mem, t1)
+#define         prefetcht2(mem)             mmx_fetch (mem, t2)
+#define         prefetchnta(mem)            mmx_fetch (mem, nta)
+
+#define         psadbw_m2r(var,reg)         mmx_m2r (psadbw, var, reg)
+#define         psadbw_r2r(regs,regd)       mmx_r2r (psadbw, regs, regd)
+
+#define         pshufw_m2r(var,reg,imm)     mmx_m2ri(pshufw, var, reg, imm)
+#define         pshufw_r2r(regs,regd,imm)   mmx_r2ri(pshufw, regs, regd, imm)
+
+#define         sfence() __asm__ __volatile__ ("sfence\n\t")
+
+/* SSE2 */
+#define         pshufhw_m2r(var,reg,imm)    mmx_m2ri(pshufhw, var, reg, imm)
+#define         pshufhw_r2r(regs,regd,imm)  mmx_r2ri(pshufhw, regs, regd, imm)
+#define         pshuflw_m2r(var,reg,imm)    mmx_m2ri(pshuflw, var, reg, imm)
+#define         pshuflw_r2r(regs,regd,imm)  mmx_r2ri(pshuflw, regs, regd, imm)
+
+#define         pshufd_r2r(regs,regd,imm)   mmx_r2ri(pshufd, regs, regd, imm)
+
+#define         movdqa_m2r(var,reg)         mmx_m2r (movdqa, var, reg)
+#define         movdqa_r2m(reg,var)         mmx_r2m (movdqa, reg, var)
+#define         movdqa_r2r(regs,regd)       mmx_r2r (movdqa, regs, regd)
+#define         movdqu_m2r(var,reg)         mmx_m2r (movdqu, var, reg)
+#define         movdqu_r2m(reg,var)         mmx_r2m (movdqu, reg, var)
+#define         movdqu_r2r(regs,regd)       mmx_r2r (movdqu, regs, regd)
+
+#define         pmullw_r2m(reg,var)         mmx_r2m (pmullw, reg, var)
+
+#define         pslldq_i2r(imm,reg)         mmx_i2r (pslldq, imm, reg)
+#define         psrldq_i2r(imm,reg)         mmx_i2r (psrldq, imm, reg)
+
+#define         punpcklqdq_r2r(regs,regd)   mmx_r2r (punpcklqdq, regs, regd)
+#define         punpckhqdq_r2r(regs,regd)   mmx_r2r (punpckhqdq, regs, regd)
+
+
+#endif /* AVCODEC_I386MMX_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/modem_connect_tones.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,156 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * modem_connect_tones.c - Generation and detection of tones
+ * associated with modems calling and answering calls.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: modem_connect_tones.h,v 1.4 2006/10/24 13:45:28 steveu Exp $
+ */
+ 
+/*! \file */
+
+#if !defined(_MODEM_CONNECT_TONES_H_)
+#define _MODEM_CONNECT_TONES_H_
+
+/*! \page modem_connect_tones_page Echo cancellor disable tone detection
+
+\section modem_connect_tones_page_sec_1 What does it do?
+Some telephony terminal equipment, such as modems, require a channel which is as
+clear as possible. They use their own echo cancellation. If the network is also
+performing echo cancellation the two cancellors can end of squabbling about the
+nature of the channel, with bad results. A special tone is defined which should
+cause the network to disable any echo cancellation processes. 
+
+\section modem_connect_tones_page_sec_2 How does it work?
+A sharp notch filter is implemented as a single bi-quad section. The presence of
+the 2100Hz disable tone is detected by comparing the notched filtered energy
+with the unfiltered energy. If the notch filtered energy is much lower than the
+unfiltered energy, then a large proportion of the energy must be at the notch
+frequency. This type of detector may seem less intuitive than using a narrow
+bandpass filter to isolate the energy at the notch freqency. However, a sharp
+bandpass implemented as an IIR filter rings badly, The reciprocal notch filter
+is very well behaved. 
+*/
+
+enum
+{
+    MODEM_CONNECT_TONES_FAX_CNG,
+    MODEM_CONNECT_TONES_FAX_CED,
+    MODEM_CONNECT_TONES_EC_DISABLE,
+    /*! \brief The version of EC disable with some 15Hz AM content, as in V.8 */
+    MODEM_CONNECT_TONES_EC_DISABLE_MOD,
+};
+
+/*!
+    Modem connect tones generator descriptor. This defines the state
+    of a single working instance of the tone generator.
+*/
+typedef struct
+{
+    int tone_type;
+    
+    tone_gen_state_t tone_tx;
+    uint32_t tone_phase;
+    int32_t tone_phase_rate;
+    int level;
+    /*! \brief Countdown to the next phase hop */
+    int hop_timer;
+    uint32_t mod_phase;
+    int32_t mod_phase_rate;
+    int mod_level;
+} modem_connect_tones_tx_state_t;
+
+/*!
+    Modem connect tones receiver descriptor. This defines the state
+    of a single working instance of the tone detector.
+*/
+typedef struct
+{
+    int tone_type;
+    tone_report_func_t tone_callback;
+    void *callback_data;
+
+    float z1;
+    float z2;
+    int notch_level;
+    int channel_level;
+    int tone_present;
+    int tone_cycle_duration;
+    int good_cycles;
+    int hit;
+} modem_connect_tones_rx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Initialse an instance of the echo canceller disable tone generator.
+    \param s The context.
+*/
+modem_connect_tones_tx_state_t *modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
+                                                            int tone_type);
+
+/*! \brief Generate a block of echo canceller disable tone samples.
+    \param s The context.
+    \param amp An array of signal samples.
+    \param len The number of samples to generate.
+    \return The number of samples generated.
+*/
+int modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
+                           int16_t amp[],
+                           int len);
+
+/*! \brief Process a block of samples through an instance of the modem_connect
+           tones detector.
+    \param s The context.
+    \param amp An array of signal samples.
+    \param len The number of samples in the array.
+    \return The number of unprocessed samples.
+*/
+int modem_connect_tones_rx(modem_connect_tones_rx_state_t *s,
+                           const int16_t amp[],
+                           int len);
+                             
+/*! \brief Test if a modem_connect tone has been detected.
+    \param s The context.
+    \return TRUE if tone is detected, else FALSE.
+*/
+int modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s);
+
+/*! \brief Initialise an instance of the modem_connect tones detector.
+    \param s The context.
+    \param tone_type The type of connect tone being tested for.
+    \param tone_callback An optional callback routine, used to report tones
+    \param user_data An opaque pointer passed to the callback routine,
+    \return A pointer to the context.
+*/
+modem_connect_tones_rx_state_t *modem_connect_tones_rx_init(modem_connect_tones_rx_state_t *s,
+                                                            int tone_type,
+                                                            tone_report_func_t tone_callback,
+                                                            void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/modem_echo.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,135 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * modem_echo.h - An echo cancellor, suitable for electrical echos in GSTN modems
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001, 2004 Steve Underwood
+ *
+ * Based on a bit from here, a bit from there, eye of toad,
+ * ear of bat, etc - plus, of course, my own 2 cents.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: modem_echo.h,v 1.7 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_MODEM_ECHO_H_)
+#define _MODEM_ECHO_H_
+
+/*! \page modem_echo_can_page Line echo cancellation for modems
+
+\section modem_echo_can_page_sec_1 What does it do?
+This module aims to cancel electrical echoes (e.g. from 2-4 wire hybrids)
+in modem applications. It is not very suitable for speech applications, which
+require additional refinements for satisfactory performance. It is, however, more
+efficient and better suited to modem applications. 
+
+\section modem_echo_can_page_sec_2 How does it work?
+The heart of the echo cancellor is an adaptive FIR filter. This is adapted to
+match the impulse response of the environment being cancelled. It must be long
+enough to adequately cover the duration of that impulse response. The signal
+being transmitted into the environment being cancelled is passed through the
+FIR filter. The resulting output is an estimate of the echo signal. This is
+then subtracted from the received signal, and the result should be an estimate
+of the signal which originates within the environment being cancelled (people
+talking in the room, or the signal from the far end of a telephone line) free
+from the echos of our own transmitted signal. 
+
+The FIR filter is adapted using the least mean squares (LMS) algorithm. This
+algorithm is attributed to Widrow and Hoff, and was introduced in 1960. It is
+the commonest form of filter adaption used in things like modem line equalisers
+and line echo cancellers. It works very well if the signal level is constant,
+which is true for a modem signal. To ensure good performa certain conditions must
+be met: 
+
+    - The transmitted signal has weak self-correlation.
+    - There is no signal being generated within the environment being cancelled.
+
+The difficulty is that neither of these can be guaranteed. If the adaption is
+performed while transmitting noise (or something fairly noise like, such as
+voice) the adaption works very well. If the adaption is performed while
+transmitting something highly correlative (e.g. tones, like DTMF), the adaption
+can go seriously wrong. The reason is there is only one solution for the
+adaption on a near random signal. For a repetitive signal, there are a number of
+solutions which converge the adaption, and nothing guides the adaption to choose
+the correct one. 
+
+\section modem_echo_can_page_sec_3 How do I use it?
+The echo cancellor processes both the transmit and receive streams sample by
+sample. The processing function is not declared inline. Unfortunately,
+cancellation requires many operations per sample, so the call overhead is only a
+minor burden. 
+*/
+
+#include "fir.h"
+
+/*!
+    Modem line echo canceller descriptor. This defines the working state for a line
+    echo canceller.
+*/
+typedef struct
+{
+    int adapt;
+    int taps;
+
+    fir16_state_t fir_state;
+    /*! Echo FIR taps (16 bit version) */
+    int16_t *fir_taps16;
+    /*! Echo FIR taps (32 bit version) */
+    int32_t *fir_taps32;
+
+    int tx_power;
+    int rx_power;
+
+    int curr_pos;
+} modem_echo_can_state_t;
+
+/*! Create a modem echo canceller context.
+    \param len The length of the canceller, in samples.
+    eturn The new canceller context, or NULL if the canceller could not be created.
+*/
+modem_echo_can_state_t *modem_echo_can_create(int len);
+
+/*! Free a modem echo canceller context.
+    \param ec The echo canceller context.
+*/
+void modem_echo_can_free(modem_echo_can_state_t *ec);
+
+/*! Flush (reinitialise) a modem echo canceller context.
+    \param ec The echo canceller context.
+*/
+void modem_echo_can_flush(modem_echo_can_state_t *ec);
+
+/*! Set the adaption mode of a modem echo canceller context.
+    \param ec The echo canceller context.
+    \param adapt The mode.
+*/
+void modem_echo_can_adaption_mode(modem_echo_can_state_t *ec, int adapt);
+
+/*! Process a sample through a modem echo canceller.
+    \param ec The echo canceller context.
+    \param tx The transmitted audio sample.
+    \param rx The received audio sample.
+    eturn The clean (echo cancelled) received sample.
+*/
+int16_t modem_echo_can_update(modem_echo_can_state_t *ec, int16_t tx, int16_t rx);
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/noise.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,133 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * noise.h - A low complexity audio noise generator, suitable for
+ *           real time generation (current just approx AWGN)
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: noise.h,v 1.8 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_NOISE_H_)
+#define _NOISE_H_
+
+/*! \page noise_page Noise generation
+
+\section noise_page_sec_1 What does it do?
+It generates audio noise. Currently it only generates reasonable quality
+AWGN. It is designed to be of sufficiently low complexity to generate large
+volumes of reasonable quality noise, in real time.
+
+Hoth noise is used to model indoor ambient noise when evaluating communications
+systems such as telephones. It is named after D.F. Hoth, who made the first 
+systematic study of this. The official definition of Hoth noise is IEEE
+standard 269-2001 (revised from 269-1992), "Draft Standard Methods for Measuring
+Transmission Performance of Analog and Digital Telephone Sets, Handsets and Headsets."
+
+The table below gives the spectral density of Hoth noise, adjusted in level to produce
+a reading of 50 dBA.
+
+Freq (Hz)  Spectral     Bandwidth       Total power in
+           density      10 log_f        each 1/3 octave band
+           (dB SPL/Hz)  (dB)            (dB SPL)
+ 100        32.4        13.5            45.9
+ 125        30.9        14.7            45.5
+ 160        29.1        15.7            44.9
+ 200        27.6        16.5            44.1
+ 250        26.0        17.6            43.6
+ 315        24.4        18.7            43.1
+ 400        22.7        19.7            42.3
+ 500        21.1        20.6            41.7
+ 630        19.5        21.7            41.2
+ 800        17.8        22.7            40.4
+1000        16.2        23.5            39.7
+1250        14.6        24.7            39.3
+1600        12.9        25.7            38.7
+2000        11.3        26.5            37.8
+2500         9.6        27.6            37.2
+3150         7.8        28.7            36.5
+4000         5.4        29.7            34.8
+5000         2.6        30.6            33.2
+6300        -1.3        31.7            30.4
+8000        -6.6        32.7            26.0
+
+The tolerance for each 1/3rd octave band is ¡Ó3dB.
+
+\section awgn_page_sec_2 How does it work?
+The central limit theorem says if you add a few random numbers together,
+the result starts to look Gaussian. In this case we sum 8 random numbers.
+The result is fast, and perfectly good as a noise source for many purposes.
+It should not be trusted as a high quality AWGN generator, for elaborate
+modelling purposes.
+*/
+
+enum
+{
+    NOISE_CLASS_AWGN = 1,
+    NOISE_CLASS_HOTH
+};
+
+/*!
+    Noise generator descriptor. This contains all the state information for an instance
+    of the noise generator.
+ */
+typedef struct
+{
+    int class_of_noise;
+    int quality;
+    int32_t rms;
+    uint32_t rndnum;
+    int32_t state;
+} noise_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise an audio noise generator.
+    \brief Initialise an audio noise generator.
+    \param s The noise generator context.
+    \param seed A seed for the underlying random number generator.
+    \param level The noise power level in dBmO.
+    \param class_of_noise The class of noise (e.g. AWGN).
+    \param quality A parameter which permits speed and accuracy of the noise
+           generation to be adjusted.
+    \return A pointer to the noise generator context.
+*/
+noise_state_t *noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
+
+noise_state_t *noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
+
+/*! Generate a sample of audio noise.
+    \brief Generate a sample of audio noise.
+    \param s The noise generator context.
+    \return The generated sample.
+*/
+int16_t noise(noise_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/oki_adpcm.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,110 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * oki_adpcm.h - Conversion routines between linear 16 bit PCM data and
+ *		         OKI (Dialogic) ADPCM format.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * Based on a bit from here, a bit from there, eye of toad,
+ * ear of bat, etc - plus, of course, my own 2 cents.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: oki_adpcm.h,v 1.13 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_OKI_ADPCM_H_)
+#define _OKI_ADPCM_H_
+
+/*! \page okiadpcm_page OKI (Dialogic) ADPCM encoding and decoding
+\section okiadpcm_page_sec_1 What does it do?
+OKI ADPCM is widely used in the CTI industry because it is the principal format
+supported by Dialogic. As the market leader, they tend to define "common
+practice". It offers a good balance of simplicity and quality at rates of
+24kbps or 32kbps. 32kbps is obtained by ADPCM compressing 8k samples/second linear
+PCM. 24kbps is obtained by resampling to 6k samples/second and using the same ADPCM
+compression algorithm on the slower samples.
+
+The algorithms for this ADPCM codec can be found in "PC Telephony - The complete guide
+to designing, building and programming systems using Dialogic and Related Hardware"
+by Bob Edgar. pg 272-276. */
+
+/*!
+    Oki (Dialogic) ADPCM conversion state descriptor. This defines the state of
+    a single working instance of the Oki ADPCM converter. This is used for
+    either linear to ADPCM or ADPCM to linear conversion.
+*/
+typedef struct
+{
+    int bit_rate;
+    int16_t last;
+    int16_t step_index;
+    uint8_t oki_byte;
+    int16_t history[32];
+    int ptr;
+    int mark;
+    int phase;
+} oki_adpcm_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise an Oki ADPCM encode or decode context.
+    \param s The Oki ADPCM context.
+    \param bit_rate The required bit rate for the ADPCM data.
+           The valid rates are 24000 and 32000.
+    \return A pointer to the Oki ADPCM context, or NULL for error. */
+oki_adpcm_state_t *oki_adpcm_init(oki_adpcm_state_t *s, int bit_rate);
+
+/*! Free an Oki ADPCM encode or decode context.
+    \param s The Oki ADPCM context.
+    \return 0 for OK. */
+int oki_adpcm_release(oki_adpcm_state_t *s);
+
+/*! Decode a buffer of Oki ADPCM data to linear PCM.
+    \param s The Oki ADPCM context.
+    \param amp The audio sample buffer.
+    \param oki_data
+    \param oki_bytes
+    \return The number of samples returned. */
+int oki_adpcm_decode(oki_adpcm_state_t *s,
+                     int16_t amp[],
+                     const uint8_t oki_data[],
+                     int oki_bytes);
+
+/*! Encode a buffer of linear PCM data to Oki ADPCM.
+    \param s The Oki ADPCM context.
+    \param oki_data The Oki ADPCM data produced
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of bytes of Oki ADPCM data produced. */
+int oki_adpcm_encode(oki_adpcm_state_t *s,
+                     uint8_t oki_data[],
+                     const int16_t amp[],
+                     int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/playout.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,209 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * playout.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: playout.h,v 1.6 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_PLAYOUT_H_)
+#define _PLAYOUT_H_
+
+/*! \page playout_page Play-out (jitter buffering)
+\section playout_page_sec_1 What does it do?
+The play-out module provides a static or dynamic length buffer for received frames of
+audio or video data. It's goal is to maximise the receiver's tolerance of jitter in the
+timing of the received frames.
+
+Dynamic buffers are generally good for speech, since they adapt to provide the smallest delay
+consistent with a low rate of packets arriving too late to be used. For things like FoIP and
+MoIP, a static length of buffer is normally necessary. Any attempt to elastically change the
+buffer length would wreck a modem's data flow.
+*/
+
+/* Return codes */
+enum
+{
+    PLAYOUT_OK = 0,
+    PLAYOUT_ERROR,
+    PLAYOUT_EMPTY,
+    PLAYOUT_NOFRAME,
+    PLAYOUT_FILLIN,
+    PLAYOUT_DROP
+};
+
+/* Frame types */
+#define PLAYOUT_TYPE_CONTROL    0
+#define PLAYOUT_TYPE_SILENCE	1
+#define PLAYOUT_TYPE_SPEECH     2
+
+typedef int timestamp_t;
+
+typedef struct playout_frame_s
+{
+    /*! The actual frame data */
+    void *data;
+    /*! The type of frame */
+    int type;
+    /*! The timestamp assigned by the sending end */
+    timestamp_t sender_stamp;
+    /*! The timespan covered by the data in this frame */
+    timestamp_t sender_len;
+    /*! The timestamp assigned by the receiving end */
+    timestamp_t receiver_stamp;
+    /*! Pointer to the next earlier frame */
+    struct playout_frame_s *earlier;
+    /*! Pointer to the next later frame */
+    struct playout_frame_s *later;
+} playout_frame_t;
+
+/*!
+    Playout (jitter buffer) descriptor. This defines the working state
+    for a single instance of playout buffering.
+*/
+typedef struct
+{
+    /*! TRUE if the buffer is dynamically sized */
+    int dynamic;
+    /*! The minimum length (dynamic) or fixed length (static) of the buffer */
+    int min_length;
+    /*! The maximum length (dynamic) or fixed length (static) of the buffer */
+    int max_length;
+    /*! The target filter threshold for adjusting dynamic buffering. */
+    int dropable_threshold;
+
+    int start;
+
+    /*! The queued frame list */
+    playout_frame_t *first_frame;
+    playout_frame_t *last_frame;
+    /*! The free frame pool */
+    playout_frame_t *free_frames;
+
+    /*! The total frames input to the buffer, to date. */
+    int frames_in;
+    /*! The total frames output from the buffer, to date. */
+    int frames_out;
+    /*! The number of frames received out of sequence. */
+    int frames_oos;
+    /*! The number of frames which were discarded, due to late arrival. */
+    int frames_late;
+    /*! The number of frames which were never received. */
+    int frames_missing;
+    /*! The number of frames trimmed from the stream, due to buffer shrinkage. */
+    int frames_trimmed;
+
+    timestamp_t latest_expected;
+    /*! The present jitter adjustment */
+    timestamp_t current;
+    /*! The sender_stamp of the last speech frame */
+    timestamp_t last_speech_sender_stamp;
+    /*! The duration of the last speech frame */
+    timestamp_t last_speech_sender_len;
+
+    int not_first;
+    /*! The time since the target buffer length was last changed. */
+    timestamp_t since_last_step;
+    /*! Filter state for tracking the packets arriving just in time */
+    int32_t state_just_in_time;
+    /*! Filter state for tracking the packets arriving late */
+    int32_t state_late;
+    /*! The current target length of the buffer */
+    int target_buffer_length;
+    /*! The current actual length of the buffer, which may lag behind the target value */
+    int actual_buffer_length;
+} playout_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Queue a frame
+    \param s The play-out context.
+    \param data The frame data.
+    \param sender_len Length of frame (for voice) in timestamp units.
+    \param sender_stamp Sending end's time stamp.
+    \param receiver_stamp Local time at which packet was received, in timestamp units.
+    \return One of
+        PLAYOUT_OK:  Frame queued OK.
+        PLAYOUT_ERROR: Some problem occured - e.g. out of memory. */
+int playout_put(playout_state_t *s, void *data, int type, timestamp_t sender_len, timestamp_t sender_stamp, timestamp_t receiver_stamp);
+
+/*! Get the next frame.
+    \param s The play-out context.
+    \param frame The frame.
+    \param sender_stamp The sender's timestamp.
+    \return One of
+        PLAYOUT_OK:  Suitable frame found.
+        PLAYOUT_DROP: A frame which should be dropped was found (e.g. it arrived too late).
+                      The caller should request the same time again when this occurs.
+        PLAYOUT_NOFRAME: There's no frame scheduled for this time.
+        PLAYOUT_FILLIN: Synthetic signal must be generated, as no real data is available for
+                        this time (either we need to grow, or there was a lost frame).
+        PLAYOUT_EMPTY: The buffer is empty.
+ */
+int	playout_get(playout_state_t *s, playout_frame_t *frame, timestamp_t sender_stamp);
+
+/*! Unconditionally get the first buffered frame. This may be used to clear out the queue, and free
+    all its contents, before the context is freed.
+    \param s The play-out context.
+    \return The frame, or NULL is the queue is empty. */
+playout_frame_t *playout_get_unconditional(playout_state_t *s);
+
+/*! Find the current length of the buffer.
+    \param s The play-out context.
+    \return The length of the buffer. */
+timestamp_t playout_current_length(playout_state_t *s);
+
+/*! Find the time at which the next queued frame is due to play.
+    Note: This value may change backwards as freshly received out of order frames are
+          added to the buffer.
+    \param s The play-out context.
+    \return The next timestamp. */
+timestamp_t playout_next_due(playout_state_t *s);
+
+/*! Create a new instance of play-out buffering.
+    \param min_length Minimum length of the buffer, in samples.
+    \param max_length Maximum length of the buffer, in samples. If this equals min_length, static
+           length buffering is used.
+    \return The new context */
+playout_state_t *playout_new(int min_length, int max_length);
+
+/*! Destroy an instance of play-out buffering.
+    \param s The play-out context to be destroyed */
+void playout_free(playout_state_t *s);
+
+/*! Reset an instance of play-out buffering.
+    NOTE:  The buffer should be empty before you call this function, otherwise
+           you will leak queued frames, and some internal structures
+    \param s The play-out context.
+    \param min_length Minimum length of the buffer, in samples.
+    \param max_length Maximum length of the buffer, in samples. If this equals min_length, static
+           length buffering is used. */
+void playout_restart(playout_state_t *s, int min_length, int max_length);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/plc.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,167 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * plc.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: plc.h,v 1.12 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_PLC_H_)
+#define _PLC_H_
+
+/*! \page plc_page Packet loss concealment
+\section plc_page_sec_1 What does it do?
+The packet loss concealment module provides a synthetic fill-in signal, to minimise
+the audible effect of lost packets in VoIP applications. It is not tied to any
+particular codec, and could be used with almost any codec which does not
+specify its own procedure for packet loss concealment.
+
+Where a codec specific concealment procedure exists, that algorithm is usually built
+around knowledge of the characteristics of the particular codec. It will, therefore,
+generally give better results for that particular codec than this generic concealer will.
+
+The PLC code implements an algorithm similar to the one described in Appendix 1 of G.711.
+However, the G.711 algorithm is optimised for 10ms packets. Few people use such small
+packets. 20ms is a much more common value, and longer packets are also quite common. The
+algorithm has been adjusted with this in mind. Also, the G.711 approach causes an
+algorithmic delay, and requires significant buffer manipulation when there is no packet
+loss. The algorithm used here avoids this. It causes no delay, and achieves comparable
+quality with normal speech.
+
+Note that both this algorithm, and the one in G.711 are optimised for speech. For most kinds
+of music a much slower decay on bursts of lost packets give better results.
+
+\section plc_page_sec_2 How does it work?
+While good packets are being received, the plc_rx() routine keeps a record of the trailing
+section of the known speech signal. If a packet is missed, plc_fillin() is called to produce
+a synthetic replacement for the real speech signal. The average mean difference function
+(AMDF) is applied to the last known good signal, to determine its effective pitch.
+Based on this, the last pitch period of signal is saved. Essentially, this cycle of speech
+will be repeated over and over until the real speech resumes. However, several refinements
+are needed to obtain smooth pleasant sounding results.
+
+- The two ends of the stored cycle of speech will not always fit together smoothly. This can
+  cause roughness, or even clicks, at the joins between cycles. To soften this, the
+  1/4 pitch period of real speech preceeding the cycle to be repeated is blended with the last
+  1/4 pitch period of the cycle to be repeated, using an overlap-add (OLA) technique (i.e.
+  in total, the last 5/4 pitch periods of real speech are used).
+
+- The start of the synthetic speech will not always fit together smoothly with the tail of
+  real speech passed on before the erasure was identified. Ideally, we would like to modify
+  the last 1/4 pitch period of the real speech, to blend it into the synthetic speech. However,
+  it is too late for that. We could have delayed the real speech a little, but that would
+  require more buffer manipulation, and hurt the efficiency of the no-lost-packets case
+  (which we hope is the dominant case). Instead we use a degenerate form of OLA to modify
+  the start of the synthetic data. The last 1/4 pitch period of real speech is time reversed,
+  and OLA is used to blend it with the first 1/4 pitch period of synthetic speech. The result
+  seems quite acceptable.
+
+- As we progress into the erasure, the chances of the synthetic signal being anything like
+  correct steadily fall. Therefore, the volume of the synthesized signal is made to decay
+  linearly, such that after 50ms of missing audio it is reduced to silence.
+
+- When real speech resumes, an extra 1/4 pitch period of synthetic speech is blended with the
+  start of the real speech. If the erasure is small, this smoothes the transition. If the erasure
+  is long, and the synthetic signal has faded to zero, the blending softens the start up of the
+  real signal, avoiding a kind of "click" or "pop" effect that might occur with a sudden onset.
+
+\section plc_page_sec_3 How do I use it?
+Before audio is processed, call plc_init() to create an instance of the packet loss
+concealer. For each received audio packet that is acceptable (i.e. not including those being
+dropped for being too late) call plc_rx() to record the content of the packet. Note this may
+modify the packet a little after a period of packet loss, to blend real synthetic data smoothly.
+When a real packet is not available in time, call plc_fillin() to create a sythetic substitute.
+That's it!
+*/
+
+/*! Minimum allowed pitch (66 Hz) */
+#define PLC_PITCH_MIN           120
+/*! Maximum allowed pitch (200 Hz) */
+#define PLC_PITCH_MAX           40
+/*! Maximum pitch OLA window */
+#define PLC_PITCH_OVERLAP_MAX   (PLC_PITCH_MIN >> 2)
+/*! The length over which the AMDF function looks for similarity (20 ms) */
+#define CORRELATION_SPAN        160
+/*! History buffer length. The buffer much also be at leat 1.25 times
+    PLC_PITCH_MIN, but that is much smaller than the buffer needs to be for
+    the pitch assessment. */
+#define PLC_HISTORY_LEN         (CORRELATION_SPAN + PLC_PITCH_MIN)
+
+/*!
+    The generic packet loss concealer context.
+*/
+typedef struct
+{
+    /*! Consecutive erased samples */
+    int missing_samples;
+    /*! Current offset into pitch period */
+    int pitch_offset;
+    /*! Pitch estimate */
+    int pitch;
+    /*! Buffer for a cycle of speech */
+    float pitchbuf[PLC_PITCH_MIN];
+    /*! History buffer */
+    int16_t history[PLC_HISTORY_LEN];
+    /*! Current pointer into the history buffer */
+    int buf_ptr;
+} plc_state_t;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Process a block of received audio samples for PLC.
+    \brief Process a block of received audio samples for PLC.
+    \param s The packet loss concealer context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples in the buffer. */
+int plc_rx(plc_state_t *s, int16_t amp[], int len);
+
+/*! Fill-in a block of missing audio samples.
+    \brief Fill-in a block of missing audio samples.
+    \param s The packet loss concealer context.
+    \param amp The audio sample buffer.
+    \param len The number of samples to be synthesised.
+    \return The number of samples synthesized. */
+int plc_fillin(plc_state_t *s, int16_t amp[], int len);
+
+/*! Initialise a packet loss concealer context.
+    \brief Initialise a PLC context.
+    \param s The packet loss concealer context.
+    \return A pointer to the the packet loss concealer context. */
+plc_state_t *plc_init(plc_state_t *s);
+
+/*! Free a packet loss concealer context.
+    \param s The packet loss concealer context.
+    \return 0 for OK. */
+int plc_release(plc_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/power_meter.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,111 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * power_meter.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: power_meter.h,v 1.8 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_POWER_METER_H_)
+#define _POWER_METER_H_
+
+/*! \page power_meter_page Power metering
+
+\section power_meter_page_sec_1 What does it do?
+The power metering module implements a simple IIR type running power meter. The damping
+factor of the IIR is selectable when the meter instance is created.
+
+Note that the definition of dBOv is quite vague in most places - is it peak since wave,
+peak square wave, etc.? This code is based on the well defined wording in RFC3389:
+
+"For example, in the case of a u-law system, the reference would be a square wave with
+values +/-8031, and this square wave represents 0dBov.  This translates into 6.18dBm0".
+
+\section power_meter_page_sec_2 How does it work?
+*/
+
+/*!
+    Power meter descriptor. This defines the working state for a
+    single instance of a power measurement device.
+*/
+typedef struct
+{
+    int shift;
+
+    int32_t reading;
+} power_meter_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a power meter context.
+    \brief Initialise a power meter context.
+    \param s The power meter context.
+    \param shift The shift to be used by the IIR filter.
+    \return The power meter context. */
+power_meter_t *power_meter_init(power_meter_t *s, int shift);
+
+/*! Change the damping factor of a power meter context.
+    \brief Change the damping factor of a power meter context.
+    \param s The power meter context.
+    \param shift The new shift to be used by the IIR filter.
+    \return The power meter context. */
+power_meter_t *power_meter_damping(power_meter_t *s, int shift);
+
+/*! Update a power meter.
+    \brief Update a power meter.
+    \param s The power meter context.
+    \param amp The amplitude of the new audio sample.
+    \return The current power meter reading. */
+int32_t power_meter_update(power_meter_t *s, int16_t amp);
+
+/*! Get the current power meter reading, in dBm0.
+    \brief Get the current power meter reading, in dBm0.
+    \param s The power meter context.
+    \return The current power meter reading, in dBm0. */
+float power_meter_dbm0(power_meter_t *s);
+
+/*! Get the current power meter reading, in dBOv.
+    \brief Get the current power meter reading, in dBOv.
+    \param s The power meter context.
+    \return The current power meter reading, in dBOv. */
+float power_meter_dbov(power_meter_t *s);
+
+/*! Get the power meter reading which represents a specified power level in dBm0.
+    \brief Get the current power meter reading, in dBm0.
+    \param level A power level, in dB0m.
+    \return The equivalent power meter reading. */
+int32_t power_meter_level_dbm0(float level);
+
+/*! Get the power meter reading which represents a specified power level in dBOv.
+    \brief Get the current power meter reading, in dBOv.
+    \param level A power level, in dBOv.
+    \return The equivalent power meter reading. */
+int32_t power_meter_level_dbov(float level);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/queue.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,151 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * queue.h - simple in process message queuing
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: queue.h,v 1.4 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page queue_page Queuing
+\section queue_page_sec_1 What does it do?
+???.
+
+\section queue_page_sec_2 How does it work?
+???.
+*/
+
+#if !defined(_QUEUE_H_)
+#define _QUEUE_H_
+
+#define QUEUE_READ_ATOMIC   0x0001
+#define QUEUE_WRITE_ATOMIC  0x0002
+
+typedef struct
+{
+    int len;
+    int iptr;
+    int optr;
+    int flags;
+    uint8_t *data;
+} queue_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Check if a queue is empty.
+    \brief Check if a queue is empty.
+    \param p The queue context.
+    \return TRUE if empty, else FALSE. */
+int queue_empty(queue_t *p);
+
+/*! Check the available free space in a queue's buffer.
+    \brief Check available free space.
+    \param p The queue context.
+    \return The number of bytes of free space. */
+int queue_free_space(queue_t *p);
+
+/*! Check the contents of a queue.
+    \brief Check the contents of a queue.
+    \param p The queue context.
+    \return The number of bytes in the queue. */
+int queue_contents(queue_t *p);
+
+/*! Flush the contents of a queue.
+    \brief Flush the contents of a queue.
+    \param p The queue context. */
+void queue_flush(queue_t *p);
+
+/*! Copy bytes from a queue. This is similar to queue_read, but
+    the data remains in the queue.
+    \brief Copy bytes from a queue.
+    \param p The queue context.
+    \param buf The buffer into which the bytes will be read.
+    \param len The length of the buffer.
+    \return the number of bytes returned. */
+int queue_view(queue_t *p, uint8_t *buf, int len);
+
+/*! Read bytes from a queue.
+    \brief Read bytes from a queue.
+    \param p The queue context.
+    \param buf The buffer into which the bytes will be read.
+    \param len The length of the buffer.
+    \return the number of bytes returned. */
+int queue_read(queue_t *p, uint8_t *buf, int len);
+
+/*! Write bytes to a queue.
+    \brief Write bytes to a queue.
+    \param p The queue context.
+    \param buf The buffer containing the bytes to be written.
+    \param len The length of the buffer.
+    \return the number of bytes actually written. */
+int queue_write(queue_t *p, const uint8_t *buf, int len);
+
+/*! Test the length of the message at the head of a queue.
+    \brief Test message length.
+    \param p The queue context.
+    \return The length of the next message, in byte. If there are
+            no messages in the queue, -1 is returned. */
+int queue_test_msg(queue_t *p);
+
+/*! Read a message from a queue. If the message is longer than the buffer
+    provided, only the first len bytes of the message will be returned. The
+    remainder of the message will be discarded.
+    \brief Read a message from a queue.
+    \param p The queue context.
+    \param buf The buffer into which the message will be read.
+    \param len The length of the buffer.
+    \return The number of bytes returned. If there are
+            no messages in the queue, -1 is returned. */
+int queue_read_msg(queue_t *p, uint8_t *buf, int len);
+
+/*! Write a message to a queue.
+    \brief Write a message to a queue.
+    \param p The queue context.
+    \param buf The buffer from which the message will be written.
+    \param len The length of the message.
+    \return The number of bytes actually written. */
+int queue_write_msg(queue_t *p, const uint8_t *buf, int len);
+
+/*! Create a queue.
+    \brief Create a queue.
+    \param p The queue context.
+    \param len The length of the queue's buffer.
+    \param flags Flags controlling the operation of the queue.
+           Valid flags are QUEUE_READ_ATOMIC and QUEUE_WRITE_ATOMIC.
+    \return 0 if created OK, else -1. */
+int queue_create(queue_t *p, int len, int flags);
+
+/*! Delete a queue.
+    \brief Delete a queue.
+    \param p The queue context.
+    \return 0 if deleted OK, else -1. */
+int queue_delete(queue_t *p);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/schedule.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,79 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * schedule.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: schedule.h,v 1.8 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page schedule_page Scheduling
+\section schedule_page_sec_1 What does it do?
+???.
+
+\section schedule_page_sec_2 How does it work?
+???.
+*/
+
+#if !defined(_SCHEDULE_H_)
+#define _SCHEDULE_H_
+
+typedef struct span_sched_state_s span_sched_state_t;
+
+typedef void (*span_sched_callback_func_t)(span_sched_state_t *s, void *user_data);
+
+typedef struct
+{
+    uint64_t when;
+    span_sched_callback_func_t callback;
+    void *user_data;
+} span_sched_t;
+
+struct span_sched_state_s
+{
+    uint64_t ticker;
+    int allocated;
+    int max_to_date;
+    span_sched_t *sched;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint64_t span_schedule_next(span_sched_state_t *s);
+uint64_t span_schedule_time(span_sched_state_t *s);
+
+int span_schedule_event(span_sched_state_t *s, int ms, void (*function)(span_sched_state_t *s, void *data), void *user_data);
+void span_schedule_update(span_sched_state_t *s, int samples);
+void span_schedule_del(span_sched_state_t *s, int id);
+
+span_sched_state_t *span_schedule_init(span_sched_state_t *s);
+int span_schedule_release(span_sched_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/sig_tone.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,195 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * sig_tone.h - Signalling tone processing for the 2280Hz, 2600Hz and similar
+ *              signalling tone used in older protocols.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: sig_tone.h,v 1.7 2006/10/24 13:22:02 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page sig_tone_page The signaling tone processor
+\section sig_tone_sec_1 What does it do?
+The signaling tone processor handles the 2280Hz, 2400Hz and 2600Hz tones, used
+in many analogue signaling procotols, and digital ones derived from them.
+
+\section sig_tone_sec_2 How does it work?
+TBD
+*/
+
+#if !defined(_SIG_TONE_H_)
+#define _SIG_TONE_H_
+
+typedef int (*sig_tone_func_t)(void *user_data, int what);
+
+/* The optional tone sets */
+enum
+{
+    SIG_TONE_2280HZ = 1,
+    SIG_TONE_2600HZ,
+    SIG_TONE_2400HZ_2600HZ
+};
+
+#define SIG_TONE_1_PRESENT          0x001
+#define SIG_TONE_1_CHANGE           0x002
+#define SIG_TONE_2_PRESENT          0x004
+#define SIG_TONE_2_CHANGE           0x008
+#define SIG_TONE_TX_PASSTHROUGH     0x010
+#define SIG_TONE_RX_PASSTHROUGH     0x020
+#define SIG_TONE_UPDATE_REQUEST     0x100
+
+/*!
+    Signaling tone descriptor. This defines the working state for a
+    single instance of the transmit and receive sides of a signaling
+    tone processor.
+*/
+typedef struct
+{
+    /*! \brief The tones used. */
+    int tone_freq[2];
+    /*! \brief The high and low tone amplitudes. */
+    int tone_amp[2];
+
+    /*! \brief The delay, in audio samples, before the high level tone drops
+               to a low level tone. */
+    int high_low_timeout;
+
+    /*! \brief Some signaling tone detectors use a sharp initial filter,
+               changing to a broader band filter after some delay. This
+               parameter defines the delay. 0 means it never changes. */
+    int sharp_flat_timeout;
+
+    /*! \brief Parameters to control the behaviour of the notch filter, used
+               to remove the tone from the voice path in some protocols. */
+    int notch_lag_time;
+    int notch_allowed;
+
+    /*! \brief The tone on persistence check, in audio samples. */
+    int tone_on_check_time;
+    /*! \brief The tone off persistence check, in audio samples. */
+    int tone_off_check_time;
+
+    /*! \brief The coefficients for the cascaded bi-quads notch filter. */
+    int32_t notch_a1[3];
+    int32_t notch_b1[3];
+    int32_t notch_a2[3];
+    int32_t notch_b2[3];
+    int notch_postscale;
+
+    /*! \brief Flat mode bandpass bi-quad parameters */
+    int32_t broad_a[3];
+    int32_t broad_b[3];
+    int broad_postscale;
+
+    /*! \brief The coefficients for the post notch leaky integrator. */
+    int32_t notch_slugi;
+    int32_t notch_slugp;
+
+    /*! \brief The coefficients for the post modulus leaky integrator in the
+               unfiltered data path.  The prescale value incorporates the
+               detection ratio. This is called the guard ratio in some
+               protocols. */
+    int32_t unfiltered_slugi;
+    int32_t unfiltered_slugp;
+
+    /*! \brief The coefficients for the post modulus leaky integrator in the
+               bandpass filter data path. */
+    int32_t broad_slugi;
+    int32_t broad_slugp;
+
+    /*! \brief Masks which effectively threshold the notched, weighted and
+               bandpassed data. */
+    int32_t notch_threshold;
+    int32_t unfiltered_threshold;
+    int32_t broad_threshold;
+} sig_tone_descriptor_t;
+
+typedef struct
+{
+    /*! \brief The callback function used to handle signaling changes. */
+    sig_tone_func_t sig_update;
+    /*! \brief A user specified opaque pointer passed to the callback function. */
+    void *user_data;
+
+    /*! \brief Transmit side parameters */
+    sig_tone_descriptor_t *desc;
+    int32_t phase_rate[2];
+    int32_t tone_scaling[2];
+    uint32_t phase_acc[2];
+
+    int high_low_timer;
+
+    /*! \brief The z's for the notch filter */
+    int32_t notch_z1[3];
+    int32_t notch_z2[3];
+
+    /*! \brief The z's for the weighting/bandpass filter. */
+    int32_t broad_z[3];
+
+    /*! \brief The z's for the integrators. */
+    int32_t notch_zl;
+    int32_t broad_zl;
+
+    /*! \brief The thresholded data. */
+    int32_t mown_notch;
+    int32_t mown_bandpass;
+
+    int flat_mode;
+    int tone_present;
+    int notch_enabled;
+    int flat_mode_timeout;
+    int notch_insertion_timeout;
+    int tone_persistence_timeout;
+    
+    int current_tx_tone;
+    int current_tx_timeout;
+    int signaling_state_duration;
+} sig_tone_state_t;
+
+/*! Initialise a signaling tone context.
+    \brief Initialise a signaling tone context.
+    \param s The signaling tone context.
+    \param tone_type The type of signaling tone.
+    \param sig_update Callback function to handle signaling updates.
+    \param user_data An opaque pointer.
+    \return A pointer to the signalling tone context, or NULL if there was a problem. */
+sig_tone_state_t *sig_tone_init(sig_tone_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data);
+
+/*! Process a block of received audio samples.
+    \brief Process a block of received audio samples.
+    \param s The signaling tone context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples unprocessed. */
+int sig_tone_rx(sig_tone_state_t *s, int16_t amp[], int len);
+
+/*! Generate a block of signaling tone audio samples.
+    \brief Generate a block of signaling tone audio samples.
+    \param s The signaling tone context.
+    \param amp The audio sample buffer.
+    \param len The number of samples to be generated.
+    \return The number of samples actually generated. */
+int sig_tone_tx(sig_tone_state_t *s, int16_t amp[], int len);
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/silence_gen.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,100 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * silence_gen.c - A silence generator, for inserting timed silences.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: silence_gen.h,v 1.4 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_SILENCE_GEN_H_)
+#define _SILENCE_GEN_H_
+
+typedef struct
+{
+    int remaining_samples;
+    int total_samples;
+} silence_gen_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Generate a block of silent audio samples.
+    \brief Generate a block of silent audio samples.
+    \param s The silence generator context.
+    \param amp The audio sample buffer.
+    \param max_len The number of samples to be generated.
+    \return The number of samples actually generated. This will be zero when
+            there is nothing to send.
+*/
+int silence_gen(silence_gen_state_t *s, int16_t *amp, int max_len);
+
+/*! Set a silence generator context to output continuous silence.
+    \brief Set a silence generator context to output continuous silence.
+    \param s The silence generator context.
+*/
+void silence_gen_always(silence_gen_state_t *s);
+
+/*! Set a silence generator context to output a specified period of silence.
+    \brief Set a silence generator context to output a specified period of silence.
+    \param s The silence generator context.
+    \param silent_samples The number of samples to be generated.
+*/
+void silence_gen_set(silence_gen_state_t *s, int silent_samples);
+
+/*! Alter the period of a silence generator context by a specified amount.
+    \brief Alter the period of a silence generator context by a specified amount.
+    \param s The silence generator context.
+    \param silent_samples The number of samples to change the setting by. A positive number
+                          increases the duration. A negative number reduces it. The duration
+                          is prevented from going negative.
+*/
+void silence_gen_alter(silence_gen_state_t *s, int silent_samples);
+
+/*! Find how long a silence generator context has to run.
+    \brief Find how long a silence generator context has to run.
+    \param s The silence generator context.
+    \return The number of samples remaining.
+*/
+int silence_gen_remainder(silence_gen_state_t *s);
+
+/*! Find the total silence generated to date by a silence generator context.
+    \brief Find the total silence generated to date.
+    \param s The silence generator context.
+    \return The number of samples generated.
+*/
+int silence_gen_generated(silence_gen_state_t *s);
+
+/*! Initialise a timed silence generator context.
+    \brief Initialise a timed silence generator context.
+    \param s The silence generator context.
+    \param the initial number of samples to set the silence to.
+    \return A pointer to the silence generator context.
+*/
+silence_gen_state_t *silence_gen_init(silence_gen_state_t *s, int silent_samples);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/super_tone_rx.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,167 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * super_tone_rx.h - Flexible telephony supervisory tone detection.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: super_tone_rx.h,v 1.9 2006/10/24 13:22:02 steveu Exp $
+ */
+
+#if !defined(_SUPER_TONE_RX_H_)
+#define _SUPER_TONE_RX_H_
+
+/*! \page super_tone_rx_page Supervisory tone detection
+
+\section super_tone_rx_page_sec_1 What does it do?
+
+The supervisory tone detector may be configured to detect most of the world's
+telephone supervisory tones - things like ringback, busy, number unobtainable,
+and so on.
+
+\section super_tone_rx_page_sec_2 How does it work?
+
+The supervisory tone detector is passed a series of data structures describing
+the tone patterns - the frequencies and cadencing - of the tones to be searched
+for. It constructs one or more Goertzel filters to monitor the required tones.
+If tones are close in frequency a single Goertzel set to the centre of the
+frequency range will be used. This optimises the efficiency of the detector. The
+Goertzel filters are applied without applying any special window functional
+(i.e. they use a rectangular window), so they have a sinc like response.
+However, for most tone patterns their rejection qualities are adequate. 
+
+The detector aims to meet the need of the standard call progress tones, to
+ITU-T E.180/Q.35 (busy, dial, ringback, reorder). Also, the extended tones,
+to ITU-T E.180, Supplement 2 and EIA/TIA-464-A (recall dial tone, special
+ringback tone, intercept tone, call waiting tone, busy verification tone,
+executive override tone, confirmation tone).
+*/
+
+/*! Tone detection indication callback routine */
+typedef void (*tone_report_func_t)(void *user_data, int code);
+
+#define BINS            128
+
+typedef struct
+{
+    int f1;
+    int f2;
+    int recognition_duration;
+    int min_duration;
+    int max_duration;
+} super_tone_rx_segment_t;
+
+typedef struct
+{
+    int used_frequencies;
+    int monitored_frequencies;
+    int pitches[BINS/2][2];
+    int tones;
+    super_tone_rx_segment_t **tone_list;
+    int *tone_segs;
+    goertzel_descriptor_t *desc;
+} super_tone_rx_descriptor_t;
+
+typedef struct
+{
+    super_tone_rx_descriptor_t *desc;
+    float energy;
+    float total_energy;
+    int detected_tone;
+    int rotation;
+    tone_report_func_t tone_callback;
+    void (*segment_callback)(void *data, int f1, int f2, int duration);
+    void *callback_data;
+    super_tone_rx_segment_t segments[11];
+    goertzel_state_t state[];
+} super_tone_rx_state_t;
+
+/*! Create a new supervisory tone detector descriptor.
+    \param desc The supervisory tone set desciptor. If NULL, the routine will allocate space for a
+                descriptor.
+    \return The supervisory tone set descriptor.
+*/
+super_tone_rx_descriptor_t *super_tone_rx_make_descriptor(super_tone_rx_descriptor_t *desc);
+
+/*! Free a supervisory tone detector descriptor.
+    \param desc The supervisory tone set desciptor.
+    \return 0 for OK, -1 for fail.
+*/
+int super_tone_rx_free_descriptor(super_tone_rx_descriptor_t *desc);
+
+/*! Add a new tone pattern to a supervisory tone detector set.
+    \param desc The supervisory tone set descriptor.
+    \return The new tone ID. */
+int super_tone_rx_add_tone(super_tone_rx_descriptor_t *desc);
+
+/*! Add a new tone pattern element to a tone pattern in a supervisory tone detector.
+    \param desc The supervisory tone set desciptor.
+    \param tone The tone ID within the descriptor.
+    \param f1 Frequency 1 (-1 for a silent period).
+    \param f2 Frequency 2 (-1 for a silent period, or only one frequency).
+    \param min The minimum duration, in ms.
+    \param max The maximum duration, in ms.
+    \return The new number of elements in the tone description.
+*/
+int super_tone_rx_add_element(super_tone_rx_descriptor_t *desc,
+                              int tone,
+                              int f1,
+                              int f2,
+                              int min,
+                              int max);
+
+/*! Initialise a supervisory tone detector.
+    \param s The supervisory tone detector context.
+    \param desc The tone descriptor.
+    \param callback The callback routine called to report the valid detection or termination of
+           one of the monitored tones.
+    \param user_data An opaque pointer passed when calling the callback routine.
+    \return The supervisory tone detector context.
+*/
+super_tone_rx_state_t *super_tone_rx_init(super_tone_rx_state_t *s,
+                                          super_tone_rx_descriptor_t *desc,
+                                          tone_report_func_t callback,
+                                          void *user_data);
+
+/*! Release a supervisory tone detector.
+    \param s The supervisory tone context.
+    \return 0 for OK, -1 for fail.
+*/
+int super_tone_rx_free(super_tone_rx_state_t *s);
+
+/*! Define a callback routine to be called each time a tone pattern element is complete. This is
+    mostly used when analysing a tone.
+    \param s The supervisory tone context.
+    \param callback The callback routine.
+*/
+void super_tone_rx_segment_callback(super_tone_rx_state_t *s,
+                                    void (*callback)(void *data, int f1, int f2, int duration));
+
+/*! Apply supervisory tone detection processing to a block of audio samples.
+    \brief Apply supervisory tone detection processing to a block of audio samples.
+    \param super The supervisory tone context.
+    \param amp The audio sample buffer.
+    \param samples The number of samples in the buffer.
+    \return The number of samples processed.
+*/
+int super_tone_rx(super_tone_rx_state_t *super, const int16_t *amp, int samples);
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/super_tone_tx.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,94 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * super_tone_tx.h - Flexible telephony supervisory tone generation.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: super_tone_tx.h,v 1.8 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_SUPER_TONE_TX_H_)
+#define _SUPER_TONE_TX_H_
+
+/*! \page super_tone_tx_page Supervisory tone generation
+
+\section super_tone_tx_page_sec_1 What does it do?
+
+The supervisory tone generator may be configured to generate most of the world's
+telephone supervisory tones - things like ringback, busy, number unobtainable,
+and so on. It uses tree structure tone descriptions, which can deal with quite
+complex cadence patterns. 
+
+\section super_tone_tx_page_sec_2 How does it work?
+
+*/
+
+typedef struct super_tone_tx_step_s super_tone_tx_step_t;
+
+typedef struct
+{
+    int32_t phase_rate[2];
+    float gain[2];
+    uint32_t phase[2];
+    int current_position;
+    int level;
+    super_tone_tx_step_t *levels[4];
+    int cycles[4];
+} super_tone_tx_state_t;
+
+struct super_tone_tx_step_s
+{
+    int32_t phase_rate[2];
+    float gain[2];
+    int tone;
+    int length;
+    int cycles;
+    super_tone_tx_step_t *next;
+    super_tone_tx_step_t *nest;
+};
+
+super_tone_tx_step_t *super_tone_tx_make_step(super_tone_tx_step_t *s,
+                                              float f1,
+                                              float l1,
+                                              float f2,
+                                              float l2,
+                                              int length,
+                                              int cycles);
+
+void super_tone_tx_free(super_tone_tx_step_t *s);
+
+/*! Initialise a supervisory tone generator.
+    \brief Initialise a supervisory tone generator.
+    \param s The supervisory tone generator context.
+    \param tree The supervisory tone tree to be generated.
+    \return The supervisory tone generator context. */
+super_tone_tx_state_t *super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree);
+
+/*! Generate a block of audio samples for a supervisory tone pattern.
+    \brief Generate a block of audio samples for a supervisory tone pattern.
+    \param tone The supervisory tone context.
+    \param amp The audio sample buffer.
+    \param max_samples The maximum number of samples to be generated.
+    \return The number of samples generated. */
+int super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max_samples);
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t30.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,846 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t30.h - definitions for T.30 fax processing
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t30.h,v 1.61 2006/11/01 12:58:21 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_T30_H_)
+#define _T30_H_
+
+/*! \page t30_page T.30 FAX protocol handling
+
+\section t30_page_sec_1 What does it do?
+The T.30 protocol is the core protocol used for FAX transmission. This module
+implements most of its key featrues. It does not interface to the outside work.
+Seperate modules do that for T.38, analogue line, and other forms of FAX
+communication.
+
+Current features of this module include:
+
+    - FAXing to and from multi-page TIFF/F files, whose images are one of the standard
+      FAX sizes.
+    - T.4 1D (MH), T.4 2D,(MR) and T.6 (MMR) compression.
+    - Error correction (ECM)
+    - All standard resolutions and page sizes
+
+\section t30_page_sec_2 How does it work?
+
+Some of the following is paraphrased from some notes found a while ago on the Internet.
+I cannot remember exactly where they came from, but they are useful.
+
+The answer (CED) tone
+
+The T.30 standard says an answering fax device must send CED (a 2100Hz tone) for
+approximately 3 seconds before sending the first handshake message. Some machines
+send an 1100Hz or 1850Hz tone, and some send no tone at all. In fact, this answer
+tone is so unpredictable, it cannot really be used. It should, however, always be
+generated according to the specification.
+
+Common Timing Deviations
+
+The T.30 spec. specifies a number of time-outs. For example, after dialing a number,
+a calling fax system should listen for a response for 35 seconds before giving up.
+These time-out periods are as follows: 
+
+    * T1 - 35+-5s: the maximum time for which two fax system will attempt to identify each other
+    * T2 - 6+-1s:  a time-out used to start the sequence for changing transmit parameters
+    * T3 - 10+-5s: a time-out used in handling operator interrupts
+    * T5 - 60+-5s: a time-out used in error correction mode
+
+These time-outs are sometimes misinterpreted. In addition, they are routinely
+ignored, sometimes with good reason. For example, after placing a call, the
+calling fax system is supposed to wait for 35 seconds before giving up. If the
+answering unit does not answer on the first ring or if a voice answering machine
+is connected to the line, or if there are many delays through the network,
+the delay before answer can be much longer than 35 seconds. 
+
+Fax units that support error correction mode (ECM) can respond to a post-image
+handshake message with a receiver not ready (RNR) message. The calling unit then
+queries the receiving fax unit with a receiver ready (RR) message. If the
+answering unit is still busy (printing for example), it will repeat the RNR
+message. According to the T.30 standard, this sequence (RR/RNR RR/RNR) can be
+repeated for up to the end of T5 (60+-5s). However, many fax systems
+ignore the time-out and will continue the sequence indefinitely, unless the user
+manually overrides. 
+
+All the time-outs are subject to alteration, and sometimes misuse. Good T.30
+implementations must do the right thing, and tolerate others doing the wrong thing.
+ 
+Variations in the inter-carrier gap
+
+T.30 specifies 75+-20ms of silence between signals using different modulation
+schemes. Examples are between the end of a DCS signal and the start of a TCF signal,
+and between the end of an image and the start of a post-image signal. Many fax systems
+violate this requirement, especially for the silent period between DCS and TCF.
+This may be stretched to well over 100ms. If this period is too long, it can interfere with
+handshake signal error recovery, should a packet be corrupted on the line. Systems
+should ensure they stay within the prescribed T.30 limits, and be tolerant of others
+being out of spec.. 
+
+Other timing variations
+
+Testing is required to determine the ability of a fax system to handle
+variations in the duration of pauses between unacknowledged handshake message
+repetitions, and also in the pauses between the receipt of a handshake command and
+the start of a response to that command. In order to reduce the total
+transmission time, many fax systems start sending a response message before the
+end of the command has been received. 
+
+Other deviations from the T.30 standard
+
+There are many other commonly encountered variations between machines, including:
+
+    * frame sequence deviations
+    * preamble and flag sequence variations
+    * improper EOM usage
+    * unusual data rate fallback sequences
+    * common training pattern detection algorithms
+    * image transmission deviations
+    * use of the talker echo protect tone
+    * image padding and short lines
+    * RTP/RTN handshake message usage
+    * long duration lines
+    * nonstandard disconnect sequences
+    * DCN usage
+*/
+
+#define T30_MAX_DIS_DTC_DCS_LEN     22
+#define T30_MAX_IDENT_LEN           21
+
+typedef struct t30_state_s t30_state_t;
+
+/*!
+    T.30 phase B callback handler.
+    \brief T.30 phase B callback handler.
+    \param s The T.30 context.
+    \param user_data An opaque pointer.
+    \param result The phase B event code.
+*/
+typedef void (t30_phase_b_handler_t)(t30_state_t *s, void *user_data, int result);
+
+/*!
+    T.30 phase D callback handler.
+    \brief T.30 phase D callback handler.
+    \param s The T.30 context.
+    \param user_data An opaque pointer.
+    \param result The phase D event code.
+*/
+typedef void (t30_phase_d_handler_t)(t30_state_t *s, void *user_data, int result);
+
+/*!
+    T.30 phase E callback handler.
+    \brief T.30 phase E callback handler.
+    \param s The T.30 context.
+    \param user_data An opaque pointer.
+    \param completion_code The phase E completion code.
+*/
+typedef void (t30_phase_e_handler_t)(t30_state_t *s, void *user_data, int completion_code);
+
+/*!
+    T.30 document handler.
+    \brief T.30 document handler.
+    \param s The T.30 context.
+    \param user_data An opaque pointer.
+    \param result The document event code.
+*/
+typedef int (t30_document_handler_t)(t30_state_t *s, void *user_data, int status);
+
+/*!
+    T.30 set a receive or transmit type handler.
+    \brief T.30 set a receive or transmit type handler.
+    \param user_data An opaque pointer.
+    \param type The modem, tone or silence to be sent or received.
+    \param short_train TRUE if the short training sequence should be used (where one exists).
+    \param use_hdlc FALSE for bit stream, TRUE for HDLC framing.
+*/
+typedef void (t30_set_handler_t)(void *user_data, int type, int short_train, int use_hdlc);
+
+/*!
+    T.30 send HDLC handler.
+    \brief T.30 send HDLC handler.
+    \param user_data An opaque pointer.
+    \param msg The HDLC message.
+    \param len The length of the message.
+*/
+typedef void (t30_send_hdlc_handler_t)(void *user_data, const uint8_t *msg, int len);
+
+/*!
+    T.30 protocol completion codes, at phase E.
+*/
+enum
+{
+    T30_ERR_OK = 0,         /* OK */
+
+    /* External problems */
+    T30_ERR_CEDTONE,        /* The CED tone exceeded 5s */
+    T30_ERR_T0EXPIRED,      /* Timed out waiting for initial communication */
+    T30_ERR_T1EXPIRED,      /* Timed out waiting for the first message */
+    T30_ERR_T3EXPIRED,      /* Timed out waiting for procedural interrupt */
+    T30_ERR_HDLCCARR,       /* The HDLC carrier did not stop in a timely manner */
+    T30_ERR_CANNOTTRAIN,    /* Failed to train with any of the compatible modems */
+    T30_ERR_OPERINTFAIL,    /* Operator intervention failed */
+    T30_ERR_INCOMPATIBLE,   /* Far end is not compatible */
+    T30_ERR_NOTRXCAPABLE,   /* Far end is not receive capable */
+    T30_ERR_NOTTXCAPABLE,   /* Far end is not transmit capable */
+    T30_ERR_UNEXPECTED,     /* Unexpected message received */
+    T30_ERR_NORESSUPPORT,   /* Far end cannot receive at the resolution of the image */
+    T30_ERR_NOSIZESUPPORT,  /* Far end cannot receive at the size of image */
+
+    /* Internal problems */
+    T30_ERR_FILEERROR,      /* TIFF/F file cannot be opened */
+    T30_ERR_NOPAGE,         /* TIFF/F page not found */
+    T30_ERR_BADTIFF,        /* TIFF/F format is not compatible */
+    T30_ERR_UNSUPPORTED,    /* Unsupported feature */
+
+    /* Phase E status values returned to a transmitter */
+    T30_ERR_BADDCSTX,       /* Received bad response to DCS or training */
+    T30_ERR_BADPGTX,        /* Received a DCN from remote after sending a page */
+    T30_ERR_ECMPHDTX,       /* Invalid ECM response received from receiver */
+    T30_ERR_ECMRNRTX,       /* Timer T5 expired, receiver not ready */
+    T30_ERR_GOTDCNTX,       /* Received a DCN while waiting for a DIS */
+    T30_ERR_INVALRSPTX,     /* Invalid response after sending a page */
+    T30_ERR_NODISTX,        /* Received other than DIS while waiting for DIS */
+    T30_ERR_NXTCMDTX,       /* Timed out waiting for next send_page command from driver */
+    T30_ERR_PHBDEADTX,      /* Received no response to DCS, training or TCF */
+    T30_ERR_PHDDEADTX,      /* No response after sending a page */
+
+    /* Phase E status values returned to a receiver */
+    T30_ERR_ECMPHDRX,       /* Invalid ECM response received from transmitter */
+    T30_ERR_GOTDCSRX,       /* DCS received while waiting for DTC */
+    T30_ERR_INVALCMDRX,     /* Unexpected command after page received */
+    T30_ERR_NOCARRIERRX,    /* Carrier lost during fax receive */
+    T30_ERR_NOEOLRX,        /* Timed out while waiting for EOL (end Of line) */
+    T30_ERR_NOFAXRX,        /* Timed out while waiting for first line */
+    T30_ERR_NXTCMDRX,       /* Timed out waiting for next receive page command */
+    T30_ERR_T2EXPDCNRX,     /* Timer T2 expired while waiting for DCN */
+    T30_ERR_T2EXPDRX,       /* Timer T2 expired while waiting for phase D */
+    T30_ERR_T2EXPFAXRX,     /* Timer T2 expired while waiting for fax page */
+    T30_ERR_T2EXPMPSRX,     /* Timer T2 expired while waiting for next fax page */
+    T30_ERR_T2EXPRRRX,      /* Timer T2 expired while waiting for RR command */
+    T30_ERR_T2EXPRX,        /* Timer T2 expired while waiting for NSS, DCS or MCF */
+    T30_ERR_DCNWHYRX,       /* Unexpected DCN while waiting for DCS or DIS */
+    T30_ERR_DCNDATARX,      /* Unexpected DCN while waiting for image data */
+    T30_ERR_DCNFAXRX,       /* Unexpected DCN while waiting for EOM, EOP or MPS */
+    T30_ERR_DCNPHDRX,       /* Unexpected DCN after EOM or MPS sequence */
+    T30_ERR_DCNRRDRX,       /* Unexpected DCN after RR/RNR sequence */
+    T30_ERR_DCNNORTNRX,     /* Unexpected DCN after requested retransmission */
+
+    T30_ERR_BADPAGE,        /* TIFF/F page number tag missing */
+    T30_ERR_BADTAG,         /* Incorrect values for TIFF/F tags */
+    T30_ERR_BADTIFFHDR,     /* Bad TIFF/F header - incorrect values in fields */
+    T30_ERR_BADPARM,        /* Invalid value for fax parameter */
+    T30_ERR_BADSTATE,       /* Invalid initial state value specified */
+    T30_ERR_CMDDATA,        /* Last command contained invalid data */
+    T30_ERR_DISCONNECT,     /* Fax call disconnected by the other station */
+    T30_ERR_INVALARG,       /* Illegal argument to function */
+    T30_ERR_INVALFUNC,      /* Illegal call to function */
+    T30_ERR_NODATA,         /* Data requested is not available (NSF, DIS, DCS) */
+    T30_ERR_NOMEM,          /* Cannot allocate memory for more pages */
+    T30_ERR_NOPOLL,         /* Poll not accepted */
+    T30_ERR_NOSTATE,        /* Initial state value not set */
+    T30_ERR_RETRYDCN,       /* Disconnected after permitted retries */
+    T30_ERR_CALLDROPPED     /* The call dropped prematurely */
+};
+
+/*!
+    I/O modes for the T.30 protocol.
+*/
+enum
+{
+    T30_MODEM_NONE = 0,
+    T30_MODEM_PAUSE,
+    T30_MODEM_CED,
+    T30_MODEM_CNG,
+    T30_MODEM_V21,
+    T30_MODEM_V27TER_2400,
+    T30_MODEM_V27TER_4800,
+    T30_MODEM_V29_7200,
+    T30_MODEM_V29_9600,
+    T30_MODEM_V17_7200,
+    T30_MODEM_V17_9600,
+    T30_MODEM_V17_12000,
+    T30_MODEM_V17_14400,
+    T30_MODEM_DONE
+};
+
+enum
+{
+    T30_SUPPORT_V27TER = 0x01,
+    T30_SUPPORT_V29 = 0x02,
+    T30_SUPPORT_V17 = 0x04,
+    T30_SUPPORT_V34 = 0x08,
+    T30_SUPPORT_IAF = 0x10,
+};
+
+enum
+{
+    T30_SUPPORT_NO_COMPRESSION = 0x01,
+    T30_SUPPORT_T4_1D_COMPRESSION = 0x02,
+    T30_SUPPORT_T4_2D_COMPRESSION = 0x04,
+    T30_SUPPORT_T6_COMPRESSION = 0x08,
+    T30_SUPPORT_T85_COMPRESSION = 0x10,     /* Monochrome JBIG */
+    T30_SUPPORT_T43_COMPRESSION = 0x20,     /* Colour JBIG */
+    T30_SUPPORT_T45_COMPRESSION = 0x40      /* Run length colour compression */
+};
+
+enum
+{
+    T30_SUPPORT_STANDARD_RESOLUTION = 0x01,
+    T30_SUPPORT_FINE_RESOLUTION = 0x02,
+    T30_SUPPORT_SUPERFINE_RESOLUTION = 0x04,
+
+    T30_SUPPORT_R4_RESOLUTION = 0x10000,
+    T30_SUPPORT_R8_RESOLUTION = 0x20000,
+    T30_SUPPORT_R16_RESOLUTION = 0x40000,
+
+    T30_SUPPORT_300_300_RESOLUTION = 0x100000,
+    T30_SUPPORT_400_400_RESOLUTION = 0x200000,
+    T30_SUPPORT_600_600_RESOLUTION = 0x400000,
+    T30_SUPPORT_1200_1200_RESOLUTION = 0x800000,
+    T30_SUPPORT_300_600_RESOLUTION = 0x1000000,
+    T30_SUPPORT_400_800_RESOLUTION = 0x2000000,
+    T30_SUPPORT_600_1200_RESOLUTION = 0x4000000
+};
+
+enum
+{
+    T30_SUPPORT_215MM_WIDTH = 0x01,
+    T30_SUPPORT_255MM_WIDTH = 0x02,
+    T30_SUPPORT_303MM_WIDTH = 0x04,
+
+    T30_SUPPORT_UNLIMITED_LENGTH = 0x10000,
+    T30_SUPPORT_A4_LENGTH = 0x20000,
+    T30_SUPPORT_B4_LENGTH = 0x40000,
+    T30_SUPPORT_US_LETTER_LENGTH = 0x80000,
+    T30_SUPPORT_US_LEGAL_LENGTH = 0x100000
+};
+
+enum
+{
+    T30_SUPPORT_SEP = 0x01,
+    T30_SUPPORT_PSA = 0x02
+};
+
+enum
+{
+    T30_IAF_MODE_T37 = 0x01,
+    T30_IAF_MODE_T38 = 0x02,
+    T30_IAF_MODE_FLOW_CONTROL = 0x04,
+    /*! Continuous flow mode means data is sent as fast as possible, usually across
+        the Internet, where speed is not constrained by a PSTN modem. */
+    T30_IAF_MODE_CONTINUOUS_FLOW = 0x08,
+    /*! No TCF means TCF is not exchanged. The end points must sort out usable speed
+        issues locally. */
+    T30_IAF_MODE_NO_TCF = 0x10,
+    /*! No fill bits means do not insert fill bits, even if the T.30 messages request
+        them. */
+    T30_IAF_MODE_NO_FILL_BITS = 0x20
+};
+
+/*!
+    T.30 FAX channel descriptor. This defines the state of a single working
+    instance of a T.30 FAX channel.
+*/
+struct t30_state_s
+{
+    /* This must be kept the first thing in the structure, so it can be pointed
+       to reliably as the structures change over time. */
+    t4_state_t t4;
+
+    /*! \brief TRUE is behaving as the calling party */
+    int calling_party;
+
+    /*! \brief The local identifier string. */
+    char local_ident[T30_MAX_IDENT_LEN];
+    /*! \brief The identifier string supplied by the remote FAX machine. */
+    char far_ident[T30_MAX_IDENT_LEN];
+    /*! \brief The sub-address string to be sent to the remote FAX machine. */
+    char local_sub_address[T30_MAX_IDENT_LEN];
+    /*! \brief The sub-address string supplied by the remote FAX machine. */
+    char far_sub_address[T30_MAX_IDENT_LEN];
+    /*! \brief The selective polling sub-address supplied by the remote FAX machine. */
+    char sep_address[T30_MAX_IDENT_LEN];
+    /*! \brief The polled sub-address supplied by the remote FAX machine. */
+    char psa_address[T30_MAX_IDENT_LEN];
+    /*! \brief A password to be associated with the T.30 context. */
+    char local_password[T30_MAX_IDENT_LEN];
+    /*! \brief A password expected from the far end. */
+    char far_password[T30_MAX_IDENT_LEN];
+    /*! \brief The text which will be used in FAX page header. No text results
+               in no header line. */
+    char header_info[50 + 1];
+    /*! \brief The country of origin of the remote machine, if known, else NULL. */
+    const char *country;
+    /*! \brief The vendor of the remote machine, if known, else NULL. */
+    const char *vendor;
+    /*! \brief The model of the remote machine, if known, else NULL. */
+    const char *model;
+    uint8_t local_nsf[100];
+    int local_nsf_len;
+
+    /*! \brief A pointer to a callback routine to be called when phase B events
+        occur. */
+    t30_phase_b_handler_t *phase_b_handler;
+    /*! \brief An opaque pointer supplied in event B callbacks. */
+    void *phase_b_user_data;
+    /*! \brief A pointer to a callback routine to be called when phase D events
+        occur. */
+    t30_phase_d_handler_t *phase_d_handler;
+    /*! \brief An opaque pointer supplied in event D callbacks. */
+    void *phase_d_user_data;
+    /*! \brief A pointer to a callback routine to be called when phase E events
+        occur. */
+    t30_phase_e_handler_t *phase_e_handler;
+    /*! \brief An opaque pointer supplied in event E callbacks. */
+    void *phase_e_user_data;
+
+    /*! \brief A pointer to a callback routine to be called when document events
+        (e.g. end of transmitted document) occur. */
+    t30_document_handler_t *document_handler;
+    /*! \brief An opaque pointer supplied in document callbacks. */
+    void *document_user_data;
+
+    t30_set_handler_t *set_rx_type_handler;
+    void *set_rx_type_user_data;
+    t30_set_handler_t *set_tx_type_handler;
+    void *set_tx_type_user_data;
+
+    t30_send_hdlc_handler_t *send_hdlc_handler;
+    void *send_hdlc_user_data;
+   
+    int phase;
+    int next_phase;
+    int state;
+    int step;
+
+    uint8_t dcs_frame[T30_MAX_DIS_DTC_DCS_LEN];
+    int dcs_len;
+    uint8_t dis_dtc_frame[T30_MAX_DIS_DTC_DCS_LEN];
+    int dis_dtc_len;
+    /*! \brief TRUE if a valid DIS has been received from the far end. */
+    int dis_received;
+    /*! \brief TRUE if a valid passwrod has been received from the far end. */
+    int far_password_ok;
+
+    /*! \brief A flag to indicate a message is in progress. */
+    int in_message;
+
+    /*! \brief TRUE if the short training sequence should be used. */
+    int short_train;
+
+    /*! \brief A count of the number of bits in the trainability test. */
+    int training_test_bits;
+    int training_current_zeros;
+    int training_most_zeros;
+
+    /*! \brief The current fallback step for the fast message transfer modem. */
+    int current_fallback;
+    /*! \brief TRUE if a carrier is present. Otherwise FALSE. */
+    int rx_signal_present;
+    /*! \brief TRUE if a modem has trained correctly. */
+    int rx_trained;
+    int current_rx_type;
+    int current_tx_type;
+
+    /*! \brief T0 is the answer timeout when calling another FAX machine.
+        Placing calls is handled outside the FAX processing, but this timeout keeps
+        running until V.21 modulation is sent or received.
+        T1 is the remote terminal identification timeout (in audio samples). */
+    int timer_t0_t1;
+    /*! \brief T2 is the HDLC command timeout.
+               T4 is the HDLC response timeout (in audio samples). */
+    int timer_t2_t4;
+    /*! \brief TRUE if the T2/T4 timer is actually timing T4 */
+    int timer_is_t4;
+    /*! \brief Procedural interrupt timeout (in audio samples). */
+    int timer_t3;
+    /*! \brief This is only used in error correcting mode. */
+    int timer_t5;
+    /*! \brief This is only used in full duplex (e.g. ISDN) modes. */
+    int timer_t6;
+    /*! \brief This is only used in full duplex (e.g. ISDN) modes. */
+    int timer_t7;
+    /*! \brief This is only used in full duplex (e.g. ISDN) modes. */
+    int timer_t8;
+
+    int far_end_detected;
+
+    int local_interrupt_pending;
+    int crp_enabled;
+    int line_encoding;
+    int min_row_bits;
+    int x_resolution;
+    int y_resolution;
+    int image_width;
+    int retries;
+    int error_correcting_mode;
+    int ppr_count;
+    int octets_per_ecm_frame;
+    uint8_t ecm_data[256][260];
+    int16_t ecm_len[256];
+    uint8_t ecm_frame_map[3 + 32];
+    int ecm_page;
+    int ecm_block;
+    int ecm_frames;
+    int ecm_current_frame;
+    int ecm_at_page_end;
+    int next_tx_step;
+    int next_rx_step;
+    char rx_file[256];
+    int rx_stop_page;
+    char tx_file[256];
+    int tx_start_page;
+    int tx_stop_page;
+    int current_status;
+    int iaf;
+    int supported_modems;
+    int supported_compressions;
+    int supported_resolutions;
+    int supported_image_sizes;
+    int supported_polling_features;
+    int ecm_allowed;
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+};
+
+typedef struct
+{
+    /*! \brief The current bit rate for image transfer. */
+    int bit_rate;
+    /*! \brief TRUE if error correcting mode is used. */
+    int error_correcting_mode;
+    /*! \brief The number of pages transferred so far. */
+    int pages_transferred;
+    /*! \brief The number of horizontal pixels in the most recent page. */
+    int width;
+    /*! \brief The number of vertical pixels in the most recent page. */
+    int length;
+    /*! \brief The number of bad pixel rows in the most recent page. */
+    int bad_rows;
+    /*! \brief The largest number of bad pixel rows in a block in the most recent page. */
+    int longest_bad_row_run;
+    /*! \brief The horizontal column-to-column resolution of the page in pixels per metre */
+    int x_resolution;
+    /*! \brief The vertical row-to-row resolution of the page in pixels per metre */
+    int y_resolution;
+    /*! \brief The type of compression used between the FAX machines */
+    int encoding;
+    /*! \brief The size of the image, in bytes */
+    int image_size;
+    /*! \brief Current status */
+    int current_status;
+} t30_stats_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a T.30 context.
+    \brief Initialise a T.30 context.
+    \param s The T.30 context.
+    \param calling_party TRUE if the context is for a calling party. FALSE if the
+           context is for an answering party.
+    \return 0 for OK, else -1. */
+int t30_init(t30_state_t *s,
+             int calling_party,
+             t30_set_handler_t *set_rx_type_handler,
+             void *set_rx_type_user_data,
+             t30_set_handler_t *set_tx_type_handler,
+             void *set_tx_type_user_data,
+             t30_send_hdlc_handler_t *send_hdlc_handler,
+             void *send_hdlc_user_data);
+
+/*! Release a T.30 context.
+    \brief Release a T.30 context.
+    \param s The T.30 context. */
+void t30_release(t30_state_t *s);
+
+/*! Restart a T.30 context.
+    \brief Restart a T.30 context.
+    \param s The T.30 context.
+    \return 0 for OK, else -1. */
+int t30_restart(t30_state_t *s);
+
+/*! Create and initialise a T.30 context.
+    \brief Create and initialise a T.30 context.
+    \param calling_party TRUE if the context is for a calling party. FALSE if the
+           context is for an answering party.
+    \return A pointer to the FAX context, or NULL if one could not be created.
+*/
+t30_state_t *t30_create(int calling_party,
+                        t30_set_handler_t *set_rx_type_handler,
+                        void *set_rx_type_user_data,
+                        t30_set_handler_t *set_tx_type_handler,
+                        void *set_tx_type_user_data,
+                        t30_send_hdlc_handler_t *send_hdlc_handler,
+                        void *send_hdlc_user_data);
+
+/*! Free a T.30 context.
+    \brief Free a T.30 context.
+    \param s The T.30 context. */
+void t30_free(t30_state_t *s);
+
+/*! Cleanup a T.30 context if the call terminates.
+    \brief Cleanup a T.30 context if the call terminates.
+    \param s The T.30 context. */
+void t30_terminate(t30_state_t *s);
+
+/*! Return a text name for a T.30 frame type.
+    \brief Return a text name for a T.30 frame type.
+    \param x The frametype octet.
+    \return A pointer to the text name for the frame type. If the frame type is
+            not value, the string "???" is returned. */
+const char *t30_frametype(uint8_t x);
+
+/*! Decode a DIS, DTC or DCS frame, and log the contents.
+    \brief Decode a DIS, DTC or DCS frame, and log the contents.
+    \param s The T.30 context.
+    \param dis A pointer to the frame to be decoded.
+    \param len The length of the frame. */
+void t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *dis, int len);
+
+/*! Convert a phase E completion code to a short text description.
+    \brief Convert a phase E completion code to a short text description.
+    \param result The result code.
+    \return A pointer to the description. */
+const char *t30_completion_code_to_str(int result);
+
+/*! Set Internet aware FAX (IAF) mode.
+    \brief Set Internet aware FAX (IAF) mode.
+    \param s The T.30 context.
+    \param iaf TRUE for IAF, or FALSE for non-IAF. */
+void t30_set_iaf_mode(t30_state_t *s, int iaf);
+
+/*! Set the sub-address associated with a T.30 context.
+    \brief Set the sub-address associated with a T.30 context.
+    \param s The T.30 context.
+    \param sub_address A pointer to the sub-address.
+    \return 0 for OK, else -1. */
+int t30_set_local_sub_address(t30_state_t *s, const char *sub_address);
+
+/*! Set the header information associated with a T.30 context.
+    \brief Set the header information associated with a T.30 context.
+    \param s The T.30 context.
+    \param info A pointer to the information string.
+    \return 0 for OK, else -1. */
+int t30_set_header_info(t30_state_t *s, const char *info);
+
+/*! Set the local identifier associated with a T.30 context.
+    \brief Set the local identifier associated with a T.30 context.
+    \param s The T.30 context.
+    \param id A pointer to the identifier.
+    \return 0 for OK, else -1. */
+int t30_set_local_ident(t30_state_t *s, const char *id);
+
+int t30_set_local_nsf(t30_state_t *s, const uint8_t *nsf, int len);
+
+/*! Get the sub-address associated with a T.30 context.
+    \brief Get the sub-address associated with a T.30 context.
+    \param s The T.30 context.
+    \param sub_address A pointer to a buffer for the sub-address.  The buffer
+           should be at least 21 bytes long.
+    \return the length of the string. */
+size_t t30_get_sub_address(t30_state_t *s, char *sub_address);
+
+/*! Get the header information associated with a T.30 context.
+    \brief Get the header information associated with a T.30 context.
+    \param s The T.30 context.
+    \param sub_address A pointer to a buffer for the header information.  The buffer
+           should be at least 51 bytes long.
+    \return the length of the string. */
+size_t t30_get_header_info(t30_state_t *s, char *info);
+
+/*! Get the local FAX machine identifier associated with a T.30 context.
+    \brief Get the local identifier associated with a T.30 context.
+    \param s The T.30 context.
+    \param id A pointer to a buffer for the identifier. The buffer should
+           be at least 21 bytes long.
+    \return the length of the string. */
+size_t t30_get_local_ident(t30_state_t *s, char *id);
+
+/*! Get the remote FAX machine identifier associated with a T.30 context.
+    \brief Get the remote identifier associated with a T.30 context.
+    \param s The T.30 context.
+    \param id A pointer to a buffer for the identifier. The buffer should
+           be at least 21 bytes long.
+    \return the length of the string. */
+size_t t30_get_far_ident(t30_state_t *s, char *id);
+
+/*! Get the country of origin of the remote FAX machine associated with a T.30 context.
+    \brief Get the country of origin of the remote FAX machine associated with a T.30 context.
+    \param s The T.30 context.
+    \return a pointer to the country name, or NULL if the country is not known. */
+const char *t30_get_far_country(t30_state_t *s);
+
+/*! Get the name of the vendor of the remote FAX machine associated with a T.30 context.
+    \brief Get the name of the vendor of the remote FAX machine associated with a T.30 context.
+    \param s The T.30 context.
+    \return a pointer to the vendor name, or NULL if the vendor is not known. */
+const char *t30_get_far_vendor(t30_state_t *s);
+
+/*! Get the name of the model of the remote FAX machine associated with a T.30 context.
+    \brief Get the name of the model of the remote FAX machine associated with a T.30 context.
+    \param s The T.30 context.
+    \return a pointer to the model name, or NULL if the model is not known. */
+const char *t30_get_far_model(t30_state_t *s);
+
+/*! Get the current transfer statistics for the file being sent or received.
+    \brief Get the current transfer statistics.
+    \param s The T.30 context.
+    \param t A pointer to a buffer for the statistics. */
+void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t);
+
+/*! Set a callback function for T.30 phase B handling.
+    \brief Set a callback function for T.30 phase B handling.
+    \param s The T.30 context.
+    \param handler The callback function
+    \param user_data An opaque pointer passed to the callback function. */
+void t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data);
+
+/*! Set a callback function for T.30 phase D handling.
+    \brief Set a callback function for T.30 phase D handling.
+    \param s The T.30 context.
+    \param handler The callback function
+    \param user_data An opaque pointer passed to the callback function. */
+void t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data);
+
+/*! Set a callback function for T.30 phase E handling.
+    \brief Set a callback function for T.30 phase E handling.
+    \param s The T.30 context.
+    \param handler The callback function
+    \param user_data An opaque pointer passed to the callback function. */
+void t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data);
+
+/*! Set a callback function for T.30 end of document handling.
+    \brief Set a callback function for T.30 end of document handling.
+    \param s The T.30 context.
+    \param handler The callback function
+    \param user_data An opaque pointer passed to the callback function. */
+void t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data);
+
+/*! Specify the file name of the next TIFF file to be received by a T.30
+    context.
+    \brief Set next receive file name.
+    \param s The T.30 context.
+    \param file The file name
+    \param stop_page The maximum page to receive. -1 for no restriction. */
+void t30_set_rx_file(t30_state_t *s, const char *file, int stop_page);
+
+/*! Specify the file name of the next TIFF file to be transmitted by a T.30
+    context.
+    \brief Set next transmit file name.
+    \param s The T.30 context.
+    \param file The file name
+    \param start_page The first page to send. -1 for no restriction.
+    \param stop_page The last page to send. -1 for no restriction. */
+void t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page);
+
+/*! Specify which modem types are supported by a T.30 context.
+    \brief Specify supported modems.
+    \param s The T.30 context.
+    \param supported_modems Bit field list of the supported modems. */
+void t30_set_supported_modems(t30_state_t *s, int supported_modems);
+
+/*! Specify which compression types are supported by a T.30 context.
+    \brief Specify supported compression types.
+    \param s The T.30 context.
+    \param supported_compressions Bit field list of the supported compression types. */
+void t30_set_supported_compressions(t30_state_t *s, int supported_compressions);
+
+/*! Specify which resolutions are supported by a T.30 context.
+    \brief Specify supported resolutions.
+    \param s The T.30 context.
+    \param supported_compressions Bit field list of the supported resolutions. */
+void t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions);
+
+/*! Specify which images sizes are supported by a T.30 context.
+    \brief Specify supported image sizes.
+    \param s The T.30 context.
+    \param supported_image_sizes Bit field list of the supported widths and lengths. */
+void t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes);
+
+/*! Specify if error correction mode (ECM) is allowed by a T.30 context.
+    \brief Select ECM capability.
+    \param s The T.30 context.
+    \param enabled TRUE for ECM capable, FALSE for not ECM capable. */
+void t30_set_ecm_capability(t30_state_t *s, int enabled);
+
+/*! Request a local interrupt of FAX exchange.
+    \brief Request a local interrupt of FAX exchange.
+    \param s The T.30 context.
+    \param state TRUE to enable interrupt request, else FALSE. */
+void t30_local_interrupt_request(t30_state_t *s, int state);
+
+/*! Inform the T.30 engine the current transmission has completed.
+    \brief Inform the T.30 engine the current transmission has completed.
+    \param s The T.30 context. */
+void t30_send_complete(void *user_data);
+
+/*! Inform the T.30 engine the current receive has completed. This is
+    only needed to report an unexpected end of the receive operation, as
+    might happen with T.38 dying.
+    \brief Inform the T.30 engine the current receive has completed.
+    \param s The T.30 context. */
+void t30_receive_complete(void *user_data);
+
+/*! Get a bit of received non-ECM image data.
+    \brief Get a bit of received non-ECM image data.
+    \param user_data An opaque pointer, which must point to the T.30 context.
+    \return bit The next bit to transmit. */
+int t30_non_ecm_get_bit(void *user_data);
+
+/*! Process a bit of received non-ECM image data.
+    \brief Process a bit of received non-ECM image data
+    \param user_data An opaque pointer, which must point to the T.30 context.
+    \param bit The received bit. */
+void t30_non_ecm_put_bit(void *user_data, int bit);
+
+/*! Process a byte of received non-ECM image data.
+    \brief Process a byte of received non-ECM image data
+    \param user_data An opaque pointer, which must point to the T.30 context.
+    \param byte The received byte. */
+void t30_non_ecm_putbyte(void *user_data, int byte);
+
+/*! Process a received HDLC frame.
+    \brief Process a received HDLC frame.
+    \param s The T.30 context.
+    \param ok TRUE if the frame was received without error.
+    \param msg The HDLC message.
+    \param int The length of the message, in octets. */
+void t30_hdlc_accept(void *user_data, int ok, const uint8_t *msg, int len);
+
+/*! Report the passage of time to the T.30 engine.
+    \brief Report the passage of time to the T.30 engine.
+    \param s The T.30 context.
+    \param samples The time change in 1/8000th second steps. */
+void t30_timer_update(t30_state_t *s, int samples);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t30_fcf.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,110 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fcf.h - ITU T.30 fax control field definitions
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t30_fcf.h,v 1.9 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_T30_FCF_H_)
+#define _T30_FCF_H_
+
+/*! Initial identification messages */
+/*! From the called to the calling terminal. */
+#define T30_DIS     0x80        /*! Digital identification signal */
+#define T30_CSI     0x40        /*! Called subscriber identification */
+#define T30_NSF     0x20        /*! Non-standard facilities */
+
+/*! Commands to send */
+/*! From a calling terminal wishing to be a receiver, to a called terminal
+    which is capable of transmitting. */
+#define T30_DTC     0x81        /*! Digital transmit command */
+#define T30_CIG     0x41        /*! Calling subscriber identification */
+#define T30_NSC     0x21        /*! Non-standard facilities command */
+#define T30_PWD     0xC1        /*! Password */
+#define T30_SEP     0xA1        /*! Selective polling */
+#define T30_PSA     0x61        /*! Polled subaddress */
+#define T30_CIA     0xE1        /*! Calling subscriber internet address */
+#define T30_ISP     0x11        /*! Internet selective polling address */
+
+/*! Commands to receive */
+/*! From a calling terminal wishing to be a transmitter, to a called terminal
+    which is capable of receiving. */
+#define T30_DCS     0x82        /*! Digital command signal */
+#define T30_TSI     0x42        /*! Transmitting subscriber information */
+#define T30_NSS     0x22        /*! Non-standard facilities set-up */
+#define T30_SUB     0xC2        /*! Subaddress */
+#define T30_SID     0xA2        /*! Sender identification */
+/*! T30_TCF - Training check is a burst of 1.5s of zeros sent using the image modem */
+#define T30_CTC     0x12        /*! Continue to correct */
+#define T30_TSA     0x62        /*! Transmitting subscriber internet address */
+#define T30_IRA     0xE2        /*! Internet routing address */
+
+/*! Pre-message response signals */
+/*! From the receiver to the transmitter. */
+#define T30_CFR     0x84        /*! Confirmation to receive */
+#define T30_FTT     0x44        /*! Failure to train */
+#define T30_CTR     0xC4        /*! Response for continue to correct */
+#define T30_CSA     0x24        /*! Called subscriber internet address */
+
+/*! Post-message commands */
+#define T30_EOM     0x8E        /*! End of message */
+#define T30_MPS     0x4E        /*! Multipage signal */
+#define T30_EOP     0x2E        /*! End of procedure */
+#define T30_PRI_EOM 0x9E        /*! Procedure interrupt - end of procedure */
+#define T30_PRI_MPS 0x5E        /*! Procedure interrupt - multipage signal */
+#define T30_PRI_EOP 0x3E        /*! Procedure interrupt - end of procedure */
+#define T30_EOS     0x1E        /*! End of selection */
+#define T30_PPS     0xBE        /*! Partial page signal */
+#define T30_EOR     0xCE        /*! End of retransmission */
+#define T30_RR      0x6E        /*! Receiver ready */
+
+/*! Post-message responses */
+#define T30_MCF     0x8C        /*! Message confirmation */
+#define T30_RTP     0xCC        /*! Retrain positive */
+#define T30_RTN     0x4C        /*! Retrain negative */
+#define T30_PIP     0xAC        /*! Procedure interrupt positive */
+#define T30_PIN     0x2C        /*! Procedure interrupt negative */
+#define T30_PPR     0xBC        /*! Partial page request */
+#define T30_RNR     0xEC        /*! Receive not ready */
+#define T30_ERR     0x1C        /*! Response for end of retransmission */
+#define T30_FDM     0xFC        /*! File diagnostics message */
+
+/*! Other line control signals */
+#define T30_DCN     0xFA        /*! Disconnect */
+#define T30_CRP     0x1A        /*! Command repeat */
+#define T30_FNV     0xCA        /*! Field not valid */
+#define T30_TNR     0xEA        /*! Transmit not ready */
+#define T30_TR      0x6A        /*! Transmit ready */
+#define T30_PID     0x6C        /*! Procedure interrupt disconnect */
+
+/*! Something only use as a secondary value in error correcting mode */
+#define T30_NULL    0x00        /*! Nothing to say */
+
+/*! Information frame types used for error correction mode, in T.4 */
+#define T4_FCD      0x06        /*! Facsimile coded data */
+#define T4_RCP      0x86        /*! Return to control for partial page */
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t31.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,242 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t31.h - A T.31 compatible class 1 FAX modem interface.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t31.h,v 1.37 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_T31_H_)
+#define _T31_H_
+
+/*! \page t31_page T.31 Class 1 FAX modem protocol handling
+\section t31_page_sec_1 What does it do?
+The T.31 class 1 FAX modem modules implements a class 1 interface to the FAX
+modems in spandsp.
+
+\section t31_page_sec_2 How does it work?
+*/
+
+typedef struct t31_state_s t31_state_t;
+
+typedef int (t31_modem_control_handler_t)(t31_state_t *s, void *user_data, int op, const char *num);
+
+#define T31_TX_BUF_LEN          (4096*32)
+#define T31_TX_BUF_HIGH_TIDE    (4096*32 - 1024)
+#define T31_TX_BUF_LOW_TIDE     (1024)
+
+/*!
+    T.31 descriptor. This defines the working state for a single instance of
+    a T.31 FAX modem.
+*/
+struct t31_state_s
+{
+    at_state_t at_state;
+    t31_modem_control_handler_t *modem_control_handler;
+    void *modem_control_user_data;
+
+    /*! The current receive signal handler */
+    span_rx_handler_t *rx_handler;
+    void *rx_user_data;
+
+    /*! The current transmit signal handler */
+    span_tx_handler_t *tx_handler;
+    void *tx_user_data;
+    /*! The transmit signal handler to be used when the current one has finished sending. */
+    span_tx_handler_t *next_tx_handler;
+    void *next_tx_user_data;
+
+    /*! If TRUE, transmit silence when there is nothing else to transmit. If FALSE return only
+        the actual generated audio. Note that this only affects untimed silences. Timed silences
+        (e.g. the 75ms silence between V.21 and a high speed modem) will alway be transmitted as
+        silent audio. */
+    int transmit_on_idle;
+
+    uint8_t hdlc_tx_buf[256];
+    int hdlc_tx_len;
+    int hdlc_tx_ptr;
+    /*! TRUE if DLE prefix just used */
+    int dled;
+    uint8_t tx_data[T31_TX_BUF_LEN];
+    /*! \brief The number of bytes stored in transmit buffer. */
+    int tx_in_bytes;
+    /*! \brief The number of bytes sent from the transmit buffer. */
+    int tx_out_bytes;
+    int tx_holding;
+    int tx_data_started;
+    int bit_no;
+    int current_byte;
+
+    /*! \brief The current bit rate for the FAX fast message transfer modem. */
+    int bit_rate;
+    int rx_message_received;
+
+    /*! \brief A tone generator context used to generate supervisory tones during
+               FAX handling. */
+    tone_gen_state_t tone_gen;
+    /*! \brief An HDLC context used when receiving HDLC over V.21 messages. */
+    hdlc_rx_state_t hdlcrx;
+    /*! \brief An HDLC context used when transmitting HDLC over V.21 messages. */
+    hdlc_tx_state_t hdlctx;
+    /*! \brief A V.21 FSK modem context used when transmitting HDLC over V.21
+               messages. */
+    fsk_tx_state_t v21tx;
+    /*! \brief A V.21 FSK modem context used when receiving HDLC over V.21
+               messages. */
+    fsk_rx_state_t v21rx;
+
+#if defined(ENABLE_V17)
+    /*! \brief A V.17 modem context used when sending FAXes at 7200bps, 9600bps
+               12000bps or 14400bps*/
+    v17_tx_state_t v17tx;
+    /*! \brief A V.29 modem context used when receiving FAXes at 7200bps, 9600bps
+               12000bps or 14400bps*/
+    v17_rx_state_t v17rx;
+#endif
+
+    /*! \brief A V.29 modem context used when sending FAXes at 7200bps or
+               9600bps */
+    v29_tx_state_t v29tx;
+    /*! \brief A V.29 modem context used when receiving FAXes at 7200bps or
+               9600bps */
+    v29_rx_state_t v29rx;
+
+    /*! \brief A V.27ter modem context used when sending FAXes at 2400bps or
+               4800bps */
+    v27ter_tx_state_t v27ter_tx;
+    /*! \brief A V.27ter modem context used when receiving FAXes at 2400bps or
+               4800bps */
+    v27ter_rx_state_t v27ter_rx;
+
+    /*! \brief Used to insert timed silences. */
+    silence_gen_state_t silence_gen;
+
+    /*! \brief Rx power meter, use to detect silence */
+    power_meter_t rx_power;
+    int16_t last_sample;
+    int32_t silence_threshold_power;
+    
+    t38_core_state_t t38;
+
+	/*! \brief Samples of silence heard */
+    int silence_heard;
+	/*! \brief Samples of silence awaited */
+    int silence_awaited;
+    /*! \brief Samples elapsed in the current call */
+    int64_t call_samples;
+    int64_t dte_data_timeout;
+    int modem;
+    int short_train;
+    int hdlc_final;
+    int data_final;
+    queue_t rx_queue;
+
+    uint8_t hdlc_rx_buf[256];
+    int hdlc_rx_len;
+    
+    int t38_mode;
+    int timed_step;
+    int current_tx_data;
+    int64_t next_send_samples;
+    int next_tx_indicator;
+
+    int current_rx_type;
+    int current_tx_type;
+
+    /*! \brief TRUE is there has been some T.38 data missed */
+    int missing_data;
+
+    int octets_per_non_ecm_packet;
+
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void t31_call_event(t31_state_t *s, int event);
+
+int t31_at_rx(t31_state_t *s, const char *t, int len);
+
+/*! Process a block of received T.31 modem audio samples.
+    \brief Process a block of received T.31 modem audio samples.
+    \param s The T.31 modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples unprocessed. */
+int t31_rx(t31_state_t *s, int16_t amp[], int len);
+
+/*! Generate a block of T.31 modem audio samples.
+    \brief Generate a block of T.31 modem audio samples.
+    \param s The T.31 modem context.
+    \param amp The audio sample buffer.
+    \param max_len The number of samples to be generated.
+    \return The number of samples actually generated.
+*/
+int t31_tx(t31_state_t *s, int16_t amp[], int max_len);
+
+int t31_t38_send_timeout(t31_state_t *s, int samples);
+
+/*! Select whether silent audio will be sent when transmit is idle.
+    \brief Select whether silent audio will be sent when transmit is idle.
+    \param s The T.31 modem context.
+    \param transmit_on_idle TRUE if silent audio should be output when the transmitter is
+           idle. FALSE to transmit zero length audio when the transmitter is idle. The default
+           behaviour is FALSE.
+*/
+void t31_set_transmit_on_idle(t31_state_t *s, int transmit_on_idle);
+
+/*! Initialise a T.31 context. This must be called before the first
+    use of the context, to initialise its contents.
+    \brief Initialise a T.31 context.
+    \param s The T.31 context.
+    \param at_tx_handler A callback routine to handle AT interpreter channel output.
+    \param at_tx_user_data An opaque pointer passed in called to at_tx_handler.
+    \param modem_control_handler A callback routine to handle control of the modem (off-hook, etc).
+    \param modem_control_user_data An opaque pointer passed in called to modem_control_handler.
+    \param tx_t38_packet_handler ???
+    \param tx_t38_packet_user_data ???
+    \return A pointer to the T.31 context. */
+t31_state_t *t31_init(t31_state_t *s,
+                      at_tx_handler_t *at_tx_handler,
+                      void *at_tx_user_data,
+                      t31_modem_control_handler_t *modem_control_handler,
+                      void *modem_control_user_data,
+                      t38_tx_packet_handler_t *tx_t38_packet_handler,
+                      void *tx_t38_packet_user_data);
+
+/*! Release a T.31 context.
+    \brief Release a T.31 context.
+    \param s The T.31 context.
+    \return 0 for OK */
+int t31_release(t31_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t35.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,70 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t35.h - ITU T.35 FAX non-standard facility processing.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t35.h,v 1.8 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_T35_H_)
+#define _T35_H_
+
+/*! \page t35_page T.35 manufacturer specific processing for FAX machines
+\section t35_page_sec_1 What does it do?
+???.
+
+\section t35_page_sec_2 How does it work?
+???.
+*/
+
+extern const char *t35_country_codes[256];
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Decode an NSF field to try to determine the make and model of the
+    remote machine.
+    \brief Decode an NSF field.
+    \param msg The NSF message.
+    \param len The length of the NSF message.
+    \param country A pointer which will be pointed to the identified country of origin.
+           If a NULL pointer is given, the country of origin will not be returned.
+           If the country of origin is not identified, NULL will be returned.
+    \param vendor A pointer which will be pointed to the identified vendor.
+           If a NULL pointer is given, the vendor ID will not be returned.
+           If the vendor is not identified, NULL will be returned.
+    \param model A pointer which will be pointed to the identified model.
+           If a NULL pointer is given, the model will not be returned.
+           If the model is not identified, NULL will be returned.
+    \return TRUE if the machine was identified, otherwise FALSE.
+*/
+int t35_decode(const uint8_t *msg, int len, const char **country, const char **vendor, const char **model);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t38_core.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,341 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_core.h - An implementation of T.38, less the packet exchange part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_core.h,v 1.11 2006/12/07 13:22:26 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_T38_CORE_H_)
+#define _T38_CORE_H_
+
+/*! \page t38_core_page T.38 real time FAX over IP message handling
+There are two ITU recommendations which address sending FAXes over IP networks. T.37 specifies a
+method of encapsulating FAX images in e-mails, and transporting them to the recipient (an e-mail
+box, or another FAX machine) in a store-and-forward manner. T.38 defines a protocol for
+transmitting a FAX across an IP network in real time. The core T.38 modules implements the basic
+message handling for the T.38, real time, FAX over IP (FoIP) protocol.
+
+The T.38 protocol can operate between:
+    - Internet-aware FAX terminals, which connect directly to an IP network. The T.38 terminal module
+      extends this module to provide a complete T.38 terminal.
+    - FAX gateways, which allow traditional PSTN FAX terminals to communicate through the Internet.
+      The T.38 gateway module extends this module to provide a T.38 gateway.
+    - A combination of terminals and gateways.
+
+T.38 is the only standardised protocol which exists for real-time FoIP. Reliably transporting a
+FAX between PSTN FAX terminals, through an IP network, requires use of the T.38 protocol at FAX
+gateways. VoIP connections are not robust for modem use, including FAX modem use. Most use low
+bit rate codecs, which cannot convey the modem signals accurately. Even when high bit rate
+codecs are used, VoIP connections suffer dropouts and timing adjustments, which modems cannot
+tolerate. In a LAN environment the dropout rate may be very low, but the timing adjustments which
+occur in VoIP connections still make modem operation unreliable. T.38 FAX gateways deal with the
+delays, timing jitter, and packet loss experienced in packet networks, and isolate the PSTN FAX
+terminals from these as far as possible. In addition, by sending FAXes as image data, rather than
+digitised audio, they reduce the required bandwidth of the IP network.
+
+\section t38_core_page_sec_1 What does it do?
+
+\section t38_core_page_sec_2 How does it work?
+
+Timing differences and jitter between two T.38 entities can be a serious problem, if one of those
+entities is a PSTN gateway.
+
+Flow control for non-ECM image data takes advantage of several features of the T.30 specification.
+First, an unspecified number of 0xFF octets may be sent at the start of transmission. This means we
+can add endless extra 0xFF bytes at this point, without breaking the T.30 spec. In practice, we
+cannot add too many, or we will affect the timing tolerance of the T.30 protocol by delaying the
+response at the end of each image. Secondly, just before an end of line (EOL) marker we can pad
+with zero bits. Again, the number is limited only by need to avoid upsetting the timing of the
+step following the non-ECM data.
+*/
+
+enum t30_indicator_types_e
+{
+    T38_IND_NO_SIGNAL = 0,
+    T38_IND_CNG,
+    T38_IND_CED,
+    T38_IND_V21_PREAMBLE,
+    T38_IND_V27TER_2400_TRAINING,
+    T38_IND_V27TER_4800_TRAINING,
+    T38_IND_V29_7200_TRAINING,
+    T38_IND_V29_9600_TRAINING,
+    T38_IND_V17_7200_SHORT_TRAINING,
+    T38_IND_V17_7200_LONG_TRAINING,
+    T38_IND_V17_9600_SHORT_TRAINING,
+    T38_IND_V17_9600_LONG_TRAINING,
+    T38_IND_V17_12000_SHORT_TRAINING,
+    T38_IND_V17_12000_LONG_TRAINING,
+    T38_IND_V17_14400_SHORT_TRAINING,
+    T38_IND_V17_14400_LONG_TRAINING,
+    T38_IND_V8_ANSAM,
+    T38_IND_V8_SIGNAL,
+    T38_IND_V34_CNTL_CHANNEL_1200,
+    T38_IND_V34_PRI_CHANNEL,
+    T38_IND_V34_CC_RETRAIN,
+    T38_IND_V33_12000_TRAINING,
+    T38_IND_V33_14400_TRAINING
+};
+
+enum t38_data_types_e
+{
+    T38_DATA_NONE = -1,
+    T38_DATA_V21 = 0,
+    T38_DATA_V27TER_2400,
+    T38_DATA_V27TER_4800,
+    T38_DATA_V29_7200,
+    T38_DATA_V29_9600,
+    T38_DATA_V17_7200,
+    T38_DATA_V17_9600,
+    T38_DATA_V17_12000,
+    T38_DATA_V17_14400,
+    T38_DATA_V8,
+    T38_DATA_V34_PRI_RATE,
+    T38_DATA_V34_CC_1200,
+    T38_DATA_V34_PRI_CH,
+    T38_DATA_V33_12000,
+    T38_DATA_V33_14400
+};
+
+enum t38_field_types_e
+{
+    T38_FIELD_HDLC_DATA = 0,
+    T38_FIELD_HDLC_SIG_END,
+    T38_FIELD_HDLC_FCS_OK,
+    T38_FIELD_HDLC_FCS_BAD,
+    T38_FIELD_HDLC_FCS_OK_SIG_END,
+    T38_FIELD_HDLC_FCS_BAD_SIG_END,
+    T38_FIELD_T4_NON_ECM_DATA,
+    T38_FIELD_T4_NON_ECM_SIG_END,
+    T38_FIELD_CM_MESSAGE,
+    T38_FIELD_JM_MESSAGE,
+    T38_FIELD_CI_MESSAGE,
+    T38_FIELD_V34RATE
+};
+
+enum t38_field_classes_e
+{
+    T38_FIELD_CLASS_NONE = 0,
+    T38_FIELD_CLASS_HDLC,
+    T38_FIELD_CLASS_NON_ECM,
+};
+
+enum t38_message_types_e
+{
+    T38_TYPE_OF_MSG_T30_INDICATOR = 0,
+    T38_TYPE_OF_MSG_T30_DATA
+};
+
+enum t38_transport_types_e
+{
+    T38_TRANSPORT_UDPTL = 0,
+    T38_TRANSPORT_RTP,
+    T38_TRANSPORT_TCP
+};
+
+#define T38_RX_BUF_LEN  2048
+#define T38_TX_BUF_LEN  16384
+
+typedef struct
+{
+    int                 numocts;
+    const uint8_t       *data;
+} asn1_dyn_oct_str_t;
+
+typedef struct
+{
+    uint8_t             field_data_present;
+    unsigned int       field_type;
+    asn1_dyn_oct_str_t  field_data;
+} data_field_element_t;
+
+typedef struct t38_core_state_s t38_core_state_t;
+
+typedef int (t38_tx_packet_handler_t)(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count);
+
+typedef int (t38_rx_indicator_handler_t)(t38_core_state_t *s, void *user_data, int indicator);
+typedef int (t38_rx_data_handler_t)(t38_core_state_t *s, void *user_data, int data_type, int field_type, const uint8_t *buf, int len);
+typedef int (t38_rx_missing_handler_t)(t38_core_state_t *s, void *user_data, int rx_seq_no, int expected_seq_no);
+
+#include <sys/time.h>
+
+/*
+    Core T.38 state, common to all modes of T.38.
+*/
+struct t38_core_state_s
+{
+    t38_tx_packet_handler_t *tx_packet_handler;
+    void *tx_packet_user_data;
+
+    t38_rx_indicator_handler_t *rx_indicator_handler;
+    t38_rx_data_handler_t *rx_data_handler;
+    t38_rx_missing_handler_t *rx_missing_handler;
+    void *rx_user_data;
+
+    /*! NOTE - Bandwidth reduction shall only be done on suitable Phase C data, i.e., MH, MR
+        and - in the case of transcoding to JBIG - MMR. MMR and JBIG require reliable data
+        transport such as that provided by TCP. When transcoding is selected, it shall be
+        applied to every suitable page in a call. */
+
+    /*! Method 1: Local generation of TCF (required for use with TCP).
+        Method 2: Transfer of TCF is required for use with UDP (UDPTL or RTP).
+        Method 2 is not recommended for use with TCP. */
+    int data_rate_management_method;
+    
+    /*! The emitting gateway may indicate a preference for either UDP/UDPTL, or
+        UDP/RTP, or TCP for transport of T.38 IFP Packets. The receiving device
+        selects the transport protocol. */
+    int data_transport_protocol;
+
+    /*! Indicates the capability to remove and insert fill bits in Phase C, non-ECM
+        data to reduce bandwidth in the packet network. Optional. See Note. */
+    int fill_bit_removal;
+
+    /*! Indicates the ability to convert to/from MMR from/to the line format to
+        improve the compression of the data, and reduce the bandwidth, in the
+        packet network. Optional. See Note. */
+    int mmr_transcoding;
+
+    /*! Indicates the ability to convert to/from JBIG to reduce bandwidth. Optional.
+        See Note. */
+    int jbig_transcoding;
+
+    /*! For UDP (UDPTL or RTP) modes, this option indicates the maximum
+        number of octets that can be stored on the remote device before an overflow
+        condition occurs. It is the responsibility of the transmitting application to
+        limit the transfer rate to prevent an overflow. The negotiated data rate
+        should be used to determine the rate at which data is being removed from
+        the buffer. */
+    int max_buffer_size;
+
+    /*! This option indicates the maximum size of a UDPTL packet or the
+        maximum size of the payload within an RTP packet that can be accepted by
+        the remote device. */
+    int max_datagram_size;
+
+    /*! This is the version number of ITU-T Rec. T.38. New versions shall be
+        compatible with previous versions. */
+    int t38_version;
+    
+    /*! The fastest data rate supported by the T.38 channel. */
+    int fastest_image_data_rate;
+    
+    /*! Internet aware FAX (IAF) mode. */
+    int iaf;
+
+    int tx_seq_no;
+    int rx_expected_seq_no;
+
+    int current_rx_indicator;
+    int current_tx_indicator;
+
+    int missing_packets;
+
+    logging_state_t logging;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Convert the code for an indicator to a short text name.
+    \param indicator The type of indicator.
+    \return A pointer to a short text name for the indicator. */
+const char *t38_indicator(int indicator);
+
+/*! \brief Convert the code for a type of data to a short text name.
+    \param data_type The data type.
+    \return A pointer to a short text name for the data type. */
+const char *t38_data_type(int data_type);
+
+/*! \brief Convert the code for a type of data field to a short text name.
+    \param field_type The field type.
+    \return A pointer to a short text name for the field type. */
+const char *t38_field_type(int field_type);
+
+int t38_core_send_indicator(t38_core_state_t *s, int indicator, int count);
+
+int t38_core_send_data(t38_core_state_t *s, int data_type, int field_type, const uint8_t *msg, int msglen);
+
+/*! \brief Process a received T.38 IFP packet.
+    \param s The T.38 context.
+    \param seq_no The packet sequence number.
+    \param buf The packet contents.
+    \param len The length of the packet contents.
+    \return 0 for OK, else -1. */
+int t38_core_rx_ifp_packet(t38_core_state_t *s, int seq_no, const uint8_t *buf, int len);
+
+/*! Set the method to be used for data rate management, as per the T.38 spec.
+    \param s The T.38 context.
+    \param method 1 for pass TCF across the T.38 link, 2 for handle TCF locally.
+*/
+void t38_set_data_rate_management_method(t38_core_state_t *s, int method);
+
+/*! Set the data transport protocol.
+    \param s The T.38 context.
+    \param data_transport_protocol UDPTL, RTP or TPKT.
+*/
+void t38_set_data_transport_protocol(t38_core_state_t *s, int data_transport_protocol);
+
+/*! Set the non-ECM fill bit removal mode.
+    \param s The T.38 context.
+    \param fill_bit_removal TRUE to remove fill bits across the T.38 link, else FALSE.
+*/
+void t38_set_fill_bit_removal(t38_core_state_t *s, int fill_bit_removal);
+
+/*! Set the MMR transcoding mode.
+    \param s The T.38 context.
+    \param mmr_transcoding TRUE to transcode to MMR across the T.38 link, else FALSE.
+*/
+void t38_set_mmr_transcoding(t38_core_state_t *s, int mmr_transcoding);
+
+/*! Set the JBIG transcoding mode.
+    \param s The T.38 context.
+    \param jbig_transcoding TRUE to transcode to JBIG across the T.38 link, else FALSE.
+*/
+void t38_set_jbig_transcoding(t38_core_state_t *s, int jbig_transcoding);
+
+void t38_set_max_buffer_size(t38_core_state_t *s, int max_buffer_size);
+
+void t38_set_max_datagram_size(t38_core_state_t *s, int max_datagram_size);
+
+int t38_get_fastest_image_data_rate(t38_core_state_t *s);
+
+/*! Set the T.38 version to be emulated.
+    \param s The T.38 context.
+    \param t38_version Version number, as in the T.38 spec.
+*/
+void t38_set_t38_version(t38_core_state_t *s, int t38_version);
+
+t38_core_state_t *t38_core_init(t38_core_state_t *s,
+                                t38_rx_indicator_handler_t *rx_indicator_handler,
+                                t38_rx_data_handler_t *rx_data_handler,
+                                t38_rx_missing_handler_t *rx_missing_handler,
+                                void *rx_user_data);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t38_gateway.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,236 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_gateway.h - An implementation of T.38, less the packet exchange part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_gateway.h,v 1.17 2006/12/07 13:22:26 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_T38_GATEWAY_H_)
+#define _T38_GATEWAY_H_
+
+/*! \page t38_gateway_page T.38 real time FAX over IP PSTN gateway
+\section t38_gateway_page_sec_1 What does it do?
+
+The T.38 gateway facility provides a robust interface between T.38 IP packet streams and
+and 8k samples/second audio streams. It provides the buffering and flow control features needed
+to maximum the tolerance of jitter and packet loss on the IP network.
+
+\section t38_gateway_page_sec_2 How does it work?
+*/
+
+#define T38_RX_BUF_LEN          2048
+#define T38_TX_BUF_LEN          16384
+
+#define T38_TX_HDLC_BUFS        256
+
+/* Make sure the HDLC frame buffers are big enough for ECM frames. */
+#define T38_MAX_HDLC_LEN        260
+
+typedef struct
+{
+    t38_core_state_t t38;
+    
+    int ecm_allowed;
+
+    /*! \brief HDLC message buffers. */
+    uint8_t hdlc_buf[T38_TX_HDLC_BUFS][T38_MAX_HDLC_LEN];
+    /*! \brief HDLC message lengths. */
+    int hdlc_len[T38_TX_HDLC_BUFS];
+    /*! \brief HDLC message status flags. */
+    int hdlc_flags[T38_TX_HDLC_BUFS];
+    /*! \brief HDLC buffer contents. */
+    int hdlc_contents[T38_TX_HDLC_BUFS];
+    /*! \brief HDLC buffer number for input. */
+    int hdlc_in;
+    /*! \brief HDLC buffer number for output. */
+    int hdlc_out;
+
+    /*! \brief Progressively calculated CRC for HDLC messaging received from a modem. */
+    uint16_t crc;
+
+    /*! \brief non-ECM modem receive data buffer */
+    uint8_t rx_data[T38_RX_BUF_LEN];
+    int rx_data_ptr;
+
+    /*! \brief non-ECM modem transmit data buffer */
+    uint8_t non_ecm_tx_data[T38_TX_BUF_LEN];
+    int non_ecm_tx_in_ptr;
+    int non_ecm_tx_out_ptr;
+
+    /*! \brief The location of the most recent EOL marker in the non-ECM data buffer */
+    int non_ecm_tx_latest_eol_ptr;
+    unsigned int bit_stream;
+    /*! \brief The non-ECM flow control fill octet (0xFF before the first data, and 0x00
+               once data has started). */
+    uint8_t non_ecm_flow_control_fill_octet;
+    /*! \brief TRUE if we are in the initial all ones part of non-ECM transmission. */
+    int non_ecm_at_initial_all_ones;
+    /*! \brief TRUE is the end of non-ECM data indication has been received. */
+    int non_ecm_data_finished;
+    /*! \brief The current octet being sent as non-ECM data. */
+    int current_non_ecm_octet;
+    /*! \brief The current bit number in the current non-ECM octet. */
+    int non_ecm_bit_no;
+    /*! \brief A count of the number of non-ECM fill octets generated for flow control control
+               purposes. */
+    int non_ecm_flow_control_fill_octets;
+
+    int current_rx_data_type;
+    int current_rx_field_type;
+    int current_rx_field_class;
+    int in_progress_rx_indicator;
+
+    /*! \brief The current T.38 data type being sent. */
+    int current_tx_data_type;
+
+    /*! \brief TRUE if we are in error correcting (ECM) mode */
+    int ecm_mode;
+    /*! \brief The current bit rate for the fast modem. */
+    int fast_bit_rate;
+    /*! \brief The current fast modem type. */
+    int fast_modem;
+    /*! \brief Use talker echo protection when transmitting. */
+    int use_tep;    
+    /*! \brief TRUE if a carrier is present. Otherwise FALSE. */
+    int rx_signal_present;
+    /*! \brief TRUE if a modem has trained correctly. */
+    int rx_trained;
+
+    /*! \brief A tone generator context used to generate supervisory tones during
+               FAX handling. */
+    tone_gen_state_t tone_gen;
+    /*! \brief An HDLC context used when receiving HDLC messages. */
+    hdlc_rx_state_t hdlcrx;
+
+    /*! \brief HDLC data used when transmitting HDLC messages. */
+    hdlc_tx_state_t hdlctx;
+
+    /*! \brief A V.21 FSK modem context used when transmitting HDLC over V.21
+               messages. */
+    fsk_tx_state_t v21tx;
+    /*! \brief A V.21 FSK modem context used when receiving HDLC over V.21
+               messages. */
+    fsk_rx_state_t v21rx;
+
+#if defined(ENABLE_V17)
+    /*! \brief A V.17 modem context used when sending FAXes at 7200bps, 9600bps
+               12000bps or 14400bps*/
+    v17_tx_state_t v17tx;
+    /*! \brief A V.29 modem context used when receiving FAXes at 7200bps, 9600bps
+               12000bps or 14400bps*/
+    v17_rx_state_t v17rx;
+#endif
+
+    /*! \brief A V.29 modem context used when sending FAXes at 7200bps or
+               9600bps */
+    v29_tx_state_t v29tx;
+    /*! \brief A V.29 modem context used when receiving FAXes at 7200bps or
+               9600bps */
+    v29_rx_state_t v29rx;
+
+    /*! \brief A V.27ter modem context used when sending FAXes at 2400bps or
+               4800bps */
+    v27ter_tx_state_t v27ter_tx;
+    /*! \brief A V.27ter modem context used when receiving FAXes at 2400bps or
+               4800bps */
+    v27ter_rx_state_t v27ter_rx;
+
+    /*! \brief Used to insert timed silences. */
+    silence_gen_state_t silence_gen;
+
+    /*! The current receive signal handler */
+    span_rx_handler_t *rx_handler;
+    void *rx_user_data;
+
+    /*! The current transmit signal handler */
+    span_tx_handler_t *tx_handler;
+    void *tx_user_data;
+    /*! The transmit signal handler to be used when the current one has finished sending. */
+    span_tx_handler_t *next_tx_handler;
+    void *next_tx_user_data;
+
+    /*! The number of octets to send in each image packet (non-ECM or ECM) at the current
+        rate and the current specified packet interval. */
+    int octets_per_data_packet;
+
+    int v21_rx_active;
+    int fast_rx_active;
+    int samples_since_last_tx_packet;
+    int octets_since_last_tx_packet;
+    int short_train;
+
+    /*! \brief TRUE if we need to corrupt the HDLC frame in progress, so the receiver cannot
+               interpret it. */
+    int corrupt_the_frame;
+    
+    int current_rx_type;
+    int current_tx_type;
+
+    logging_state_t logging;
+} t38_gateway_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Initialise a gateway mode T.38 context.
+    \param s The T.38 context.
+    \param tx_packet_handler A callback routine to encapsulate and transmit T.38 packets.
+    \param tx_packet_user_data An opaque pointer passed to the tx_packet_handler routine.
+    \return A pointer to the termination mode T.38 context, or NULL if there was a problem. */
+t38_gateway_state_t *t38_gateway_init(t38_gateway_state_t *s,
+                                      t38_tx_packet_handler_t *tx_packet_handler,
+                                      void *tx_packet_user_data);
+
+/*! Process a block of received FAX audio samples.
+    \brief Process a block of received FAX audio samples.
+    \param s The T.38 context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples unprocessed. */
+int t38_gateway_rx(t38_gateway_state_t *s, const int16_t *amp, int len);
+
+/*! Generate a block of FAX audio samples.
+    \brief Generate a block of FAX audio samples.
+    \param s The T.38 context.
+    \param amp The audio sample buffer.
+    \param max_len The number of samples to be generated.
+    \return The number of samples actually generated.
+*/
+int t38_gateway_tx(t38_gateway_state_t *s, int16_t *amp, int max_len);
+
+/*! Control whether error correcting mode (ECM) is allowed.
+    \brief Control whether error correcting mode (ECM) is allowed.
+    \param s The T.38 context.
+    \param ecm_allowed TRUE is ECM is to be allowed.
+*/
+void t38_gateway_ecm_control(t38_gateway_state_t *s, int ecm_allowed);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t38_terminal.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,109 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_terminal.h - An implementation of T.38, less the packet exchange part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_terminal.h,v 1.11 2006/12/07 13:22:26 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_T38_TERMINAL_H_)
+#define _T38_TERMINAL_H_
+
+/*! \page t38_terminal_page T.38 real time FAX over IP termination
+\section t38_terminal_page_sec_1 What does it do?
+
+\section t38_terminal_page_sec_2 How does it work?
+*/
+
+#define T38_RX_BUF_LEN          2048
+#define T38_TX_BUF_LEN          16384
+
+/* Make sure the HDLC frame buffers are big enough for ECM frames. */
+#define T38_MAX_HDLC_LEN        260
+
+typedef struct
+{
+    t38_core_state_t t38;
+
+    uint8_t hdlc_tx_buf[T38_MAX_HDLC_LEN];
+    int hdlc_tx_len;
+    int hdlc_tx_ptr;
+    int timed_step;
+
+    uint8_t tx_data[T38_TX_BUF_LEN];
+    int tx_out_bytes;
+
+    int next_tx_indicator;
+    int current_tx_data_type;
+
+    /*! \brief TRUE is a carrier is presnt. Otherwise FALSE. */
+    int rx_signal_present;
+
+    /*! \brief A tone generator context used to generate supervisory tones during
+               FAX handling. */
+    tone_gen_state_t tone_gen;
+
+    t30_state_t t30_state;
+
+    int current_rx_type;
+    int current_tx_type;
+
+    /*! \brief TRUE is there has been some T.38 data missed */
+    int missing_data;
+
+    /*! The number of octets to send in each image packet (non-ECM or ECM) at the current
+        rate and the current specified packet interval. */
+    int octets_per_data_packet;
+
+    int32_t samples;
+    int32_t next_tx_samples;
+    int32_t timeout_rx_samples;
+
+    logging_state_t logging;
+} t38_terminal_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int t38_terminal_send_timeout(t38_terminal_state_t *s, int samples);
+
+/*! \brief Initialise a termination mode T.38 context.
+    \param s The T.38 context.
+    \param calling_party TRUE if the context is for a calling party. FALSE if the
+           context is for an answering party.
+    \param tx_packet_handler A callback routine to encapsulate and transmit T.38 packets.
+    \param tx_packet_user_data An opaque pointer passed to the tx_packet_handler routine.
+    \return A pointer to the termination mode T.38 context, or NULL if there was a problem. */
+t38_terminal_state_t *t38_terminal_init(t38_terminal_state_t *s,
+                                        int calling_party,
+                                        t38_tx_packet_handler_t *tx_packet_handler,
+                                        void *tx_packet_user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/t4.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,417 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t4.h - definitions for T.4 fax processing
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t4.h,v 1.29 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_T4_H_)
+#define _T4_H_
+
+/*! \page t4_page T.4 image compression and decompression
+
+\section t4_page_sec_1 What does it do?
+The T.4 image compression and decompression routines implement the 1D and 2D
+encoding methods defined in ITU specification T.4. They also implement the pure
+2D encoding method defined in T.6. These are image compression algorithms used
+for FAX transmission.
+
+\section t4_page_sec_1 How does it work?
+*/
+
+#define T4_COMPRESSION_ITU_T4_1D    1
+#define T4_COMPRESSION_ITU_T4_2D    2
+#define T4_COMPRESSION_ITU_T6       3
+
+#define T4_X_RESOLUTION_R4          4019
+#define T4_X_RESOLUTION_R8          8037
+#define T4_X_RESOLUTION_R16         16074
+
+#define T4_Y_RESOLUTION_STANDARD    3850
+#define T4_Y_RESOLUTION_FINE        7700
+#define T4_Y_RESOLUTION_SUPERFINE   15400
+
+/*!
+    T.4 FAX compression/decompression descriptor. This defines the working state
+    for a single instance of a T.4 FAX compression or decompression channel.
+*/
+typedef struct
+{
+    /* "Background" information about the FAX, which can be stored in a TIFF file. */
+    /*! \brief The vendor of the machine which produced the TIFF file. */ 
+    const char      *vendor;
+    /*! \brief The model of machine which produced the TIFF file. */ 
+    const char      *model;
+    /*! \brief The local ident string. */ 
+    const char      *local_ident;
+    /*! \brief The remote end's ident string. */ 
+    const char      *far_ident;
+    /*! \brief The FAX sub-address. */ 
+    const char      *sub_address;
+    /*! \brief The text which will be used in FAX page header. No text results
+               in no header line. */
+    const char      *header_info;
+
+    /*! \brief The type of compression used between the FAX machines. */
+    int             line_encoding;
+    /*! \brief The minimum number of bits per scan row. This is a timing thing
+               for hardware FAX machines. */
+    int             min_scan_line_bits;
+    
+    int             output_compression;
+    int             output_t4_options;
+
+    time_t          page_start_time;
+
+    int             bytes_per_row;
+    int             image_size;
+    int             image_buffer_size;
+    uint8_t         *image_buffer;
+
+    TIFF            *tiff_file;
+    const char      *file;
+    int             start_page;
+    int             stop_page;
+
+    int             pages_transferred;
+    /*! Column-to-column (X) resolution in pixels per metre. */
+    int             x_resolution;
+    /*! Row-to-row (Y) resolution in pixels per metre. */
+    int             y_resolution;
+    /*! Width of the current page, in pixels. */
+    int             image_width;
+    /*! Current pixel row number. */
+    int             row;
+    /*! Total pixel rows in the current page. */
+    int             image_length;
+    /*! The current number of consecutive bad rows. */
+    int             curr_bad_row_run;
+    /*! The longest run of consecutive bad rows seen in the current page. */
+    int             longest_bad_row_run;
+    /*! The total number of bad rows in the current page. */
+    int             bad_rows;
+
+    /* Decode state */
+    uint32_t        bits_to_date;
+    int             bits;
+
+    /*! \brief This variable is set if we are treating the current row as a 2D encoded
+               one. */
+    int             row_is_2d;
+    int             its_black;
+    int             row_len;
+    /*! \brief This variable is used to record the fact we have seen at least one EOL
+               since we started decoding. We will not try to interpret the received
+               data as an image until we have seen the first EOL. */
+    int             first_eol_seen;
+    /*! \brief This variable is used to count the consecutive EOLS we have seen. If it
+               reaches six, this is the end of the image. */
+    int             consecutive_eols;
+
+    /*! \brief B&W runs for reference line */
+    uint32_t        *ref_runs;
+    /*! \brief B&W runs for current line */
+    uint32_t        *cur_runs;
+
+    uint32_t        *pa;
+    uint32_t        *pb;
+    int             a0;
+    int             b1;
+    /*! \brief The length of the current run of black or white. */
+    int             run_length;
+    int             black_white;
+
+    uint32_t        data;
+    int             bit;
+
+    /*! \brief A point into the image buffer indicating where the last row begins */
+    int             last_row_starts_at;
+    /*! \brief A point into the image buffer indicating where the current row begins */
+    int             row_starts_at;
+    
+    /* Encode state */
+
+    /*! Pointer to the buffer for the current pixel row. */
+    uint8_t         *row_buf;
+    
+    int             bit_pos;
+    int             bit_ptr;
+
+    /*! \brief The reference pixel row for 2D encoding. */
+    uint8_t         *ref_row_buf;
+    /*! \brief The maximum contiguous rows that will be 2D encoded. */
+    int             max_rows_to_next_1d_row;
+    /*! \brief Number of rows left that can be 2D encoded, before a 1D encoded row
+               must be used. */
+    int             rows_to_next_1d_row;
+    /*! \brief The minimum number of encoded bits per row. */
+    int             min_row_bits;
+    /*! \brief The current number of bits in the current encoded row. */
+    int             row_bits;
+
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} t4_state_t;
+
+/*!
+    T.4 FAX compression/decompression statistics.
+*/
+typedef struct
+{
+    /*! \brief The number of pages transferred so far. */
+    int pages_transferred;
+    /*! \brief The number of horizontal pixels in the most recent page. */
+    int width;
+    /*! \brief The number of vertical pixels in the most recent page. */
+    int length;
+    /*! \brief The number of bad pixel rows in the most recent page. */
+    int bad_rows;
+    /*! \brief The largest number of bad pixel rows in a block in the most recent page. */
+    int longest_bad_row_run;
+    /*! \brief The horizontal resolution of the page in pixels per metre */
+    int x_resolution;
+    /*! \brief The vertical resolution of the page in pixels per metre */
+    int y_resolution;
+    /*! \brief The type of compression used between the FAX machines */
+    int encoding;
+    /*! \brief The size of the image, in bytes */
+    int image_size;
+} t4_stats_t;
+    
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Allocate a T.4 transmit handling context, and
+           initialise it.
+    \param file The name of the file to be received.
+    \param output_encoding The output encoding.
+    \return The T.4 context, or NULL. */
+t4_state_t *t4_rx_create(const char *file, int output_encoding);
+
+/*! \brief Prepare for reception of a document.
+    \param s The T.4 context.
+    \param file The name of the file to be received.
+    \param output_encoding The output encoding.
+    \return 0 for success, otherwise -1. */
+int t4_rx_init(t4_state_t *s, const char *file, int output_encoding);
+
+/*! \brief Prepare to receive the next page of the current document.
+    \param s The T.4 context.
+    \return zero for success, -1 for failure. */
+int t4_rx_start_page(t4_state_t *s);
+
+/*! \brief Put a bit of the current document page.
+    \param s The T.4 context.
+    \param bit The data bit.
+    \return TRUE when the bit ends the document page, otherwise FALSE. */
+int t4_rx_put_bit(t4_state_t *s, int bit);
+
+/*! \brief Complete the reception of a page.
+    \param s The T.4 receive context.
+    \return 0 for success, otherwise -1. */
+int t4_rx_end_page(t4_state_t *s);
+
+/*! \brief End reception of a document. Tidy up, close the file and
+           free the context. This should be used to end T.4 reception
+           started with t4_rx_create.
+    \param s The T.4 receive context.
+    \return 0 for success, otherwise -1. */
+int t4_rx_delete(t4_state_t *s);
+
+/*! \brief End reception of a document. Tidy up and close the file.
+           This should be used to end T.4 reception started with
+           t4_rx_init.
+    \param s The T.4 context.
+    \return 0 for success, otherwise -1. */
+int t4_rx_end(t4_state_t *s);
+
+/*! \brief Set the encoding for the received data.
+    \param s The T.4 context.
+    \param encoding The encoding. */
+void t4_rx_set_rx_encoding(t4_state_t *s, int encoding);
+
+/*! \brief Set the expected width of the received image, in pixel columns.
+    \param s The T.4 context.
+    \param columns The number of pixels across the image. */
+void t4_rx_set_image_width(t4_state_t *s, int width);
+
+/*! \brief Set the row-to-row (y) resolution to expect for a received image.
+    \param s The T.4 context.
+    \param resolution The resolution, in pixels per metre. */
+void t4_rx_set_y_resolution(t4_state_t *s, int resolution);
+
+/*! \brief Set the column-to-column (x) resolution to expect for a received image.
+    \param s The T.4 context.
+    \param resolution The resolution, in pixels per metre. */
+void t4_rx_set_x_resolution(t4_state_t *s, int resolution);
+
+/*! \brief Set the sub-address of the fax, for inclusion in the file.
+    \param s The T.4 context.
+    \param sub_address The sub-address string. */
+void t4_rx_set_sub_address(t4_state_t *s, const char *sub_address);
+
+/*! \brief Set the identity of the remote machine, for inclusion in the file.
+    \param s The T.4 context.
+    \param ident The identity string. */
+void t4_rx_set_far_ident(t4_state_t *s, const char *ident);
+
+/*! \brief Set the vendor of the remote machine, for inclusion in the file.
+    \param s The T.4 context.
+    \param vendor The vendor string, or NULL. */
+void t4_rx_set_vendor(t4_state_t *s, const char *vendor);
+
+/*! \brief Set the model of the remote machine, for inclusion in the file.
+    \param s The T.4 context.
+    \param model The model string, or NULL. */
+void t4_rx_set_model(t4_state_t *s, const char *model);
+
+/*! \brief Allocate a T.4 receive handling context, and
+           initialise it.
+    \param s The T.4 context.
+    \param file The name of the file to be sent.
+    \return 0 for success, otherwise -1. */
+t4_state_t *t4_tx_create(const char *file, int start_page, int stop_page);
+
+/*! \brief Prepare for transmission of a document.
+    \param s The T.4 context.
+    \param file The name of the file to be sent.
+    \param start_page The first page to send. -1 for no restriction.
+    \param stop_page The last page to send. -1 for no restriction.
+    \return The T.4 context, or NULL. */
+int t4_tx_init(t4_state_t *s, const char *file, int start_page, int stop_page);
+
+/*! \brief Prepare to send the next page of the current document.
+    \param s The T.4 context.
+    \return zero for success, -1 for failure. */
+int t4_tx_start_page(t4_state_t *s);
+
+/*! \brief Prepare the current page for a resend.
+    \param s The T.4 context.
+    \return zero for success, -1 for failure. */
+int t4_tx_restart_page(t4_state_t *s);
+
+/*! \brief Check for the existance of the next page. This information can
+    be needed before it is determined that the current page is finished with.
+    \param s The T.4 context.
+    \return zero for next page found, -1 for failure. */
+int t4_tx_more_pages(t4_state_t *s);
+
+/*! \brief Complete the sending of a page.
+    \param s The T.4 context.
+    \return zero for success, -1 for failure. */
+int t4_tx_end_page(t4_state_t *s);
+
+/*! \brief Get the next bit of the current document page. The document will
+           be padded for the current minimum scan line time. If the
+           file does not contain an RTC (return to control) code at
+           the end of the page, one will be added.
+    \param s The T.4 context.
+    \return The next bit (i.e. 0 or 1). For the last bit of data, bit 1 is
+            set (i.e. the returned value is 2 or 3). */
+int t4_tx_get_bit(t4_state_t *s);
+
+/*! \brief Return the next bit of the current document page, without actually
+           moving forward in the buffer. The document will be padded for the
+           current minimum scan line time. If the file does not contain an
+           RTC (return to control) code at the end of the page, one will be
+           added.
+    \param s The T.4 context.
+    \return The next bit (i.e. 0 or 1). For the last bit of data, bit 1 is
+            set (i.e. the returned value is 2 or 3). */
+int t4_tx_check_bit(t4_state_t *s);
+
+/*! \brief End the transmission of a document. Tidy up, close the file and
+           free the context. This should be used to end T.4 transmission
+           started with t4_tx_create.
+    \param s The T.4 context.
+    \return 0 for success, otherwise -1. */
+int t4_tx_delete(t4_state_t *s);
+
+/*! \brief End the transmission of a document. Tidy up and close the file.
+           This should be used to end T.4 transmission started with t4_tx_init.
+    \param s The T.4 context.
+    \return 0 for success, otherwise -1. */
+int t4_tx_end(t4_state_t *s);
+
+/*! \brief Set the encoding for the encoded data.
+    \param s The T.4 context.
+    \param encoding The encoding. */
+void t4_tx_set_tx_encoding(t4_state_t *s, int encoding);
+
+/*! \brief Set the minimum number of encoded bits per row. This allows the
+           makes the encoding process to be set to comply with the minimum row
+           time specified by a remote receiving machine.
+    \param s The T.4 context.
+    \param bits The minimum number of bits per row. */
+void t4_tx_set_min_row_bits(t4_state_t *s, int bits);
+
+/*! \brief Set the identity of the local machine, for inclusion in page headers.
+    \param s The T.4 context.
+    \param ident The identity string. */
+void t4_tx_set_local_ident(t4_state_t *s, const char *ident);
+
+/*! Set the info field, included in the header line included in each page of an encoded
+    FAX. This is a string of up to 50 characters. Other information (date, local ident, etc.)
+    are automatically included in the header. If the header info is set to NULL or a zero
+    length string, no header lines will be added to the encoded FAX.
+    \brief Set the header info.
+    \param s The T.4 context.
+    \param info A string, of up to 50 bytes, which will form the info field. */
+void t4_tx_set_header_info(t4_state_t *s, const char *info);
+
+/*! \brief Get the row-to-row (y) resolution of the current page.
+    \param s The T.4 context.
+    \return The resolution, in pixels per metre. */
+int t4_tx_get_y_resolution(t4_state_t *s);
+
+/*! \brief Get the column-to-column (x) resolution of the current page.
+    \param s The T.4 context.
+    \return The resolution, in pixels per metre. */
+int t4_tx_get_x_resolution(t4_state_t *s);
+
+/*! \brief Get the width of the current page, in pixel columns.
+    \param s The T.4 context.
+    \return The number of columns. */
+int t4_tx_get_image_width(t4_state_t *s);
+
+/*! Get the current image transfer statistics. 
+    \brief Get the current transfer statistics.
+    \param s The T.4 context.
+    \param t A pointer to a statistics structure. */
+void t4_get_transfer_statistics(t4_state_t *s, t4_stats_t *t);
+
+/*! Get the short text name of an encoding format. 
+    \brief Get the short text name of an encoding format.
+    \param encoding The encoding type.
+    \return A pointer to the string. */
+const char *t4_encoding_to_str(int encoding);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/telephony.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,67 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * telephony.h - some very basic telephony definitions
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: telephony.h,v 1.9 2006/11/28 16:59:57 steveu Exp $
+ */
+
+#if !defined(_TELEPHONY_H_)
+#define _TELEPHONY_H_
+
+#define SAMPLE_RATE             8000
+
+/* This is based on A-law, but u-law is only 0.03dB different */
+#define DBM0_MAX_POWER          (3.14f + 3.02f)
+#define DBM0_MAX_SINE_POWER     (3.14f)
+/* This is based on the ITU definition of dbOv in G.100.1 */
+#define DBOV_MAX_POWER          (0.0f)
+#define DBOV_MAX_SINE_POWER     (-3.02f)
+
+/*! \brief A handler for pure receive. The buffer cannot be altered. */
+typedef int (span_rx_handler_t)(void *s, const int16_t amp[], int len);
+
+/*! \brief A handler for receive, where the buffer can be altered. */
+typedef int (span_mod_handler_t)(void *s, int16_t amp[], int len);
+
+/*! \brief A handler for transmit, where the buffer will be filled. */
+typedef int (span_tx_handler_t)(void *s, int16_t amp[], int max_len);
+
+#define ms_to_samples(t)    (((t)*SAMPLE_RATE)/1000)
+
+#if !defined(FALSE)
+#define FALSE 0
+#endif
+#if !defined(TRUE)
+#define TRUE (!FALSE)
+#endif
+
+#if defined(__cplusplus)
+/* C++ doesn't seem to have sane rounding functions/macros yet */
+#ifndef _MSC_VER
+#define lrint(x) ((long int) (x))
+#define lrintf(x) ((long int) (x))
+#endif
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/time_scale.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,98 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * time_scale.h - Time scaling for linear speech data
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: time_scale.h,v 1.7 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_TIME_SCALE_H_)
+#define _TIME_SCALE_H_
+
+/*! \page time_scale_page Time scaling speech
+\section time_scale_page_sec_1 What does it do?
+The time scaling module allows speech files to be played back at a
+different speed, from the speed at which they were recorded. If this
+were done by simply speeding up or slowing down replay, the pitch of
+the voice would change, and sound very odd. This modules keeps the pitch
+of the voice normal.
+
+\section time_scale_page_sec_2 How does it work?
+The time scaling module is based on the Pointer Interval Controlled
+OverLap and Add (PICOLA) method, developed by Morita Naotaka.
+Mikio Ikeda has an excellent web page on this subject at
+http://keizai.yokkaichi-u.ac.jp/~ikeda/research/picola.html
+There is also working code there. This implementation uses
+exactly the same algorithms, but the code is a complete rewrite.
+Mikio's code batch processes files. This version works incrementally
+on streams, and allows multiple streams to be processed concurrently.
+*/
+
+#define TIME_SCALE_MIN_PITCH    60
+#define TIME_SCALE_MAX_PITCH    250
+#define TIME_SCALE_BUF_LEN      (2*SAMPLE_RATE/TIME_SCALE_MIN_PITCH)
+
+typedef struct
+{
+    double rate;
+    double rcomp;
+    double rate_nudge;
+    int fill;
+    int lcp;
+    int16_t buf[TIME_SCALE_BUF_LEN];
+} time_scale_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a time scale context. This must be called before the first
+    use of the context, to initialise its contents.
+    \brief Initialise a time scale context.
+    \param s The time scale context.
+    \param rate The ratio between the output speed and the input speed.
+    \return 0 if initialised OK, else -1. */
+int time_scale_init(time_scale_t *s, float rate);
+
+/*! Change the time scale rate.
+    \brief Change the time scale rate.
+    \param s The time scale context.
+    \param rate The ratio between the output speed and the input speed.
+    \return 0 if changed OK, else -1. */
+int time_scale_rate(time_scale_t *s, float rate);
+
+/*! Time scale a chunk of audio samples.
+    \brief Time scale a chunk of audio samples.
+    \param s The time sclae context.
+    \param out The output audio sample buffer.
+    \param in The input audio sample buffer.
+    \param len The number of input samples.
+    \return The number of output samples.
+*/
+int time_scale(time_scale_t *s, int16_t out[], int16_t in[], int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/timing.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,61 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * timing.h - Provide access to the Pentium/Athlon TSC timer register
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: timing.h,v 1.6 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_TIMING_H_)
+#define _TIMING_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__i386__)
+static __inline__ uint64_t rdtscll(void)
+{
+    uint64_t now;
+
+    __asm__ __volatile__(" rdtsc\n" : "=A" (now));
+    return now;
+}
+/*- End of function --------------------------------------------------------*/
+#elif defined(__x86_64__)
+static __inline__ uint64_t rdtscll(void)
+{
+    unsigned int __a;
+    unsigned int __d;
+
+    __asm__ __volatile__(" rdtsc\n" : "=a" (__a), "=d" (__d));
+    return ((unsigned long) __a) | (((unsigned long) __d) << 32);
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/tone_detect.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,108 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * tone_detect.h - General telephony tone detection, and specific
+ *                 detection of Bell MF, and MFC/R2.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001, 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: tone_detect.h,v 1.27 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_TONE_DETECT_H_)
+#define _TONE_DETECT_H_
+
+/*!
+    Floating point Goertzel filter descriptor.
+*/
+typedef struct
+{
+    float fac;
+    int samples;
+} goertzel_descriptor_t;
+
+/*!
+    Floating point Goertzel filter state descriptor.
+*/
+typedef struct
+{
+    float v2;
+    float v3;
+    float fac;
+    int samples;
+    int current_sample;
+} goertzel_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! \brief Create a descriptor for use with either a Goertzel transform */
+void make_goertzel_descriptor(goertzel_descriptor_t *t,
+                              float freq,
+                              int samples);
+
+/*! \brief Initialise the state of a Goertzel transform.
+    \param s The Goertzel context. If NULL, a context is allocated with malloc.
+    \param t The Goertzel descriptor.
+    \return A pointer to the Goertzel state. */
+goertzel_state_t *goertzel_init(goertzel_state_t *s,
+                                goertzel_descriptor_t *t);
+
+/*! \brief Reset the state of a Goertzel transform.
+    \param s The Goertzel context.
+    \param t The Goertzel descriptor.
+    \return A pointer to the Goertzel state. */
+void goertzel_reset(goertzel_state_t *s);
+
+/*! \brief Update the state of a Goertzel transform.
+    \param s The Goertzel context
+    \param amp The samples to be transformed
+    \param samples The number of samples
+    \return The number of samples unprocessed */
+int goertzel_update(goertzel_state_t *s,
+                    const int16_t amp[],
+                    int samples);
+
+/*! \brief Evaluate the final result of a Goertzel transform.
+    \param s The Goertzel context
+    \return The result of the transform. */
+float goertzel_result(goertzel_state_t *s);
+
+/*! \brief Update the state of a Goertzel transform.
+    \param s The Goertzel context
+    \param amp The sample to be transformed. */
+static __inline__ void goertzel_sample(goertzel_state_t *s, int16_t amp)
+{
+    float v1;
+
+    v1 = s->v2;
+    s->v2 = s->v3;
+    s->v3 = s->fac*s->v2 - v1 + amp;
+    s->current_sample++;
+}
+/*- End of function --------------------------------------------------------*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/tone_generate.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,145 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * tone_generate.h - General telephony tone generation, and specific
+ *                   generation of Bell MF, MFC/R2 and network supervisory tones.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: tone_generate.h,v 1.24 2006/11/24 12:34:55 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_TONE_GENERATE_H_)
+#define _TONE_GENERATE_H_
+
+/*! \page tone_generation_page Tone generation
+\section tone_generation_page_sec_1 What does it do?
+The tone generation module provides for the generation of cadenced tones,
+suitable for a wide range of telephony applications. 
+
+\section tone_generation_page_sec_2 How does it work?
+Oscillators are a problem. They oscillate due to instability, and yet we need
+them to behave in a stable manner. A look around the web will reveal many papers
+on this subject. Many describe rather complex solutions to the problem. However,
+we are only concerned with telephony applications. It is possible to generate
+the tones we need with a very simple efficient scheme. It is also practical to
+use an exhaustive test to prove the oscillator is stable under all the
+conditions in which we will use it. 
+*/
+
+/*!
+    Cadenced dual tone generator descriptor.
+*/
+typedef struct
+{
+    int32_t phase_rate[2];
+    float gain[2];
+    int modulate;
+    
+    int duration[4];
+
+    int repeat;
+} tone_gen_descriptor_t;
+
+/*!
+    Cadenced dual tone generator state descriptor. This defines the state of
+    a single working instance of a generator.
+*/
+typedef struct
+{
+    int32_t phase_rate[2];
+    float gain[2];
+    int modulate;
+
+    uint32_t phase[2];
+
+    int duration[4];
+    
+    int repeat;
+
+    int current_section;
+    int current_position;
+} tone_gen_state_t;
+
+typedef struct
+{
+    /*! First freq */
+    int         f1;
+    /*! Second freq. 0 for none. Negative for an AM modulation tone. */
+    int         f2;
+    /*! Level of the first freq (dBm0) */
+    int8_t      level1;
+    /*! Level of the second freq (dBm0), or % modulation for AM */
+    int8_t      level2;
+    /*! Tone on time (ms) */
+    uint16_t    on_time1;
+    /*! Minimum post tone silence (ms) */
+    uint16_t    off_time1;
+    /*! Tone on time (ms) */
+    uint16_t    on_time2;
+    /*! Minimum post tone silence (ms) */
+    uint16_t    off_time2;
+    /*! TRUE if cyclic tone, FALSE for one shot. */
+    int8_t      repeat;
+} cadenced_tone_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void make_tone_descriptor(tone_gen_descriptor_t *desc, cadenced_tone_t *tone);
+
+/*! Create a tone generator descriptor
+    \brief Create a tone generator descriptor
+    \param s The descriptor
+    \param f1 The first frequency, in Hz
+    \param l1 The level of the first frequency, in dBm0
+    \param f2 0 for no second frequency, a positive number for the second frequency,
+           in Hz, or a negative number for an AM modulation frequency, in Hz
+    \param l2 The level of the second frequency, in dBm0, or the percentage modulation depth
+           for an AM modulated tone.
+    \param d1 x
+    \param d2 x
+    \param d3 x
+    \param d4 x
+    \param repeat x */
+void make_tone_gen_descriptor(tone_gen_descriptor_t *s,
+                              int f1,
+                              int l1,
+                              int f2,
+                              int l2,
+                              int d1,
+                              int d2,
+                              int d3,
+                              int d4,
+                              int repeat);
+
+void tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t);
+
+int tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v17rx.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,411 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v17rx.h - ITU V.17 modem receive part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v17rx.h,v 1.35 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_V17RX_H_)
+#define _V17RX_H_
+
+/*! \page v17rx_page The V.17 receiver
+\section v17rx_page_sec_1 What does it do?
+The V.17 receiver implements the receive side of a V.17 modem. This can operate
+at data rates of 14400, 12000, 9600 and 7200 bits/second. The audio input is a stream
+of 16 bit samples, at 8000 samples/second. The transmit and receive side of V.17
+modems operate independantly. V.17 is mostly used for FAX transmission over PSTN
+lines, where it provides the standard 14400 bits/second rate. 
+
+\section v17rx_page_sec_2 How does it work?
+V.17 uses QAM modulation, at 2400 baud, and trellis coding. Constellations with
+16, 32, 64, and 128 points are defined. After one bit per baud is absorbed by the
+trellis coding, this gives usable bit rates of 7200, 9600, 12000, and 14400 per
+second.
+
+V.17 specifies a training sequence at the start of transmission, which makes the
+design of a V.17 receiver relatively straightforward. The first stage of the
+training sequence consists of 256
+symbols, alternating between two constellation positions. The receiver monitors
+the signal power, to sense the possible presence of a valid carrier. When the
+alternating signal begins, the power rising above a minimum threshold (-43dBm0)
+causes the main receiver computation to begin. The initial measured power is
+used to quickly set the gain of the receiver. After this initial settling, the
+front end gain is locked, and the adaptive equalizer tracks any subsequent
+signal level variation. The signal is oversampled to 24000 samples/second (i.e.
+signal, zero, zero, signal, zero, zero, ...) and fed to a complex root raised
+cosine pulse shaping filter. This filter has been modified from the conventional
+root raised cosine filter, by shifting it up the band, to be centred at the nominal
+carrier frequency. This filter interpolates the samples, pulse shapes, and performs
+a fractional sample delay at the same time. 192 sets of filter coefficients are used
+to achieve a set of finely spaces fractional sample delays, between zero and
+one sample. By choosing every fifth sample, and the appropriate set of filter
+coefficients, the properly tuned symbol tracker can select data samples at 4800
+samples/second from points within 0.28 degrees of the centre and mid-points of
+each symbol. The output of the filter is multiplied by a complex carrier, generated
+by a DDS. The result is a baseband signal, requiring no further filtering, apart from
+an adaptive equalizer. The baseband signal is fed to a T/2 adaptive equalizer.
+A band edge component maximisation algorithm is used to tune the sampling, so the samples
+fed to the equalizer are close to the mid point and edges of each symbol. Initially
+the algorithm is very lightly damped, to ensure the symbol alignment pulls in
+quickly. Because the sampling rate will not be precisely the same as the
+transmitter's (the spec. says the symbol timing should be within 0.01%), the
+receiver constantly evaluates and corrects this sampling throughout its
+operation. During the symbol timing maintainence phase, the algorithm uses
+a heavier damping.
+
+The carrier is specified as 1800Hz +- 1Hz at the transmitter, and 1800 +-7Hz at
+the receiver. The receive carrier would only be this inaccurate if the link
+includes FDM sections. These are being phased out, but the design must still
+allow for the worst case. Using an initial 1800Hz signal for demodulation gives
+a worst case rotation rate for the constellation of about one degree per symbol.
+Once the symbol timing synchronisation algorithm has been given time to lock to the
+symbol timing of the initial alternating pattern, the phase of the demodulated signal
+is recorded on two successive symbols - once for each of the constellation positions.
+The receiver then tracks the symbol alternations, until a large phase jump occurs.
+This signifies the start of the next phase of the training sequence. At this
+point the total phase shift between the original recorded symbol phase, and the
+symbol phase just before the phase jump occurred is used to provide a coarse
+estimation of the rotation rate of the constellation, and it current absolute
+angle of rotation. These are used to update the current carrier phase and phase
+update rate in the carrier DDS. The working data already in the pulse shaping
+filter and equalizer buffers is given a similar step rotation to pull it all
+into line. From this point on, a heavily damped integrate and dump approach,
+based on the angular difference between each received constellation position and
+its expected position, is sufficient to track the carrier, and maintain phase
+alignment. A fast rough approximator for the arc-tangent function is adequate
+for the estimation of the angular error. 
+
+The next phase of the training sequence is a scrambled sequence of two
+particular symbols. We train the T/2 adaptive equalizer using this sequence. The
+scrambling makes the signal sufficiently diverse to ensure the equalizer
+converges to the proper generalised solution. At the end of this sequence, the
+equalizer should be sufficiently well adapted that is can correctly resolve the
+full QAM constellation. However, the equalizer continues to adapt throughout
+operation of the modem, fine tuning on the more complex data patterns of the
+full QAM constellation. 
+
+In the last phase of the training sequence, the modem enters normal data
+operation, with a short defined period of all ones as data. As in most high
+speed modems, data in a V.17 modem passes through a scrambler, to whiten the
+spectrum of the signal. The transmitter should initialise its data scrambler,
+and pass the ones through it. At the end of the ones, real data begins to pass
+through the scrambler, and the transmit modem is in normal operation. The
+receiver tests that ones are really received, in order to verify the modem
+trained correctly. If all is well, the data following the ones is fed to the
+application, and the receive modem is up and running. Unfortunately, some
+transmit side of some real V.17 modems fail to initialise their scrambler before
+sending the ones. This means the first 23 received bits (the length of the
+scrambler register) cannot be trusted for the test. The receive modem,
+therefore, only tests that bits starting at bit 24 are really ones.
+
+The V.17 signal is trellis coded. Two bits of each symbol are convolutionally coded
+to form a 3 bit trellis code - the two original bits, plus an extra redundant bit. It
+is possible to ignore the trellis coding, and just decode the non-redundant bits.
+However, the noise performance of the receiver would suffer. Using a proper
+trellis decoder adds several dB to the noise tolerance to the receiving modem. Trellis
+coding seems quite complex at first sight, but is fairly straightforward once you
+get to grips with it.
+
+Trellis decoding tracks the data in terms of the possible states of the convolutional
+coder at the transmitter. There are 8 possible states of the V.17 coder. The first
+step in trellis decoding is to find the best candidate constellation point
+for each of these 8 states. One of thse will be our final answer. The constellation
+has been designed so groups of 8 are spread fairly evenly across it. Locating them
+is achieved is a reasonably fast manner, by looking up the answers in a set of space
+map tables. The disadvantage is the tables are potentially large enough to affect
+cache performance. The trellis decoder works over 16 successive symbols. The result
+of decoding is not known until 16 symbols after the data enters the decoder. The
+minimum total accumulated mismatch between each received point and the actual
+constellation (termed the distance) is assessed for each of the 8 states. A little
+analysis of the coder shows that each of the 8 current states could be arrived at
+from 4 different previous states, through 4 different constellation bit patterns.
+For each new state, the running total distance is arrived at by inspecting a previous
+total plus a new distance for the appropriate 4 previous states. The minimum of the 4
+values becomes the new distance for the state. Clearly, a mechanism is needed to stop
+this distance from growing indefinitely. A sliding window, and several other schemes
+are possible. However, a simple single pole IIR is very simple, and provides adequate
+results.
+
+For each new state we store the constellation bit pattern, or path, to that state, and
+the number of the previous state. We find the minimum distance amongst the 8 new
+states for each new symbol. We then trace back through the states, until we reach the
+one 16 states ago which leads to the current minimum distance. The bit pattern stored
+there is the error corrected bit pattern for that symbol.
+
+So, what does Trellis coding actually achieve? TCM is easier to understand by looking
+at the V.23bis modem spec. The V.32bis spec. is very similar to V.17, except that it
+is a full duplex modem and has non-TCM options, as well as the TCM ones in V.17.
+
+V32bis defines two options for pumping 9600 bits per second down a phone line - one
+with and one without TCM. Both run at 2400 baud. The non-TCM one uses simple 16 point
+QAM on the raw data. The other takes two out of every four raw bits, and convolutionally
+encodes them to 3. Now we have 5 bits per symbol, and we need 32 point QAM to send the
+data.
+
+The raw error rate from simple decoding of the 32 point QAM is horrible compared to
+decoding the 16 point QAM. If a point decoded from the 32 point QAM is wrong, the likely
+correct choice should be one of the adjacent ones. It is unlikely to have been one that
+is far away across the constellation, unless there was a huge noise spike, interference,
+or something equally nasty. Now, the 32 point symbols do not exist in isolation. There
+was a kind of temporal smearing in the convolutional coding. It created a well defined
+dependency between successive symbols. If we knew for sure what the last few symbols
+were, they would lead us to a limited group of possible values for the current symbol,
+constrained by the behaviour of the convolutional coder. If you look at how the symbols
+were mapped to constellation points, you will see the mapping tries to spread those
+possible symbols as far apart as possible. This will leave only one that is pretty
+close to the received point, which must be the correct choice. However, this assumes
+we know the last few symbols for sure. Since we don't, we have a bit more work to do
+to achieve reliable decoding.
+
+Instead of decoding to the nearest point on the constellation, we decode to a group of
+likely constellation points in the neighbourhood of the received point. We record the
+mismatch for each - that is the distance across the constellation between the received
+point and the group of nearby points. To avoid square roots, recording x2 + y2 can be
+good enough. Symbol by symbol, we record this information. After a few symbols we can
+stand back and look at the recorded information.
+
+For each symbol we have a set of possible symbol values and error metric pairs. The
+dependency between symbols, created by the convolutional coder, means some paths from
+symbol to symbol are possible and some are not. It we trace back through the possible
+symbol to symbol paths, and total up the error metric through those paths, we end up
+with a set of figures of merit (or more accurately figures of demerit, since
+larger == worse) for the likelihood of each path being the correct one. The path with
+the lowest total metric is the most likely, and gives us our final choice for what we
+think the current symbol really is.
+
+That was hard work. It takes considerable computation to do this selection and traceback,
+symbol by symbol. We need to get quite a lot from this. It needs to drive the error rate
+down so far that is compensates for the much higher error rate due to the larger
+constellation, and then buys us some actual benefit. Well in the example we are looking
+at - V.32bis at 9600bps - it works out the error rate from the TCM option is like using
+the non-TCM option with several dB more signal to noise ratio. That's nice. The non-TCM
+option is pretty reasonable on most phone lines, but a better error rate is always a
+good thing. However, V32bis includes a 14,400bps option. That uses 2400 baud, and 6 bit
+symbols. Convolutional encoding increases that to 7 bits per symbol, by taking 2 bits and
+encoding them to 3. This give a 128 point QAM constellation. Again, the difference between
+using this, and using just an uncoded 64 point constellation is equivalent to maybe 5dB of
+extra signal to noise ratio. However, in this case it is the difference between the modem
+working only on the most optimal lines, and being widely usable across most phone lines.
+TCM absolutely transformed the phone line modem business.
+*/
+
+/* Target length for the equalizer is about 63 taps, to deal with the worst stuff
+   in V.56bis. */
+#define V17_EQUALIZER_PRE_LEN       7  /* this much before the real event */
+#define V17_EQUALIZER_POST_LEN      7  /* this much after the real event */
+#define V17_EQUALIZER_MASK          63 /* one less than a power of 2 >= (V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN) */
+
+#define V17_RX_FILTER_STEPS         27
+
+/* We can store more trellis depth that we look back over, so that we can push out a group
+   of symbols in one go, giving greater processing efficiency, at the expense of a bit more
+   latency through the modem. */
+/* Right now we don't take advantage of this optimisation. */
+#define V17_TRELLIS_STORAGE_DEPTH   16
+#define V17_TRELLIS_LOOKBACK_DEPTH  16
+
+/*!
+    V.17 modem receive side descriptor. This defines the working state for a
+    single instance of a V.17 modem receiver.
+*/
+typedef struct
+{
+    /*! \brief The bit rate of the modem. Valid values are 7200 9600, 12000 and 14400. */
+    int bit_rate;
+    /*! \brief The callback function used to put each bit received. */
+    put_bit_func_t put_bit;
+    /*! \brief A user specified opaque pointer passed to the put_but routine. */
+    void *user_data;
+    /*! \brief A callback function which may be enabled to report every symbol's
+               constellation position. */
+    qam_report_handler_t *qam_report;
+    /*! \brief A user specified opaque pointer passed to the qam_report callback
+               routine. */
+    void *qam_user_data;
+
+    /*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
+    float rrc_filter[2*V17_RX_FILTER_STEPS];
+    /*! \brief Current offset into the RRC pulse shaping filter buffer. */
+    int rrc_filter_step;
+
+    /*! \brief The state of the differential decoder */
+    int diff;
+    /*! \brief The register for the data scrambler. */
+    unsigned int scramble_reg;
+    /*! \brief TRUE if the short training sequence is to be used. */
+    int short_train;
+    int in_training;
+    int training_count;
+    float training_error;
+    int carrier_present;
+    int16_t last_sample;
+
+    /*! \brief The current phase of the carrier (i.e. the DDS parameter). */
+    uint32_t carrier_phase;
+    /*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
+    int32_t carrier_phase_rate;
+    /*! \brief The carrier update rate saved for reuse when using short training. */
+    int32_t carrier_phase_rate_save;
+    float carrier_track_p;
+    float carrier_track_i;
+
+    /*! \brief The received signal power monitor. */
+    power_meter_t power;
+    int32_t carrier_on_power;
+    int32_t carrier_off_power;
+    float agc_scaling;
+    float agc_scaling_save;
+
+    float eq_delta;
+    /*! \brief The adaptive equalizer coefficients */
+    complexf_t eq_coeff[V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN];
+    complexf_t eq_coeff_save[V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN];
+    complexf_t eq_buf[V17_EQUALIZER_MASK + 1];
+    /*! \brief Current offset into equalizer buffer. */
+    int eq_step;
+    int eq_put_step;
+
+    /*! \brief The current half of the baud. */
+    int baud_half;
+    /*! \brief Band edge symbol sync. filter state. */
+    float symbol_sync_low[2];
+    float symbol_sync_high[2];
+    float symbol_sync_dc_filter[2];
+    float baud_phase;
+    /*! \brief The total symbol timing correction since the carrier came up.
+               This is only for performance analysis purposes. */
+    int total_baud_timing_correction;
+
+    /*! \brief Starting phase angles for the coarse carrier aquisition step. */
+    int32_t start_angles[2];
+    /*! \brief History list of phase angles for the coarse carrier aquisition step. */
+    int32_t angles[16];
+    /*! \brief A pointer to the current constellation. */
+    const complexf_t *constellation;
+    /*! \brief A pointer to the current space map. There is a space map for
+               each trellis state. */
+    int space_map;
+    /*! \brief The number of bits in each symbol at the current bit rate. */
+    int bits_per_symbol;
+
+    /*! \brief Current pointer to the trellis buffers */
+    int trellis_ptr;
+    /*! \brief The trellis. */
+    int full_path_to_past_state_locations[V17_TRELLIS_STORAGE_DEPTH][8];
+    /*! \brief The trellis. */
+    int past_state_locations[V17_TRELLIS_STORAGE_DEPTH][8];
+    /*! \brief Euclidean distances (actually the sqaures of the distances)
+               from the last states of the trellis. */
+    float distances[8];
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} v17_rx_state_t;
+
+extern const complexf_t v17_14400_constellation[128];
+extern const complexf_t v17_12000_constellation[64];
+extern const complexf_t v17_9600_constellation[32];
+extern const complexf_t v17_7200_constellation[16];
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a V.17 modem receive context.
+    \brief Initialise a V.17 modem receive context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
+    \param put_bit The callback routine used to put the received data.
+    \param user_data An opaque pointer passed to the put_bit routine.
+    \return A pointer to the modem context, or NULL if there was a problem. */
+v17_rx_state_t *v17_rx_init(v17_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data);
+
+/*! Reinitialise an existing V.17 modem receive context.
+    \brief Reinitialise an existing V.17 modem receive context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
+    \param short_train TRUE if a short training sequence is expected.
+    \return 0 for OK, -1 for bad parameter */
+int v17_rx_restart(v17_rx_state_t *s, int rate, int short_train);
+
+/*! Release a V.17 modem receive context.
+    \brief Release a V.17 modem receive context.
+    \param s The modem context.
+    \return 0 for OK */
+int v17_rx_release(v17_rx_state_t *s);
+
+/*! Change the put_bit function associated with a V.17 modem receive context.
+    \brief Change the put_bit function associated with a V.17 modem receive context.
+    \param s The modem context.
+    \param put_bit The callback routine used to handle received bits.
+    \param user_data An opaque pointer. */
+void v17_rx_set_put_bit(v17_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
+
+/*! Process a block of received V.17 modem audio samples.
+    \brief Process a block of received V.17 modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+*/
+void v17_rx(v17_rx_state_t *s, const int16_t amp[], int len);
+
+/*! Get a snapshot of the current equalizer coefficients.
+    \brief Get a snapshot of the current equalizer coefficients.
+    \param s The modem context.
+    \param coeffs The vector of complex coefficients.
+    \return The number of coefficients in the vector. */
+int v17_rx_equalizer_state(v17_rx_state_t *s, complexf_t **coeffs);
+
+/*! Get the current received carrier frequency.
+    \param s The modem context.
+    \return The frequency, in Hertz. */
+float v17_rx_carrier_frequency(v17_rx_state_t *s);
+
+/*! Get the current symbol timing correction since startup.
+    \param s The modem context.
+    \return The correction. */
+float v17_rx_symbol_timing_correction(v17_rx_state_t *s);
+
+/*! Get a current received signal power.
+    \param s The modem context.
+    \return The signal power, in dBm0. */
+float v17_rx_signal_power(v17_rx_state_t *s);
+
+/*! Set the power level at which the carrier detection will cut in
+    \param s The modem context.
+    \param cutoff The signal cutoff power, in dBm0. */
+void v17_rx_signal_cutoff(v17_rx_state_t *s, float cutoff);
+
+/*! Set a handler routine to process QAM status reports
+    \param s The modem context.
+    \param handler The handler routine.
+    \param user_data An opaque pointer passed to the handler routine. */
+void v17_rx_set_qam_report_handler(v17_rx_state_t *s, qam_report_handler_t *handler, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v17tx.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,198 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v17tx.h - ITU V.17 modem transmit part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v17tx.h,v 1.26 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_V17TX_H_)
+#define _V17TX_H_
+
+/*! \page v17tx_page The V.17 transmitter
+\section v17tx_page_sec_1 What does it do?
+The V.17 transmitter implements the transmit side of a V.17 modem. This can
+operate at data rates of 14400, 12000, 9600 and 7200 bits/second. The audio
+output is a stream of 16 bit samples, at 8000 samples/second. The transmit and
+receive side of V.17 modems operate independantly. V.17 is mostly used for FAX
+transmission, where it provides the standard 14400 bits/second rate. 
+
+\section v17tx_page_sec_2 How does it work?
+V.17 uses QAM modulation and trellis coding. The data to be transmitted is
+scrambled, to whiten it. The least significant 2 bits of each symbol are then
+differentially encoded, using a simple lookup approach. The resulting 2 bits are
+convolutionally encoded, producing 3 bits. The extra bit is the redundant bit
+of the trellis code. The other bits of the symbol pass by the differential
+and convolutional coding unchanged. The resulting bits define the constellation
+point to be transmitted for the symbol. The redundant bit doubles the size of the
+constellation, and so increases the error rate for detecting individual symbols
+at the receiver. However, when a number of successive symbols are processed at
+the receiver, the redundancy actually provides several dB of improved error
+performance.
+
+The standard method of producing a QAM modulated signal is to use a sampling
+rate which is a multiple of the baud rate. The raw signal is then a series of
+complex pulses, each an integer number of samples long. These can be shaped,
+using a suitable complex filter, and multiplied by a complex carrier signal
+to produce the final QAM signal for transmission. 
+
+The pulse shaping filter is only vaguely defined by the V.17 spec. Some of the
+other ITU modem specs. fully define the filter, typically specifying a root
+raised cosine filter, with 50% excess bandwidth. This is a pity, since it
+increases the variability of the received signal. However, the receiver's
+adaptive equalizer will compensate for these differences. The current
+design uses a root raised cosine filter with 25% excess bandwidth. Greater
+excess bandwidth will not allow the tranmitted signal to meet the spectral
+requirements.
+
+The sampling rate for our transmitter is defined by the channel - 8000 per
+second. This is not a multiple of the baud rate (i.e. 2400 baud). The baud
+interval is actually 10/3 sample periods. Instead of using a symmetric
+FIR to pulse shape the signal, a polyphase filter is used. This consists of
+10 sets of coefficients, offering zero to 9/10ths of a baud phase shift as well
+as root raised cosine filtering. The appropriate coefficient set is chosen for
+each signal sample generated.
+
+The carrier is generated using the DDS method. Using two second order resonators,
+started in quadrature, might be more efficient, as it would have less impact on
+the processor cache than a table lookup approach. However, the DDS approach
+suits the receiver better, so the same signal generator is also used for the
+transmitter. 
+*/
+
+#define V17_TX_FILTER_STEPS     9
+
+/*!
+    V.17 modem transmit side descriptor. This defines the working state for a
+    single instance of a V.17 modem transmitter.
+*/
+typedef struct
+{
+    /*! \brief The bit rate of the modem. Valid values are 4800, 7200 and 9600. */
+    int bit_rate;
+    /*! \brief The callback function used to get the next bit to be transmitted. */
+    get_bit_func_t get_bit;
+    /*! \brief A user specified opaque pointer passed to the callback function. */
+    void *user_data;
+
+    /*! \brief The gain factor needed to achieve the specified output power. */
+    float gain;
+
+    /*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
+    complexf_t rrc_filter[2*V17_TX_FILTER_STEPS];
+    /*! \brief Current offset into the RRC pulse shaping filter buffer. */
+    int rrc_filter_step;
+
+    /*! \brief The current state of the differential encoder. */
+    int diff;
+    /*! \brief The current state of the convolutional encoder. */
+    int convolution;
+
+    /*! \brief The register for the data scrambler. */
+    unsigned int scramble_reg;
+    /*! \brief TRUE if transmitting the training sequence. FALSE if transmitting user data. */
+    int in_training;
+    /*! \brief TRUE if the short training sequence is to be used. */
+    int short_train;
+    /*! \brief A counter used to track progress through sending the training sequence. */
+    int training_step;
+
+    /*! \brief The current phase of the carrier (i.e. the DDS parameter). */
+    uint32_t carrier_phase;
+    /*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
+    int32_t carrier_phase_rate;
+    /*! \brief The current fractional phase of the baud timing. */
+    int baud_phase;
+    /*! \brief The code number for the current position in the constellation. */
+    int constellation_state;
+    
+    /*! \brief A pointer to the constellation currently in use. */
+    const complexf_t *constellation;
+    /*! \brief The current number of data bits per symbol. This does not include
+               the redundant bit. */
+    int bits_per_symbol;
+    /*! \brief The get_bit function in use at any instant. */
+    get_bit_func_t current_get_bit;
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} v17_tx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Adjust a V.17 modem transmit context's power output.
+    \brief Adjust a V.17 modem transmit context's output power.
+    \param s The modem context.
+    \param power The power level, in dBm0 */
+void v17_tx_power(v17_tx_state_t *s, float power);
+
+/*! Initialise a V.17 modem transmit context. This must be called before the first
+    use of the context, to initialise its contents.
+    \brief Initialise a V.17 modem transmit context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
+    \param tep TRUE is the optional TEP tone is to be transmitted.
+    \param get_bit The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer.
+    \return A pointer to the modem context, or NULL if there was a problem. */
+v17_tx_state_t *v17_tx_init(v17_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data);
+
+/*! Reinitialise an existing V.17 modem transmit context, so it may be reused.
+    \brief Reinitialise an existing V.17 modem transmit context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
+    \param tep TRUE is the optional TEP tone is to be transmitted.
+    \param short_train TRUE if the short training sequence should be used.
+    \return 0 for OK, -1 for parameter error. */
+int v17_tx_restart(v17_tx_state_t *s, int rate, int tep, int short_train);
+
+/*! Release a V.17 modem transmit context.
+    \brief Release a V.17 modem transmit context.
+    \param s The modem context.
+    \return 0 for OK */
+int v17_tx_release(v17_tx_state_t *s);
+
+/*! Change the get_bit function associated with a V.17 modem transmit context.
+    \brief Change the get_bit function associated with a V.17 modem transmit context.
+    \param s The modem context.
+    \param get_bit The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer. */
+void v17_tx_set_get_bit(v17_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
+
+/*! Generate a block of V.17 modem audio samples.
+    \brief Generate a block of V.17 modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples to be generated.
+    \return The number of samples actually generated.
+*/
+int v17_tx(v17_tx_state_t *s, int16_t amp[], int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v22bis.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,293 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v22bis.h - ITU V.22bis modem receive part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v22bis.h,v 1.19 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page v22bis_page The V.22bis modem
+\section v22bis_page_sec_1 What does it do?
+The V.22bis modem is a duplex modem for general data use on the PSTN, at rates
+of 1200 and 2400 bits/second. It is a compatible extension of the V.22 modem,
+which is a 1200 bits/second only design. It is a band-split design, using carriers
+of 1200Hz and 2400Hz. It is the fastest PSTN modem in general use which does not
+use echo-cancellation.
+
+\section v22bis__page_sec_2 How does it work?
+V.22bis uses 4PSK modulation at 1200 bits/second or 16QAM modulation at 2400
+bits/second. At 1200bps the symbols are so long that a fixed compromise equaliser
+is sufficient to recover the 4PSK signal reliably. At 2400bps an adaptive
+equaliser is necessary.
+
+The V.22bis training sequence includes sections which allow the modems to determine
+if the far modem can support (or is willing to support) 2400bps operation. The
+modems will automatically use 2400bps if both ends are willing to use that speed,
+or 1200bps if one or both ends to not acknowledge that 2400bps is OK.
+*/
+
+#if !defined(_V22BIS_H_)
+#define _V22BIS_H_
+
+#define V22BIS_EQUALIZER_LEN    7  /* this much to the left and this much to the right */
+#define V22BIS_EQUALIZER_MASK   15 /* one less than a power of 2 >= (2*V22BIS_EQUALIZER_LEN + 1) */
+
+#define V22BIS_TX_FILTER_STEPS  9
+
+#define V22BIS_RX_FILTER_STEPS  37
+
+/*!
+    V.22bis modem receive side descriptor. This defines the working state for a
+    single instance of a V.22bis modem receiver.
+*/
+typedef struct
+{
+    /*! \brief The bit rate of the modem. Valid values are 1200 and 2400. */
+    int bit_rate;
+    /*! \brief TRUE is this is the calling side modem. */
+    int caller;
+    /*! \brief The callback function used to put each bit received. */
+    put_bit_func_t put_bit;
+    /*! \brief The callback function used to get the next bit to be transmitted. */
+    get_bit_func_t get_bit;
+    /*! \brief A user specified opaque pointer passed to the callback routines. */
+    void *user_data;
+
+    /* RECEIVE SECTION */
+
+    /*! \brief A callback function which may be enabled to report every symbol's
+               constellation position. */
+    qam_report_handler_t *qam_report;
+    /*! \brief A user specified opaque pointer passed to the qam_report callback
+               routine. */
+    void *qam_user_data;
+
+    /*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
+    float rx_rrc_filter[2*V22BIS_RX_FILTER_STEPS];
+    /*! \brief Current offset into the RRC pulse shaping filter buffer. */
+    int rx_rrc_filter_step;
+
+    /*! \brief The register for the data scrambler. */
+    unsigned int rx_scramble_reg;
+    /*! \brief A counter for the number of consecutive bits of repeating pattern through
+               the scrambler. */
+    int rx_scrambler_pattern_count;
+    /*! \brief 0 if receiving user data. A training stage value during training */
+    int rx_training;
+    int rx_training_count;
+    float training_error;
+    int carrier_present;
+
+    /*! \brief The current phase of the carrier (i.e. the DDS parameter). */
+    uint32_t rx_carrier_phase;
+    /*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
+    int32_t rx_carrier_phase_rate;
+    float carrier_track_p;
+    float carrier_track_i;
+
+    power_meter_t rx_power;
+    int32_t carrier_on_power;
+    int32_t carrier_off_power;
+    float agc_scaling;
+    
+    int rx_constellation_state;
+
+    float eq_delta;
+    /*! \brief The adaptive equalizer coefficients */
+    complexf_t eq_coeff[2*V22BIS_EQUALIZER_LEN + 1];
+    complexf_t eq_buf[V22BIS_EQUALIZER_MASK + 1];
+    /*! \brief Current offset into equalizer buffer. */
+    int eq_step;
+    int eq_put_step;
+
+    /*! \brief Integration variable for damping the Gardner algorithm tests. */
+    int gardner_integrate;
+    /*! \brief Current step size of Gardner algorithm integration. */
+    int gardner_step;
+    /*! \brief The total symbol timing correction since the carrier came up.
+               This is only for performance analysis purposes. */
+    int total_baud_timing_correction;
+    /*! \brief The current fractional phase of the baud timing. */
+    int rx_baud_phase;
+    
+    int sixteen_way_decisions;
+
+    /* TRANSMIT SECTION */
+
+    /*! \brief The gain factor needed to achieve the specified output power. */
+    float tx_gain;
+
+    /*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
+    complexf_t tx_rrc_filter[2*V22BIS_TX_FILTER_STEPS];
+    /*! \brief Current offset into the RRC pulse shaping filter buffer. */
+    int tx_rrc_filter_step;
+
+    /*! \brief The register for the data scrambler. */
+    unsigned int tx_scramble_reg;
+    /*! \brief A counter for the number of consecutive bits of repeating pattern through
+               the scrambler. */
+    int tx_scrambler_pattern_count;
+    /*! \brief 0 if transmitting user data. A training stage value during training */
+    int tx_training;
+    /*! \brief A counter used to track progress through sending the training sequence. */
+    int tx_training_count;
+
+    /*! \brief The current phase of the carrier (i.e. the DDS parameter). */
+    uint32_t tx_carrier_phase;
+    /*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
+    int32_t tx_carrier_phase_rate;
+    /*! \brief The current phase of the guard tone (i.e. the DDS parameter). */
+    uint32_t guard_phase;
+    /*! \brief The update rate for the phase of the guard tone (i.e. the DDS increment). */
+    int32_t guard_phase_rate;
+    float guard_level;
+    /*! \brief The current fractional phase of the baud timing. */
+    int tx_baud_phase;
+    /*! \brief The code number for the current position in the constellation. */
+    int tx_constellation_state;
+    /*! \brief An indicator to mark that we are tidying up to stop transmission. */
+    int shutdown;
+    /*! \brief The get_bit function in use at any instant. */
+    get_bit_func_t current_get_bit;
+    
+    int detected_unscrambled_ones;
+    int detected_unscrambled_zeros;
+
+    int detected_unscrambled_ones_or_zeros;
+    int detected_unscrambled_0011_ending;
+    int detected_scrambled_ones_or_zeros_at_1200bps;
+    int detected_scrambled_ones_at_2400bps;
+
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} v22bis_state_t;
+
+extern const complexf_t v22bis_constellation[16];
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Reinitialise an existing V.22bis modem receive context.
+    \brief Reinitialise an existing V.22bis modem receive context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 1200 and 2400.
+    \return 0 for OK, -1 for bad parameter */
+int v22bis_rx_restart(v22bis_state_t *s, int bit_rate);
+
+/*! Process a block of received V.22bis modem audio samples.
+    \brief Process a block of received V.22bis modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples unprocessed. */
+int v22bis_rx(v22bis_state_t *s, const int16_t amp[], int len);
+
+/*! Get a snapshot of the current equalizer coefficients.
+    \brief Get a snapshot of the current equalizer coefficients.
+    \param coeffs The vector of complex coefficients.
+    \return The number of coefficients in the vector. */
+int v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coeffs);
+
+/*! Get the current received carrier frequency.
+    \param s The modem context.
+    \return The frequency, in Hertz. */
+float v22bis_rx_carrier_frequency(v22bis_state_t *s);
+
+/*! Get the current symbol timing correction since startup.
+    \param s The modem context.
+    \return The correction. */
+float v22bis_rx_symbol_timing_correction(v22bis_state_t *s);
+
+/*! Get a current received signal power.
+    \param s The modem context.
+    \return The signal power, in dBm0. */
+float v22bis_rx_signal_power(v22bis_state_t *s);
+
+/*! Set a handler routine to process QAM status reports
+    \param s The modem context.
+    \param handler The handler routine.
+    \param user_data An opaque pointer passed to the handler routine. */
+void v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t *handler, void *user_data);
+
+/*! Generate a block of V.22bis modem audio samples.
+    \brief Generate a block of V.22bis modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples to be generated.
+    \return The number of samples actually generated. */
+int v22bis_tx(v22bis_state_t *s, int16_t amp[], int len);
+
+/*! Adjust a V.22bis modem transmit context's power output.
+    \brief Adjust a V.22bis modem transmit context's output power.
+    \param s The modem context.
+    \param power The power level, in dBm0 */
+void v22bis_tx_power(v22bis_state_t *s, float power);
+
+/*! Reinitialise an existing V.22bis modem context, so it may be reused.
+    \brief Reinitialise an existing V.22bis modem context.
+    \param s The modem context.
+    \param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
+    \return 0 for OK, -1 for bad parameter. */
+int v22bis_restart(v22bis_state_t *s, int bit_rate);
+
+/*! Initialise a V.22bis modem context. This must be called before the first
+    use of the context, to initialise its contents.
+    \brief Initialise a V.22bis modem context.
+    \param s The modem context.
+    \param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
+    \param guard The guard tone option. 0 = none, 1 = 550Hz, 2 = 1800Hz.
+    \param caller TRUE if this is the calling modem.
+    \param get_bit The callback routine used to get the data to be transmitted.
+    \param put_bit The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer, passed in calls to the get and put routines.
+    \return A pointer to the modem context, or NULL if there was a problem. */
+v22bis_state_t *v22bis_init(v22bis_state_t *s,
+                            int bit_rate,
+                            int guard,
+                            int caller,
+                            get_bit_func_t get_bit,
+                            put_bit_func_t put_bit,
+                            void *user_data);
+
+/*! Change the get_bit function associated with a V.2bis modem context.
+    \brief Change the get_bit function associated with a V.22bis modem context.
+    \param s The modem context.
+    \param get_bit The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer. */
+void v22bis_set_get_bit(v22bis_state_t *s, get_bit_func_t get_bit, void *user_data);
+
+/*! Change the get_bit function associated with a V.2bis modem context.
+    \brief Change the put_bit function associated with a V.22bis modem context.
+    \param s The modem context.
+    \param put_bit The callback routine used to process the data received.
+    \param user_data An opaque pointer. */
+void v22bis_set_put_bit(v22bis_state_t *s, put_bit_func_t put_bit, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v27ter_rx.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,227 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v27ter_rx.h - ITU V.27ter modem receive part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v27ter_rx.h,v 1.34 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_V27TER_RX_H_)
+#define _V27TER_RX_H_
+
+/*! \page v27ter_rx_page The V.27ter receiver
+
+\section v27ter_rx_page_sec_1 What does it do?
+The V.27ter receiver implements the receive side of a V.27ter modem. This can operate
+at data rates of 4800 and 2400 bits/s. The audio input is a stream of 16 bit samples,
+at 8000 samples/second. The transmit and receive side of V.27ter modems operate
+independantly. V.27ter is mostly used for FAX transmission, where it provides the
+standard 4800 bits/s rate (the 2400 bits/s mode is not used for FAX). 
+
+\section v27ter_rx_page_sec_2 How does it work?
+V.27ter defines two modes of operation. One uses 8-PSK at 1600 baud, giving 4800bps.
+The other uses 4-PSK at 1200 baud, giving 2400bps. A training sequence is specified
+at the start of transmission, which makes the design of a V.27ter receiver relatively
+straightforward.
+*/
+
+/* Target length for the equalizer is about 43 taps for 4800bps and 32 taps for 2400bps
+   to deal with the worst stuff in V.56bis. */
+#define V27TER_EQUALIZER_PRE_LEN        15  /* this much before the real event */
+#define V27TER_EQUALIZER_POST_LEN       15  /* this much after the real event */
+#define V27TER_EQUALIZER_MASK           63  /* one less than a power of 2 >= (V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN) */
+
+#define V27TER_RX_4800_FILTER_STEPS     27
+#define V27TER_RX_2400_FILTER_STEPS     27
+
+#if V27TER_RX_4800_FILTER_STEPS > V27TER_RX_2400_FILTER_STEPS
+#define V27TER_RX_FILTER_STEPS V27TER_RX_4800_FILTER_STEPS
+#else
+#define V27TER_RX_FILTER_STEPS V27TER_RX_2400_FILTER_STEPS
+#endif
+
+/*!
+    V.27ter modem receive side descriptor. This defines the working state for a
+    single instance of a V.27ter modem receiver.
+*/
+typedef struct
+{
+    /*! \brief The bit rate of the modem. Valid values are 2400 and 4800. */
+    int bit_rate;
+    /*! \brief The callback function used to put each bit received. */
+    put_bit_func_t put_bit;
+    /*! \brief A user specified opaque pointer passed to the put_bit routine. */
+    void *user_data;
+    /*! \brief A callback function which may be enabled to report every symbol's
+               constellation position. */
+    qam_report_handler_t *qam_report;
+    /*! \brief A user specified opaque pointer passed to the qam_report callback
+               routine. */
+    void *qam_user_data;
+
+    /*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
+    float rrc_filter[2*V27TER_RX_FILTER_STEPS];
+    /*! \brief Current offset into the RRC pulse shaping filter buffer. */
+    int rrc_filter_step;
+
+    /*! \brief The register for the training and data scrambler. */
+    unsigned int scramble_reg;
+    /*! \brief A counter for the number of consecutive bits of repeating pattern through
+               the scrambler. */
+    int scrambler_pattern_count;
+    int in_training;
+    int training_bc;
+    int training_count;
+    float training_error;
+    int carrier_present;
+    int16_t last_sample;
+    /*! \brief TRUE if the previous trained values are to be reused. */
+    int old_train;
+
+    /*! \brief The current phase of the carrier (i.e. the DDS parameter). */
+    uint32_t carrier_phase;
+    /*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
+    int32_t carrier_phase_rate;
+    /*! \brief The carrier update rate saved for reuse when using short training. */
+    int32_t carrier_phase_rate_save;
+    float carrier_track_p;
+    float carrier_track_i;
+
+    power_meter_t power;
+    int32_t carrier_on_power;
+    int32_t carrier_off_power;
+    float agc_scaling;
+    float agc_scaling_save;
+
+    int constellation_state;
+
+    float eq_delta;
+    /*! \brief The adaptive equalizer coefficients */
+    complexf_t eq_coeff[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
+    complexf_t eq_coeff_save[V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN];
+    complexf_t eq_buf[V27TER_EQUALIZER_MASK + 1];
+    /*! \brief Current offset into equalizer buffer. */
+    int eq_step;
+    int eq_put_step;
+    int eq_skip;
+
+    /*! \brief Integration variable for damping the Gardner algorithm tests. */
+    int gardner_integrate;
+    /*! \brief Current step size of Gardner algorithm integration. */
+    int gardner_step;
+    /*! \brief The total symbol timing correction since the carrier came up.
+               This is only for performance analysis purposes. */
+    int total_baud_timing_correction;
+    /*! \brief The current fractional phase of the baud timing. */
+    int baud_phase;
+
+    /*! \brief Starting phase angles for the coarse carrier aquisition step. */
+    int32_t start_angles[2];
+    /*! \brief History list of phase angles for the coarse carrier aquisition step. */
+    int32_t angles[16];
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} v27ter_rx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a V.27ter modem receive context.
+    \brief Initialise a V.27ter modem receive context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 2400 and 4800.
+    \param put_bit The callback routine used to put the received data.
+    \param user_data An opaque pointer passed to the put_bit routine.
+    \return A pointer to the modem context, or NULL if there was a problem. */
+v27ter_rx_state_t *v27ter_rx_init(v27ter_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data);
+
+/*! Reinitialise an existing V.27ter modem receive context.
+    \brief Reinitialise an existing V.27ter modem receive context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 2400 and 4800.
+    \param old_train TRUE if a previous trained values are to be reused.
+    \return 0 for OK, -1 for bad parameter */
+int v27ter_rx_restart(v27ter_rx_state_t *s, int rate, int old_train);
+
+/*! Release a V.27ter modem receive context.
+    \brief Release a V.27ter modem receive context.
+    \param s The modem context.
+    \return 0 for OK */
+int v27ter_rx_release(v27ter_rx_state_t *s);
+
+/*! Change the put_bit function associated with a V.27ter modem receive context.
+    \brief Change the put_bit function associated with a V.27ter modem receive context.
+    \param s The modem context.
+    \param put_bit The callback routine used to handle received bits.
+    \param user_data An opaque pointer. */
+void v27ter_rx_set_put_bit(v27ter_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
+
+/*! Process a block of received V.27ter modem audio samples.
+    \brief Process a block of received V.27ter modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples unprocessed.
+*/
+int v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len);
+
+/*! Get a snapshot of the current equalizer coefficients.
+    \brief Get a snapshot of the current equalizer coefficients.
+    \param coeffs The vector of complex coefficients.
+    \return The number of coefficients in the vector. */
+int v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexf_t **coeffs);
+
+/*! Get the current received carrier frequency.
+    \param s The modem context.
+    \return The frequency, in Hertz. */
+float v27ter_rx_carrier_frequency(v27ter_rx_state_t *s);
+
+/*! Get the current symbol timing correction since startup.
+    \param s The modem context.
+    \return The correction. */
+float v27ter_rx_symbol_timing_correction(v27ter_rx_state_t *s);
+
+/*! Get a current received signal power.
+    \param s The modem context.
+    \return The signal power, in dBm0. */
+float v27ter_rx_signal_power(v27ter_rx_state_t *s);
+
+/*! Set the power level at which the carrier detection will cut in
+    \param s The modem context.
+    \param cutoff The signal cutoff power, in dBm0. */
+void v27ter_rx_signal_cutoff(v27ter_rx_state_t *s, float cutoff);
+
+/*! Set a handler routine to process QAM status reports
+    \param s The modem context.
+    \param handler The handler routine.
+    \param user_data An opaque pointer passed to the handler routine. */
+void v27ter_rx_set_qam_report_handler(v27ter_rx_state_t *s, qam_report_handler_t *handler, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v27ter_tx.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,172 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v27ter_tx.h - ITU V.27ter modem transmit part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v27ter_tx.h,v 1.25 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_V27TER_TX_H_)
+#define _V27TER_TX_H_
+
+/*! \page v27ter_tx_page The V.27ter transmitter
+\section v27ter_tx_page_sec_1 What does it do?
+The V.27ter transmitter implements the transmit side of a V.27ter modem. This
+can operate at data rates of 4800 and 2400 bits/s. The audio output is a stream
+of 16 bit samples, at 8000 samples/second. The transmit and receive side of
+V.27ter modems operate independantly. V.27ter is used for FAX transmission,
+where it provides the standard 4800 and 2400 bits/s rates. 
+
+\section v27ter_tx_page_sec_2 How does it work?
+V.27ter uses DPSK modulation. A common method of producing a DPSK modulated
+signal is to use a sampling rate which is a multiple of the baud rate. The raw
+signal is then a series of complex pulses, each an integer number of samples
+long. These can be shaped, using a suitable complex filter, and multiplied by a
+complex carrier signal to produce the final DPSK signal for transmission. 
+
+The pulse shaping filter for V.27ter is defined in the spec. It is a root raised
+cosine filter with 50% excess bandwidth. 
+
+The sampling rate for our transmitter is defined by the channel - 8000 samples/s.
+This is a multiple of the baud rate at 4800 bits/s (8-PSK at 1600 baud, 5 samples per
+symbol), but not at 2400 bits/s (4-PSK at 1200 baud, 20/3 samples per symbol). The baud
+interval is actually 20/3 sample periods at 2400bis/s. A symmetric FIR is used to
+apply root raised cosine filtering in the 4800bits/s mode. In the 2400bits/s mode
+a polyphase FIR filter is used. This consists of 20 sets of coefficients, offering
+zero to 19/20ths of a baud phase shift as well as root raised cosine filtering.
+The appropriate coefficient set is chosen for each signal sample generated.
+
+The carrier is generated using the DDS method. Using 2 second order resonators,
+started in quadrature, might be more efficient, as it would have less impact on
+the processor cache than a table lookup approach. However, the DDS approach
+suits the receiver better, so then same signal generator is also used for the
+transmitter.
+*/
+
+#define V27TER_TX_FILTER_STEPS      9
+
+/*!
+    V.27ter modem transmit side descriptor. This defines the working state for a
+    single instance of a V.27ter modem transmitter.
+*/
+typedef struct
+{
+    /*! \brief The bit rate of the modem. Valid values are 2400 and 4800. */
+    int bit_rate;
+    /*! \brief The callback function used to get the next bit to be transmitted. */
+    get_bit_func_t get_bit;
+    /*! \brief A user specified opaque pointer passed to the callback function. */
+    void *user_data;
+
+    /*! \brief The gain factor needed to achieve the specified output power at 2400bps. */
+    float gain_2400;
+    /*! \brief The gain factor needed to achieve the specified output power at 4800bps. */
+    float gain_4800;
+
+    /*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
+    complexf_t rrc_filter[2*V27TER_TX_FILTER_STEPS];
+    /*! \brief Current offset into the RRC pulse shaping filter buffer. */
+    int rrc_filter_step;
+    
+    /*! \brief The register for the training and data scrambler. */
+    unsigned int scramble_reg;
+    /*! \brief A counter for the number of consecutive bits of repeating pattern through
+               the scrambler. */
+    int scrambler_pattern_count;
+    /*! \brief TRUE if transmitting the training sequence, or shutting down transmission.
+               FALSE if transmitting user data. */
+    int in_training;
+    /*! \brief A counter used to track progress through sending the training sequence. */
+    int training_step;
+
+    /*! \brief The current phase of the carrier (i.e. the DDS parameter). */
+    uint32_t carrier_phase;
+    /*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
+    int32_t carrier_phase_rate;
+    /*! \brief The current fractional phase of the baud timing. */
+    int baud_phase;
+    /*! \brief The code number for the current position in the constellation. */
+    int constellation_state;
+    /*! \brief The get_bit function in use at any instant. */
+    get_bit_func_t current_get_bit;
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} v27ter_tx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Adjust a V.27ter modem transmit context's power output.
+    \brief Adjust a V.27ter modem transmit context's output power.
+    \param s The modem context.
+    \param power The power level, in dBm0 */
+void v27ter_tx_power(v27ter_tx_state_t *s, float power);
+
+/*! Initialise a V.27ter modem transmit context.
+    \brief Initialise a V.27ter modem transmit context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 2400 and 4800.
+    \param tep TRUE is the optional TEP tone is to be transmitted.
+    \param get_bit The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer.
+    \return A pointer to the modem context, or NULL if there was a problem. */
+v27ter_tx_state_t *v27ter_tx_init(v27ter_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data);
+
+/*! Reinitialise an existing V.27ter modem transmit context, so it may be reused.
+    \brief Reinitialise an existing V.27ter modem transmit context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 2400 and 4800.
+    \param tep TRUE is the optional TEP tone is to be transmitted.
+    \return 0 for OK, -1 for bad parameter */
+int v27ter_tx_restart(v27ter_tx_state_t *s, int rate, int tep);
+
+/*! Release a V.27ter modem transmit context.
+    \brief Release a V.27ter modem transmit context.
+    \param s The modem context.
+    \return 0 for OK */
+int v27ter_tx_release(v27ter_tx_state_t *s);
+
+/*! Change the get_bit function associated with a V.27ter modem transmit context.
+    \brief Change the get_bit function associated with a V.27ter modem transmit context.
+    \param s The modem context.
+    \param get_bit The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer. */
+void v27ter_tx_set_get_bit(v27ter_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
+
+/*! Generate a block of V.27ter modem audio samples.
+    \brief Generate a block of V.27ter modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples to be generated.
+    \return The number of samples actually generated.
+*/
+int v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v29rx.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,296 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v29rx.h - ITU V.29 modem receive part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v29rx.h,v 1.41 2006/10/24 13:45:28 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_V29RX_H_)
+#define _V29RX_H_
+
+/*! \page v29rx_page The V.29 receiver
+\section v29rx_page_sec_1 What does it do?
+The V.29 receiver implements the receive side of a V.29 modem. This can operate
+at data rates of 9600, 7200 and 4800 bits/s. The audio input is a stream of 16
+bit samples, at 8000 samples/second. The transmit and receive side of V.29
+modems operate independantly. V.29 is mostly used for FAX transmission, where it
+provides the standard 9600 and 7200 bits/s rates (the 4800 bits/s mode is not
+used for FAX). 
+
+\section v29rx_page_sec_2 How does it work?
+V.29 operates at 2400 baud for all three bit rates. It uses 16-QAM modulation for
+9600bps, 8-QAM for 7200bps, and 4-PSK for 4800bps. A training sequence is specified
+at the start of transmission, which makes the design of a V.29 receiver relatively
+straightforward.
+
+The first stage of the training sequence consists of 128
+symbols, alternating between two constellation positions. The receiver monitors
+the signal power, to sense the possible presence of a valid carrier. When the
+alternating signal begins, the power rising above a minimum threshold (-26dBm0)
+causes the main receiver computation to begin. The initial measured power is
+used to quickly set the gain of the receiver. After this initial settling, the
+front end gain is locked, and the adaptive equalizer tracks any subsequent
+signal level variation. The signal is oversampled to 24000 samples/second (i.e.
+signal, zero, zero, signal, zero, zero, ...) and fed to a complex root raised
+cosine pulse shaping filter. This filter has been modified from the conventional
+root raised cosine filter, by shifting it up the band, to be centred at the nominal
+carrier frequency. This filter interpolates the samples, pulse shapes, and performs
+a fractional sample delay at the same time. 48 sets of filter coefficients are used to
+achieve a set of finely spaces fractional sample delays, between zero and
+one sample. By choosing every fifth sample, and the appropriate set of filter
+coefficients, the properly tuned symbol tracker can select data samples at 4800
+samples/second from points within 1.125 degrees of the centre and mid-points of
+each symbol. The output of the filter is multiplied by a complex carrier, generated
+by a DDS. The result is a baseband signal, requiring no further filtering, apart from
+an adaptive equalizer. The baseband signal is fed to a T/2 adaptive equalizer.
+A band edge component maximisation algorithm is used to tune the sampling, so the samples
+fed to the equalizer are close to the mid point and edges of each symbol. Initially
+the algorithm is very lightly damped, to ensure the symbol alignment pulls in
+quickly. Because the sampling rate will not be precisely the same as the
+transmitter's (the spec. says the symbol timing should be within 0.01%), the
+receiver constantly evaluates and corrects this sampling throughout its
+operation. During the symbol timing maintainence phase, the algorithm uses
+a heavier damping.
+
+The carrier is specified as 1700Hz +-1Hz at the transmitter, and 1700 +-7Hz at
+the receiver. The receive carrier would only be this inaccurate if the link
+includes FDM sections. These are being phased out, but the design must still
+allow for the worst case. Using an initial 1700Hz signal for demodulation gives
+a worst case rotation rate for the constellation of about one degree per symbol.
+Once the symbol timing synchronisation algorithm has been given time to lock to
+the symbol timing of the initial alternating pattern, the phase of the demodulated
+signal is recorded on two successive symbols - once for each of the constellation
+positions. The receiver then tracks the symbol alternations, until a large phase jump
+occurs. This signifies the start of the next phase of the training sequence. At this
+point the total phase shift between the original recorded symbol phase, and the
+symbol phase just before the phase jump occurred is used to provide a coarse
+estimation of the rotation rate of the constellation, and it current absolute
+angle of rotation. These are used to update the current carrier phase and phase
+update rate in the carrier DDS. The working data already in the pulse shaping
+filter and equalizer buffers is given a similar step rotation to pull it all
+into line. From this point on, a heavily damped integrate and dump approach,
+based on the angular difference between each received constellation position and
+its expected position, is sufficient to track the carrier, and maintain phase
+alignment. A fast rough approximator for the arc-tangent function is adequate
+for the estimation of the angular error. 
+
+The next phase of the training sequence is a scrambled sequence of two
+particular symbols. We train the T/2 adaptive equalizer using this sequence. The
+scrambling makes the signal sufficiently diverse to ensure the equalizer
+converges to the proper generalised solution. At the end of this sequence, the
+equalizer should be sufficiently well adapted that is can correctly resolve the
+full QAM constellation. However, the equalizer continues to adapt throughout
+operation of the modem, fine tuning on the more complex data patterns of the
+full QAM constellation. 
+
+In the last phase of the training sequence, the modem enters normal data
+operation, with a short defined period of all ones as data. As in most high
+speed modems, data in a V.29 modem passes through a scrambler, to whiten the
+spectrum of the signal. The transmitter should initialise its data scrambler,
+and pass the ones through it. At the end of the ones, real data begins to pass
+through the scrambler, and the transmit modem is in normal operation. The
+receiver tests that ones are really received, in order to verify the modem
+trained correctly. If all is well, the data following the ones is fed to the
+application, and the receive modem is up and running. Unfortunately, some
+transmit side of some real V.29 modems fail to initialise their scrambler before
+sending the ones. This means the first 23 received bits (the length of the
+scrambler register) cannot be trusted for the test. The receive modem,
+therefore, only tests that bits starting at bit 24 are really ones. 
+*/
+
+/* Target length for the equalizer is about 63 taps, to deal with the worst stuff
+   in V.56bis. */
+#define V29_EQUALIZER_PRE_LEN   15  /* this much before the real event */
+#define V29_EQUALIZER_POST_LEN  15  /* this much after the real event */
+#define V29_EQUALIZER_MASK      63  /* one less than a power of 2 >= (2*V29_EQUALIZER_LEN + 1) */
+
+#define V29_RX_FILTER_STEPS     27
+
+typedef void (qam_report_handler_t)(void *user_data, const complexf_t *constel, const complexf_t *target, int symbol);
+
+/*!
+    V.29 modem receive side descriptor. This defines the working state for a
+    single instance of a V.29 modem receiver.
+*/
+typedef struct
+{
+    /*! \brief The bit rate of the modem. Valid values are 4800, 7200 and 9600. */
+    int bit_rate;
+    /*! \brief The callback function used to put each bit received. */
+    put_bit_func_t put_bit;
+    /*! \brief A user specified opaque pointer passed to the put_bit routine. */
+    void *user_data;
+    /*! \brief A callback function which may be enabled to report every symbol's
+               constellation position. */
+    qam_report_handler_t *qam_report;
+    /*! \brief A user specified opaque pointer passed to the qam_report callback
+               routine. */
+    void *qam_user_data;
+
+    /*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
+    float rrc_filter[2*V29_RX_FILTER_STEPS];
+    /*! \brief Current offset into the RRC pulse shaping filter buffer. */
+    int rrc_filter_step;
+
+    /*! \brief The register for the data scrambler. */
+    unsigned int scramble_reg;
+    /*! \brief The register for the training scrambler. */
+    uint8_t training_scramble_reg;
+    int in_training;
+    int training_cd;
+    int training_count;
+    float training_error;
+    int carrier_present;
+    int16_t last_sample;
+    /*! \brief TRUE if the previous trained values are to be reused. */
+    int old_train;
+
+    /*! \brief The current phase of the carrier (i.e. the DDS parameter). */
+    uint32_t carrier_phase;
+    /*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
+    int32_t carrier_phase_rate;
+    /*! \brief The carrier update rate saved for reuse when using short training. */
+    int32_t carrier_phase_rate_save;
+    float carrier_track_p;
+    float carrier_track_i;
+    
+    power_meter_t power;
+    int32_t carrier_on_power;
+    int32_t carrier_off_power;
+    float agc_scaling;
+    float agc_scaling_save;
+
+    int constellation_state;
+
+    float eq_delta;
+    /*! \brief The adaptive equalizer coefficients */
+    complexf_t eq_coeff[V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN];
+    complexf_t eq_coeff_save[V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN];
+    complexf_t eq_buf[V29_EQUALIZER_MASK + 1];
+    /*! \brief Current offset into equalizer buffer. */
+    int eq_step;
+    int eq_put_step;
+    int eq_skip;
+
+    /*! \brief The current half of the baud. */
+    int baud_half;
+    /*! \brief Band edge symbol sync. filter state. */
+    float symbol_sync_low[2];
+    float symbol_sync_high[2];
+    float symbol_sync_dc_filter[2];
+    float baud_phase;
+    /*! \brief The total symbol timing correction since the carrier came up.
+               This is only for performance analysis purposes. */
+    int total_baud_timing_correction;
+
+    /*! \brief Starting phase angles for the coarse carrier aquisition step. */
+    int32_t start_angles[2];
+    /*! \brief History list of phase angles for the coarse carrier aquisition step. */
+    int32_t angles[16];
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} v29_rx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a V.29 modem receive context.
+    \brief Initialise a V.29 modem receive context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
+    \param put_bit The callback routine used to put the received data.
+    \param user_data An opaque pointer passed to the put_bit routine.
+    \return A pointer to the modem context, or NULL if there was a problem. */
+v29_rx_state_t *v29_rx_init(v29_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data);
+
+/*! Reinitialise an existing V.29 modem receive context.
+    \brief Reinitialise an existing V.29 modem receive context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
+    \param old_train TRUE if a previous trained values are to be reused.
+    \return 0 for OK, -1 for bad parameter */
+int v29_rx_restart(v29_rx_state_t *s, int rate, int old_train);
+
+/*! Release a V.29 modem receive context.
+    \brief Release a V.29 modem receive context.
+    \param s The modem context.
+    \return 0 for OK */
+int v29_rx_release(v29_rx_state_t *s);
+
+/*! Change the put_bit function associated with a V.29 modem receive context.
+    \brief Change the put_bit function associated with a V.29 modem receive context.
+    \param s The modem context.
+    \param put_bit The callback routine used to handle received bits.
+    \param user_data An opaque pointer. */
+void v29_rx_set_put_bit(v29_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
+
+/*! Process a block of received V.29 modem audio samples.
+    \brief Process a block of received V.29 modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples unprocessed. */
+int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len);
+
+/*! Get a snapshot of the current equalizer coefficients.
+    \brief Get a snapshot of the current equalizer coefficients.
+    \param s The modem context.
+    \param coeffs The vector of complex coefficients.
+    \return The number of coefficients in the vector. */
+int v29_rx_equalizer_state(v29_rx_state_t *s, complexf_t **coeffs);
+
+/*! Get the current received carrier frequency.
+    \param s The modem context.
+    \return The frequency, in Hertz. */
+float v29_rx_carrier_frequency(v29_rx_state_t *s);
+
+/*! Get the current symbol timing correction since startup.
+    \param s The modem context.
+    \return The correction. */
+float v29_rx_symbol_timing_correction(v29_rx_state_t *s);
+
+/*! Get the current received signal power.
+    \param s The modem context.
+    \return The signal power, in dBm0. */
+float v29_rx_signal_power(v29_rx_state_t *s);
+
+/*! Set the power level at which the carrier detection will cut in
+    \param s The modem context.
+    \param cutoff The signal cutoff power, in dBm0. */
+void v29_rx_signal_cutoff(v29_rx_state_t *s, float cutoff);
+
+/*! Set a handler routine to process QAM status reports
+    \param s The modem context.
+    \param handler The handler routine.
+    \param user_data An opaque pointer passed to the handler routine. */
+void v29_rx_set_qam_report_handler(v29_rx_state_t *s, qam_report_handler_t *handler, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v29tx.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,207 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v29tx.h - ITU V.29 modem transmit part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v29tx.h,v 1.23 2006/10/24 13:22:02 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_V29TX_H_)
+#define _V29TX_H_
+
+/*! \page v29tx_page The V.29 transmitter
+\section v29tx_page_sec_1 What does it do?
+The V.29 transmitter implements the transmit side of a V.29 modem. This can
+operate at data rates of 9600, 7200 and 4800 bits/s. The audio output is a
+stream of 16 bit samples, at 8000 samples/second. The transmit and receive side
+of V.29 modems operate independantly. V.29 is mostly used for FAX transmission,
+where it provides the standard 9600 and 7200 bits/s rates (the 4800 bits/s mode
+is not used for FAX). 
+
+\section v29tx_page_sec_2 How does it work?
+V.29 uses QAM modulation. The standard method of producing a QAM modulated
+signal is to use a sampling rate which is a multiple of the baud rate. The raw
+signal is then a series of complex pulses, each an integer number of samples
+long. These can be shaped, using a suitable complex filter, and multiplied by a
+complex carrier signal to produce the final QAM signal for transmission. 
+
+The pulse shaping filter is only vaguely defined by the V.29 spec. Some of the
+other ITU modem specs. fully define the filter, typically specifying a root
+raised cosine filter, with 50% excess bandwidth. This is a pity, since it
+increases the variability of the received signal. However, the receiver's
+adaptive equalizer will compensate for these differences. The current
+design uses a root raised cosine filter with 25% excess bandwidth. Greater
+excess bandwidth will not allow the tranmitted signal to meet the spectral
+requirements.
+
+The sampling rate for our transmitter is defined by the channel - 8000 per
+second. This is not a multiple of the baud rate (i.e. 2400 baud). The baud
+interval is actually 10/3 sample periods. Instead of using a symmetric
+FIR to pulse shape the signal, a polyphase filter is used. This consists of
+10 sets of coefficients, offering zero to 9/10ths of a baud phase shift as well
+as root raised cosine filtering. The appropriate coefficient set is chosen for
+each signal sample generated.
+
+The carrier is generated using the DDS method. Using two second order resonators,
+started in quadrature, might be more efficient, as it would have less impact on
+the processor cache than a table lookup approach. However, the DDS approach
+suits the receiver better, so the same signal generator is also used for the
+transmitter. 
+
+The equation defining QAM modulation is:
+
+    s(n) = A*cos(2*pi*f*n + phi(n))
+
+where phi(n) is the phase of the information, and A is the amplitude of the information
+
+using the identity
+
+    cos(x + y) = cos(x)*cos(y) - sin(x)*sin(y)
+    
+we get
+
+    s(n) = A {cos(2*pi*f*n)*cos(phi(n)) - sin(2*pi*f*n)*sin(phi(n))}
+    
+substituting with the constellation positions
+
+    I(n) = A*cos(phi(n))
+    Q(n) = A*sin(phi(n))
+    
+gives
+
+    s(n) = I(n)*cos(2*pi*f*n) - Q(n)*sin(2*pi*f*n)
+
+*/
+
+#define V29_TX_FILTER_STEPS     9
+
+/*!
+    V.29 modem transmit side descriptor. This defines the working state for a
+    single instance of a V.29 modem transmitter.
+*/
+typedef struct
+{
+    /*! \brief The bit rate of the modem. Valid values are 4800, 7200 and 9600. */
+    int bit_rate;
+    /*! \brief The callback function used to get the next bit to be transmitted. */
+    get_bit_func_t get_bit;
+    /*! \brief A user specified opaque pointer passed to the callback function. */
+    void *user_data;
+
+    /*! \brief Gain required to achieve the specified output power, not allowing
+               for the size of the current constellation. */
+    float base_gain;
+    /*! \brief Gain required to achieve the specified output power, allowing
+               for the size of the current constellation. */
+    float gain;
+
+    /*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
+    complexf_t rrc_filter[2*V29_TX_FILTER_STEPS];
+    /*! \brief Current offset into the RRC pulse shaping filter buffer. */
+    int rrc_filter_step;
+
+    /*! \brief The register for the data scrambler. */
+    unsigned int scramble_reg;
+    /*! \brief The register for the training scrambler. */
+    uint8_t training_scramble_reg;
+    /*! \brief TRUE if transmitting the training sequence, or shutting down transmission.
+               FALSE if transmitting user data. */
+    int in_training;
+    /*! \brief A counter used to track progress through sending the training sequence. */
+    int training_step;
+    /*! \brief An offset value into the table of training parameters, used to match the
+               training pattern to the bit rate. */
+    int training_offset;
+
+    /*! \brief The current phase of the carrier (i.e. the DDS parameter). */
+    uint32_t carrier_phase;
+    /*! \brief The update rate for the phase of the carrier (i.e. the DDS increment). */
+    int32_t carrier_phase_rate;
+    /*! \brief The current fractional phase of the baud timing. */
+    int baud_phase;
+    /*! \brief The code number for the current position in the constellation. */
+    int constellation_state;
+    /*! \brief The get_bit function in use at any instant. */
+    get_bit_func_t current_get_bit;
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} v29_tx_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Adjust a V.29 modem transmit context's power output.
+    \brief Adjust a V.29 modem transmit context's output power.
+    \param s The modem context.
+    \param power The power level, in dBm0 */
+void v29_tx_power(v29_tx_state_t *s, float power);
+
+/*! Initialise a V.29 modem transmit context. This must be called before the first
+    use of the context, to initialise its contents.
+    \brief Initialise a V.29 modem transmit context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
+    \param tep TRUE is the optional TEP tone is to be transmitted.
+    \param get_bit The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer.
+    \return A pointer to the modem context, or NULL if there was a problem. */
+v29_tx_state_t *v29_tx_init(v29_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data);
+
+/*! Reinitialise an existing V.29 modem transmit context, so it may be reused.
+    \brief Reinitialise an existing V.29 modem transmit context.
+    \param s The modem context.
+    \param rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
+    \param tep TRUE is the optional TEP tone is to be transmitted.
+    \return 0 for OK, -1 for bad parameter */
+int v29_tx_restart(v29_tx_state_t *s, int rate, int tep);
+
+/*! Release a V.29 modem transmit context.
+    \brief Release a V.29 modem transmit context.
+    \param s The modem context.
+    \return 0 for OK */
+int v29_tx_release(v29_tx_state_t *s);
+
+/*! Change the get_bit function associated with a V.29 modem transmit context.
+    \brief Change the get_bit function associated with a V.29 modem transmit context.
+    \param s The modem context.
+    \param get_bit The callback routine used to get the data to be transmitted.
+    \param user_data An opaque pointer. */
+void v29_tx_set_get_bit(v29_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
+
+/*! Generate a block of V.29 modem audio samples.
+    \brief Generate a block of V.29 modem audio samples.
+    \param s The modem context.
+    \param amp The audio sample buffer.
+    \param len The number of samples to be generated.
+    \return The number of samples actually generated.
+*/
+int v29_tx(v29_tx_state_t *s, int16_t *amp, int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v42.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,231 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v42.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v42.h,v 1.17 2006/10/24 13:22:02 steveu Exp $
+ */
+
+/*! \page v42_page V.42 modem error correction
+\section v42_page_sec_1 What does it do?
+The V.42 specification defines an error correcting protocol for PSTN modems, based on
+HDLC and LAP. This makes it similar to an X.25 link. A special variant of LAP, known
+as LAP-M, is defined in the V.42 specification. A means for modems to determine if the
+far modem supports V.42 is also defined.
+
+\section v42_page_sec_2 How does it work?
+*/
+
+#if !defined(_V42_H_)
+#define _V42_H_
+
+enum
+{
+    LAPM_DETECT = 0,
+    LAPM_ESTABLISH = 1,
+    LAPM_DATA = 2,
+    LAPM_RELEASE = 3,
+    LAPM_SIGNAL = 4,
+    LAPM_SETPARM = 5,
+    LAPM_TEST = 6,
+    LAPM_UNSUPPORTED = 7
+};
+
+typedef void (*v42_status_func_t)(void *user_data, int status);
+typedef void (*v42_frame_handler_t)(void *user_data, const uint8_t *pkt, int len);
+
+typedef struct lapm_frame_queue_s
+{
+    struct lapm_frame_queue_s *next;
+    int len;
+    uint8_t frame[];
+} lapm_frame_queue_t;
+
+/*!
+    LAP-M descriptor. This defines the working state for a single instance of LAP-M.
+*/
+typedef struct
+{
+    int handle;
+    hdlc_rx_state_t hdlc_rx;
+    hdlc_tx_state_t hdlc_tx;
+    
+    v42_frame_handler_t iframe_receive;
+    void *iframe_receive_user_data;
+
+    v42_status_func_t status_callback;
+    void *status_callback_user_data;
+
+    int state;
+    int tx_waiting;
+    int debug;
+    /*! TRUE if originator. FALSE if answerer */
+    int we_are_originator;
+    /*! Remote network type (unknown, answerer. originator) */
+    int peer_is_originator;
+    /*! Next N(S) for transmission */
+    int next_tx_frame;
+    /*! The last of our frames which the peer acknowledged */
+    int last_frame_peer_acknowledged;
+    /*! Next N(R) for reception */
+    int next_expected_frame;
+    /*! The last of the peer's frames which we acknowledged */
+    int last_frame_we_acknowledged;
+    /*! TRUE if we sent an I or S frame with the F-bit set */
+    int solicit_f_bit;
+    /*! Retransmission count */
+    int retransmissions;
+    /*! TRUE if peer is busy */
+    int busy;
+
+    /*! Acknowledgement timer */
+    int t401_timer;
+    /*! Reply delay timer - optional */
+    int t402_timer;
+    /*! Inactivity timer - optional */
+    int t403_timer;
+    /*! Maximum number of octets in an information field */
+    int n401;
+    /*! Window size */
+    int window_size_k;
+	
+    lapm_frame_queue_t *txqueue;
+    lapm_frame_queue_t *tx_next;
+    lapm_frame_queue_t *tx_last;
+    queue_t tx_queue;
+    
+    span_sched_state_t sched;
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} lapm_state_t;
+
+/*!
+    V.42 descriptor. This defines the working state for a single instance of V.42.
+*/
+typedef struct
+{
+    /*! TRUE if we are the calling party, otherwise FALSE */
+    int caller;
+    /*! TRUE if we should detect whether the far end is V.42 capable. FALSE if we go
+        directly to protocol establishment */
+    int detect;
+
+    /*! Stage in negotiating V.42 support */
+    int rx_negotiation_step;
+    int rxbits;
+    int rxstream;
+    int rxoks;
+    int odp_seen;
+    int txbits;
+    int txstream;
+    int txadps;
+    /*! The LAP.M context */
+    lapm_state_t lapm;
+
+    /*! V.42 support detection timer */
+    int t400_timer;
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} v42_state_t;
+
+/*! Log the raw HDLC frames */
+#define LAPM_DEBUG_LAPM_RAW         (1 << 0)
+/*! Log the interpreted frames */
+#define LAPM_DEBUG_LAPM_DUMP        (1 << 1)
+/*! Log state machine changes */
+#define LAPM_DEBUG_LAPM_STATE 	    (1 << 2)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+const char *lapm_status_to_str(int status);
+
+/*! Dump LAP.M frames in a raw and/or decoded forms
+    \param frame The frame itself
+    \param len The length of the frame, in octets
+    \param showraw TRUE if the raw octets should be dumped
+    \param txrx TRUE if tx, FALSE if rx. Used to highlight the packet's direction.
+*/
+void lapm_dump(lapm_state_t *s, const uint8_t *frame, int len, int showraw, int txrx);
+
+/*! Accept an HDLC packet
+*/
+void lapm_receive(void *user_data, int ok, const uint8_t *buf, int len);
+
+/*! Transmit a LAP.M frame
+*/
+int lapm_tx(lapm_state_t *s, const void *buf, int len);
+
+/*! Transmit a LAP.M information frame
+*/
+int lapm_tx_iframe(lapm_state_t *s, const void *buf, int len, int cr);
+
+/*! Send a break over a LAP.M connection
+*/
+int lapm_break(lapm_state_t *s, int enable);
+
+/*! Initiate an orderly release of a LAP.M connection
+*/
+int lapm_release(lapm_state_t *s);
+
+/*! Enable or disable loopback of a LAP.M connection
+*/
+int lapm_loopback(lapm_state_t *s, int enable);
+
+/*! Assign or remove a callback routine used to deal with V.42 status changes.
+*/
+void v42_set_status_callback(v42_state_t *s, v42_status_func_t callback, void *user_data);
+
+/*! Process a newly received bit for a V.42 context.
+*/
+void v42_rx_bit(void *user_data, int bit);
+
+/*! Get the next transmit bit for a V.42 context.
+*/
+int v42_tx_bit(void *user_data);
+
+/*! Initialise a V.42 context.
+    \param s The V.42 context.
+    \param caller TRUE if caller mode, else answerer mode.
+    \param frame_handler A callback function to handle received frames of data.
+    \param user_data An opaque pointer passed to the frame handler routine.
+    \return ???
+*/
+v42_state_t *v42_init(v42_state_t *s, int caller, int detect, v42_frame_handler_t frame_handler, void *user_data);
+
+/*! Restart a V.42 context.
+    \param s The V.42 context.
+*/
+void v42_restart(v42_state_t *s);
+
+/*! Release a V.42 context.
+    \param s The V.42 context.
+    \return 0 if OK */
+int v42_release(v42_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v42bis.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,236 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v42bis.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v42bis.h,v 1.15 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \page v42bis_page V.42bis modem data compression
+\section v42bis_page_sec_1 What does it do?
+The v.42bis specification defines a data compression scheme, to work in
+conjunction with the error correction scheme defined in V.42.
+
+\section v42bis_page_sec_2 How does it work?
+*/
+
+#if !defined(_V42BIS_H_)
+#define _V42BIS_H_
+
+#define V42BIS_MAX_BITS         12
+#define V42BIS_MAX_CODEWORDS    4096    /* 2^V42BIS_MAX_BITS */
+#define V42BIS_TABLE_SIZE       5021    /* This should be a prime >(2^V42BIS_MAX_BITS) */
+#define V42BIS_MAX_STRING_SIZE  250
+
+enum
+{
+    V42BIS_P0_NEITHER_DIRECTION = 0,
+    V42BIS_P0_INITIATOR_RESPONDER,
+    V42BIS_P0_RESPONDER_INITIATOR,
+    V42BIS_P0_BOTH_DIRECTIONS
+};
+
+enum
+{
+    V42BIS_COMPRESSION_MODE_DYNAMIC = 0,
+    V42BIS_COMPRESSION_MODE_ALWAYS,
+    V42BIS_COMPRESSION_MODE_NEVER
+};
+
+typedef void (*v42bis_frame_handler_t)(void *user_data, const uint8_t *pkt, int len);
+typedef void (*v42bis_data_handler_t)(void *user_data, const uint8_t *buf, int len);
+
+typedef struct
+{
+    /*! \brief The prior code for each defined code. */
+    uint16_t parent_code;
+    /*! \brief The number of leaf nodes this node has */
+    int16_t leaves;
+    /*! \brief This leaf octet for each defined code. */
+    uint8_t node_octet;
+    /*! \brief Bit map of the children which exist */
+    uint32_t children[8];
+} v42bis_dict_node_t;
+
+typedef struct
+{
+    /*! \brief Compression mode. */
+    int compression_mode;
+    /*! \brief Callback function to handle received frames. */
+    v42bis_frame_handler_t handler;
+    /*! \brief An opaque pointer passed in calls to frame_handler. */
+    void *user_data;
+    /*! \brief The maximum frame length allowed */
+    int max_len;
+
+    uint32_t string_code;
+    uint32_t latest_code;
+    int string_length;
+    uint32_t output_bit_buffer;
+    int output_bit_count;
+    int output_octet_count;
+    uint8_t output_buf[1024];
+    v42bis_dict_node_t dict[V42BIS_MAX_CODEWORDS];
+    /*! \brief TRUE if we are in transparent (i.e. uncompressable) mode */
+    int transparent;
+    int change_transparency;
+    int compressibility_filter;
+    int compressibility_persistence;
+    
+    /*! \brief Next empty dictionary entry */
+    uint32_t v42bis_parm_c1;
+    /*! \brief Current codeword size */
+    int v42bis_parm_c2;
+    /*! \brief Threshold for codeword size change */
+    uint32_t v42bis_parm_c3;
+
+    /*! \brief Mark that this is the first octet/code to be processed */
+    int first;
+    uint8_t escape_code;
+} v42bis_compress_state_t;
+
+typedef struct
+{
+    /*! \brief Callback function to handle decompressed data. */
+    v42bis_data_handler_t handler;
+    /*! \brief An opaque pointer passed in calls to data_handler. */
+    void *user_data;
+    /*! \brief The maximum decompressed data block length allowed */
+    int max_len;
+
+    uint32_t old_code;
+    uint32_t last_old_code;
+    uint32_t input_bit_buffer;
+    int input_bit_count;
+    int octet;
+    int last_length;
+    int output_octet_count;
+    uint8_t output_buf[1024];
+    v42bis_dict_node_t dict[V42BIS_MAX_CODEWORDS];
+    /*! \brief TRUE if we are in transparent (i.e. uncompressable) mode */
+    int transparent;
+
+    int last_extra_octet;
+
+    /*! \brief Next empty dictionary entry */
+    int v42bis_parm_c1;
+    /*! \brief Current codeword size */
+    int v42bis_parm_c2;
+    /*! \brief Threshold for codeword size change */
+    int v42bis_parm_c3;
+        
+    /*! \brief Mark that this is the first octet/code to be processed */
+    int first;
+    uint8_t escape_code;
+    int escaped;
+} v42bis_decompress_state_t;
+
+/*!
+    V.42bis compression/decompression descriptor. This defines the working state for a
+    single instance of V.42bis compress/decompression.
+*/
+typedef struct
+{
+    /*! \brief V.42bis data compression directions. */
+    int v42bis_parm_p0;
+
+    v42bis_compress_state_t compress;
+    v42bis_decompress_state_t decompress;
+    
+    /*! \brief Maximum codeword size (bits) */
+    int v42bis_parm_n1;
+    /*! \brief Total number of codewords */
+    uint32_t v42bis_parm_n2;
+    /*! \brief Maximum string length */
+    int v42bis_parm_n7;
+} v42bis_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Compress a block of octets.
+    \param s The V.42bis context.
+    \param buf The data to be compressed.
+    \param len The length of the data buffer.
+    \return 0 */
+int v42bis_compress(v42bis_state_t *s, const uint8_t *buf, int len);
+
+/*! Flush out any data remaining in a compression buffer.
+    \param s The V.42bis context.
+    \return 0 */
+int v42bis_compress_flush(v42bis_state_t *s);
+
+/*! Decompress a block of octets.
+    \param s The V.42bis context.
+    \param buf The data to be decompressed.
+    \param len The length of the data buffer.
+    \return 0 */
+int v42bis_decompress(v42bis_state_t *s, const uint8_t *buf, int len);
+    
+/*! Flush out any data remaining in the decompression buffer.
+    \param s The V.42bis context.
+    \return 0 */
+int v42bis_decompress_flush(v42bis_state_t *s);
+
+/*! Initialise a V.42bis context.
+    \param s The V.42bis context.
+    \param negotiated_p0 The negotiated P0 parameter, from the V.42bis spec.
+    \param negotiated_p1 The negotiated P1 parameter, from the V.42bis spec.
+    \param negotiated_p2 The negotiated P2 parameter, from the V.42bis spec.
+    \param frame_handler .
+    \param frame_user_data .
+    \param max_frame_len The maximum length that should be passed to the frame handler.
+    \param data_handler .
+    \param data_user_data .
+    \param max_data_len The maximum length that should be passed to the data handler.
+    \return The V.42bis context. */
+v42bis_state_t *v42bis_init(v42bis_state_t *s,
+                            int negotiated_p0,
+                            int negotiated_p1,
+                            int negotiated_p2,
+                            v42bis_frame_handler_t frame_handler,
+                            void *frame_user_data,
+                            int max_frame_len,
+                            v42bis_data_handler_t data_handler,
+                            void *data_user_data,
+                            int max_data_len);
+
+/*! Set the compression mode.
+    \param s The V.42bis context.
+    \param mode One of the V.42bis compression modes -
+            V42BIS_COMPRESSION_MODE_DYNAMIC,
+            V42BIS_COMPRESSION_MODE_ALWAYS,
+            V42BIS_COMPRESSION_MODE_NEVER */
+void v42bis_compression_control(v42bis_state_t *s, int mode);
+
+/*! Release a V.42bis context.
+    \param s The V.42bis context.
+    \return 0 if OK */
+int v42bis_release(v42bis_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/v8.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,224 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v8.h - V.8 modem negotiation processing.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v8.h,v 1.14 2006/11/22 13:46:06 steveu Exp $
+ */
+ 
+/*! \file */
+
+/*! \page v8_page The V.8 modem negotiation protocol
+\section v8_page_sec_1 What does it do?
+The V.8 specification defines a procedure to be used as PSTN modem answer phone calls,
+which allows the modems to negotiate the optimum modem standard, which both ends can
+support.
+
+\section v8_page_sec_2 How does it work?
+At startup the modems communicate using the V.21 standard at 300 bits/second. They
+exchange simple messages about their capabilities, and choose the modem standard they
+will use for data communication. The V.8 protocol then terminates, and the modems
+being negotiating and training with their chosen modem standard.
+*/
+
+#if !defined(_V8_H_)
+#define _V8_H_
+
+typedef struct v8_result_s v8_result_t;
+
+typedef void (v8_result_handler_t)(void *user_data, v8_result_t *result);
+
+enum v8_call_function_e
+{
+    V8_CALL_TBS = 0,
+    V8_CALL_H324,
+    V8_CALL_V18,
+    V8_CALL_T101,
+    V8_CALL_T30_TX,
+    V8_CALL_T30_RX,
+    V8_CALL_V_SERIES,
+    V8_CALL_FUNCTION_EXTENSION
+};
+
+enum v8_modulation_e
+{
+    V8_MOD_V17          = (1 << 0),     /* V.17 half-duplex */
+    V8_MOD_V21          = (1 << 1),     /* V.21 duplex */
+    V8_MOD_V22          = (1 << 2),     /* V.22/V22.bis duplex */
+    V8_MOD_V23HALF      = (1 << 3),     /* V.23 half-duplex */
+    V8_MOD_V23          = (1 << 4),     /* V.23 duplex */
+    V8_MOD_V26BIS       = (1 << 5),     /* V.23 duplex */
+    V8_MOD_V26TER       = (1 << 6),     /* V.23 duplex */
+    V8_MOD_V27TER       = (1 << 7),     /* V.23 duplex */
+    V8_MOD_V29          = (1 << 8),     /* V.29 half-duplex */
+    V8_MOD_V32          = (1 << 9),     /* V.32/V32.bis duplex */
+    V8_MOD_V34HALF      = (1 << 10),    /* V.34 half-duplex */
+    V8_MOD_V34          = (1 << 11),    /* V.34 duplex */
+    V8_MOD_V90          = (1 << 12),    /* V.90 duplex */
+    V8_MOD_V92          = (1 << 13),    /* V.92 duplex */
+
+    V8_MOD_FAILED       = (1 << 15),    /* Indicates failure to negotiate */
+};
+
+enum v8_protocol_e
+{
+    V8_PROTOCOL_NONE = 0,
+    V8_PROTOCOL_LAPM_V42 = 1,
+    V8_PROTOCOL_EXTENSION = 7
+};
+
+enum v8_pstn_access_e
+{
+    V8_PSTN_ACCESS_CALL_DCE_CELLULAR = 0x20,
+    V8_PSTN_ACCESS_ANSWER_DCE_CELLULAR = 0x40,
+    V8_PSTN_ACCESS_DCE_ON_DIGTIAL = 0x80
+};
+
+enum v8_pcm_modem_availability_e
+{
+    V8_PSTN_PCM_MODEM_V90_V92_ANALOGUE = 0x20,
+    V8_PSTN_PCM_MODEM_V90_V92_DIGITAL = 0x40,
+    V8_PSTN_PCM_MODEM_V91 = 0x80
+};
+
+typedef struct
+{
+    /*! \brief TRUE if we are the calling modem */
+    int caller;
+    /*! \brief The current state of the V8 protocol */
+    int state;
+    int negotiation_timer;
+    int ci_timer;
+    int ci_count;
+    fsk_tx_state_t v21tx;
+    fsk_rx_state_t v21rx;
+    queue_t tx_queue;
+    modem_connect_tones_tx_state_t ec_dis_tx;
+    modem_connect_tones_rx_state_t ec_dis_rx;
+
+    v8_result_handler_t *result_handler;
+    void *result_handler_user_data;
+
+    /*! \brief Modulation schemes available at this end. */
+    int available_modulations;
+    int common_modulations;
+    int negotiated_modulation;
+    int far_end_modulations;
+    
+    int call_function;
+    int protocol;
+    int pstn_access;
+    int nsf_seen;
+    int pcm_modem_availability;
+    int t66_seen;
+
+    /* V8 data parsing */
+    unsigned int bit_stream;
+    int bit_cnt;
+    /* Indicates the type of message coming up */
+    int preamble_type;
+    uint8_t rx_data[64];
+    int rx_data_ptr;
+    
+    /*! \brief a reference copy of the last CM or JM message, used when
+               testing for matches. */
+    uint8_t cm_jm_data[64];
+    int cm_jm_count;
+    int got_cm_jm;
+    int got_cj;
+    int zero_byte_count;
+    /*! \brief Error and flow logging control */
+    logging_state_t logging;
+} v8_state_t;
+
+struct v8_result_s
+{
+    int call_function;
+    int available_modulations;
+    int negotiated_modulation;
+    int protocol;
+    int pstn_access;
+    int nsf_seen;
+    int pcm_modem_availability;
+    int t66_seen;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Initialise a V.8 context.
+    \brief Initialise a V.8 context.
+    \param s The V.8 context.
+    \param caller TRUE if caller mode, else answerer mode.
+    \param available_modulations A bitwise list of the modulation schemes to be
+           advertised as available here.
+    \param result_handler The callback routine used to handle the results of negotiation.
+    \param user_data An opaque pointer passed to the result_handler routine.
+    \return A pointer to the V.8 context, or NULL if there was a problem. */
+v8_state_t *v8_init(v8_state_t *s,
+                    int caller,
+                    int available_modulations,
+                    v8_result_handler_t *result_handler,
+                    void *user_data);
+
+/*! Release a V.8 context.
+    \brief Release a V.8 context.
+    \param s The V.8 context.
+    \return 0 for OK. */
+int v8_release(v8_state_t *s);
+
+/*! Generate a block of V.8 audio samples.
+    \brief Generate a block of V.8 audio samples.
+    \param s The V.8 context.
+    \param amp The audio sample buffer.
+    \param max_len The number of samples to be generated.
+    \return The number of samples actually generated.
+*/
+int v8_tx(v8_state_t *s, int16_t *amp, int max_len);
+
+/*! Process a block of received V.8 audio samples.
+    \brief Process a block of received V.8 audio samples.
+    \param s The V.8 context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+*/
+int v8_rx(v8_state_t *s, const int16_t *amp, int len);
+
+/*! Log the list of supported modulations.
+    \brief Log the list of supported modulations.
+    \param s The V.8 context.
+    \param modulation_schemes The list of supported modulations. */
+void v8_log_supported_modulations(v8_state_t *s, int modulation_schemes);
+
+const char *v8_call_function_to_str(int call_function);
+const char *v8_modulation_to_str(int modulation_scheme);
+const char *v8_protocol_to_str(int protocol);
+const char *v8_pstn_access_to_str(int pstn_access);
+const char *v8_pcm_modem_availability_to_str(int pcm_modem_availability);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/vector_float.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,112 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * vector_float.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: vector_float.h,v 1.4 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_VECTOR_FLOAT_H_)
+#define _VECTOR_FLOAT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void vec_copyf(float z[], const float x[], int n);
+
+void vec_copy(double z[], const double x[], int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_copyl(long double z[], const long double x[], int n);
+#endif
+
+void vec_zerof(float z[], int n);
+
+void vec_zero(double z[], int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_zerol(long double z[], int n);
+#endif
+
+void vec_setf(float z[], float x, int n);
+
+void vec_set(double z[], double x, int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_setl(long double z[], long double x, int n);
+#endif
+
+void vec_addf(float z[], const float x[], const float y[], int n);
+
+void vec_add(double z[], const double x[], const double y[], int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_addl(long double z[], const long double x[], const long double y[], int n);
+#endif
+
+void vec_scaled_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n);
+
+void vec_scaled_add(double z[], const double x[], double x_scale, const double y[], double y_scale, int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_scaled_addl(long double z[], const long double x[], long double x_scale, const long double y[], long double y_scale, int n);
+#endif
+
+void vec_subf(float z[], const float x[], const float y[], int n);
+
+void vec_sub(double z[], const double x[], const double y[], int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_subl(long double z[], const long double x[], const long double y[], int n);
+#endif
+
+void vec_scaled_subf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n);
+
+void vec_scaled_sub(double z[], const double x[], double x_scale, const double y[], double y_scale, int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_scaled_subl(long double z[], const long double x[], long double x_scale, const long double y[], long double y_scale, int n);
+#endif
+
+void vec_scalar_mulf(float z[], const float x[], float y, int n);
+
+void vec_scalar_mul(double z[], const double x[], double y, int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_scalar_mull(long double z[], const long double x[], long double y, int n);
+#endif
+
+float vec_dot_prodf(const float x[], const float y[], int n);
+
+double vec_dot_prod(const double x[], const double y[], int n);
+
+#if defined(HAVE_LONG_DOUBLE)
+long double vec_dot_prodl(const long double x[], const long double y[], int n);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/spandsp/vector_int.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,98 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * vector_int.h
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: vector_int.h,v 1.4 2006/10/24 13:45:28 steveu Exp $
+ */
+
+#if !defined(_VECTOR_INT_H_)
+#define _VECTOR_INT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int32_t vec_dot_prodi16(const int16_t x[], const int16_t y[], int n);
+
+/*! \brief Find the minimum and maximum values in a vector.
+    \param x The vector to be searched.
+    \param n The number of elements in the vetor.
+    \param result A two element vector. The first will receive the 
+           maximum. The second will receive thw minimum. This parameter
+           may be set to NULL.
+    \return The absolute maximum value. Since the range of negative numbers
+            exceeds the range of positive one, the returned integer is longer
+            than the ones being searched. */
+int32_t vec_min_maxi16(const int16_t x[], int n, int16_t out[]);
+
+static __inline__ int vec_norm2i16(const int16_t *vec, int len)
+{
+    int i;
+    int sum;
+
+    sum = 0;
+    for (i = 0;  i < len;  i++)
+        sum += vec[i]*vec[i];
+    return sum;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void vec_sari16(int16_t *vec, int len, int shift)
+{
+    int i;
+
+    for (i = 0;  i < len;  i++)
+        vec[i] >>= shift;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int vec_max_bitsi16(const int16_t *vec, int len)
+{
+    int i;
+    int max;
+    int v;
+    int b;
+
+    max = 0;
+    for (i = 0;  i < len;  i++)
+    {
+        v = abs(vec[i]);
+        if (v > max)
+            max = v;
+    }
+    b = 0;
+    while (max != 0)
+    {
+        b++;
+        max >>= 1;
+    }
+    return b;
+}
+/*- End of function --------------------------------------------------------*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/stamp-h1	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1 @@
+timestamp for src/config.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/super_tone_rx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,420 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * super_tone_rx.c - Flexible telephony supervisory tone detection.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: super_tone_rx.c,v 1.13 2006/11/19 14:07:25 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <time.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/tone_detect.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/super_tone_rx.h"
+
+#define THRESHOLD               8.0e7
+
+static int add_super_tone_freq(super_tone_rx_descriptor_t *desc, int freq)
+{
+    int i;
+
+    if (freq == 0)
+        return -1;
+    /* Look for an existing frequency */
+    for (i = 0;  i < desc->used_frequencies;  i++)
+    {
+        if (desc->pitches[i][0] == freq)
+            return desc->pitches[i][1];
+    }
+    /* Look for an existing tone which is very close. We may need to merge
+       the detectors. */
+    for (i = 0;  i < desc->used_frequencies;  i++)
+    {
+        if ((desc->pitches[i][0] - 10) <= freq  &&  freq <= (desc->pitches[i][0] + 10))
+        {
+            /* Merge these two */
+            desc->pitches[desc->used_frequencies][0] = freq;
+            desc->pitches[desc->used_frequencies][1] = i;
+            make_goertzel_descriptor(&desc->desc[desc->pitches[i][1]], (float) (freq + desc->pitches[i][0])/2, BINS);
+            desc->used_frequencies++;
+            return desc->pitches[i][1];
+        }
+    }
+    desc->pitches[i][0] = freq;
+    desc->pitches[i][1] = desc->monitored_frequencies;
+    if (desc->monitored_frequencies%5 == 0)
+    {
+        desc->desc = (goertzel_descriptor_t *) realloc(desc->desc, (desc->monitored_frequencies + 5)*sizeof(goertzel_descriptor_t));
+    }
+    make_goertzel_descriptor(&desc->desc[desc->monitored_frequencies++], (float) freq, BINS);
+    desc->used_frequencies++;
+    return desc->pitches[i][1];
+}
+/*- End of function --------------------------------------------------------*/
+
+int super_tone_rx_add_tone(super_tone_rx_descriptor_t *desc)
+{
+    if (desc->tones%5 == 0)
+    {
+        desc->tone_list = (super_tone_rx_segment_t **) realloc(desc->tone_list, (desc->tones + 5)*sizeof(super_tone_rx_segment_t *));
+        desc->tone_segs = (int *) realloc(desc->tone_segs, (desc->tones + 5)*sizeof(int));
+    }
+    desc->tone_list[desc->tones] = NULL;
+    desc->tone_segs[desc->tones] = 0;
+    desc->tones++;
+    return desc->tones - 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+int super_tone_rx_add_element(super_tone_rx_descriptor_t *desc,
+                              int tone,
+                              int f1,
+                              int f2,
+                              int min,
+                              int max)
+{
+    int step;
+
+    step = desc->tone_segs[tone];
+    if (step%5 == 0)
+    {
+        desc->tone_list[tone] = (super_tone_rx_segment_t *) realloc(desc->tone_list[tone], (step + 5)*sizeof(super_tone_rx_segment_t));
+    }
+    desc->tone_list[tone][step].f1 = add_super_tone_freq(desc, f1);
+    desc->tone_list[tone][step].f2 = add_super_tone_freq(desc, f2);
+    desc->tone_list[tone][step].min_duration = min*8;
+    desc->tone_list[tone][step].max_duration = (max == 0)  ?  0x7FFFFFFF  :  max*8;
+    desc->tone_segs[tone]++;
+    return step;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int test_cadence(super_tone_rx_segment_t *pattern,
+                        int steps,
+                        super_tone_rx_segment_t *test,
+                        int rotation)
+{
+    int i;
+    int j;
+
+    if (rotation >= 0)
+    {
+        /* Check only for the sustaining of a tone in progress. This means
+           we only need to check each block if the latest step is compatible
+           with the tone template. */
+        if (steps < 0)
+        {
+            /* A -ve value for steps indicates we just changed step, and need to
+               check the last one ended within spec. If we don't do this
+               extra test a low duration segment might be accepted as OK. */
+            steps = -steps;
+            j = (rotation + steps - 2)%steps;
+            if (pattern[j].f1 != test[8].f1  ||  pattern[j].f2 != test[8].f2)
+                return  0;
+            if (pattern[j].min_duration > test[8].min_duration*BINS
+                ||
+                pattern[j].max_duration < test[8].min_duration*BINS)
+            {
+                return  0;
+            }
+        }
+        j = (rotation + steps - 1)%steps;
+        if (pattern[j].f1 != test[9].f1  ||  pattern[j].f2 != test[9].f2)
+            return  0;
+        if (pattern[j].max_duration < test[9].min_duration*BINS)
+            return  0;
+    }
+    else
+    {
+        /* Look for a complete template match. */
+        for (i = 0;  i < steps;  i++)
+        {
+            j = i + 10 - steps;
+            if (pattern[i].f1 != test[j].f1  ||  pattern[i].f2 != test[j].f2)
+                return  0;
+            if (pattern[i].min_duration > test[j].min_duration*BINS
+                ||
+                pattern[i].max_duration < test[j].min_duration*BINS)
+            {
+                return  0;
+            }
+        }
+    }
+    return  1;
+}
+/*- End of function --------------------------------------------------------*/
+
+super_tone_rx_descriptor_t *super_tone_rx_make_descriptor(super_tone_rx_descriptor_t *desc)
+{
+    if (desc == NULL)
+    {
+        desc = (super_tone_rx_descriptor_t *) malloc(sizeof(super_tone_rx_descriptor_t));
+        if (desc == NULL)
+            return NULL;
+    }
+    desc->tone_list = NULL;
+    desc->tone_segs = NULL;
+
+    desc->used_frequencies = 0;
+    desc->monitored_frequencies = 0;
+    desc->desc = NULL;
+    desc->tones = 0;
+    return desc;
+}
+/*- End of function --------------------------------------------------------*/
+
+int super_tone_rx_free_descriptor(super_tone_rx_descriptor_t *desc)
+{
+    if (desc)
+        free(desc);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void super_tone_rx_segment_callback(super_tone_rx_state_t *s,
+                                    void (*callback)(void *data, int f1, int f2, int duration))
+{
+    s->segment_callback = callback;
+}
+/*- End of function --------------------------------------------------------*/
+
+super_tone_rx_state_t *super_tone_rx_init(super_tone_rx_state_t *s,
+                                          super_tone_rx_descriptor_t *desc,
+                                          tone_report_func_t callback,
+                                          void *user_data)
+{
+    int i;
+
+    if (desc == NULL)
+        return NULL;
+    if (s == NULL)
+    {
+        s = (super_tone_rx_state_t *) malloc(sizeof(super_tone_rx_state_t) + desc->monitored_frequencies*sizeof(goertzel_state_t));
+        if (s == NULL)
+            return NULL;
+    }
+    if (callback == NULL)
+        return NULL;
+
+    for (i = 0;  i < 11;  i++)
+    {
+        s->segments[i].f1 = -1;
+        s->segments[i].f2 = -1;
+        s->segments[i].min_duration = 0;
+    }
+    s->segment_callback = NULL;
+    s->tone_callback = callback;
+    s->callback_data = user_data;
+    if (desc)
+        s->desc = desc;
+    s->detected_tone = -1;
+    s->energy = 0.0;
+    s->total_energy = 0.0;
+    for (i = 0;  i < desc->monitored_frequencies;  i++)
+        goertzel_init(&s->state[i], &s->desc->desc[i]);
+    return  s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int super_tone_rx_free(super_tone_rx_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int super_tone_rx(super_tone_rx_state_t *s, const int16_t *amp, int samples)
+{
+    int i;
+    int j;
+    int k1;
+    int k2;
+    int x;
+    float res[BINS/2];
+    int sample;
+
+    for (sample = 0;  sample < samples;  sample += x)
+    {
+        x = 0;
+        for (i = 0;  i < s->desc->monitored_frequencies;  i++)
+        {
+            x = goertzel_update(&s->state[i],
+                                amp + sample,
+                                samples - sample);
+            if (i == s->desc->monitored_frequencies - 1)
+            {
+                for (j = 0;  j < x;  j++)
+                    s->energy += amp[sample + j]*amp[sample + j];
+            }
+            if (s->state[i].current_sample >= s->state[i].samples)
+            {
+                res[i] = goertzel_result(&s->state[i]);
+                goertzel_init(&s->state[i], &s->desc->desc[i]);
+                if (i == s->desc->monitored_frequencies - 1)
+                {
+                    /* Scale the energy so it can be compared to the results from the
+                       Goertzel filters. */
+                    s->total_energy = s->energy*(s->state[i].samples/2);
+                    s->energy = 0;
+                    /* Find our two best monitored frequencies, which also have adequate
+                       energy. */
+                    if (s->total_energy < THRESHOLD)
+                    {
+                        k1 = -1;
+                        k2 = -1;
+                    }
+                    else
+                    {
+                        if (res[0] > res[1])
+                        {
+                            k1 = 0;
+                            k2 = 1;
+                        }
+                        else
+                        {
+                            k1 = 1;
+                            k2 = 0;
+                        }
+                        for (j = 2;  j < s->desc->monitored_frequencies;  j++)
+                        {
+                            if (res[j] >= res[k1])
+                            {
+                                k2 = k1;
+                                k1 = j;
+                            }
+                            else if (res[j] >= res[k2])
+                            {
+                                k2 = j;
+                            }
+                        }
+                        if (res[k1] + res[k2] < 0.5*s->total_energy)
+                        {
+                            k1 = -1;
+                            k2 = -1;
+                        }
+                        else if (res[k1] > 4.0*res[k2])
+                        {
+                            k2 = -1;
+                        }
+                        else if (k2 < k1)
+                        {
+                            j = k1;
+                            k1 = k2;
+                            k2 = j;
+                        }
+                    }
+                    /* See if this looks different to last time */
+                    if (k1 != s->segments[10].f1  ||  k2 != s->segments[10].f2)
+                    {
+                        /* It is different, but this might just be a transitional quirk, or
+                           a one shot hiccup (eg due to noise). Only if this same thing is
+                           seen a second time should we change state. */
+                        s->segments[10].f1 = k1;
+                        s->segments[10].f2 = k2;
+                        /* While things are hopping around, consider this a continuance of the
+                           previous state. */
+                        s->segments[9].min_duration++;
+                    }
+                    else
+                    {
+                        if (k1 != s->segments[9].f1  ||  k2 != s->segments[9].f2)
+                        {
+                            if (s->detected_tone >= 0)
+                            {
+                                /* Test for the continuance of the existing tone pattern, based on our new knowledge of an
+                                   entire segment length. */
+                                if (!test_cadence(s->desc->tone_list[s->detected_tone], -s->desc->tone_segs[s->detected_tone], s->segments, s->rotation++))
+                                {
+                                    s->detected_tone = -1;
+                                    s->tone_callback(s->callback_data, s->detected_tone);
+                                }
+                            }
+                            if (s->segment_callback)
+                            {
+                                s->segment_callback(s->callback_data,
+                                                    s->segments[9].f1,
+                                                    s->segments[9].f2,
+                                                    s->segments[9].min_duration*BINS/8);
+                            }
+                            memcpy (&s->segments[0], &s->segments[1], 9*sizeof(s->segments[0]));
+                            s->segments[9].f1 = k1;
+                            s->segments[9].f2 = k2;
+                            s->segments[9].min_duration = 1;
+                        }
+                        else
+                        {
+                            /* This is a continuance of the previous state */
+                            if (s->detected_tone >= 0)
+                            {
+                                /* Test for the continuance of the existing tone pattern. We must do this here, so we can sense the
+                                   discontinuance of the tone on an excessively long segment. */
+                                if (!test_cadence(s->desc->tone_list[s->detected_tone], s->desc->tone_segs[s->detected_tone], s->segments, s->rotation))
+                                {
+                                    s->detected_tone = -1;
+                                    s->tone_callback(s->callback_data, s->detected_tone);
+                                }
+                            }
+                            s->segments[9].min_duration++;
+                        }
+                    }
+                    if (s->detected_tone < 0)
+                    {
+                        /* Test for the start of any of the monitored tone patterns */
+                        for (j = 0;  j < s->desc->tones;  j++)
+                        {
+                            if (test_cadence(s->desc->tone_list[j], s->desc->tone_segs[j], s->segments, -1))
+                            {
+                                s->detected_tone = j;
+                                s->rotation = 0;
+                                s->tone_callback(s->callback_data, s->detected_tone);
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return  samples;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/super_tone_tx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,236 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * super_tone_tx.c - Flexible telephony supervisory tone generation.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: super_tone_tx.c,v 1.15 2006/11/19 14:07:25 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <time.h>
+#include <inttypes.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/complex.h"
+#include "spandsp/dds.h"
+#include "spandsp/super_tone_tx.h"
+
+super_tone_tx_step_t *super_tone_tx_make_step(super_tone_tx_step_t *s,
+                                              float f1,
+                                              float l1,
+                                              float f2,
+                                              float l2,
+                                              int length,
+                                              int cycles)
+{
+    if (s == NULL)
+    {
+        s = (super_tone_tx_step_t *) malloc(sizeof(super_tone_tx_step_t));
+        if (s == NULL)
+            return NULL;
+    }
+    if (f1 >= 1.0)
+    {    
+        s->phase_rate[0] = dds_phase_ratef(f1);
+        s->gain[0] = dds_scaling_dbm0f(l1);
+    }
+    else
+    {
+        s->phase_rate[0] = 0;
+        s->gain[0] = 0;
+    }
+    if (f2 >= 1.0)
+    {
+        s->phase_rate[1] = dds_phase_ratef(f2);
+        s->gain[1] = dds_scaling_dbm0f(l2);
+    }
+    else
+    {
+        s->phase_rate[1] = 0;
+        s->gain[1] = 0;
+    }
+    s->tone = (f1 > 0.0);
+    s->length = length*8;
+    s->cycles = cycles;
+    s->next = NULL;
+    s->nest = NULL;
+    return  s;
+}
+/*- End of function --------------------------------------------------------*/
+
+void super_tone_tx_free(super_tone_tx_step_t *s)
+{
+    super_tone_tx_step_t *t;
+
+    while (s)
+    {
+        /* Follow nesting... */
+        if (s->nest)
+            super_tone_tx_free(s->nest);
+        t = s;
+        s = s->next;
+        free(t);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+super_tone_tx_state_t *super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree)
+{
+    if (tree == NULL)
+        return NULL;
+    memset(s, 0, sizeof(*s));
+    s->level = 0;
+    s->levels[0] = tree;
+    s->cycles[0] = tree->cycles;
+
+    s->current_position = 0;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max_samples)
+{
+    int samples;
+    int limit;
+    int len;
+    float xamp;
+    super_tone_tx_step_t *tree;
+
+    if (s->level < 0  ||  s->level > 3)
+        return  0;
+    samples = 0;
+    tree = s->levels[s->level];
+    while (tree  &&  samples < max_samples)
+    {
+        if (tree->tone)
+        {
+            /* A period of tone. A length of zero means infinite
+               length. */
+            if (s->current_position == 0)
+            {
+                /* New step - prepare the tone generator */
+                s->phase_rate[0] = tree->phase_rate[0];
+                s->gain[0] = tree->gain[0];
+                s->phase_rate[1] = tree->phase_rate[1];
+                s->gain[1] = tree->gain[1];
+            }
+            len = tree->length - s->current_position;
+            if (tree->length == 0)
+            {
+                len = max_samples - samples;
+                /* We just need to make current position non-zero */
+                s->current_position = 1;
+            }
+            else if (len > max_samples - samples)
+            {
+                len = max_samples - samples;
+                s->current_position += len;
+            }
+            else
+            {
+                s->current_position = 0;
+            }
+            for (limit = len + samples;  samples < limit;  samples++)
+            {
+                xamp = 0.0;
+                if (s->phase_rate[0])
+                    xamp += dds_modf(&(s->phase[0]), s->phase_rate[0], s->gain[0], 0);
+                if (s->phase_rate[1])
+                    xamp += dds_modf(&(s->phase[1]), s->phase_rate[1], s->gain[1], 0);
+                amp[samples] = (int16_t) lrintf(xamp);
+            }
+            if (s->current_position)
+                return samples;
+        }
+        else if (tree->length)
+        {
+            /* A period of silence. The length must always
+               be explicitly stated. A length of zero does
+               not give infinite silence. */
+            len = tree->length - s->current_position;
+            if (len > max_samples - samples)
+            {
+                len = max_samples - samples;
+                s->current_position += len;
+            }
+            else
+            {
+                s->current_position = 0;
+            }
+            memset(amp + samples, 0, sizeof(uint16_t)*len);
+            samples += len;
+            if (s->current_position)
+                return samples;
+        }
+        /* Nesting has priority... */
+        if (tree->nest)
+        {
+            tree = tree->nest;
+            s->levels[++s->level] = tree;
+            s->cycles[s->level] = tree->cycles;
+        }
+        else
+        {
+            /* ...Next comes repeating, and finally moving forward a step. */
+            /* When repeating, note that zero cycles really means endless cycles. */
+            while (tree->cycles  &&  --s->cycles[s->level] <= 0)
+            {
+                tree = tree->next;
+                if (tree)
+                {
+                    /* A fresh new step. */
+                    s->levels[s->level] = tree;
+                    s->cycles[s->level] = tree->cycles;
+                    break;
+                }
+                /* If we are nested we need to pop, otherwise this is the end. */
+                if (s->level <= 0)
+                {
+                    /* Mark the tone as completed */
+                    s->levels[0] = NULL;
+                    break;
+                }
+                tree = s->levels[--s->level];
+            }
+        }
+        
+    }
+    return  samples;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/t30.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,4875 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t30.c - ITU T.30 FAX transfer processing
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003, 2004, 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t30.c,v 1.149 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <string.h>
+#include <fcntl.h>
+#include <time.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/queue.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/complex.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/fsk.h"
+#include "spandsp/v29rx.h"
+#include "spandsp/v29tx.h"
+#include "spandsp/v27ter_rx.h"
+#include "spandsp/v27ter_tx.h"
+#include "spandsp/t4.h"
+
+#include "spandsp/t30_fcf.h"
+#include "spandsp/t35.h"
+#include "spandsp/t30.h"
+
+#define MAX_MESSAGE_TRIES   3
+
+#define ms_to_samples(t)    (((t)*SAMPLE_RATE)/1000)
+
+typedef struct
+{
+    int val;
+    const char *str;
+} value_string_t;
+
+/* T.30 defines the following call phases:
+   Phase A: Call set-up.
+       Exchange of CNG, CED and the called terminal identification.
+   Phase B: Pre-message procedure for identifying and selecting the required facilities.
+       Capabilities negotiation, and training, up the the confirmation to receive.
+   Phase C: Message transmission (includes phasing and synchronization where appropriate).
+       Transfer of the message at high speed.
+   Phase D: Post-message procedure, including end-of-message and confirmation and multi-document procedures.
+       End of message and acknowledgement.
+   Phase E: Call release
+       Final call disconnect. */
+enum
+{
+    T30_PHASE_IDLE = 0,     /* Freshly initialised */
+    T30_PHASE_A_CED,        /* Doing the CED (answer) sequence */
+    T30_PHASE_A_CNG,        /* Doing the CNG (caller) sequence */
+    T30_PHASE_B_RX,         /* Receiving pre-message control messages */
+    T30_PHASE_B_TX,         /* Transmitting pre-message control messages */
+    T30_PHASE_C_NON_ECM_RX, /* Receiving a document message in non-ECM mode */
+    T30_PHASE_C_NON_ECM_TX, /* Transmitting a document message in non-ECM mode */
+    T30_PHASE_C_ECM_RX,     /* Receiving a document message in ECM (HDLC) mode */
+    T30_PHASE_C_ECM_TX,     /* Transmitting a document message in ECM (HDLC) mode */
+    T30_PHASE_D_RX,         /* Receiving post-message control messages */
+    T30_PHASE_D_TX,         /* Transmitting post-message control messages */
+    T30_PHASE_E,            /* In phase E */
+    T30_PHASE_CALL_FINISHED /* Call completely finished */
+};
+
+static const char *phase_names[] =
+{
+    "T30_PHASE_IDLE",
+    "T30_PHASE_A_CED",
+    "T30_PHASE_A_CNG",
+    "T30_PHASE_B_RX",
+    "T30_PHASE_B_TX",
+    "T30_PHASE_C_NON_ECM_RX",
+    "T30_PHASE_C_NON_ECM_TX",
+    "T30_PHASE_C_ECM_RX",
+    "T30_PHASE_C_ECM_TX",
+    "T30_PHASE_D_RX",
+    "T30_PHASE_D_TX",
+    "T30_PHASE_E",
+    "T30_PHASE_CALL_FINISHED"
+};
+
+/* These state names are modelled after places in the T.30 flow charts. */
+enum
+{
+    T30_STATE_ANSWERING = 1,
+    T30_STATE_B,
+    T30_STATE_C,
+    T30_STATE_D,
+    T30_STATE_D_TCF,
+    T30_STATE_D_POST_TCF,
+    T30_STATE_F_TCF,
+    T30_STATE_F_CFR,
+    T30_STATE_F_FTT,
+    T30_STATE_F_DOC,
+    T30_STATE_F_POST_DOC_NON_ECM,
+    T30_STATE_F_POST_DOC_ECM,
+    T30_STATE_F_POST_RCP_MCF,
+    T30_STATE_F_POST_RCP_PPR,
+    T30_STATE_R,
+    T30_STATE_T,
+    T30_STATE_I,
+    T30_STATE_II,
+    T30_STATE_II_Q,
+    T30_STATE_III_Q_MCF,
+    T30_STATE_III_Q_RTP,
+    T30_STATE_III_Q_RTN,
+    T30_STATE_IV,
+    T30_STATE_IV_PPS_NULL,
+    T30_STATE_IV_PPS_Q,
+    T30_STATE_IV_PPS_RNR,
+    T30_STATE_IV_CTC,
+    T30_STATE_IV_EOR,
+    T30_STATE_IV_EOR_RNR,
+    T30_STATE_CALL_FINISHED
+};
+
+enum
+{
+    T30_MODE_SEND_DOC = 1,
+    T30_MODE_RECEIVE_DOC
+};
+
+enum
+{
+    T30_COPY_QUALITY_GOOD = 0,
+    T30_COPY_QUALITY_POOR,
+    T30_COPY_QUALITY_BAD
+};
+
+#define DISBIT1     0x01
+#define DISBIT2     0x02
+#define DISBIT3     0x04
+#define DISBIT4     0x08
+#define DISBIT5     0x10
+#define DISBIT6     0x20
+#define DISBIT7     0x40
+#define DISBIT8     0x80
+
+/* All timers specified in milliseconds */
+
+/* Time-out T0 defines the amount of time an automatic calling terminal waits for the called terminal
+to answer the call.
+T0 begins after the dialling of the number is completed and is reset:
+a)       when T0 times out; or
+b)       when timer T1 is started; or
+c)       if the terminal is capable of detecting any condition which indicates that the call will not be
+         successful, when such a condition is detected.
+The recommended value of T0 is 60+-5s; however, when it is anticipated that a long call set-up
+time may be encountered, an alternative value of up to 120s may be used.
+NOTE - National regulations may require the use of other values for T0. */
+#define DEFAULT_TIMER_T0            60000
+
+/* Time-out T1 defines the amount of time two terminals will continue to attempt to identify each
+other. T1 is 35+-5s, begins upon entering phase B, and is reset upon detecting a valid signal or
+when T1 times out.
+For operating methods 3 and 4 (see 3.1), the calling terminal starts time-out T1 upon reception of
+the V.21 modulation scheme.
+For operating method 4 bis a (see 3.1), the calling terminal starts time-out T1 upon starting
+transmission using the V.21 modulation scheme. */
+#define DEFAULT_TIMER_T1            35000
+
+/* Time-out T2 makes use of the tight control between commands and responses to detect the loss of
+command/response synchronization. T2 is 6+-1s and begins when initiating a command search
+(e.g., the first entrance into the "command received" subroutine, reference flow diagram in 5.2).
+T2 is reset when an HDLC flag is received or when T2 times out. */
+#define DEFAULT_TIMER_T2            7000
+
+/* Time-out T3 defines the amount of time a terminal will attempt to alert the local operator in
+response to a procedural interrupt. Failing to achieve operator intervention, the terminal will
+discontinue this attempt and shall issue other commands or responses. T3 is 10+-5s, begins on the
+first detection of a procedural interrupt command/response signal (i.e., PIN/PIP or PRI-Q) and is
+reset when T3 times out or when the operator initiates a line request. */
+#define DEFAULT_TIMER_T3            15000
+
+/* NOTE - For manual FAX units, the value of timer T4 may be either 3.0s +-15% or 4.5s +-15%.
+If the value of 4.5s is used, then after detection of a valid response to the first DIS, it may
+be reduced to 3.0s +-15%. T4 = 3.0s +-15% for automatic units. */
+#define DEFAULT_TIMER_T4            3450
+
+/* Time-out T5 is defined for the optional T.4 error correction mode. Time-out T5 defines the amount
+of time waiting for clearance of the busy condition of the receiving terminal. T5 is 60+-5s and
+begins on the first detection of the RNR response. T5 is reset when T5 times out or the MCF or PIP
+response is received or when the ERR or PIN response is received in the flow control process after
+transmitting the EOR command. If the timer T5 has expired, the DCN command is transmitted for
+call release. */
+#define DEFAULT_TIMER_T5            65000
+
+#define DEFAULT_TIMER_T6            5000
+
+#define DEFAULT_TIMER_T7            6000
+
+#define DEFAULT_TIMER_T8            10000
+
+/* Exact widths in PELs for the difference resolutions, and page widths:
+    R4    864 pels/215mm for ISO A4, North American Letter and Legal
+    R4   1024 pels/255mm for ISO B4
+    R4   1216 pels/303mm for ISO A3
+    R8   1728 pels/215mm for ISO A4, North American Letter and Legal
+    R8   2048 pels/255mm for ISO B4
+    R8   2432 pels/303mm for ISO A3
+    R16  3456 pels/215mm for ISO A4, North American Letter and Legal
+    R16  4096 pels/255mm for ISO B4
+    R16  4864 pels/303mm for ISO A3
+*/
+
+#define T30_V17_FALLBACK_START          0
+#define T30_V29_FALLBACK_START          3
+#define T30_V27TER_FALLBACK_START       6
+
+static const struct
+{
+    int bit_rate;
+    int modem_type;
+    uint8_t dcs_code;
+} fallback_sequence[] =
+{
+    {14400, T30_MODEM_V17_14400,    DISBIT6},
+    {12000, T30_MODEM_V17_12000,    (DISBIT6 | DISBIT4)},
+    { 9600, T30_MODEM_V17_9600,     (DISBIT6 | DISBIT3)},
+    { 9600, T30_MODEM_V29_9600,     DISBIT3},
+    { 7200, T30_MODEM_V17_7200,     (DISBIT6 | DISBIT4 | DISBIT3)},
+    { 7200, T30_MODEM_V29_7200,     (DISBIT4 | DISBIT3)},
+    { 4800, T30_MODEM_V27TER_4800,  DISBIT4},
+    { 2400, T30_MODEM_V27TER_2400,  0},
+    {    0, 0, 0}
+};
+
+static void queue_phase(t30_state_t *s, int phase);
+static void set_phase(t30_state_t *s, int phase);
+static void set_state(t30_state_t *s, int state);
+static void send_simple_frame(t30_state_t *s, int type);
+static void send_frame(t30_state_t *s, const uint8_t *fr, int frlen);
+static void send_dcn(t30_state_t *s);
+static void repeat_last_command(t30_state_t *s);
+static void disconnect(t30_state_t *s);
+static void decode_20digit_msg(t30_state_t *s, char *msg, const uint8_t *pkt, int len);
+static void decode_url_msg(t30_state_t *s, char *msg, const uint8_t *pkt, int len);
+
+static void rx_start_page(t30_state_t *s)
+{
+    int i;
+
+    t4_rx_set_image_width(&(s->t4), s->image_width);
+    t4_rx_set_sub_address(&(s->t4), s->far_sub_address);
+    t4_rx_set_far_ident(&(s->t4), s->far_ident);
+    t4_rx_set_vendor(&(s->t4), s->vendor);
+    t4_rx_set_model(&(s->t4), s->model);
+
+    t4_rx_set_rx_encoding(&(s->t4), s->line_encoding);
+    t4_rx_set_y_resolution(&(s->t4), s->y_resolution);
+
+    t4_rx_start_page(&(s->t4));
+    /* Clear the buffer */
+    for (i = 0;  i < 256;  i++)
+        s->ecm_len[i] = -1;
+    s->ecm_frames = -1;
+    s->ecm_page++;
+    s->ecm_block = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int copy_quality(t30_state_t *s)
+{
+    t4_stats_t stats;
+
+    /* There is no specification for judging copy quality. However, we need to classify
+       it at three levels, to control what we do next: OK; tolerable, but retrain;
+       intolerable, so retrain. */
+    t4_get_transfer_statistics(&(s->t4), &stats);
+    span_log(&s->logging, SPAN_LOG_FLOW, "Pages = %d\n", stats.pages_transferred);
+    span_log(&s->logging, SPAN_LOG_FLOW, "Image size = %dx%d\n", stats.width, stats.length);
+    span_log(&s->logging, SPAN_LOG_FLOW, "Image resolution = %dx%d\n", stats.x_resolution, stats.y_resolution);
+    span_log(&s->logging, SPAN_LOG_FLOW, "Bad rows = %d\n", stats.bad_rows);
+    span_log(&s->logging, SPAN_LOG_FLOW, "Longest bad row run = %d\n", stats.longest_bad_row_run);
+    if (stats.bad_rows*50 < stats.length)
+        return T30_COPY_QUALITY_GOOD;
+    if (stats.bad_rows*20 < stats.length)
+        return T30_COPY_QUALITY_POOR;
+    return T30_COPY_QUALITY_BAD;
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *t30_completion_code_to_str(int result)
+{
+    switch (result)
+    {
+    case T30_ERR_OK:
+        return "OK";
+    case T30_ERR_CEDTONE:
+        return "The CED tone exceeded 5s";
+    case T30_ERR_T0EXPIRED:
+        return "Timed out waiting for initial communication";
+    case T30_ERR_T1EXPIRED:
+        return "Timed out waiting for the first message";
+    case T30_ERR_T3EXPIRED:
+        return "Timed out waiting for procedural interrupt";
+    case T30_ERR_HDLCCARR:
+        return "The HDLC carrier did not stop in a timely manner";
+    case T30_ERR_CANNOTTRAIN:
+        return "Failed to train with any of the compatible modems";
+    case T30_ERR_OPERINTFAIL:
+        return "Operator intervention failed";
+    case T30_ERR_INCOMPATIBLE:
+        return "Far end is not compatible";
+    case T30_ERR_NOTRXCAPABLE:
+        return "Far end is not receive capable";
+    case T30_ERR_NOTTXCAPABLE:
+        return "Far end is not transmit capable";
+    case T30_ERR_UNEXPECTED:
+        return "Unexpected message received";
+    case T30_ERR_NORESSUPPORT:
+        return "Far end cannot receive at the resolution of the image";
+    case T30_ERR_NOSIZESUPPORT:
+        return "Far end cannot receive at the size of image";
+    case T30_ERR_FILEERROR:
+        return "TIFF/F file cannot be opened";
+    case T30_ERR_NOPAGE:
+        return "TIFF/F page not found";
+    case T30_ERR_BADTIFF:
+        return "TIFF/F format is not compatible";
+    case T30_ERR_UNSUPPORTED:
+        return "Unsupported feature";
+    case T30_ERR_BADDCSTX:
+        return "Received bad response to DCS or training";
+    case T30_ERR_BADPGTX:
+        return "Received a DCN from remote after sending a page";
+    case T30_ERR_ECMPHDTX:
+        return "Invalid ECM response received from receiver";
+    case T30_ERR_ECMRNRTX:
+        return "Timer T5 expired, receiver not ready";
+    case T30_ERR_GOTDCNTX:
+        return "Received a DCN while waiting for a DIS";
+    case T30_ERR_INVALRSPTX:
+        return "Invalid response after sending a page";
+    case T30_ERR_NODISTX:
+        return "Received other than DIS while waiting for DIS";
+    case T30_ERR_NXTCMDTX:
+        return "Timed out waiting for next send_page command from driver";
+    case T30_ERR_PHBDEADTX:
+        return "Received no response to DCS, training or TCF";
+    case T30_ERR_PHDDEADTX:
+        return "No response after sending a page";
+    case T30_ERR_ECMPHDRX:
+        return "Invalid ECM response received from transmitter";
+    case T30_ERR_GOTDCSRX:
+        return "DCS received while waiting for DTC";
+    case T30_ERR_INVALCMDRX:
+        return "Unexpected command after page received";
+    case T30_ERR_NOCARRIERRX:
+        return "Carrier lost during fax receive";
+    case T30_ERR_NOEOLRX:
+        return "Timed out while waiting for EOL (end Of line)";
+    case T30_ERR_NOFAXRX:
+        return "Timed out while waiting for first line";
+    case T30_ERR_NXTCMDRX:
+        return "Timed out waiting for next receive page command";
+    case T30_ERR_T2EXPDCNRX:
+        return "Timer T2 expired while waiting for DCN";
+    case T30_ERR_T2EXPDRX:
+        return "Timer T2 expired while waiting for phase D";
+    case T30_ERR_T2EXPFAXRX:
+        return "Timer T2 expired while waiting for fax page";
+    case T30_ERR_T2EXPMPSRX:
+        return "Timer T2 expired while waiting for next fax page";
+    case T30_ERR_T2EXPRRRX:
+        return "Timer T2 expired while waiting for RR command";
+    case T30_ERR_T2EXPRX:
+        return "Timer T2 expired while waiting for NSS, DCS or MCF";
+    case T30_ERR_DCNWHYRX:
+        return "Unexpected DCN while waiting for DCS or DIS";
+    case T30_ERR_DCNDATARX:
+        return "Unexpected DCN while waiting for image data";
+    case T30_ERR_DCNFAXRX:
+        return "Unexpected DCN while waiting for EOM, EOP or MPS";
+    case T30_ERR_DCNPHDRX:
+        return "Unexpected DCN after EOM or MPS sequence";
+    case T30_ERR_DCNRRDRX:
+        return "Unexpected DCN after RR/RNR sequence";
+    case T30_ERR_DCNNORTNRX:
+        return "Unexpected DCN after requested retransmission";
+    case T30_ERR_BADPAGE:
+        return "TIFF/F page number tag missing";
+    case T30_ERR_BADTAG:
+        return "Incorrect values for TIFF/F tags";
+    case T30_ERR_BADTIFFHDR:
+        return "Bad TIFF/F header - incorrect values in fields";
+    case T30_ERR_BADPARM:
+        return "Invalid value for fax parameter";
+    case T30_ERR_BADSTATE:
+        return "Invalid initial state value specified";
+    case T30_ERR_CMDDATA:
+        return "Last command contained invalid data";
+    case T30_ERR_DISCONNECT:
+        return "Fax call disconnected by the other station";
+    case T30_ERR_INVALARG:
+        return "Illegal argument to function";
+    case T30_ERR_INVALFUNC:
+        return "Illegal call to function";
+    case T30_ERR_NODATA:
+        return "Data requested is not available (NSF, DIS, DCS)";
+    case T30_ERR_NOMEM:
+        return "Cannot allocate memory for more pages";
+    case T30_ERR_NOPOLL:
+        return "Poll not accepted";
+    case T30_ERR_NOSTATE:
+        return "Initial state value not set";
+    case T30_ERR_RETRYDCN:
+        return "Disconnected after permitted retries";
+    case T30_ERR_CALLDROPPED:
+        return "The call dropped prematurely";
+    }
+    return "???";
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_non_ecm_put_bit(void *user_data, int bit)
+{
+    t30_state_t *s;
+    int was_trained;
+
+    s = (t30_state_t *) user_data;
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM carrier training failed in state %d\n", s->state);
+            s->rx_trained = FALSE;
+            /* Cancel the timer, since we have actually seen something, and wait until the carrier drops
+               before proceeding. */
+            // TODO: this is not a complete answer to handling failures to train
+            s->timer_t2_t4 = 0;
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            /* The modem is now trained */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM carrier trained in state %d\n", s->state);
+            /* In case we are in trainability test mode... */
+            /* A FAX machine is supposed to send 1.5s of training test
+               data, but some send a little bit less. Lets just check
+               the first 1s, and be safe. */
+            s->training_current_zeros = 0;
+            s->training_most_zeros = 0;
+            s->rx_signal_present = TRUE;
+            s->rx_trained = TRUE;
+            s->timer_t2_t4 = 0;
+            break;
+        case PUTBIT_CARRIER_UP:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM carrier up in state %d\n", s->state);
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM carrier down in state %d\n", s->state);
+            was_trained = s->rx_trained;
+            s->rx_signal_present = FALSE;
+            s->rx_trained = FALSE;
+            switch (s->state)
+            {
+            case T30_STATE_F_TCF:
+                /* Only respond if we managed to actually sync up with the source. We don't
+                   want to respond just because we saw a click. These often occur just
+                   before the real signal, with many modems. Presumably this is due to switching
+                   within the far end modem. We also want to avoid the possibility of responding
+                   to the tail end of any slow modem signal. If there was a genuine data signal
+                   which we failed to train on it should not matter. If things are that bad, we
+                   do not stand much chance of good quality communications. */
+                if (was_trained)
+                {
+                    /* Although T.30 says the training test should be 1.5s of all 0's, some FAX
+                       machines send a burst of all 1's before the all 0's. Tolerate this. */
+                    if (s->training_current_zeros > s->training_most_zeros)
+                        s->training_most_zeros = s->training_current_zeros;
+                    if (s->training_most_zeros < fallback_sequence[s->current_fallback].bit_rate)
+                    {
+                        span_log(&s->logging, SPAN_LOG_FLOW, "Trainability test failed - longest run of zeros was %d\n", s->training_most_zeros);
+                        set_phase(s, T30_PHASE_B_TX);
+                        set_state(s, T30_STATE_F_FTT);
+                        send_simple_frame(s, T30_FTT);
+                    }
+                    else
+                    {
+                        /* The training went OK */
+                        s->short_train = TRUE;
+                        s->in_message = TRUE;
+                        rx_start_page(s);
+                        set_phase(s, T30_PHASE_B_TX);
+                        set_state(s, T30_STATE_F_CFR);
+                        send_simple_frame(s, T30_CFR);
+                    }
+                }
+                break;
+            case T30_STATE_F_POST_DOC_NON_ECM:
+                /* Page ended cleanly */
+                if (s->current_status == T30_ERR_NOCARRIERRX)
+                    s->current_status = T30_ERR_OK;
+                break;
+            default:
+                /* We should be receiving a document right now, but it did not end cleanly. */
+                if (was_trained)
+                {
+                    span_log(&s->logging, SPAN_LOG_WARNING, "Page did not end cleanly\n");
+                    /* We trained OK, so we should have some kind of received page, even though
+                       it did not end cleanly. */
+                    set_state(s, T30_STATE_F_POST_DOC_NON_ECM);
+                    set_phase(s, T30_PHASE_D_RX);
+                    s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T2);
+                    s->timer_is_t4 = FALSE;
+                    if (s->current_status == T30_ERR_NOCARRIERRX)
+                        s->current_status = T30_ERR_OK;
+                }
+                else
+                {
+                    span_log(&s->logging, SPAN_LOG_WARNING, "Non-ECM carrier not found\n");
+                    s->current_status = T30_ERR_NOCARRIERRX;
+                }
+                break;
+            }
+            if (s->next_phase != T30_PHASE_IDLE)
+            {
+                set_phase(s, s->next_phase);
+                s->next_phase = T30_PHASE_IDLE;
+            }
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_WARNING, "Unexpected non-ECM special bit - %d!\n", bit);
+            break;
+        }
+        return;
+    }
+    switch (s->state)
+    {
+    case T30_STATE_F_TCF:
+        /* Trainability test */
+        if (bit)
+        {
+            if (s->training_current_zeros > s->training_most_zeros)
+                s->training_most_zeros = s->training_current_zeros;
+            s->training_current_zeros = 0;
+        }
+        else
+        {
+            s->training_current_zeros++;
+        }
+        break;
+    case T30_STATE_F_DOC:
+        /* Document transfer */
+        if (t4_rx_put_bit(&(s->t4), bit))
+        {
+            /* That is the end of the document */
+            set_state(s, T30_STATE_F_POST_DOC_NON_ECM);
+            queue_phase(s, T30_PHASE_D_RX);
+            s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T2);
+            s->timer_is_t4 = FALSE;
+        }
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_non_ecm_putbyte(void *user_data, int byte)
+{
+    t30_state_t *s;
+    int i;
+
+    s = (t30_state_t *) user_data;
+    switch (s->state)
+    {
+    case T30_STATE_F_TCF:
+        /* Trainability test */
+        if (byte == 0)
+        {
+            s->training_current_zeros += 8;
+        }
+        else
+        {
+            for (i = 7;  i >= 0;  i--)
+            {
+                if (((byte >> i) & 1))
+                {
+                    if (s->training_current_zeros > s->training_most_zeros)
+                        s->training_most_zeros = s->training_current_zeros;
+                    s->training_current_zeros = 0;
+                }
+                else
+                {
+                    s->training_current_zeros++;
+                }
+            }
+        }
+        break;
+    case T30_STATE_F_DOC:
+        /* Document transfer */
+        for (i = 7;  i >= 0;  i--)
+        {
+            if (t4_rx_put_bit(&(s->t4), (byte >> i) & 1))
+            {
+                /* That is the end of the document */
+                set_state(s, T30_STATE_F_POST_DOC_NON_ECM);
+                queue_phase(s, T30_PHASE_D_RX);
+                s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T2);
+                s->timer_is_t4 = FALSE;
+            }
+        }
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int t30_non_ecm_get_bit(void *user_data)
+{
+    int bit;
+    t30_state_t *s;
+
+    s = (t30_state_t *) user_data;
+    switch (s->state)
+    {
+    case T30_STATE_D_TCF:
+        /* Trainability test. */
+        bit = 0;
+        if (s->training_test_bits-- < 0)
+        {
+            /* Finished sending training test. */
+            bit = PUTBIT_END_OF_DATA;
+        }
+        break;
+    case T30_STATE_I:
+        /* Transferring real data. */
+        bit = t4_tx_get_bit(&(s->t4));
+        break;
+    case T30_STATE_D_POST_TCF:
+    case T30_STATE_II_Q:
+        /* We should be padding out a block of samples if we are here */
+        bit = 0;
+        break;
+    default:
+        span_log(&s->logging, SPAN_LOG_WARNING, "t30_non_ecm_get_bit in bad state %d\n", s->state);
+        bit = 2;
+        break;
+    }
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int check_next_tx_step(t30_state_t *s)
+{
+    int more;
+
+    if (t4_tx_more_pages(&(s->t4)) == 0)
+        return (s->local_interrupt_pending)  ?  T30_PRI_MPS  :  T30_MPS;
+    /* Call a user handler, if one is set, to check if another document is to be sent.
+       If so, we send an EOM, rather than an EOP. Then we will renegotiate, and the new
+       document will begin. */
+    if (s->document_handler)
+        more = s->document_handler(s, s->document_user_data, 0);
+    else
+        more = FALSE;
+    if (more)
+        return (s->local_interrupt_pending)  ?  T30_PRI_EOM  :  T30_EOM;
+    return (s->local_interrupt_pending)  ?  T30_PRI_EOP  :  T30_EOP;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int get_partial_ecm_page(t30_state_t *s)
+{
+    int i;
+    int j;
+    int k;
+    int bit;
+    uint8_t octet;
+
+    s->ppr_count = 0;
+    /* Fill our partial page buffer with a partial page. Use the negotiated preferred frame size
+       as the basis for the size of the frames produced. */
+    /* We fill the buffer with complete HDLC frames, ready to send out. */
+    /* The frames are all marked as not being final frames. When sent, the are followed by a partial
+       page signal, which is marked as the final frame. */
+    for (i = 0;  i < 256;  i++)
+        s->ecm_len[i] = -1;
+    for (i = 3;  i < 32 + 3;  i++)
+        s->ecm_frame_map[i] = 0xFF;
+    for (i = 0;  i < 256;  i++)
+    {
+        s->ecm_data[i][0] = 0xFF;
+        s->ecm_data[i][1] = 0x03;
+        s->ecm_data[i][2] = T4_FCD;
+        /* These frames contain a frame sequence number within the partial page (one octet) followed
+           by some image data. */
+        s->ecm_data[i][3] = i;
+        for (j = 4;  j < s->octets_per_ecm_frame + 4;  j++)
+        {
+            octet = 0;
+            for (k = 0;  k < 8;  k++)
+            {
+                if (((bit = t4_tx_get_bit(&(s->t4)))) == PUTBIT_END_OF_DATA)
+                {
+                    if (k > 0)
+                        s->ecm_data[i][j++] = (uint8_t) (octet >> (7 - k));
+                    if (j > 0)
+                    {
+                        memset(&s->ecm_data[i][j], 0, s->octets_per_ecm_frame + 4 - j);
+                        s->ecm_len[i++] = (int16_t) (s->octets_per_ecm_frame + 4);
+                    }
+                    /* The image is not big enough to fill the entire buffer */
+                    /* We need to pad to a full frame, as most receivers expect
+                       that. */
+                    s->ecm_frames = i;
+                    span_log(&s->logging, SPAN_LOG_FLOW, "Partial page buffer contains %d frames (%d per frame)\n", i, s->octets_per_ecm_frame);
+                    s->ecm_at_page_end = TRUE;
+                    return i;
+                }
+                octet = (uint8_t) ((octet >> 1) | ((bit & 1) << 7));
+            }
+            s->ecm_data[i][j] = octet;
+        }
+        s->ecm_len[i] = (int16_t) j;
+    }
+    /* We filled the entire buffer */
+    s->ecm_frames = 256;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Partial page buffer full (%d per frame)\n", s->octets_per_ecm_frame);
+    s->ecm_at_page_end = ((t4_tx_check_bit(&(s->t4)) & 2) != 0);
+    return 256;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int t30_ecm_commit_partial_page(t30_state_t *s)
+{
+    int i;
+    int j;
+    int k;
+    int bit;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Commiting partial page - %d frames\n", s->ecm_frames);
+    for (i = 0;  i < s->ecm_frames;  i++)
+    {
+        for (j = 0;  j < s->ecm_len[i];  j++)
+        {
+            for (k = 0;  k < 8;  k++)
+            {
+                bit = (s->ecm_data[i][j] >> k) & 1;
+                if (t4_rx_put_bit(&(s->t4), bit))
+                {
+                    /* That is the end of the document */
+                    /* Clear the buffer */
+                    for (i = 0;  i < 256;  i++)
+                        s->ecm_len[i] = -1;
+                    s->ecm_frames = -1;
+                    return -1;
+                }
+            }
+        }
+    }
+    /* Clear the buffer */
+    for (i = 0;  i < 256;  i++)
+        s->ecm_len[i] = -1;
+    s->ecm_frames = -1;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int send_next_ecm_frame(t30_state_t *s)
+{
+    int i;
+    uint8_t frame[3];
+
+    if (s->ecm_current_frame < s->ecm_frames)
+    {
+        /* Search for the next frame, within the current partial page, which has
+           not been tagged as transferred OK. */
+        for (i = s->ecm_current_frame;  i < s->ecm_frames;  i++)
+        {
+            if (s->ecm_len[i] >= 0)
+            {
+                send_frame(s, s->ecm_data[i], s->ecm_len[i]);
+                s->ecm_current_frame = i + 1;
+                return 0;
+            }
+        }
+    }
+    if (s->ecm_current_frame <= s->ecm_frames + 3)
+    {
+        /* We have sent all the FCD frames. Send some RCP frames. Three seems to be
+           a popular number, to minimise the risk of a bit error stopping the receiving
+           end from recognising the RCP. */
+        s->ecm_current_frame++;
+        /* The RCP frame is an odd man out, as its a simple 1 byte control
+           frame, but is specified to not have the final bit set. */
+        frame[0] = 0xFF;
+        frame[1] = 0x03;
+        frame[2] = (uint8_t) (T4_RCP | s->dis_received);
+        send_frame(s, frame, 3);
+        return 0;
+    }
+    return -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void print_frame(t30_state_t *s, const char *io, const uint8_t *fr, int frlen)
+{
+    span_log(&s->logging,
+             SPAN_LOG_FLOW,
+             "%s %s with%s final frame tag\n",
+             io,
+             t30_frametype(fr[2]),
+             (fr[1] & 0x10)  ?  ""  :  "out");
+    span_log_buf(&s->logging, SPAN_LOG_FLOW, io, fr, frlen);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void send_frame(t30_state_t *s, const uint8_t *fr, int frlen)
+{
+    print_frame(s, "Tx: ", fr, frlen);
+
+    if (s->send_hdlc_handler)
+        s->send_hdlc_handler(s->send_hdlc_user_data, fr, frlen);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void send_simple_frame(t30_state_t *s, int type)
+{
+    uint8_t frame[3];
+
+    /* The simple command/response frames are always final frames */
+    frame[0] = 0xFF;
+    frame[1] = 0x13;
+    frame[2] = (uint8_t) (type | s->dis_received);
+    send_frame(s, frame, 3);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void send_20digit_msg_frame(t30_state_t *s, int cmd, char *msg)
+{
+    size_t len;
+    int p;
+    uint8_t frame[23];
+
+    len = strlen(msg);
+    p = 0;
+    frame[p++] = 0xFF;
+    frame[p++] = 0x03;
+    frame[p++] = (uint8_t) (cmd | s->dis_received);
+    while (len > 0)
+        frame[p++] = msg[--len];
+    while (p < 23)
+        frame[p++] = ' ';
+    send_frame(s, frame, 23);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int send_ident_frame(t30_state_t *s, uint8_t cmd)
+{
+    /* Only send if there is an ident to send. */
+    if (s->local_ident[0])
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Sending ident '%s'\n", s->local_ident);
+        /* 'cmd' should be T30_TSI, T30_CIG or T30_CSI */
+        send_20digit_msg_frame(s, cmd, s->local_ident);
+        return TRUE;
+    }
+    return FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int send_pw_frame(t30_state_t *s)
+{
+    /* Only send if there is a password to send. */
+    if (s->local_password[0])
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Sending password '%s'\n", s->local_password);
+        send_20digit_msg_frame(s, T30_PWD, s->local_password);
+        return TRUE;
+    }
+    return FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int send_sub_frame(t30_state_t *s)
+{
+    /* Only send if there is a sub-address to send. */
+    if (s->local_sub_address[0])
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Sending sub address '%s'\n", s->local_sub_address);
+        send_20digit_msg_frame(s, T30_SUB, s->local_sub_address);
+        return TRUE;
+    }
+    return FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int send_nsf_frame(t30_state_t *s)
+{
+    int p;
+    uint8_t frame[100 + 3];
+
+    /* Only send if there is an NSF message to send. */
+    if (s->local_nsf_len)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Sending user supplied NSF - %d octets\n", s->local_nsf_len);
+        p = 0;
+        frame[p++] = 0xFF;
+        frame[p++] = 0x03;
+        frame[p++] = (uint8_t) (T30_NSF | s->dis_received);
+        for (  ;  p < s->local_nsf_len + 3;  p++)
+            frame[p] = s->local_nsf[p - 3];
+        send_frame(s, frame, s->local_nsf_len + 3);
+        return TRUE;
+    }
+    return FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int send_pps_frame(t30_state_t *s)
+{
+    uint8_t frame[100 + 3];
+    
+    frame[0] = 0xFF;
+    frame[1] = 0x13;
+    frame[2] = T30_PPS;
+    frame[3] = (s->ecm_at_page_end)  ?  ((uint8_t) (s->next_tx_step | s->dis_received))  :  T30_NULL;
+    frame[4] = (uint8_t) (s->ecm_page & 0xFF);
+    frame[5] = (uint8_t) (s->ecm_block & 0xFF);
+    frame[6] = (uint8_t) (s->ecm_frames - 1);
+    span_log(&s->logging, SPAN_LOG_FLOW, "Sending PPS + %s\n", t30_frametype(frame[3]));
+    send_frame(s, frame, 7);
+    return frame[3] & 0xFE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int set_dis_or_dtc(t30_state_t *s)
+{
+    /* Whether we use a DIS or a DTC is determined by whether we have received a DIS.
+       We just need to edit the prebuilt message. */
+    s->dis_dtc_frame[2] = (uint8_t) (T30_DIS | s->dis_received);
+    /* If we have a file name to receive into, then we are receive capable */
+    if (s->rx_file[0])
+        s->dis_dtc_frame[4] |= DISBIT2;
+    else
+        s->dis_dtc_frame[4] &= ~DISBIT2;
+    /* If we have a file name to transmit, then we are ready to transmit (polling) */
+    if (s->tx_file[0])
+        s->dis_dtc_frame[4] |= DISBIT1;
+    else
+        s->dis_dtc_frame[4] &= ~DISBIT1;
+    t30_decode_dis_dtc_dcs(s, s->dis_dtc_frame, s->dis_dtc_len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int build_dis_or_dtc(t30_state_t *s)
+{
+    int i;
+
+    /* Build a skeleton for the DIS and DTC messages. This will be edited for
+       the dynamically changing capabilities (e.g. can receive) just before
+       it is sent. It might also be edited if the application changes our
+       capabilities (e.g. disabling fine mode). Right now we set up all the
+       unchanging stuff about what we are capable of doing. */
+    s->dis_dtc_frame[0] = 0xFF;
+    s->dis_dtc_frame[1] = 0x13;
+    s->dis_dtc_frame[2] = (uint8_t) (T30_DIS | s->dis_received);
+    s->dis_dtc_frame[3] = 0x00;
+    s->dis_dtc_frame[4] = 0x00;
+    for (i = 5;  i < 18;  i++)
+        s->dis_dtc_frame[i] = DISBIT8;
+    s->dis_dtc_frame[18] = 0x00;
+
+    /* Always say 256 octets per ECM frame preferred, as 64 is never used in the
+       real world. */
+    if ((s->iaf & T30_IAF_MODE_T37))
+        s->dis_dtc_frame[3] |= DISBIT1;
+    if ((s->iaf & T30_IAF_MODE_T38))
+        s->dis_dtc_frame[3] |= DISBIT3;
+    /* No 3G mobile  */
+    /* No V.8 */
+    /* 256 octets preferred - don't bother making this optional, as everything uses 256 */
+    /* Ready to transmit a fax (polling) will be determined separately, and this message edited. */
+    /* Ready to receive a fax will be determined separately, and this message edited. */
+    /* With no modems set we are actually selecting V.27ter fallback at 2400bps */
+    if ((s->supported_modems & T30_SUPPORT_V27TER))
+        s->dis_dtc_frame[4] |= DISBIT4;
+    if ((s->supported_modems & T30_SUPPORT_V29))
+        s->dis_dtc_frame[4] |= DISBIT3;
+    /* V.17 is only valid when combined with V.29 and V.27ter, so if we enable V.17 we force the others too. */
+    if ((s->supported_modems & T30_SUPPORT_V17))
+        s->dis_dtc_frame[4] |= (DISBIT6 | DISBIT4 | DISBIT3);
+    if ((s->supported_resolutions & T30_SUPPORT_FINE_RESOLUTION))
+        s->dis_dtc_frame[4] |= DISBIT7;
+    if ((s->supported_compressions & T30_SUPPORT_T4_2D_COMPRESSION))
+        s->dis_dtc_frame[4] |= DISBIT8;
+    /* 215mm wide is always supported */
+    if ((s->supported_image_sizes & T30_SUPPORT_303MM_WIDTH))
+        s->dis_dtc_frame[5] |= DISBIT2;
+    else if ((s->supported_image_sizes & T30_SUPPORT_255MM_WIDTH))
+        s->dis_dtc_frame[5] |= DISBIT1;
+    /* A4 is always supported. */
+    if ((s->supported_image_sizes & T30_SUPPORT_UNLIMITED_LENGTH))
+        s->dis_dtc_frame[5] |= DISBIT4;
+    else if ((s->supported_image_sizes & T30_SUPPORT_B4_LENGTH))
+        s->dis_dtc_frame[5] |= DISBIT3;
+    /* No scan-line padding required. */
+    s->dis_dtc_frame[5] |= (DISBIT7 | DISBIT6 | DISBIT5);
+    if ((s->supported_compressions & T30_SUPPORT_NO_COMPRESSION))
+        s->dis_dtc_frame[6] |= DISBIT2;
+    if (s->ecm_allowed)
+        s->dis_dtc_frame[6] |= DISBIT3;
+    if ((s->supported_compressions & T30_SUPPORT_T6_COMPRESSION))
+        s->dis_dtc_frame[6] |= DISBIT7;
+#if defined(SUPPORT_FNV)
+    s->dis_dtc_frame[7] |= DISBIT1;
+#endif
+    if ((s->supported_polling_features & T30_SUPPORT_SEP))
+        s->dis_dtc_frame[7] |= DISBIT3;
+    if ((s->supported_polling_features & T30_SUPPORT_PSA))
+        s->dis_dtc_frame[7] |= DISBIT4;
+    if ((s->supported_compressions & T30_SUPPORT_T43_COMPRESSION))
+        s->dis_dtc_frame[7] |= DISBIT4;
+    /* No plane interleave */
+    /* No G.726 */
+    /* No extended voice coding */
+    if ((s->supported_resolutions & T30_SUPPORT_SUPERFINE_RESOLUTION))
+        s->dis_dtc_frame[8] |= DISBIT1;
+    if ((s->supported_resolutions & T30_SUPPORT_300_300_RESOLUTION))
+        s->dis_dtc_frame[8] |= DISBIT2;
+    if ((s->supported_resolutions & (T30_SUPPORT_400_400_RESOLUTION | T30_SUPPORT_R16_RESOLUTION)))
+        s->dis_dtc_frame[8] |= DISBIT3;
+    /* Metric */ 
+    s->dis_dtc_frame[8] |= DISBIT4;
+    /* No sub-addressing */
+    /* No password */
+    /* No data file (polling) */
+    /* No BFT */
+    /* No DTM */
+    /* No EDI */
+    /* No BTM */
+    /* No mixed mode (polling) */
+    /* No character mode */
+    /* No mixed mode */
+    /* No mode 26 */
+    /* No digital network capable */
+    /* No JPEG */
+    /* No full colour */
+    /* No 12bits/pel */
+    /* No sub-sampling */
+    if ((s->supported_image_sizes & T30_SUPPORT_US_LETTER_LENGTH))
+        s->dis_dtc_frame[12] |= DISBIT4;
+    if ((s->supported_image_sizes & T30_SUPPORT_US_LEGAL_LENGTH))
+        s->dis_dtc_frame[12] |= DISBIT5;
+    if ((s->supported_compressions & T30_SUPPORT_T85_COMPRESSION))
+        s->dis_dtc_frame[12] |= DISBIT6;
+    /* No T.85 optional. */
+    if ((s->supported_resolutions & T30_SUPPORT_600_600_RESOLUTION))
+        s->dis_dtc_frame[15] |= DISBIT1;
+    if ((s->supported_resolutions & T30_SUPPORT_1200_1200_RESOLUTION))
+        s->dis_dtc_frame[15] |= DISBIT2;
+    if ((s->supported_resolutions & T30_SUPPORT_300_600_RESOLUTION))
+        s->dis_dtc_frame[15] |= DISBIT3;
+    if ((s->supported_resolutions & T30_SUPPORT_400_800_RESOLUTION))
+        s->dis_dtc_frame[15] |= DISBIT4;
+    if ((s->supported_resolutions & T30_SUPPORT_600_1200_RESOLUTION))
+        s->dis_dtc_frame[15] |= DISBIT5;
+    if ((s->supported_compressions & T30_SUPPORT_T45_COMPRESSION))
+        s->dis_dtc_frame[16] |= DISBIT4;
+    if ((s->iaf & T30_IAF_MODE_FLOW_CONTROL))
+        s->dis_dtc_frame[18] |= DISBIT1;
+    if ((s->iaf & T30_IAF_MODE_CONTINUOUS_FLOW))
+        s->dis_dtc_frame[18] |= DISBIT3;
+    s->dis_dtc_len = 19;
+    t30_decode_dis_dtc_dcs(s, s->dis_dtc_frame, s->dis_dtc_len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int build_dcs(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Translation between the codes for the minimum scan times the other end needs,
+       and the codes for what we say will be used. We need 0 minimum. */
+    static const uint8_t translate_min_scan_time[3][8] =
+    {
+     /* 20  5 10 20 40 40 10  0ms */ 
+        {0, 1, 2, 0, 4, 4, 2, 7}, /* normal */
+        {0, 1, 2, 2, 4, 0, 1, 7}, /* fine */
+        {2, 1, 1, 1, 0, 2, 1, 7}  /* superfine, when half fine time is selected */
+    };
+    /* Translation between the codes for the minimum scan time we will use, and milliseconds. */
+    static const int min_scan_times[8] =
+    {
+        20, 5, 10, 0, 40, 0, 0, 0
+    };
+    uint8_t dis_dtc_frame[T30_MAX_DIS_DTC_DCS_LEN];
+    uint8_t min_bits_field;
+    int i;
+    
+    if (len < 6)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Short DIS/DTC frame\n");
+        return -1;
+    }
+
+    /* Make a local copy of the message, padded to the maximum possible length with zeros. This allows
+       us to simply pick out the bits, without worrying about whether they were set from the remote side. */
+    if (len > T30_MAX_DIS_DTC_DCS_LEN)
+    {
+        memcpy(dis_dtc_frame, msg, T30_MAX_DIS_DTC_DCS_LEN);
+    }
+    else
+    {
+        memcpy(dis_dtc_frame, msg, len);
+        if (len < T30_MAX_DIS_DTC_DCS_LEN)
+            memset(dis_dtc_frame + len, 0, T30_MAX_DIS_DTC_DCS_LEN - len);
+    }
+    
+    /* Make a DCS frame based on local issues and a received DIS frame. Negotiate the result
+       based on what both parties can do. */
+    s->dcs_frame[0] = 0xFF;
+    s->dcs_frame[1] = 0x13;
+    s->dcs_frame[2] = (uint8_t) (T30_DCS | s->dis_received);
+    s->dcs_frame[3] = 0x00;
+    s->dcs_frame[4] = 0x00;
+    for (i = 5;  i < 18;  i++)
+        s->dcs_frame[i] = DISBIT8;
+    s->dcs_frame[18] = 0x00;
+    /* Set to required modem rate; standard resolution */
+    s->dcs_frame[4] |= fallback_sequence[s->current_fallback].dcs_code;
+
+    if ((s->iaf & T30_IAF_MODE_NO_FILL_BITS))
+        min_bits_field = 7;
+    else
+        min_bits_field = (dis_dtc_frame[5] >> 4) & 7;
+    /* Select the compression to use. */
+    switch(s->line_encoding)
+    {
+    case T4_COMPRESSION_ITU_T6:
+        s->dcs_frame[6] |= DISBIT7;
+        break;
+    case T4_COMPRESSION_ITU_T4_2D:
+        s->dcs_frame[4] |= DISBIT8;
+        break;
+    default:
+        break;
+    }
+    /* If we have a file to send, tell the far end to go into receive mode. */
+    if (s->tx_file[0])
+        s->dcs_frame[4] |= DISBIT2;
+    /* Set the minimum scan time bits */
+    switch (s->y_resolution)
+    {
+    case T4_Y_RESOLUTION_SUPERFINE:
+        if ((dis_dtc_frame[8] & DISBIT1))
+        {
+            s->dcs_frame[8] |= DISBIT1;
+            if ((dis_dtc_frame[8] & DISBIT6))
+                min_bits_field = translate_min_scan_time[2][min_bits_field];
+            else
+                min_bits_field = translate_min_scan_time[1][min_bits_field];
+            break;
+        }
+        /* Fall back */
+        s->y_resolution = T4_Y_RESOLUTION_FINE;
+        span_log(&s->logging, SPAN_LOG_FLOW, "Remote FAX does not support super-fine resolution.\n");
+        /* Fall through */
+    case T4_Y_RESOLUTION_FINE:
+        if ((dis_dtc_frame[4] & DISBIT7))
+        {
+            s->dcs_frame[4] |= DISBIT7;
+            min_bits_field = translate_min_scan_time[1][min_bits_field];
+            break;
+        }
+        /* Fall back */
+        s->y_resolution = T4_Y_RESOLUTION_STANDARD;
+        span_log(&s->logging, SPAN_LOG_FLOW, "Remote FAX does not support fine resolution.\n");
+        /* Fall through */
+    default:
+    case T4_Y_RESOLUTION_STANDARD:
+        min_bits_field = translate_min_scan_time[0][min_bits_field];
+        break;
+    }
+    if (min_scan_times[min_bits_field] == 0)
+        s->min_row_bits = 0;
+    else
+        s->min_row_bits = fallback_sequence[s->current_fallback].bit_rate*min_scan_times[min_bits_field]/1000;
+    s->dcs_frame[5] |= min_bits_field << 4;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Minimum bits per row will be %d\n", s->min_row_bits);
+    switch (s->image_width)
+    {
+        /* Low (R4) res widths are not supported in recent versions of T.30 */
+        /* Medium (R8) res widths */
+    case 1728:
+        break;
+    case 2048:
+        if ((s->dis_dtc_frame[5] & (DISBIT2 | DISBIT1)) < 1)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Image width (%d pixels) not acceptable to far end\n", s->image_width);
+            return -1;
+        }
+        s->dcs_frame[5] |= DISBIT1;
+        break;
+    case 2432:
+        if ((s->dis_dtc_frame[5] & (DISBIT2 | DISBIT1)) < 2)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Image width (%d pixels) not acceptable to far end\n", s->image_width);
+            return -1;
+        }
+        s->dcs_frame[5] |= DISBIT2;
+        break;
+        /* High (R16) res widths */
+    case 3456:
+        if ((dis_dtc_frame[8] & DISBIT3) == 0)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Image width (%d pixels) not acceptable to far end\n", s->image_width);
+            return -1;
+        }
+        s->dcs_frame[8] |= DISBIT3;
+        break;
+    case 4096:
+        if ((dis_dtc_frame[8] & DISBIT3) == 0  ||  (s->dis_dtc_frame[5] & (DISBIT2 | DISBIT1)) == 0)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Image width (%d pixels) not acceptable to far end\n", s->image_width);
+            return -1;
+        }
+        s->dcs_frame[5] |= DISBIT1;
+        s->dcs_frame[8] |= DISBIT3;
+        break;
+    case 4864:
+        if ((dis_dtc_frame[8] & DISBIT3) == 0  ||  (s->dis_dtc_frame[5] & (DISBIT2 | DISBIT1)) != DISBIT2)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Image width (%d pixels) not acceptable to far end\n", s->image_width);
+            return -1;
+        }
+        s->dcs_frame[5] |= DISBIT2;
+        s->dcs_frame[8] |= DISBIT3;
+        break;
+    default:
+        /* The image is of an unrecognised width. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Image width (%d pixels) not a valid FAX image width\n", s->image_width);
+        return -1;
+    }
+    if (s->error_correcting_mode)
+        s->dcs_frame[6] |= DISBIT3;
+    s->dcs_len = 19;
+    t30_decode_dis_dtc_dcs(s, s->dcs_frame, s->dcs_len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int check_rx_dis_dtc(t30_state_t *s, const uint8_t *msg, int len)
+{
+    uint8_t dis_dtc_frame[T30_MAX_DIS_DTC_DCS_LEN];
+    
+    if (len < 6)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Short DIS/DTC frame\n");
+        return -1;
+    }
+
+    /* Make a local copy of the message, padded to the maximum possible length with zeros. This allows
+       us to simply pick out the bits, without worrying about whether they were set from the remote side. */
+    if (len > T30_MAX_DIS_DTC_DCS_LEN)
+    {
+        memcpy(dis_dtc_frame, msg, T30_MAX_DIS_DTC_DCS_LEN);
+    }
+    else
+    {
+        memcpy(dis_dtc_frame, msg, len);
+        if (len < T30_MAX_DIS_DTC_DCS_LEN)
+            memset(dis_dtc_frame + len, 0, T30_MAX_DIS_DTC_DCS_LEN - len);
+    }
+    s->error_correcting_mode = (s->ecm_allowed  &&  (dis_dtc_frame[6] & DISBIT3) != 0);
+    /* 256 octets per ECM frame */
+    s->octets_per_ecm_frame = 256;
+    /* Select the compression to use. */
+    if ((s->supported_compressions & T30_SUPPORT_T6_COMPRESSION)  &&  (dis_dtc_frame[6] & DISBIT7))
+    {
+        s->line_encoding = T4_COMPRESSION_ITU_T6;
+    }
+    else if ((s->supported_compressions & T30_SUPPORT_T4_2D_COMPRESSION)  &&  (dis_dtc_frame[4] & DISBIT8))
+    {
+        s->line_encoding = T4_COMPRESSION_ITU_T4_2D;
+    }
+    else
+    {
+        s->line_encoding = T4_COMPRESSION_ITU_T4_1D;
+    }
+    span_log(&s->logging, SPAN_LOG_FLOW, "Selected compression %d\n", s->line_encoding);
+    switch (dis_dtc_frame[4] & (DISBIT6 | DISBIT5 | DISBIT4 | DISBIT3))
+    {
+    case 0:
+        s->current_fallback = T30_V27TER_FALLBACK_START + 1;
+        break;
+    case DISBIT4:
+        s->current_fallback = T30_V27TER_FALLBACK_START;
+        break;
+    case DISBIT3:
+        /* TODO: this doesn't allow for skipping the V.27ter modes */
+        s->current_fallback = T30_V29_FALLBACK_START;
+        break;
+    case (DISBIT4 | DISBIT3):
+        s->current_fallback = T30_V29_FALLBACK_START;
+        break;
+    case (DISBIT6 | DISBIT4 | DISBIT3):
+        if ((s->supported_modems & T30_SUPPORT_V17))
+            s->current_fallback = T30_V17_FALLBACK_START;
+        else
+            s->current_fallback = T30_V29_FALLBACK_START;
+        break;
+    default:
+        span_log(&s->logging, SPAN_LOG_FLOW, "Remote does not support a compatible modem\n");
+        /* We cannot talk to this machine! */
+        return -1;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int check_rx_dcs(t30_state_t *s, const uint8_t *msg, int len)
+{
+    static const int widths[3][4] =
+    {
+        { 864, 1024, 1216, -1}, /* R4 resolution - no longer used in recent versions of T.30 */
+        {1728, 2048, 2432, -1}, /* R8 resolution */
+        {3456, 4096, 4864, -1}  /* R16 resolution */
+    };
+    uint8_t dcs_frame[T30_MAX_DIS_DTC_DCS_LEN];
+    int speed;
+    int i;
+
+    t30_decode_dis_dtc_dcs(s, msg, len);
+
+    /* Check DCS frame from remote */
+    if (len < 6)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Short DCS frame\n");
+        return -1;
+    }
+
+    /* Make a local copy of the message, padded to the maximum possible length with zeros. This allows
+       us to simply pick out the bits, without worrying about whether they were set from the remote side. */
+    if (len > T30_MAX_DIS_DTC_DCS_LEN)
+    {
+        memcpy(dcs_frame, msg, T30_MAX_DIS_DTC_DCS_LEN);
+    }
+    else
+    {
+        memcpy(dcs_frame, msg, len);
+        if (len < T30_MAX_DIS_DTC_DCS_LEN)
+            memset(dcs_frame + len, 0, T30_MAX_DIS_DTC_DCS_LEN - len);
+    }
+
+    s->octets_per_ecm_frame = (dcs_frame[6] & DISBIT4)  ?  256  :  64;
+    if ((dcs_frame[8] & DISBIT1))
+        s->y_resolution = T4_Y_RESOLUTION_SUPERFINE;
+    else if (dcs_frame[4] & DISBIT7)
+        s->y_resolution = T4_Y_RESOLUTION_FINE;
+    else
+        s->y_resolution = T4_Y_RESOLUTION_STANDARD;
+    s->image_width = widths[(dcs_frame[8] & DISBIT3)  ?  2  :  1][dcs_frame[5] & (DISBIT2 | DISBIT1)];
+
+    /* Check which compression we will use. */
+    if ((dcs_frame[6] & DISBIT7))
+        s->line_encoding = T4_COMPRESSION_ITU_T6;
+    else if ((dcs_frame[4] & DISBIT8))
+        s->line_encoding = T4_COMPRESSION_ITU_T4_2D;
+    else
+        s->line_encoding = T4_COMPRESSION_ITU_T4_1D;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Selected compression %d\n", s->line_encoding);
+    if (!(dcs_frame[4] & DISBIT2))
+        span_log(&s->logging, SPAN_LOG_FLOW, "Remote cannot receive\n");
+
+    speed = dcs_frame[4] & (DISBIT6 | DISBIT5 | DISBIT4 | DISBIT3);
+    for (i = 0;  fallback_sequence[i].bit_rate;  i++)
+    {
+        if (fallback_sequence[i].dcs_code == speed)
+            break;
+    }
+    if (fallback_sequence[i].bit_rate == 0)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Remote asked for a modem standard we do not support\n");
+        return -1;
+    }
+    s->current_fallback = i;
+    s->error_correcting_mode = ((dcs_frame[6] & DISBIT3) != 0);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void send_dcn(t30_state_t *s)
+{
+    queue_phase(s, T30_PHASE_D_TX);
+    set_state(s, T30_STATE_C);
+    send_simple_frame(s, T30_DCN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void send_dis_or_dtc_sequence(t30_state_t *s)
+{
+    if (send_nsf_frame(s))
+    {
+        s->step = 0;
+        return;
+    }
+    if (send_ident_frame(s, T30_CSI))
+    {
+        s->step = 1;
+        return;
+    }
+    set_dis_or_dtc(s);
+    send_frame(s, s->dis_dtc_frame, s->dis_dtc_len);
+    s->step = 2;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void send_dcs_sequence(t30_state_t *s)
+{
+    if (send_pw_frame(s))
+    {
+        s->step = 0;
+        return;
+    }
+    if (send_sub_frame(s))
+    {
+        s->step = 1;
+        return;
+    }
+    if (send_ident_frame(s, T30_TSI))
+    {
+        s->step = 2;
+        return;
+    }
+    send_frame(s, s->dcs_frame, s->dcs_len);
+    s->step = 3;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void disconnect(t30_state_t *s)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "Disconnecting\n");
+    /* Make sure any FAX in progress is tidied up. If the tidying up has
+       already happened, repeating it here is harmless. */
+    t4_rx_end(&(s->t4));
+    t4_tx_end(&(s->t4));
+    s->timer_t0_t1 = 0;
+    s->timer_t2_t4 = 0;
+    s->timer_t3 = 0;
+    s->timer_t5 = 0;
+    set_phase(s, T30_PHASE_E);
+    set_state(s, T30_STATE_B);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int start_sending_document(t30_state_t *s)
+{
+    if (s->tx_file[0] == '\0')
+    {
+        /* There is nothing to send */
+        span_log(&s->logging, SPAN_LOG_FLOW, "No document to send\n");
+        return  FALSE;
+    }
+    span_log(&s->logging, SPAN_LOG_FLOW, "Start sending document\n");
+    if (t4_tx_init(&(s->t4), s->tx_file, s->tx_start_page, s->tx_stop_page))
+    {
+        span_log(&s->logging, SPAN_LOG_WARNING, "Cannot open source TIFF file '%s'\n", s->tx_file);
+        s->current_status = T30_ERR_FILEERROR;
+        return  FALSE;
+    }
+    t4_tx_set_tx_encoding(&(s->t4), s->line_encoding);
+    t4_tx_set_min_row_bits(&(s->t4), s->min_row_bits);
+    t4_tx_set_local_ident(&(s->t4), s->local_ident);
+    t4_tx_set_header_info(&(s->t4), s->header_info);
+
+    s->y_resolution = t4_tx_get_y_resolution(&(s->t4));
+    switch (s->y_resolution)
+    {
+    case T4_Y_RESOLUTION_STANDARD:
+        s->dcs_frame[4] &= ~DISBIT7;
+        s->dcs_frame[8] &= ~DISBIT1;
+        break;
+    case T4_Y_RESOLUTION_FINE:
+        s->dcs_frame[4] |= DISBIT7;
+        s->dcs_frame[8] &= ~DISBIT1;
+        break;
+    case T4_Y_RESOLUTION_SUPERFINE:
+        s->dcs_frame[4] &= ~DISBIT7;
+        s->dcs_frame[8] |= DISBIT1;
+        break;
+    }
+    s->image_width = t4_tx_get_image_width(&(s->t4));
+    t4_tx_start_page(&(s->t4));
+    s->ecm_page = 0;
+    s->ecm_block = 0;
+    if (s->error_correcting_mode)
+    {
+        if (get_partial_ecm_page(s) == 0)
+            span_log(&s->logging, SPAN_LOG_WARNING, "No image data to send\n");
+    }
+    /* Schedule training after the messages */
+    set_state(s, T30_STATE_D);
+    s->retries = 0;
+    send_dcs_sequence(s);
+    return  TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int restart_sending_document(t30_state_t *s)
+{
+    /* Schedule training after the messages */
+    t4_tx_restart_page(&(s->t4));
+    set_state(s, T30_STATE_D);
+    s->retries = 0;
+    s->ecm_block = 0;
+    send_dis_or_dtc_sequence(s);
+    return  TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int start_receiving_document(t30_state_t *s)
+{
+    if (s->rx_file[0] == '\0')
+    {
+        /* There is nothing to receive to */
+        span_log(&s->logging, SPAN_LOG_FLOW, "No document to receive\n");
+        return  FALSE;
+    }
+    span_log(&s->logging, SPAN_LOG_FLOW, "Start receiving document\n");
+    queue_phase(s, T30_PHASE_B_TX);
+    set_state(s, T30_STATE_R);
+    s->dis_received = FALSE;
+    s->ecm_page = 0;
+    s->ecm_block = 0;
+    send_dis_or_dtc_sequence(s);
+    return  TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void unexpected_frame(t30_state_t *s, const uint8_t *msg, int len)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "Unexpected %s received in state %d\n", t30_frametype(msg[2]), s->state);
+    if (s->state == T30_STATE_F_DOC)
+        s->current_status = T30_ERR_INVALCMDRX;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void unexpected_final_frame(t30_state_t *s, const uint8_t *msg, int len)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "Unexpected %s received in state %d\n", t30_frametype(msg[2]), s->state);
+    s->current_status = T30_ERR_UNEXPECTED;
+    send_dcn(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void unexpected_frame_length(t30_state_t *s, const uint8_t *msg, int len)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "Unexpected %s frame length - %d\n", t30_frametype(msg[0]), len);
+    s->current_status = T30_ERR_UNEXPECTED;
+    send_dcn(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_dis_or_dtc(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Digital identification signal or digital transmit command */
+    s->dis_received = TRUE;
+    check_rx_dis_dtc(s, msg, len);
+    switch (s->state)
+    {
+    case T30_STATE_D_POST_TCF:
+        /* It appears they didn't see what we sent - retry the TCF */
+        if (++s->retries > MAX_MESSAGE_TRIES)
+        {
+            s->current_status = T30_ERR_RETRYDCN;
+            send_dcn(s);
+            break;
+        }
+        /* TODO: We should fall through at this point. However, if we do that
+           we need to allow for a send or receive already being in progress from
+           a previous try */
+        queue_phase(s, T30_PHASE_B_TX);
+        /* Schedule training after the messages */
+        set_state(s, T30_STATE_D);
+        send_dcs_sequence(s);
+        break;
+    case T30_STATE_R:
+    case T30_STATE_T:
+    case T30_STATE_F_DOC:
+        t30_decode_dis_dtc_dcs(s, msg, len);
+        if (s->phase_b_handler)
+            s->phase_b_handler(s, s->phase_d_user_data, msg[2]);
+        queue_phase(s, T30_PHASE_B_TX);
+        /* Try to send something */
+        if (s->tx_file[0])
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Trying to send file '%s'\n", s->tx_file);
+            if ((msg[4] & DISBIT2))
+            {
+                if (!start_sending_document(s))
+                {
+                    send_dcn(s);
+                    break;
+                }
+                if (build_dcs(s, msg, len))
+                {
+                    span_log(&s->logging, SPAN_LOG_FLOW, "The remote machine is incompatible\n", s->tx_file);
+                    s->current_status = T30_ERR_INCOMPATIBLE;
+                    send_dcn(s);
+                    break;
+                }
+            }
+            else
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "%s far end cannot receive\n", t30_frametype(msg[2]));
+                s->current_status = T30_ERR_NOTRXCAPABLE;
+                send_dcn(s);
+            }
+            break;
+        }
+        span_log(&s->logging, SPAN_LOG_FLOW, "%s nothing to send\n", t30_frametype(msg[2]));
+        /* ... then try to receive something */
+        if (s->rx_file[0])
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Trying to receive file '%s'\n", s->rx_file);
+            if ((msg[4] & DISBIT1))
+            {
+                if (!start_receiving_document(s))
+                {
+                    send_dcn(s);
+                    break;
+                }
+                if (set_dis_or_dtc(s))
+                {
+                    s->current_status = T30_ERR_INCOMPATIBLE;
+                    send_dcn(s);
+                    break;
+                }
+            }
+            else
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "%s far end cannot transmit\n", t30_frametype(msg[2]));
+                s->current_status = T30_ERR_NOTTXCAPABLE;
+                send_dcn(s);
+            }
+            break;
+        }
+        span_log(&s->logging, SPAN_LOG_FLOW, "%s nothing to receive\n", t30_frametype(msg[2]));
+        /* There is nothing to do, or nothing we are able to do. */
+        send_dcn(s);
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_dcs(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Digital command signal */
+    switch (s->state)
+    {
+    case T30_STATE_R:
+    case T30_STATE_F_DOC:
+        /* (TSI) DCS */
+        /* (PWD) (SUB) (TSI) DCS */
+        check_rx_dcs(s, msg, len);
+        if (s->phase_b_handler)
+            s->phase_b_handler(s, s->phase_d_user_data, T30_DCS);
+        /* Start document reception */
+        span_log(&s->logging,
+                SPAN_LOG_FLOW, 
+                "Get document at %dbps, modem %d\n",
+                fallback_sequence[s->current_fallback].bit_rate,
+                fallback_sequence[s->current_fallback].modem_type);
+        if (s->rx_file[0] == '\0')
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "No document to receive\n");
+            s->current_status = T30_ERR_FILEERROR;
+            send_dcn(s);
+            break;
+        }
+        if (!s->in_message  &&  t4_rx_init(&(s->t4), s->rx_file, T4_COMPRESSION_ITU_T4_2D))
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "Cannot open target TIFF file '%s'\n", s->rx_file);
+            s->current_status = T30_ERR_FILEERROR;
+            send_dcn(s);
+            break;
+        }
+        if (!(s->iaf & T30_IAF_MODE_NO_TCF))
+        {
+            set_state(s, T30_STATE_F_TCF);
+            set_phase(s, T30_PHASE_C_NON_ECM_RX);
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_cfr(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Confirmation to receive */
+    switch (s->state)
+    {
+    case T30_STATE_D_POST_TCF:
+        /* Trainability test succeeded. Send the document. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Trainability test succeeded\n");
+        s->retries = 0;
+        s->short_train = TRUE;
+        if (s->error_correcting_mode)
+        {
+            set_state(s, T30_STATE_IV);
+            queue_phase(s, T30_PHASE_C_ECM_TX);
+            s->ecm_current_frame = 0;
+            send_next_ecm_frame(s);
+        }
+        else
+        {
+            set_state(s, T30_STATE_I);
+            queue_phase(s, T30_PHASE_C_NON_ECM_TX);
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_ftt(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Failure to train */
+    switch (s->state)
+    {
+    case T30_STATE_D_POST_TCF:
+        /* Trainability test failed. Try again. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Trainability test failed\n");
+        s->retries = 0;
+        s->short_train = FALSE;
+        if (fallback_sequence[++s->current_fallback].bit_rate == 0)
+        {
+            /* We have fallen back as far as we can go. Give up. */
+            s->current_fallback = 0;
+            s->current_status = T30_ERR_CANNOTTRAIN;
+            send_dcn(s);
+            break;
+        }
+        /* Schedule training after the messages */
+        set_state(s, T30_STATE_D);
+        s->retries = 0;
+        send_dcs_sequence(s);
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_eom(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* End of message */
+    switch (s->state)
+    {
+    case T30_STATE_F_POST_DOC_NON_ECM:
+        if (s->phase_d_handler)
+            s->phase_d_handler(s, s->phase_d_user_data, T30_EOM);
+        s->next_rx_step = T30_EOM;
+        /* Return to phase B */
+        queue_phase(s, T30_PHASE_B_TX);
+        switch (copy_quality(s))
+        {
+        case T30_COPY_QUALITY_GOOD:
+            t4_rx_end_page(&(s->t4));
+            rx_start_page(s);
+            set_state(s, T30_STATE_III_Q_MCF);
+            send_simple_frame(s, T30_MCF);
+            break;
+        case T30_COPY_QUALITY_POOR:
+            t4_rx_end_page(&(s->t4));
+            rx_start_page(s);
+            set_state(s, T30_STATE_III_Q_RTP);
+            send_simple_frame(s, T30_RTP);
+            break;
+        case T30_COPY_QUALITY_BAD:
+            rx_start_page(s);
+            set_state(s, T30_STATE_III_Q_RTN);
+            send_simple_frame(s, T30_RTN);
+            break;
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_mps(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Multi-page signal */
+    switch (s->state)
+    {
+    case T30_STATE_F_POST_DOC_NON_ECM:
+        if (s->phase_d_handler)
+            s->phase_d_handler(s, s->phase_d_user_data, T30_MPS);
+        s->next_rx_step = T30_MPS;
+        /* Return to phase C */
+        queue_phase(s, T30_PHASE_D_TX);
+        switch (copy_quality(s))
+        {
+        case T30_COPY_QUALITY_GOOD:
+            t4_rx_end_page(&(s->t4));
+            rx_start_page(s);
+            set_state(s, T30_STATE_III_Q_MCF);
+            send_simple_frame(s, T30_MCF);
+            break;
+        case T30_COPY_QUALITY_POOR:
+            t4_rx_end_page(&(s->t4));
+            rx_start_page(s);
+            set_state(s, T30_STATE_III_Q_RTP);
+            send_simple_frame(s, T30_RTP);
+            break;
+        case T30_COPY_QUALITY_BAD:
+            rx_start_page(s);
+            set_state(s, T30_STATE_III_Q_RTN);
+            send_simple_frame(s, T30_RTN);
+            break;
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_eop(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* End of procedure */
+    switch (s->state)
+    {
+    case T30_STATE_F_POST_DOC_NON_ECM:
+        if (s->phase_d_handler)
+            s->phase_d_handler(s, s->phase_d_user_data, T30_EOP);
+        s->next_rx_step = T30_EOP;
+        queue_phase(s, T30_PHASE_D_TX);
+        switch (copy_quality(s))
+        {
+        case T30_COPY_QUALITY_GOOD:
+            t4_rx_end_page(&(s->t4));
+            t4_rx_end(&(s->t4));
+            s->in_message = FALSE;
+            set_state(s, T30_STATE_III_Q_MCF);
+            send_simple_frame(s, T30_MCF);
+            break;
+        case T30_COPY_QUALITY_POOR:
+            t4_rx_end_page(&(s->t4));
+            t4_rx_end(&(s->t4));
+            s->in_message = FALSE;
+            set_state(s, T30_STATE_III_Q_RTP);
+            send_simple_frame(s, T30_RTP);
+            break;
+        case T30_COPY_QUALITY_BAD:
+            set_state(s, T30_STATE_III_Q_RTN);
+            send_simple_frame(s, T30_RTN);
+            break;
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_pri_eom(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Procedure interrupt - end of procedure */
+    switch (s->state)
+    {
+    case T30_STATE_F_POST_DOC_NON_ECM:
+        if (s->phase_d_handler)
+        {
+            s->phase_d_handler(s, s->phase_d_user_data, T30_PRI_EOM);
+            s->timer_t3 = ms_to_samples(DEFAULT_TIMER_T3);
+        }
+        s->next_rx_step = T30_PRI_EOM;
+        switch (copy_quality(s))
+        {
+        case T30_COPY_QUALITY_GOOD:
+            t4_rx_end_page(&(s->t4));
+            t4_rx_end(&(s->t4));
+            s->in_message = FALSE;
+            set_state(s, T30_STATE_III_Q_MCF);
+            break;
+        case T30_COPY_QUALITY_POOR:
+            t4_rx_end_page(&(s->t4));
+            t4_rx_end(&(s->t4));
+            s->in_message = FALSE;
+            set_state(s, T30_STATE_III_Q_RTP);
+            break;
+        case T30_COPY_QUALITY_BAD:
+            set_state(s, T30_STATE_III_Q_RTN);
+            break;
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_pri_mps(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Procedure interrupt - multipage signal */
+    switch (s->state)
+    {
+    case T30_STATE_F_POST_DOC_NON_ECM:
+        if (s->phase_d_handler)
+        {
+            s->phase_d_handler(s, s->phase_d_user_data, T30_PRI_MPS);
+            s->timer_t3 = ms_to_samples(DEFAULT_TIMER_T3);
+        }
+        s->next_rx_step = T30_PRI_MPS;
+        switch (copy_quality(s))
+        {
+        case T30_COPY_QUALITY_GOOD:
+            t4_rx_end_page(&(s->t4));
+            t4_rx_end(&(s->t4));
+            s->in_message = FALSE;
+            set_state(s, T30_STATE_III_Q_MCF);
+            break;
+        case T30_COPY_QUALITY_POOR:
+            t4_rx_end_page(&(s->t4));
+            t4_rx_end(&(s->t4));
+            s->in_message = FALSE;
+            set_state(s, T30_STATE_III_Q_RTP);
+            break;
+        case T30_COPY_QUALITY_BAD:
+            set_state(s, T30_STATE_III_Q_RTN);
+            break;
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_pri_eop(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Procedure interrupt - end of procedure */
+    switch (s->state)
+    {
+    case T30_STATE_F_POST_DOC_NON_ECM:
+        if (s->phase_d_handler)
+        {
+            s->phase_d_handler(s, s->phase_d_user_data, T30_PRI_EOP);
+            s->timer_t3 = ms_to_samples(DEFAULT_TIMER_T3);
+        }
+        s->next_rx_step = T30_PRI_EOP;
+        switch (copy_quality(s))
+        {
+        case T30_COPY_QUALITY_GOOD:
+            t4_rx_end_page(&(s->t4));
+            t4_rx_end(&(s->t4));
+            s->in_message = FALSE;
+            set_state(s, T30_STATE_III_Q_MCF);
+            break;
+        case T30_COPY_QUALITY_POOR:
+            t4_rx_end_page(&(s->t4));
+            t4_rx_end(&(s->t4));
+            s->in_message = FALSE;
+            set_state(s, T30_STATE_III_Q_RTP);
+            break;
+        case T30_COPY_QUALITY_BAD:
+            set_state(s, T30_STATE_III_Q_RTN);
+            break;
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_nss(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Non-standard facilities set-up */
+    switch (s->state)
+    {
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_ctc(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Continue to correct */
+    switch (s->state)
+    {
+    case T30_STATE_F_DOC:
+    case T30_STATE_F_POST_DOC_ECM:
+        send_simple_frame(s, T30_CTR);
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_ctr(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Response for continue to correct */
+    switch (s->state)
+    {
+    case T30_STATE_IV_CTC:
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_err(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Response for end of retransmission */
+    switch (s->state)
+    {
+    case T30_STATE_IV_EOR:
+    case T30_STATE_IV_EOR_RNR:
+        /* TODO: Continue with the next message if MPS or EOM? */
+        send_dcn(s);
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_ppr(t30_state_t *s, const uint8_t *msg, int len)
+{
+    int i;
+    int j;
+    int frame_no;
+    int mask;
+    uint8_t frame[100 + 3];
+    
+    /* Partial page request */
+    switch (s->state)
+    {
+    case T30_STATE_IV_PPS_NULL:
+    case T30_STATE_IV_PPS_Q:
+        if (++s->ppr_count >= 4)
+        {
+            /* Continue to correct? */
+            /* TODO: Decide if we should continue */
+            if (1)
+            {
+                set_state(s, T30_STATE_IV_CTC);
+                send_simple_frame(s, T30_CTC);
+            }
+            else
+            {
+                set_state(s, T30_STATE_IV_EOR);
+                frame[0] = 0xFF;
+                frame[1] = 0x13;
+                frame[2] = T30_EOR;
+                frame[3] = (s->ecm_at_page_end)  ?  ((uint8_t) (s->next_tx_step | s->dis_received))  :  T30_NULL;
+                span_log(&s->logging, SPAN_LOG_FLOW, "Sending EOR + %s\n", t30_frametype(frame[3]));
+                send_frame(s, frame, 4);
+            }
+        }
+        else
+        {
+            /* Check which frames are OK, and mark them as OK. */
+            for (i = 0;  i < 32;  i++)
+            {
+                if (msg[i + 3] == 0)
+                {
+                    s->ecm_frame_map[i + 3] = 0;
+                    for (j = 0;  j < 8;  j++)
+                        s->ecm_len[(i << 3) + j] = -1;
+                }
+                else
+                {
+                    mask = 1;
+                    for (j = 0;  j < 8;  j++)
+                    {
+                        frame_no = (i << 3) + j;
+                        /* Tick off the frames they are not complaining about as OK */
+                        if ((msg[i + 3] & mask) == 0)
+                            s->ecm_len[frame_no] = -1;
+                        else
+                        {
+                            if (frame_no < s->ecm_frames)
+                                span_log(&s->logging, SPAN_LOG_FLOW, "Frame %d to be resent\n", frame_no);
+#if 0
+                            /* Diagnostic: See if the other end is complaining about something we didn't even send this time. */
+                            if (s->ecm_len[frame_no] < 0)
+                                span_log(&s->logging, SPAN_LOG_FLOW, "PPR contains complaint about frame %d, which was not send\n", frame_no);
+#endif
+                        }
+                        mask <<= 1;
+                    }
+                }
+            }
+            /* Initiate resending of the remainder of the frames. */
+            set_state(s, T30_STATE_IV);
+            queue_phase(s, T30_PHASE_C_ECM_TX);
+            s->ecm_current_frame = 0;
+            send_next_ecm_frame(s);
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_rr(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Receiver ready */
+    switch (s->state)
+    {
+    case T30_STATE_F_POST_DOC_NON_ECM:
+        /* TODO: */
+        s->timer_t5 = 0;
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_rnr(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Receive not ready */
+    switch (s->state)
+    {
+    case T30_STATE_IV_PPS_NULL:
+    case T30_STATE_IV_PPS_Q:
+        set_state(s, T30_STATE_IV_PPS_RNR);
+        send_simple_frame(s, T30_RR);
+        break;
+    case T30_STATE_IV_PPS_RNR:
+        send_simple_frame(s, T30_RR);
+        /* TODO: */
+        if (s->timer_t5 == 0)
+            s->timer_t5 = ms_to_samples(DEFAULT_TIMER_T5);
+        break;
+    case T30_STATE_IV_EOR:
+        set_state(s, T30_STATE_IV_EOR_RNR);
+        send_simple_frame(s, T30_RR);
+        break;
+    case T30_STATE_IV_EOR_RNR:
+        send_simple_frame(s, T30_RR);
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_eos(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* End of selection */
+    switch (s->state)
+    {
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_tr(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Transmit ready */
+    switch (s->state)
+    {
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_fcd(t30_state_t *s, const uint8_t *msg, int len)
+{
+    int frame_no;
+    int i;
+
+    /* Facsimile coded data */
+    switch (s->state)
+    {
+    case T30_STATE_F_DOC:
+        if (len <= 4 + 256)
+        {
+            frame_no = msg[3];
+            /* Just store the actual image data, and record its length */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Storing image frame %d, length %d\n", frame_no, len - 4);
+            for (i = 0;  i < len - 4;  i++)
+                s->ecm_data[frame_no][i] = msg[i + 4];
+            s->ecm_len[frame_no] = (int16_t) (len - 4);
+            span_log(&s->logging, SPAN_LOG_FLOW, "Storing ECM frame %d\n", frame_no);
+        }
+        else
+        {
+            unexpected_frame_length(s, msg, len);
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_rcp(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Return to control for partial page */
+    switch (s->state)
+    {
+    case T30_STATE_F_DOC:
+        set_state(s, T30_STATE_F_POST_DOC_ECM);
+        queue_phase(s, T30_PHASE_D_RX);
+        break;
+    case T30_STATE_F_POST_DOC_ECM:
+        /* Ignore extra RCP frames. The source will usually send several to maximum the chance of
+           one getting through OK. */
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_fnv(t30_state_t *s, const uint8_t *msg, int len)
+{
+    logging_state_t *log;
+    const char *x;
+
+    /* Field not valid */
+    /* TODO: analyse the message, as per 5.3.6.2.13 */
+    if (!span_log_test(&s->logging, SPAN_LOG_FLOW))
+        return;
+    log = &s->logging;
+
+    if ((msg[3] & 0x01))
+        span_log(log, SPAN_LOG_FLOW, "  Incorrect password (PWD).\n");
+    if ((msg[3] & 0x02))
+        span_log(log, SPAN_LOG_FLOW, "  Selective polling reference (SEP) not known.\n");
+    if ((msg[3] & 0x04))
+        span_log(log, SPAN_LOG_FLOW, "  Subaddress (SUB) not known.\n");
+    if ((msg[3] & 0x08))
+        span_log(log, SPAN_LOG_FLOW, "  Sender identity (SID) not known.\n");
+    if ((msg[3] & 0x10))
+        span_log(log, SPAN_LOG_FLOW, "  Secure fax error.\n");
+    if ((msg[3] & 0x20))
+        span_log(log, SPAN_LOG_FLOW, "  Transmitting subscriber identity (TSI) not accepted.\n");
+    if ((msg[3] & 0x40))
+        span_log(log, SPAN_LOG_FLOW, "  Polled subaddress (PSA) not known.\n");
+    if (len > 4  &&  (msg[3] & DISBIT8))
+    {
+        if ((msg[4] & 0x01))
+            span_log(log, SPAN_LOG_FLOW, "  BFT negotiations request not accepted.\n");
+        if ((msg[4] & 0x02))
+            span_log(log, SPAN_LOG_FLOW, "  Internet routing address (IRA) not known.\n");
+        if ((msg[4] & 0x04))
+            span_log(log, SPAN_LOG_FLOW, "  Internet selective polling address (ISP) not known.\n");
+    }
+    if (len > 5)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  FNV sequence number %d.\n", msg[5]);
+    }
+    if (len > 6)
+    {
+        switch (msg[6])
+        {
+        case 0x83:
+            x = "Incorrect password (PWD)";
+            break;
+        case 0x85:
+            x = "Selective polling reference (SEP) not known";
+            break;
+        case 0x43:
+        case 0xC3:
+            x = "Subaddress (SUB) not known";
+            break;
+        case 0x45:
+        case 0xC5:
+            x = "Sender identity (SID) not known";
+            break;
+        case 0x10:
+            x = "Secure fax error";
+            break;
+        case 0x42:
+        case 0xC2:
+            x = "Transmitting subscriber identity (TSI) not accepted";
+            break;
+        case 0x86:
+            x = "Polled subaddress (PSA) not known";
+            break;
+        default:
+            x = "???";
+            break;
+        }
+        span_log(log, SPAN_LOG_FLOW, "  FNV diagnostic info type %s.\n", x);
+    }
+    if (len > 7)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  FNV length %d.\n", msg[7]);
+    }
+    /* We've decoded it, but we don't yet know how to deal with it, so treat it as unexpected */
+    unexpected_final_frame(s, msg, len);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_pps(t30_state_t *s, const uint8_t *msg, int len)
+{
+    int fcf2;
+    int page;
+    int block;
+    int i;
+    int j;
+    int frame_no;
+    int first_bad_frame;
+    
+    /* Partial page signal */
+    switch (s->state)
+    {
+    case T30_STATE_F_DOC:
+    case T30_STATE_F_POST_DOC_ECM:
+        if (len >= 7)
+        {
+            fcf2 = msg[3] & 0xFE;
+            page = msg[4];
+            block = msg[5];
+            s->ecm_frames = msg[6] + 1;
+            span_log(&s->logging, SPAN_LOG_FLOW, "Received PPS + %s\n", t30_frametype(msg[3]));
+            /* Build a bit map of which frames we now have stored OK */
+            frame_no = 0;
+            first_bad_frame = 256;
+            for (i = 3;  i < 3 + 32;  i++)
+            {
+                s->ecm_frame_map[i] = 0;
+                for (j = 0;  j < 8;  j++)
+                {
+                    if (s->ecm_len[frame_no] < 0)
+                    {   
+                        s->ecm_frame_map[i] |= (1 << j);
+                        if (frame_no < first_bad_frame)
+                            first_bad_frame = frame_no;
+                    }
+                    frame_no++;
+                }
+            }
+            /* Now, are there really bad frames, or does our scan represent things being OK? */
+            queue_phase(s, T30_PHASE_D_TX);
+            if (first_bad_frame >= s->ecm_frames)
+            {
+                /* Everything was OK. We can accept the data and move on. */
+                switch (fcf2)
+                {
+                case T30_NULL:
+                    /* We can confirm this partial page. */
+                    t30_ecm_commit_partial_page(s);
+                    set_state(s, T30_STATE_F_POST_RCP_MCF);
+                    send_simple_frame(s, T30_MCF);
+                    break;
+                case T30_EOP:
+                case T30_EOM:
+                case T30_MPS:
+                case T30_PRI_EOP:
+                case T30_PRI_EOM:
+                case T30_PRI_MPS:
+                    /* We can confirm the whole page. */
+                    s->next_rx_step = fcf2;
+                    t30_ecm_commit_partial_page(s);
+                    t4_rx_end_page(&(s->t4));
+                    if (s->phase_d_handler)
+                        s->phase_d_handler(s, s->phase_d_user_data, fcf2);
+                    rx_start_page(s);
+                    set_state(s, T30_STATE_F_POST_RCP_MCF);
+                    send_simple_frame(s, T30_MCF);
+                    break;
+                default:
+                    unexpected_final_frame(s, msg, len);
+                    break;
+                }
+            }
+            else
+            {
+                /* We need to send the PPR frame we have created, to try to fill in the missing/bad data. */
+                set_state(s, T30_STATE_F_POST_RCP_PPR);
+                s->ecm_frame_map[0] = 0xFF;
+                s->ecm_frame_map[1] = 0x13;
+                s->ecm_frame_map[2] = T30_PPR;
+                send_frame(s, s->ecm_frame_map, 3 + 32);
+            }
+        }
+        else
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Bad PPS message length %d.\n", len);
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_tnr(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Transmit not ready */
+    switch (s->state)
+    {
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_eor(t30_state_t *s, const uint8_t *msg, int len)
+{
+    int fcf2;
+
+    /* End of retransmission */
+    /* Partial page signal */
+    switch (s->state)
+    {
+    case T30_STATE_F_DOC:
+    case T30_STATE_F_POST_DOC_ECM:
+        if (len == 4)
+        {
+            fcf2 = msg[3] & 0xFE;
+            span_log(&s->logging, SPAN_LOG_FLOW, "Received EOR + %s\n", t30_frametype(msg[3]));
+            switch (fcf2)
+            {
+            case T30_NULL:
+                break;
+            case T30_PRI_EOM:
+            case T30_PRI_MPS:
+            case T30_PRI_EOP:
+                /* TODO: Alert operator */
+                /* Fall through */
+            case T30_EOM:
+            case T30_MPS:
+            case T30_EOP:
+                s->next_rx_step = fcf2;
+                send_simple_frame(s, T30_ERR);
+                break;
+            default:
+                unexpected_final_frame(s, msg, len);
+                break;
+            }
+        }
+        else
+        {
+            unexpected_frame_length(s, msg, len);
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_fdm(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* File diagnostics message */
+    switch (s->state)
+    {
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_mcf(t30_state_t *s, const uint8_t *msg, int len)
+{
+    t4_stats_t stats;
+
+    /* Message confirmation */
+    switch (s->state)
+    {
+    case T30_STATE_II_Q:
+        switch (s->next_tx_step)
+        {
+        case T30_MPS:
+        case T30_PRI_MPS:
+            s->retries = 0;
+            t4_tx_end_page(&(s->t4));
+            if (s->phase_d_handler)
+                s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
+            t4_tx_start_page(&(s->t4));
+            set_state(s, T30_STATE_I);
+            queue_phase(s, T30_PHASE_C_NON_ECM_TX);
+            break;
+        case T30_EOM:
+        case T30_PRI_EOM:
+            s->retries = 0;
+            t4_tx_end_page(&(s->t4));
+            if (s->phase_d_handler)
+                s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
+            t4_tx_end(&(s->t4));
+            set_state(s, T30_STATE_R);
+            if (span_log_test(&s->logging, SPAN_LOG_FLOW))
+            {
+                t4_get_transfer_statistics(&(s->t4), &stats);
+                span_log(&s->logging, SPAN_LOG_FLOW, "Success - delivered %d pages\n", stats.pages_transferred);
+            }
+            break;
+        case T30_EOP:
+        case T30_PRI_EOP:
+            s->retries = 0;
+            t4_tx_end_page(&(s->t4));
+            if (s->phase_d_handler)
+                s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
+            t4_tx_end(&(s->t4));
+            send_dcn(s);
+            if (span_log_test(&s->logging, SPAN_LOG_FLOW))
+            {
+                t4_get_transfer_statistics(&(s->t4), &stats);
+                span_log(&s->logging, SPAN_LOG_FLOW, "Success - delivered %d pages\n", stats.pages_transferred);
+            }
+            break;
+        }
+        break;
+    case T30_STATE_IV_PPS_NULL:
+    case T30_STATE_IV_PPS_Q:
+    case T30_STATE_IV_PPS_RNR:
+        s->retries = 0;
+        /* Is there more of the current page to get, or do we move on? */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Is there more to send? - %d %d\n", s->ecm_frames, s->ecm_len[255]);
+        if (!s->ecm_at_page_end  &&  get_partial_ecm_page(s) > 0)
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "Additional image data to send\n");
+            s->ecm_block++;
+            set_state(s, T30_STATE_IV);
+            queue_phase(s, T30_PHASE_C_ECM_TX);
+            s->ecm_current_frame = 0;
+            send_next_ecm_frame(s);
+        }
+        else
+        {
+
+            span_log(&s->logging, SPAN_LOG_FLOW, "Moving on to the next page\n");
+            switch (s->next_tx_step)
+            {
+            case T30_MPS:
+            case T30_PRI_MPS:
+                s->retries = 0;
+                t4_tx_end_page(&(s->t4));
+                if (s->phase_d_handler)
+                    s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
+                t4_tx_start_page(&(s->t4));
+                s->ecm_page++;
+                s->ecm_block = 0;
+                if (get_partial_ecm_page(s) > 0)
+                {
+                    set_state(s, T30_STATE_IV);
+                    queue_phase(s, T30_PHASE_C_ECM_TX);
+                    s->ecm_current_frame = 0;
+                    send_next_ecm_frame(s);
+                }
+                break;
+            case T30_EOM:
+            case T30_PRI_EOM:
+                s->retries = 0;
+                t4_tx_end_page(&(s->t4));
+                if (s->phase_d_handler)
+                    s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
+                t4_tx_end(&(s->t4));
+                set_state(s, T30_STATE_R);
+                if (span_log_test(&s->logging, SPAN_LOG_FLOW))
+                {
+                    t4_get_transfer_statistics(&(s->t4), &stats);
+                    span_log(&s->logging, SPAN_LOG_FLOW, "Success - delivered %d pages\n", stats.pages_transferred);
+                }
+                break;
+            case T30_EOP:
+            case T30_PRI_EOP:
+                s->retries = 0;
+                t4_tx_end_page(&(s->t4));
+                if (s->phase_d_handler)
+                    s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
+                t4_tx_end(&(s->t4));
+                send_dcn(s);
+                if (span_log_test(&s->logging, SPAN_LOG_FLOW))
+                {
+                    t4_get_transfer_statistics(&(s->t4), &stats);
+                    span_log(&s->logging, SPAN_LOG_FLOW, "Success - delivered %d pages\n", stats.pages_transferred);
+                }
+                break;
+            }
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_rtp(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Retrain positive */
+    s->short_train = FALSE;
+    switch (s->state)
+    {
+    case T30_STATE_II_Q:
+        switch (s->next_tx_step)
+        {
+        case T30_MPS:
+        case T30_PRI_MPS:
+            s->retries = 0;
+            if (s->phase_d_handler)
+                s->phase_d_handler(s, s->phase_d_user_data, T30_RTP);
+            /* Send fresh training, and then the next page */
+            queue_phase(s, T30_PHASE_B_TX);
+            restart_sending_document(s);
+            break;
+        case T30_EOM:
+        case T30_PRI_EOM:
+            s->retries = 0;
+            if (s->phase_d_handler)
+                s->phase_d_handler(s, s->phase_d_user_data, T30_RTP);
+            /* TODO: should go back to T, and resend */
+            set_state(s, T30_STATE_R);
+            break;
+        case T30_EOP:
+        case T30_PRI_EOP:
+            s->retries = 0;
+            if (s->phase_d_handler)
+                s->phase_d_handler(s, s->phase_d_user_data, T30_RTN);
+            send_dcn(s);
+            break;
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_rtn(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Retrain negative */
+    s->short_train = FALSE;
+    switch (s->state)
+    {
+    case T30_STATE_II_Q:
+        switch (s->next_tx_step)
+        {
+        case T30_MPS:
+        case T30_PRI_MPS:
+            s->retries = 0;
+            if (s->phase_d_handler)
+                s->phase_d_handler(s, s->phase_d_user_data, T30_RTN);
+            /* Send fresh training, and then repeat the last page */
+            queue_phase(s, T30_PHASE_B_TX);
+            restart_sending_document(s);
+            break;
+        case T30_EOM:
+        case T30_PRI_EOM:
+        case T30_EOP:
+        case T30_PRI_EOP:
+            s->retries = 0;
+            if (s->phase_d_handler)
+                s->phase_d_handler(s, s->phase_d_user_data, T30_RTN);
+            send_dcn(s);
+            break;
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_pip(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Procedure interrupt positive */
+    switch (s->state)
+    {
+    case T30_STATE_II_Q:
+    case T30_STATE_IV_PPS_Q:
+    case T30_STATE_IV_PPS_RNR:
+        s->retries = 0;
+        if (s->phase_d_handler)
+        {
+            s->phase_d_handler(s, s->phase_d_user_data, T30_PIP);
+            s->timer_t3 = ms_to_samples(DEFAULT_TIMER_T3);
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_pin(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Procedure interrupt negative */
+    switch (s->state)
+    {
+    case T30_STATE_II_Q:
+    case T30_STATE_IV_PPS_Q:
+    case T30_STATE_IV_PPS_RNR:
+    case T30_STATE_IV_EOR:
+    case T30_STATE_IV_EOR_RNR:
+        s->retries = 0;
+        if (s->phase_d_handler)
+        {
+            s->phase_d_handler(s, s->phase_d_user_data, T30_PIN);
+            s->timer_t3 = ms_to_samples(DEFAULT_TIMER_T3);
+        }
+        break;
+    default:
+        unexpected_final_frame(s, msg, len);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_dcn(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Disconnect */
+    /* TODO: test if this is expected or unexpected */
+    switch (s->state)
+    {
+#if 0
+    case ??????:
+        /* Unexpected DCN while waiting for image data */
+        s->current_status = T30_ERR_DCNDATARX;
+        break;
+#endif
+    case T30_STATE_F_POST_DOC_NON_ECM:
+        /* Unexpected DCN while waiting for EOM, EOP or MPS */
+        s->current_status = T30_ERR_DCNFAXRX;
+        break;
+    case T30_STATE_II_Q:
+        switch (s->next_tx_step)
+        {
+        case T30_MPS:
+        case T30_PRI_MPS:
+        case T30_EOM:
+        case T30_PRI_EOM:
+            /* Unexpected DCN after EOM or MPS sequence */
+            s->current_status = T30_ERR_DCNPHDRX;
+            break;
+        }
+        break;
+#if 0
+    case ??????:
+        /* Unexpected DCN after RR/RNR sequence */
+        s->current_status = T30_ERR_DCNRRDRX;
+        break;
+    case ??????:
+        /* Unexpected DCN after requested retransmission */
+        s->current_status = T30_ERR_DCNNORTNRX;
+        break;
+#endif
+    }
+    /* Time to disconnect */
+    disconnect(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_rx_crp(t30_state_t *s, const uint8_t *msg, int len)
+{
+    /* Command repeat */
+    repeat_last_command(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void hdlc_accept_control_msg(t30_state_t *s, int ok, const uint8_t *msg, int len)
+{
+    int final_frame;
+    char far_password[T30_MAX_IDENT_LEN];
+    
+    final_frame = msg[1] & 0x10;
+    if (!final_frame)
+    {
+        /* Restart the command or response timer, T2 or T4 */
+        s->timer_t2_t4 = ms_to_samples((s->timer_is_t4)  ?  DEFAULT_TIMER_T4  :  DEFAULT_TIMER_T2);
+
+        /* The following handles all the message types we expect to get without
+           a final frame tag. If we get one that T.30 says we should not expect
+           in a particular context, its pretty harmless, so don't worry. */
+        switch (msg[2] & 0xFE)
+        {
+        case T30_CSI:
+            if (msg[2] == T30_CSI)
+            {
+                /* Called subscriber identification */
+                /* OK in (NSF) (CSI) DIS */
+                decode_20digit_msg(s, s->far_ident, &msg[2], len - 2);
+            }
+            else
+            {
+                /* CIG - Calling subscriber identification */
+                /* OK in (NSC) (CIG) DTC */
+                /* OK in (PWD) (SEP) (CIG) DTC */
+                decode_20digit_msg(s, s->far_ident, &msg[2], len - 2);
+            }
+            break;
+        case T30_NSF:
+            if (msg[2] == T30_NSF)
+            {
+                /* Non-standard facilities */
+                /* OK in (NSF) (CSI) DIS */
+                if (t35_decode(&msg[3], len - 3, &s->country, &s->vendor, &s->model))
+                {
+                    if (s->country)
+                        span_log(&s->logging, SPAN_LOG_FLOW, "The remote was made in '%s'\n", s->country);
+                    if (s->vendor)
+                        span_log(&s->logging, SPAN_LOG_FLOW, "The remote was made by '%s'\n", s->vendor);
+                    if (s->model)
+                        span_log(&s->logging, SPAN_LOG_FLOW, "The remote is a '%s'\n", s->model);
+                }
+            }
+            else
+            {
+                /* NSC - Non-standard facilities command */
+                /* OK in (NSC) (CIG) DTC */
+            }
+            break;
+        case T30_PWD:
+            if (msg[2] == T30_PWD)
+            {
+                /* Password */
+                /* OK in (PWD) (SUB) (TSI) DCS */
+                /* OK in (PWD) (SEP) (CIG) DTC */
+                decode_20digit_msg(s, far_password, &msg[2], len - 2);
+                if (strcmp(s->far_password, far_password) == 0)
+                    s->far_password_ok = TRUE;  
+            }
+            else
+            {
+                unexpected_frame(s, msg, len);
+            }
+            break;
+        case T30_SEP:
+            if (msg[2] == T30_SEP)
+            {
+                /* Selective polling */
+                /* OK in (PWD) (SEP) (CIG) DTC */
+                decode_20digit_msg(s, s->sep_address, &msg[2], len - 2);
+            }
+            else
+            {
+                unexpected_frame(s, msg, len);
+            }
+            break;
+        case T30_PSA:
+            if (msg[2] == T30_PSA)
+            {
+                /* Polled subaddress */
+                decode_20digit_msg(s, s->psa_address, &msg[2], len - 2);
+            }
+            else
+            {
+                unexpected_frame(s, msg, len);
+            }
+            break;
+        case T30_CIA:
+            if (msg[2] == T30_CIA)
+            {
+                /* Calling subscriber internet address */
+                decode_url_msg(s, NULL, &msg[2], len - 2);
+            }
+            else
+            {
+                unexpected_frame(s, msg, len);
+            }
+            break;
+        case T30_ISP:
+            if (msg[2] == T30_ISP)
+            {
+                /* Internet selective polling address */
+                decode_url_msg(s, NULL, &msg[2], len - 2);
+            }
+            else
+            {
+                unexpected_frame(s, msg, len);
+            }
+            break;
+        case T30_TSI:
+            /* Transmitting subscriber identity */
+            /* OK in (TSI) DCS */
+            /* OK in (PWD) (SUB) (TSI) DCS */
+            decode_20digit_msg(s, s->far_ident, &msg[2], len - 2);
+            break;
+        case T30_SUB:
+            /* Subaddress */
+            /* OK in (PWD) (SUB) (TSI) DCS */
+            decode_20digit_msg(s, s->far_sub_address, &msg[2], len - 2);
+            break;
+        case T30_SID:
+            /* Sender Identification */
+            /* T.30 does not say where this is OK */
+            decode_20digit_msg(s, NULL, &msg[2], len - 2);
+            break;
+        case T30_CSA:
+            /* Calling subscriber internet address */
+            decode_url_msg(s, NULL, &msg[2], len - 2);
+            break;
+        case T30_TSA:
+            /* Transmitting subscriber internet address */
+            decode_url_msg(s, NULL, &msg[2], len - 2);
+            break;
+        case T30_IRA:
+            /* Internet routing address */
+            decode_url_msg(s, NULL, &msg[2], len - 2);
+            break;
+        case T4_FCD:
+            process_rx_fcd(s, msg, len);
+            break;
+        case T4_RCP:
+            process_rx_rcp(s, msg, len);
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Unexpected %s frame\n", t30_frametype(msg[2]));
+            break;
+        }
+    }
+    else
+    {
+        /* Once we have any successful message from the far end, we
+           cancel timer T1 */
+        s->timer_t0_t1 = 0;
+
+        /* The following handles context sensitive message types, which should
+           occur at the end of message sequences. They should, therefore have
+           the final frame flag set. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "In state %d\n", s->state);
+        switch (msg[2] & 0xFE)
+        {
+        case T30_DIS:
+            process_rx_dis_or_dtc(s, msg, len);
+            break;
+        case T30_DCS:
+            process_rx_dcs(s, msg, len);
+            break;
+        case T30_NSS:
+            process_rx_nss(s, msg, len);
+            break;
+        case T30_CTC:
+            process_rx_ctc(s, msg, len);
+            break;
+        case T30_CFR:
+            process_rx_cfr(s, msg, len);
+            break;
+        case T30_FTT:
+            process_rx_ftt(s, msg, len);
+            break;
+        case T30_CTR:
+            process_rx_ctr(s, msg, len);
+            break;
+        case T30_EOM:
+            process_rx_eom(s, msg, len);
+            break;
+        case T30_MPS:
+            process_rx_mps(s, msg, len);
+            break;
+        case T30_EOP:
+            process_rx_eop(s, msg, len);
+            break;
+        case T30_PRI_EOM:
+            process_rx_pri_eom(s, msg, len);
+            break;
+        case T30_PRI_MPS:
+            process_rx_pri_mps(s, msg, len);
+            break;
+        case T30_PRI_EOP:
+            process_rx_pri_eop(s, msg, len);
+            break;
+        case T30_EOS:
+            process_rx_eos(s, msg, len);
+            break;
+        case T30_PPS:
+            process_rx_pps(s, msg, len);
+            break;
+        case T30_EOR:
+            process_rx_eor(s, msg, len);
+            break;
+        case T30_RR:
+            process_rx_rr(s, msg, len);
+            break;
+        case T30_MCF:
+            process_rx_mcf(s, msg, len);
+            break;
+        case T30_RTP:
+            process_rx_rtp(s, msg, len);
+            break;
+        case T30_RTN:
+            process_rx_rtn(s, msg, len);
+            break;
+        case T30_PIP:
+            process_rx_pip(s, msg, len);
+            break;
+        case T30_PIN:
+            process_rx_pin(s, msg, len);
+            break;
+        case T30_PPR:
+            process_rx_ppr(s, msg, len);
+            break;
+        case T30_RNR:
+            process_rx_rnr(s, msg, len);
+            break;
+        case T30_ERR:
+            process_rx_err(s, msg, len);
+            break;
+        case T30_FDM:
+            process_rx_fdm(s, msg, len);
+            break;
+        case T30_DCN:
+            process_rx_dcn(s, msg, len);
+            break;
+        case T30_CRP:
+            process_rx_crp(s, msg, len);
+            break;
+        case T30_FNV:
+            process_rx_fnv(s, msg, len);
+            break;
+        case T30_TNR:
+            process_rx_tnr(s, msg, len);
+            break;
+        case T30_TR:
+            process_rx_tr(s, msg, len);
+            break;
+        case T4_RCP:
+            process_rx_rcp(s, msg, len);
+            break;
+        default:
+            /* We don't know what to do with this. */
+            unexpected_final_frame(s, msg, len);
+            break;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_hdlc_accept(void *user_data, int ok, const uint8_t *msg, int len)
+{
+    t30_state_t *s;
+
+    s = (t30_state_t *) user_data;
+    if (len < 0)
+    {
+        /* Special conditions */
+        switch (len)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC carrier training failed in state %d\n", s->state);
+            s->rx_trained = FALSE;
+            /* Cancel the timer, since we have actually seen something, and wait until the carrier drops
+               before proceeding. */
+            // TODO: this is not a complete answer to handling failures to train
+            s->timer_t2_t4 = 0;
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            /* The modem is now trained */
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC carrier trained in state %d\n", s->state);
+            s->rx_signal_present = TRUE;
+            s->rx_trained = TRUE;
+            break;
+        case PUTBIT_CARRIER_UP:
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC carrier up in state %d\n", s->state);
+            s->rx_signal_present = TRUE;
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC carrier down in state %d\n", s->state);
+            s->rx_signal_present = FALSE;
+            s->rx_trained = FALSE;
+            /* If a phase change has been queued to occur after the receive signal drops,
+               its time to change. */
+            if (s->next_phase != T30_PHASE_IDLE)
+            {
+                set_phase(s, s->next_phase);
+                s->next_phase = T30_PHASE_IDLE;
+            }
+            break;
+        case PUTBIT_FRAMING_OK:
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC framing OK in state %d\n", s->state);
+            if (!s->far_end_detected  &&  s->timer_t0_t1 > 0)
+            {
+                s->timer_t0_t1 = ms_to_samples(DEFAULT_TIMER_T1);
+                s->far_end_detected = TRUE;
+                if (s->phase == T30_PHASE_A_CED  ||  s->phase == T30_PHASE_A_CNG)
+                    set_phase(s, T30_PHASE_B_RX);
+            }
+            /* 5.4.3.1 Timer T2 is reset if flag is received */
+            if (!s->timer_is_t4  &&  s->timer_t2_t4 > 0)
+                s->timer_t2_t4 = 0;
+            break;
+        case PUTBIT_ABORT:
+            /* Just ignore these */
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Unexpected HDLC special length - %d!\n", len);
+            break;
+        }
+        return;
+    }
+
+    /* The spec. says a command or response is not valid if:
+        - any of the frames, optional or mandatory, have an FCS error.
+        - any single frame exceeds 3s +- 15% (i.e. no frame should exceed 2.55s)
+        - the final frame is not tagged as a final frame
+        - the final frame is not a recognised one.
+       The first point seems benign. If we accept an optional frame, and a later
+       frame is bad, having accepted the optional frame should be harmless.
+       The 2.55s maximum seems to limit signalling frames to no more than 95 octets,
+       including FCS, and flag octets (assuming the use of V.21).
+    */
+    if (!ok)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Bad CRC received\n");
+        if (s->crp_enabled)
+            send_simple_frame(s, T30_CRP);
+        return;
+    }
+
+    /* Cancel the command or response timer */
+    s->timer_t2_t4 = 0;
+    if (len < 3)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Bad HDLC frame length - %d\n", len);
+        return;
+    }
+    if (msg[0] != 0xFF  ||  !(msg[1] == 0x03  ||  msg[1] == 0x13))
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Bad HDLC frame header - %02x %02x\n", msg[0], msg[1]);
+        return;
+    }
+    print_frame(s, "Rx: ", msg, len);
+
+    switch (s->phase)
+    {
+    case T30_PHASE_A_CED:
+    case T30_PHASE_A_CNG:
+    case T30_PHASE_B_RX:
+    case T30_PHASE_C_ECM_RX:
+    case T30_PHASE_D_RX:
+        break;
+    default:
+        span_log(&s->logging, SPAN_LOG_FLOW, "Unexpected HDLC frame received in phase %s, state %d\n", phase_names[s->phase], s->state);
+        break;
+    }
+    hdlc_accept_control_msg(s, ok, msg, len);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void queue_phase(t30_state_t *s, int phase)
+{
+    if (s->rx_signal_present)
+    {
+        /* We need to wait for that signal to go away */
+        s->next_phase = phase;
+    }
+    else
+    {
+        set_phase(s, phase);
+        s->next_phase = T30_PHASE_IDLE;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void set_phase(t30_state_t *s, int phase)
+{
+    if (phase != s->phase)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Changing from phase %s to %s\n", phase_names[s->phase], phase_names[phase]);
+        /* We may be killing a receiver before it has declared the end of the
+           signal. Force the signal present indicator to off, because the
+           receiver will never be able to. */
+        if (s->phase != T30_PHASE_A_CED  &&  s->phase != T30_PHASE_A_CNG)
+            s->rx_signal_present = FALSE;
+        s->rx_trained = FALSE;
+        s->phase = phase;
+        switch (phase)
+        {
+        case T30_PHASE_A_CED:
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_V21, FALSE, TRUE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_CED, FALSE, FALSE);
+            break;
+        case T30_PHASE_A_CNG:
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_V21, FALSE, TRUE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_CNG, FALSE, FALSE);
+            break;
+        case T30_PHASE_B_RX:
+        case T30_PHASE_D_RX:
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_V21, FALSE, TRUE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_NONE, FALSE, FALSE);
+            break;
+        case T30_PHASE_B_TX:
+        case T30_PHASE_D_TX:
+            if (!s->far_end_detected  &&  s->timer_t0_t1 > 0)
+            {
+                s->timer_t0_t1 = ms_to_samples(DEFAULT_TIMER_T1);
+                s->far_end_detected = TRUE;
+            }
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, FALSE, FALSE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_V21, FALSE, TRUE);
+            break;
+        case T30_PHASE_C_NON_ECM_RX:
+            s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T2);
+            s->timer_is_t4 = FALSE;
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, fallback_sequence[s->current_fallback].modem_type, s->short_train, FALSE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_NONE, FALSE, FALSE);
+            break;
+        case T30_PHASE_C_NON_ECM_TX:
+            /* Pause before switching from anything to phase C */
+            /* Always prime the training count for 1.5s of data at the current rate. Its harmless if
+               we prime it and are not doing TCF. */
+            s->training_test_bits = (3*fallback_sequence[s->current_fallback].bit_rate)/2;
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, FALSE, FALSE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, fallback_sequence[s->current_fallback].modem_type, s->short_train, FALSE);
+            break;
+        case T30_PHASE_C_ECM_RX:
+            s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T2);
+            s->timer_is_t4 = FALSE;
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, fallback_sequence[s->current_fallback].modem_type, s->short_train, TRUE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_NONE, FALSE, FALSE);
+            break;
+        case T30_PHASE_C_ECM_TX:
+            /* Pause before switching from anything to phase C */
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, FALSE, FALSE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, fallback_sequence[s->current_fallback].modem_type, s->short_train, TRUE);
+            break;
+        case T30_PHASE_E:
+            /* Send a little silence before ending things, to ensure the
+               buffers are all flushed through, and the far end has seen
+               the last message we sent. */
+            s->training_current_zeros = 0;
+            s->training_most_zeros = 0;
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_NONE, FALSE, FALSE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_PAUSE, 200, FALSE);
+            break;
+        case T30_PHASE_CALL_FINISHED:
+            if (s->set_rx_type_handler)
+                s->set_rx_type_handler(s->set_rx_type_user_data, T30_MODEM_DONE, FALSE, FALSE);
+            if (s->set_tx_type_handler)
+                s->set_tx_type_handler(s->set_tx_type_user_data, T30_MODEM_DONE, FALSE, FALSE);
+            break;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void set_state(t30_state_t *s, int state)
+{
+    if (s->state != state)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Changing from state %d to %d\n", s->state, state);
+        s->state = state;
+        s->step = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_receive_complete(void *user_data)
+{
+    t30_state_t *s;
+    
+    s = (t30_state_t *) user_data;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Receive complete in phase %s, state %d\n", phase_names[s->phase], s->state);
+    /* Usually receive complete is notified by a carrier down signal. However,
+       in cases like a T.38 packet stream dying in the middle of reception
+       there needs to be a means to stop things. */
+    if (s->phase == T30_PHASE_C_NON_ECM_RX)
+        t30_non_ecm_put_bit(s, PUTBIT_CARRIER_DOWN);
+    else
+        t30_hdlc_accept(s, TRUE, NULL, PUTBIT_CARRIER_DOWN);
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_send_complete(void *user_data)
+{
+    t30_state_t *s;
+    
+    s = (t30_state_t *) user_data;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Send complete in phase %s, state %d\n", phase_names[s->phase], s->state);
+    /* We have finished sending our messages, so move on to the next operation. */
+    switch (s->state)
+    {
+    case T30_STATE_ANSWERING:
+        span_log(&s->logging, SPAN_LOG_FLOW, "Starting answer mode\n");
+        set_phase(s, T30_PHASE_B_TX);
+        s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T2);
+        s->timer_is_t4 = FALSE;
+        set_state(s, T30_STATE_R);
+        s->dis_received = FALSE;
+        send_dis_or_dtc_sequence(s);
+        break;
+    case T30_STATE_R:
+        switch (s->step)
+        {
+        case 0:
+            s->step++;
+            if (send_ident_frame(s, T30_CSI))
+                break;
+            /* Fall through */
+        case 1:
+            s->step++;
+            set_dis_or_dtc(s);
+            send_frame(s, s->dis_dtc_frame, s->dis_dtc_len);
+            break;
+        case 2:
+            s->step++;
+            if (s->send_hdlc_handler)
+                s->send_hdlc_handler(s->send_hdlc_user_data, NULL, 0);
+            break;        
+        default:
+            /* Wait for an acknowledgement. */
+            set_phase(s, T30_PHASE_B_RX);
+            s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T4);
+            s->timer_is_t4 = TRUE;
+            break;
+        }
+        break;
+    case T30_STATE_F_CFR:
+        if (s->step == 0)
+        {
+            if (s->send_hdlc_handler)
+                s->send_hdlc_handler(s->send_hdlc_user_data, NULL, 0);
+            s->step++;
+        }
+        else
+        {
+            set_state(s, T30_STATE_F_DOC);
+            set_phase(s, (s->error_correcting_mode)  ?  T30_PHASE_C_ECM_RX  : T30_PHASE_C_NON_ECM_RX);
+            s->next_rx_step = T30_MPS;
+        }
+        break;
+    case T30_STATE_F_FTT:
+        if (s->step == 0)
+        {
+            if (s->send_hdlc_handler)
+                s->send_hdlc_handler(s->send_hdlc_user_data, NULL, 0);
+            s->step++;
+        }
+        else
+        {
+            set_phase(s, T30_PHASE_B_RX);
+            s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T4);
+            s->timer_is_t4 = TRUE;
+        }
+        break;
+    case T30_STATE_III_Q_MCF:
+    case T30_STATE_III_Q_RTP:
+    case T30_STATE_III_Q_RTN:
+    case T30_STATE_F_POST_RCP_PPR:
+    case T30_STATE_F_POST_RCP_MCF:
+        if (s->step == 0)
+        {
+            if (s->send_hdlc_handler)
+                s->send_hdlc_handler(s->send_hdlc_user_data, NULL, 0);
+            s->step++;
+        }
+        else
+        {
+            switch (s->next_rx_step)
+            {
+            case T30_MPS:
+            case T30_PRI_MPS:
+                set_state(s, T30_STATE_F_DOC);
+                set_phase(s, (s->error_correcting_mode)  ?  T30_PHASE_C_ECM_RX  : T30_PHASE_C_NON_ECM_RX);
+                break;
+            case T30_EOM:
+            case T30_PRI_EOM:
+                /* TODO: */
+                disconnect(s);
+                break;
+            case T30_EOP:
+            case T30_PRI_EOP:
+                disconnect(s);
+                break;
+            default:
+                span_log(&s->logging, SPAN_LOG_FLOW, "Unknown next rx step - %d\n", s->next_rx_step);
+                disconnect(s);
+                break;
+            }
+        }
+        break;
+    case T30_STATE_II_Q:
+    case T30_STATE_IV_PPS_NULL:
+    case T30_STATE_IV_PPS_Q:
+        if (s->step == 0)
+        {
+            if (s->send_hdlc_handler)
+                s->send_hdlc_handler(s->send_hdlc_user_data, NULL, 0);
+            s->step++;
+        }
+        else
+        {
+            /* We have finished sending the post image message. Wait for an
+               acknowledgement. */
+            set_phase(s, T30_PHASE_D_RX);
+            s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T4);
+            s->timer_is_t4 = TRUE;
+        }
+        break;
+    case T30_STATE_B:
+        /* We have now allowed time for the last message to flush
+           through the system, so it is safe to report the end of the
+           call. */
+        if (s->phase_e_handler)
+            s->phase_e_handler(s, s->phase_e_user_data, s->current_status);
+        set_state(s, T30_STATE_CALL_FINISHED);
+        set_phase(s, T30_PHASE_CALL_FINISHED);
+        break;
+    case T30_STATE_C:
+        if (s->step == 0)
+        {
+            if (s->send_hdlc_handler)
+                s->send_hdlc_handler(s->send_hdlc_user_data, NULL, 0);
+            s->step++;
+        }
+        else
+        {
+            /* We just sent the disconnect message. Now it is time to disconnect */
+            disconnect(s);
+        }
+        break;
+    case T30_STATE_D:
+        switch (s->step)
+        {
+        case 0:
+            s->step++;
+            if (send_sub_frame(s))
+                break;
+            /* Fall through */
+        case 1:
+            s->step++;
+            if (send_ident_frame(s, T30_TSI))
+                break;
+            /* Fall through */
+        case 2:
+            s->step++;
+            send_frame(s, s->dcs_frame, s->dcs_len);
+            break;
+        case 3:
+            s->step++;
+            if (s->send_hdlc_handler)
+                s->send_hdlc_handler(s->send_hdlc_user_data, NULL, 0);
+            break;        
+        default:
+            if ((s->iaf & T30_IAF_MODE_NO_TCF))
+            {
+                /* Skip the trainability test */
+                s->retries = 0;
+                s->short_train = TRUE;
+                if (s->error_correcting_mode)
+                {
+                    set_state(s, T30_STATE_IV);
+                    queue_phase(s, T30_PHASE_C_ECM_TX);
+                }
+                else
+                {
+                    set_state(s, T30_STATE_I);
+                    queue_phase(s, T30_PHASE_C_NON_ECM_TX);
+                }
+            }
+            else
+            {
+                /* Do the trainability test */
+                set_state(s, T30_STATE_D_TCF);
+                set_phase(s, T30_PHASE_C_NON_ECM_TX);
+            }
+            break;
+        }
+        break;
+    case T30_STATE_D_TCF:
+        /* Finished sending training test. Listen for the response. */
+        set_phase(s, T30_PHASE_B_RX);
+        s->timer_t2_t4 = ms_to_samples(DEFAULT_TIMER_T4);
+        s->timer_is_t4 = TRUE;
+        set_state(s, T30_STATE_D_POST_TCF);
+        break;
+    case T30_STATE_I:
+        /* Send the end of page message */
+        set_phase(s, T30_PHASE_D_TX);
+        set_state(s, T30_STATE_II_Q);
+        /* We might need to resend the page we are on, but we need to check if there
+           are any more pages to send, so we can send the correct signal right now. */
+        send_simple_frame(s, s->next_tx_step = check_next_tx_step(s));
+        break;
+    case T30_STATE_IV:
+        /* We have finished sending an FCD frame */
+        if (s->step == 0)
+        {
+            if (send_next_ecm_frame(s))
+            {
+                if (s->send_hdlc_handler)
+                    s->send_hdlc_handler(s->send_hdlc_user_data, NULL, 0);
+                s->step++;
+            }
+        }
+        else
+        {
+            /* Send the end of page or partial page message */
+            set_phase(s, T30_PHASE_D_TX);
+            s->next_tx_step = check_next_tx_step(s);
+            if (send_pps_frame(s) == T30_NULL)
+                set_state(s, T30_STATE_IV_PPS_NULL);
+            else
+                set_state(s, T30_STATE_IV_PPS_Q);
+        }
+        break;
+    case T30_STATE_CALL_FINISHED:
+        /* Just ignore anything that happens now. We might get here if a premature
+           disconnect from the far end overlaps something. */
+        break;
+    default:
+        span_log(&s->logging, SPAN_LOG_FLOW, "Bad state in t30_send_complete - %d\n", s->state);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void repeat_last_command(t30_state_t *s)
+{
+    switch (s->state)
+    {
+    case T30_STATE_R:
+        set_phase(s, T30_PHASE_B_TX);
+        s->dis_received = FALSE;
+        send_dis_or_dtc_sequence(s);
+        break;
+    case T30_STATE_III_Q_MCF:
+        set_phase(s, T30_PHASE_D_TX);
+        send_simple_frame(s, T30_MCF);
+        break;
+    case T30_STATE_III_Q_RTP:
+        set_phase(s, T30_PHASE_D_TX);
+        send_simple_frame(s, T30_RTP);
+        break;
+    case T30_STATE_III_Q_RTN:
+        set_phase(s, T30_PHASE_D_TX);
+        send_simple_frame(s, T30_RTN);
+        break;
+    case T30_STATE_II_Q:
+        set_phase(s, T30_PHASE_D_TX);
+        send_simple_frame(s, s->next_tx_step);
+        break;
+    case T30_STATE_IV_PPS_NULL:
+    case T30_STATE_IV_PPS_Q:
+        set_phase(s, T30_PHASE_D_TX);
+        send_pps_frame(s);
+        break;
+    case T30_STATE_IV_PPS_RNR:
+    case T30_STATE_IV_EOR_RNR:
+        set_phase(s, T30_PHASE_D_TX);
+        send_simple_frame(s, T30_RNR);
+        break;
+    case T30_STATE_D:
+        send_dcs_sequence(s);
+        break;
+    case T30_STATE_F_FTT:
+        set_phase(s, T30_PHASE_B_TX);
+        send_simple_frame(s, T30_FTT);
+        break;
+    case T30_STATE_F_CFR:
+        set_phase(s, T30_PHASE_B_TX);
+        send_simple_frame(s, T30_CFR);
+        break;
+    default:
+        span_log(&s->logging, SPAN_LOG_FLOW, "Repeat command called with nothing to repeat - phase %s, state %d\n", phase_names[s->phase], s->state);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void timer_t0_expired(t30_state_t *s)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "T0 timeout in state %d\n", s->state);
+    s->current_status = T30_ERR_T0EXPIRED;
+    /* Just end the call */
+    disconnect(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void timer_t1_expired(t30_state_t *s)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "T1 timeout in state %d\n", s->state);
+    /* The initial connection establishment has timeout out. In other words, we
+       have been unable to communicate successfully with a remote machine.
+       It is time to abandon the call. */
+    s->current_status = T30_ERR_T1EXPIRED;
+    switch (s->state)
+    {
+    case T30_STATE_T:
+        /* Just end the call */
+        disconnect(s);
+        break;
+    case T30_STATE_R:
+        /* Send disconnect, and then end the call. Since we have not
+           successfully contacted the far end, it is unclear why we should
+           send a disconnect message at this point. However, it is what T.30
+           says we should do. */
+        send_dcn(s);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void timer_t2_expired(t30_state_t *s)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "T2 timeout in phase %s, state %d\n", phase_names[s->phase], s->state);
+    switch (s->state)
+    {
+    case T30_STATE_F_DOC:
+        /* While waiting for FAX page */
+        s->current_status = T30_ERR_T2EXPFAXRX;
+        break;
+    case T30_STATE_F_POST_DOC_NON_ECM:
+        /* While waiting for next FAX page */
+        s->current_status = T30_ERR_T2EXPMPSRX;
+        break;
+#if 0
+    case ??????:
+        /* While waiting for DCN */
+        s->current_status = T30_ERR_T2EXPDCNRX;
+        break;
+    case ??????:
+        /* While waiting for phase D */
+        s->current_status = T30_ERR_T2EXPDRX;
+        break;
+#endif
+    case T30_STATE_IV_PPS_RNR:
+    case T30_STATE_IV_EOR_RNR:
+        /* While waiting for RR command */
+        s->current_status = T30_ERR_T2EXPRRRX;
+        break;
+    case T30_STATE_R:
+        /* While waiting for NSS, DCS or MCF */
+        s->current_status = T30_ERR_T2EXPRX;
+        break;
+    }
+    set_phase(s, T30_PHASE_B_TX);
+    start_receiving_document(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void timer_t3_expired(t30_state_t *s)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "T3 timeout in phase %s, state %d\n", phase_names[s->phase], s->state);
+    s->current_status = T30_ERR_T3EXPIRED;
+    disconnect(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void timer_t4_expired(t30_state_t *s)
+{
+    /* There was no response (or only a corrupt response) to a command */
+    span_log(&s->logging, SPAN_LOG_FLOW, "T4 timeout in phase %s, state %d\n", phase_names[s->phase], s->state);
+    if (++s->retries > MAX_MESSAGE_TRIES)
+    {
+        s->current_status = T30_ERR_RETRYDCN;
+        send_dcn(s);
+        return;
+    }
+    repeat_last_command(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void timer_t5_expired(t30_state_t *s)
+{
+    /* Give up waiting for the receiver to become ready in error correction mode */
+    send_dcn(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_timer_update(t30_state_t *s, int samples)
+{
+    if (s->timer_t0_t1 > 0)
+    {
+        s->timer_t0_t1 -= samples;
+        if (s->timer_t0_t1 <= 0)
+        {
+            if (s->far_end_detected)
+                timer_t1_expired(s);
+            else
+                timer_t0_expired(s);
+        }
+    }
+    if (s->timer_t3 > 0)
+    {
+        s->timer_t3 -= samples;
+        if (s->timer_t3 <= 0)
+            timer_t3_expired(s);
+    }
+    if (s->timer_t2_t4 > 0)
+    {
+        s->timer_t2_t4 -= samples;
+        if (s->timer_t2_t4 <= 0)
+        {
+            if (s->timer_is_t4)
+                timer_t4_expired(s);
+            else
+                timer_t2_expired(s);
+        }
+    }
+    if (s->timer_t5 > 0)
+    {
+        s->timer_t5 -= samples;
+        if (s->timer_t5 <= 0)
+            timer_t5_expired(s);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void decode_20digit_msg(t30_state_t *s, char *msg, const uint8_t *pkt, int len)
+{
+    int p;
+    int k;
+    char text[20 + 1];
+
+    if (msg == NULL)
+        msg = text;
+    if (len > T30_MAX_IDENT_LEN)
+    {
+        unexpected_frame_length(s, pkt, len);
+        msg[0] = '\0';
+        return;
+    }
+    p = len;
+    /* Strip trailing spaces */
+    while (p > 1  &&  pkt[p - 1] == ' ')
+        p--;
+    /* The string is actually backwards in the message */
+    k = 0;
+    while (p > 1)
+        msg[k++] = pkt[--p];
+    msg[k] = '\0';
+    span_log(&s->logging, SPAN_LOG_FLOW, "Remote fax gave %s as: \"%s\"\n", t30_frametype(pkt[0]), msg);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void decode_url_msg(t30_state_t *s, char *msg, const uint8_t *pkt, int len)
+{
+    char text[77 + 1];
+
+    /* TODO: decode properly, as per T.30 5.3.6.2.12 */
+    if (msg == NULL)
+        msg = text;
+    if (len < 3  ||  len > 77 + 3  ||  len != pkt[2] + 3)
+    {
+        unexpected_frame_length(s, pkt, len);
+        msg[0] = '\0';
+        return;
+    }
+    /* First octet is the sequence number of the packet.
+            Bit 7 = 1 for more follows, 0 for last packet in the sequence.
+            Bits 6-0 = The sequence number, 0 to 0x7F
+       Second octet is the type of internet address.
+            Bits 7-4 = reserved
+            Bits 3-0 = type:
+                    0 = reserved
+                    1 = e-mail address
+                    2 = URL
+                    3 = TCP/IP V4
+                    4 = TCP/IP V6
+                    5 = international phone number, in the usual +... format
+                    6-15 = reserved
+       Third octet is the length of the internet address
+            Bit 7 = 1 for more follows, 0 for last packet in the sequence.
+            Bits 6-0 = length
+     */
+    memcpy(msg, &pkt[3], len - 3);
+    msg[len - 3] = '\0';
+    span_log(&s->logging, SPAN_LOG_FLOW, "Remote fax gave %s as: %d, %d, \"%s\"\n", t30_frametype(pkt[0]), pkt[0], pkt[1], msg);
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *t30_frametype(uint8_t x)
+{
+    switch (x & 0xFE)
+    {
+    case T30_DIS:
+        if (x == T30_DTC)
+            return "DTC";
+        return "DIS";
+    case T30_CSI:
+        if (x == T30_CIG)
+            return "CIG";
+        return "CSI";
+    case T30_NSF:
+        if (x == T30_NSC)
+            return "NSC";
+        return "NSF";
+    case T30_PWD & 0xFE:
+        if (x == T30_PWD)
+            return "PWD";
+        break;
+    case T30_SEP & 0xFE:
+        if (x == T30_SEP)
+            return "SEP";
+        break;
+    case T30_PSA & 0xFE:
+        if (x == T30_PSA)
+            return "PSA";
+        break;
+    case T30_CIA & 0xFE:
+        if (x == T30_CIA)
+            return "CIA";
+        break;
+    case T30_ISP & 0xFE:
+        if (x == T30_ISP)
+            return "ISP";
+        break;
+    case T30_DCS:
+        return "DCS";
+    case T30_TSI:
+        return "TSI";
+    case T30_NSS:
+        return "NSS";
+    case T30_SUB:
+        return "SUB";
+    case T30_SID:
+        return "SID";
+    case T30_CTC:
+        return "CTC";
+    case T30_TSA:
+        return "TSA";
+    case T30_IRA:
+        return "IRA";
+    case T30_CFR:
+        return "CFR";
+    case T30_FTT:
+        return "FTT";
+    case T30_CTR:
+        return "CTR";
+    case T30_CSA:
+        return "CSA";
+    case T30_EOM:
+        return "EOM";
+    case T30_MPS:
+        return "MPS";
+    case T30_EOP:
+        return "EOP";
+    case T30_PRI_EOM:
+        return "PRI_EOM";
+    case T30_PRI_MPS:
+        return "PRI_MPS";
+    case T30_PRI_EOP:
+        return "PRI_EOP";
+    case T30_EOS:
+        return "EOS";
+    case T30_PPS:
+        return "PPS";
+    case T30_EOR:
+        return "EOR";
+    case T30_RR:
+        return "RR";
+    case T30_MCF:
+        return "MCF";
+    case T30_RTP:
+        return "RTP";
+    case T30_RTN:
+        return "RTN";
+    case T30_PIP:
+        return "PIP";
+    case T30_PIN:
+        return "PIN";
+    case T30_PPR:
+        return "PPR";
+    case T30_RNR:
+        return "RNR";
+    case T30_ERR:
+        return "ERR";
+    case T30_FDM:
+        return "FDM";
+    case T30_DCN:
+        return "DCN";
+    case T30_CRP:
+        return "CRP";
+    case T30_FNV:
+        return "FNV";
+    case T30_TNR:
+        return "TNR";
+    case T30_TR:
+        return "TR";
+    case T30_PID:
+        return "PID";
+    case T30_NULL:
+        return "NULL";
+    case T4_FCD:
+        return "FCD";
+    case T4_RCP:
+        return "RCP";
+    }
+    return "???";
+}
+/*- End of function --------------------------------------------------------*/
+
+static void octet_reserved_bit(logging_state_t *log,
+                               const uint8_t *msg,
+                               int bit_no,
+                               int expected)
+{
+    char s[10] = ".... ....";
+    int bit;
+    uint8_t octet;
+    
+    /* Break out the octet and the bit number within it. */
+    octet = msg[((bit_no - 1) >> 3) + 3];
+    bit_no = (bit_no - 1) & 7;
+    /* Now get the actual bit. */
+    bit = (octet >> bit_no) & 1;
+    /* Is it what it should be. */
+    if (bit ^ expected)
+    {
+        /* Only log unexpected values. */
+        s[7 - bit_no + ((bit_no < 4)  ?  1  :  0)] = (uint8_t) (bit + '0');
+        span_log(log, SPAN_LOG_FLOW, "  %s= Unexpected state for reserved bit: %d\n", s, bit);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void octet_bit_field(logging_state_t *log,
+                            const uint8_t *msg,
+                            int bit_no,
+                            const char *desc,
+                            const char *yeah,
+                            const char *neigh)
+{
+    char s[10] = ".... ....";
+    int bit;
+    uint8_t octet;
+    const char *tag;
+
+    /* Break out the octet and the bit number within it. */
+    octet = msg[((bit_no - 1) >> 3) + 3];
+    bit_no = (bit_no - 1) & 7;
+    /* Now get the actual bit. */
+    bit = (octet >> bit_no) & 1;
+    /* Edit the bit string for display. */
+    s[7 - bit_no + ((bit_no < 4)  ?  1  :  0)] = (uint8_t) (bit + '0');
+    /* Find the right tag to display. */
+    if (bit)
+    {
+        if ((tag = yeah) == NULL)
+            tag = "Set";
+    }
+    else
+    {
+        if ((tag = neigh) == NULL)
+            tag = "Not set";
+    }
+    /* Eh, voila! */
+    span_log(log, SPAN_LOG_FLOW, "  %s= %s: %s\n", s, desc, tag);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void octet_field(logging_state_t *log,
+                        const uint8_t *msg,
+                        int start,
+                        int end,
+                        const char *desc,
+                        const value_string_t tags[])
+{
+    char s[10] = ".... ....";
+    int i;
+    uint8_t octet;
+    const char *tag;
+    
+    /* Break out the octet and the bit number range within it. */
+    octet = msg[((start - 1) >> 3) + 3];
+    start = (start - 1) & 7;
+    end = ((end - 1) & 7) + 1;
+
+    /* Edit the bit string for display. */
+    for (i = start;  i < end;  i++)
+        s[7 - i + ((i < 4)  ?  1  :  0)] = (uint8_t) ((octet >> i) & 1) + '0';
+
+    /* Find the right tag to display. */
+    octet = (uint8_t) ((octet >> start) & ((0xFF + (1 << (end - start))) & 0xFF));
+    tag = "Invalid";
+    for (i = 0;  tags[i].str;  i++)
+    {
+        if (octet == tags[i].val)
+        {
+            tag = tags[i].str;
+            break;
+        }
+    }
+    /* Eh, voila! */
+    span_log(log, SPAN_LOG_FLOW, "  %s= %s: %s\n", s, desc, tag);
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *pkt, int len)
+{
+    logging_state_t *log;
+    uint8_t frame_type;
+    static const value_string_t available_signalling_rate_tags[] =
+    {
+        { 0x00, "V.27 ter fall-back mode" },
+        { 0x01, "V.29" },
+        { 0x02, "V.27 ter" },
+        { 0x03, "V.27 ter and V.29" },
+        { 0x0B, "V.27 ter, V.29, and V.17" },
+        { 0x06, "Reserved" },
+        { 0x0A, "Reserved" },
+        { 0x0E, "Reserved" },
+        { 0x0F, "Reserved" },
+        { 0x04, "Not used" },
+        { 0x05, "Not used" },
+        { 0x08, "Not used" },
+        { 0x09, "Not used" },
+        { 0x0C, "Not used" },
+        { 0x0D, "Not used" },
+        { 0x00, NULL }
+    };
+    static const value_string_t selected_signalling_rate_tags[] =
+    {
+        { 0x00, "V.27ter 2400bps" },
+        { 0x01, "V.29, 9600bps" },
+        { 0x02, "V.27ter 4800bps" },
+        { 0x03, "V.29 7200bps" },
+        { 0x08, "V.17 14400bps" },
+        { 0x09, "V.17 9600bps" },
+        { 0x0A, "V.17 12000bps" },
+        { 0x0B, "V.17 7200bps" },
+        { 0x05, "Reserved" },
+        { 0x07, "Reserved" },
+        { 0x0C, "Reserved" },
+        { 0x0D, "Reserved" },
+        { 0x0E, "Reserved" },
+        { 0x0F, "Reserved" },
+        { 0x00, NULL }
+    };
+    static const value_string_t available_scan_line_length_tags[] =
+    {
+        { 0x00, "215 mm +- 1%" },
+        { 0x01, "215 mm +- 1% and 255 mm +- 1%" },
+        { 0x02, "215 mm +- 1% and 255 mm +- 1% and 303 mm +- 1%" },
+        { 0x00, NULL }
+    };
+    static const value_string_t selected_scan_line_length_tags[] =
+    {
+        { 0x00, "215 mm +- 1%" },
+        { 0x01, "255 mm +- 1%" },
+        { 0x02, "303 mm +- 1%" },
+        { 0x00, NULL }
+    };
+    static const value_string_t available_recording_length_tags[] =
+    {
+        { 0x00, "A4 (297 mm)" },
+          { 0x01, "A4 (297 mm) and B4 (364 mm)" },
+        { 0x02, "Unlimited" },
+        { 0x00, NULL }
+    };
+    static const value_string_t selected_recording_length_tags[] =
+    {
+        { 0x00, "A4 (297 mm)" },
+        { 0x01, "B4 (364 mm)" },
+        { 0x02, "Unlimited" },
+        { 0x00, NULL }
+    };
+    static const value_string_t available_minimum_scan_line_time_tags[] =
+    {
+        { 0x00, "20 ms at 3.85 l/mm: T7.7 = T3.85" },
+        { 0x01, "5 ms at 3.85 l/mm: T7.7 = T3.85" },
+        { 0x02, "10 ms at 3.85 l/mm: T7.7 = T3.85" },
+        { 0x03, "20 ms at 3.85 l/mm: T7.7 = 1/2 T3.85" },
+        { 0x04, "40 ms at 3.85 l/mm: T7.7 = T3.85" },
+        { 0x05, "40 ms at 3.85 l/mm: T7.7 = 1/2 T3.85" },
+        { 0x06, "10 ms at 3.85 l/mm: T7.7 = 1/2 T3.85" },
+        { 0x07, "0 ms at 3.85 l/mm: T7.7 = T3.85" },
+        { 0x00, NULL }
+    };
+    static const value_string_t selected_minimum_scan_line_time_tags[] =
+    {
+        { 0x00, "20 ms" },
+        { 0x01, "40 ms" },
+        { 0x02, "10 ms" },
+        { 0x04, "5 ms" },
+        { 0x07, "0 ms" },
+        { 0x00, NULL }
+    };
+    static const value_string_t shared_data_memory_capacity_tags[] =
+    {
+        { 0x00, "Not available" },
+        { 0x01, "Level 2 = 2.0 Mbytes" },
+        { 0x02, "Level 1 = 1.0 Mbytes" },
+        { 0x03, "Level 3 = unlimited (i.e. >= 32 Mbytes)" },
+        { 0x00, NULL }
+    };
+    static const value_string_t t89_profile_tags[] =
+    {
+        { 0x00, "Not used" },
+        { 0x01, "Profiles 2 and 3" },
+        { 0x02, "Profile 2" },
+        { 0x04, "Profile 1" },
+        { 0x06, "Profile 3" },
+        { 0x03, "Reserved" },
+        { 0x05, "Reserved" },
+        { 0x07, "Reserved" },
+        { 0x00, NULL }
+    };
+    static const value_string_t t44_mixed_raster_content_tags[] =
+    {
+        { 0x00, "0" },
+        { 0x01, "1" },
+        { 0x02, "2" },
+        { 0x32, "3" },
+        { 0x04, "4" },
+        { 0x05, "5" },
+        { 0x06, "6" },
+        { 0x07, "7" },
+        { 0x00, NULL }
+    };
+
+    if (!span_log_test(&s->logging, SPAN_LOG_FLOW))
+        return;
+    frame_type = pkt[2] & 0xFE;
+    log = &s->logging;
+    if (len <= 2)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+    
+    span_log(log, SPAN_LOG_FLOW, "%s:\n", t30_frametype(pkt[2]));
+    if (len <= 3)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+    octet_bit_field(log, pkt, 1, "Store and forward Internet fax (T.37)", NULL, NULL);
+    octet_reserved_bit(log, pkt, 2, 0);
+    octet_bit_field(log, pkt, 3, "Real-time Internet fax (T.38)", NULL, NULL);
+    octet_bit_field(log, pkt, 4, "3G mobile network", NULL, NULL);
+    octet_reserved_bit(log, pkt, 5, 0);
+    if (frame_type == T30_DCS)
+    {
+        octet_reserved_bit(log, pkt, 6, 0);
+        octet_reserved_bit(log, pkt, 7, 0);
+    }
+    else
+    {
+        octet_bit_field(log, pkt, 6, "V.8 capabilities", NULL, NULL);
+        octet_bit_field(log, pkt, 7, "Preferred octets", "64 octets", "256 octets");
+    }
+    octet_reserved_bit(log, pkt, 8, 0);
+    if (len <= 4)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+    
+    if (frame_type == T30_DCS)
+        octet_reserved_bit(log, pkt, 9, 0);
+    else
+        octet_bit_field(log, pkt, 9, "Ready to transmit a fax document (polling)", NULL, NULL);
+    octet_bit_field(log, pkt, 10, "Can receive fax", NULL, NULL);
+    if (frame_type == T30_DCS)
+        octet_field(log, pkt, 11, 14, "Selected data signalling rate", selected_signalling_rate_tags);
+    else
+        octet_field(log, pkt, 11, 14, "Supported data signalling rates", available_signalling_rate_tags);
+    octet_bit_field(log, pkt, 15, "R8x7.7lines/mm and/or 200x200pels/25.4mm", NULL, NULL);
+    octet_bit_field(log, pkt, 16, "2-D coding", NULL, NULL);
+    if (len <= 5)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    if (frame_type == T30_DCS)
+    {
+        octet_field(log, pkt, 17, 18, "Recording width", selected_scan_line_length_tags);
+        octet_field(log, pkt, 19, 20, "Recording length", selected_recording_length_tags);
+        octet_field(log, pkt, 21, 23, "Minimum scan line time", selected_minimum_scan_line_time_tags);
+    }
+    else
+    {
+        octet_field(log, pkt, 17, 18, "Recording width", available_scan_line_length_tags);
+        octet_field(log, pkt, 19, 20, "Recording length", available_recording_length_tags);
+        octet_field(log, pkt, 21, 23, "Receiver's minimum scan line time", available_minimum_scan_line_time_tags);
+    }
+    octet_bit_field(log, pkt, 24, "Extension indicator", NULL, NULL);
+    if (!(pkt[5] & DISBIT8))
+        return;
+    if (len <= 6)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_reserved_bit(log, pkt, 25, 0);
+    octet_bit_field(log, pkt, 26, "Compressed/uncompressed mode", "Uncompressed", "Compressed");
+    octet_bit_field(log, pkt, 27, "Error correction mode (ECM)", "ECM", "Non-ECM");
+    if (frame_type == T30_DCS)
+        octet_bit_field(log, pkt, 28, "Frame size", "64 octets", "256 octets");
+    else
+        octet_reserved_bit(log, pkt, 28, 0);
+    octet_reserved_bit(log, pkt, 29, 0);
+    octet_reserved_bit(log, pkt, 30, 0);
+    octet_bit_field(log, pkt, 31, "T.6 coding", NULL, NULL);
+    octet_bit_field(log, pkt, 32, "Extension indicator", NULL, NULL);
+    if (!(pkt[6] & DISBIT8))
+        return;
+    if (len <= 7)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 33, "\"Field not valid\" supported", NULL, NULL);
+    if (frame_type == T30_DCS)
+    {
+        octet_reserved_bit(log, pkt, 34, 0);
+        octet_reserved_bit(log, pkt, 35, 0);
+    }
+    else
+    {
+        octet_bit_field(log, pkt, 34, "Multiple selective polling", NULL, NULL);
+        octet_bit_field(log, pkt, 35, "Polled subaddress", NULL, NULL);
+    }
+    octet_bit_field(log, pkt, 36, "T.43 coding", NULL, NULL);
+    octet_bit_field(log, pkt, 37, "Plane interleave", NULL, NULL);
+    octet_bit_field(log, pkt, 38, "Voice coding with 32kbit/s ADPCM (Rec. G.726)", NULL, NULL);
+    octet_bit_field(log, pkt, 39, "Reserved for the use of extended voice coding set", NULL, NULL);
+    octet_bit_field(log, pkt, 40, "Extension indicator", NULL, NULL);
+    if (!(pkt[7] & DISBIT8))
+        return;
+    if (len <= 8)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 41, "R8x15.4lines/mm", NULL, NULL);
+    octet_bit_field(log, pkt, 42, "300x300pels/25.4mm", NULL, NULL);
+    octet_bit_field(log, pkt, 43, "R16x15.4lines/mm and/or 400x400pels/25.4 mm", NULL, NULL);
+    if (frame_type == T30_DCS)
+    {
+        octet_bit_field(log, pkt, 44, "Resolution type selection", "Inch", "Metric");
+        octet_reserved_bit(log, pkt, 45, 0);
+        octet_reserved_bit(log, pkt, 46, 0);
+        octet_reserved_bit(log, pkt, 47, 0);
+    }
+    else
+    {
+        octet_bit_field(log, pkt, 44, "Inch-based resolution preferred", NULL, NULL);
+        octet_bit_field(log, pkt, 45, "Metric-based resolution preferred", NULL, NULL);
+        octet_bit_field(log, pkt, 46, "Minimum scan line time for higher resolutions", "T15.4 = 1/2 T7.7", "T15.4 = T7.7");
+        octet_bit_field(log, pkt, 47, "Selective polling", NULL, NULL);
+    }
+    octet_bit_field(log, pkt, 48, "Extension indicator", NULL, NULL);
+    if (!(pkt[8] & DISBIT8))
+        return;
+    if (len <= 9)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 49, "Subaddressing", NULL, NULL);
+    if (frame_type == T30_DCS)
+    {
+        octet_bit_field(log, pkt, 50, "Sender identification transmission", NULL, NULL);
+        octet_reserved_bit(log, pkt, 51, 0);
+    }
+    else
+    {
+        octet_bit_field(log, pkt, 50, "Password", NULL, NULL);
+        octet_bit_field(log, pkt, 51, "Ready to transmit a data file (polling)", NULL, NULL);
+    }
+    octet_reserved_bit(log, pkt, 52, 0);
+    octet_bit_field(log, pkt, 53, "Binary file transfer (BFT)", NULL, NULL);
+    octet_bit_field(log, pkt, 54, "Document transfer mode (DTM)", NULL, NULL);
+    octet_bit_field(log, pkt, 55, "Electronic data interchange (EDI)", NULL, NULL);
+    octet_bit_field(log, pkt, 56, "Extension indicator", NULL, NULL);
+    if (!(pkt[9] & DISBIT8))
+        return;
+    if (len <= 10)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 57, "Basic transfer mode (BTM)", NULL, NULL);
+    octet_reserved_bit(log, pkt, 58, 0);
+    if (frame_type == T30_DCS)
+        octet_reserved_bit(log, pkt, 59, 0);
+    else
+        octet_bit_field(log, pkt, 59, "Ready to transfer a character or mixed mode document (polling)", NULL, NULL);
+    octet_bit_field(log, pkt, 60, "Character mode", NULL, NULL);
+    octet_reserved_bit(log, pkt, 61, 0);
+    octet_bit_field(log, pkt, 62, "Mixed mode (Annex E/T.4)", NULL, NULL);
+    octet_reserved_bit(log, pkt, 63, 0);
+    octet_bit_field(log, pkt, 64, "Extension indicator", NULL, NULL);
+    if (!(pkt[10] & DISBIT8))
+        return;
+    if (len <= 11)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 65, "Processable mode 26 (Rec. T.505)", NULL, NULL);
+    octet_bit_field(log, pkt, 66, "Digital network capability", NULL, NULL);
+    octet_bit_field(log, pkt, 67, "Duplex capability", "Full", "Half only");
+    if (frame_type == T30_DCS)
+        octet_bit_field(log, pkt, 68, "Full colour mode", NULL, NULL);
+    else
+        octet_bit_field(log, pkt, 68, "JPEG coding", NULL, NULL);
+    octet_bit_field(log, pkt, 69, "Full colour mode", NULL, NULL);
+    if (frame_type == T30_DCS)
+        octet_bit_field(log, pkt, 70, "Preferred Huffman tables", NULL, NULL);
+    else
+        octet_reserved_bit(log, pkt, 70, 0);
+    octet_bit_field(log, pkt, 71, "12bits/pel component", NULL, NULL);
+    octet_bit_field(log, pkt, 72, "Extension indicator", NULL, NULL);
+    if (!(pkt[11] & DISBIT8))
+        return;
+    if (len <= 12)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 73, "No subsampling (1:1:1)", NULL, NULL);
+    octet_bit_field(log, pkt, 74, "Custom illuminant", NULL, NULL);
+    octet_bit_field(log, pkt, 75, "Custom gamut range", NULL, NULL);
+    octet_bit_field(log, pkt, 76, "North American Letter (215.9mm x 279.4mm)", NULL, NULL);
+    octet_bit_field(log, pkt, 77, "North American Legal (215.9mm x 355.6mm)", NULL, NULL);
+    octet_bit_field(log, pkt, 78, "Single-progression sequential coding (Rec. T.85) basic", NULL, NULL);
+    octet_bit_field(log, pkt, 79, "Single-progression sequential coding (Rec. T.85) optional L0", NULL, NULL);
+    octet_bit_field(log, pkt, 80, "Extension indicator", NULL, NULL);
+    if (!(pkt[12] & DISBIT8))
+        return;
+    if (len <= 13)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 81, "HKM key management", NULL, NULL);
+    octet_bit_field(log, pkt, 82, "RSA key management", NULL, NULL);
+    octet_bit_field(log, pkt, 83, "Override", NULL, NULL);
+    octet_bit_field(log, pkt, 84, "HFX40 cipher", NULL, NULL);
+    octet_bit_field(log, pkt, 85, "Alternative cipher number 2", NULL, NULL);
+    octet_bit_field(log, pkt, 86, "Alternative cipher number 3", NULL, NULL);
+    octet_bit_field(log, pkt, 87, "HFX40-I hashing", NULL, NULL);
+    octet_bit_field(log, pkt, 88, "Extension indicator", NULL, NULL);
+    if (!(pkt[13] & DISBIT8))
+        return;
+    if (len <= 14)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 89, "Alternative hashing system 2", NULL, NULL);
+    octet_bit_field(log, pkt, 90, "Alternative hashing system 3", NULL, NULL);
+    octet_bit_field(log, pkt, 91, "Reserved for future security features", NULL, NULL);
+    octet_field(log, pkt, 92, 94, "T.44 (Mixed Raster Content)", t44_mixed_raster_content_tags);
+    octet_bit_field(log, pkt, 95, "Page length maximum stripe size for T.44 (Mixed Raster Content)", NULL, NULL);
+    octet_bit_field(log, pkt, 96, "Extension indicator", NULL, NULL);
+    if (!(pkt[14] & DISBIT8))
+        return;
+    if (len <= 15)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 97, "Colour/gray-scale 300pels/25.4mm x 300lines/25.4mm or 400pels/25.4mm x 400lines/25.4mm resolution", NULL, NULL);
+    octet_bit_field(log, pkt, 98, "100pels/25.4mm x 100lines/25.4mm for colour/gray scale", NULL, NULL);
+    octet_bit_field(log, pkt, 99, "Simple phase C BFT negotiations", NULL, NULL);
+    if (frame_type == T30_DCS)
+    {
+        octet_reserved_bit(log, pkt, 100, 0);
+        octet_reserved_bit(log, pkt, 101, 0);
+    }
+    else
+    {
+        octet_bit_field(log, pkt, 100, "Extended BFT Negotiations capable", NULL, NULL);
+        octet_bit_field(log, pkt, 101, "Internet Selective Polling address (ISP)", NULL, NULL);
+    }
+    octet_bit_field(log, pkt, 102, "Internet Routing Address (IRA)", NULL, NULL);
+    octet_reserved_bit(log, pkt, 103, 0);
+    octet_bit_field(log, pkt, 104, "Extension indicator", NULL, NULL);
+    if (!(pkt[15] & DISBIT8))
+        return;
+    if (len <= 16)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 105, "600pels/25.4mm x 600lines/25.4mm", NULL, NULL);
+    octet_bit_field(log, pkt, 106, "1200pels/25.4mm x 1200lines/25.4mm", NULL, NULL);
+    octet_bit_field(log, pkt, 107, "300pels/25.4mm x 600lines/25.4mm", NULL, NULL);
+    octet_bit_field(log, pkt, 108, "400pels/25.4mm x 800lines/25.4mm", NULL, NULL);
+    octet_bit_field(log, pkt, 109, "600pels/25.4mm x 1200lines/25.4mm", NULL, NULL);
+    octet_bit_field(log, pkt, 110, "Colour/gray scale 600pels/25.4mm x 600lines/25.4mm", NULL, NULL);
+    octet_bit_field(log, pkt, 111, "Colour/gray scale 1200pels/25.4mm x 1200lines/25.4mm", NULL, NULL);
+    octet_bit_field(log, pkt, 112, "Extension indicator", NULL, NULL);
+    if (!(pkt[16] & DISBIT8))
+        return;
+    if (len <= 17)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 113, "Double sided printing capability (alternate mode)", NULL, NULL);
+    octet_bit_field(log, pkt, 114, "Double sided printing capability (continuous mode)", NULL, NULL);
+    if (frame_type == T30_DCS)
+        octet_bit_field(log, pkt, 115, "Black and white mixed raster content profile (MRCbw)", NULL, NULL);
+    else
+        octet_reserved_bit(log, pkt, 115, 0);
+    octet_bit_field(log, pkt, 116, "T.45 (run length colour encoded)", NULL, NULL);
+    octet_field(log, pkt, 117, 118, "Shared memory", shared_data_memory_capacity_tags);
+    octet_bit_field(log, pkt, 119, "T.44 colour space", NULL, NULL);
+    octet_bit_field(log, pkt, 120, "Extension indicator", NULL, NULL);
+    if (!(pkt[17] & DISBIT8))
+        return;
+    if (len <= 18)
+    {
+        span_log(log, SPAN_LOG_FLOW, "  Frame is short\n");
+        return;
+    }
+
+    octet_bit_field(log, pkt, 121, "Flow control capability for T.38 communication", NULL, NULL);
+    octet_bit_field(log, pkt, 122, "K>4", NULL, NULL);
+    octet_bit_field(log, pkt, 123, "Internet aware T.38 mode fax (not affected by data signal rate bits)", NULL, NULL);
+    octet_field(log, pkt, 124, 126, "T.89 (Application profiles for ITU-T Rec T.8)", t89_profile_tags);
+    octet_bit_field(log, pkt, 127, "sYCC-JPEG coding", NULL, NULL);
+    octet_bit_field(log, pkt, 128, "Extension indicator", NULL, NULL);
+    if (!(pkt[18] & DISBIT8))
+        return;
+
+    span_log(log, SPAN_LOG_FLOW, "  Extended beyond the current T.30 specification!\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+int t30_restart(t30_state_t *s)
+{
+    s->phase = T30_PHASE_IDLE;
+    s->next_phase = T30_PHASE_IDLE;
+    s->current_fallback = 0;
+    s->rx_signal_present = FALSE;
+    s->rx_trained = FALSE;
+    s->current_status = T30_ERR_OK;
+    build_dis_or_dtc(s);
+    if (s->calling_party)
+    {
+        set_state(s, T30_STATE_T);
+        set_phase(s, T30_PHASE_A_CNG);
+    }
+    else
+    {
+        set_state(s, T30_STATE_ANSWERING);
+        set_phase(s, T30_PHASE_A_CED);
+    }
+    s->far_end_detected = FALSE;
+    s->timer_t0_t1 = ms_to_samples(DEFAULT_TIMER_T0);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t30_init(t30_state_t *s,
+             int calling_party,
+             t30_set_handler_t *set_rx_type_handler,
+             void *set_rx_type_user_data,
+             t30_set_handler_t *set_tx_type_handler,
+             void *set_tx_type_user_data,
+             t30_send_hdlc_handler_t *send_hdlc_handler,
+             void *send_hdlc_user_data)
+{
+    memset(s, 0, sizeof(*s));
+    s->calling_party = calling_party;
+    s->set_rx_type_handler = set_rx_type_handler;
+    s->set_rx_type_user_data = set_rx_type_user_data;
+    s->set_tx_type_handler = set_tx_type_handler;
+    s->set_tx_type_user_data = set_tx_type_user_data;
+    s->send_hdlc_handler = send_hdlc_handler;
+    s->send_hdlc_user_data = send_hdlc_user_data;
+
+    /* Default to the basic modems. */
+    s->supported_modems = T30_SUPPORT_V27TER | T30_SUPPORT_V29;
+    s->supported_compressions = T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION;
+    s->supported_resolutions = T30_SUPPORT_STANDARD_RESOLUTION | T30_SUPPORT_FINE_RESOLUTION | T30_SUPPORT_SUPERFINE_RESOLUTION
+                             | T30_SUPPORT_R8_RESOLUTION;
+    s->supported_image_sizes = T30_SUPPORT_US_LETTER_LENGTH | T30_SUPPORT_US_LEGAL_LENGTH | T30_SUPPORT_UNLIMITED_LENGTH
+                             | T30_SUPPORT_215MM_WIDTH;
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "T.30");
+    t30_restart(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_release(t30_state_t *s)
+{
+    /* Make sure any FAX in progress is tidied up. If the tidying up has
+       already happened, repeating it here is harmless. */
+    t4_rx_end(&(s->t4));
+    t4_tx_end(&(s->t4));
+}
+/*- End of function --------------------------------------------------------*/
+
+t30_state_t *t30_create(int calling_party,
+                        t30_set_handler_t *set_rx_type_handler,
+                        void *set_rx_type_user_data,
+                        t30_set_handler_t *set_tx_type_handler,
+                        void *set_tx_type_user_data,
+                        t30_send_hdlc_handler_t *send_hdlc_handler,
+                        void *send_hdlc_user_data)
+{
+    t30_state_t *s;
+    
+    if ((s = (t30_state_t *) malloc(sizeof(t30_state_t))) == NULL)
+        return NULL;
+    if (t30_init(s,
+                 calling_party,
+                 set_rx_type_handler,
+                 set_rx_type_user_data,
+                 set_tx_type_handler,
+                 set_tx_type_user_data,
+                 send_hdlc_handler,
+                 send_hdlc_user_data))
+    {
+        free(s);
+        return NULL;
+    }
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_free(t30_state_t *s)
+{
+    t30_release(s);
+    free(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_terminate(t30_state_t *s)
+{
+    if (s->phase != T30_PHASE_CALL_FINISHED)
+    {
+        /* The far end disconnected early, but was it just a tiny bit too early,
+           as we were just tidying up, or seriously early as in a failure? */
+        switch (s->state)
+        {
+        case T30_STATE_C:
+            /* We were sending the final disconnect, so just hussle things along. */
+            disconnect(s);
+            break;
+        case T30_STATE_B:
+            /* We were in the final wait for everything to flush through, so just
+               hussle things along. */
+            break;
+        default:
+            /* The call terminated prematurely. */
+            s->current_status = T30_ERR_CALLDROPPED;
+            break;
+        }
+        if (s->phase_e_handler)
+            s->phase_e_handler(s, s->phase_e_user_data, s->current_status);
+        set_state(s, T30_STATE_CALL_FINISHED);
+        set_phase(s, T30_PHASE_CALL_FINISHED);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_iaf_mode(t30_state_t *s, int iaf)
+{
+    s->iaf = iaf;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t30_set_header_info(t30_state_t *s, const char *info)
+{
+    if (info == NULL)
+    {
+        s->header_info[0] = '\0';
+        return 0;
+    }
+    if (strlen(info) > 50)
+        return -1;
+    strcpy(s->header_info, info);
+    t4_tx_set_header_info(&(s->t4), s->header_info);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t30_set_local_ident(t30_state_t *s, const char *id)
+{
+    if (id == NULL)
+    {
+        s->local_ident[0] = '\0';
+        return 0;
+    }
+    if (strlen(id) > 20)
+        return -1;
+    strcpy(s->local_ident, id);
+    t4_tx_set_local_ident(&(s->t4), s->local_ident);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t30_set_local_nsf(t30_state_t *s, const uint8_t *nsf, int len)
+{
+    if (len > 100)
+        return -1;
+    memcpy(s->local_nsf, nsf, len);
+    s->local_nsf_len = len;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t30_set_local_sub_address(t30_state_t *s, const char *sub_address)
+{
+    if (sub_address == NULL)
+    {
+        s->local_sub_address[0] = '\0';
+        return 0;
+    }
+    if (strlen(sub_address) > 20)
+        return -1;
+    strcpy(s->local_sub_address, sub_address);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+size_t t30_get_sub_address(t30_state_t *s, char *sub_address)
+{
+    if (sub_address)
+        strcpy(sub_address, s->far_sub_address);
+    return strlen(s->far_sub_address);
+}
+/*- End of function --------------------------------------------------------*/
+
+size_t t30_get_header_info(t30_state_t *s, char *info)
+{
+    if (info)
+        strcpy(info, s->header_info);
+    return strlen(s->header_info);
+}
+/*- End of function --------------------------------------------------------*/
+
+size_t t30_get_local_ident(t30_state_t *s, char *id)
+{
+    if (id)
+        strcpy(id, s->local_ident);
+    return strlen(s->local_ident);
+}
+/*- End of function --------------------------------------------------------*/
+
+size_t t30_get_far_ident(t30_state_t *s, char *id)
+{
+    if (id)
+        strcpy(id, s->far_ident);
+    return strlen(s->far_ident);
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *t30_get_far_country(t30_state_t *s)
+{
+    return s->country;
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *t30_get_far_vendor(t30_state_t *s)
+{
+    return s->vendor;
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *t30_get_far_model(t30_state_t *s)
+{
+    return s->model;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t)
+{
+    t4_stats_t stats;
+
+    t->bit_rate = fallback_sequence[s->current_fallback].bit_rate;
+    t->error_correcting_mode = s->error_correcting_mode;
+    t4_get_transfer_statistics(&(s->t4), &stats);
+    t->pages_transferred = stats.pages_transferred;
+    t->width = stats.width;
+    t->length = stats.length;
+    t->bad_rows = stats.bad_rows;
+    t->longest_bad_row_run = stats.longest_bad_row_run;
+    t->x_resolution = stats.x_resolution;
+    t->y_resolution = stats.y_resolution;
+    t->encoding = stats.encoding;
+    t->image_size = stats.image_size;
+    t->current_status = s->current_status;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data)
+{
+    s->phase_b_handler = handler;
+    s->phase_b_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data)
+{
+    s->phase_d_handler = handler;
+    s->phase_d_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data)
+{
+    s->phase_e_handler = handler;
+    s->phase_e_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data)
+{
+    s->document_handler = handler;
+    s->document_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_rx_file(t30_state_t *s, const char *file, int stop_page)
+{
+    strncpy(s->rx_file, file, sizeof(s->rx_file));
+    s->rx_file[sizeof(s->rx_file) - 1] = '\0';
+    s->rx_stop_page = stop_page;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page)
+{
+    strncpy(s->tx_file, file, sizeof(s->tx_file));
+    s->tx_file[sizeof(s->tx_file) - 1] = '\0';
+    s->tx_start_page = start_page;
+    s->tx_stop_page = stop_page;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_supported_modems(t30_state_t *s, int supported_modems)
+{
+    s->supported_modems = supported_modems;
+    build_dis_or_dtc(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_supported_compressions(t30_state_t *s, int supported_compressions)
+{
+    s->supported_compressions = supported_compressions;
+    build_dis_or_dtc(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions)
+{
+    s->supported_resolutions = supported_resolutions;
+    build_dis_or_dtc(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes)
+{
+    s->supported_image_sizes = supported_image_sizes;
+    build_dis_or_dtc(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_set_ecm_capability(t30_state_t *s, int enabled)
+{
+    s->ecm_allowed = enabled;
+    build_dis_or_dtc(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+void t30_local_interrupt_request(t30_state_t *s, int state)
+{
+    if (s->timer_t3 > 0)
+    {
+        /* Accept the far end's outstanding request for interrupt. */
+        /* TODO: */
+        send_simple_frame(s, (state)  ?  T30_PIP  :  T30_PIN);
+    }
+    s->local_interrupt_pending = state;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/t31.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1706 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t31.c - A T.31 compatible class 1 FAX modem interface.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Special thanks to Lee Howard <faxguy@howardsilvan.com>
+ * for his great work debugging and polishing this code.
+ *
+ * Copyright (C) 2004, 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t31.c,v 1.83 2006/11/30 15:41:47 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define _GNU_SOURCE
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <time.h>
+#include <memory.h>
+#include <string.h>
+#include <ctype.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <tiffio.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/queue.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/complex.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/silence_gen.h"
+#include "spandsp/fsk.h"
+#include "spandsp/v29rx.h"
+#include "spandsp/v29tx.h"
+#include "spandsp/v27ter_rx.h"
+#include "spandsp/v27ter_tx.h"
+#if defined(ENABLE_V17)
+#include "spandsp/v17rx.h"
+#include "spandsp/v17tx.h"
+#endif
+#include "spandsp/t4.h"
+#include "spandsp/t30.h"
+#include "spandsp/t38_core.h"
+
+#include "spandsp/at_interpreter.h"
+#include "spandsp/t31.h"
+
+#define MS_PER_TX_CHUNK             30
+#define INDICATOR_TX_COUNT          4
+#define DEFAULT_DTE_TIMEOUT         5
+
+typedef const char *(*at_cmd_service_t)(t31_state_t *s, const char *cmd);
+
+#define ETX 0x03
+#define DLE 0x10
+#define SUB 0x1A
+
+enum
+{
+    T31_FLUSH,
+    T31_SILENCE_TX,
+    T31_SILENCE_RX,
+    T31_CED_TONE,
+    T31_CNG_TONE,
+    T31_NOCNG_TONE,
+    T31_V21_TX,
+    T31_V17_TX,
+    T31_V27TER_TX,
+    T31_V29_TX,
+    T31_V21_RX,
+    T31_V17_RX,
+    T31_V27TER_RX,
+    T31_V29_RX
+};
+
+enum
+{
+    T38_TIMED_STEP_NONE = 0,
+    T38_TIMED_STEP_NON_ECM_MODEM,
+    T38_TIMED_STEP_NON_ECM_MODEM_2,
+    T38_TIMED_STEP_NON_ECM_MODEM_3,
+    T38_TIMED_STEP_HDLC_MODEM,
+    T38_TIMED_STEP_HDLC_MODEM_2,
+    T38_TIMED_STEP_HDLC_MODEM_3,
+    T38_TIMED_STEP_HDLC_MODEM_4,
+    T38_TIMED_STEP_PAUSE
+};
+
+static int restart_modem(t31_state_t *s, int new_modem);
+static void hdlc_accept(void *user_data, int ok, const uint8_t *msg, int len);
+#if defined(ENABLE_V17)
+static int early_v17_rx(void *user_data, const int16_t amp[], int len);
+#endif
+static int early_v27ter_rx(void *user_data, const int16_t amp[], int len);
+static int early_v29_rx(void *user_data, const int16_t amp[], int len);
+static int dummy_rx(void *s, const int16_t amp[], int len);
+static int silence_rx(void *user_data, const int16_t amp[], int len);
+static int cng_rx(void *user_data, const int16_t amp[], int len);
+
+static __inline__ void t31_set_at_rx_mode(t31_state_t *s, int new_mode)
+{
+    s->at_state.at_rx_mode = new_mode;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_rx_indicator(t38_core_state_t *s, void *user_data, int indicator)
+{
+    t31_state_t *t;
+    
+    t = (t31_state_t *) user_data;
+    switch (indicator)
+    {
+    case T38_IND_NO_SIGNAL:
+        break;
+    case T38_IND_CNG:
+        break;
+    case T38_IND_CED:
+        break;
+    case T38_IND_V21_PREAMBLE:
+        t->hdlc_rx_len = 0;
+        break;
+    case T38_IND_V27TER_2400_TRAINING:
+        break;
+    case T38_IND_V27TER_4800_TRAINING:
+        break;
+    case T38_IND_V29_7200_TRAINING:
+        break;
+    case T38_IND_V29_9600_TRAINING:
+        break;
+    case T38_IND_V17_7200_SHORT_TRAINING:
+        break;
+    case T38_IND_V17_7200_LONG_TRAINING:
+        break;
+    case T38_IND_V17_9600_SHORT_TRAINING:
+        break;
+    case T38_IND_V17_9600_LONG_TRAINING:
+        break;
+    case T38_IND_V17_12000_SHORT_TRAINING:
+        break;
+    case T38_IND_V17_12000_LONG_TRAINING:
+        break;
+    case T38_IND_V17_14400_SHORT_TRAINING:
+        break;
+    case T38_IND_V17_14400_LONG_TRAINING:
+        break;
+    case T38_IND_V8_ANSAM:
+        break;
+    case T38_IND_V8_SIGNAL:
+        break;
+    case T38_IND_V34_CNTL_CHANNEL_1200:
+        break;
+    case T38_IND_V34_PRI_CHANNEL:
+        break;
+    case T38_IND_V34_CC_RETRAIN:
+        break;
+    case T38_IND_V33_12000_TRAINING:
+        break;
+    case T38_IND_V33_14400_TRAINING:
+        break;
+    default:
+        break;
+    }
+    t->missing_data = FALSE;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_rx_data(t38_core_state_t *s, void *user_data, int data_type, int field_type, const uint8_t *buf, int len)
+{
+    t31_state_t *t;
+    int i;
+    
+    t = (t31_state_t *) user_data;
+    switch (data_type)
+    {
+    case T38_DATA_V21:
+    case T38_DATA_V27TER_2400:
+    case T38_DATA_V27TER_4800:
+    case T38_DATA_V29_7200:
+    case T38_DATA_V29_9600:
+    case T38_DATA_V17_7200:
+    case T38_DATA_V17_9600:
+    case T38_DATA_V17_12000:
+    case T38_DATA_V17_14400:
+    case T38_DATA_V8:
+    case T38_DATA_V34_PRI_RATE:
+    case T38_DATA_V34_CC_1200:
+    case T38_DATA_V34_PRI_CH:
+    case T38_DATA_V33_12000:
+    case T38_DATA_V33_14400:
+    default:
+        break;
+    }
+    switch (field_type)
+    {
+    case T38_FIELD_HDLC_DATA:
+        if (t->hdlc_rx_len + len <= 256 - 2)
+        {
+            for (i = 0;  i < len;  i++)
+                t->hdlc_rx_buf[t->hdlc_rx_len++] = bit_reverse8(buf[i]);
+        }
+        break;
+    case T38_FIELD_HDLC_FCS_OK:
+        if (len > 0)
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_OK!\n");
+        span_log(&t->logging, SPAN_LOG_FLOW, "Type %s - CRC OK (%s)\n", t30_frametype(t->tx_data[2]), (t->missing_data)  ?  "missing octets"  :  "clean");
+        /* Don't deal with zero length frames. Some T.38 implementations send multiple T38_FIELD_HDLC_FCS_OK
+           packets, when they have sent no data for the body of the frame. */
+        if (t->current_rx_type == T31_V21_RX  &&  t->tx_out_bytes > 0  &&  !t->missing_data)
+            hdlc_accept((void *) t, TRUE, t->hdlc_rx_buf, t->hdlc_rx_len);
+        t->hdlc_rx_len = 0;
+        t->missing_data = FALSE;
+        break;
+    case T38_FIELD_HDLC_FCS_BAD:
+        if (len > 0)
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_BAD!\n");
+        span_log(&t->logging, SPAN_LOG_FLOW, "Type %s - CRC bad (%s)\n", t30_frametype(t->tx_data[2]), (t->missing_data)  ?  "missing octets"  :  "clean");
+        t->hdlc_rx_len = 0;
+        t->missing_data = FALSE;
+        break;
+    case T38_FIELD_HDLC_FCS_OK_SIG_END:
+        if (len > 0)
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_OK_SIG_END!\n");
+        span_log(&t->logging, SPAN_LOG_FLOW, "Type %s - CRC OK, sig end (%s)\n", t30_frametype(t->tx_data[2]), (t->missing_data)  ?  "missing octets"  :  "clean");
+        if (t->current_rx_type == T31_V21_RX)
+        {
+            /* Don't deal with zero length frames. Some T.38 implementations send multiple T38_FIELD_HDLC_FCS_OK
+               packets, when they have sent no data for the body of the frame. */
+            if (t->tx_out_bytes > 0)
+                hdlc_accept((void *) t, TRUE, t->hdlc_rx_buf, t->hdlc_rx_len);
+            hdlc_accept((void *) t, TRUE, NULL, PUTBIT_CARRIER_DOWN);
+        }
+        t->tx_out_bytes = 0;
+        t->missing_data = FALSE;
+        t->hdlc_rx_len = 0;
+        t->missing_data = FALSE;
+        break;
+    case T38_FIELD_HDLC_FCS_BAD_SIG_END:
+        if (len > 0)
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_BAD_SIG_END!\n");
+        span_log(&t->logging, SPAN_LOG_FLOW, "Type %s - CRC bad, sig end (%s)\n", t30_frametype(t->tx_data[2]), (t->missing_data)  ?  "missing octets"  :  "clean");
+        if (t->current_rx_type == T31_V21_RX)
+            hdlc_accept((void *) t, TRUE, NULL, PUTBIT_CARRIER_DOWN);
+        t->hdlc_rx_len = 0;
+        t->missing_data = FALSE;
+        break;
+    case T38_FIELD_HDLC_SIG_END:
+        if (len > 0)
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_SIG_END!\n");
+        /* This message is expected under 2 circumstances. One is as an alternative to T38_FIELD_HDLC_FCS_OK_SIG_END - 
+           i.e. they send T38_FIELD_HDLC_FCS_OK, and then T38_FIELD_HDLC_SIG_END when the carrier actually drops.
+           The other is because the HDLC signal drops unexpectedly - i.e. not just after a final frame. */
+        if (t->current_rx_type == T31_V21_RX)
+            hdlc_accept((void *) t, TRUE, NULL, PUTBIT_CARRIER_DOWN);
+        t->hdlc_rx_len = 0;
+        t->missing_data = FALSE;
+        break;
+    case T38_FIELD_T4_NON_ECM_DATA:
+        break;
+    case T38_FIELD_T4_NON_ECM_SIG_END:
+        break;
+    case T38_FIELD_CM_MESSAGE:
+    case T38_FIELD_JM_MESSAGE:
+    case T38_FIELD_CI_MESSAGE:
+    case T38_FIELD_V34RATE:
+    default:
+        break;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_rx_missing(t38_core_state_t *s, void *user_data, int rx_seq_no, int expected_seq_no)
+{
+    t31_state_t *t;
+    
+    t = (t31_state_t *) user_data;
+    t->missing_data = TRUE;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t31_t38_send_timeout(t31_state_t *s, int samples)
+{
+    int len;
+    uint8_t buf[100];
+    /* Training times for all the modem options, with and without TEP */
+    static const int training_time[] =
+    {
+           0,      0,   /* T38_IND_NO_SIGNAL */
+           0,      0,   /* T38_IND_CNG */
+           0,      0,   /* T38_IND_CED */
+        1000,   1000,   /* T38_IND_V21_PREAMBLE */
+         943,   1158,   /* T38_IND_V27TER_2400_TRAINING */
+         708,    923,   /* T38_IND_V27TER_4800_TRAINING */
+         234,    454,   /* T38_IND_V29_7200_TRAINING */
+         234,    454,   /* T38_IND_V29_9600_TRAINING */
+         142,    367,   /* T38_IND_V17_7200_SHORT_TRAINING */
+        1393,   1618,   /* T38_IND_V17_7200_LONG_TRAINING */
+         142,    367,   /* T38_IND_V17_9600_SHORT_TRAINING */
+        1393,   1618,   /* T38_IND_V17_9600_LONG_TRAINING */
+         142,    367,   /* T38_IND_V17_12000_SHORT_TRAINING */
+        1393,   1618,   /* T38_IND_V17_12000_LONG_TRAINING */
+         142,    367,   /* T38_IND_V17_14400_SHORT_TRAINING */
+        1393,   1618,   /* T38_IND_V17_14400_LONG_TRAINING */
+           0,      0,   /* T38_IND_V8_ANSAM */
+           0,      0,   /* T38_IND_V8_SIGNAL */
+           0,      0,   /* T38_IND_V34_CNTL_CHANNEL_1200 */
+           0,      0,   /* T38_IND_V34_PRI_CHANNEL */
+           0,      0,   /* T38_IND_V34_CC_RETRAIN */
+           0,      0,   /* T38_IND_V33_12000_TRAINING */
+           0,      0,   /* T38_IND_V33_14400_TRAINING */
+    };
+
+    s->call_samples += samples;
+        
+    if (s->timed_step == T38_TIMED_STEP_NONE)
+        return 0;
+    if (s->call_samples < s->next_send_samples)
+        return 0;
+    len = 0;
+    switch (s->timed_step)
+    {
+    case T38_TIMED_STEP_NON_ECM_MODEM:
+        /* Create a 75ms silence */
+        t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+        s->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_2;
+        s->next_send_samples += ms_to_samples(75);
+        break;
+    case T38_TIMED_STEP_NON_ECM_MODEM_2:
+        /* Switch on a fast modem, and give the training time to complete */
+        t38_core_send_indicator(&s->t38, s->next_tx_indicator, INDICATOR_TX_COUNT);
+        s->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_3;
+        s->next_send_samples += ms_to_samples(training_time[s->next_tx_indicator << 1]);
+        break;
+    case T38_TIMED_STEP_NON_ECM_MODEM_3:
+        /* Send a chunk of non-ECM image data */
+        //if ((len = get_non_ecm_image_chunk(s, buf, s->octets_per_non_ecm_packet)))
+        //    t38_core_send_data(&s->t38, s->current_tx_data, T38_FIELD_T4_NON_ECM_DATA, buf, abs(len));
+        if (len > 0)
+        {
+            s->next_send_samples += ms_to_samples(MS_PER_TX_CHUNK);
+        }
+        else
+        {
+            t38_core_send_data(&s->t38, s->current_tx_data, T38_FIELD_T4_NON_ECM_SIG_END, NULL, 0);
+            t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+            s->timed_step = T38_TIMED_STEP_NONE;
+        }
+        break;
+    case T38_TIMED_STEP_HDLC_MODEM:
+        /* Send HDLC preambling */
+        t38_core_send_indicator(&s->t38, s->next_tx_indicator, INDICATOR_TX_COUNT);
+        s->next_send_samples += ms_to_samples(training_time[s->next_tx_indicator << 1]);
+        s->timed_step = T38_TIMED_STEP_HDLC_MODEM_2;
+        break;
+    case T38_TIMED_STEP_HDLC_MODEM_2:
+        /* Send HDLC octet */
+        buf[0] = bit_reverse8(s->hdlc_tx_buf[s->hdlc_tx_ptr++]);
+        t38_core_send_data(&s->t38, s->current_tx_data, T38_FIELD_HDLC_DATA, buf, 1);
+        if (s->hdlc_tx_ptr >= s->hdlc_tx_len)
+            s->timed_step = T38_TIMED_STEP_HDLC_MODEM_3;
+        s->next_send_samples += ms_to_samples(MS_PER_TX_CHUNK);
+        break;
+    case T38_TIMED_STEP_HDLC_MODEM_3:
+        /* End of HDLC frame */
+        s->hdlc_tx_ptr = 0;
+        if (s->hdlc_final)
+        {
+            s->hdlc_tx_len = 0;
+            t38_core_send_data(&s->t38, s->current_tx_data, T38_FIELD_HDLC_FCS_OK_SIG_END, NULL, 0);
+            s->timed_step = T38_TIMED_STEP_HDLC_MODEM_4;
+            at_put_response_code(&s->at_state, AT_RESPONSE_CODE_OK);
+            t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+            s->hdlc_final = FALSE;
+            restart_modem(s, T31_SILENCE_TX);
+        }
+        else
+        {
+            t38_core_send_data(&s->t38, s->current_tx_data, T38_FIELD_HDLC_FCS_OK, NULL, 0);
+            s->timed_step = T38_TIMED_STEP_HDLC_MODEM_2;
+            at_put_response_code(&s->at_state, AT_RESPONSE_CODE_CONNECT);
+        }
+        s->next_send_samples += ms_to_samples(MS_PER_TX_CHUNK);
+        break;
+    case T38_TIMED_STEP_HDLC_MODEM_4:
+        /* End of HDLC transmission */
+        /* We have already sent T38_FIELD_HDLC_FCS_OK_SIG_END. It seems some boxes may not like
+           us sending a T38_FIELD_HDLC_SIG_END at this point. Just say there is no signal. */
+        //t38_core_send_data(&s->t38, s->current_tx_data, T38_FIELD_HDLC_SIG_END, NULL, 0);
+        t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+        s->timed_step = T38_TIMED_STEP_NONE;
+        break;
+    case T38_TIMED_STEP_PAUSE:
+        /* End of timed pause */
+        s->timed_step = T38_TIMED_STEP_NONE;
+        break;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int t31_modem_control_handler(at_state_t *s, void *user_data, int op, const char *num)
+{
+    t31_state_t *t;
+    
+    t = (t31_state_t *) user_data;
+    switch (op)
+    {
+    case AT_MODEM_CONTROL_ANSWER:
+        t->call_samples = 0;
+        break;
+    case AT_MODEM_CONTROL_CALL:
+        t->call_samples = 0;
+        break;
+    case AT_MODEM_CONTROL_ONHOOK:
+        if (t->tx_holding)
+        {
+            t->tx_holding = FALSE;
+            /* Tell the application to release further data */
+            at_modem_control(&t->at_state, AT_MODEM_CONTROL_CTS, (void *) 1);
+        }
+        if (t->at_state.rx_signal_present)
+        {
+            t->at_state.rx_data[t->at_state.rx_data_bytes++] = DLE;
+            t->at_state.rx_data[t->at_state.rx_data_bytes++] = ETX;
+            t->at_state.at_tx_handler(&t->at_state, t->at_state.at_tx_user_data, t->at_state.rx_data, t->at_state.rx_data_bytes);
+            t->at_state.rx_data_bytes = 0;
+        }
+        restart_modem(t, T31_SILENCE_TX);
+        break;
+    case AT_MODEM_CONTROL_RESTART:
+        restart_modem(t, (int) (intptr_t) num);
+        return 0;
+    case AT_MODEM_CONTROL_DTE_TIMEOUT:
+        if (num)
+            t->dte_data_timeout = t->call_samples + ms_to_samples((intptr_t) num);
+        else
+            t->dte_data_timeout = 0;
+        return 0;
+    }
+    return t->modem_control_handler(t, t->modem_control_user_data, op, num);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void non_ecm_put_bit(void *user_data, int bit)
+{
+    t31_state_t *s;
+
+    s = (t31_state_t *) user_data;
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            s->at_state.rx_trained = FALSE;
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            /* The modem is now trained */
+            at_put_response_code(&s->at_state, AT_RESPONSE_CODE_CONNECT);
+            s->at_state.rx_signal_present = TRUE;
+            s->at_state.rx_trained = TRUE;
+            break;
+        case PUTBIT_CARRIER_UP:
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            if (s->at_state.rx_signal_present)
+            {
+                s->at_state.rx_data[s->at_state.rx_data_bytes++] = DLE;
+                s->at_state.rx_data[s->at_state.rx_data_bytes++] = ETX;
+                s->at_state.at_tx_handler(&s->at_state, s->at_state.at_tx_user_data, s->at_state.rx_data, s->at_state.rx_data_bytes);
+                s->at_state.rx_data_bytes = 0;
+                at_put_response_code(&s->at_state, AT_RESPONSE_CODE_NO_CARRIER);
+                t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+            }
+            s->at_state.rx_signal_present = FALSE;
+            s->at_state.rx_trained = FALSE;
+            break;
+        default:
+            if (s->at_state.p.result_code_format)
+                span_log(&s->logging, SPAN_LOG_FLOW, "Eh!\n");
+            break;
+        }
+        return;
+    }
+    s->current_byte = (s->current_byte >> 1) | (bit << 7);
+    if (++s->bit_no >= 8)
+    {
+        if (s->current_byte == DLE)
+            s->at_state.rx_data[s->at_state.rx_data_bytes++] = (uint8_t) s->current_byte;
+        s->at_state.rx_data[s->at_state.rx_data_bytes++] = (uint8_t) s->current_byte;
+        if (s->at_state.rx_data_bytes >= 250)
+        {
+            s->at_state.at_tx_handler(&s->at_state, s->at_state.at_tx_user_data, s->at_state.rx_data, s->at_state.rx_data_bytes);
+            s->at_state.rx_data_bytes = 0;
+        }
+        s->bit_no = 0;
+        s->current_byte = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int non_ecm_get_bit(void *user_data)
+{
+    t31_state_t *s;
+    int bit;
+    int fill;
+
+    s = (t31_state_t *) user_data;
+    if (s->bit_no <= 0)
+    {
+        if (s->tx_out_bytes != s->tx_in_bytes)
+        {
+            /* There is real data available to send */
+            s->current_byte = s->tx_data[s->tx_out_bytes];
+            s->tx_out_bytes = (s->tx_out_bytes + 1) & (T31_TX_BUF_LEN - 1);
+            if (s->tx_holding)
+            {
+                /* See if the buffer is approaching empty. It might be time to release flow control. */
+                fill = (s->tx_in_bytes - s->tx_out_bytes);
+                if (s->tx_in_bytes < s->tx_out_bytes)
+                    fill += (T31_TX_BUF_LEN + 1);
+                if (fill < T31_TX_BUF_LOW_TIDE)
+                {
+                    s->tx_holding = FALSE;
+                    /* Tell the application to release further data */
+                    at_modem_control(&s->at_state, AT_MODEM_CONTROL_CTS, (void *) 1);
+                }
+            }
+            s->tx_data_started = TRUE;
+        }
+        else
+        {
+            if (s->data_final)
+            {
+                s->data_final = FALSE;
+                /* This will put the modem into its shutdown sequence. When
+                   it has finally shut down, an OK response will be sent. */
+                return PUTBIT_END_OF_DATA;
+            }
+            /* Fill with 0xFF bytes at the start of transmission, or 0x00 if we are in
+               the middle of transmission. This follows T.31 and T.30 practice. */
+            s->current_byte = (s->tx_data_started)  ?  0x00  :  0xFF;
+        }
+        s->bit_no = 8;
+    }
+    s->bit_no--;
+    bit = s->current_byte & 1;
+    s->current_byte >>= 1;
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void hdlc_tx_underflow(void *user_data)
+{
+    t31_state_t *s;
+
+    s = (t31_state_t *) user_data;
+    if (s->hdlc_final)
+    {
+        s->hdlc_final = FALSE;
+        /* Schedule an orderly shutdown of the modem */
+        hdlc_tx_frame(&(s->hdlctx), NULL, 0);
+    }
+    else
+    {
+        at_put_response_code(&s->at_state, AT_RESPONSE_CODE_CONNECT);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void hdlc_accept(void *user_data, int ok, const uint8_t *msg, int len)
+{
+    uint8_t buf[256];
+    t31_state_t *s;
+    int i;
+
+    s = (t31_state_t *) user_data;
+    if (len < 0)
+    {
+        /* Special conditions */
+        switch (len)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            s->at_state.rx_trained = FALSE;
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            /* The modem is now trained */
+            s->at_state.rx_signal_present = TRUE;
+            s->at_state.rx_trained = TRUE;
+            break;
+        case PUTBIT_CARRIER_UP:
+            if (s->modem == T31_CNG_TONE  ||  s->modem == T31_NOCNG_TONE  ||  s->modem == T31_V21_RX)
+            {
+                s->at_state.rx_signal_present = TRUE;
+                s->rx_message_received = FALSE;
+            }
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            if (s->rx_message_received)
+            {
+                if (s->at_state.dte_is_waiting)
+                {
+                    if (s->at_state.ok_is_pending)
+                    {
+                        at_put_response_code(&s->at_state, AT_RESPONSE_CODE_OK);
+                        s->at_state.ok_is_pending = FALSE;
+                    }
+                    else
+                    {
+                        at_put_response_code(&s->at_state, AT_RESPONSE_CODE_NO_CARRIER);
+                        t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+                    }
+                    s->at_state.dte_is_waiting = FALSE;
+                }
+                else
+                {
+                    buf[0] = AT_RESPONSE_CODE_NO_CARRIER;
+                    queue_write_msg(&(s->rx_queue), buf, 1);
+                }
+            }
+            s->at_state.rx_signal_present = FALSE;
+            s->at_state.rx_trained = FALSE;
+            break;
+        case PUTBIT_FRAMING_OK:
+            if (s->modem == T31_CNG_TONE  ||  s->modem == T31_NOCNG_TONE)
+            {
+                /* Once we get any valid HDLC the CNG tone stops, and we drop
+                   to the V.21 receive modem on its own. */
+                s->modem = T31_V21_RX;
+                s->at_state.transmit = FALSE;
+            }
+            if (s->modem != T31_V21_RX)
+            {
+                /* V.21 has been detected while expecting a different carrier.
+                   If +FAR=0 then result +FCERROR and return to command-mode.
+                   If +FAR=1 then report +FRH:3 and CONNECT, switching to
+                   V.21 receive mode. */
+                if (s->at_state.p.adaptive_receive)
+                {
+                    s->at_state.rx_signal_present = TRUE;
+                    s->rx_message_received = TRUE;
+                    s->modem = T31_V21_RX;
+                    s->at_state.transmit = FALSE;
+                    s->at_state.dte_is_waiting = TRUE;
+                    at_put_response_code(&s->at_state, AT_RESPONSE_CODE_FRH3);
+                    at_put_response_code(&s->at_state, AT_RESPONSE_CODE_CONNECT);
+                }
+                else
+                {
+                    s->modem = T31_SILENCE_TX;
+                    t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+                    s->rx_message_received = FALSE;
+                    at_put_response_code(&s->at_state, AT_RESPONSE_CODE_FCERROR);
+                }
+            }
+            else
+            {
+                if (!s->rx_message_received)
+                {
+                    /* Report CONNECT as soon as possible to avoid a timeout. */
+                    at_put_response_code(&s->at_state, AT_RESPONSE_CODE_CONNECT);
+                    s->rx_message_received = TRUE;
+                }
+            }
+            break;
+        case PUTBIT_ABORT:
+            /* Just ignore these */
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_WARNING, "Unexpected HDLC special length - %d!\n", len);
+            break;
+        }
+        return;
+    }
+    /* If OK is pending then we just ignore whatever comes in */
+    if (!s->at_state.ok_is_pending)
+    {
+        if (s->at_state.dte_is_waiting)
+        {
+            /* Send straight away */
+            /* It is safe to look at the two bytes beyond the length of the message,
+               and expect to find the FCS there. */
+            for (i = 0;  i < len + 2;  i++)
+            {
+                if (msg[i] == DLE)
+                    s->at_state.rx_data[s->at_state.rx_data_bytes++] = DLE;
+                s->at_state.rx_data[s->at_state.rx_data_bytes++] = msg[i];
+            }
+            s->at_state.rx_data[s->at_state.rx_data_bytes++] = DLE;
+            s->at_state.rx_data[s->at_state.rx_data_bytes++] = ETX;
+            s->at_state.at_tx_handler(&s->at_state, s->at_state.at_tx_user_data, s->at_state.rx_data, s->at_state.rx_data_bytes);
+            s->at_state.rx_data_bytes = 0;
+            if (msg[1] == 0x13  &&  ok)
+            {
+                /* This is the last frame.  We don't send OK until the carrier drops to avoid
+                   redetecting it later. */
+                s->at_state.ok_is_pending = TRUE;
+            }
+            else
+            {
+                at_put_response_code(&s->at_state, (ok)  ?  AT_RESPONSE_CODE_OK  :  AT_RESPONSE_CODE_ERROR);
+                s->at_state.dte_is_waiting = FALSE;
+                s->rx_message_received = FALSE;
+            }
+        }
+        else
+        {
+            /* Queue it */
+            buf[0] = (ok)  ?  AT_RESPONSE_CODE_OK  :  AT_RESPONSE_CODE_ERROR;
+            /* It is safe to look at the two bytes beyond the length of the message,
+               and expect to find the FCS there. */
+            memcpy(buf + 1, msg, len + 2);
+            queue_write_msg(&(s->rx_queue), buf, len + 3);
+        }
+    }
+    t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void t31_v21_rx(t31_state_t *s)
+{
+    hdlc_rx_init(&(s->hdlcrx), FALSE, TRUE, 5, hdlc_accept, s);
+    s->at_state.ok_is_pending = FALSE;
+    s->hdlc_final = FALSE;
+    s->hdlc_tx_len = 0;
+    s->dled = FALSE;
+    fsk_rx_init(&(s->v21rx), &preset_fsk_specs[FSK_V21CH2], TRUE, (put_bit_func_t) hdlc_rx_put_bit, &(s->hdlcrx));
+    s->at_state.transmit = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int restart_modem(t31_state_t *s, int new_modem)
+{
+    tone_gen_descriptor_t tone_desc;
+    int ind;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Restart modem %d\n", new_modem);
+    if (s->modem == new_modem)
+        return 0;
+    queue_flush(&(s->rx_queue));
+    s->modem = new_modem;
+    s->data_final = FALSE;
+    s->at_state.rx_signal_present = FALSE;
+    s->at_state.rx_trained = FALSE;
+    s->rx_message_received = FALSE;
+    s->rx_handler = (span_rx_handler_t *) &dummy_rx;
+    s->rx_user_data = NULL;
+    switch (s->modem)
+    {
+    case T31_CNG_TONE:
+        if (s->t38_mode)
+        {
+            t38_core_send_indicator(&s->t38, T38_IND_CNG, INDICATOR_TX_COUNT);
+        }
+        else
+        {
+            /* CNG is special, since we need to receive V.21 HDLC messages while sending the
+               tone. Everything else in FAX processing sends only one way at a time. */
+            /* 0.5s of 1100Hz + 3.0s of silence repeating */
+            make_tone_gen_descriptor(&tone_desc,
+                                     1100,
+                                     -11,
+                                     0,
+                                     0,
+                                     500,
+                                     3000,
+                                     0,
+                                     0,
+                                     TRUE);
+            tone_gen_init(&(s->tone_gen), &tone_desc);
+            /* Do V.21/HDLC receive in parallel. The other end may send its
+               first message at any time. The CNG tone will continue until
+               we get a valid preamble. */
+            s->rx_handler = (span_rx_handler_t *) &cng_rx;
+            s->rx_user_data = s;
+            t31_v21_rx(s);
+            s->tx_handler = (span_tx_handler_t *) &tone_gen;
+            s->tx_user_data = &(s->tone_gen);
+            s->next_tx_handler = NULL;
+        }
+        s->at_state.transmit = TRUE;
+        break;
+    case T31_NOCNG_TONE:
+        if (s->t38_mode)
+        {
+        }
+        else
+        {
+            s->rx_handler = (span_rx_handler_t *) &cng_rx;
+            s->rx_user_data = s;
+            t31_v21_rx(s);
+            silence_gen_set(&(s->silence_gen), 0);
+            s->tx_handler = (span_tx_handler_t *) &silence_gen;
+            s->tx_user_data = &(s->silence_gen);
+        }
+        s->at_state.transmit = FALSE;
+        break;
+    case T31_CED_TONE:
+        if (s->t38_mode)
+        {
+            t38_core_send_indicator(&s->t38, T38_IND_CED, INDICATOR_TX_COUNT);
+        }
+        else
+        {
+            silence_gen_alter(&(s->silence_gen), ms_to_samples(200));
+            make_tone_gen_descriptor(&tone_desc,
+                                     2100,
+                                     -11,
+                                     0,
+                                     0,
+                                     2600,
+                                     75,
+                                     0,
+                                     0,
+                                     FALSE);
+            tone_gen_init(&(s->tone_gen), &tone_desc);
+            s->tx_handler = (span_tx_handler_t *) &silence_gen;
+            s->tx_user_data = &(s->silence_gen);
+            s->next_tx_handler = (span_tx_handler_t *) &tone_gen;
+            s->next_tx_user_data = &(s->tone_gen);
+        }
+        s->at_state.transmit = TRUE;
+        break;
+    case T31_V21_TX:
+        if (s->t38_mode)
+        {
+            t38_core_send_indicator(&s->t38, T38_IND_V21_PREAMBLE, INDICATOR_TX_COUNT);
+        }
+        else
+        {
+            hdlc_tx_init(&(s->hdlctx), FALSE, 2, FALSE, hdlc_tx_underflow, s);
+            /* The spec says 1s +-15% of preamble. So, the minimum is 32 octets. */
+            hdlc_tx_preamble(&(s->hdlctx), 32);
+            fsk_tx_init(&(s->v21tx), &preset_fsk_specs[FSK_V21CH2], (get_bit_func_t) hdlc_tx_get_bit, &(s->hdlctx));
+            s->tx_handler = (span_tx_handler_t *) &fsk_tx;
+            s->tx_user_data = &(s->v21tx);
+            s->next_tx_handler = NULL;
+        }
+        s->hdlc_final = FALSE;
+        s->hdlc_tx_len = 0;
+        s->dled = FALSE;
+        s->at_state.transmit = TRUE;
+        break;
+    case T31_V21_RX:
+        if (s->t38_mode)
+        {
+        }
+        else
+        {
+            s->rx_handler = (span_rx_handler_t *) &fsk_rx;
+            s->rx_user_data = &(s->v21rx);
+            t31_v21_rx(s);
+        }
+        break;
+#if defined(ENABLE_V17)
+    case T31_V17_TX:
+        if (s->t38_mode)
+        {
+            switch (s->bit_rate)
+            {
+            case 7200:
+                ind = (s->short_train)  ?  T38_IND_V17_7200_SHORT_TRAINING  :  T38_IND_V17_7200_LONG_TRAINING;
+                break;
+            case 9600:
+                ind = (s->short_train)  ?  T38_IND_V17_9600_SHORT_TRAINING  :  T38_IND_V17_9600_LONG_TRAINING;
+                break;
+            case 12000:
+                ind = (s->short_train)  ?  T38_IND_V17_12000_SHORT_TRAINING  :  T38_IND_V17_12000_LONG_TRAINING;
+                break;
+            case 14400:
+            default:
+                ind = (s->short_train)  ?  T38_IND_V17_14400_SHORT_TRAINING  :  T38_IND_V17_14400_LONG_TRAINING;
+                break;
+            }
+            t38_core_send_indicator(&s->t38, ind, INDICATOR_TX_COUNT);
+        }
+        else
+        {
+            v17_tx_restart(&(s->v17tx), s->bit_rate, FALSE, s->short_train);
+            s->tx_handler = (span_tx_handler_t *) &v17_tx;
+            s->tx_user_data = &(s->v17tx);
+            s->next_tx_handler = NULL;
+        }
+        s->tx_out_bytes = 0;
+        s->tx_data_started = FALSE;
+        s->at_state.transmit = TRUE;
+        break;
+    case T31_V17_RX:
+        if (!s->t38_mode)
+        {
+            s->rx_handler = (span_rx_handler_t *) &early_v17_rx;
+            s->rx_user_data = s;
+            v17_rx_restart(&(s->v17rx), s->bit_rate, s->short_train);
+            /* Allow for +FCERROR/+FRH:3 */
+            t31_v21_rx(s);
+        }
+        s->at_state.transmit = FALSE;
+        break;
+#endif
+    case T31_V27TER_TX:
+        if (s->t38_mode)
+        {
+            switch (s->bit_rate)
+            {
+            case 2400:
+                ind = T38_IND_V27TER_2400_TRAINING;
+                break;
+            case 4800:
+            default:
+                ind = T38_IND_V27TER_4800_TRAINING;
+                break;
+            }
+            t38_core_send_indicator(&s->t38, ind, INDICATOR_TX_COUNT);
+        }
+        else
+        {
+            v27ter_tx_restart(&(s->v27ter_tx), s->bit_rate, FALSE);
+            s->tx_handler = (span_tx_handler_t *) &v27ter_tx;
+            s->tx_user_data = &(s->v27ter_tx);
+            s->next_tx_handler = NULL;
+        }
+        s->tx_out_bytes = 0;
+        s->tx_data_started = FALSE;
+        s->at_state.transmit = TRUE;
+        break;
+    case T31_V27TER_RX:
+        if (!s->t38_mode)
+        {
+            s->rx_handler = (span_rx_handler_t *) &early_v27ter_rx;
+            s->rx_user_data = s;
+            v27ter_rx_restart(&(s->v27ter_rx), s->bit_rate, FALSE);
+            /* Allow for +FCERROR/+FRH:3 */
+            t31_v21_rx(s);
+        }
+        s->at_state.transmit = FALSE;
+        break;
+    case T31_V29_TX:
+        if (s->t38_mode)
+        {
+            switch (s->bit_rate)
+            {
+            case 7200:
+                ind = T38_IND_V29_7200_TRAINING;
+                break;
+            case 9600:
+            default:
+                ind = T38_IND_V29_9600_TRAINING;
+                break;
+            }
+            t38_core_send_indicator(&s->t38, ind, INDICATOR_TX_COUNT);
+        }
+        else
+        {
+            v29_tx_restart(&(s->v29tx), s->bit_rate, FALSE);
+            s->tx_handler = (span_tx_handler_t *) &v29_tx;
+            s->tx_user_data = &(s->v29tx);
+            s->next_tx_handler = NULL;
+        }
+        s->tx_out_bytes = 0;
+        s->tx_data_started = FALSE;
+        s->at_state.transmit = TRUE;
+        break;
+    case T31_V29_RX:
+        if (!s->t38_mode)
+        {
+            s->rx_handler = (span_rx_handler_t *) &early_v29_rx;
+            s->rx_user_data = s;
+            v29_rx_restart(&(s->v29rx), s->bit_rate, FALSE);
+            /* Allow for +FCERROR/+FRH:3 */
+            t31_v21_rx(s);
+        }
+        s->at_state.transmit = FALSE;
+        break;
+    case T31_SILENCE_TX:
+        if (s->t38_mode)
+        {
+            t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+        }
+        else
+        {
+            silence_gen_set(&(s->silence_gen), 0);
+            s->tx_handler = (span_tx_handler_t *) &silence_gen;
+            s->tx_user_data = &(s->silence_gen);
+            s->next_tx_handler = NULL;
+        }
+        s->at_state.transmit = FALSE;
+        break;
+    case T31_SILENCE_RX:
+        if (!s->t38_mode)
+        {
+            s->rx_handler = (span_rx_handler_t *) &silence_rx;
+            s->rx_user_data = s;
+
+            silence_gen_set(&(s->silence_gen), 0);
+            s->tx_handler = (span_tx_handler_t *) &silence_gen;
+            s->tx_user_data = &(s->silence_gen);
+            s->next_tx_handler = NULL;
+        }
+        s->at_state.transmit = FALSE;
+        break;
+    case T31_FLUSH:
+        /* Send 200ms of silence to "push" the last audio out */
+        if (s->t38_mode)
+        {
+            t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+        }
+        else
+        {
+            s->modem = T31_SILENCE_TX;
+            silence_gen_alter(&(s->silence_gen), ms_to_samples(200));
+            s->tx_handler = (span_tx_handler_t *) &silence_gen;
+            s->tx_user_data = &(s->silence_gen);
+            s->next_tx_handler = NULL;
+            s->at_state.transmit = TRUE;
+        }
+        break;
+    }
+    s->bit_no = 0;
+    s->current_byte = 0xFF;
+    s->tx_in_bytes = 0;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void dle_unstuff_hdlc(t31_state_t *s, const char *stuffed, int len)
+{
+    int i;
+
+    for (i = 0;  i < len;  i++)
+    {
+        if (s->dled)
+        {
+            s->dled = FALSE;
+            if (stuffed[i] == ETX)
+            {
+                if (s->t38_mode)
+                {
+                }
+                else
+                {
+                    hdlc_tx_frame(&(s->hdlctx), s->hdlc_tx_buf, s->hdlc_tx_len);
+                }
+                s->hdlc_final = (s->hdlc_tx_buf[1] & 0x10);
+                s->hdlc_tx_len = 0;
+            }
+            else if (stuffed[i] == SUB)
+            {
+                s->hdlc_tx_buf[s->hdlc_tx_len++] = DLE;
+                s->hdlc_tx_buf[s->hdlc_tx_len++] = DLE;
+            }
+            else
+            {
+                s->hdlc_tx_buf[s->hdlc_tx_len++] = stuffed[i];
+            }
+        }
+        else
+        {
+            if (stuffed[i] == DLE)
+                s->dled = TRUE;
+            else
+                s->hdlc_tx_buf[s->hdlc_tx_len++] = stuffed[i];
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void dle_unstuff(t31_state_t *s, const char *stuffed, int len)
+{
+    int i;
+    int fill;
+    int next;
+    
+    for (i = 0;  i < len;  i++)
+    {
+        if (s->dled)
+        {
+            s->dled = FALSE;
+            if (stuffed[i] == ETX)
+            {
+                s->data_final = TRUE;
+                t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+                return;
+            }
+        }
+        else if (stuffed[i] == DLE)
+        {
+            s->dled = TRUE;
+            continue;
+        }
+        s->tx_data[s->tx_in_bytes] = stuffed[i];
+        next = (s->tx_in_bytes + 1) & (T31_TX_BUF_LEN - 1);
+        if (next == s->tx_out_bytes)
+        {
+            /* Oops. We hit the end of the buffer. Give up. Loose stuff. :-( */
+            return;
+        }
+        s->tx_in_bytes = next;
+    }
+    if (!s->tx_holding)
+    {
+        /* See if the buffer is approaching full. We might need to apply flow control. */
+        fill = (s->tx_in_bytes - s->tx_out_bytes);
+        if (s->tx_in_bytes < s->tx_out_bytes)
+            fill += (T31_TX_BUF_LEN + 1);
+        if (fill > T31_TX_BUF_HIGH_TIDE)
+        {
+            s->tx_holding = TRUE;
+            /* Tell the application to hold further data */
+            at_modem_control(&s->at_state, AT_MODEM_CONTROL_CTS, (void *) 0);
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_class1_cmd(at_state_t *t, void *user_data, int direction, int operation, int val)
+{
+    int new_modem;
+    int new_transmit;
+    int i;
+    int len;
+    int immediate_response;
+    t31_state_t *s;
+    uint8_t msg[256];
+
+    s = (t31_state_t *) user_data;
+    new_transmit = direction;
+    immediate_response = TRUE;
+    switch (operation)
+    {
+    case 'S':
+        s->at_state.transmit = new_transmit;
+        if (new_transmit)
+        {
+            /* Send a specified period of silence, to space transmissions. */
+            restart_modem(s, T31_SILENCE_TX);
+            silence_gen_alter(&(s->silence_gen), val*80);
+            s->at_state.transmit = TRUE;
+        }
+        else
+        {
+            /* Wait until we have received a specified period of silence. */
+            queue_flush(&(s->rx_queue));
+            s->silence_awaited = val*80;
+            t31_set_at_rx_mode(s, AT_MODE_DELIVERY);
+            restart_modem(s, T31_SILENCE_RX);
+        }
+        immediate_response = FALSE;
+        span_log(&s->logging, SPAN_LOG_FLOW, "Silence %dms\n", val*10);
+        break;
+    case 'H':
+        switch (val)
+        {
+        case 3:
+            new_modem = (new_transmit)  ?  T31_V21_TX  :  T31_V21_RX;
+            s->short_train = FALSE;
+            s->bit_rate = 300;
+            break;
+        default:
+            return -1;
+        }
+        span_log(&s->logging, SPAN_LOG_FLOW, "HDLC\n");
+        if (new_modem != s->modem)
+        {
+            restart_modem(s, new_modem);
+            immediate_response = FALSE;
+        }
+        s->at_state.transmit = new_transmit;
+        if (new_transmit)
+        {
+            t31_set_at_rx_mode(s, AT_MODE_HDLC);
+            at_put_response_code(&s->at_state, AT_RESPONSE_CODE_CONNECT);
+        }
+        else
+        {
+            /* Send straight away, if there is something queued. */
+            t31_set_at_rx_mode(s, AT_MODE_DELIVERY);
+            s->rx_message_received = FALSE;
+            do
+            {
+                if (!queue_empty(&(s->rx_queue)))
+                {
+                    len = queue_read_msg(&(s->rx_queue), msg, 256);
+                    if (len > 1)
+                    {
+                        if (msg[0] == AT_RESPONSE_CODE_OK)
+                            at_put_response_code(&s->at_state, AT_RESPONSE_CODE_CONNECT);
+                        for (i = 1;  i < len;  i++)
+                        {
+                            if (msg[i] == DLE)
+                                s->at_state.rx_data[s->at_state.rx_data_bytes++] = DLE;
+                            s->at_state.rx_data[s->at_state.rx_data_bytes++] = msg[i];
+                        }
+                        s->at_state.rx_data[s->at_state.rx_data_bytes++] = DLE;
+                        s->at_state.rx_data[s->at_state.rx_data_bytes++] = ETX;
+                        s->at_state.at_tx_handler(&s->at_state, s->at_state.at_tx_user_data, s->at_state.rx_data, s->at_state.rx_data_bytes);
+                        s->at_state.rx_data_bytes = 0;
+                    }
+                    at_put_response_code(&s->at_state, msg[0]);
+                }
+                else
+                {
+                    s->at_state.dte_is_waiting = TRUE;
+                    break;
+                }
+            }
+            while (msg[0] == AT_RESPONSE_CODE_CONNECT);
+        }
+        immediate_response = FALSE;
+        break;
+    default:
+        switch (val)
+        {
+        case 24:
+            new_modem = (new_transmit)  ?  T31_V27TER_TX  :  T31_V27TER_RX;
+            s->short_train = FALSE;
+            s->bit_rate = 2400;
+            break;
+        case 48:
+            new_modem = (new_transmit)  ?  T31_V27TER_TX  :  T31_V27TER_RX;
+            s->short_train = FALSE;
+            s->bit_rate = 4800;
+            break;
+        case 72:
+            new_modem = (new_transmit)  ?  T31_V29_TX  :  T31_V29_RX;
+            s->short_train = FALSE;
+            s->bit_rate = 7200;
+            break;
+        case 96:
+            new_modem = (new_transmit)  ?  T31_V29_TX  :  T31_V29_RX;
+            s->short_train = FALSE;
+            s->bit_rate = 9600;
+            break;
+#if defined(ENABLE_V17)
+        case 73:
+            new_modem = (new_transmit)  ?  T31_V17_TX  :  T31_V17_RX;
+            s->short_train = FALSE;
+            s->bit_rate = 7200;
+            break;
+        case 74:
+            new_modem = (new_transmit)  ?  T31_V17_TX  :  T31_V17_RX;
+            s->short_train = TRUE;
+            s->bit_rate = 7200;
+            break;
+        case 97:
+            new_modem = (new_transmit)  ?  T31_V17_TX  :  T31_V17_RX;
+            s->short_train = FALSE;
+            s->bit_rate = 9600;
+            break;
+        case 98:
+            new_modem = (new_transmit)  ?  T31_V17_TX  :  T31_V17_RX;
+            s->short_train = TRUE;
+            s->bit_rate = 9600;
+            break;
+        case 121:
+            new_modem = (new_transmit)  ?  T31_V17_TX  :  T31_V17_RX;
+            s->short_train = FALSE;
+            s->bit_rate = 12000;
+            break;
+        case 122:
+            new_modem = (new_transmit)  ?  T31_V17_TX  :  T31_V17_RX;
+            s->short_train = TRUE;
+            s->bit_rate = 12000;
+            break;
+        case 145:
+            new_modem = (new_transmit)  ?  T31_V17_TX  :  T31_V17_RX;
+            s->short_train = FALSE;
+            s->bit_rate = 14400;
+            break;
+        case 146:
+            new_modem = (new_transmit)  ?  T31_V17_TX  :  T31_V17_RX;
+            s->short_train = TRUE;
+            s->bit_rate = 14400;
+            break;
+#endif
+        default:
+            return -1;
+        }
+        span_log(&s->logging, SPAN_LOG_FLOW, "Short training = %d, bit rate = %d\n", s->short_train, s->bit_rate);
+        if (new_transmit)
+        {
+            t31_set_at_rx_mode(s, AT_MODE_STUFFED);
+            at_put_response_code(&s->at_state, AT_RESPONSE_CODE_CONNECT);
+        }
+        else
+        {
+            t31_set_at_rx_mode(s, AT_MODE_DELIVERY);
+        }
+        restart_modem(s, new_modem);
+        immediate_response = FALSE;
+        break;
+    }
+    return immediate_response;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t31_call_event(t31_state_t *s, int event)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "Call event %d received\n", event);
+    at_call_event(&s->at_state, event);
+}
+/*- End of function --------------------------------------------------------*/
+
+int t31_at_rx(t31_state_t *s, const char *t, int len)
+{
+    if (s->dte_data_timeout)
+        s->dte_data_timeout = s->call_samples + ms_to_samples(5000);
+    switch (s->at_state.at_rx_mode)
+    {
+    case AT_MODE_ONHOOK_COMMAND:
+    case AT_MODE_OFFHOOK_COMMAND:
+        at_interpreter(&s->at_state, t, len);
+        break;
+    case AT_MODE_DELIVERY:
+        /* Data from the DTE in this state returns us to command mode */
+        if (len)
+        {
+            s->at_state.rx_data_bytes = 0;
+            s->at_state.transmit = FALSE;
+            s->modem = T31_SILENCE_TX;
+            t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+            at_put_response_code(&s->at_state, AT_RESPONSE_CODE_OK);
+        }
+        break;
+    case AT_MODE_HDLC:
+        dle_unstuff_hdlc(s, t, len);
+        break;
+    case AT_MODE_STUFFED:
+        dle_unstuff(s, t, len);
+        break;
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int dummy_rx(void *user_data, const int16_t amp[], int len)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int silence_rx(void *user_data, const int16_t amp[], int len)
+{
+    t31_state_t *s;
+
+    /* Searching for a specified minimum period of silence. */
+    s = (t31_state_t *) user_data;
+    if (s->silence_awaited  &&  s->silence_heard >= s->silence_awaited)
+    {
+        at_put_response_code(&s->at_state, AT_RESPONSE_CODE_OK);
+        t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+        s->silence_heard = 0;
+        s->silence_awaited = 0;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int cng_rx(void *user_data, const int16_t amp[], int len)
+{
+    t31_state_t *s;
+
+    s = (t31_state_t *) user_data;
+    if (s->call_samples > ms_to_samples(s->at_state.p.s_regs[7]*1000))
+    {
+        /* After calling, S7 has elapsed... no carrier found. */
+        at_put_response_code(&s->at_state, AT_RESPONSE_CODE_NO_CARRIER);
+        restart_modem(s, T31_SILENCE_TX);
+        at_modem_control(&s->at_state, AT_MODEM_CONTROL_HANGUP, NULL);
+        t31_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+    }
+    else
+    {
+        fsk_rx(&(s->v21rx), amp, len);
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(ENABLE_V17)
+static int early_v17_rx(void *user_data, const int16_t amp[], int len)
+{
+    t31_state_t *s;
+
+    s = (t31_state_t *) user_data;
+    v17_rx(&(s->v17rx), amp, len);
+    if (s->at_state.rx_trained)
+    {
+        /* The fast modem has trained, so we no longer need to run the slow
+           one in parallel. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.17 + V.21 to V.17 (%.2fdBm0)\n", v17_rx_signal_power(&(s->v17rx)));
+        s->rx_handler = (span_rx_handler_t *) &v17_rx;
+        s->rx_user_data = &(s->v17rx);
+    }
+    else
+    {
+        fsk_rx(&(s->v21rx), amp, len);
+        if (s->rx_message_received)
+        {
+            /* We have received something, and the fast modem has not trained. We must
+               be receiving valid V.21 */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.17 + V.21 to V.21\n");
+            s->rx_handler = (span_rx_handler_t *) &fsk_rx;
+            s->rx_user_data = &(s->v21rx);
+        }
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static int early_v27ter_rx(void *user_data, const int16_t amp[], int len)
+{
+    t31_state_t *s;
+
+    s = (t31_state_t *) user_data;
+    v27ter_rx(&(s->v27ter_rx), amp, len);
+    if (s->at_state.rx_trained)
+    {
+        /* The fast modem has trained, so we no longer need to run the slow
+           one in parallel. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.27ter + V.21 to V.27ter (%.2fdBm0)\n", v27ter_rx_signal_power(&(s->v27ter_rx)));
+        s->rx_handler = (span_rx_handler_t *) &v27ter_rx;
+        s->rx_user_data = &(s->v27ter_rx);
+    }
+    else
+    {
+        fsk_rx(&(s->v21rx), amp, len);
+        if (s->rx_message_received)
+        {
+            /* We have received something, and the fast modem has not trained. We must
+               be receiving valid V.21 */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.27ter + V.21 to V.21\n");
+            s->rx_handler = (span_rx_handler_t *) &fsk_rx;
+            s->rx_user_data = &(s->v21rx);
+        }
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int early_v29_rx(void *user_data, const int16_t amp[], int len)
+{
+    t31_state_t *s;
+
+    s = (t31_state_t *) user_data;
+    v29_rx(&(s->v29rx), amp, len);
+    if (s->at_state.rx_trained)
+    {
+        /* The fast modem has trained, so we no longer need to run the slow
+           one in parallel. */
+        span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.29 + V.21 to V.29 (%.2fdBm0)\n", v29_rx_signal_power(&(s->v29rx)));
+        s->rx_handler = (span_rx_handler_t *) &v29_rx;
+        s->rx_user_data = &(s->v29rx);
+    }
+    else
+    {
+        fsk_rx(&(s->v21rx), amp, len);
+        if (s->rx_message_received)
+        {
+            /* We have received something, and the fast modem has not trained. We must
+               be receiving valid V.21 */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Switching from V.29 + V.21 to V.21\n");
+            s->rx_handler = (span_rx_handler_t *) &fsk_rx;
+            s->rx_user_data = &(s->v21rx);
+        }
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t31_rx(t31_state_t *s, int16_t amp[], int len)
+{
+    int i;
+    int32_t power;
+
+    /* Monitor for received silence.  Maximum needed detection is AT+FRS=255 (255*10ms). */
+    /* We could probably only run this loop if (s->modem == T31_SILENCE_RX), however,
+       the spec says "when silence has been present on the line for the amount of
+       time specified".  That means some of the silence may have occurred before
+       the AT+FRS=n command. This condition, however, is not likely to ever be the
+       case.  (AT+FRS=n will usually be issued before the remote goes silent.) */
+    for (i = 0;  i < len;  i++)
+    {
+        /* Clean up any DC influence. */
+        power = power_meter_update(&(s->rx_power), amp[i] - s->last_sample);
+        s->last_sample = amp[i];
+        if (power > s->silence_threshold_power)
+        {
+            s->silence_heard = 0;
+        }
+        else
+        {        
+            if (s->silence_heard <= ms_to_samples(255*10))
+                s->silence_heard++;
+        }
+    }
+
+    /* Time is determined by counting the samples in audio packets coming in. */
+    s->call_samples += len;
+
+    /* In HDLC transmit mode, if 5 seconds elapse without data from the DTE
+       we must treat this as an error. We return the result ERROR, and change
+       to command-mode. */
+    if (s->dte_data_timeout  &&  s->call_samples > s->dte_data_timeout)
+    {
+        t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+        at_put_response_code(&s->at_state, AT_RESPONSE_CODE_ERROR);
+        restart_modem(s, T31_SILENCE_TX);
+    }
+
+    if (!s->at_state.transmit  ||  s->modem == T31_CNG_TONE)
+        s->rx_handler(s->rx_user_data, amp, len);
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int set_next_tx_type(t31_state_t *s)
+{
+    if (s->next_tx_handler)
+    {
+        s->tx_handler = s->next_tx_handler;
+        s->tx_user_data = s->next_tx_user_data;
+        s->next_tx_handler = NULL;
+        return 0;
+    }
+    /* If there is nothing else to change to, so use zero length silence */
+    silence_gen_alter(&(s->silence_gen), 0);
+    s->tx_handler = (span_tx_handler_t *) &silence_gen;
+    s->tx_user_data = &(s->silence_gen);
+    s->next_tx_handler = NULL;
+    return -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t31_tx(t31_state_t *s, int16_t amp[], int max_len)
+{
+    int len;
+
+    len = 0;
+    if (s->at_state.transmit)
+    {
+        if ((len = s->tx_handler(s->tx_user_data, amp, max_len)) < max_len)
+        {
+            /* Allow for one change of tx handler within a block */
+            set_next_tx_type(s);
+            if ((len += s->tx_handler(s->tx_user_data, amp + len, max_len - len)) < max_len)
+            {
+                switch (s->modem)
+                {
+                case T31_SILENCE_TX:
+                    s->modem = -1;
+                    at_put_response_code(&s->at_state, AT_RESPONSE_CODE_OK);
+                    if (s->at_state.do_hangup)
+                    {
+                        at_modem_control(&s->at_state, AT_MODEM_CONTROL_HANGUP, NULL);
+                        t31_set_at_rx_mode(s, AT_MODE_ONHOOK_COMMAND);
+                        s->at_state.do_hangup = FALSE;
+                    }
+                    else
+                    {
+                        t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+                    }
+                    break;
+                case T31_CED_TONE:
+                    /* Go directly to V.21/HDLC transmit. */
+                    s->modem = -1;
+                    restart_modem(s, T31_V21_TX);
+                    t31_set_at_rx_mode(s, AT_MODE_HDLC);
+                    break;
+                case T31_V21_TX:
+#if defined(ENABLE_V17)
+                case T31_V17_TX:
+#endif
+                case T31_V27TER_TX:
+                case T31_V29_TX:
+                    s->modem = -1;
+                    at_put_response_code(&s->at_state, AT_RESPONSE_CODE_OK);
+                    t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
+                    restart_modem(s, T31_SILENCE_TX);
+                    break;
+                }
+            }
+        }
+    }
+    if (s->transmit_on_idle)
+    {
+        /* Pad to the requested length with silence */
+        memset(amp, 0, max_len*sizeof(int16_t));
+        len = max_len;        
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t31_set_transmit_on_idle(t31_state_t *s, int transmit_on_idle)
+{
+    s->transmit_on_idle = transmit_on_idle;
+}
+/*- End of function --------------------------------------------------------*/
+
+t31_state_t *t31_init(t31_state_t *s,
+                      at_tx_handler_t *at_tx_handler,
+                      void *at_tx_user_data,
+                      t31_modem_control_handler_t *modem_control_handler,
+                      void *modem_control_user_data,
+                      t38_tx_packet_handler_t *tx_t38_packet_handler,
+                      void *tx_t38_packet_user_data)
+{
+    if (at_tx_handler == NULL  ||  modem_control_handler == NULL)
+        return NULL;
+
+    memset(s, 0, sizeof(*s));
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "T.31");
+
+    s->modem_control_handler = modem_control_handler;
+    s->modem_control_user_data = modem_control_user_data;
+#if defined(ENABLE_V17)
+    v17_rx_init(&(s->v17rx), 14400, non_ecm_put_bit, s);
+    v17_tx_init(&(s->v17tx), 14400, FALSE, non_ecm_get_bit, s);
+#endif
+    v29_rx_init(&(s->v29rx), 9600, non_ecm_put_bit, s);
+    v29_rx_signal_cutoff(&(s->v29rx), -45.5);
+    v29_tx_init(&(s->v29tx), 9600, FALSE, non_ecm_get_bit, s);
+    v27ter_rx_init(&(s->v27ter_rx), 4800, non_ecm_put_bit, s);
+    v27ter_tx_init(&(s->v27ter_tx), 4800, FALSE, non_ecm_get_bit, s);
+    silence_gen_init(&(s->silence_gen), 0);
+    power_meter_init(&(s->rx_power), 4);
+    s->last_sample = 0;
+    s->silence_threshold_power = power_meter_level_dbm0(-43);
+    s->at_state.rx_signal_present = FALSE;
+    s->at_state.rx_trained = FALSE;
+
+    s->at_state.do_hangup = FALSE;
+    s->at_state.line_ptr = 0;
+    s->silence_heard = 0;
+    s->silence_awaited = 0;
+    s->call_samples = 0;
+    s->modem = -1;
+    s->at_state.transmit = TRUE;
+    s->rx_handler = dummy_rx;
+    s->rx_user_data = NULL;
+    s->tx_handler = (span_tx_handler_t *) &silence_gen;
+    s->tx_user_data = &(s->silence_gen);
+
+    if (queue_create(&(s->rx_queue), 4096, QUEUE_WRITE_ATOMIC | QUEUE_READ_ATOMIC) < 0)
+        return NULL;
+    at_init(&s->at_state, at_tx_handler, at_tx_user_data, t31_modem_control_handler, s);
+    at_set_class1_handler(&s->at_state, process_class1_cmd, s);
+    s->at_state.dte_inactivity_timeout = DEFAULT_DTE_TIMEOUT;
+    if (tx_t38_packet_handler)
+    {
+        t38_core_init(&s->t38, process_rx_indicator, process_rx_data, process_rx_missing, (void *) s);
+        s->t38.tx_packet_handler = tx_t38_packet_handler;
+        s->t38.tx_packet_user_data = tx_t38_packet_user_data;
+    }
+    s->t38_mode = FALSE;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t31_release(t31_state_t *s)
+{
+    at_reset_call_info(&s->at_state);
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/t35.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,834 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t35.c - ITU T.35 FAX non-standard facility processing.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t35.c,v 1.20 2006/11/15 14:57:16 steveu Exp $
+ */
+
+/*
+ * The NSF data tables are adapted from the NSF handling in HylaFAX, which
+ * carries the following copyright notice:
+ *
+ * Created by Dmitry Bely, April 2000
+ * Copyright (c) 1994-1996 Sam Leffler
+ * Copyright (c) 1994-1996 Silicon Graphics, Inc.
+ * HylaFAX is a trademark of Silicon Graphics
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and 
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
+ * 
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+ * OF THIS SOFTWARE.
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/t35.h"
+
+typedef struct
+{
+    int model_id_size;
+    const char *model_id;
+    const char *model_name;
+} model_data_t;
+
+typedef struct
+{
+    const char *vendor_id;
+    int vendor_id_len;
+    const char *vendor_name;
+    int inverse_station_id_order;
+    const model_data_t *known_models;
+} nsf_data_t;
+
+const char *t35_country_codes[256] =
+{
+    "Japan",                                    /* 0x00 */
+    "Albania",
+    "Algeria",
+    "American Samoa",
+    "Germany",
+    "Anguilla",
+    "Antigua and Barbuda",
+    "Argentina",
+    "Ascension (see S. Helena)",
+    "Australia",
+    "Austria",
+    "Bahamas",
+    "Bahrain",
+    "Bangladesh",
+    "Barbados",
+    "Belgium",
+    "Belize",
+    "Benin (Republic of)",
+    "Bermudas",
+    "Bhutan (Kingdom of)",
+    "Bolivia",
+    "Botswana",
+    "Brazil",
+    "British Antarctic Territory",
+    "British Indian Ocean Territory",
+    "British Virgin Islands",
+    "Brunei Darussalam",
+    "Bulgaria",
+    "Myanmar (Union of)",
+    "Burundi",
+    "Byelorussia",
+    "Cameroon",
+    "Canada",                                   /* 0x20 */
+    "Cape Verde",
+    "Cayman Islands",
+    "Central African Republic",
+    "Chad",
+    "Chile",
+    "China",
+    "Colombia",
+    "Comoros",
+    "Congo",
+    "Cook Islands",
+    "Costa Rica",
+    "Cuba",
+    "Cyprus",
+    "Czech and Slovak Federal Republic",
+    "Cambodia",
+    "Democratic People's Republic of Korea",
+    "Denmark",
+    "Djibouti",
+    "Dominican Republic",
+    "Dominica",
+    "Ecuador",
+    "Egypt",
+    "El Salvador",
+    "Equatorial Guinea",
+    "Ethiopia",
+    "Falkland Islands",
+    "Fiji",
+    "Finland",
+    "France",
+    "French Polynesia",
+    "French Southern and Antarctic Lands",
+    "Gabon",                                        /* 0x40 */
+    "Gambia",
+    "Germany (Federal Republic of)",
+    "Angola",
+    "Ghana",
+    "Gibraltar",
+    "Greece",
+    "Grenada",
+    "Guam",
+    "Guatemala",
+    "Guernsey",
+    "Guinea",
+    "Guinea-Bissau",
+    "Guayana",
+    "Haiti",
+    "Honduras",
+    "Hong Kong",
+    "Hungary (Republic of)",
+    "Iceland",
+    "India",
+    "Indonesia",
+    "Iran (Islamic Republic of)",
+    "Iraq",
+    "Ireland",
+    "Israel",
+    "Italy",
+    "Cote d'Ivoire",
+    "Jamaica",
+    "Afghanistan",
+    "Jersey",
+    "Jordan",
+    "Kenya",
+    "Kiribati",                                     /* 0x60 */
+    "Korea (Republic of)",
+    "Kuwait",
+    "Lao (People's Democratic Republic)",
+    "Lebanon",
+    "Lesotho",
+    "Liberia",
+    "Libya",
+    "Liechtenstein",
+    "Luxembourg",
+    "Macau",
+    "Madagascar",
+    "Malaysia",
+    "Malawi",
+    "Maldives",
+    "Mali",
+    "Malta",
+    "Mauritania",
+    "Mauritius",
+    "Mexico",
+    "Monaco",
+    "Mongolia",
+    "Montserrat",
+    "Morocco",
+    "Mozambique",
+    "Nauru",
+    "Nepal",
+    "Netherlands",
+    "Netherlands Antilles",
+    "New Caledonia",
+    "New Zealand",
+    "Nicaragua",
+    "Niger",                                        /* 0x80 */
+    "Nigeria",
+    "Norway",
+    "Oman",
+    "Pakistan",
+    "Panama",
+    "Papua New Guinea",
+    "Paraguay",
+    "Peru",
+    "Philippines",
+    "Poland (Republic of)",
+    "Portugal",
+    "Puerto Rico",
+    "Qatar",
+    "Romania",
+    "Rwanda",
+    "Saint Kitts and Nevis",
+    "Saint Croix",
+    "Saint Helena and Ascension",
+    "Saint Lucia",
+    "San Marino",
+    "Saint Thomas",
+    "Sao Tome and Principe",
+    "Saint Vincent and the Grenadines",
+    "Saudi Arabia",
+    "Senegal",
+    "Seychelles",
+    "Sierra Leone",
+    "Singapore",
+    "Solomon Islands",
+    "Somalia",
+    "South Africa",
+    "Spain",                                        /* 0xA0 */
+    "Sri Lanka",
+    "Sudan",
+    "Suriname",
+    "Swaziland",
+    "Sweden",
+    "Switzerland",
+    "Syria",
+    "Tanzania",
+    "Thailand",
+    "Togo",
+    "Tonga",
+    "Trinidad and Tobago",
+    "Tunisia",
+    "Turkey",
+    "Turks and Caicos Islands",
+    "Tuvalu",
+    "Uganda",
+    "Ukraine",
+    "United Arab Emirates",
+    "United Kingdom",
+    "United States",
+    "Burkina Faso",
+    "Uruguay",
+    "U.S.S.R.",
+    "Vanuatu",
+    "Vatican City State",
+    "Venezuela",
+    "Viet Nam",
+    "Wallis and Futuna",
+    "Western Samoa",
+    "Yemen (Republic of)",
+    "Yemen (Republic of)",                          /* 0xC0 */
+    "Yugoslavia",
+    "Zaire",
+    "Zambia",
+    "Zimbabwe"
+};
+
+static const model_data_t Canon[] =
+{
+    {5, "\x80\x00\x80\x48\x00", "Faxphone B640"},
+    {5, "\x80\x00\x80\x49\x10", "Fax B100"},
+    {5, "\x80\x00\x8A\x49\x10", "Laser Class 9000 Series"},
+    {0, NULL, NULL}
+};  
+
+static const model_data_t Brother[] =
+{
+    {9, "\x55\x55\x00\x88\x90\x80\x5F\x00\x15\x51", "Intellifax 770"},
+    {9, "\x55\x55\x00\x80\xB0\x80\x00\x00\x59\xD4", "Personal fax 190"},
+    {9, "\x55\x55\x00\x8C\x90\x80\xF0\x02\x20", "MFC-8600"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Panasonic0E[] =
+{
+    {10, "\x00\x00\x00\x96\x0F\x01\x02\x00\x10\x05\x02\x95\xC8\x08\x01\x49\x02\x41\x53\x54\x47", "KX-F90"},
+    {10, "\x00\x00\x00\x96\x0F\x01\x03\x00\x10\x05\x02\x95\xC8\x08\x01\x49\x02                \x03", "KX-F230 or KX-FT21 or ..."},
+    {10, "\x00\x00\x00\x16\x0F\x01\x03\x00\x10\x05\x02\x95\xC8\x08", "KX-F780"},
+    {10, "\x00\x00\x00\x16\x0F\x01\x03\x00\x10\x00\x02\x95\x80\x08\x75\xB5", "KX-M260"},
+    {10, "\x00\x00\x00\x16\x0F\x01\x02\x00\x10\x05\x02\x85\xC8\x08\xAD", "KX-F2050BS"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Panasonic79[] =
+{
+    {10, "\x00\x00\x00\x02\x0F\x09\x12\x00\x10\x05\x02\x95\xC8\x88\x80\x80\x01", "UF-S10"},
+    {10, "\x00\x00\x00\x16\x7F\x09\x13\x00\x10\x05\x16\x8D\xC0\xD0\xF8\x80\x01", "/Siemens Fax 940"},
+    {10, "\x00\x00\x00\x16\x0F\x09\x13\x00\x10\x05\x06\x8D\xC0\x50\xCB", "Panafax UF-321"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Ricoh[] =
+{
+    {10, "\x00\x00\x00\x12\x10\x0D\x02\x00\x50\x00\x2A\xB8\x2C", "/Nashuatec P394"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Samsung16[] =
+{
+    {4, "\x00\x00\xA4\x01", "M545 6800"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Samsung8C[] =
+{
+    {4, "\x00\x00\x01\x00", "SF-2010"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t SamsungA2[] =
+{
+    {4, "\x00\x00\x80\x00", "FX-4000"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Sanyo[] =
+{
+    {10, "\x00\x00\x10\xB1\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x41\x26\xFF\xFF\x00\x00\x85\xA1", "SFX-107"},
+    {10, "\x00\x00\x00\xB1\x12\xF2\x62\xB4\x82\x0A\xF2\x2A\x12\xD2\xA2\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x41\x4E\xFF\xFF\x00\x00", "MFP-510"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t HP[] =
+{
+    {5, "\x20\x00\x45\x00\x0C\x04\x70\xCD\x4F\x00\x7F\x49", "LaserJet 3150"},
+    {5, "\x40\x80\x84\x01\xF0\x6A", "OfficeJet"},
+    {5, "\xC0\x00\x00\x00\x00", "OfficeJet 500"},
+    {5, "\xC0\x00\x00\x00\x00\x8B", "Fax-920"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Sharp[] =
+{
+    {32, "\x00\xCE\xB8\x80\x80\x11\x85\x0D\xDD\x00\x00\xDD\xDD\x00\x00\xDD\xDD\x00\x00\x00\x00\x00\x00\x00\x00\xED\x22\xB0\x00\x00\x90\x00", "Sharp F0-10"},
+    {33, "\x00\xCE\xB8\x80\x80\x11\x85\x0D\xDD\x00\x00\xDD\xDD\x00\x00\xDD\xDD\x00\x00\x00\x00\x00\x00\x00\x00\xED\x22\xB0\x00\x00\x90\x00\x8C", "Sharp UX-460"},
+    {33, "\x00\x4E\xB8\x80\x80\x11\x84\x0D\xDD\x00\x00\xDD\xDD\x00\x00\xDD\xDD\x00\x00\x00\x00\x00\x00\x00\x00\xED\x22\xB0\x00\x00\x90\x00\xAD", "Sharp UX-177"},
+    {33, "\x00\xCE\xB8\x00\x84\x0D\xDD\x00\x00\xDD\xDD\x00\x00\xDD\xDD\xDD\xDD\xDD\x02\x05\x28\x02\x22\x43\x29\xED\x23\x90\x00\x00\x90\x01\x00", "Sharp FO-4810"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Xerox[] =
+{
+    {10, "\x00\x08\x2D\x43\x57\x50\x61\x75\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x1A\x02\x02\x10\x01\x82\x01\x30\x34", "635 Workcenter"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t XeroxDA[] =
+{
+    {4, "\x00\x00\xC0\x00", "Workcentre Pro 580"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Lexmark[] =
+{
+    {4, "\x00\x80\xA0\x00", "X4270"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t JetFax[] =
+{
+    {6, "\x01\x00\x45\x00\x0D\x7F", "M910e"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t PitneyBowes[] = 
+{
+    {6, "\x79\x91\xB1\xB8\x7A\xD8", "9550"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Dialogic[] = 
+{
+    {8, "\x56\x8B\x06\x55\x00\x15\x00\x00", "VFX/40ESC"},
+    {0, NULL, NULL}
+};
+
+static const model_data_t Muratec45[] =
+{
+    {10, "\xF4\x91\xFF\xFF\xFF\x42\x2A\xBC\x01\x57", "M4700"},
+    {0, NULL, NULL}
+};
+
+/* Muratec uses unregistered Japan code "00 00 48" */
+static const model_data_t Muratec48[] =
+{
+    {3, "\x53\x53\x61", "M620"},
+    {0, NULL, NULL}
+};
+
+/*
+ * Country code first byte, then manufacturer is last two bytes. See T.35.
+ * Apparently Germany issued some manufacturer codes before the two-byte
+ * standard was accepted, and so some few German manufacturers are
+ * identified by a single manufacturer byte.
+ *
+ * T.30 5.3.6.2.7 (2003) states that the NSF FIF is transmitted
+ * in MSB2LSB order.  Revisions of T.30 prior to 2003 did not 
+ * contain explicit specification as to the transmit bit order.
+ * (Although it did otherwise state that all HDLC frame data should
+ * be in MSB order except as noted.)  Because CSI, TSI, and other
+ * prologue frames were in LSB order by way of an exception to the
+ * general rule (T.30 5.3.6.2.4-11) many manufacturers assumed that
+ * NSF should also be in LSB order.  Consequently there will be
+ * some country-code "masquerading" as a terminal may use the
+ * proper country-code, but with an inverted bit order.
+ *
+ * Thus, country code x61 (Korea) turns into x86 (Papua New Guinea),
+ * code xB5 (USA) turns into xAD (Tunisia), code x26 (China) turns
+ * into x64 (Lebanon), code x04 (Germany) turns into x20 (Canada), 
+ * and code x3D (France) turns into xBC (Vietnam).
+ *
+ * For the most part it should be safe to identify a manufacturer
+ * both with the MSB and LSB ordered bits, as the "masqueraded" country
+ * is likely to not be actively assigning T.38 manufacturer codes.
+ * However, some manufacturers (e.g. Microsoft) may use MSB for the
+ * country code and LSB for the rest of the NSF, and so basically this
+ * table must be verified and corrected against actual real-world
+ * results.
+ */
+static const nsf_data_t known_nsf[] =
+{
+    /* Japan */
+    {"\x00\x00\x00", 3, "unknown - indeterminate", TRUE, NULL},
+    {"\x00\x00\x01", 3, "Anjitsu", FALSE, NULL},
+    {"\x00\x00\x02", 3, "Nippon Telephone", FALSE, NULL},
+    {"\x00\x00\x05", 3, "Mitsuba Electric", FALSE, NULL},
+    {"\x00\x00\x06", 3, "Master Net", FALSE, NULL},
+    {"\x00\x00\x09", 3, "Xerox/Toshiba", TRUE, Xerox},
+    {"\x00\x00\x0A", 3, "Kokusai", FALSE, NULL},
+    {"\x00\x00\x0D", 3, "Logic System International", FALSE, NULL},
+    {"\x00\x00\x0E", 3, "Panasonic", FALSE, Panasonic0E},
+    {"\x00\x00\x11", 3, "Canon", FALSE, Canon},
+    {"\x00\x00\x15", 3, "Toyotsushen Machinery", FALSE, NULL},
+    {"\x00\x00\x16", 3, "System House Mind", FALSE, NULL},
+    {"\x00\x00\x19", 3, "Xerox", TRUE, NULL},
+    {"\x00\x00\x1D", 3, "Hitachi Software", FALSE, NULL},
+    {"\x00\x00\x21", 3, "Oki Electric/Lanier", TRUE, NULL},
+    {"\x00\x00\x25", 3, "Ricoh", TRUE, Ricoh},
+    {"\x00\x00\x26", 3, "Konica", FALSE, NULL},
+    {"\x00\x00\x29", 3, "Japan Wireless", FALSE, NULL},
+    {"\x00\x00\x2D", 3, "Sony", FALSE, NULL},
+    {"\x00\x00\x31", 3, "Sharp/Olivetti", FALSE, Sharp},
+    {"\x00\x00\x35", 3, "Kogyu", FALSE, NULL},
+    {"\x00\x00\x36", 3, "Japan Telecom", FALSE, NULL},
+    {"\x00\x00\x3D", 3, "IBM Japan", FALSE, NULL},
+    {"\x00\x00\x39", 3, "Panasonic", FALSE, NULL},
+    {"\x00\x00\x41", 3, "Swasaki Communication", FALSE, NULL},
+    {"\x00\x00\x45", 3, "Muratec", FALSE, Muratec45},
+    {"\x00\x00\x46", 3, "Pheonix", FALSE, NULL},
+    {"\x00\x00\x48", 3, "Muratec", FALSE, Muratec48},	// not registered
+    {"\x00\x00\x49", 3, "Japan Electric", FALSE, NULL},
+    {"\x00\x00\x4D", 3, "Okura Electric", FALSE, NULL},
+    {"\x00\x00\x51", 3, "Sanyo", FALSE, Sanyo},
+    {"\x00\x00\x55", 3, "unknown - Japan 55", FALSE, NULL},
+    {"\x00\x00\x56", 3, "Brother", FALSE, Brother},
+    {"\x00\x00\x59", 3, "Fujitsu", FALSE, NULL},
+    {"\x00\x00\x5D", 3, "Kuoni", FALSE, NULL},
+    {"\x00\x00\x61", 3, "Casio", FALSE, NULL},
+    {"\x00\x00\x65", 3, "Tateishi Electric", FALSE, NULL},
+    {"\x00\x00\x66", 3, "Utax/Mita", TRUE, NULL},
+    {"\x00\x00\x69", 3, "Hitachi Production", FALSE, NULL},
+    {"\x00\x00\x6D", 3, "Hitachi Telecom", FALSE, NULL},
+    {"\x00\x00\x71", 3, "Tamura Electric Works", FALSE, NULL},
+    {"\x00\x00\x75", 3, "Tokyo Electric Corp.", FALSE, NULL},
+    {"\x00\x00\x76", 3, "Advance", FALSE, NULL},
+    {"\x00\x00\x79", 3, "Panasonic", FALSE, Panasonic79},
+    {"\x00\x00\x7D", 3, "Seiko", FALSE, NULL},
+    {"\x00\x08\x00", 3, "Daiko", FALSE, NULL},
+    {"\x00\x10\x00", 3, "Funai Electric", FALSE, NULL},
+    {"\x00\x20\x00", 3, "Eagle System", FALSE, NULL},
+    {"\x00\x30\x00", 3, "Nippon Business Systems", FALSE, NULL},
+    {"\x00\x40\x00", 3, "Comtron", FALSE, NULL},
+    {"\x00\x48\x00", 3, "Cosmo Consulting", FALSE, NULL},
+    {"\x00\x50\x00", 3, "Orion Electric", FALSE, NULL},
+    {"\x00\x60\x00", 3, "Nagano Nippon", FALSE, NULL},
+    {"\x00\x70\x00", 3, "Kyocera", FALSE, NULL},
+    {"\x00\x80\x00", 3, "Kanda Networks", FALSE, NULL},
+    {"\x00\x88\x00", 3, "Soft Front", FALSE, NULL},
+    {"\x00\x90\x00", 3, "Arctic", FALSE, NULL},
+    {"\x00\xA0\x00", 3, "Nakushima", FALSE, NULL},
+    {"\x00\xB0\x00", 3, "Minolta", FALSE, NULL},
+    {"\x00\xC0\x00", 3, "Tohoku Pioneer", FALSE, NULL},
+    {"\x00\xD0\x00", 3, "USC", FALSE, NULL},
+    {"\x00\xE0\x00", 3, "Hiboshi", FALSE, NULL},
+    {"\x00\xF0\x00", 3, "Sumitomo Electric", FALSE, NULL},
+
+    /* Germany */
+    {"\x20\x09",     2, "ITK Institut für Telekommunikation GmbH & Co KG", FALSE, NULL},
+    {"\x20\x11",     2, "Dr. Neuhaus Mikroelektronik", FALSE, NULL},
+    {"\x20\x21",     2, "ITO Communication", FALSE, NULL},
+    {"\x20\x31",     2, "mbp Kommunikationssysteme GmbH", FALSE, NULL},
+    {"\x20\x41",     2, "Siemens", FALSE, NULL},
+    {"\x20\x42",     2, "Deutsche Telekom AG", FALSE, NULL},
+    {"\x20\x51",     2, "mps Software", FALSE, NULL},
+    {"\x20\x61",     2, "Hauni Elektronik", FALSE, NULL},
+    {"\x20\x71",     2, "Digitronic computersysteme gmbh", FALSE, NULL},
+    {"\x20\x81\x00", 3, "Innovaphone GmbH", FALSE, NULL},
+    {"\x20\x81\x40", 3, "TEDAS Gesellschaft für Telekommunikations-, Daten- und Audiosysteme mbH", FALSE, NULL},
+    {"\x20\x81\x80", 3, "AVM Audiovisuelles Marketing und Computersysteme GmbH", FALSE, NULL},
+    {"\x20\x81\xC0", 3, "EICON Technology Research GmbH", FALSE, NULL},
+    {"\x20\xB1",     2, "Schneider Rundfunkwerke AG", FALSE, NULL},
+    {"\x20\xC2",     2, "Deutsche Telekom AG", FALSE, NULL},
+    {"\x20\xD1",     2, "Ferrari electronik GmbH", FALSE, NULL},
+    {"\x20\xF1",     2, "DeTeWe - Deutsche Telephonwerke AG & Co", FALSE, NULL},
+    {"\x20\xFF",     2, "Germany Regional Code", FALSE, NULL},
+
+    /* China */
+    {"\x64\x00\x00", 3, "unknown - China 00 00", FALSE, NULL},
+    {"\x64\x01\x00", 3, "unknown - China 01 00", FALSE, NULL},
+    {"\x64\x01\x01", 3, "unknown - China 01 01", FALSE, NULL},
+    {"\x64\x01\x02", 3, "unknown - China 01 02", FALSE, NULL},
+
+    /* France */
+    {"\xBC\x53\x01", 3, "Minolta", FALSE, NULL},
+
+    /* Korea */
+    {"\x86\x00\x02", 3, "unknown - Korea 02", FALSE, NULL},
+    {"\x86\x00\x06", 3, "unknown - Korea 06", FALSE, NULL},
+    {"\x86\x00\x08", 3, "unknown - Korea 08", FALSE, NULL},
+    {"\x86\x00\x0A", 3, "unknown - Korea 0A", FALSE, NULL},
+    {"\x86\x00\x0E", 3, "unknown - Korea 0E", FALSE, NULL},
+    {"\x86\x00\x10", 3, "Samsung", FALSE, NULL},
+    {"\x86\x00\x11", 3, "unknown - Korea 11", FALSE, NULL},
+    {"\x86\x00\x16", 3, "Samsung", FALSE, Samsung16},
+    {"\x86\x00\x1A", 3, "unknown - Korea 1A", FALSE, NULL},
+    {"\x86\x00\x40", 3, "unknown - Korea 40", FALSE, NULL},
+    {"\x86\x00\x48", 3, "unknown - Korea 48", FALSE, NULL},
+    {"\x86\x00\x52", 3, "unknown - Korea 52", FALSE, NULL},
+    {"\x86\x00\x5A", 3, "unknown - Korea 5A", FALSE, NULL},
+    {"\x86\x00\x5E", 3, "unknown - Korea 5E", FALSE, NULL},
+    {"\x86\x00\x66", 3, "unknown - Korea 66", FALSE, NULL},
+    {"\x86\x00\x6E", 3, "unknown - Korea 6E", FALSE, NULL},
+    {"\x86\x00\x82", 3, "unknown - Korea 82", FALSE, NULL},
+    {"\x86\x00\x88", 3, "unknown - Korea 88", FALSE, NULL},
+    {"\x86\x00\x8A", 3, "unknown - Korea 8A", FALSE, NULL},
+    {"\x86\x00\x8C", 3, "Samsung", FALSE, Samsung8C},
+    {"\x86\x00\x92", 3, "unknown - Korea 92", FALSE, NULL},
+    {"\x86\x00\x98", 3, "Samsung", FALSE, NULL},
+    {"\x86\x00\xA2", 3, "Samsung", FALSE, SamsungA2},
+    {"\x86\x00\xA4", 3, "unknown - Korea A4", FALSE, NULL},
+    {"\x86\x00\xC9", 3, "unknown - Korea C9", FALSE, NULL},
+    {"\x86\x00\xCC", 3, "unknown - Korea CC", FALSE, NULL},
+    {"\x86\x00\xD2", 3, "unknown - Korea D2", FALSE, NULL},
+    {"\x86\x00\xDA", 3, "Xerox", FALSE, XeroxDA},
+    {"\x86\x00\xE2", 3, "unknown - Korea E2", FALSE, NULL},
+    {"\x86\x00\xEC", 3, "unknown - Korea EC", FALSE, NULL},
+    {"\x86\x00\xEE", 3, "unknown - Korea EE", FALSE, NULL},
+
+    /* United Kingdom */
+    {"\xB4\x00\xB0", 3, "DCE", FALSE, NULL},
+    {"\xB4\x00\xB1", 3, "Hasler", FALSE, NULL},
+    {"\xB4\x00\xB2", 3, "Interquad", FALSE, NULL},
+    {"\xB4\x00\xB3", 3, "Comwave", FALSE, NULL},
+    {"\xB4\x00\xB4", 3, "Iconographic", FALSE, NULL},
+    {"\xB4\x00\xB5", 3, "Wordcraft", FALSE, NULL},
+    {"\xB4\x00\xB6", 3, "Acorn", FALSE, NULL},
+
+    /* United States */
+    {"\xAD\x00\x00", 3, "Pitney Bowes", FALSE, PitneyBowes},
+    {"\xAD\x00\x0C", 3, "Dialogic", FALSE, NULL},
+    {"\xAD\x00\x15", 3, "Lexmark", FALSE, Lexmark},
+    {"\xAD\x00\x16", 3, "JetFax", FALSE, JetFax},
+    {"\xAD\x00\x24", 3, "Octel", FALSE, NULL},
+    {"\xAD\x00\x36", 3, "HP", FALSE, HP},
+    {"\xAD\x00\x42", 3, "FaxTalk", FALSE, NULL},
+    {"\xAD\x00\x44", 3, NULL, TRUE, NULL},
+    {"\xAD\x00\x46", 3, "BrookTrout", FALSE, NULL},
+    {"\xAD\x00\x51", 3, "Telogy Networks", FALSE, NULL},
+    {"\xAD\x00\x55", 3, "HylaFAX", FALSE, NULL},
+    {"\xAD\x00\x5C", 3, "IBM", FALSE, NULL},
+    {"\xAD\x00\x98", 3, "unknown - USA 98", TRUE, NULL},
+    {"\xB5\x00\x01", 3, "Picturetel", FALSE, NULL},
+    {"\xB5\x00\x20", 3, "Conexant", FALSE, NULL},
+    {"\xB5\x00\x22", 3, "Comsat", FALSE, NULL},
+    {"\xB5\x00\x24", 3, "Octel", FALSE, NULL},
+    {"\xB5\x00\x26", 3, "ROLM", FALSE, NULL},
+    {"\xB5\x00\x28", 3, "SOFNET", FALSE, NULL},
+    {"\xB5\x00\x29", 3, "TIA TR-29 Committee", FALSE, NULL},
+    {"\xB5\x00\x2A", 3, "STF Tech", FALSE, NULL},
+    {"\xB5\x00\x2C", 3, "HKB", FALSE, NULL},
+    {"\xB5\x00\x2E", 3, "Delrina", FALSE, NULL},
+    {"\xB5\x00\x30", 3, "Dialogic", FALSE, NULL},
+    {"\xB5\x00\x32", 3, "Applied Synergy", FALSE, NULL},
+    {"\xB5\x00\x34", 3, "Syncro Development", FALSE, NULL},
+    {"\xB5\x00\x36", 3, "Genoa", FALSE, NULL},
+    {"\xB5\x00\x38", 3, "Texas Instruments", FALSE, NULL},
+    {"\xB5\x00\x3A", 3, "IBM", FALSE, NULL},
+    {"\xB5\x00\x3C", 3, "ViaSat", FALSE, NULL},
+    {"\xB5\x00\x3E", 3, "Ericsson", FALSE, NULL},
+    {"\xB5\x00\x42", 3, "Bogosian", FALSE, NULL},
+    {"\xB5\x00\x44", 3, "Adobe", FALSE, NULL},
+    {"\xB5\x00\x46", 3, "Fremont Communications", FALSE, NULL},
+    {"\xB5\x00\x48", 3, "Hayes", FALSE, NULL},
+    {"\xB5\x00\x4A", 3, "Lucent", FALSE, NULL},
+    {"\xB5\x00\x4C", 3, "Data Race", FALSE, NULL},
+    {"\xB5\x00\x4E", 3, "TRW", FALSE, NULL},
+    {"\xB5\x00\x52", 3, "Audiofax", FALSE, NULL},
+    {"\xB5\x00\x54", 3, "Computer Automation", FALSE, NULL},
+    {"\xB5\x00\x56", 3, "Serca", FALSE, NULL},
+    {"\xB5\x00\x58", 3, "Octocom", FALSE, NULL},
+    {"\xB5\x00\x5C", 3, "Power Solutions", FALSE, NULL},
+    {"\xB5\x00\x5A", 3, "Digital Sound", FALSE, NULL},
+    {"\xB5\x00\x5E", 3, "Pacific Data", FALSE, NULL},
+    {"\xB5\x00\x60", 3, "Commetrex", FALSE, NULL},
+    {"\xB5\x00\x62", 3, "BrookTrout", FALSE, NULL},
+    {"\xB5\x00\x64", 3, "Gammalink", FALSE, NULL},
+    {"\xB5\x00\x66", 3, "Castelle", FALSE, NULL},
+    {"\xB5\x00\x68", 3, "Hybrid Fax", FALSE, NULL},
+    {"\xB5\x00\x6A", 3, "Omnifax", FALSE, NULL},
+    {"\xB5\x00\x6C", 3, "HP", FALSE, NULL},
+    {"\xB5\x00\x6E", 3, "Microsoft", FALSE, NULL},
+    {"\xB5\x00\x72", 3, "Speaking Devices", FALSE, NULL},
+    {"\xB5\x00\x74", 3, "Compaq", FALSE, NULL},
+/*
+    {"\xB5\x00\x76", 3, "Trust - Cryptek", FALSE, NULL},	// collision with Microsoft
+*/
+    {"\xB5\x00\x76", 3, "Microsoft", FALSE, NULL},		// uses LSB for country but MSB for manufacturer
+    {"\xB5\x00\x78", 3, "Cylink", FALSE, NULL},
+    {"\xB5\x00\x7A", 3, "Pitney Bowes", FALSE, NULL},
+    {"\xB5\x00\x7C", 3, "Digiboard", FALSE, NULL},
+    {"\xB5\x00\x7E", 3, "Codex", FALSE, NULL},
+    {"\xB5\x00\x82", 3, "Wang Labs", FALSE, NULL},
+    {"\xB5\x00\x84", 3, "Netexpress Communications", FALSE, NULL},
+    {"\xB5\x00\x86", 3, "Cable-Sat", FALSE, NULL},
+    {"\xB5\x00\x88", 3, "MFPA", FALSE, NULL},
+    {"\xB5\x00\x8A", 3, "Telogy Networks", FALSE, NULL},
+    {"\xB5\x00\x8E", 3, "Telecom Multimedia Systems", FALSE, NULL},
+    {"\xB5\x00\x8C", 3, "AT&T", FALSE, NULL},
+    {"\xB5\x00\x92", 3, "Nuera", FALSE, NULL},
+    {"\xB5\x00\x94", 3, "K56flex", FALSE, NULL},
+    {"\xB5\x00\x96", 3, "MiBridge", FALSE, NULL},
+    {"\xB5\x00\x98", 3, "Xerox", FALSE, NULL},
+    {"\xB5\x00\x9A", 3, "Fujitsu", FALSE, NULL},
+    {"\xB5\x00\x9B", 3, "Fujitsu", FALSE, NULL},
+    {"\xB5\x00\x9C", 3, "Natural Microsystems", FALSE, NULL},
+    {"\xB5\x00\x9E", 3, "CopyTele", FALSE, NULL},
+    {"\xB5\x00\xA2", 3, "Murata", FALSE, NULL},
+    {"\xB5\x00\xA4", 3, "Lanier", FALSE, NULL},
+    {"\xB5\x00\xA6", 3, "Qualcomm", FALSE, NULL},
+    {"\xB5\x00\xAA", 3, "HylaFAX", FALSE, NULL},		// we did it backwards for a while
+    {NULL, 0, NULL, FALSE, NULL}
+};
+
+#if 0
+void nsf_find_station_id(int reverse_order)
+{
+    const char *id = NULL;
+    int idSize = 0;
+    const char *maxId = NULL;
+    int maxIdSize = 0;
+    const char *p;
+
+    /* Trying to find the longest printable ASCII sequence */
+    for (p = (const char *) nsf + T35_VENDOR_ID_LEN, *end = p + nsf.length();
+         p < end;
+         p++)
+    {
+        if (isprint(*p))
+        {
+            if (!idSize++)
+                id = p;
+            if (idSize > maxIdSize)
+            {
+                max_id = id;
+                max_id_size = idSize;
+            }
+        }
+        else
+        {
+            id = NULL;
+            id_size = 0;
+        }
+    }
+    
+    /* Minimum acceptable id length */
+    const int MinIdSize = 4;
+
+    if (maxIdSize >= min_id_size)
+    {
+        stationId.resize(0);
+        const char *p;
+        int dir;
+
+        if (reverseOrder)
+        {
+            p = maxId + maxIdSize - 1;
+            dir = -1;
+        }
+        else
+        {
+            p = maxId;
+            dir = 1;
+        }
+        for (int i = 0;  i < maxIdSize;  i++)
+        {
+            stationId.append(*p);
+            p += dir;
+        }
+        station_id_decoded = TRUE;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+int t35_decode(const uint8_t *msg, int len, const char **country, const char **vendor, const char **model)
+{
+    int vendor_decoded;
+    const nsf_data_t *p;
+    const model_data_t *pp;
+
+    vendor_decoded = FALSE;
+    if (country)
+        *country = NULL;
+    if (vendor)
+        *vendor = NULL;
+    if (model)
+        *model = NULL;
+    if (country)
+    {
+        /* We need to apply realism over accuracy, though it blocks out some countries.
+           It is very rare to find a machine from any country but the following:
+        
+           Japan 0x00 (no confusion)
+           Germany 0x04 (0x20) (Canada/Germany confusion)
+           China 0x26 (0x64) (China/Lebanon confusion)
+           Korea 0x61 (0x86) (Korea/Papua New Guinea confusion)
+           UK 0xB4 (0x2D) (UK/Cyprus confusion)
+           USA 0xB5 (0xAD) (USA/Tunisia confusion)
+           France 0x3D (0xBC) (France/Vietnam confusion)
+
+           If we force the most likely of the two possible countries (forward or bit reversed),
+           the only mixup with any realistic probability is the Canada/Germany confusion. We
+           will just live with this, and force the more likely countries. */
+        switch (msg[0])
+        {
+        case 0x20:
+            /* Force Germany */
+            *country = t35_country_codes[0x04];
+            break;
+        case 0x64:
+            /* Force China */
+            *country = t35_country_codes[0x26];
+            break;
+        case 0x86:
+            /* Force Korea */
+            *country = t35_country_codes[0x61];
+            break;
+        case 0x2D:
+            /* Force UK */
+            *country = t35_country_codes[0xB4];
+            break;
+        case 0xAD:
+            /* Force USA */
+            *country = t35_country_codes[0xB5];
+            break;
+        case 0xBC:
+            /* Force France */
+            *country = t35_country_codes[0x3D];
+            break;
+        default:
+            /* Try the country code at face value, then bit reversed */
+            if (t35_country_codes[msg[0]])
+                *country = t35_country_codes[msg[0]];
+            else if (t35_country_codes[bit_reverse8(msg[0])])
+                *country = t35_country_codes[bit_reverse8(msg[0])];
+            break;
+        }
+    }
+    for (p = known_nsf;  p->vendor_id;  p++)
+    {
+        if (len >= p->vendor_id_len
+            &&
+            memcmp(p->vendor_id, msg, p->vendor_id_len) == 0)
+        {
+            if (p->vendor_name  &&  vendor)
+                *vendor = p->vendor_name;
+            if (p->known_models  &&  model)
+            {
+                for (pp = p->known_models;  pp->model_id;  pp++)
+                {
+                    if (len == p->vendor_id_len + pp->model_id_size
+                        &&
+                        memcmp(pp->model_id, &msg[p->vendor_id_len], pp->model_id_size) == 0)
+                    {
+                        *model = pp->model_name;
+                        break;
+                    }
+                }
+            }
+#if 0
+            findStationId(p->inverse_station_id_order);
+#endif
+            vendor_decoded = TRUE;
+            break;
+        }
+    }
+#if 0
+    if (!vendor_found())
+        find_station_id(0);
+#endif
+    return vendor_decoded;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/t38_core.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,849 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_core.c - Encode and decode the ASN.1 of a T.38 IFP message
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_core.c,v 1.24 2006/12/09 04:50:12 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <time.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <memory.h>
+#include <tiffio.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/queue.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/complex.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/fsk.h"
+#include "spandsp/v29rx.h"
+#include "spandsp/v29tx.h"
+#include "spandsp/v27ter_rx.h"
+#include "spandsp/v27ter_tx.h"
+#if defined(ENABLE_V17)
+#include "spandsp/v17rx.h"
+#include "spandsp/v17tx.h"
+#endif
+#include "spandsp/t4.h"
+
+#include "spandsp/t30_fcf.h"
+#include "spandsp/t35.h"
+#include "spandsp/t30.h"
+
+#include "spandsp/t38_core.h"
+
+#define ACCEPTABLE_SEQ_NO_OFFSET    2000
+
+const char *t38_indicator(int indicator)
+{
+    const char *type;
+
+    switch (indicator)
+    {
+    case T38_IND_NO_SIGNAL:
+        type = "no-signal";
+        break;
+    case T38_IND_CNG:
+        type = "cng";
+        break;
+    case T38_IND_CED:
+        type = "ced";
+        break;
+    case T38_IND_V21_PREAMBLE:
+        type = "v21-preamble";
+        break;
+    case T38_IND_V27TER_2400_TRAINING:
+        type = "v27-2400-training";
+        break;
+    case T38_IND_V27TER_4800_TRAINING:
+        type = "v27-4800-training";
+        break;
+    case T38_IND_V29_7200_TRAINING:
+        type = "v29-7200-training";
+        break;
+    case T38_IND_V29_9600_TRAINING:
+        type = "v29-9600-training";
+        break;
+    case T38_IND_V17_7200_SHORT_TRAINING:
+        type = "v17-7200-short-training";
+        break;
+    case T38_IND_V17_7200_LONG_TRAINING:
+        type = "v17-7200-long-training";
+        break;
+    case T38_IND_V17_9600_SHORT_TRAINING:
+        type = "v17-9600-short-training";
+        break;
+    case T38_IND_V17_9600_LONG_TRAINING:
+        type = "v17-9600-long-training";
+        break;
+    case T38_IND_V17_12000_SHORT_TRAINING:
+        type = "v17-12000-short-training";
+        break;
+    case T38_IND_V17_12000_LONG_TRAINING:
+        type = "v17-12000-long-training";
+        break;
+    case T38_IND_V17_14400_SHORT_TRAINING:
+        type = "v17-14400-short-training";
+        break;
+    case T38_IND_V17_14400_LONG_TRAINING:
+        type = "v17-14400-long-training";
+        break;
+    case T38_IND_V8_ANSAM:
+        type = "v8-ansam";
+        break;
+    case T38_IND_V8_SIGNAL:
+        type = "v8-signal";
+        break;
+    case T38_IND_V34_CNTL_CHANNEL_1200:
+        type = "v34-cntl-channel-1200";
+        break;
+    case T38_IND_V34_PRI_CHANNEL:
+        type = "v34-pri-channel";
+        break;
+    case T38_IND_V34_CC_RETRAIN:
+        type = "v34-CC-retrain";
+        break;
+    case T38_IND_V33_12000_TRAINING:
+        type = "v33-12000-training";
+        break;
+    case T38_IND_V33_14400_TRAINING:
+        type = "v33-14400-training";
+        break;
+    default:
+        type = "???";
+        break;
+    }
+    return type;
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *t38_data_type(int data_type)
+{
+    const char *type;
+
+    switch (data_type)
+    {
+    case T38_DATA_V21:
+        type = "v21";
+        break;
+    case T38_DATA_V27TER_2400:
+        type = "v27-2400";
+        break;
+    case T38_DATA_V27TER_4800:
+        type = "v27-4800";
+        break;
+    case T38_DATA_V29_7200:
+        type = "v29-7200";
+        break;
+    case T38_DATA_V29_9600:
+        type = "v29-9600";
+        break;
+    case T38_DATA_V17_7200:
+        type = "v17-7200";
+        break;
+    case T38_DATA_V17_9600:
+        type = "v17-9600";
+        break;
+    case T38_DATA_V17_12000:
+        type = "v17-12000";
+        break;
+    case T38_DATA_V17_14400:
+        type = "v17-14400";
+        break;
+    case T38_DATA_V8:
+        type = "v8";
+        break;
+    case T38_DATA_V34_PRI_RATE:
+        type = "v34-pri-rate";
+        break;
+    case T38_DATA_V34_CC_1200:
+        type = "v34-CC-1200";
+        break;
+    case T38_DATA_V34_PRI_CH:
+        type = "v34-pri-vh";
+        break;
+    case T38_DATA_V33_12000:
+        type = "v33-12000";
+        break;
+    case T38_DATA_V33_14400:
+        type = "v33-14400";
+        break;
+    default:
+        type = "???";
+        break;
+    }
+    return type;
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *t38_field_type(int field_type)
+{
+    const char *type;
+
+    switch (field_type)
+    {
+    case T38_FIELD_HDLC_DATA:
+        type = "hdlc-data";
+        break;
+    case T38_FIELD_HDLC_SIG_END:
+        type = "hdlc-sig-end";
+        break;
+    case T38_FIELD_HDLC_FCS_OK:
+        type = "hdlc-fcs-OK";
+        break;
+    case T38_FIELD_HDLC_FCS_BAD:
+        type = "hdlc-fcs-BAD";
+        break;
+    case T38_FIELD_HDLC_FCS_OK_SIG_END:
+        type = "hdlc-fcs-OK-sig-end";
+        break;
+    case T38_FIELD_HDLC_FCS_BAD_SIG_END:
+        type = "hdlc-fcs-BAD-sig-end";
+        break;
+    case T38_FIELD_T4_NON_ECM_DATA:
+        type = "t4-non-ecm-data";
+        break;
+    case T38_FIELD_T4_NON_ECM_SIG_END:
+        type = "t4-non-ecm-sig-end";
+        break;
+    case T38_FIELD_CM_MESSAGE:
+        type = "cm-message";
+        break;
+    case T38_FIELD_JM_MESSAGE:
+        type = "jm-message";
+        break;
+    case T38_FIELD_CI_MESSAGE:
+        type = "ci-message";
+        break;
+    case T38_FIELD_V34RATE:
+        type = "v34rate";
+        break;
+    default:
+        type = "???";
+        break;
+    }
+    return type;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int classify_seq_no_offset(int expected, int actual)
+{
+    /* Classify the mismatch between expected and actual sequence numbers
+       according to whether the actual is a little in the past (late), a
+       little in the future (some packets have been lost), or a large jump
+       that represents the sequence being lost (possibly when some RTP
+       gets dumped to a UDPTL port). */
+    /* This assumes they are not equal */
+    if (expected > actual)
+    {
+        if (expected > actual + 0x10000 - ACCEPTABLE_SEQ_NO_OFFSET)
+        {
+            /* In the near future */
+            return 1;
+        }
+        if (expected < actual + ACCEPTABLE_SEQ_NO_OFFSET)
+        {
+            /* In the recent past */
+            return -1;
+        }
+    }
+    else
+    {
+        if (expected + ACCEPTABLE_SEQ_NO_OFFSET > actual)
+        {
+            /* In the near future */
+            return 1;
+        }
+        if (expected + 0x10000 - ACCEPTABLE_SEQ_NO_OFFSET < actual)
+        {
+            /* In the recent past */
+            return -1;
+        }
+    }
+    /* There has been a huge step in the sequence */
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t38_core_rx_ifp_packet(t38_core_state_t *s, int seq_no, const uint8_t *buf, int len)
+{
+    int i;
+    int t30_indicator;
+    int t30_data;
+    int ptr;
+    int other_half;
+    int numocts;
+    const uint8_t *msg;
+    uint8_t type;
+    unsigned int count;
+    unsigned int field_type;
+    uint8_t data_field_present;
+    uint8_t field_data_present;
+
+    if (span_log_test(&s->logging, SPAN_LOG_FLOW))
+    {
+        char tag[20];
+        
+        sprintf(tag, "Rx %5d:", seq_no);
+        span_log_buf(&s->logging, SPAN_LOG_FLOW, tag, buf, len);
+    }
+    if (len < 1)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Bad packet length - %d\n", seq_no, len);
+        return -1;
+    }
+    seq_no &= 0xFFFF;
+    if (seq_no != s->rx_expected_seq_no)
+    {
+        /* An expected value of -1 indicates this is the first received packet, and will accept
+           anything for that. We can't assume they will start from zero, even though they should. */
+        if (s->rx_expected_seq_no != -1)
+        {
+            /* We have a packet with a serial number that is not in sequence. The cause could be:
+                - 1. a repeat copy of a recent packet. Many T.38 implementations can preduce quite a lot of these.
+                - 2. a late packet, whose point in the sequence we have already passed.
+                - 3. the result of a hop in the sequence numbers cause by something weird from the other
+                     end. Stream switching might cause this
+                - 4. missing packets.
+
+                In cases 1 and 2 we need to drop this packet. In case 2 it might make sense to try to do
+                something with it in the terminal case. Currently we don't. For gateway operation it will be
+                too late to do anything useful.
+             */
+            if (((seq_no + 1) & 0xFFFF) == s->rx_expected_seq_no)
+            {
+                /* Assume this is truly a repeat packet, and don't bother checking its contents. */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Repeat packet number\n", seq_no);
+                return 0;
+            }
+            /* Distinguish between a little bit out of sequence, and a huge hop. */
+            switch (classify_seq_no_offset(s->rx_expected_seq_no, seq_no))
+            {
+            case -1:
+                /* This packet is in the near past, so its late. */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Late packet - expected %d\n", seq_no, s->rx_expected_seq_no);
+                return 0;
+            case 1:
+                /* This packet is in the near future, so some packets have been lost */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Missing from %d\n", seq_no, s->rx_expected_seq_no);
+                s->rx_missing_handler(s, s->rx_user_data, s->rx_expected_seq_no, seq_no);
+                s->missing_packets += (seq_no - s->rx_expected_seq_no);
+                break;
+            default:
+                /* The sequence has jumped wildly */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Sequence restart\n", seq_no);
+                s->rx_missing_handler(s, s->rx_user_data, -1, -1);
+                s->missing_packets++;
+                break;
+            }
+        }
+        s->rx_expected_seq_no = seq_no;
+    }
+    s->rx_expected_seq_no = (s->rx_expected_seq_no + 1) & 0xFFFF;
+
+    data_field_present = (buf[0] >> 7) & 1;
+    type = (buf[0] >> 6) & 1;
+    ptr = 0;
+    switch (type)
+    {
+    case T38_TYPE_OF_MSG_T30_INDICATOR:
+        /* Indicators should never have a data field */
+        if (data_field_present)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Data field with indicator\n", seq_no);
+            return -1;
+        }
+        if ((buf[0] & 0x20))
+        {
+            /* Extension */
+            if (len != 2)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Invalid length for indicator\n", seq_no);
+                return -1;
+            }
+            t30_indicator = T38_IND_V8_ANSAM + (((buf[0] << 2) & 0x3C) | ((buf[1] >> 6) & 0x3));
+            if (t30_indicator > T38_IND_V33_14400_TRAINING)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Unknown indicator - %d\n", seq_no, t30_indicator);
+                return -1;
+            }
+        }
+        else
+        {
+            if (len != 1)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Invalid length for indicator\n", seq_no);
+                return -1;
+            }
+            t30_indicator = (buf[0] >> 1) & 0xF;
+        }
+        span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: indicator %s\n", seq_no, t38_indicator(t30_indicator));
+        s->rx_indicator_handler(s, s->rx_user_data, t30_indicator);
+        /* This must come after the indicator handler, so the handler routine sees the existing state of the
+           indicator. */
+        s->current_rx_indicator = t30_indicator;
+        break;
+    case T38_TYPE_OF_MSG_T30_DATA:
+        if ((buf[0] & 0x20))
+        {
+            /* Extension */
+            if (len < 2)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Invalid length for data\n", seq_no);
+                return -1;
+            }
+            t30_data = T38_DATA_V8 + (((buf[0] << 2) & 0x3C) | ((buf[1] >> 6) & 0x3));
+            if (t30_data > T38_DATA_V33_14400)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Unknown data type - %d\n", seq_no, t30_data);
+                return -1;
+            }
+            ptr = 2;
+        }
+        else
+        {
+            t30_data = (buf[0] >> 1) & 0xF;
+            if (t30_data > T38_DATA_V17_14400)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Unknown data type - %d\n", seq_no, t30_data);
+                return -1;
+            }
+            ptr = 1;
+        }
+        if (!data_field_present)
+        {
+            /* This is kinda weird, but I guess if the length checks out we accept it. */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Data type with no data field\n", seq_no);
+            if (ptr != len)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Bad length\n", seq_no);
+                return -1;
+            }
+            break;
+        }
+        if (ptr >= len)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Bad length\n", seq_no);
+            return -1;
+        }
+        count = buf[ptr++];
+        //printf("Count is %d\n", count);
+        other_half = FALSE;
+        for (i = 0;  i < (int) count;  i++)
+        {
+            if (ptr >= len)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Bad length\n", seq_no);
+                return -1;
+            }
+            if (s->t38_version == 0)
+            {
+                /* The original version of T.38 with a typo in the ASN.1 spec. */
+                if (other_half)
+                {
+                    /* The lack of a data field in the previous message means
+                       we are currently in the middle of an octet. */
+                    field_data_present = (buf[ptr] >> 3) & 1;
+                    /* Decode field_type */
+                    field_type = buf[ptr] & 0x7;
+                    ptr++;
+                    other_half = FALSE;
+                }
+                else
+                {
+                    field_data_present = (buf[ptr] >> 7) & 1;
+                    /* Decode field_type */
+                    field_type = (buf[ptr] >> 4) & 0x7;
+                    if (field_data_present)
+                        ptr++;
+                    else
+                        other_half = TRUE;
+                }
+                if (field_type > T38_FIELD_T4_NON_ECM_SIG_END)
+                {
+                    span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Unknown field type - %d\n", seq_no, field_type);
+                    return -1;
+                }
+            }
+            else
+            {
+                field_data_present = (buf[ptr] >> 7) & 1;
+                /* Decode field_type */
+                if ((buf[ptr] & 0x40))
+                {
+                    if (ptr > len - 2)
+                    {
+                        span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Bad length\n", seq_no);
+                        return -1;
+                    }
+                    field_type = T38_FIELD_CM_MESSAGE + (((buf[ptr] << 2) & 0x3C) | ((buf[ptr + 1] >> 6) & 0x3));
+                    if (field_type > T38_FIELD_V34RATE)
+                    {
+                        span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Unknown field type - %d\n", seq_no, field_type);
+                        return -1;
+                    }
+                    ptr++;
+                }
+                else
+                {
+                    field_type = (buf[ptr++] >> 3) & 0x7;
+                    if (field_type > T38_FIELD_T4_NON_ECM_SIG_END)
+                    {
+                        span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Unknown field type - %d\n", seq_no, field_type);
+                        return -1;
+                    }
+                }
+            }
+            /* Decode field_data */
+            if (field_data_present)
+            {
+                if (ptr > len - 2)
+                {
+                    span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Bad length\n", seq_no);
+                    return -1;
+                }
+                numocts = ((buf[ptr] << 8) | buf[ptr + 1]) + 1;
+                msg = buf + ptr + 2;
+                ptr += numocts + 2;
+            }
+            else
+            {
+                numocts = 0;
+                msg = NULL;
+            }
+            if (ptr > len)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Bad length\n", seq_no);
+                return -1;
+            }
+            span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: data type %s/%s + %d byte(s)\n", seq_no, t38_data_type(t30_data), t38_field_type(field_type), numocts);
+            s->rx_data_handler(s, s->rx_user_data, t30_data, field_type, msg, numocts);
+        }
+        if (ptr != len)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Rx %5d: Bad length\n", seq_no);
+            return -1;
+        }
+        break;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int t38_encode_data(t38_core_state_t *s, uint8_t buf[], int data_type, int field_type, const uint8_t *msg, int msglen)
+{
+    int len;
+    int i;
+    int enclen;
+    int multiplier;
+    int data_field_no;
+    int data_field_count;
+    data_field_element_t data_field_seq[10];
+    data_field_element_t *q;
+    unsigned int encoded_len;
+    unsigned int fragment_len;
+    unsigned int value;
+    uint8_t data_field_present;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Tx %5d: data type %s/%s + %d byte(s)\n", s->tx_seq_no, t38_data_type(data_type), t38_field_type(field_type), msglen);
+
+    /* Build the IFP packet */
+    data_field_present = TRUE;
+
+    data_field_seq[0].field_data_present = (uint8_t) (msglen > 0);
+    data_field_seq[0].field_type = field_type;
+    data_field_seq[0].field_data.numocts = msglen;
+    data_field_seq[0].field_data.data = msg;
+    data_field_count = 1;
+
+    len = 0;
+    /* Data field present */
+    /* Data packet */
+    /* Type of data */
+    if (data_type <= T38_DATA_V17_14400)
+    {
+        buf[len++] = (uint8_t) ((data_field_present << 7) | 0x40 | (data_type << 1));
+    }
+    else if (data_type <= T38_DATA_V33_14400)
+    {
+        buf[len++] = (uint8_t) ((data_field_present << 7) | 0x60 | (((data_type - T38_DATA_V8) & 0xF) >> 2));
+        buf[len++] = (uint8_t) (((data_type - T38_DATA_V8) << 6) & 0xFF);
+    }
+    else
+    {
+        return -1;
+    }
+    if (data_field_present)
+    {
+        encoded_len = 0;
+        data_field_no = 0;
+        do
+        {
+            value = data_field_count - encoded_len;
+            if (value < 0x80)
+            {
+                /* 1 octet case */
+                buf[len++] = (uint8_t) value;
+                enclen = value;
+            }
+            else if (value < 0x4000)
+            {
+                /* 2 octet case */
+                buf[len++] = (uint8_t) (0x80 | ((value >> 8) & 0xFF));
+                buf[len++] = (uint8_t) (value & 0xFF);
+                enclen = value;
+            }
+            else
+            {
+                /* Fragmentation case */
+                multiplier = (value/0x4000 < 4)  ?  value/0x4000  :  4;
+                buf[len++] = (uint8_t) (0xC0 | multiplier);
+                enclen = 0x4000*multiplier;
+            }
+
+            fragment_len = enclen;
+            encoded_len += fragment_len;
+            /* Encode the elements */
+            for (i = 0;  i < (int) encoded_len;  i++)
+            {
+                q = &data_field_seq[data_field_no];
+                /* Encode field_type */
+                if (s->t38_version == 0)
+                {
+                    /* Original version of T.38 with a typo */
+                    if (q->field_type > T38_FIELD_T4_NON_ECM_SIG_END)
+                        return -1;
+                    buf[len++] = (uint8_t) ((q->field_data_present << 7) | (q->field_type << 4));
+                }
+                else
+                {
+                    if (q->field_type <= T38_FIELD_T4_NON_ECM_SIG_END)
+                    {
+                        buf[len++] = (uint8_t) ((q->field_data_present << 7) | (q->field_type << 3));
+                    }
+                    else if (q->field_type <= T38_FIELD_V34RATE)
+                    {
+                        buf[len++] = (uint8_t) ((q->field_data_present << 7) | 0x40 | (((q->field_type - T38_FIELD_CM_MESSAGE) & 0x1F) >> 1));
+                        buf[len++] = (uint8_t) (((q->field_type - T38_FIELD_CM_MESSAGE) << 7) & 0xFF);
+                    }
+                    else
+                    {
+                        return -1;
+                    }
+                }
+                /* Encode field_data */
+                if (q->field_data_present)
+                {
+                    if (q->field_data.numocts < 1  ||  q->field_data.numocts > 65535)
+                        return -1;
+                    buf[len++] = (uint8_t) (((q->field_data.numocts - 1) >> 8) & 0xFF);
+                    buf[len++] = (uint8_t) ((q->field_data.numocts - 1) & 0xFF);
+                    memcpy(buf + len, q->field_data.data, q->field_data.numocts);
+                    len += q->field_data.numocts;
+                }
+                data_field_no++;
+            }
+        }
+        while (data_field_count != (int) encoded_len  ||  fragment_len >= 16384);
+    }
+
+    if (span_log_test(&s->logging, SPAN_LOG_FLOW))
+    {
+        char tag[20];
+        
+        sprintf(tag, "Tx %5d:", s->tx_seq_no);
+        span_log_buf(&s->logging, SPAN_LOG_FLOW, tag, buf, len);
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int t38_encode_indicator(t38_core_state_t *s, uint8_t buf[], int indicator)
+{
+    int len;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Tx %5d: indicator %s\n", s->tx_seq_no, t38_indicator(indicator));
+
+    /* Build the IFP packet */
+    /* Data field not present */
+    /* Indicator packet */
+    /* Type of indicator */
+    if (indicator <= T38_IND_V17_14400_LONG_TRAINING)
+    {
+        buf[0] = (uint8_t) (indicator << 1);
+        len = 1;
+    }
+    else if (indicator <= T38_IND_V33_14400_TRAINING)
+    {
+        buf[0] = (uint8_t) (0x20 | (((indicator - T38_IND_V8_ANSAM) & 0xF) >> 2));
+        buf[1] = (uint8_t) (((indicator - T38_IND_V8_ANSAM) << 6) & 0xFF);
+        len = 2;
+    }
+    else
+    {
+        len = -1;
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t38_core_send_data(t38_core_state_t *s, int data_type, int field_type, const uint8_t *msg, int msglen)
+{
+    uint8_t buf[100];
+    int len;
+
+    if ((len = t38_encode_data(s, buf, data_type, field_type, msg, msglen)) > 0)
+        s->tx_packet_handler(s, s->tx_packet_user_data, buf, len, 1);
+    else
+        span_log(&s->logging, SPAN_LOG_FLOW, "T.38 data len is %d\n", len);
+    s->tx_seq_no = (s->tx_seq_no + 1) & 0xFFFF;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t38_core_send_indicator(t38_core_state_t *s, int indicator, int count)
+{
+    uint8_t buf[100];
+    int len;
+
+    if ((len = t38_encode_indicator(s, buf, indicator)) > 0)
+    {
+        s->tx_packet_handler(s, s->tx_packet_user_data, buf, len, count);
+        s->current_tx_indicator = indicator;
+    }
+    else
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "T.38 indicator len is %d\n", len);
+    }
+    s->tx_seq_no = (s->tx_seq_no + 1) & 0xFFFF;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t38_set_data_rate_management_method(t38_core_state_t *s, int method)
+{
+    s->data_rate_management_method = method;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t38_set_data_transport_protocol(t38_core_state_t *s, int data_transport_protocol)
+{
+    s->data_transport_protocol = data_transport_protocol;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t38_set_fill_bit_removal(t38_core_state_t *s, int fill_bit_removal)
+{
+    s->fill_bit_removal = fill_bit_removal;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t38_set_mmr_transcoding(t38_core_state_t *s, int mmr_transcoding)
+{
+    s->mmr_transcoding = mmr_transcoding;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t38_set_jbig_transcoding(t38_core_state_t *s, int jbig_transcoding)
+{
+    s->jbig_transcoding = jbig_transcoding;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t38_set_max_buffer_size(t38_core_state_t *s, int max_buffer_size)
+{
+    s->max_buffer_size = max_buffer_size;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t38_set_max_datagram_size(t38_core_state_t *s, int max_datagram_size)
+{
+    s->max_datagram_size = max_datagram_size;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t38_set_t38_version(t38_core_state_t *s, int t38_version)
+{
+    s->t38_version = t38_version;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t38_get_fastest_image_data_rate(t38_core_state_t *s)
+{
+    return s->fastest_image_data_rate;
+}
+/*- End of function --------------------------------------------------------*/
+
+t38_core_state_t *t38_core_init(t38_core_state_t *s,
+                                t38_rx_indicator_handler_t *rx_indicator_handler,
+                                t38_rx_data_handler_t *rx_data_handler,
+                                t38_rx_missing_handler_t *rx_missing_handler,
+                                void *rx_user_data)
+{
+    memset(s, 0, sizeof(*s));
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "T.38");
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Start tx document\n");
+    s->data_rate_management_method = 2;
+    s->data_transport_protocol = T38_TRANSPORT_UDPTL;
+    s->fill_bit_removal = FALSE;
+    s->mmr_transcoding = FALSE;
+    s->jbig_transcoding = FALSE;
+    s->max_buffer_size = 400;
+    s->max_datagram_size = 100;
+    s->t38_version = 0;
+    s->iaf = FALSE;
+    s->current_rx_indicator = -1;
+
+    s->rx_indicator_handler = rx_indicator_handler;
+    s->rx_data_handler = rx_data_handler;
+    s->rx_missing_handler = rx_missing_handler;
+    s->rx_user_data = rx_user_data;
+
+    s->rx_expected_seq_no = -1;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/t38_gateway.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1544 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_gateway.c - An implementation of a T.38 gateway, less the packet exchange part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_gateway.c,v 1.62 2006/12/08 12:47:29 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <time.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <tiffio.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/queue.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/complex.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/silence_gen.h"
+#include "spandsp/fsk.h"
+#include "spandsp/v29rx.h"
+#include "spandsp/v29tx.h"
+#include "spandsp/v27ter_rx.h"
+#include "spandsp/v27ter_tx.h"
+#if defined(ENABLE_V17)
+#include "spandsp/v17rx.h"
+#include "spandsp/v17tx.h"
+#endif
+#include "spandsp/t4.h"
+
+#include "spandsp/t30_fcf.h"
+#include "spandsp/t35.h"
+#include "spandsp/t30.h"
+
+#include "spandsp/t38_core.h"
+#include "spandsp/t38_gateway.h"
+
+#define MS_PER_TX_CHUNK             30
+
+#define INDICATOR_TX_COUNT          3
+
+#define DISBIT1     0x01
+#define DISBIT2     0x02
+#define DISBIT3     0x04
+#define DISBIT4     0x08
+#define DISBIT5     0x10
+#define DISBIT6     0x20
+#define DISBIT7     0x40
+#define DISBIT8     0x80
+
+enum
+{
+    T38_NONE,
+    T38_V27TER_RX,
+    T38_V29_RX,
+    T38_V17_RX
+};
+
+enum
+{
+    HDLC_FLAG_FINISHED = 0x01,
+    HDLC_FLAG_CORRUPT_CRC = 0x02,
+    HDLC_FLAG_PROCEED_WITH_OUTPUT = 0x04,
+    HDLC_FLAG_MISSING_DATA = 0x08
+};
+
+static int restart_rx_modem(t38_gateway_state_t *s);
+static void add_to_non_ecm_tx_buffer(t38_gateway_state_t *s, const uint8_t *buf, int len);
+static int non_ecm_get_bit(void *user_data);
+static int process_rx_indicator(t38_core_state_t *t, void *user_data, int indicator);
+
+static void hdlc_underflow_handler(void *user_data)
+{
+    t38_gateway_state_t *s;
+    int old_data_type;
+    
+    s = (t38_gateway_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "HDLC underflow at %d\n", s->hdlc_out);
+    /* If the current HDLC buffer is not at the HDLC_FLAG_PROCEED_WITH_OUTPUT stage, this
+       underflow must be an end of preamble condition. */
+    if ((s->hdlc_flags[s->hdlc_out] & HDLC_FLAG_PROCEED_WITH_OUTPUT))
+    {
+        old_data_type = s->hdlc_contents[s->hdlc_out];
+        s->hdlc_len[s->hdlc_out] = 0;
+        s->hdlc_flags[s->hdlc_out] = 0;
+        s->hdlc_contents[s->hdlc_out] = 0;
+        if (++s->hdlc_out >= T38_TX_HDLC_BUFS)
+            s->hdlc_out = 0;
+        span_log(&s->logging, SPAN_LOG_FLOW, "HDLC next is 0x%X\n", s->hdlc_contents[s->hdlc_out]);
+        if ((s->hdlc_contents[s->hdlc_out] & 0x100))
+        {
+            /* The next thing in the queue is an indicator, so we need to stop this modem. */
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC shutdown\n");
+            hdlc_tx_frame(&s->hdlctx, NULL, 0);
+        }
+        else if ((s->hdlc_contents[s->hdlc_out] & 0x200))
+        {
+            /* Check if we should start sending the next frame */
+            if ((s->hdlc_flags[s->hdlc_out] & HDLC_FLAG_PROCEED_WITH_OUTPUT))
+            {
+                /* This frame is ready to go, and uses the same modem we are running now. So, send
+                   whatever we have. This might or might not be an entire frame. */
+                span_log(&s->logging, SPAN_LOG_FLOW, "HDLC start next frame\n");
+                hdlc_tx_frame(&s->hdlctx, s->hdlc_buf[s->hdlc_out], s->hdlc_len[s->hdlc_out]);
+                if ((s->hdlc_flags[s->hdlc_out] & HDLC_FLAG_CORRUPT_CRC))
+                    hdlc_tx_corrupt_frame(&s->hdlctx);
+            }
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int set_next_tx_type(t38_gateway_state_t *s)
+{
+    tone_gen_descriptor_t tone_desc;
+    get_bit_func_t get_bit_func;
+    void *get_bit_user_data;
+    int indicator;
+
+    if (s->next_tx_handler)
+    {
+        /* There is a handler queued, so that is the next one */
+        s->tx_handler = s->next_tx_handler;
+        s->tx_user_data = s->next_tx_user_data;
+        s->next_tx_handler = NULL;
+        return TRUE;
+    }
+    if (s->hdlc_in == s->hdlc_out)
+        return FALSE;
+    if ((s->hdlc_contents[s->hdlc_out] & 0x100) == 0)
+        return FALSE;
+    indicator = (s->hdlc_contents[s->hdlc_out] & 0xFF);
+    s->hdlc_len[s->hdlc_out] = 0;
+    s->hdlc_flags[s->hdlc_out] = 0;
+    s->hdlc_contents[s->hdlc_out] = 0;
+    if (++s->hdlc_out >= T38_TX_HDLC_BUFS)
+        s->hdlc_out = 0;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Changing to %s\n", t38_indicator(indicator));
+    if (s->short_train  &&  s->ecm_mode)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "HDLC mode\n");
+        hdlc_tx_init(&s->hdlctx, FALSE, 2, TRUE, hdlc_underflow_handler, s);
+        get_bit_func = (get_bit_func_t) hdlc_tx_get_bit;
+        get_bit_user_data = (void *) &s->hdlctx;
+    }
+    else
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "non-ECM mode\n");
+        get_bit_func = non_ecm_get_bit;
+        get_bit_user_data = (void *) s;
+    }
+    switch (indicator)
+    {
+    case T38_IND_NO_SIGNAL:
+        /* Impose 75ms minimum on transmitted silence */
+        silence_gen_set(&s->silence_gen, ms_to_samples(75));
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = NULL;
+        break;
+    case T38_IND_CNG:
+        /* 0.5s of 1100Hz + 3.0s of silence repeating */
+        make_tone_gen_descriptor(&tone_desc,
+                                 1100,
+                                 -11,
+                                 0,
+                                 0,
+                                 500,
+                                 3000,
+                                 0,
+                                 0,
+                                 TRUE);
+        tone_gen_init(&(s->tone_gen), &tone_desc);
+        s->tx_handler = (span_tx_handler_t *) &(tone_gen);
+        s->tx_user_data = &(s->tone_gen);
+        silence_gen_set(&s->silence_gen, 0);
+        s->next_tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->next_tx_user_data = &(s->silence_gen);
+        break;
+    case T38_IND_CED:
+        /* 0.2s of silence, then 2.6s to 4s of 2100Hz tone, then 75ms of silence. */
+        silence_gen_alter(&s->silence_gen, ms_to_samples(200));
+        make_tone_gen_descriptor(&tone_desc,
+                                 2100,
+                                 -11,
+                                 0,
+                                 0,
+                                 2600,
+                                 75,
+                                 0,
+                                 0,
+                                 FALSE);
+        tone_gen_init(&(s->tone_gen), &tone_desc);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(tone_gen);
+        s->next_tx_user_data = &(s->tone_gen);
+        break;
+    case T38_IND_V21_PREAMBLE:
+        hdlc_tx_init(&s->hdlctx, FALSE, 2, TRUE, hdlc_underflow_handler, s);
+        hdlc_tx_preamble(&s->hdlctx, 32);
+        s->hdlc_len[s->hdlc_in] = 0;
+        fsk_tx_init(&(s->v21tx), &preset_fsk_specs[FSK_V21CH2], (get_bit_func_t) hdlc_tx_get_bit, &s->hdlctx);
+        /* Impose a minimum silence */
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(fsk_tx);
+        s->next_tx_user_data = &(s->v21tx);
+        break;
+    case T38_IND_V27TER_2400_TRAINING:
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        hdlc_tx_preamble(&s->hdlctx, 60);
+        v27ter_tx_restart(&(s->v27ter_tx), 2400, s->use_tep);
+        v27ter_tx_set_get_bit(&(s->v27ter_tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v27ter_tx);
+        s->next_tx_user_data = &(s->v27ter_tx);
+        break;
+    case T38_IND_V27TER_4800_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 120);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v27ter_tx_restart(&(s->v27ter_tx), 4800, s->use_tep);
+        v27ter_tx_set_get_bit(&(s->v27ter_tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v27ter_tx);
+        s->next_tx_user_data = &(s->v27ter_tx);
+        break;
+    case T38_IND_V29_7200_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 180);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v29_tx_restart(&(s->v29tx), 7200, s->use_tep);
+        v29_tx_set_get_bit(&(s->v29tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v29_tx);
+        s->next_tx_user_data = &(s->v29tx);
+        break;
+    case T38_IND_V29_9600_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 240);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v29_tx_restart(&(s->v29tx), 9600, s->use_tep);
+        v29_tx_set_get_bit(&(s->v29tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v29_tx);
+        s->next_tx_user_data = &(s->v29tx);
+        break;
+#if defined(ENABLE_V17)
+    case T38_IND_V17_7200_SHORT_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 180);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 7200, s->use_tep, s->short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v17_tx);
+        s->next_tx_user_data = &(s->v17tx);
+        break;
+    case T38_IND_V17_7200_LONG_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 180);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 7200, s->use_tep, s->short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v17_tx);
+        s->next_tx_user_data = &(s->v17tx);
+        break;
+    case T38_IND_V17_9600_SHORT_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 240);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 9600, s->use_tep, s->short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v17_tx);
+        s->next_tx_user_data = &(s->v17tx);
+        break;
+    case T38_IND_V17_9600_LONG_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 240);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 9600, s->use_tep, s->short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v17_tx);
+        s->next_tx_user_data = &(s->v17tx);
+        break;
+    case T38_IND_V17_12000_SHORT_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 300);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 12000, s->use_tep, s->short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v17_tx);
+        s->next_tx_user_data = &(s->v17tx);
+        break;
+    case T38_IND_V17_12000_LONG_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 300);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 12000, s->use_tep, s->short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v17_tx);
+        s->next_tx_user_data = &(s->v17tx);
+        break;
+    case T38_IND_V17_14400_SHORT_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 360);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 14400, s->use_tep, s->short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v17_tx);
+        s->next_tx_user_data = &(s->v17tx);
+        break;
+    case T38_IND_V17_14400_LONG_TRAINING:
+        hdlc_tx_preamble(&s->hdlctx, 360);
+        silence_gen_alter(&s->silence_gen, ms_to_samples(75));
+        v17_tx_restart(&(s->v17tx), 14400, s->use_tep, s->short_train);
+        v17_tx_set_get_bit(&(s->v17tx), get_bit_func, get_bit_user_data);
+        s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+        s->tx_user_data = &(s->silence_gen);
+        s->next_tx_handler = (span_tx_handler_t *) &(v17_tx);
+        s->next_tx_user_data = &(s->v17tx);
+        break;
+#endif
+    case T38_IND_V8_ANSAM:
+        break;
+    case T38_IND_V8_SIGNAL:
+        break;
+    case T38_IND_V34_CNTL_CHANNEL_1200:
+        break;
+    case T38_IND_V34_PRI_CHANNEL:
+        break;
+    case T38_IND_V34_CC_RETRAIN:
+        break;
+    case T38_IND_V33_12000_TRAINING:
+        break;
+    case T38_IND_V33_14400_TRAINING:
+        break;
+    default:
+        break;
+    }
+    s->non_ecm_bit_no = 0;
+    s->current_non_ecm_octet = 0xFF;
+    s->non_ecm_flow_control_fill_octet = 0xFF;
+    s->non_ecm_at_initial_all_ones = TRUE;
+    s->bit_stream = 0;
+    if (s->non_ecm_flow_control_fill_octets)
+    {
+        span_log(&s->logging, SPAN_LOG_WARNING, "Flow control generated %d octets\n", s->non_ecm_flow_control_fill_octets);
+        s->non_ecm_flow_control_fill_octets = 0;
+    }
+    s->in_progress_rx_indicator = indicator;
+    return TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void pump_out_final_hdlc(t38_gateway_state_t *s, int good_fcs)
+{
+    if (!good_fcs)
+        s->hdlc_flags[s->hdlc_in] |= HDLC_FLAG_CORRUPT_CRC;
+    if (s->hdlc_in == s->hdlc_out)
+    {
+        /* This is the frame in progress at the output. */
+        if ((s->hdlc_flags[s->hdlc_out] & HDLC_FLAG_PROCEED_WITH_OUTPUT) == 0)
+        {
+            /* Output of this frame has not yet begun. Throw it all out now. */
+            hdlc_tx_frame(&s->hdlctx, s->hdlc_buf[s->hdlc_out], s->hdlc_len[s->hdlc_out]);
+        }
+        if ((s->hdlc_flags[s->hdlc_out] & HDLC_FLAG_CORRUPT_CRC))
+            hdlc_tx_corrupt_frame(&s->hdlctx);
+    }
+    s->hdlc_flags[s->hdlc_in] |= (HDLC_FLAG_PROCEED_WITH_OUTPUT | HDLC_FLAG_FINISHED);
+    if (++s->hdlc_in >= T38_TX_HDLC_BUFS)
+        s->hdlc_in = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void constrain_fast_modem(t38_gateway_state_t *s, uint8_t *buf, int len)
+{
+    /* We may need to adjust the capabilities, so they do not exceed our own */
+    if (len < 5)
+        return;
+    /* TODO: fiddle the contents */
+    switch (buf[4] & (DISBIT6 | DISBIT5 | DISBIT4 | DISBIT3))
+    {
+    case 0:
+    case DISBIT4:
+        /* V.27ter only */
+        break;
+    case DISBIT3:
+    case (DISBIT4 | DISBIT3):
+        /* V.27ter and V.29 */
+        break;
+    case (DISBIT6 | DISBIT4 | DISBIT3):
+        /* V.27ter, V.29 and V.17 */
+#if !defined(ENABLE_V17)
+        buf[4] &= ~DISBIT6;
+#endif
+        break;
+    case (DISBIT5 | DISBIT4):
+    case (DISBIT6 | DISBIT4):
+    case (DISBIT6 | DISBIT5 | DISBIT4):
+    case (DISBIT6 | DISBIT5 | DISBIT4 | DISBIT3):
+        /* Reserved */
+        buf[4] &= ~(DISBIT6 | DISBIT5);
+        buf[4] |= (DISBIT4 | DISBIT3);
+        break;
+    default:
+        /* Not used */
+        buf[4] &= ~(DISBIT6 | DISBIT5);
+        buf[4] |= (DISBIT4 | DISBIT3);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void monitor_control_messages(t38_gateway_state_t *s, uint8_t *buf, int len, int from_modem)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "monitor 0x%x\n", buf[2]);
+    if (len < 3)
+        return;
+    /* Monitor the control messages, so we can see what is happening to things like
+       training success/failure. */
+    switch (buf[2])
+    {
+    case T30_CFR:
+        /* We are changing from TCF exchange to image exchange */
+        /* Successful training means we should change to short training */
+        s->short_train = TRUE;
+        span_log(&s->logging, SPAN_LOG_FLOW, "CFR - short = %d, ECM = %d\n", s->short_train, s->ecm_mode);
+        if (!from_modem)
+            restart_rx_modem(s);
+        break;
+    case T30_RTP:
+        /* We are going back to the exchange of fresh TCF */
+        s->short_train = FALSE;
+        break;
+    case T30_DTC:
+    case T30_DCS:
+    case T30_DCS + 1:
+        /* We need to check which modem type is about to be used. */
+        switch (buf[4] & (DISBIT6 | DISBIT5 | DISBIT4 | DISBIT3))
+        {
+        case 0:
+            s->fast_bit_rate = 2400;
+            s->fast_modem = T38_V27TER_RX;
+            s->short_train = FALSE;
+            break;
+        case DISBIT4:
+            s->fast_bit_rate = 4800;
+            s->fast_modem = T38_V27TER_RX;
+            s->short_train = FALSE;
+            break;
+        case DISBIT3:
+            s->fast_bit_rate = 9600;
+            s->fast_modem = T38_V29_RX;
+            s->short_train = FALSE;
+            break;
+        case (DISBIT4 | DISBIT3):
+            s->fast_bit_rate = 7200;
+            s->fast_modem = T38_V29_RX;
+            s->short_train = FALSE;
+            break;
+#if defined(ENABLE_V17)
+        case DISBIT6:
+            s->fast_bit_rate = 14400;
+            s->fast_modem = T38_V17_RX;
+            s->short_train = FALSE;
+            break;
+        case (DISBIT6 | DISBIT4):
+            s->fast_bit_rate = 12000;
+            s->fast_modem = T38_V17_RX;
+            s->short_train = FALSE;
+            break;
+        case (DISBIT6 | DISBIT3):
+            s->fast_bit_rate = 9600;
+            s->fast_modem = T38_V17_RX;
+            s->short_train = FALSE;
+            break;
+        case (DISBIT6 | DISBIT4 | DISBIT3):
+            s->fast_bit_rate = 7200;
+            s->fast_modem = T38_V17_RX;
+            s->short_train = FALSE;
+            break;
+#endif
+        case (DISBIT5 | DISBIT3):
+        case (DISBIT5 | DISBIT4 | DISBIT3):
+        case (DISBIT6 | DISBIT5):
+        case (DISBIT6 | DISBIT5 | DISBIT3):
+        case (DISBIT6 | DISBIT5 | DISBIT4):
+        case (DISBIT6 | DISBIT5 | DISBIT4 | DISBIT3):
+            /* Reserved */
+            s->fast_bit_rate = 0;
+            s->fast_modem = T38_NONE;
+            break;
+        default:
+            /* Not used */
+            s->fast_bit_rate = 0;
+            s->fast_modem = T38_NONE;
+            break;
+        }
+        s->ecm_mode = (buf[6] & DISBIT3);
+        break;
+    default:
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void queue_missing_indicator(t38_gateway_state_t *s, int data_type)
+{
+    t38_core_state_t *t;
+    
+    t = &s->t38;
+    /* Missing packets might have lost us the indicator that should have put us in
+       the required mode of operation. It might be a bit late to fill in such a gap
+       now, but we should try. We may also want to force indicators into the queue,
+       such as when the data says 'end of signal'. */
+    switch (data_type)
+    {
+    case -1:
+        if (s->t38.current_rx_indicator != T38_IND_NO_SIGNAL)
+            process_rx_indicator(t, (void *) s, T38_IND_NO_SIGNAL);
+        break;
+    case T38_DATA_V21:
+        if (s->t38.current_rx_indicator != T38_IND_V21_PREAMBLE)
+            process_rx_indicator(t, (void *) s, T38_IND_V21_PREAMBLE);
+        break;
+    case T38_DATA_V27TER_2400:
+        if (s->t38.current_rx_indicator != T38_IND_V27TER_2400_TRAINING)
+            process_rx_indicator(t, (void *) s, T38_IND_V27TER_2400_TRAINING);
+        break;
+    case T38_DATA_V27TER_4800:
+        if (s->t38.current_rx_indicator != T38_IND_V27TER_4800_TRAINING)
+            process_rx_indicator(t, (void *) s, T38_IND_V27TER_4800_TRAINING);
+        break;
+    case T38_DATA_V29_7200:
+        if (s->t38.current_rx_indicator != T38_IND_V29_7200_TRAINING)
+            process_rx_indicator(t, (void *) s, T38_IND_V29_7200_TRAINING);
+        break;
+    case T38_DATA_V29_9600:
+        if (s->t38.current_rx_indicator != T38_IND_V29_9600_TRAINING)
+            process_rx_indicator(t, (void *) s, T38_IND_V29_9600_TRAINING);
+        break;
+    case T38_DATA_V17_7200:
+        if (s->t38.current_rx_indicator != T38_IND_V17_7200_SHORT_TRAINING  &&  s->t38.current_rx_indicator != T38_IND_V17_7200_LONG_TRAINING)
+            process_rx_indicator(t, (void *) s, T38_IND_V17_7200_LONG_TRAINING);
+        break;
+    case T38_DATA_V17_9600:
+        if (s->t38.current_rx_indicator != T38_IND_V17_9600_SHORT_TRAINING  &&  s->t38.current_rx_indicator != T38_IND_V17_9600_LONG_TRAINING)
+            process_rx_indicator(t, (void *) s, T38_IND_V17_9600_LONG_TRAINING);
+        break;
+    case T38_DATA_V17_12000:
+        if (s->t38.current_rx_indicator != T38_IND_V17_12000_SHORT_TRAINING  &&  s->t38.current_rx_indicator != T38_IND_V17_12000_LONG_TRAINING)
+            process_rx_indicator(t, (void *) s, T38_IND_V17_12000_LONG_TRAINING);
+        break;
+    case T38_DATA_V17_14400:
+        if (s->t38.current_rx_indicator != T38_IND_V17_14400_SHORT_TRAINING  &&  s->t38.current_rx_indicator != T38_IND_V17_14400_LONG_TRAINING)
+            process_rx_indicator(t, (void *) s, T38_IND_V17_14400_LONG_TRAINING);
+        break;
+    case T38_DATA_V8:
+        break;
+    case T38_DATA_V34_PRI_RATE:
+        break;
+    case T38_DATA_V34_CC_1200:
+        break;
+    case T38_DATA_V34_PRI_CH:
+        break;
+    case T38_DATA_V33_12000:
+        break;
+    case T38_DATA_V33_14400:
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_rx_missing(t38_core_state_t *t, void *user_data, int rx_seq_no, int expected_seq_no)
+{
+    t38_gateway_state_t *s;
+    
+    s = (t38_gateway_state_t *) user_data;
+    s->hdlc_flags[s->hdlc_in] |= HDLC_FLAG_MISSING_DATA;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_rx_indicator(t38_core_state_t *t, void *user_data, int indicator)
+{
+    t38_gateway_state_t *s;
+    
+    s = (t38_gateway_state_t *) user_data;
+
+    if (s->t38.current_rx_indicator != indicator)
+    {
+        if (s->hdlc_contents[s->hdlc_in])
+        {
+            if (++s->hdlc_in >= T38_TX_HDLC_BUFS)
+                s->hdlc_in = 0;
+        }
+        s->hdlc_contents[s->hdlc_in] = (indicator | 0x100);
+        if (++s->hdlc_in >= T38_TX_HDLC_BUFS)
+            s->hdlc_in = 0;
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW,
+                 "Queued change - (%d) %s -> %s\n",
+                 silence_gen_remainder(&(s->silence_gen)),
+                 t38_indicator(s->t38.current_rx_indicator),
+                 t38_indicator(indicator));
+        s->current_rx_field_class = T38_FIELD_CLASS_NONE;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_rx_data(t38_core_state_t *t, void *user_data, int data_type, int field_type, const uint8_t *buf, int len)
+{
+    int i;
+    int previous;
+    t38_gateway_state_t *s;
+    
+    s = (t38_gateway_state_t *) user_data;
+    switch (field_type)
+    {
+    case T38_FIELD_HDLC_DATA:
+        s->current_rx_field_class = T38_FIELD_CLASS_HDLC;
+        if (s->hdlc_contents[s->hdlc_in] != (data_type | 0x200))
+            queue_missing_indicator(s, data_type);
+        previous = s->hdlc_len[s->hdlc_in];
+        /* Check if this data would overflow the buffer. */
+        if (s->hdlc_len[s->hdlc_in] + len > T38_MAX_HDLC_LEN)
+            break;
+        s->hdlc_contents[s->hdlc_in] = (data_type | 0x200);
+        if (data_type == T38_DATA_V21)
+        {
+            for (i = 0;  i < len;  i++)
+            {
+                s->hdlc_buf[s->hdlc_in][s->hdlc_len[s->hdlc_in]++] = bit_reverse8(buf[i]);
+                /* Edit the message, if we need to control the communication between the end points. */
+                switch (s->hdlc_len[s->hdlc_in])
+                {
+                case 4:
+                    /* Check if we need to corrupt this message */
+                    if (s->hdlc_buf[s->hdlc_in][2] == T30_NSF
+                        ||
+                        s->hdlc_buf[s->hdlc_in][2] == T30_NSC
+                        ||
+                        s->hdlc_buf[s->hdlc_in][2] == T30_NSS)
+                    {
+                        /* Corrupt the message, so it will be ignored */
+                        span_log(&s->logging, SPAN_LOG_FLOW, "Corrupting non-specific procedures message\n");
+                        s->hdlc_buf[s->hdlc_in][3] = 0;
+                    }
+                    break;
+                case 6:
+                    switch (s->hdlc_buf[s->hdlc_in][2])
+                    {
+                    case T30_DIS:
+                        /* We may need to adjust the capabilities, so they do not exceed our own */
+                        span_log(&s->logging, SPAN_LOG_FLOW, "Constraining the fast modem\n");
+                        constrain_fast_modem(s, s->hdlc_buf[s->hdlc_in], s->hdlc_len[s->hdlc_in]);
+                        break;
+                    default:
+                        break;
+                    }
+                    break;
+                case 7:
+                    if (!s->ecm_allowed)
+                    {
+                        switch (s->hdlc_buf[s->hdlc_in][2])
+                        {
+                        case T30_DIS:
+                            /* Do not allow ECM or T.6 coding */
+                            span_log(&s->logging, SPAN_LOG_FLOW, "Inhibiting ECM\n");
+                            s->hdlc_buf[s->hdlc_in][6] &= ~(DISBIT3 | DISBIT7);
+                            break;
+                        }
+                    }
+                    break;
+                }
+            }
+            /* We need to send out the control messages as they are arriving. They are
+               too slow to capture a whole frame, and then pass it on. */
+            /* Don't start pumping data into the actual output stream until there is
+               enough backlog to create some elasticity for jitter tolerance. */
+            if (s->hdlc_len[s->hdlc_in] >= 8)
+            {
+                if (s->hdlc_in == s->hdlc_out)
+                {
+                    if ((s->hdlc_flags[s->hdlc_in] & HDLC_FLAG_PROCEED_WITH_OUTPUT) == 0)
+                        previous = 0;
+                    hdlc_tx_frame(&s->hdlctx, s->hdlc_buf[s->hdlc_out] + previous, s->hdlc_len[s->hdlc_out] - previous);
+                }
+                s->hdlc_flags[s->hdlc_in] |= HDLC_FLAG_PROCEED_WITH_OUTPUT;
+            }
+        }
+        else
+        {
+            /* For the faster frames, take in the whole frame before sending it out. Also, there
+               is no need to monitor, or modify, the contents of the faster frames. */
+            for (i = 0;  i < len;  i++)
+                s->hdlc_buf[s->hdlc_in][s->hdlc_len[s->hdlc_in] + i] = bit_reverse8(buf[i]);
+            s->hdlc_len[s->hdlc_in] += len;
+        }
+        break;
+    case T38_FIELD_HDLC_FCS_OK:
+        s->current_rx_field_class = T38_FIELD_CLASS_HDLC;
+        if (len > 0)
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_OK!\n");
+            /* The sender has incorrectly included data in this message. It is unclear what we should do
+               with it, to maximise tolerance of buggy implementations. */
+        }
+        span_log(&s->logging, SPAN_LOG_FLOW, "Type %s - CRC good\n", t30_frametype(s->hdlc_buf[s->hdlc_in][2]));
+        if (s->hdlc_contents[s->hdlc_in] != (data_type | 0x200))
+            queue_missing_indicator(s, data_type);
+        /* Don't deal with zero length frames. Some T.38 implementations send multiple T38_FIELD_HDLC_FCS_OK
+           packets, when they have sent no data for the body of the frame. */
+        if (s->hdlc_len[s->hdlc_in] > 0)
+        {
+            s->hdlc_contents[s->hdlc_in] = (data_type | 0x200);
+            if (data_type == T38_DATA_V21  &&  (s->hdlc_flags[s->hdlc_in] & HDLC_FLAG_MISSING_DATA) == 0)
+                monitor_control_messages(s, s->hdlc_buf[s->hdlc_in], s->hdlc_len[s->hdlc_in], FALSE);
+            pump_out_final_hdlc(s, (s->hdlc_flags[s->hdlc_in] & HDLC_FLAG_MISSING_DATA) == 0);
+        }
+        s->hdlc_len[s->hdlc_in] = 0;
+        s->hdlc_flags[s->hdlc_in] = 0;
+        break;
+    case T38_FIELD_HDLC_FCS_BAD:
+        s->current_rx_field_class = T38_FIELD_CLASS_HDLC;
+        if (len > 0)
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_BAD!\n");
+            /* The sender has incorrectly included data in this message. We can safely ignore it, as the
+               bad FCS means we will throw away the whole message, anyway. */
+        }
+        span_log(&s->logging, SPAN_LOG_FLOW, "Type %s - CRC bad\n", t30_frametype(s->hdlc_buf[s->hdlc_in][2]));
+        if (s->hdlc_contents[s->hdlc_in] != (data_type | 0x200))
+            queue_missing_indicator(s, data_type);
+        if (s->hdlc_len[s->hdlc_in] > 0)
+        {
+            s->hdlc_contents[s->hdlc_in] = (data_type | 0x200);
+            pump_out_final_hdlc(s, FALSE);
+        }
+        s->hdlc_len[s->hdlc_in] = 0;
+        s->hdlc_flags[s->hdlc_in] = 0;
+        break;
+    case T38_FIELD_HDLC_FCS_OK_SIG_END:
+        s->current_rx_field_class = T38_FIELD_CLASS_HDLC;
+        if (len > 0)
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_OK_SIG_END!\n");
+            /* The sender has incorrectly included data in this message. It is unclear what we should do
+               with it, to maximise tolerance of buggy implementations. */
+        }
+        span_log(&s->logging, SPAN_LOG_FLOW, "Type %s - CRC OK, sig end\n", t30_frametype(s->hdlc_buf[s->hdlc_in][2]));
+        if (s->hdlc_contents[s->hdlc_in] != (data_type | 0x200))
+            queue_missing_indicator(s, data_type);
+        /* Don't deal with zero length frames. Some T.38 implementations send multiple T38_FIELD_HDLC_FCS_OK
+           packets, when they have sent no data for the body of the frame. */
+        if (s->hdlc_len[s->hdlc_in] > 0)
+        {
+            s->hdlc_contents[s->hdlc_in] = (data_type | 0x200);
+            if (data_type == T38_DATA_V21  &&  (s->hdlc_flags[s->hdlc_in] & HDLC_FLAG_MISSING_DATA) == 0)
+                monitor_control_messages(s, s->hdlc_buf[s->hdlc_in], s->hdlc_len[s->hdlc_in], FALSE);
+            pump_out_final_hdlc(s, (s->hdlc_flags[s->hdlc_in] & HDLC_FLAG_MISSING_DATA) == 0);
+        }
+        s->hdlc_len[s->hdlc_in] = 0;
+        s->hdlc_flags[s->hdlc_in] = 0;
+        s->hdlc_contents[s->hdlc_in] = 0;
+        queue_missing_indicator(s, -1);
+        break;
+    case T38_FIELD_HDLC_FCS_BAD_SIG_END:
+        s->current_rx_field_class = T38_FIELD_CLASS_HDLC;
+        if (len > 0)
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_BAD_SIG_END!\n");
+            /* The sender has incorrectly included data in this message. We can safely ignore it, as the
+               bad FCS means we will throw away the whole message, anyway. */
+        }
+        span_log(&s->logging, SPAN_LOG_FLOW, "Type %s - CRC bad, sig end\n", t30_frametype(s->hdlc_buf[s->hdlc_in][2]));
+        if (s->hdlc_contents[s->hdlc_in] != (data_type | 0x200))
+            queue_missing_indicator(s, data_type);
+        if (s->hdlc_len[s->hdlc_in] > 0)
+        {
+            s->hdlc_contents[s->hdlc_in] = (data_type | 0x200);
+            pump_out_final_hdlc(s, FALSE);
+        }
+        s->hdlc_len[s->hdlc_in] = 0;
+        s->hdlc_flags[s->hdlc_in] = 0;
+        s->hdlc_contents[s->hdlc_in] = 0;
+        queue_missing_indicator(s, -1);
+        break;
+    case T38_FIELD_HDLC_SIG_END:
+        if (len > 0)
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_SIG_END!\n");
+            /* The sender has incorrectly included data in this message, but there seems nothing meaningful
+               it could be. There could not be an FCS good/bad report beyond this. */
+        }
+        if (s->hdlc_contents[s->hdlc_in] != (data_type | 0x200))
+            queue_missing_indicator(s, data_type);
+        /* WORKAROUND: At least some Mediatrix boxes have a bug, where they can send this message at the
+                       end of non-ECM data. We need to tolerate this. */
+        if (s->current_rx_field_class != T38_FIELD_CLASS_NON_ECM)
+        {
+            /* This message is expected under 2 circumstances. One is as an alternative to T38_FIELD_HDLC_FCS_OK_SIG_END - 
+               i.e. they send T38_FIELD_HDLC_FCS_OK, and then T38_FIELD_HDLC_SIG_END when the carrier actually drops.
+               The other is because the HDLC signal drops unexpectedly - i.e. not just after a final frame. */
+            s->hdlc_len[s->hdlc_in] = 0;
+            s->hdlc_flags[s->hdlc_in] = 0;
+            s->hdlc_contents[s->hdlc_in] = 0;
+        }
+        else
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "T38_FIELD_HDLC_SIG_END received at the end of non-ECM data!\n");
+            /* Don't flow control the data any more. Just pump out the remainder as fast as we can. */
+            s->non_ecm_tx_latest_eol_ptr = s->non_ecm_tx_in_ptr;
+            s->non_ecm_data_finished = TRUE;
+        }
+        queue_missing_indicator(s, -1);
+        s->current_rx_field_class = T38_FIELD_CLASS_NONE;
+        break;
+    case T38_FIELD_T4_NON_ECM_DATA:
+        s->current_rx_field_class = T38_FIELD_CLASS_NON_ECM;
+        if (s->hdlc_contents[s->hdlc_in] != (data_type | 0x200))
+            queue_missing_indicator(s, data_type);
+        add_to_non_ecm_tx_buffer(s, buf, len);
+        break;
+    case T38_FIELD_T4_NON_ECM_SIG_END:
+        if (len > 0)
+        {
+            if (s->hdlc_contents[s->hdlc_in] != (data_type | 0x200))
+                queue_missing_indicator(s, data_type);
+            add_to_non_ecm_tx_buffer(s, buf, len);
+        }
+        if (s->hdlc_contents[s->hdlc_in] != (data_type | 0x200))
+            queue_missing_indicator(s, data_type);
+        /* WORKAROUND: At least some Mediatrix boxes have a bug, where they can send HDLC signal end where
+                       they should send non-ECM signal end. It is possible they also do the opposite.
+                       We need to tolerate this. */
+        if (s->current_rx_field_class != T38_FIELD_CLASS_HDLC)
+        {
+            /* Don't flow control the data any more. Just pump out the remainder as fast as we can. */
+            s->non_ecm_tx_latest_eol_ptr = s->non_ecm_tx_in_ptr;
+            s->non_ecm_data_finished = TRUE;
+        }
+        else
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "T38_FIELD_NON_ECM_SIG_END received at the end of HDLC data!\n");
+            s->hdlc_len[s->hdlc_in] = 0;
+            s->hdlc_flags[s->hdlc_in] = 0;
+            s->hdlc_contents[s->hdlc_in] = 0;
+        }
+        queue_missing_indicator(s, -1);
+        s->current_rx_field_class = T38_FIELD_CLASS_NONE;
+        break;
+    case T38_FIELD_CM_MESSAGE:
+    case T38_FIELD_JM_MESSAGE:
+    case T38_FIELD_CI_MESSAGE:
+    case T38_FIELD_V34RATE:
+    default:
+        break;
+    }
+    s->current_rx_field_type = field_type;
+    s->current_rx_data_type = data_type;
+
+#if 0
+    if (span_log_test(&s->logging, SPAN_LOG_FLOW))
+    {
+        int i;
+
+        if (len > 0)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Data: ");
+            for (i = 0;  i < len;  i++)
+                span_log(&s->logging, SPAN_LOG_FLOW | SPAN_LOG_SUPPRESS_LABELLING, " %02X", buf[i]);
+        }
+    }
+    span_log(&s->logging, SPAN_LOG_FLOW | SPAN_LOG_SUPPRESS_LABELLING, "\n");
+#endif
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void announce_training(t38_gateway_state_t *s)
+{
+    int ind;
+
+    ind = T38_IND_NO_SIGNAL;
+    switch (s->fast_rx_active)
+    {
+#if defined(ENABLE_V17)
+    case T38_V17_RX:
+        switch (s->fast_bit_rate)
+        {
+        case 7200:
+            ind = (s->short_train)  ?  T38_IND_V17_7200_SHORT_TRAINING  :  T38_IND_V17_7200_LONG_TRAINING;
+            s->current_tx_data_type = T38_DATA_V17_7200;
+            s->octets_per_data_packet = MS_PER_TX_CHUNK*7200/(8*1000);
+            break;
+        case 9600:
+            ind = (s->short_train)  ?  T38_IND_V17_9600_SHORT_TRAINING  :  T38_IND_V17_9600_LONG_TRAINING;
+            s->current_tx_data_type = T38_DATA_V17_9600;
+            s->octets_per_data_packet = MS_PER_TX_CHUNK*9600/(8*1000);
+            break;
+        case 12000:
+            ind = (s->short_train)  ?  T38_IND_V17_12000_SHORT_TRAINING  :  T38_IND_V17_12000_LONG_TRAINING;
+            s->current_tx_data_type = T38_DATA_V17_12000;
+            s->octets_per_data_packet = MS_PER_TX_CHUNK*12000/(8*1000);
+            break;
+        default:
+        case 14400:
+            ind = (s->short_train)  ?  T38_IND_V17_14400_SHORT_TRAINING  :  T38_IND_V17_14400_LONG_TRAINING;
+            s->current_tx_data_type = T38_DATA_V17_14400;
+            s->octets_per_data_packet = MS_PER_TX_CHUNK*14400/(8*1000);
+            break;
+        }
+        break;
+#endif
+    case T38_V27TER_RX:
+        switch (s->fast_bit_rate)
+        {
+        case 2400:
+            ind = T38_IND_V27TER_2400_TRAINING;
+            s->current_tx_data_type = T38_DATA_V27TER_2400;
+            s->octets_per_data_packet = MS_PER_TX_CHUNK*2400/(8*1000);
+            break;
+        default:
+        case 4800:
+            ind = T38_IND_V27TER_4800_TRAINING;
+            s->current_tx_data_type = T38_DATA_V27TER_4800;
+            s->octets_per_data_packet = MS_PER_TX_CHUNK*4800/(8*1000);
+            break;
+        }
+        break;
+    case T38_V29_RX:
+        switch (s->fast_bit_rate)
+        {
+        case 7200:
+            ind = T38_IND_V29_7200_TRAINING;
+            s->current_tx_data_type = T38_DATA_V29_7200;
+            s->octets_per_data_packet = MS_PER_TX_CHUNK*7200/(8*1000);
+            break;
+        default:
+        case 9600:
+            ind = T38_IND_V29_9600_TRAINING;
+            s->current_tx_data_type = T38_DATA_V29_9600;
+            s->octets_per_data_packet = MS_PER_TX_CHUNK*9600/(8*1000);
+            break;
+        }
+        break;
+    }
+    t38_core_send_indicator(&s->t38, ind, INDICATOR_TX_COUNT);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void non_ecm_put_bit(void *user_data, int bit)
+{
+    t38_gateway_state_t *s;
+
+    s = (t38_gateway_state_t *) user_data;
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM carrier training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            /* The modem is now trained */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM carrier trained\n");
+            s->rx_signal_present = TRUE;
+            s->v21_rx_active = FALSE;
+            announce_training(s);
+            s->samples_since_last_tx_packet = 0;
+            s->rx_data_ptr = 0;
+            break;
+        case PUTBIT_CARRIER_UP:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM carrier down\n");
+            switch (s->current_tx_data_type)
+            {
+            case T38_DATA_V17_7200:
+            case T38_DATA_V17_9600:
+            case T38_DATA_V17_12000:
+            case T38_DATA_V17_14400:
+            case T38_DATA_V27TER_2400:
+            case T38_DATA_V27TER_4800:
+            case T38_DATA_V29_7200:
+            case T38_DATA_V29_9600:
+                t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, NULL, 0);
+                t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+                s->rx_signal_present = FALSE;
+                restart_rx_modem(s);
+                break;
+            }
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_WARNING, "Unexpected non-ECM special bit - %d!\n", bit);
+            break;
+        }
+        return;
+    }
+    s->current_non_ecm_octet = (s->current_non_ecm_octet << 1) | (bit & 1);
+    if (++s->non_ecm_bit_no >= 8)
+    {
+        s->rx_data[s->rx_data_ptr++] = (uint8_t) s->current_non_ecm_octet;
+        if (++s->octets_since_last_tx_packet >= s->octets_per_data_packet)
+        {
+            t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_T4_NON_ECM_DATA, s->rx_data, s->rx_data_ptr);
+            /* Since we delay transmission by 2 octets, we should now have sent the last of the data octets when
+                we have just received the last of the CRC octets. */
+            s->rx_data_ptr = 0;
+            s->samples_since_last_tx_packet = 0;
+            s->octets_since_last_tx_packet = 0;
+        }
+        s->non_ecm_bit_no = 0;
+        s->current_non_ecm_octet = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int non_ecm_get_bit(void *user_data)
+{
+    t38_gateway_state_t *s;
+    int bit;
+
+    /* A rate adapting data stuffer for non-ECM image data */
+    s = (t38_gateway_state_t *) user_data;
+    if (s->non_ecm_bit_no <= 0)
+    {
+        /* We need another byte */
+        if (s->non_ecm_tx_out_ptr != s->non_ecm_tx_latest_eol_ptr)
+        {
+            s->current_non_ecm_octet = s->non_ecm_tx_data[s->non_ecm_tx_out_ptr];
+            s->non_ecm_tx_out_ptr = (s->non_ecm_tx_out_ptr + 1) & (T38_TX_BUF_LEN - 1);
+        }
+        else
+        {
+            if (s->non_ecm_data_finished)
+            {
+                /* The queue is empty, and we have received the end of data signal. This must
+                   really be the end to transmission. */
+                s->non_ecm_data_finished = FALSE;
+                /* Reset the data pointers for next time. */
+                s->non_ecm_tx_out_ptr = 0;
+                s->non_ecm_tx_in_ptr = 0;
+                s->non_ecm_tx_latest_eol_ptr = 0;
+                return PUTBIT_END_OF_DATA;
+            }
+            /* The queue is empty, but this does not appear to be the end of the data. Idle with
+               fill octets, which should be safe at this point. */
+            s->current_non_ecm_octet = s->non_ecm_flow_control_fill_octet;
+            s->non_ecm_flow_control_fill_octets++;
+        }
+        s->non_ecm_bit_no = 8;
+    }
+    s->non_ecm_bit_no--;
+    bit = (s->current_non_ecm_octet >> 7) & 1;
+    s->current_non_ecm_octet <<= 1;
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void add_to_non_ecm_tx_buffer(t38_gateway_state_t *s, const uint8_t *buf, int len)
+{
+    int i;
+    int upper;
+    int lower;
+
+    /* A rate adapting data stuffer for non-ECM image data */
+    i = 0;
+    if (s->non_ecm_at_initial_all_ones)
+    {
+        /* Dump initial 0xFF bytes. We will add enough of our own to makes things flow
+           smoothly. If we don't strip these off we might end up delaying the start of
+           forwarding by a large amount, as we could end up with a large block of 0xFF
+           bytes before the real data begins. This is especially true with PC FAX
+           systems. */
+        for (  ;  i < len;  i++)
+        {
+            if (buf[i] != 0xFF)
+            {
+                s->non_ecm_at_initial_all_ones = FALSE;
+                break;
+            }
+        }
+    }
+    if (s->short_train)
+    {
+        for (  ;  i < len;  i++)
+        {
+            /* Check for EOLs, because at an EOL we can pause and pump out zeros while
+               waiting for more incoming data. */
+            if (buf[i])
+            {
+                /* There might be an EOL here. Look for at least 11 zeros, followed by a one. */
+                upper = bottom_bit((s->bit_stream | 0x800) & 0xFFF);
+                lower = top_bit(buf[i] & 0xFF);
+                if (lower > 0  &&  upper - lower >= 3)
+                {
+                    s->non_ecm_tx_latest_eol_ptr = s->non_ecm_tx_in_ptr;
+                    s->non_ecm_flow_control_fill_octet = 0x00;
+                }
+            }
+            s->bit_stream = (s->bit_stream << 8) | buf[i];
+            s->non_ecm_tx_data[s->non_ecm_tx_in_ptr] = buf[i];
+            /* TODO: We can't buffer overflow, since we wrap around. However, the tail could overwrite
+                     itself if things fall badly behind. */
+            s->non_ecm_tx_in_ptr = (s->non_ecm_tx_in_ptr + 1) & (T38_TX_BUF_LEN - 1);
+        }
+    }
+    else
+    {
+        for (  ;  i < len;  i++)
+        {
+            /* Check for zero bytes, as we can pause and pump out zeros while waiting
+               for more incoming data. */
+            if (buf[i] == 0)
+            {
+                s->non_ecm_tx_latest_eol_ptr = s->non_ecm_tx_in_ptr;
+                s->non_ecm_flow_control_fill_octet = 0x00;
+            }
+            s->non_ecm_tx_data[s->non_ecm_tx_in_ptr] = buf[i];
+            /* TODO: We can't buffer overflow, since we wrap around. However, the tail could overwrite
+                     itself if things fall badly behind. */
+            s->non_ecm_tx_in_ptr = (s->non_ecm_tx_in_ptr + 1) & (T38_TX_BUF_LEN - 1);
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void t38_hdlc_rx_put_bit(hdlc_rx_state_t *t, int new_bit)
+{
+    t38_gateway_state_t *s;
+    int final;
+
+    s = (t38_gateway_state_t *) t->user_data;
+    if (new_bit < 0)
+    {
+        /* Special conditions */
+        switch (new_bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC carrier training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            /* The modem is now trained */
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC carrier trained\n");
+            s->rx_signal_present = TRUE;
+            s->v21_rx_active = FALSE;
+            announce_training(s);
+            /* Behave like HDLC preamble has been announced */
+            t->framing_ok_announced = TRUE;
+            s->samples_since_last_tx_packet = 0;
+            s->rx_data_ptr = 0;
+            break;
+        case PUTBIT_CARRIER_UP:
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC carrier up\n");
+            /* Reset the HDLC receiver. */
+            t->len = 0;
+            t->num_bits = 0;
+            t->flags_seen = 0;
+            t->framing_ok_announced = FALSE;
+            s->rx_signal_present = TRUE;
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            span_log(&s->logging, SPAN_LOG_FLOW, "HDLC carrier down\n");
+            if (t->framing_ok_announced)
+            {
+                t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_HDLC_SIG_END, NULL, 0);
+                t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+                t->framing_ok_announced = FALSE;
+            }
+            s->rx_signal_present = FALSE;
+            restart_rx_modem(s);
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_WARNING, "Unexpected HDLC special bit - %d!\n", new_bit);
+            break;
+        }
+        return;
+    }
+    t->raw_bit_stream |= (new_bit & 1);
+    if ((t->raw_bit_stream & 0x3F) == 0x3E)
+    {
+        if ((t->raw_bit_stream & 0x40) == 0)
+        {
+            /* Stuffing */
+        }
+        else if ((t->raw_bit_stream & 0x80))
+        {
+            /* Hit HDLC abort */
+            t->rx_aborts++;
+            t->len = 0;
+            t->num_bits = 0;
+            s->corrupt_the_frame = FALSE;
+            s->octets_since_last_tx_packet = 0;
+        }
+        else
+        {
+            /* Hit HDLC flag */
+            if (t->flags_seen >= t->framing_ok_threshold)
+            {
+                if (t->len)
+                {
+                    if (t->len >= 2)
+                    {
+                        if ((s->crc & 0xFFFF) == 0xF0B8)
+                        {
+                            t->rx_frames++;
+                            t->rx_bytes += t->len - 2;
+                            final = (t->len - 2 >= 2  &&  t->buffer[0] == 0xFF  &&  t->buffer[1] == 0x13);
+                            span_log(&s->logging, SPAN_LOG_FLOW, "E Type %s\n", t30_frametype(t->buffer[2]));
+                            if (s->current_tx_data_type == T38_DATA_V21)
+                                monitor_control_messages(s, t->buffer, t->len, TRUE);
+                            if (s->rx_data_ptr)
+                            {
+                                t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_HDLC_DATA, s->rx_data, s->rx_data_ptr);
+                                s->rx_data_ptr = 0;
+                            }
+                            /* It seems some boxes may not like us sending a _SIG_END here, and then another
+                               when the carrier actually drops. Lets just send T38_FIELD_HDLC_FCS_OK here. */
+                            t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_HDLC_FCS_OK, NULL, 0);
+                        }
+                        else
+                        {
+                            t->rx_crc_errors++;
+                            final = (t->len - 2 >= 2  &&  t->buffer[0] == 0xFF  &&  t->buffer[1] == 0x13);
+                            span_log(&s->logging, SPAN_LOG_FLOW, "F Type %s\n", t30_frametype(t->buffer[2]));
+                            if (s->rx_data_ptr)
+                            {
+                                t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_HDLC_DATA, s->rx_data, s->rx_data_ptr);
+                                s->rx_data_ptr = 0;
+                            }
+                            /* It seems some boxes may not like us sending a _SIG_END here, and then another
+                               when the carrier actually drops. Lets just send T38_FIELD_HDLC_FCS_OK here. */
+                            t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_HDLC_FCS_BAD, NULL, 0);
+                        }
+                    }
+                    else
+                    {
+                        /* Frame too short */
+                        t->rx_length_errors++;
+                    }
+                }
+            }
+            else
+            {
+                if (++t->flags_seen >= t->framing_ok_threshold  &&  !t->framing_ok_announced)
+                {
+                    if (s->current_tx_data_type == T38_DATA_V21)
+                        t38_core_send_indicator(&s->t38, T38_IND_V21_PREAMBLE, INDICATOR_TX_COUNT);
+                    if (s->in_progress_rx_indicator == T38_IND_CNG)
+                        set_next_tx_type(s);
+                    t->framing_ok_announced = TRUE;
+                }
+            }
+            s->crc = 0xFFFF;
+            t->len = 0;
+            t->num_bits = 0;
+            s->corrupt_the_frame = FALSE;
+            s->octets_since_last_tx_packet = 0;
+        }
+    }
+    else
+    {
+        if (t->framing_ok_announced)
+        {
+            t->byte_in_progress = (t->byte_in_progress >> 1) | ((t->raw_bit_stream & 0x01) << 7);
+            if (++t->num_bits == 8)
+            {
+                if (t->len >= (int) sizeof(t->buffer))
+                {
+                    /* Frame too long */
+                    t->rx_length_errors++;
+                    t->flags_seen = t->framing_ok_threshold - 1;
+                    t->len = 0;
+                }
+                else
+                {
+                    t->buffer[t->len] = (uint8_t) t->byte_in_progress;
+                    /* Calculate the CRC progressively, before we start altering the frame */
+                    s->crc = crc_itu16_calc(&t->buffer[t->len], 1, s->crc);
+                    if (t->len >= 2)
+                    {
+                        /* Make the transmission lag by two bytes, so we do not send the CRC, and
+                           do not report the CRC result too late. */
+                        if (s->current_tx_data_type == T38_DATA_V21)
+                        {
+                            /* Edit the message, if we need to control the communication between the
+                               end points. */
+                            switch (t->len)
+                            {
+                            case 4:
+                                switch (t->buffer[2])
+                                {
+                                case T30_NSF:
+                                case T30_NSC:
+                                case T30_NSS:
+                                    /* We need to corrupt the rest of this message */
+                                    span_log(&s->logging, SPAN_LOG_FLOW, "Corrupting non-specific procedures message\n");
+                                    s->corrupt_the_frame = TRUE;
+                                    break;
+                                default:
+                                    break;
+                                }
+                                break;
+                            case 6:
+                                switch (t->buffer[2])
+                                {
+                                case T30_DIS:
+                                    /* We may need to adjust the capabilities, so they do not exceed our own */
+                                    span_log(&s->logging, SPAN_LOG_FLOW, "Constraining the fast modem\n");
+                                    constrain_fast_modem(s, t->buffer, t->len);
+                                    break;
+                                default:
+                                    break;
+                                }
+                                break;
+                            case 7:
+                                if (!s->ecm_allowed)
+                                {
+                                    switch (t->buffer[2])
+                                    {
+                                    case T30_DIS:
+                                        /* Do not allow ECM or T.6 coding */
+                                        span_log(&s->logging, SPAN_LOG_FLOW, "Inhibiting ECM\n");
+                                        t->buffer[6] &= ~(DISBIT3 | DISBIT7);
+                                        break;
+                                }
+                                }
+                                break;
+                            }
+                        }
+                        s->rx_data[s->rx_data_ptr++] = (s->corrupt_the_frame)  ?  0  :  bit_reverse8(t->buffer[t->len - 2]);
+                        if (s->rx_data_ptr >= s->octets_per_data_packet)
+                        {
+                            t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_HDLC_DATA, s->rx_data, s->rx_data_ptr);
+                            /* Since we delay transmission by 2 octets, we should now have sent the last of the data octets when
+                               we have just received the last of the CRC octets. */
+                            s->rx_data_ptr = 0;
+                            s->samples_since_last_tx_packet = 0;
+                        }
+                    }
+                    t->len++;
+                }
+                t->num_bits = 0;
+            }
+        }
+    }
+    t->raw_bit_stream <<= 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int restart_rx_modem(t38_gateway_state_t *s)
+{
+    put_bit_func_t put_bit_func;
+    void *put_bit_user_data;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Restart modem - short = %d, ECM = %d\n", s->short_train,  s->ecm_mode);
+
+    hdlc_rx_init(&(s->hdlcrx), FALSE, TRUE, 5, NULL, s);
+    s->crc = 0xFFFF;
+    s->rx_signal_present = FALSE;
+    /* Default to the transmit data being V.21, unless a faster modem pops up trained. */
+    s->current_tx_data_type = T38_DATA_V21;
+    fsk_rx_init(&(s->v21rx), &preset_fsk_specs[FSK_V21CH2], TRUE, (put_bit_func_t) t38_hdlc_rx_put_bit, &(s->hdlcrx));
+    s->v21_rx_active = TRUE;
+    if (s->short_train  &&  s->ecm_mode)
+    {
+        put_bit_func = (put_bit_func_t) t38_hdlc_rx_put_bit;
+        put_bit_user_data = (void *) &(s->hdlcrx);
+    }
+    else
+    {
+        put_bit_func = non_ecm_put_bit;
+        put_bit_user_data = (void *) s;
+    }
+    s->rx_data_ptr = 0;
+    s->octets_per_data_packet = 1;
+    switch (s->fast_modem)
+    {
+#if defined(ENABLE_V17)
+    case T38_V17_RX:
+        v17_rx_restart(&(s->v17rx), s->fast_bit_rate, s->short_train);
+        v17_rx_set_put_bit(&(s->v17rx), put_bit_func, put_bit_user_data);
+        s->fast_rx_active = T38_V17_RX;
+        break;
+#endif
+    case T38_V27TER_RX:
+        v27ter_rx_restart(&(s->v27ter_rx), s->fast_bit_rate, FALSE);
+        v27ter_rx_set_put_bit(&(s->v27ter_rx), put_bit_func, put_bit_user_data);
+        s->fast_rx_active = T38_V27TER_RX;
+        break;
+    case T38_V29_RX:
+        v29_rx_restart(&(s->v29rx), s->fast_bit_rate, FALSE);
+        v29_rx_set_put_bit(&(s->v29rx), put_bit_func, put_bit_user_data);
+        s->fast_rx_active = T38_V29_RX;
+        break;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t38_gateway_rx(t38_gateway_state_t *s, const int16_t *amp, int len)
+{
+    s->samples_since_last_tx_packet += len;
+    if (s->v21_rx_active)
+        fsk_rx(&(s->v21rx), amp, len);
+    switch (s->fast_rx_active)
+    {
+#if defined(ENABLE_V17)
+    case T38_V17_RX:
+        v17_rx(&(s->v17rx), amp, len);
+        break;
+#endif
+    case T38_V27TER_RX:
+        v27ter_rx(&(s->v27ter_rx), amp, len);
+        break;
+    case T38_V29_RX:
+        v29_rx(&(s->v29rx), amp, len);
+        break;
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t38_gateway_tx(t38_gateway_state_t *s, int16_t *amp, int max_len)
+{
+    int len;
+
+    if ((len = s->tx_handler(s->tx_user_data, amp, max_len)) < max_len)
+    {
+        if (set_next_tx_type(s))
+        {
+            /* Give the new handler a chance to file the remaining buffer space */
+            len += s->tx_handler(s->tx_user_data, amp + len, max_len - len);
+            if (len < max_len)
+            {
+                silence_gen_set(&(s->silence_gen), 0);
+                set_next_tx_type(s);
+            }
+        }
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t38_gateway_ecm_control(t38_gateway_state_t *s, int ecm_allowed)
+{
+    s->ecm_allowed = ecm_allowed;
+}
+/*- End of function --------------------------------------------------------*/
+
+t38_gateway_state_t *t38_gateway_init(t38_gateway_state_t *s,
+                                      t38_tx_packet_handler_t *tx_packet_handler,
+                                      void *tx_packet_user_data)
+{
+    if (tx_packet_handler == NULL)
+        return NULL;
+
+    memset(s, 0, sizeof(*s));
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "T.38G");
+#if defined(ENABLE_V17)
+    v17_rx_init(&(s->v17rx), 14400, non_ecm_put_bit, s);
+    v17_tx_init(&(s->v17tx), 14400, FALSE, non_ecm_get_bit, s);
+#endif
+    v29_rx_init(&(s->v29rx), 9600, non_ecm_put_bit, s);
+    v29_tx_init(&(s->v29tx), 9600, FALSE, non_ecm_get_bit, s);
+    v27ter_rx_init(&(s->v27ter_rx), 4800, non_ecm_put_bit, s);
+    v27ter_tx_init(&(s->v27ter_tx), 4800, FALSE, non_ecm_get_bit, s);
+    s->octets_per_data_packet = 1;
+    silence_gen_init(&(s->silence_gen), 0);
+    hdlc_tx_init(&s->hdlctx, FALSE, 2, TRUE, hdlc_underflow_handler, s);
+    s->rx_signal_present = FALSE;
+    s->tx_handler = (span_tx_handler_t *) &(silence_gen);
+    s->tx_user_data = &(s->silence_gen);
+    t38_core_init(&s->t38, process_rx_indicator, process_rx_data, process_rx_missing, (void *) s);
+    s->t38.iaf = FALSE;
+    s->t38.tx_packet_handler = tx_packet_handler;
+    s->t38.tx_packet_user_data = tx_packet_user_data;
+#if defined(ENABLE_V17)
+    s->t38.fastest_image_data_rate = 14400;
+#else
+    s->t38.fastest_image_data_rate = 9600;
+#endif
+    s->ecm_allowed = FALSE;
+    restart_rx_modem(s);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/t38_terminal.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,722 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_terminal.c - An implementation of a T.38 terminal, less the packet exchange part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_terminal.c,v 1.50 2006/12/08 12:47:29 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <fcntl.h>
+#include <time.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <tiffio.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/queue.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/complex.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/fsk.h"
+#include "spandsp/v29rx.h"
+#include "spandsp/v29tx.h"
+#include "spandsp/v27ter_rx.h"
+#include "spandsp/v27ter_tx.h"
+#if defined(ENABLE_V17)
+#include "spandsp/v17rx.h"
+#include "spandsp/v17tx.h"
+#endif
+#include "spandsp/t4.h"
+
+#include "spandsp/t30_fcf.h"
+#include "spandsp/t35.h"
+#include "spandsp/t30.h"
+
+#include "spandsp/t38_core.h"
+#include "spandsp/t38_terminal.h"
+
+#define MS_PER_TX_CHUNK             30
+
+#define INDICATOR_TX_COUNT          3
+/* Backstop timeout if reception of packets stops in the middle of a burst */
+#define MID_RX_TIMEOUT              15000
+
+enum
+{
+    T38_TIMED_STEP_NONE = 0,
+    T38_TIMED_STEP_NON_ECM_MODEM,
+    T38_TIMED_STEP_NON_ECM_MODEM_2,
+    T38_TIMED_STEP_NON_ECM_MODEM_3,
+    T38_TIMED_STEP_HDLC_MODEM,
+    T38_TIMED_STEP_HDLC_MODEM_2,
+    T38_TIMED_STEP_HDLC_MODEM_3,
+    T38_TIMED_STEP_CED,
+    T38_TIMED_STEP_CNG,
+    T38_TIMED_STEP_PAUSE
+};
+
+static int get_non_ecm_image_chunk(t38_terminal_state_t *s, uint8_t *buf, int len)
+{
+    int i;
+    int j;
+    int bit;
+    int byte;
+
+    for (i = 0;  i < len;  i++)
+    {
+        byte = 0;
+        for (j = 0;  j < 8;  j++)
+        {
+            if ((bit = t30_non_ecm_get_bit(&s->t30_state)) == PUTBIT_END_OF_DATA)
+            {
+                if (j > 0)
+                {
+                    byte <<= (8 - j);
+                    buf[i++] = (uint8_t) byte;
+                }
+                return -i;
+            }
+            byte = (byte << 1) | (bit & 0x01);
+        }
+        buf[i] = (uint8_t) byte;
+    }
+    return i;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_rx_missing(t38_core_state_t *s, void *user_data, int rx_seq_no, int expected_seq_no)
+{
+    t38_terminal_state_t *t;
+    
+    t = (t38_terminal_state_t *) user_data;
+    t->missing_data = TRUE;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_rx_indicator(t38_core_state_t *s, void *user_data, int indicator)
+{
+    t38_terminal_state_t *t;
+    
+    t = (t38_terminal_state_t *) user_data;
+    /* In termination mode we don't care very much about indicators telling us training
+       is starting. We only care about the actual data. */
+    switch (indicator)
+    {
+    case T38_IND_NO_SIGNAL:
+        if (t->t38.current_rx_indicator == T38_IND_V21_PREAMBLE
+            &&
+            (t->current_rx_type == T30_MODEM_V21  ||  t->current_rx_type == T30_MODEM_CNG))
+        {
+            t30_hdlc_accept(&(t->t30_state), TRUE, NULL, PUTBIT_CARRIER_DOWN);
+        }
+        t->timeout_rx_samples = 0;
+        break;
+    case T38_IND_CNG:
+        break;
+    case T38_IND_CED:
+        break;
+    case T38_IND_V21_PREAMBLE:
+        if (t->current_rx_type == T30_MODEM_V21)
+        {
+            t30_hdlc_accept(&(t->t30_state), TRUE, NULL, PUTBIT_CARRIER_UP);
+            t30_hdlc_accept(&(t->t30_state), TRUE, NULL, PUTBIT_FRAMING_OK);
+        }
+        break;
+    case T38_IND_V27TER_2400_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V27TER_4800_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V29_7200_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V29_9600_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V17_7200_SHORT_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V17_7200_LONG_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V17_9600_SHORT_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V17_9600_LONG_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V17_12000_SHORT_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V17_12000_LONG_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V17_14400_SHORT_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V17_14400_LONG_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V8_ANSAM:
+        break;
+    case T38_IND_V8_SIGNAL:
+        break;
+    case T38_IND_V34_CNTL_CHANNEL_1200:
+        break;
+    case T38_IND_V34_PRI_CHANNEL:
+        break;
+    case T38_IND_V34_CC_RETRAIN:
+        break;
+    case T38_IND_V33_12000_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_IND_V33_14400_TRAINING:
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    default:
+        break;
+    }
+    t->tx_out_bytes = 0;
+    t->missing_data = FALSE;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int process_rx_data(t38_core_state_t *s, void *user_data, int data_type, int field_type, const uint8_t *buf, int len)
+{
+    int i;
+    t38_terminal_state_t *t;
+    
+    t = (t38_terminal_state_t *) user_data;
+#if 0
+    /* In termination mode we don't care very much what the data type is. */
+    switch (data_type)
+    {
+    case T38_DATA_V21:
+    case T38_DATA_V27TER_2400:
+    case T38_DATA_V27TER_4800:
+    case T38_DATA_V29_7200:
+    case T38_DATA_V29_9600:
+    case T38_DATA_V17_7200:
+    case T38_DATA_V17_9600:
+    case T38_DATA_V17_12000:
+    case T38_DATA_V17_14400:
+    case T38_DATA_V8:
+    case T38_DATA_V34_PRI_RATE:
+    case T38_DATA_V34_CC_1200:
+    case T38_DATA_V34_PRI_CH:
+    case T38_DATA_V33_12000:
+    case T38_DATA_V33_14400:
+    default:
+        break;
+    }
+#endif
+
+    switch (field_type)
+    {
+    case T38_FIELD_HDLC_DATA:
+        if (t->tx_out_bytes + len <= T38_MAX_HDLC_LEN)
+        {
+            for (i = 0;  i < len;  i++)
+                t->tx_data[t->tx_out_bytes++] = bit_reverse8(buf[i]);
+        }
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_FIELD_HDLC_FCS_OK:
+        if (len > 0)
+        {
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_OK!\n");
+            /* The sender has incorrectly included data in this message. It is unclear what we should do
+               with it, to maximise tolerance of buggy implementations. */
+        }
+        span_log(&t->logging, SPAN_LOG_FLOW, "Type %s - CRC OK (%s)\n", (t->tx_out_bytes >= 3)  ?  t30_frametype(t->tx_data[2])  :  "???", (t->missing_data)  ?  "missing octets"  :  "clean");
+        /* Don't deal with zero length frames. Some T.38 implementations send multiple T38_FIELD_HDLC_FCS_OK
+           packets, when they have sent no data for the body of the frame. */
+        if (t->tx_out_bytes > 0)
+            t30_hdlc_accept(&(t->t30_state), !t->missing_data, t->tx_data, t->tx_out_bytes);
+        t->tx_out_bytes = 0;
+        t->missing_data = FALSE;
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_FIELD_HDLC_FCS_BAD:
+        if (len > 0)
+        {
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_BAD!\n");
+            /* The sender has incorrectly included data in this message. We can safely ignore it, as the
+               bad FCS means we will throw away the whole message, anyway. */
+        }
+        span_log(&t->logging, SPAN_LOG_FLOW, "Type %s - CRC bad (%s)\n", (t->tx_out_bytes >= 3)  ?  t30_frametype(t->tx_data[2])  :  "???", (t->missing_data)  ?  "missing octets"  :  "clean");
+        if (t->tx_out_bytes > 0)
+            t30_hdlc_accept(&(t->t30_state), FALSE, t->tx_data, t->tx_out_bytes);
+        t->tx_out_bytes = 0;
+        t->missing_data = FALSE;
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_FIELD_HDLC_FCS_OK_SIG_END:
+        if (len > 0)
+        {
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_OK_SIG_END!\n");
+            /* The sender has incorrectly included data in this message. It is unclear what we should do
+               with it, to maximise tolerance of buggy implementations. */
+        }
+        span_log(&t->logging, SPAN_LOG_FLOW, "Type %s - CRC OK, sig end (%s)\n", (t->tx_out_bytes >= 3)  ?  t30_frametype(t->tx_data[2])  :  "???", (t->missing_data)  ?  "missing octets"  :  "clean");
+        /* Don't deal with zero length frames. Some T.38 implementations send multiple T38_FIELD_HDLC_FCS_OK
+           packets, when they have sent no data for the body of the frame. */
+        if (t->tx_out_bytes > 0)
+            t30_hdlc_accept(&(t->t30_state), !t->missing_data, t->tx_data, t->tx_out_bytes);
+        t30_hdlc_accept(&(t->t30_state), TRUE, NULL, PUTBIT_CARRIER_DOWN);
+        t->tx_out_bytes = 0;
+        t->missing_data = FALSE;
+        t->timeout_rx_samples = 0;
+        break;
+    case T38_FIELD_HDLC_FCS_BAD_SIG_END:
+        if (len > 0)
+        {
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_FCS_BAD_SIG_END!\n");
+            /* The sender has incorrectly included data in this message. We can safely ignore it, as the
+               bad FCS means we will throw away the whole message, anyway. */
+        }
+        span_log(&t->logging, SPAN_LOG_FLOW, "Type %s - CRC bad, sig end (%s)\n", (t->tx_out_bytes >= 3)  ?  t30_frametype(t->tx_data[2])  :  "???", (t->missing_data)  ?  "missing octets"  :  "clean");
+        if (t->tx_out_bytes > 0)
+            t30_hdlc_accept(&(t->t30_state), FALSE, t->tx_data, t->tx_out_bytes);
+        t30_hdlc_accept(&(t->t30_state), TRUE, NULL, PUTBIT_CARRIER_DOWN);
+        t->tx_out_bytes = 0;
+        t->missing_data = FALSE;
+        t->timeout_rx_samples = 0;
+        break;
+    case T38_FIELD_HDLC_SIG_END:
+        if (len > 0)
+        {
+            span_log(&t->logging, SPAN_LOG_WARNING, "There is data in a T38_FIELD_HDLC_SIG_END!\n");
+            /* The sender has incorrectly included data in this message, but there seems nothing meaningful
+               it could be. There could not be an FCS good/bad report beyond this. */
+        }
+        /* This message is expected under 2 circumstances. One is as an alternative to T38_FIELD_HDLC_FCS_OK_SIG_END - 
+           i.e. they send T38_FIELD_HDLC_FCS_OK, and then T38_FIELD_HDLC_SIG_END when the carrier actually drops.
+           The other is because the HDLC signal drops unexpectedly - i.e. not just after a final frame. */
+        /* WORKAROUND: At least some Mediatrix boxes have a bug, where they can send this message at the
+                       end of non-ECM data. We need to tolerate this. We use the generic receive complete
+                       indication, rather than the specific HDLC carrier down. */
+        t->tx_out_bytes = 0;
+        t->missing_data = FALSE;
+        t->timeout_rx_samples = 0;
+        t30_receive_complete(&(t->t30_state));
+        break;
+    case T38_FIELD_T4_NON_ECM_DATA:
+        if (!t->rx_signal_present)
+        {
+            t30_non_ecm_put_bit(&(t->t30_state), PUTBIT_TRAINING_SUCCEEDED);
+            t->rx_signal_present = TRUE;
+        }
+        for (i = 0;  i < len;  i++)
+            t30_non_ecm_putbyte(&(t->t30_state), buf[i]);
+        t->timeout_rx_samples = t->samples + ms_to_samples(MID_RX_TIMEOUT);
+        break;
+    case T38_FIELD_T4_NON_ECM_SIG_END:
+        if (len > 0)
+        {
+            if (!t->rx_signal_present)
+            {
+                t30_non_ecm_put_bit(&(t->t30_state), PUTBIT_TRAINING_SUCCEEDED);
+                t->rx_signal_present = TRUE;
+            }
+            for (i = 0;  i < len;  i++)
+                t30_non_ecm_putbyte(&(t->t30_state), buf[i]);
+        }
+        /* WORKAROUND: At least some Mediatrix boxes have a bug, where they can send HDLC signal end where
+                       they should send non-ECM signal end. It is possible they also do the opposite.
+                       We need to tolerate this, so we use the generic receive complete
+                       indication, rather than the specific non-ECM carrier down. */
+        t30_receive_complete(&(t->t30_state));
+        t->rx_signal_present = FALSE;
+        t->timeout_rx_samples = 0;
+        break;
+    case T38_FIELD_CM_MESSAGE:
+    case T38_FIELD_JM_MESSAGE:
+    case T38_FIELD_CI_MESSAGE:
+    case T38_FIELD_V34RATE:
+    default:
+        break;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void send_hdlc(void *user_data, const uint8_t *msg, int len)
+{
+    t38_terminal_state_t *s;
+    int j;
+
+    s = (t38_terminal_state_t *) user_data;
+    if (len <= 0)
+    {
+        s->hdlc_tx_len = -1;
+    }
+    else
+    {
+        for (j = 0;  j < len;  j++)
+            s->hdlc_tx_buf[j] = bit_reverse8(msg[j]);
+        s->hdlc_tx_len = len;
+        s->hdlc_tx_ptr = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int t38_terminal_send_timeout(t38_terminal_state_t *s, int samples)
+{
+    int len;
+    int i;
+    int previous;
+    uint8_t buf[100];
+    /* Training times for all the modem options, with and without TEP */
+    static const int training_time[] =
+    {
+           0,      0,   /* T38_IND_NO_SIGNAL */
+           0,      0,   /* T38_IND_CNG */
+           0,      0,   /* T38_IND_CED */
+        1000,   1000,   /* T38_IND_V21_PREAMBLE */
+         943,   1158,   /* T38_IND_V27TER_2400_TRAINING */
+         708,    923,   /* T38_IND_V27TER_4800_TRAINING */
+         234,    454,   /* T38_IND_V29_7200_TRAINING */
+         234,    454,   /* T38_IND_V29_9600_TRAINING */
+         142,    367,   /* T38_IND_V17_7200_SHORT_TRAINING */
+        1393,   1618,   /* T38_IND_V17_7200_LONG_TRAINING */
+         142,    367,   /* T38_IND_V17_9600_SHORT_TRAINING */
+        1393,   1618,   /* T38_IND_V17_9600_LONG_TRAINING */
+         142,    367,   /* T38_IND_V17_12000_SHORT_TRAINING */
+        1393,   1618,   /* T38_IND_V17_12000_LONG_TRAINING */
+         142,    367,   /* T38_IND_V17_14400_SHORT_TRAINING */
+        1393,   1618,   /* T38_IND_V17_14400_LONG_TRAINING */
+           0,      0,   /* T38_IND_V8_ANSAM */
+           0,      0,   /* T38_IND_V8_SIGNAL */
+           0,      0,   /* T38_IND_V34_CNTL_CHANNEL_1200 */
+           0,      0,   /* T38_IND_V34_PRI_CHANNEL */
+           0,      0,   /* T38_IND_V34_CC_RETRAIN */
+           0,      0,   /* T38_IND_V33_12000_TRAINING */
+           0,      0,   /* T38_IND_V33_14400_TRAINING */
+    };
+
+    if (s->current_rx_type == T30_MODEM_DONE  ||  s->current_tx_type == T30_MODEM_DONE)
+        return TRUE;
+
+    s->samples += samples;
+    t30_timer_update(&s->t30_state, samples);
+    if (s->timeout_rx_samples  &&  s->samples > s->timeout_rx_samples)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Timeout mid-receive\n");
+        s->timeout_rx_samples = 0;
+        t30_receive_complete(&(s->t30_state));
+    }
+    if (s->timed_step == T38_TIMED_STEP_NONE)
+        return FALSE;
+    if (s->samples < s->next_tx_samples)
+        return FALSE;
+    /* Its time to send something */
+    switch (s->timed_step)
+    {
+    case T38_TIMED_STEP_NON_ECM_MODEM:
+        /* Create a 75ms silence */
+        if (s->t38.current_tx_indicator != T38_IND_NO_SIGNAL)
+            t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+        s->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_2;
+        s->next_tx_samples += ms_to_samples(75);
+        break;
+    case T38_TIMED_STEP_NON_ECM_MODEM_2:
+        /* Switch on a fast modem, and give the training time to complete */
+        t38_core_send_indicator(&s->t38, s->next_tx_indicator, INDICATOR_TX_COUNT);
+        s->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_3;
+        s->next_tx_samples += ms_to_samples(training_time[s->next_tx_indicator << 1]);
+        break;
+    case T38_TIMED_STEP_NON_ECM_MODEM_3:
+        /* Send a chunk of non-ECM image data */
+        /* T.38 says it is OK to send the last of the non-ECM data in the signal end message.
+           However, I think the early versions of T.38 said the signal end message should not
+           contain data. Hopefully, following the current spec will not cause compatibility
+           issues. */
+        if ((len = get_non_ecm_image_chunk(s, buf, s->octets_per_data_packet)) > 0)
+        {
+            s->next_tx_samples += ms_to_samples(MS_PER_TX_CHUNK);
+            t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_T4_NON_ECM_DATA, buf, len);
+        }
+        else
+        {
+            t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, buf, -len);
+            /* This should not be needed, since the message above indicates the end of the signal, but it
+               seems like it can improve compatibility with quirky implementations. */
+            t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+            s->timed_step = T38_TIMED_STEP_NONE;
+            t30_send_complete(&(s->t30_state));
+        }
+        break;
+    case T38_TIMED_STEP_HDLC_MODEM:
+        /* Send HDLC preambling */
+        t38_core_send_indicator(&s->t38, s->next_tx_indicator, INDICATOR_TX_COUNT);
+        s->next_tx_samples += ms_to_samples(training_time[s->next_tx_indicator << 1]);
+        s->timed_step = T38_TIMED_STEP_HDLC_MODEM_2;
+        break;
+    case T38_TIMED_STEP_HDLC_MODEM_2:
+        /* Send a chunk of HDLC data */
+        i = s->octets_per_data_packet;
+        if (i >= (s->hdlc_tx_len - s->hdlc_tx_ptr))
+        {
+            i = s->hdlc_tx_len - s->hdlc_tx_ptr;
+            s->timed_step = T38_TIMED_STEP_HDLC_MODEM_3;
+        }
+        t38_core_send_data(&s->t38, s->current_tx_data_type, T38_FIELD_HDLC_DATA, &s->hdlc_tx_buf[s->hdlc_tx_ptr], i);
+        s->hdlc_tx_ptr += i;
+        s->next_tx_samples += ms_to_samples(MS_PER_TX_CHUNK);
+        break;
+    case T38_TIMED_STEP_HDLC_MODEM_3:
+        /* End of HDLC frame */
+        previous = s->current_tx_data_type;
+        s->hdlc_tx_ptr = 0;
+        s->hdlc_tx_len = 0;
+        t30_send_complete(&s->t30_state);
+        if (s->hdlc_tx_len < 0)
+        {
+            t38_core_send_data(&s->t38, previous, T38_FIELD_HDLC_FCS_OK_SIG_END, NULL, 0);
+            /* We have already sent T38_FIELD_HDLC_FCS_OK_SIG_END. It seems some boxes may not like
+               us sending a T38_FIELD_HDLC_SIG_END at this point. Just say there is no signal. */
+            t38_core_send_indicator(&s->t38, T38_IND_NO_SIGNAL, INDICATOR_TX_COUNT);
+            s->hdlc_tx_len = 0;
+            t30_send_complete(&s->t30_state);
+            if (s->hdlc_tx_len)
+                s->timed_step = T38_TIMED_STEP_HDLC_MODEM;
+        }
+        else
+        {
+            t38_core_send_data(&s->t38, previous, T38_FIELD_HDLC_FCS_OK, NULL, 0);
+            if (s->hdlc_tx_len)
+                s->timed_step = T38_TIMED_STEP_HDLC_MODEM_2;
+        }
+        s->next_tx_samples += ms_to_samples(MS_PER_TX_CHUNK);
+        break;
+    case T38_TIMED_STEP_CED:
+        /* Initial 200ms delay over. Send the CED indicator */
+        s->next_tx_samples = s->samples + ms_to_samples(3000);
+        s->timed_step = T38_TIMED_STEP_PAUSE;
+        t38_core_send_indicator(&s->t38, T38_IND_CED, INDICATOR_TX_COUNT);
+        s->current_tx_data_type = T38_DATA_NONE;
+        break;
+    case T38_TIMED_STEP_CNG:
+        /* Initial short delay over. Send the CNG indicator */
+        s->timed_step = T38_TIMED_STEP_NONE;
+        t38_core_send_indicator(&s->t38, T38_IND_CNG, INDICATOR_TX_COUNT);
+        s->current_tx_data_type = T38_DATA_NONE;
+        break;
+    case T38_TIMED_STEP_PAUSE:
+        /* End of timed pause */
+        s->timed_step = T38_TIMED_STEP_NONE;
+        t30_send_complete(&s->t30_state);
+        break;
+    }
+    return FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void set_rx_type(void *user_data, int type, int short_train, int use_hdlc)
+{
+    t38_terminal_state_t *s;
+
+    s = (t38_terminal_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Set rx type %d\n", type);
+    s->current_rx_type = type;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void set_tx_type(void *user_data, int type, int short_train, int use_hdlc)
+{
+    t38_terminal_state_t *s;
+
+    s = (t38_terminal_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Set tx type %d\n", type);
+    if (s->current_tx_type == type)
+        return;
+
+    switch (type)
+    {
+    case T30_MODEM_NONE:
+        s->timed_step = T38_TIMED_STEP_NONE;
+        s->current_tx_data_type = T38_DATA_NONE;
+        break;
+    case T30_MODEM_PAUSE:
+        s->next_tx_samples = s->samples + ms_to_samples(short_train);
+        s->timed_step = T38_TIMED_STEP_PAUSE;
+        s->current_tx_data_type = T38_DATA_NONE;
+        break;
+    case T30_MODEM_CED:
+        /* A 200ms initial delay is specified. Delay this amount before the CED indicator is sent. */
+        s->next_tx_samples = s->samples + ms_to_samples(200);
+        s->timed_step = T38_TIMED_STEP_CED;
+        s->current_tx_data_type = T38_DATA_NONE;
+        break;
+    case T30_MODEM_CNG:
+        /* Allow a short initial delay, so the chances of the other end actually being ready to receive
+           the CNG indicator are improved. */
+        s->next_tx_samples = s->samples + ms_to_samples(200);
+        s->timed_step = T38_TIMED_STEP_CNG;
+        s->current_tx_data_type = T38_DATA_NONE;
+        break;
+    case T30_MODEM_V21:
+        if (s->current_tx_type > T30_MODEM_V21)
+        {
+            /* Pause before switching from phase C, as per T.30. If we omit this, the receiver
+               might not see the carrier fall between the high speed and low speed sections. */
+            s->next_tx_samples = s->samples + ms_to_samples(75);
+        }
+        else
+        {
+            s->next_tx_samples = s->samples;
+        }
+        s->octets_per_data_packet = MS_PER_TX_CHUNK*300/(8*1000);
+        s->next_tx_indicator = T38_IND_V21_PREAMBLE;
+        s->current_tx_data_type = T38_DATA_V21;
+        s->timed_step = (use_hdlc)  ?  T38_TIMED_STEP_HDLC_MODEM  :  T38_TIMED_STEP_NON_ECM_MODEM;
+        break;
+    case T30_MODEM_V27TER_2400:
+        s->octets_per_data_packet = MS_PER_TX_CHUNK*2400/(8*1000);
+        s->next_tx_indicator = T38_IND_V27TER_2400_TRAINING;
+        s->current_tx_data_type = T38_DATA_V27TER_2400;
+        s->next_tx_samples = s->samples + ms_to_samples(MS_PER_TX_CHUNK);
+        s->timed_step = (use_hdlc)  ?  T38_TIMED_STEP_HDLC_MODEM  :  T38_TIMED_STEP_NON_ECM_MODEM;
+        break;
+    case T30_MODEM_V27TER_4800:
+        s->octets_per_data_packet = MS_PER_TX_CHUNK*4800/(8*1000);
+        s->next_tx_indicator = T38_IND_V27TER_4800_TRAINING;
+        s->current_tx_data_type = T38_DATA_V27TER_4800;
+        s->next_tx_samples = s->samples + ms_to_samples(MS_PER_TX_CHUNK);
+        s->timed_step = (use_hdlc)  ?  T38_TIMED_STEP_HDLC_MODEM  :  T38_TIMED_STEP_NON_ECM_MODEM;
+        break;
+    case T30_MODEM_V29_7200:
+        s->octets_per_data_packet = MS_PER_TX_CHUNK*7200/(8*1000);
+        s->next_tx_indicator = T38_IND_V29_7200_TRAINING;
+        s->current_tx_data_type = T38_DATA_V29_7200;
+        s->next_tx_samples = s->samples + ms_to_samples(MS_PER_TX_CHUNK);
+        s->timed_step = (use_hdlc)  ?  T38_TIMED_STEP_HDLC_MODEM  :  T38_TIMED_STEP_NON_ECM_MODEM;
+        break;
+    case T30_MODEM_V29_9600:
+        s->octets_per_data_packet = MS_PER_TX_CHUNK*9600/(8*1000);
+        s->next_tx_indicator = T38_IND_V29_9600_TRAINING;
+        s->current_tx_data_type = T38_DATA_V29_9600;
+        s->next_tx_samples = s->samples + ms_to_samples(MS_PER_TX_CHUNK);
+        s->timed_step = (use_hdlc)  ?  T38_TIMED_STEP_HDLC_MODEM  :  T38_TIMED_STEP_NON_ECM_MODEM;
+        break;
+    case T30_MODEM_V17_7200:
+        s->octets_per_data_packet = MS_PER_TX_CHUNK*7200/(8*1000);
+        s->next_tx_indicator = (short_train)  ?  T38_IND_V17_7200_SHORT_TRAINING  :  T38_IND_V17_7200_LONG_TRAINING;
+        s->current_tx_data_type = T38_DATA_V17_7200;
+        s->next_tx_samples = s->samples + ms_to_samples(MS_PER_TX_CHUNK);
+        s->timed_step = (use_hdlc)  ?  T38_TIMED_STEP_HDLC_MODEM  :  T38_TIMED_STEP_NON_ECM_MODEM;
+        break;
+    case T30_MODEM_V17_9600:
+        s->octets_per_data_packet = MS_PER_TX_CHUNK*9600/(8*1000);
+        s->next_tx_indicator = (short_train)  ?  T38_IND_V17_9600_SHORT_TRAINING  :  T38_IND_V17_9600_LONG_TRAINING;
+        s->current_tx_data_type = T38_DATA_V17_9600;
+        s->next_tx_samples = s->samples + ms_to_samples(MS_PER_TX_CHUNK);
+        s->timed_step = (use_hdlc)  ?  T38_TIMED_STEP_HDLC_MODEM  :  T38_TIMED_STEP_NON_ECM_MODEM;
+        break;
+    case T30_MODEM_V17_12000:
+        s->octets_per_data_packet = MS_PER_TX_CHUNK*12000/(8*1000);
+        s->next_tx_indicator = (short_train)  ?  T38_IND_V17_12000_SHORT_TRAINING  :  T38_IND_V17_12000_LONG_TRAINING;
+        s->current_tx_data_type = T38_DATA_V17_12000;
+        s->next_tx_samples = s->samples + ms_to_samples(MS_PER_TX_CHUNK);
+        s->timed_step = (use_hdlc)  ?  T38_TIMED_STEP_HDLC_MODEM  :  T38_TIMED_STEP_NON_ECM_MODEM;
+        break;
+    case T30_MODEM_V17_14400:
+        s->octets_per_data_packet = MS_PER_TX_CHUNK*14400/(8*1000);
+        s->next_tx_indicator = (short_train)  ?  T38_IND_V17_14400_SHORT_TRAINING  :  T38_IND_V17_14400_LONG_TRAINING;
+        s->current_tx_data_type = T38_DATA_V17_14400;
+        s->next_tx_samples = s->samples + ms_to_samples(MS_PER_TX_CHUNK);
+        s->timed_step = (use_hdlc)  ?  T38_TIMED_STEP_HDLC_MODEM  :  T38_TIMED_STEP_NON_ECM_MODEM;
+        break;
+    case T30_MODEM_DONE:
+        span_log(&s->logging, SPAN_LOG_FLOW, "FAX exchange complete\n");
+        s->timed_step = T38_TIMED_STEP_NONE;
+        s->current_tx_data_type = T38_DATA_NONE;
+        break;
+    }
+    s->current_tx_type = type;
+}
+/*- End of function --------------------------------------------------------*/
+
+t38_terminal_state_t *t38_terminal_init(t38_terminal_state_t *s,
+                                        int calling_party,
+                                        t38_tx_packet_handler_t *tx_packet_handler,
+                                        void *tx_packet_user_data)
+{
+    if (tx_packet_handler == NULL)
+        return NULL;
+
+    memset(s, 0, sizeof(*s));
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "T.38T");
+    s->rx_signal_present = FALSE;
+
+    s->timed_step = T38_TIMED_STEP_NONE;
+    s->hdlc_tx_ptr = 0;
+
+    t38_core_init(&s->t38, process_rx_indicator, process_rx_data, process_rx_missing, (void *) s);
+    s->t38.iaf = TRUE;
+    s->t38.tx_packet_handler = tx_packet_handler;
+    s->t38.tx_packet_user_data = tx_packet_user_data;
+    s->t38.fastest_image_data_rate = 14400;
+
+    s->timed_step = T38_TIMED_STEP_NONE;
+    s->current_tx_data_type = T38_DATA_NONE;
+    s->next_tx_samples = 0;
+
+    t30_init(&(s->t30_state),
+             calling_party,
+             set_rx_type,
+             (void *) s,
+             set_tx_type,
+             (void *) s,
+             send_hdlc,
+             (void *) s);
+    t30_set_supported_modems(&(s->t30_state),
+                             T30_SUPPORT_V27TER | T30_SUPPORT_V29 | T30_SUPPORT_V17);
+    t30_restart(&s->t30_state);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/t4.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1999 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t4.c - ITU T.4 FAX image processing
+ * This depends on libtiff (see <http://www.libtiff.org>)
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t4.c,v 1.67 2006/12/01 18:00:48 steveu Exp $
+ */
+
+/*
+ * Much of this file is based on the T.4 and T.6 support in libtiff, which requires
+ * the following notice in any derived source code:
+ *
+ * Copyright (c) 1990-1997 Sam Leffler
+ * Copyright (c) 1991-1997 Silicon Graphics, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and 
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
+ * 
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+ * OF THIS SOFTWARE.
+ *
+ * Decoder support is derived from code in Frank Cringle's viewfax program;
+ *      Copyright (C) 1990, 1995  Frank D. Cringle.
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <time.h>
+#include <memory.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/async.h"
+#include "spandsp/t4.h"
+
+/* Finite state machine state codes */
+#define S_Null                  0
+#define S_Pass                  1
+#define S_Horiz                 2
+#define S_V0                    3
+#define S_VR                    4
+#define S_VL                    5
+#define S_Ext                   6
+#define S_TermW                 7
+#define S_TermB                 8
+#define S_MakeUpW               9
+#define S_MakeUpB               10
+#define S_MakeUp                11
+#define S_EOL                   12
+
+#include "faxfont.h"
+
+#if 1
+#define STATE_TRACE(...) /**/
+#else
+void STATE_TRACE(char *format, ...)
+{
+    va_list arg_ptr;
+
+    va_start(arg_ptr, format);
+    vprintf(format, arg_ptr);
+    va_end(arg_ptr);
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+/* Finite state machine state table entry */
+typedef struct
+{
+    uint8_t state;          /* see above */
+    uint8_t width;          /* width of code in bits */
+    uint32_t param;         /* run length in bits */
+} T4_tab_entry;
+
+#include "t4states.h"
+
+/* From the T.4 spec:
+
+    a0	The reference or starting changing element on the coding line. At
+        the start of the coding line, a0 is set on an imaginary white
+        changing element situated just before the first element on the
+        line. During the coding of the coding line, the position of a0
+        is defined by the previous coding mode. (See 4.2.1.3.2.)
+    a1	The next changing element to the right of a0 on the coding line.
+    a2	The next changing element to the right of a1 on the coding line.
+    b1	The first changing element on the reference line to the right of
+        a0 and of opposite colour to a0.
+    b2	The next changing element to the right of b1 on the reference line.
+*/
+
+/*
+ * ITU T.4 1D Huffman run length codes and
+ * related definitions.  Given the small sizes
+ * of these tables it does not seem
+ * worthwhile to make code & length 8 bits.
+ */
+typedef struct
+{
+    uint16_t length;        /* length of T.4 code, in bits */
+    uint16_t code;          /* T.4 code */
+    int16_t runlen;         /* run length, in bits */
+} T4_table_entry;
+
+#define is_aligned(p,t)  ((((intptr_t)(p)) & (sizeof(t) - 1)) == 0)
+
+/* Status values returned instead of a run length */
+#define        T4CODE_EOL        -1        /* NB: ACT_EOL - ACT_WRUNT */
+#define        T4CODE_INVALID    -2        /* NB: ACT_INVALID - ACT_WRUNT */
+#define        T4CODE_EOF        -3        /* end of input data */
+#define        T4CODE_INCOMP     -4        /* incomplete run code */
+
+/*
+ * Note that these tables are ordered such that the
+ * index into the table is known to be either the
+ * run length, or (run length / 64) + a fixed offset.
+ *
+ * NB: The T4CODE_INVALID entries are only used
+ *     during state generation (see mkg3states.c).
+ */
+const T4_table_entry t4_white_codes[] =
+{
+    {  8, 0x35,    0 },        /* 0011 0101 */
+    {  6, 0x07,    1 },        /* 0001 11 */
+    {  4, 0x07,    2 },        /* 0111 */
+    {  4, 0x08,    3 },        /* 1000 */
+    {  4, 0x0B,    4 },        /* 1011 */
+    {  4, 0x0C,    5 },        /* 1100 */
+    {  4, 0x0E,    6 },        /* 1110 */
+    {  4, 0x0F,    7 },        /* 1111 */
+    {  5, 0x13,    8 },        /* 1001 1 */
+    {  5, 0x14,    9 },        /* 1010 0 */
+    {  5, 0x07,   10 },        /* 0011 1 */
+    {  5, 0x08,   11 },        /* 0100 0 */
+    {  6, 0x08,   12 },        /* 0010 00 */
+    {  6, 0x03,   13 },        /* 0000 11 */
+    {  6, 0x34,   14 },        /* 1101 00 */
+    {  6, 0x35,   15 },        /* 1101 01 */
+    {  6, 0x2A,   16 },        /* 1010 10 */
+    {  6, 0x2B,   17 },        /* 1010 11 */
+    {  7, 0x27,   18 },        /* 0100 111 */
+    {  7, 0x0C,   19 },        /* 0001 100 */
+    {  7, 0x08,   20 },        /* 0001 000 */
+    {  7, 0x17,   21 },        /* 0010 111 */
+    {  7, 0x03,   22 },        /* 0000 011 */
+    {  7, 0x04,   23 },        /* 0000 100 */
+    {  7, 0x28,   24 },        /* 0101 000 */
+    {  7, 0x2B,   25 },        /* 0101 011 */
+    {  7, 0x13,   26 },        /* 0010 011 */
+    {  7, 0x24,   27 },        /* 0100 100 */
+    {  7, 0x18,   28 },        /* 0011 000 */
+    {  8, 0x02,   29 },        /* 0000 0010 */
+    {  8, 0x03,   30 },        /* 0000 0011 */
+    {  8, 0x1A,   31 },        /* 0001 1010 */
+    {  8, 0x1B,   32 },        /* 0001 1011 */
+    {  8, 0x12,   33 },        /* 0001 0010 */
+    {  8, 0x13,   34 },        /* 0001 0011 */
+    {  8, 0x14,   35 },        /* 0001 0100 */
+    {  8, 0x15,   36 },        /* 0001 0101 */
+    {  8, 0x16,   37 },        /* 0001 0110 */
+    {  8, 0x17,   38 },        /* 0001 0111 */
+    {  8, 0x28,   39 },        /* 0010 1000 */
+    {  8, 0x29,   40 },        /* 0010 1001 */
+    {  8, 0x2A,   41 },        /* 0010 1010 */
+    {  8, 0x2B,   42 },        /* 0010 1011 */
+    {  8, 0x2C,   43 },        /* 0010 1100 */
+    {  8, 0x2D,   44 },        /* 0010 1101 */
+    {  8, 0x04,   45 },        /* 0000 0100 */
+    {  8, 0x05,   46 },        /* 0000 0101 */
+    {  8, 0x0A,   47 },        /* 0000 1010 */
+    {  8, 0x0B,   48 },        /* 0000 1011 */
+    {  8, 0x52,   49 },        /* 0101 0010 */
+    {  8, 0x53,   50 },        /* 0101 0011 */
+    {  8, 0x54,   51 },        /* 0101 0100 */
+    {  8, 0x55,   52 },        /* 0101 0101 */
+    {  8, 0x24,   53 },        /* 0010 0100 */
+    {  8, 0x25,   54 },        /* 0010 0101 */
+    {  8, 0x58,   55 },        /* 0101 1000 */
+    {  8, 0x59,   56 },        /* 0101 1001 */
+    {  8, 0x5A,   57 },        /* 0101 1010 */
+    {  8, 0x5B,   58 },        /* 0101 1011 */
+    {  8, 0x4A,   59 },        /* 0100 1010 */
+    {  8, 0x4B,   60 },        /* 0100 1011 */
+    {  8, 0x32,   61 },        /* 0011 0010 */
+    {  8, 0x33,   62 },        /* 0011 0011 */
+    {  8, 0x34,   63 },        /* 0011 0100 */
+    {  5, 0x1B,   64 },        /* 1101 1 */
+    {  5, 0x12,  128 },        /* 1001 0 */
+    {  6, 0x17,  192 },        /* 0101 11 */
+    {  7, 0x37,  256 },        /* 0110 111 */
+    {  8, 0x36,  320 },        /* 0011 0110 */
+    {  8, 0x37,  384 },        /* 0011 0111 */
+    {  8, 0x64,  448 },        /* 0110 0100 */
+    {  8, 0x65,  512 },        /* 0110 0101 */
+    {  8, 0x68,  576 },        /* 0110 1000 */
+    {  8, 0x67,  640 },        /* 0110 0111 */
+    {  9, 0xCC,  704 },        /* 0110 0110 0 */
+    {  9, 0xCD,  768 },        /* 0110 0110 1 */
+    {  9, 0xD2,  832 },        /* 0110 1001 0 */
+    {  9, 0xD3,  896 },        /* 0110 1001 1 */
+    {  9, 0xD4,  960 },        /* 0110 1010 0 */
+    {  9, 0xD5, 1024 },        /* 0110 1010 1 */
+    {  9, 0xD6, 1088 },        /* 0110 1011 0 */
+    {  9, 0xD7, 1152 },        /* 0110 1011 1 */
+    {  9, 0xD8, 1216 },        /* 0110 1100 0 */
+    {  9, 0xD9, 1280 },        /* 0110 1100 1 */
+    {  9, 0xDA, 1344 },        /* 0110 1101 0 */
+    {  9, 0xDB, 1408 },        /* 0110 1101 1 */
+    {  9, 0x98, 1472 },        /* 0100 1100 0 */
+    {  9, 0x99, 1536 },        /* 0100 1100 1 */
+    {  9, 0x9A, 1600 },        /* 0100 1101 0 */
+    {  6, 0x18, 1664 },        /* 0110 00 */
+    {  9, 0x9B, 1728 },        /* 0100 1101 1 */
+    { 11, 0x08, 1792 },        /* 0000 0001 000 */
+    { 11, 0x0C, 1856 },        /* 0000 0001 100 */
+    { 11, 0x0D, 1920 },        /* 0000 0001 101 */
+    { 12, 0x12, 1984 },        /* 0000 0001 0010 */
+    { 12, 0x13, 2048 },        /* 0000 0001 0011 */
+    { 12, 0x14, 2112 },        /* 0000 0001 0100 */
+    { 12, 0x15, 2176 },        /* 0000 0001 0101 */
+    { 12, 0x16, 2240 },        /* 0000 0001 0110 */
+    { 12, 0x17, 2304 },        /* 0000 0001 0111 */
+    { 12, 0x1C, 2368 },        /* 0000 0001 1100 */
+    { 12, 0x1D, 2432 },        /* 0000 0001 1101 */
+    { 12, 0x1E, 2496 },        /* 0000 0001 1110 */
+    { 12, 0x1F, 2560 },        /* 0000 0001 1111 */
+    { 12, 0x01, T4CODE_EOL },           /* 0000 0000 0001 */
+    {  9, 0x01, T4CODE_INVALID },       /* 0000 0000 1 */
+    { 10, 0x01, T4CODE_INVALID },       /* 0000 0000 01 */
+    { 11, 0x01, T4CODE_INVALID },       /* 0000 0000 001 */
+    { 12, 0x00, T4CODE_INVALID },       /* 0000 0000 0000 */
+};
+
+const T4_table_entry t4_black_codes[] =
+{
+    { 10, 0x37,    0 },        /* 0000 1101 11 */
+    {  3, 0x02,    1 },        /* 010 */
+    {  2, 0x03,    2 },        /* 11 */
+    {  2, 0x02,    3 },        /* 10 */
+    {  3, 0x03,    4 },        /* 011 */
+    {  4, 0x03,    5 },        /* 0011 */
+    {  4, 0x02,    6 },        /* 0010 */
+    {  5, 0x03,    7 },        /* 0001 1 */
+    {  6, 0x05,    8 },        /* 0001 01 */
+    {  6, 0x04,    9 },        /* 0001 00 */
+    {  7, 0x04,   10 },        /* 0000 100 */
+    {  7, 0x05,   11 },        /* 0000 101 */
+    {  7, 0x07,   12 },        /* 0000 111 */
+    {  8, 0x04,   13 },        /* 0000 0100 */
+    {  8, 0x07,   14 },        /* 0000 0111 */
+    {  9, 0x18,   15 },        /* 0000 1100 0 */
+    { 10, 0x17,   16 },        /* 0000 0101 11 */
+    { 10, 0x18,   17 },        /* 0000 0110 00 */
+    { 10, 0x08,   18 },        /* 0000 0010 00 */
+    { 11, 0x67,   19 },        /* 0000 1100 111 */
+    { 11, 0x68,   20 },        /* 0000 1101 000 */
+    { 11, 0x6C,   21 },        /* 0000 1101 100 */
+    { 11, 0x37,   22 },        /* 0000 0110 111 */
+    { 11, 0x28,   23 },        /* 0000 0101 000 */
+    { 11, 0x17,   24 },        /* 0000 0010 111 */
+    { 11, 0x18,   25 },        /* 0000 0011 000 */
+    { 12, 0xCA,   26 },        /* 0000 1100 1010 */
+    { 12, 0xCB,   27 },        /* 0000 1100 1011 */
+    { 12, 0xCC,   28 },        /* 0000 1100 1100 */
+    { 12, 0xCD,   29 },        /* 0000 1100 1101 */
+    { 12, 0x68,   30 },        /* 0000 0110 1000 */
+    { 12, 0x69,   31 },        /* 0000 0110 1001 */
+    { 12, 0x6A,   32 },        /* 0000 0110 1010 */
+    { 12, 0x6B,   33 },        /* 0000 0110 1011 */
+    { 12, 0xD2,   34 },        /* 0000 1101 0010 */
+    { 12, 0xD3,   35 },        /* 0000 1101 0011 */
+    { 12, 0xD4,   36 },        /* 0000 1101 0100 */
+    { 12, 0xD5,   37 },        /* 0000 1101 0101 */
+    { 12, 0xD6,   38 },        /* 0000 1101 0110 */
+    { 12, 0xD7,   39 },        /* 0000 1101 0111 */
+    { 12, 0x6C,   40 },        /* 0000 0110 1100 */
+    { 12, 0x6D,   41 },        /* 0000 0110 1101 */
+    { 12, 0xDA,   42 },        /* 0000 1101 1010 */
+    { 12, 0xDB,   43 },        /* 0000 1101 1011 */
+    { 12, 0x54,   44 },        /* 0000 0101 0100 */
+    { 12, 0x55,   45 },        /* 0000 0101 0101 */
+    { 12, 0x56,   46 },        /* 0000 0101 0110 */
+    { 12, 0x57,   47 },        /* 0000 0101 0111 */
+    { 12, 0x64,   48 },        /* 0000 0110 0100 */
+    { 12, 0x65,   49 },        /* 0000 0110 0101 */
+    { 12, 0x52,   50 },        /* 0000 0101 0010 */
+    { 12, 0x53,   51 },        /* 0000 0101 0011 */
+    { 12, 0x24,   52 },        /* 0000 0010 0100 */
+    { 12, 0x37,   53 },        /* 0000 0011 0111 */
+    { 12, 0x38,   54 },        /* 0000 0011 1000 */
+    { 12, 0x27,   55 },        /* 0000 0010 0111 */
+    { 12, 0x28,   56 },        /* 0000 0010 1000 */
+    { 12, 0x58,   57 },        /* 0000 0101 1000 */
+    { 12, 0x59,   58 },        /* 0000 0101 1001 */
+    { 12, 0x2B,   59 },        /* 0000 0010 1011 */
+    { 12, 0x2C,   60 },        /* 0000 0010 1100 */
+    { 12, 0x5A,   61 },        /* 0000 0101 1010 */
+    { 12, 0x66,   62 },        /* 0000 0110 0110 */
+    { 12, 0x67,   63 },        /* 0000 0110 0111 */
+    { 10, 0x0F,   64 },        /* 0000 0011 11 */
+    { 12, 0xC8,  128 },        /* 0000 1100 1000 */
+    { 12, 0xC9,  192 },        /* 0000 1100 1001 */
+    { 12, 0x5B,  256 },        /* 0000 0101 1011 */
+    { 12, 0x33,  320 },        /* 0000 0011 0011 */
+    { 12, 0x34,  384 },        /* 0000 0011 0100 */
+    { 12, 0x35,  448 },        /* 0000 0011 0101 */
+    { 13, 0x6C,  512 },        /* 0000 0011 0110 0 */
+    { 13, 0x6D,  576 },        /* 0000 0011 0110 1 */
+    { 13, 0x4A,  640 },        /* 0000 0010 0101 0 */
+    { 13, 0x4B,  704 },        /* 0000 0010 0101 1 */
+    { 13, 0x4C,  768 },        /* 0000 0010 0110 0 */
+    { 13, 0x4D,  832 },        /* 0000 0010 0110 1 */
+    { 13, 0x72,  896 },        /* 0000 0011 1001 0 */
+    { 13, 0x73,  960 },        /* 0000 0011 1001 1 */
+    { 13, 0x74, 1024 },        /* 0000 0011 1010 0 */
+    { 13, 0x75, 1088 },        /* 0000 0011 1010 1 */
+    { 13, 0x76, 1152 },        /* 0000 0011 1011 0 */
+    { 13, 0x77, 1216 },        /* 0000 0011 1011 1 */
+    { 13, 0x52, 1280 },        /* 0000 0010 1001 0 */
+    { 13, 0x53, 1344 },        /* 0000 0010 1001 1 */
+    { 13, 0x54, 1408 },        /* 0000 0010 1010 0 */
+    { 13, 0x55, 1472 },        /* 0000 0010 1010 1 */
+    { 13, 0x5A, 1536 },        /* 0000 0010 1101 0 */
+    { 13, 0x5B, 1600 },        /* 0000 0010 1101 1 */
+    { 13, 0x64, 1664 },        /* 0000 0011 0010 0 */
+    { 13, 0x65, 1728 },        /* 0000 0011 0010 1 */
+    { 11, 0x08, 1792 },        /* 0000 0001 000 */
+    { 11, 0x0C, 1856 },        /* 0000 0001 100 */
+    { 11, 0x0D, 1920 },        /* 0000 0001 101 */
+    { 12, 0x12, 1984 },        /* 0000 0001 0010 */
+    { 12, 0x13, 2048 },        /* 0000 0001 0011 */
+    { 12, 0x14, 2112 },        /* 0000 0001 0100 */
+    { 12, 0x15, 2176 },        /* 0000 0001 0101 */
+    { 12, 0x16, 2240 },        /* 0000 0001 0110 */
+    { 12, 0x17, 2304 },        /* 0000 0001 0111 */
+    { 12, 0x1C, 2368 },        /* 0000 0001 1100 */
+    { 12, 0x1D, 2432 },        /* 0000 0001 1101 */
+    { 12, 0x1E, 2496 },        /* 0000 0001 1110 */
+    { 12, 0x1F, 2560 },        /* 0000 0001 1111 */
+    { 12, 0x01, T4CODE_EOL },            /* 0000 0000 0001 */
+    {  9, 0x01, T4CODE_INVALID },        /* 0000 0000 1 */
+    { 10, 0x01, T4CODE_INVALID },        /* 0000 0000 01 */
+    { 11, 0x01, T4CODE_INVALID },        /* 0000 0000 001 */
+    { 12, 0x00, T4CODE_INVALID },        /* 0000 0000 0000 */
+};
+
+#if defined(__i386__)  ||  defined(__x86_64__)   
+static __inline__ int run_length(unsigned int bits)
+{
+    return 7 - top_bit(bits);
+}
+/*- End of function --------------------------------------------------------*/
+#else
+static __inline__ int run_length(unsigned int bits)
+{
+    static const uint8_t run_len[256] =
+    {
+        8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x00 - 0x0f */
+        3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1f */
+        2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x20 - 0x2f */
+        2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x30 - 0x3f */
+        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40 - 0x4f */
+        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x50 - 0x5f */
+        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60 - 0x6f */
+        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x70 - 0x7f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 - 0x8f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 - 0x9f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 - 0xaf */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 - 0xbf */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 - 0xcf */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 - 0xdf */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 - 0xef */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 - 0xff */
+    };
+
+    return run_len[bits];
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static __inline__ int flush_bits_to_image_buffer(t4_state_t *s)
+{
+    uint8_t *t;
+
+    s->bit = 8;
+    if (s->image_size >= s->image_buffer_size)
+    {
+        if ((t = realloc(s->image_buffer, s->image_buffer_size + 10000)) == NULL)
+            return -1;
+        s->image_buffer_size += 10000;
+        s->image_buffer = t;
+    }
+    s->image_buffer[s->image_size++] = (uint8_t) s->data;
+    s->data = 0;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void put_run(t4_state_t *s, int black)
+{
+    int i;
+
+    s->row_len += s->run_length;
+    /* Ignore anything before the first EOL */
+    /* Don't allow rows to grow too long, and overflow the buffers */
+    if (s->row_len <= s->image_width)
+    {
+        *s->pa++ = s->run_length;
+        for (i = 0;  i < s->run_length;  i++)
+        {
+            s->data = (s->data << 1) | black;
+            if (--s->bit == 0)
+                flush_bits_to_image_buffer(s);
+        }
+    }
+    s->run_length = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void put_eol(t4_state_t *s)
+{
+    uint32_t *x;
+    uint8_t *t;
+    
+    if (s->run_length)
+        put_run(s, 0);
+    if (s->row_len != s->image_width)
+    {
+        STATE_TRACE("%d Bad row - %d %d\n", s->row, s->row_len, s->row_is_2d);
+        /* Clean up the bad runs */
+        while (s->a0 > s->image_width  &&  s->pa > s->cur_runs)
+            s->a0 -= *--s->pa;
+        if (s->a0 < s->image_width)
+        {
+            if (s->a0 < 0)
+                s->a0 = 0;
+            if ((s->pa - s->cur_runs) & 1)
+                put_run(s, 0);
+            s->run_length = s->image_width - s->a0;
+            put_run(s, 0);
+        }
+        else if (s->a0 > s->image_width)
+        {
+            s->run_length = s->image_width;
+            put_run(s, 0);
+            s->run_length = 0;
+            put_run(s, 0);
+        }
+        if (s->row_starts_at != s->last_row_starts_at)
+        {
+            /* Copy the previous row over this one */
+            if (s->row_starts_at + s->bytes_per_row >= s->image_buffer_size)
+            {
+                if ((t = realloc(s->image_buffer, s->image_buffer_size + 10000)) == NULL)
+                {
+                    /* TODO: take some action to report the allocation failure */
+                    return;
+                }
+                s->image_buffer_size += 10000;
+                s->image_buffer = t;
+            }
+            memcpy(s->image_buffer + s->row_starts_at, s->image_buffer + s->last_row_starts_at, s->bytes_per_row);
+            s->image_size = s->row_starts_at + s->bytes_per_row;
+        }
+        s->bad_rows++;
+        s->curr_bad_row_run++;
+    }
+    else
+    {
+        if (s->curr_bad_row_run)
+        {
+            if (s->curr_bad_row_run > s->longest_bad_row_run)
+                s->longest_bad_row_run = s->curr_bad_row_run;
+            s->curr_bad_row_run = 0;
+        }
+        STATE_TRACE("%d Good row - %d %d\n", s->row, s->row_len, s->row_is_2d);
+    }
+    
+#if 0
+    /* Dump the runs of black and white for analysis */
+    {
+        int total;
+
+        span_log(&s->logging, SPAN_LOG_DEBUG_2, "Ref ");
+        total = 0;
+        for (x = s->ref_runs;  x < s->pb;  x++)
+        {
+            total += *x;
+            span_log(&s->logging, SPAN_LOG_DEBUG_2, "%d ", *x);
+        }
+        span_log(&s->logging, SPAN_LOG_DEBUG_2, " total = %d\n", total);
+        span_log(&s->logging, SPAN_LOG_DEBUG_2, "Cur ");
+        total = 0;
+        for (x = s->cur_runs;  x < s->pa;  x++)
+        {
+            total += *x;
+            span_log(&s->logging, SPAN_LOG_DEBUG_2, "%d ", *x);
+        }
+        span_log(&s->logging, SPAN_LOG_DEBUG_2, "total = %d\n", total);
+    }
+#endif
+
+    /* Prepare the buffers for the next row. */
+    s->image_length++;
+    s->last_row_starts_at = s->row_starts_at;
+    s->row_starts_at = s->image_size;
+    x = s->cur_runs;
+    s->cur_runs = s->ref_runs;
+    s->ref_runs = x;
+
+    s->pa = s->cur_runs;
+    s->pb = s->ref_runs;
+    
+    s->a0 = 0;
+    s->b1 = *s->pb++;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_rx_end_page(t4_state_t *s)
+{
+    int row;
+    int i;
+    time_t now;
+    struct tm *tm;
+    char buf[256 + 1];
+    uint16_t resunit;
+    float x_resolution;
+    float y_resolution;
+
+    if (s->line_encoding == T4_COMPRESSION_ITU_T6)
+    {
+        /* Push enough zeros through the decoder to flush out any remaining codes */
+        for (i = 0;  i < 13;  i++)
+            t4_rx_put_bit(s, 0);
+    }
+    if (s->curr_bad_row_run)
+    {
+        if (s->curr_bad_row_run > s->longest_bad_row_run)
+            s->longest_bad_row_run = s->curr_bad_row_run;
+        s->curr_bad_row_run = 0;
+    }
+
+    if (s->image_size == 0)
+        return -1;
+
+    /* Prepare the directory entry fully before writing the image, or libtiff complains */
+    TIFFSetField(s->tiff_file, TIFFTAG_COMPRESSION, s->output_compression);
+    if (s->output_compression == COMPRESSION_CCITT_T4)
+    {
+        TIFFSetField(s->tiff_file, TIFFTAG_T4OPTIONS, s->output_t4_options);
+        TIFFSetField(s->tiff_file, TIFFTAG_FAXMODE, FAXMODE_CLASSF);
+    }
+    TIFFSetField(s->tiff_file, TIFFTAG_IMAGEWIDTH, s->image_width);
+    TIFFSetField(s->tiff_file, TIFFTAG_BITSPERSAMPLE, 1);
+    TIFFSetField(s->tiff_file, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
+    TIFFSetField(s->tiff_file, TIFFTAG_SAMPLESPERPIXEL, 1);
+    if (s->output_compression == COMPRESSION_CCITT_T4
+        ||
+        s->output_compression == COMPRESSION_CCITT_T6)
+    {
+        TIFFSetField(s->tiff_file, TIFFTAG_ROWSPERSTRIP, -1L);
+    }
+    else
+    {
+        TIFFSetField(s->tiff_file,
+                     TIFFTAG_ROWSPERSTRIP,
+                     TIFFDefaultStripSize(s->tiff_file, 0));
+    }
+    TIFFSetField(s->tiff_file, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+    TIFFSetField(s->tiff_file, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
+    TIFFSetField(s->tiff_file, TIFFTAG_FILLORDER, FILLORDER_LSB2MSB);
+
+    x_resolution = s->x_resolution/100.0f;
+    y_resolution = s->y_resolution/100.0f;
+    /* Metric seems the sane things to use in the 21st century, but a lot of lousy software
+       gets FAX resolutions wrong, and more get it wrong using metric than using inches. */
+#if 0
+    TIFFSetField(s->tiff_file, TIFFTAG_XRESOLUTION, x_resolution);
+    TIFFSetField(s->tiff_file, TIFFTAG_YRESOLUTION, y_resolution);
+    resunit = RESUNIT_CENTIMETER;
+    TIFFSetField(s->tiff_file, TIFFTAG_RESOLUTIONUNIT, resunit);
+#else
+    TIFFSetField(s->tiff_file, TIFFTAG_XRESOLUTION, floorf(x_resolution*2.54f + 0.5f));
+    TIFFSetField(s->tiff_file, TIFFTAG_YRESOLUTION, floorf(y_resolution*2.54f + 0.5f));
+    resunit = RESUNIT_INCH;
+    TIFFSetField(s->tiff_file, TIFFTAG_RESOLUTIONUNIT, resunit);
+#endif
+
+    /* TODO: add the version of spandsp */
+    TIFFSetField(s->tiff_file, TIFFTAG_SOFTWARE, "spandsp");
+    if (gethostname(buf, sizeof(buf)) == 0)
+        TIFFSetField(s->tiff_file, TIFFTAG_HOSTCOMPUTER, buf);
+
+    //TIFFSetField(s->tiff_file, TIFFTAG_FAXRECVPARAMS, ???);
+    //TIFFSetField(s->tiff_file, TIFFTAG_FAXMODE, ???);
+    if (s->sub_address)
+        TIFFSetField(s->tiff_file, TIFFTAG_FAXSUBADDRESS, s->sub_address);
+    if (s->far_ident)
+        TIFFSetField(s->tiff_file, TIFFTAG_IMAGEDESCRIPTION, s->far_ident);
+    if (s->vendor)
+        TIFFSetField(s->tiff_file, TIFFTAG_MAKE, s->vendor);
+    if (s->model)
+        TIFFSetField(s->tiff_file, TIFFTAG_MODEL, s->model);
+
+    time(&now);
+    tm = localtime(&now);
+    sprintf(buf,
+    	    "%4d/%02d/%02d %02d:%02d:%02d",
+            tm->tm_year + 1900,
+            tm->tm_mon + 1,
+            tm->tm_mday,
+            tm->tm_hour,
+            tm->tm_min,
+            tm->tm_sec);
+    TIFFSetField(s->tiff_file, TIFFTAG_DATETIME, buf);
+    TIFFSetField(s->tiff_file, TIFFTAG_FAXRECVTIME, now - s->page_start_time);
+
+    TIFFSetField(s->tiff_file, TIFFTAG_IMAGELENGTH, s->image_length);
+    /* Set the total pages to 1. For any one page document we will get this
+       right. For multi-page documents we will need to come back and fill in
+       the right answer when we know it. */
+    TIFFSetField(s->tiff_file, TIFFTAG_PAGENUMBER, s->pages_transferred++, 1);
+    if (s->output_compression == COMPRESSION_CCITT_T4)
+    {
+        if (s->bad_rows)
+        {
+            TIFFSetField(s->tiff_file, TIFFTAG_BADFAXLINES, s->bad_rows);
+            TIFFSetField(s->tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_REGENERATED);
+            TIFFSetField(s->tiff_file, TIFFTAG_CONSECUTIVEBADFAXLINES, s->longest_bad_row_run);
+        }
+        else
+        {
+            TIFFSetField(s->tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
+        }
+    }
+    TIFFSetField(s->tiff_file, TIFFTAG_IMAGEWIDTH, s->image_width);
+
+    /* Write the image first.... */
+    for (row = 0;  row < s->image_length;  row++)
+    {
+        if (TIFFWriteScanline(s->tiff_file, s->image_buffer + row*s->bytes_per_row, row, 0) < 0)
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "%s: Write error at row %d.\n", s->file, row);
+            break;
+        }
+    }
+    /* ....then the directory entry, and libtiff is happy. */
+    TIFFWriteDirectory(s->tiff_file);
+
+    s->bits = 0;
+    s->bits_to_date = 0;
+    s->consecutive_eols = 0;
+
+    s->image_size = 0;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_rx_put_bit(t4_state_t *s, int bit)
+{
+    int bits;
+
+    /* We decompress bit by bit, as the data stream is received. We need to
+       scan continuously for EOLs, so we might as well work this way. */
+    s->bits_to_date = (s->bits_to_date >> 1) | ((bit & 1) << 12);
+    if (++s->bits < 13)
+        return FALSE;
+    if (!s->first_eol_seen)
+    {
+        /* Do not let anything through to the decoder, until an EOL arrives. */
+        if ((s->bits_to_date & 0xFFF) != 0x800)
+            return FALSE;
+        s->bits = (s->line_encoding == T4_COMPRESSION_ITU_T4_1D)  ?  1  :  0;
+        s->first_eol_seen = TRUE;
+        return FALSE;
+    }
+    /* Check if the image has already terminated */
+    if (s->consecutive_eols >= 5)
+        return TRUE;
+    if (s->row_is_2d  &&  s->black_white == 0)
+    {
+        switch (T4_black_table[s->bits_to_date & 0x1FFF].state)
+        {
+        case S_EOL:
+            STATE_TRACE("EOL\n");
+            put_eol(s);
+            s->row_is_2d = !(s->bits_to_date & 0x1000);
+            s->bits -= (T4_black_table[s->bits_to_date & 0x1FFF].width + 1);
+            s->its_black = FALSE;
+            s->row_len = 0;
+            break;
+        default:
+            bits = s->bits_to_date & 0x7F;
+            STATE_TRACE("State %d, %d\n",
+                        T4_common_table[bits].state,
+                        T4_common_table[bits].width);
+            switch (T4_common_table[bits].state)
+            {
+            case S_Pass:
+                STATE_TRACE("Pass\n");
+                if (s->row_len < s->image_width)
+                {
+                    if (s->pa != s->cur_runs)
+                    {
+                        while (s->b1 <= s->a0  &&  s->b1 < s->image_width)
+                        {
+                            s->b1 += s->pb[0] + s->pb[1];
+                            s->pb += 2;
+                        }
+                    }
+                    s->b1 += *s->pb++;
+                    s->run_length += (s->b1 - s->a0);
+                    s->a0 = s->b1;
+                    s->b1 += *s->pb++;
+                }
+                break;
+            case S_Horiz:
+                STATE_TRACE("Horiz\n");
+                s->its_black = ((int) (s->pa - s->cur_runs)) & 1;
+                s->black_white = 2;
+                break;
+            case S_V0:
+                STATE_TRACE("V0 %d %d %d %d\n",
+                            s->a0,
+                            s->b1,
+                            s->image_width,
+                            s->run_length);
+                if (s->row_len < s->image_width)
+                {
+                    if (s->pa != s->cur_runs)
+                    {
+                        while (s->b1 <= s->a0  &&  s->b1 < s->image_width)
+                        {
+                            s->b1 += s->pb[0] + s->pb[1];
+                            s->pb += 2;
+                        }
+                    }
+                    s->run_length += (s->b1 - s->a0);
+                    s->a0 = s->b1;
+                    put_run(s, ((int) (s->pa - s->cur_runs)) & 1);
+                    s->b1 += *s->pb++;
+                }
+                break;
+            case S_VR:
+                STATE_TRACE("VR[%d] %d %d %d %d\n",
+                            T4_common_table[bits].param,
+                            s->a0,
+                            s->b1,
+                            s->image_width,
+                            s->run_length);
+                if (s->row_len < s->image_width)
+                {
+                    if (s->pa != s->cur_runs)
+                    {
+                        while (s->b1 <= s->a0  &&  s->b1 < s->image_width)
+                        {
+                            s->b1 += s->pb[0] + s->pb[1];
+                            s->pb += 2;
+                        }
+                    }
+                    s->run_length += (s->b1 + T4_common_table[bits].param - s->a0);
+                    s->a0 = s->b1 + T4_common_table[bits].param;
+                    put_run(s, ((int) (s->pa - s->cur_runs)) & 1);
+                    s->b1 += *s->pb++;
+                }
+                break;
+            case S_VL:
+                STATE_TRACE("VL[%d] %d %d %d %d\n",
+                            T4_common_table[bits].param,
+                            s->a0,
+                            s->b1,
+                            s->image_width,
+                            s->run_length);
+                if (s->row_len < s->image_width)
+                {
+                    if (s->pa != s->cur_runs)
+                    {
+                        while (s->b1 <= s->a0  &&  s->b1 < s->image_width)
+                        {
+                            s->b1 += s->pb[0] + s->pb[1];
+                            s->pb += 2;
+                        }
+                    }
+                    s->run_length += (s->b1 - T4_common_table[bits].param - s->a0);
+                    s->a0 = s->b1 - T4_common_table[bits].param;
+                    put_run(s, ((int) (s->pa - s->cur_runs)) & 1);
+                    s->b1 -= *--s->pb;
+                }
+                break;
+            case S_Ext:
+                STATE_TRACE("Ext %d 0x%x\n",
+                            ((s->bits_to_date >> T4_common_table[bits].width) & 0x7),
+                            s->bits_to_date);
+                if (s->row_len < s->image_width)
+                    *s->pa++ = s->image_width - s->a0;
+                break;
+            case S_Null:
+                break;
+            default:
+                span_log(&s->logging, SPAN_LOG_WARNING, "Unexpected T.4 state %d\n", T4_common_table[bits].state);
+                break;
+            }
+            s->bits -= T4_common_table[bits].width;
+            break;
+        }
+    }
+    else
+    {
+        if (s->its_black)
+        {
+            bits = s->bits_to_date & 0x1FFF;
+            STATE_TRACE("Black state %d %d\n", T4_black_table[bits].state, T4_black_table[bits].param);
+            switch (T4_black_table[bits].state)
+            {
+            case S_MakeUpB:
+            case S_MakeUp:
+                if (s->row_len < s->image_width)
+                {
+                    s->run_length += T4_black_table[bits].param;
+                    s->a0 += T4_black_table[bits].param;
+                }
+                break;
+            case S_TermB:
+                if (s->row_len < s->image_width)
+                {
+                    s->run_length += T4_black_table[bits].param;
+                    s->a0 += T4_black_table[bits].param;
+                    put_run(s, 1);
+                    if (s->black_white)
+                    {
+                        if (s->black_white == 1)
+                        {
+                            if (s->pa != s->cur_runs)
+                            {
+                                while (s->b1 <= s->a0  &&  s->b1 < s->image_width)
+                                {
+                                    s->b1 += s->pb[0] + s->pb[1];
+                                    s->pb += 2;
+                                }
+                            }
+                        }
+                        s->black_white--;
+                    }
+                }
+                s->its_black = FALSE;
+                break;
+            case S_EOL:
+                STATE_TRACE("EOL\n");
+                if (s->row_len == 0)
+                {
+                    if (++s->consecutive_eols >= 5)
+                        return TRUE;
+                }
+                else
+                {
+                    s->consecutive_eols = 0;
+                    put_eol(s);
+                }
+                if (s->line_encoding != T4_COMPRESSION_ITU_T4_1D)
+                {
+                    s->row_is_2d = !(s->bits_to_date & 0x1000);
+                    s->bits--;
+                }
+                s->its_black = FALSE;
+                s->row_len = 0;
+                break;
+            default:
+                /* Bad black */
+                s->black_white = 0;
+                break;
+            }
+            s->bits -= T4_black_table[bits].width;
+        }
+        else
+        {
+            bits = s->bits_to_date & 0xFFF;
+            STATE_TRACE("White state %d %d\n", T4_white_table[bits].state, T4_white_table[bits].param);
+            switch (T4_white_table[bits].state)
+            {
+            case S_MakeUpW:
+            case S_MakeUp:
+                if (s->row_len < s->image_width)
+                {
+                    s->run_length += T4_white_table[bits].param;
+                    s->a0 += T4_white_table[bits].param;
+                }
+                break;
+            case S_TermW:
+                if (s->row_len < s->image_width)
+                {
+                    s->run_length += T4_white_table[bits].param;
+                    s->a0 += T4_white_table[bits].param;
+                    put_run(s, 0);
+                    if (s->black_white)
+                    {
+                        if (s->black_white == 1)
+                        {
+                            if (s->pa != s->cur_runs)
+                            {
+                                while (s->b1 <= s->a0  &&  s->b1 < s->image_width)
+                                {
+                                    s->b1 += s->pb[0] + s->pb[1];
+                                    s->pb += 2;
+                                }
+                            }
+                        }
+                        s->black_white--;
+                    }
+                }
+                s->its_black = TRUE;
+                break;
+            case S_EOL:
+                STATE_TRACE("EOL\n");
+                if (s->row_len == 0)
+                {
+                    if (++s->consecutive_eols >= 5)
+                        return TRUE;
+                }
+                else
+                {
+                    s->consecutive_eols = 0;
+                    put_eol(s);
+                }
+                if (s->line_encoding != T4_COMPRESSION_ITU_T4_1D)
+                {
+                    s->row_is_2d = !(s->bits_to_date & 0x1000);
+                    s->bits--;
+                }
+                s->its_black = FALSE;
+                s->row_len = 0;
+                break;
+            default:
+                /* Bad white */
+                s->black_white = 0;
+                break;
+            }
+            s->bits -= T4_white_table[bits].width;
+        }
+    }
+
+    if (s->line_encoding == T4_COMPRESSION_ITU_T6  &&  s->row_len >= s->image_width)
+    {
+        /* T.6 has no EOL markers. We sense the end of a line by its length alone. */
+        STATE_TRACE("EOL T.6\n");
+        put_eol(s);
+        s->its_black = FALSE;
+        s->row_len = 0;
+    }
+    return FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+t4_state_t *t4_rx_create(const char *file, int output_encoding)
+{
+    t4_state_t *s;
+    
+    if ((s = (t4_state_t *) malloc(sizeof(t4_state_t *))))
+    {
+        if (t4_rx_init(s, file, output_encoding))
+        {
+            free(s);
+            return NULL;
+        }
+    }
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_rx_init(t4_state_t *s, const char *file, int output_encoding)
+{
+    memset(s, 0, sizeof(*s));
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "T.4");
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Start rx document\n");
+
+    if ((s->tiff_file = TIFFOpen(file, "w")) == NULL)
+        return -1;
+
+    /* Save the file name for logging reports. */
+    s->file = strdup(file);
+    /* Only provide for one form of coding throughout the file, even though the
+       coding on the wire could change between pages. */
+    switch (output_encoding)
+    {
+    case T4_COMPRESSION_ITU_T4_1D:
+        s->output_compression = COMPRESSION_CCITT_T4;
+        s->output_t4_options = GROUP3OPT_FILLBITS;
+        break;
+    case T4_COMPRESSION_ITU_T4_2D:
+        s->output_compression = COMPRESSION_CCITT_T4;
+        s->output_t4_options = GROUP3OPT_FILLBITS | GROUP3OPT_2DENCODING;
+        break;
+    case T4_COMPRESSION_ITU_T6:
+        s->output_compression = COMPRESSION_CCITT_T6;
+        s->output_t4_options = 0;
+        break;
+    }
+
+    /* Until we have a valid figure for the bytes per row, we need it to be set to a suitable
+       value to ensure it will be seen as changing when the real value is used. */
+    s->bytes_per_row = 0;
+
+    s->pages_transferred = 0;
+
+    s->image_buffer = NULL;
+    s->image_buffer_size = 0;
+
+    /* Set some default values */
+    s->x_resolution = T4_X_RESOLUTION_R8;
+    s->y_resolution = T4_Y_RESOLUTION_FINE;
+    s->image_width = 1728;
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_rx_start_page(t4_state_t *s)
+{
+    int bytes_per_row;
+    int run_space;
+    uint32_t *bufptr;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Start rx page - compression %d\n", s->line_encoding);
+    if (s->tiff_file == NULL)
+        return -1;
+
+    /* Calculate the scanline/tile width. */
+    bytes_per_row = s->image_width/8;
+    run_space = 2*((s->image_width + 31) & ~31);
+    run_space = (run_space + 3)*sizeof(uint32_t);
+    if (bytes_per_row != s->bytes_per_row)
+    {
+        /* Allocate the space required for decoding the new row length. */
+        s->bytes_per_row = bytes_per_row;
+        if ((bufptr = (uint32_t *) realloc(s->cur_runs, run_space)) == NULL)
+            return -1;
+        s->cur_runs = bufptr;
+        if ((bufptr = (uint32_t *) realloc(s->ref_runs, run_space)) == NULL)
+            return -1;
+        s->ref_runs = bufptr;
+    }
+    memset(s->cur_runs, 0, run_space);
+    memset(s->ref_runs, 0, run_space);
+
+    s->bits = 0;
+    s->bits_to_date = 0;
+
+    s->row_is_2d = (s->line_encoding == T4_COMPRESSION_ITU_T6);
+    s->first_eol_seen = (s->line_encoding == T4_COMPRESSION_ITU_T6);
+
+    s->bad_rows = 0;
+    s->longest_bad_row_run = 0;
+    s->curr_bad_row_run = 0;
+    s->image_length = 0;
+    s->consecutive_eols = 0;
+    s->data = 0;
+    s->bit = 8;
+    s->image_size = 0;
+    s->row_starts_at = 0;
+    s->last_row_starts_at = 0;
+
+    s->row_len = 0;
+    s->its_black = FALSE;
+    s->black_white = 0;
+
+    s->pa = s->cur_runs;
+    s->pb = s->ref_runs;
+
+    /* Initialise the reference line to all white */
+    s->ref_runs[0] = s->image_width;
+    s->ref_runs[1] = 0;
+    s->a0 = 0;
+    s->b1 = s->image_width;
+    s->run_length = 0;
+
+    time (&s->page_start_time);
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_rx_delete(t4_state_t *s)
+{
+    if (t4_rx_end(s))
+        return -1;
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_rx_end(t4_state_t *s)
+{
+    int i;
+
+    if (s->tiff_file)
+    {
+        if (s->pages_transferred > 1)
+        {
+            /* We need to edit the TIFF directories. Until now we did not know
+               the total page count, so the TIFF file currently says one. Now we
+               need to set the correct total page count associated with each page. */
+            for (i = 0;  i < s->pages_transferred;  i++)
+            {
+                TIFFSetDirectory(s->tiff_file, (tdir_t) i);
+                TIFFSetField(s->tiff_file, TIFFTAG_PAGENUMBER, i, s->pages_transferred);
+                TIFFWriteDirectory(s->tiff_file);
+            }
+        }
+        TIFFClose(s->tiff_file);
+        s->tiff_file = NULL;
+        if (s->file)
+            free((char *) s->file);
+        s->file = NULL;
+    }
+    if (s->image_buffer)
+    {
+        free(s->image_buffer);
+        s->image_buffer = NULL;
+        s->image_buffer_size = 0;
+    }
+    if (s->cur_runs)
+    {
+        free(s->cur_runs);
+        s->cur_runs = NULL;
+    }
+    if (s->ref_runs)
+    {
+        free(s->ref_runs);
+        s->ref_runs = NULL;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_rx_set_rx_encoding(t4_state_t *s, int encoding)
+{
+    s->line_encoding = encoding;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_rx_set_image_width(t4_state_t *s, int width)
+{
+    s->image_width = width;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_rx_set_y_resolution(t4_state_t *s, int resolution)
+{
+    s->y_resolution = resolution;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_rx_set_x_resolution(t4_state_t *s, int resolution)
+{
+    s->x_resolution = resolution;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_rx_set_sub_address(t4_state_t *s, const char *sub_address)
+{
+    s->sub_address = (sub_address  &&  sub_address[0])  ?  sub_address  :  NULL;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_rx_set_far_ident(t4_state_t *s, const char *ident)
+{
+    s->far_ident = (ident  &&  ident[0])  ?  ident  :  NULL;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_rx_set_vendor(t4_state_t *s, const char *vendor)
+{
+    s->vendor = vendor;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_rx_set_model(t4_state_t *s, const char *model)
+{
+    s->model = model;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void put_bits(t4_state_t *s, int bits, int length)
+{
+    static const int msbmask[9] =
+    {
+        0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff
+    };
+
+    s->row_bits += length;
+    while (length > s->bit)
+    {
+        s->data |= (bits >> (length - s->bit));
+        length -= s->bit;
+        flush_bits_to_image_buffer(s);
+    }
+    s->data |= ((bits & msbmask[length]) << (s->bit - length));
+    s->bit -= length;
+    if (s->bit == 0)
+        flush_bits_to_image_buffer(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Write the sequence of codes that describes
+ * the specified span of zero's or one's.  The
+ * appropriate table that holds the make-up and
+ * terminating codes is supplied.
+ */
+static __inline__ void put_span(t4_state_t *s, int32_t span, const T4_table_entry *tab)
+{
+    const T4_table_entry *te;
+
+    te = &tab[63 + (2560 >> 6)];
+    while (span >= 2560 + 64)
+    {
+        put_bits(s, te->code, te->length);
+        span -= te->runlen;
+    }
+    te = &tab[63 + (span >> 6)];
+    if (span >= 64)
+    {
+        put_bits(s, te->code, te->length);
+        span -= te->runlen;
+    }
+    put_bits(s, tab[span].code, tab[span].length);
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Find a span of ones or zeros using the supplied
+ * table.  The 'base' of the bit string is supplied
+ * along with the start and end bit indices.
+ */
+static __inline__ int find0span(uint8_t *bp, int bs, int be)
+{
+    int bits;
+    int n;
+    int span;
+    unsigned int *lp;
+
+    bits = be - bs;
+    bp += bs >> 3;
+    /* Check partial byte on LHS. */
+    if (bits > 0  &&  (n = (bs & 7)))
+    {
+        span = run_length((*bp << n) & 0xFF);
+        if (span > 8 - n)       /* Value too generous */
+            span = 8 - n;
+        if (span > bits)        /* Constrain span to bit range */
+            span = bits;
+        if (n + span < 8)       /* Doesn't extend to edge of byte */
+            return span;
+        bits -= span;
+        bp++;
+    }
+    else
+    {
+        span = 0;
+    }
+    if (bits >= (int) (2*8*sizeof(unsigned int)))
+    {
+        /* Align to natural integer boundary and check integers. */
+        while (!is_aligned(bp, unsigned int))
+        {
+            if (*bp)
+                return span + run_length(*bp);
+            span += 8;
+            bits -= 8;
+            bp++;
+        }
+        lp = (unsigned int *) bp;
+        while (bits >= (int) (8*sizeof(unsigned int))  &&  *lp == 0)
+        {
+            span += 8*sizeof(unsigned int);
+            bits -= 8*sizeof(unsigned int);
+            lp++;
+        }
+        bp = (uint8_t *) lp;
+    }
+    /* Scan full bytes for all 0's. */
+    while (bits >= 8)
+    {
+        if (*bp)
+            return span + run_length(*bp);
+        span += 8;
+        bits -= 8;
+        bp++;
+    }
+    /* Check partial byte on RHS. */
+    if (bits > 0)
+    {
+        n = run_length(*bp);
+        span += ((n > bits)  ?  bits  :  n);
+    }
+    return span;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int find1span(uint8_t *bp, int bs, int be)
+{
+    int bits;
+    int n;
+    int span;
+    unsigned int *lp;
+
+    bits = be - bs;
+    bp += bs >> 3;
+    /* Check partial byte on LHS. */
+    if (bits > 0  &&  (n = (bs & 7)))
+    {
+        span = run_length(((*bp << n) & 0xFF) ^ 0xFF);
+        if (span > 8 - n)       /* Value too generous */
+            span = 8 - n;
+        if (span > bits)        /* Constrain span to bit range */
+            span = bits;
+        if (n + span < 8)       /* Doesn't extend to edge of byte */
+            return span;
+        bits -= span;
+        bp++;
+    }
+    else
+    {
+        span = 0;
+    }
+    if (bits >= (int) (2*8*sizeof(unsigned int)))
+    {
+        /* Align to natural integer boundary and check integers. */
+        while (!is_aligned(bp, unsigned int))
+        {
+            if (*bp != 0xFF)
+                return span + run_length(*bp ^ 0xFF);
+            span += 8;
+            bits -= 8;
+            bp++;
+        }
+        lp = (unsigned int *) bp;
+        while (bits >= (int) (8*sizeof(unsigned int))  &&  *lp == (unsigned int) ~0)
+        {
+            span += 8*sizeof(unsigned int);
+            bits -= 8*sizeof(unsigned int);
+            lp++;
+        }
+        bp = (uint8_t *) lp;
+    }
+    /* Scan full bytes for all 1's. */
+    while (bits >= 8)
+    {
+        if (*bp != 0xFF)
+            return span + run_length(*bp ^ 0xFF);
+        span += 8;
+        bits -= 8;
+        bp++;
+    }
+    /* Check partial byte on RHS. */
+    if (bits > 0)
+    {
+        n = run_length(*bp ^ 0xFF);
+        span += ((n > bits)  ?  bits  :  n);
+    }
+    return span;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * Write an EOL code to the output stream.  We also handle writing the tag
+ * bit for the next scanline when doing 2D encoding.
+ */
+static void t4_encode_eol(t4_state_t *s)
+{
+    unsigned int code;
+    int length;
+
+    if (s->line_encoding == T4_COMPRESSION_ITU_T4_1D)
+    {
+        code = 0x001;
+        length = 12;
+    }
+    else
+    {
+        code = 0x0002 | (!s->row_is_2d);
+        length = 13;
+    }
+    /* We may need to pad the row to a minimum length. */
+    if (s->row_bits + length < s->min_row_bits)
+        put_bits(s, 0, s->min_row_bits - (s->row_bits + length));
+    put_bits(s, code, length);
+    s->row_bits = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * 2D-encode a row of pixels.  Consult ITU specification T.4 for the algorithm.
+ */
+static void t4_encode_2d_row(t4_state_t *s, uint8_t *bp)
+{
+    int a0;
+    int a1;
+    int b1;
+    int a2;
+    int b2;
+    int d;
+    static const T4_table_entry codes[] =
+    {
+        { 7, 0x03, 0 },         /* VR3          0000 011 */
+        { 6, 0x03, 0 },         /* VR2          0000 11 */
+        { 3, 0x03, 0 },         /* VR1          011 */
+        { 1, 0x01, 0 },         /* V0           1 */
+        { 3, 0x02, 0 },         /* VL1          010 */
+        { 6, 0x02, 0 },         /* VL2          0000 10 */
+        { 7, 0x02, 0 },         /* VL3          0000 010 */
+        { 3, 0x01, 0 },         /* horizontal   001 */
+        { 4, 0x01, 0 }          /* pass         0001 */
+    };
+    
+    a0 = 0;
+    a1 = (bp[0] & 0x80)  ?  0  :  find0span(bp, 0, s->image_width);
+    b1 = (s->ref_row_buf[0] & 0x80)  ?  0  :  find0span(s->ref_row_buf, 0, s->image_width);
+    for (;;)
+    {
+        b2 = (b1 < s->image_width)  ?  (b1 + (((s->ref_row_buf[b1 >> 3] << (b1 & 7)) & 0x80)  ?  find1span(s->ref_row_buf, b1, s->image_width)  :  find0span(s->ref_row_buf, b1, s->image_width)))  :  s->image_width;
+        if (b2 >= a1)
+        {
+            d = b1 - a1;
+            if (-3 <= d  &&  d <= 3)
+            {
+                /* Vertical mode */
+                put_bits(s, codes[d + 3].code, codes[d + 3].length);
+                a0 = a1;
+            }
+            else
+            {
+                /* Horizontal mode */
+                a2 = (a1 < s->image_width)  ?  (a1 + (((bp[a1 >> 3] << (a1 & 7)) & 0x80)  ?  find1span(bp, a1, s->image_width)  :  find0span(bp, a1, s->image_width)))  :  s->image_width;
+                put_bits(s, codes[7].code, codes[7].length);
+                if (a0 + a1 == 0  ||  ((bp[a0 >> 3] << (a0 & 7)) & 0x80) == 0)
+                {
+                    put_span(s, a1 - a0, t4_white_codes);
+                    put_span(s, a2 - a1, t4_black_codes);
+                }
+                else
+                {
+                    put_span(s, a1 - a0, t4_black_codes);
+                    put_span(s, a2 - a1, t4_white_codes);
+                }
+                a0 = a2;
+            }
+        }
+        else
+        {
+            /* Pass mode */
+            put_bits(s, codes[8].code, codes[8].length);
+            a0 = b2;
+        }
+        if (a0 >= s->image_width)
+            break;
+        a1 = a0 + (((bp[a0 >> 3] << (a0 & 7)) & 0x80)  ?  find1span(bp, a0, s->image_width)  :  find0span(bp, a0, s->image_width));
+        b1 = a0 + (((bp[a0 >> 3] << (a0 & 7)) & 0x80)  ?  find0span(s->ref_row_buf, a0, s->image_width)  :  find1span(s->ref_row_buf, a0, s->image_width));
+        b1 = b1 + (((bp[a0 >> 3] << (a0 & 7)) & 0x80)  ?  find1span(s->ref_row_buf, b1, s->image_width)  :  find0span(s->ref_row_buf, b1, s->image_width));
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+/*
+ * 1D-encode a row of pixels.  The encoding is
+ * a sequence of all-white or all-black spans
+ * of pixels encoded with Huffman codes.
+ */
+static void t4_encode_1d_row(t4_state_t *s, uint8_t *bp)
+{
+    int span;
+    int bs;
+
+    bs = 0;
+    for (;;)
+    {
+        span = find0span(bp, bs, s->image_width);                /* white span */
+        put_span(s, span, t4_white_codes);
+        bs += span;
+        if (bs >= s->image_width)
+            break;
+        span = find1span(bp, bs, s->image_width);                /* black span */
+        put_span(s, span, t4_black_codes);
+        bs += span;
+        if (bs >= s->image_width)
+            break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int t4_encode_row(t4_state_t *s, uint8_t *bp)
+{
+    switch (s->line_encoding)
+    {
+    case T4_COMPRESSION_ITU_T6:
+        /* T.6 compression is a trivial step up from T.4 2D, so we just
+           throw it in here. T.6 is only used with error correction,
+           so it does not need independantly compressed (i.e. 1D) lines
+           to recover from data errors. It doesn't need EOLs, either. */
+        t4_encode_2d_row(s, bp);
+        memcpy(s->ref_row_buf, bp, s->bytes_per_row);
+        break;
+    case T4_COMPRESSION_ITU_T4_2D:
+        t4_encode_eol(s);
+        if (s->row_is_2d)
+        {
+            t4_encode_2d_row(s, bp);
+            s->rows_to_next_1d_row--;
+        }
+        else
+        {
+            t4_encode_1d_row(s, bp);
+            s->row_is_2d = TRUE;
+        }
+        if (s->rows_to_next_1d_row <= 0)
+        {
+            /* Insert a row of 1D encoding */
+            s->row_is_2d = FALSE;
+            s->rows_to_next_1d_row = s->max_rows_to_next_1d_row - 1;
+        }
+        else
+        {
+            memcpy(s->ref_row_buf, bp, s->bytes_per_row);
+        }
+        break;
+    default:
+    case T4_COMPRESSION_ITU_T4_1D:
+        t4_encode_eol(s);
+        t4_encode_1d_row(s, bp);
+        break;
+    }
+    bp += s->bytes_per_row;
+    s->row++;
+    return 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+t4_state_t *t4_tx_create(const char *file, int start_page, int stop_page)
+{
+    t4_state_t *s;
+    
+    if ((s = (t4_state_t *) malloc(sizeof(t4_state_t *))))
+    {
+        if (t4_tx_init(s, file, start_page, stop_page))
+        {
+            free(s);
+            return NULL;
+        }
+    }
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_init(t4_state_t *s, const char *file, int start_page, int stop_page)
+{
+    float x_resolution;
+    float y_resolution;
+    uint16_t res_unit;
+    uint32_t parm;
+
+    memset(s, 0, sizeof(*s));
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "T.4");
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Start tx document\n");
+
+    if ((s->tiff_file = TIFFOpen(file, "r")) == NULL)
+        return -1;
+
+    s->file = strdup(file);
+    s->start_page = (start_page >= 0)  ?  start_page  :  0;
+    s->stop_page = (stop_page >= 0)  ?  stop_page : INT_MAX;
+    TIFFGetField(s->tiff_file, TIFFTAG_IMAGEWIDTH, &parm);
+    s->image_width = parm;
+    s->bytes_per_row = (s->image_width + 7)/8;
+    TIFFGetField(s->tiff_file, TIFFTAG_XRESOLUTION, &x_resolution);
+    TIFFGetField(s->tiff_file, TIFFTAG_YRESOLUTION, &y_resolution);
+    TIFFGetField(s->tiff_file, TIFFTAG_RESOLUTIONUNIT, &res_unit);
+
+    /* Allow a little range for the X resolution in centimeters. The spec doesn't pin down the
+       precise value. The other value should be exact. */
+    if ((res_unit == RESUNIT_CENTIMETER  &&  fabsf(x_resolution - 160.74f) < 2.0f)
+        ||
+        (res_unit == RESUNIT_INCH  &&  fabs(x_resolution - 408.0f) < 2.0f))
+    {
+        s->x_resolution = T4_X_RESOLUTION_R16;
+    }
+    else if ((res_unit == RESUNIT_CENTIMETER  &&  fabsf(x_resolution - 40.19f) < 2.0f)
+            ||
+            (res_unit == RESUNIT_INCH  &&  fabs(x_resolution - 102.0f) < 2.0f))
+    {
+        s->x_resolution = T4_X_RESOLUTION_R4;
+    }
+    else
+    {
+        /* Treat everything else as R8. Most FAXes are this resolution anyway. */
+        s->x_resolution = T4_X_RESOLUTION_R8;
+    }
+
+    if ((res_unit == RESUNIT_CENTIMETER  &&  fabsf(y_resolution - 154.0f) < 2.0f)
+        ||
+        (res_unit == RESUNIT_INCH  &&  fabsf(y_resolution - 392.0f) < 2.0f))
+    {
+        s->y_resolution = T4_Y_RESOLUTION_SUPERFINE;
+        s->max_rows_to_next_1d_row = 8;
+    }
+    else if ((res_unit == RESUNIT_CENTIMETER  &&  fabsf(y_resolution - 77.0f) < 2.0f)
+             ||
+             (res_unit == RESUNIT_INCH  &&  fabsf(y_resolution - 196.0f) < 2.0f))
+    {
+        s->y_resolution = T4_Y_RESOLUTION_FINE;
+        s->max_rows_to_next_1d_row = 4;
+    }
+    else
+    {
+        s->y_resolution = T4_Y_RESOLUTION_STANDARD;
+        s->max_rows_to_next_1d_row = 2;
+    }
+    s->rows_to_next_1d_row = s->max_rows_to_next_1d_row - 1;
+
+    s->pages_transferred = s->start_page;
+    if ((s->row_buf = malloc(s->bytes_per_row)) == NULL)
+        return -1;
+    if ((s->ref_row_buf = malloc(s->bytes_per_row)) == NULL)
+    {
+        free(s->row_buf);
+        s->row_buf = NULL;
+        return -1;
+    }
+    s->image_buffer_size = 0;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void make_header(t4_state_t *s, char *header)
+{
+    time_t now;
+    struct tm tm;
+    static const char *months[] =
+    {
+        "Jan",
+        "Feb",
+        "Mar",
+        "Apr",
+        "May",
+        "Jun",
+        "Jul",
+        "Aug",
+        "Sep",
+        "Oct",
+        "Nov",
+        "Dec"
+    };
+
+    time(&now);
+    tm = *localtime(&now);
+    snprintf(header,
+             132,
+             "  %2d-%s-%d  %02d:%02d    %-50s %-21s   p.%d",
+             tm.tm_mday,
+             months[tm.tm_mon],
+             tm.tm_year + 1900,
+             tm.tm_hour,
+             tm.tm_min,
+             s->header_info,
+             s->local_ident,
+             s->pages_transferred + 1);
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_start_page(t4_state_t *s)
+{
+    int row;
+    int ok;
+    int i;
+    int pattern;
+    int row_bufptr;
+    int parm;
+    char *t;
+    char header[132 + 1];
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Start tx page %d\n", s->pages_transferred);
+    if (s->pages_transferred > s->stop_page)
+        return -1;
+    if (s->tiff_file == NULL)
+        return -1;
+    if (!TIFFSetDirectory(s->tiff_file, (tdir_t) s->pages_transferred))
+        return -1;
+    s->image_size = 0;
+    s->bit = 8;
+    s->row_is_2d = (s->line_encoding == T4_COMPRESSION_ITU_T6);
+    s->rows_to_next_1d_row = s->max_rows_to_next_1d_row - 1;
+
+    /* Allow for pages being of different width */
+    TIFFGetField(s->tiff_file, TIFFTAG_IMAGEWIDTH, &parm);
+    if (parm != s->image_width)
+    {
+        s->image_width = parm;
+        s->bytes_per_row = (s->image_width + 7)/8;
+        if ((s->row_buf = realloc(s->row_buf, s->bytes_per_row)) == NULL)
+            return -1;
+        if ((s->ref_row_buf = realloc(s->ref_row_buf, s->bytes_per_row)) == NULL)
+        {
+            free(s->row_buf);
+            s->row_buf = NULL;
+            return -1;
+        }
+    }
+    memset(s->ref_row_buf, 0, s->bytes_per_row);
+
+    if (s->header_info  &&  s->header_info[0])
+    {
+        /* Modify the resulting image to include a header line, typical of hardware FAX machines */
+        make_header(s, header);
+        for (row = 0;  row < 16;  row++)
+        {
+            t = header;
+            row_bufptr = 0;
+            for (t = header;  *t  &&  row_bufptr <= s->bytes_per_row - 2;  t++)
+            {
+                pattern = header_font[(uint8_t) *t][row];
+                s->row_buf[row_bufptr++] = (uint8_t) (pattern >> 8);
+                s->row_buf[row_bufptr++] = (uint8_t) (pattern & 0xFF);
+            }
+            for (  ;  row_bufptr <= s->bytes_per_row;  )
+                s->row_buf[row_bufptr++] = 0;
+            switch (s->y_resolution)
+            {
+            case T4_Y_RESOLUTION_SUPERFINE:
+                if ((ok = t4_encode_row(s, s->row_buf)) <= 0)
+                    return -1;
+                if ((ok = t4_encode_row(s, s->row_buf)) <= 0)
+                    return -1;
+                /* Fall through */
+            case T4_Y_RESOLUTION_FINE:
+                if ((ok = t4_encode_row(s, s->row_buf)) <= 0)
+                    return -1;
+                /* Fall through */
+            default:
+                if ((ok = t4_encode_row(s, s->row_buf)) <= 0)
+                    return -1;
+                break;
+            }
+        }
+    }
+    TIFFGetField(s->tiff_file, TIFFTAG_IMAGELENGTH, &s->image_length);
+    for (row = 0;  row < s->image_length;  row++)
+    {
+        if ((ok = TIFFReadScanline(s->tiff_file, s->row_buf, row, 0)) <= 0)
+        {
+            span_log(&s->logging, SPAN_LOG_WARNING, "%s: Write error at row %d.\n", s->file, row);
+            break;
+        }
+        if ((ok = t4_encode_row(s, s->row_buf)) <= 0)
+            return -1;
+    }
+
+    if (s->line_encoding != T4_COMPRESSION_ITU_T6)
+    {
+        /* Attach a return to control (RTC == 6 x EOLs) to the end of the page */
+        s->row_is_2d = FALSE;
+        for (i = 0;  i < 6;  i++)
+        {
+            t4_encode_eol(s);
+            /* Suppress row padding between these EOLs */
+            s->row_bits = INT_MAX - 1000;
+        }
+    }
+    put_bits(s, 0, 7);
+    s->bit_pos = 7;
+    s->bit_ptr = 0;
+    s->row_bits = 0;
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_more_pages(t4_state_t *s)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "Checking for the existance of page %d\n", s->pages_transferred + 1);
+    if (s->pages_transferred > s->stop_page)
+        return -1;
+    if (s->tiff_file == NULL)
+        return -1;
+    if (!TIFFSetDirectory(s->tiff_file, (tdir_t) s->pages_transferred + 1))
+        return -1;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_restart_page(t4_state_t *s)
+{
+    s->bit_pos = 7;
+    s->bit_ptr = 0;
+    s->row_bits = 0;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_end_page(t4_state_t *s)
+{
+    s->pages_transferred++;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_get_bit(t4_state_t *s)
+{
+    int bit;
+
+    if (s->bit_ptr >= s->image_size)
+        return PUTBIT_END_OF_DATA;
+    bit = (s->image_buffer[s->bit_ptr] >> s->bit_pos) & 1;
+    if (--s->bit_pos < 0)
+    {
+        s->bit_pos = 7;
+        s->bit_ptr++;
+    }
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_check_bit(t4_state_t *s)
+{
+    int bit;
+
+    if (s->bit_ptr >= s->image_size)
+        return PUTBIT_END_OF_DATA;
+    bit = (s->image_buffer[s->bit_ptr] >> s->bit_pos) & 1;
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_delete(t4_state_t *s)
+{
+    if (t4_tx_end(s))
+        return -1;
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_end(t4_state_t *s)
+{
+    if (s->tiff_file)
+    {
+        TIFFClose(s->tiff_file);
+        s->tiff_file = NULL;
+        if (s->file)
+            free((char *) s->file);
+        s->file = NULL;
+    }
+    if (s->image_buffer)
+    {
+        free(s->image_buffer);
+        s->image_buffer = NULL;
+        s->image_buffer_size = 0;
+    }
+    if (s->row_buf)
+    {
+        free(s->row_buf);
+        s->row_buf = NULL;
+    }
+    if (s->ref_row_buf)
+    {
+        free(s->ref_row_buf);
+        s->ref_row_buf = NULL;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_tx_set_tx_encoding(t4_state_t *s, int encoding)
+{
+    s->line_encoding = encoding;
+    s->rows_to_next_1d_row = s->max_rows_to_next_1d_row - 1;
+    s->row_is_2d = FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_tx_set_min_row_bits(t4_state_t *s, int bits)
+{
+    s->min_row_bits = bits;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_tx_set_local_ident(t4_state_t *s, const char *ident)
+{
+    s->local_ident = (ident  &&  ident[0])  ?  ident  :  NULL;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_tx_set_header_info(t4_state_t *s, const char *info)
+{
+    s->header_info = (info  &&  info[0])  ?  info  :  NULL;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_get_y_resolution(t4_state_t *s)
+{
+    return s->y_resolution;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_get_x_resolution(t4_state_t *s)
+{
+    return s->x_resolution;
+}
+/*- End of function --------------------------------------------------------*/
+
+int t4_tx_get_image_width(t4_state_t *s)
+{
+    return s->image_width;
+}
+/*- End of function --------------------------------------------------------*/
+
+void t4_get_transfer_statistics(t4_state_t *s, t4_stats_t *t)
+{
+    t->pages_transferred = s->pages_transferred;
+    t->width = s->image_width;
+    t->length = s->image_length;
+    t->bad_rows = s->bad_rows;
+    t->longest_bad_row_run = s->longest_bad_row_run;
+    t->x_resolution = s->x_resolution;
+    t->y_resolution = s->y_resolution;
+    t->encoding = s->line_encoding;
+    t->image_size = s->image_size;
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *t4_encoding_to_str(int encoding)
+{
+    switch (encoding)
+    {
+    case T4_COMPRESSION_ITU_T4_1D:
+        return "T.4 1-D";
+    case T4_COMPRESSION_ITU_T4_2D:
+        return "T.4 2-D";
+    case T4_COMPRESSION_ITU_T6:
+        return "T.6";
+    }
+    return "???";
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/t4states.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,12454 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t4states.h - state tables for T.4 FAX image processing
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t4states.h,v 1.5 2006/10/24 13:45:26 steveu Exp $
+ */
+
+static const T4_tab_entry T4_common_table[128] =
+{
+    {S_Null    ,   1,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Pass    ,   4,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   6,    2},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Pass    ,   4,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   7,    3},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Pass    ,   4,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   6,    2},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Pass    ,   4,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Ext     ,   7,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Pass    ,   4,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   6,    2},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Pass    ,   4,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   7,    3},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Pass    ,   4,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   6,    2},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Pass    ,   4,    0},
+    {S_V0      ,   1,    0},
+    {S_VL      ,   3,    1},
+    {S_V0      ,   1,    0},
+    {S_Horiz   ,   3,    0},
+    {S_V0      ,   1,    0},
+    {S_VR      ,   3,    1},
+    {S_V0      ,   1,    0}
+};
+
+static const T4_tab_entry T4_white_table[4096] =
+{
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1472},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1216},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  960},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  704},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  11, 1792},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  832},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1600},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1344},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1088},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1536},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1280},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1024},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  768},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  11, 1856},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  896},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1728},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1408},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1152},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1472},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1216},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  960},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  704},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 2112},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  832},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1600},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1344},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1088},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1536},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1280},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1024},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  768},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 2368},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  896},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1728},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1408},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1152},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1472},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1216},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  960},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  704},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 1984},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  832},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1600},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1344},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1088},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1536},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1280},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1024},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  768},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  11, 1920},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  896},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1728},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1408},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1152},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1472},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1216},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  960},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  704},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 2240},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  832},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1600},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1344},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1088},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1536},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1280},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1024},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  768},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 2496},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  896},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1728},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1408},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1152},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_EOL     ,  12,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1472},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1216},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  960},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  704},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  11, 1792},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  832},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1600},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1344},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1088},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1536},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1280},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1024},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  768},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  11, 1856},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  896},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1728},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1408},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1152},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1472},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1216},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  960},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  704},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 2176},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  832},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1600},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1344},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1088},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1536},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1280},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1024},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  768},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 2432},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  896},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1728},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1408},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1152},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1472},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1216},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  960},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  704},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 2048},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  832},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1600},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1344},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1088},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1536},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1280},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1024},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  768},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  11, 1920},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  896},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1728},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1408},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1152},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1472},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1216},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  960},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  704},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 2304},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  832},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1600},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1344},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1088},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_Null    ,   1,    0},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   39},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   8,  576},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   55},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   45},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   53},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  448},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   35},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   51},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,   63},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1536},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   43},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1280},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   29},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   33},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   49},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   61},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   47},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   59},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   41},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1024},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   31},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   57},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   9,  768},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   37},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  320},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_MakeUp  ,  12, 2560},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   20},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   24},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   7,   28},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   23},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   27},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   40},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9,  896},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   7,   19},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   56},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   46},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   54},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  512},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   36},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   52},
+    {S_TermW   ,   6,   15},
+    {S_TermW   ,   8,    0},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_MakeUpW ,   9, 1728},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   44},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   9, 1408},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   30},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   6,   12},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   6, 1664},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   34},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   8,   50},
+    {S_TermW   ,   6,   14},
+    {S_TermW   ,   8,   62},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   8,   48},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   8,   60},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   8,   42},
+    {S_TermW   ,   6,   16},
+    {S_MakeUpW ,   9, 1152},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   32},
+    {S_TermW   ,   5,    8},
+    {S_TermW   ,   8,   58},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   7,   22},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   5,   11},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   26},
+    {S_TermW   ,   5,    9},
+    {S_MakeUpW ,   8,  640},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   8,   38},
+    {S_MakeUpW ,   5,  128},
+    {S_TermW   ,   7,   25},
+    {S_TermW   ,   6,   15},
+    {S_MakeUpW ,   8,  384},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7},
+    {S_TermW   ,   6,   13},
+    {S_TermW   ,   4,    3},
+    {S_TermW   ,   7,   18},
+    {S_TermW   ,   4,    5},
+    {S_TermW   ,   7,   21},
+    {S_TermW   ,   6,   17},
+    {S_MakeUpW ,   7,  256},
+    {S_TermW   ,   4,    6},
+    {S_TermW   ,   6,    1},
+    {S_TermW   ,   5,    8},
+    {S_MakeUpW ,   6,  192},
+    {S_MakeUpW ,   5,   64},
+    {S_TermW   ,   5,   10},
+    {S_TermW   ,   4,    4},
+    {S_TermW   ,   4,    2},
+    {S_TermW   ,   4,    7}
+};
+
+static const T4_tab_entry T4_black_table[8192] =
+{
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   18},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   17},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1792},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   23},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   20},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   25},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  128},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   56},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   30},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1856},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   57},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   21},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   54},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   52},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   48},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2112},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   44},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   36},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  384},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   28},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   60},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   40},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2368},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   16},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  10,   64},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   18},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   17},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 1984},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   50},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   34},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1664},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   26},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1408},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   32},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1920},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   61},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   42},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1024},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13,  768},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   62},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2240},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   46},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   38},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13,  512},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   19},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   24},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   22},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2496},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   16},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  10,   64},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_EOL     ,  12,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   18},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   17},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1792},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   23},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   20},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   25},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  192},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1280},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   31},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1856},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   58},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   21},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13,  896},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13,  640},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   49},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2176},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   45},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   37},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  448},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   29},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1536},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   41},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2432},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   16},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  10,   64},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   18},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   17},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2048},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   51},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   35},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  320},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   27},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   59},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   33},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1920},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  256},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   43},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1152},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   55},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   63},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2304},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   47},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   39},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   53},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   19},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   24},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   22},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2560},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   16},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  10,   64},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   18},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   17},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1792},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   23},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   20},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   25},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  128},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   56},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   30},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1856},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   57},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   21},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   54},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   52},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   48},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2112},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   44},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   36},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  384},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   28},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   60},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   40},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2368},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   16},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  10,   64},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   18},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   17},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 1984},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   50},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   34},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1728},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   26},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1472},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   32},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1920},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   61},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   42},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1088},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13,  832},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   62},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2240},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   46},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   38},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13,  576},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   19},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   24},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   22},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2496},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   16},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  10,   64},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_EOL     ,  12,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   18},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   17},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1792},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   23},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   20},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   25},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  192},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1344},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   31},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1856},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   58},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   21},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13,  960},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13,  704},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   49},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2176},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   45},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   37},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  448},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   29},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1600},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   41},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2432},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   16},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  10,   64},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   18},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   17},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2048},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   51},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   35},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  320},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   27},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   59},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   33},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  11, 1920},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  12,  256},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   43},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  13, 1216},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   9,   15},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   55},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   63},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2304},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   47},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   39},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  12,   53},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_Null    ,   1,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   13},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   19},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   24},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  11,   22},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUp  ,  12, 2560},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   10},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,   16},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,  10,    0},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_MakeUpB ,  10,   64},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    9},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   11},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   8,   14},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   6,    8},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   7,   12},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    6},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   5,    7},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    1},
+    {S_TermB   ,   2,    2},
+    {S_TermB   ,   4,    5},
+    {S_TermB   ,   2,    3},
+    {S_TermB   ,   3,    4},
+    {S_TermB   ,   2,    2}
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/testcpuid.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,209 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * testcpuid.c - Check the CPU type, to identify special features, like SSE.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ * Stitched together from bits of testing code found here and there
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: testcpuid.c,v 1.9 2006/10/24 13:45:27 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+
+/* Make this file just disappear if we are not on an x86 machine */
+#if defined(__i386__) //  ||  defined(__x86_64__)
+
+#define X86_EFLAGS_CF   0x00000001 /* Carry Flag */
+#define X86_EFLAGS_PF   0x00000004 /* Parity Flag */
+#define X86_EFLAGS_AF   0x00000010 /* Auxillary carry Flag */
+#define X86_EFLAGS_ZF   0x00000040 /* Zero Flag */
+#define X86_EFLAGS_SF   0x00000080 /* Sign Flag */
+#define X86_EFLAGS_TF   0x00000100 /* Trap Flag */
+#define X86_EFLAGS_IF   0x00000200 /* Interrupt Flag */
+#define X86_EFLAGS_DF   0x00000400 /* Direction Flag */
+#define X86_EFLAGS_OF   0x00000800 /* Overflow Flag */
+#define X86_EFLAGS_IOPL 0x00003000 /* IOPL mask */
+#define X86_EFLAGS_NT   0x00004000 /* Nested Task */
+#define X86_EFLAGS_RF   0x00010000 /* Resume Flag */
+#define X86_EFLAGS_VM   0x00020000 /* Virtual Mode */
+#define X86_EFLAGS_AC   0x00040000 /* Alignment Check */
+#define X86_EFLAGS_VIF  0x00080000 /* Virtual Interrupt Flag */
+#define X86_EFLAGS_VIP  0x00100000 /* Virtual Interrupt Pending */
+#define X86_EFLAGS_ID   0x00200000 /* CPUID detection flag */
+
+/* Standard macro to see if a specific flag is changeable */
+static __inline__ int flag_is_changeable_p(uint32_t flag)
+{
+    uint32_t f1;
+    uint32_t f2;
+
+    __asm__ __volatile__ (
+        " pushfl\n"
+        " pushfl\n"
+        " popl %0\n"
+        " movl %0,%1\n"
+        " xorl %2,%0\n"
+        " pushl %0\n"
+        " popfl\n"
+        " pushfl\n"
+        " popl %0\n"
+        " popfl\n"
+        : "=&r" (f1), "=&r" (f2)
+        : "ir" (flag));
+
+    return ((f1^f2) & flag) != 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Probe for the CPUID instruction */
+static int have_cpuid_p(void)
+{
+    return flag_is_changeable_p(X86_EFLAGS_ID);
+}
+/*- End of function --------------------------------------------------------*/
+
+int has_MMX(void)
+{
+    int result;
+
+    if (!have_cpuid_p())
+        return  0;
+    /*endif*/
+    __asm__ __volatile__ (
+        " push  %%ebx;\n"
+	" mov	$1,%%eax;\n"
+	" cpuid;\n"
+	" xor   %%eax,%%eax;\n"
+	" test	$0x800000,%%edx;\n"
+	" jz	1f;\n"	            /* no MMX support */
+	" inc   %%eax;\n"	    /* MMX support */
+        "1:\n"
+        " pop  %%ebx;\n"
+	: "=a" (result)
+        : 
+        : "ecx", "edx");
+    return  result;
+}
+/*- End of function --------------------------------------------------------*/
+        
+int has_SIMD(void)
+{
+    int result;
+
+    if (!have_cpuid_p())
+        return  0;
+    /*endif*/
+    __asm__ __volatile__ (
+        " push  %%ebx;\n"
+	" mov	$1,%%eax;\n"
+	" cpuid;\n"
+	" xor   %%eax,%%eax;\n"
+	" test	$0x02000000,%%edx;\n"
+	" jz	1f;\n"		        /* no SIMD support */
+	" inc	%%eax;\n"		/* SIMD support */
+        "1:\n"
+        " pop  %%ebx;\n"
+	: "=a" (result)
+        : 
+        : "ecx", "edx");
+    return  result;
+}
+/*- End of function --------------------------------------------------------*/
+
+int has_SIMD2(void)
+{
+    int result;
+
+    if (!have_cpuid_p())
+        return  0;
+    /*endif*/
+    __asm__ __volatile__ (
+        " push  %%ebx;\n"
+	" mov	$1,%%eax;\n"
+	" cpuid;\n"
+	" xor   %%eax,%%eax;\n"
+	" test	$0x04000000,%%edx;\n"
+	" jz	1f;\n"		        /* no SIMD2 support */
+	" inc	%%eax;\n"		/* SIMD2 support */
+        "1:\n"
+        " pop  %%ebx;\n"
+	: "=a" (result)
+        : 
+        : "ecx", "edx");
+    return  result;
+}
+/*- End of function --------------------------------------------------------*/
+        
+int has_3DNow(void)
+{
+    int result;
+
+    if (!have_cpuid_p())
+        return  0;
+    /*endif*/
+    __asm__ __volatile__ (
+        " push  %%ebx;\n"
+	" mov	$0x80000000,%%eax;\n"
+	" cpuid;\n"
+        " xor   %%ecx,%%ecx;\n"
+	" cmp	$0x80000000,%%eax;\n"
+	" jbe	1f;\n"		        /* no extended MSR(1), so no 3DNow! */
+	" mov	$0x80000001,%%eax;\n"
+	" cpuid;\n"
+        " xor   %%ecx,%%ecx;\n"
+	" test	$0x80000000,%%edx;\n"
+	" jz	1f;\n"		        /* no 3DNow! support */
+	" inc   %%ecx;\n"		/* 3DNow! support */
+        "1:\n"
+        " pop  %%ebx;\n"
+	: "=c" (result)
+        : 
+        : "eax", "edx");
+    return  result;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(TESTBED)
+int main(int argc, char *argv[])
+{
+    int result;
+
+    result = has_MMX();
+    printf("MMX is %x\n", result);
+    result = has_SIMD();
+    printf("SIMD is %x\n", result);
+    result = has_SIMD2();
+    printf("SIMD2 is %x\n", result);
+    result = has_3DNow();
+    printf("3DNow is %x\n", result);
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/time_scale.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,242 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * time_scale.c - Time scaling for linear speech data
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: time_scale.c,v 1.15 2006/11/19 14:07:25 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <string.h>
+#include <fcntl.h>
+#include <time.h>
+#include <limits.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/time_scale.h"
+
+/*
+    Time scaling for speech, based on the Pointer Interval Controlled
+    OverLap and Add (PICOLA) method, developed by Morita Naotaka.
+ */
+
+static __inline__ int amdf_pitch(int min_pitch, int max_pitch, int16_t amp[], int len)
+{
+    int i;
+    int j;
+    int acc;
+    int min_acc;
+    int pitch;
+
+    pitch = min_pitch;
+    min_acc = INT_MAX;
+    for (i = max_pitch;  i <= min_pitch;  i++)
+    {
+        acc = 0;
+        for (j = 0;  j < len;  j++)
+            acc += abs(amp[i + j] - amp[j]);
+        if (acc < min_acc)
+        {
+            min_acc = acc;
+            pitch = i;
+        }
+    }
+    return pitch;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void overlap_add(int16_t amp1[], int16_t amp2[], int len)
+{
+    int i;
+    double weight;
+    double step;
+    
+    step = 1.0/len;
+    weight = 0.0;
+    for (i = 0;  i < len;  i++)
+    {
+        /* TODO: saturate */
+        amp2[i] = (int16_t) ((double) amp1[i]*(1.0 - weight) + (double) amp2[i]*weight);
+        weight += step;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int time_scale_rate(time_scale_t *s, float rate)
+{
+    if (rate <= 0.0)
+        return -1;
+    /*endif*/
+    if (rate >= 0.99  &&  rate <= 1.01)
+    {
+        /* Treat rate close to normal speed as exactly normal speed, and
+           avoid divide by zero, and other numerical problems. */
+        rate = 1.0;
+    }
+    else if (rate < 1.0)
+    {
+        s->rcomp = rate/(1.0 - rate);
+    }
+    else
+    {
+        s->rcomp = 1.0/(rate - 1.0);
+    }
+    /*endif*/
+    s->rate = rate;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int time_scale_init(time_scale_t *s, float rate)
+{
+    if (time_scale_rate(s, rate))
+        return -1;
+    /*endif*/
+    s->rate_nudge = 0.0;
+    s->fill = 0;
+    s->lcp = 0;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int time_scale(time_scale_t *s, int16_t out[], int16_t in[], int len)
+{
+    double lcpf;
+    int pitch;
+    int out_len;
+    int in_len;
+    int k;
+
+    out_len = 0;
+    in_len = 0;
+
+    /* Top up the buffer */
+    if (s->fill + len < TIME_SCALE_BUF_LEN)
+    {
+        /* Cannot continue without more samples */
+        memcpy(s->buf + s->fill, in, sizeof(int16_t)*len);
+        s->fill += len;
+        return out_len;
+    }
+    k = (TIME_SCALE_BUF_LEN - s->fill);
+    memcpy(s->buf + s->fill, in, sizeof(int16_t)*k);
+    in_len += k;
+    s->fill = TIME_SCALE_BUF_LEN;
+    while (s->fill == TIME_SCALE_BUF_LEN)
+    {
+        while (s->lcp >= TIME_SCALE_BUF_LEN)
+        {
+            memcpy(out + out_len, s->buf, sizeof(int16_t)*TIME_SCALE_BUF_LEN);
+            out_len += TIME_SCALE_BUF_LEN;
+            if (len - in_len < TIME_SCALE_BUF_LEN)
+            {
+                /* Cannot continue without more samples */
+                memcpy(s->buf, in + in_len, sizeof(int16_t)*(len - in_len));
+                s->fill = len - in_len;
+                s->lcp -= TIME_SCALE_BUF_LEN;
+                return out_len;
+            }
+            memcpy(s->buf, in + in_len, sizeof(int16_t)*TIME_SCALE_BUF_LEN);
+            in_len += TIME_SCALE_BUF_LEN;
+            s->lcp -= TIME_SCALE_BUF_LEN;
+        }
+        if (s->lcp > 0)
+        {
+            memcpy(out + out_len, s->buf, sizeof(int16_t)*s->lcp);
+            out_len += s->lcp;
+            memcpy(s->buf, s->buf + s->lcp, sizeof(int16_t)*(TIME_SCALE_BUF_LEN - s->lcp));
+            if (len - in_len < s->lcp)
+            {
+                /* Cannot continue without more samples */
+                memcpy(s->buf + (TIME_SCALE_BUF_LEN - s->lcp), in + in_len, sizeof(int16_t)*(len - in_len));
+                s->fill = TIME_SCALE_BUF_LEN - s->lcp + len - in_len;
+                s->lcp = 0;
+                return out_len;
+            }
+            memcpy(s->buf + (TIME_SCALE_BUF_LEN - s->lcp), in + in_len, sizeof(int16_t)*s->lcp);
+            in_len += s->lcp;
+            s->lcp = 0;
+        }
+        if (s->rate == 1.0)
+        {
+            s->lcp = 0x7FFFFFFF;
+        }
+        else
+        {
+            pitch = amdf_pitch(SAMPLE_RATE/TIME_SCALE_MIN_PITCH, SAMPLE_RATE/TIME_SCALE_MAX_PITCH, s->buf, SAMPLE_RATE/TIME_SCALE_MIN_PITCH);
+            lcpf = (double) pitch*s->rcomp;
+            /* Nudge around to compensate for fractional samples */
+            s->lcp = (int) lcpf;
+            /* Note that s->lcp and lcpf are not the same, as lcpf has a fractional part, and s->lcp doesn't */
+            s->rate_nudge += s->lcp - lcpf;
+            if (s->rate_nudge >= 0.5)
+            {
+                s->lcp--;
+                s->rate_nudge -= 1.0;
+            }
+            else if (s->rate_nudge <= -0.5)
+            {
+                s->lcp++;
+                s->rate_nudge += 1.0;
+            }
+            if (s->rate < 1.0)
+            {
+                /* Speed up - drop a chunk of data */
+                overlap_add(s->buf, s->buf + pitch, pitch);
+                memcpy(&s->buf[pitch], &s->buf[2*pitch], sizeof(int16_t)*(TIME_SCALE_BUF_LEN - 2*pitch));
+                if (len - in_len < pitch)
+                {
+                    /* Cannot continue without more samples */
+                    memcpy(s->buf + TIME_SCALE_BUF_LEN - pitch, in + in_len, sizeof(int16_t)*(len - in_len));
+                    s->fill += (len - in_len - pitch);
+                    return out_len;
+                }
+                memcpy(s->buf + TIME_SCALE_BUF_LEN - pitch, in + in_len, sizeof(int16_t)*pitch);
+                in_len += pitch;
+            }
+            else
+            {
+                /* Slow down - insert a chunk of data */
+                memcpy(out + out_len, s->buf, sizeof(int16_t)*pitch);
+                out_len += pitch;
+                overlap_add(s->buf + pitch, s->buf, pitch);
+            }
+        }
+    }
+    return out_len;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/tone_detect.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,121 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * tone_detect.c - General telephony tone detection, and specific
+ *                 detection of Bell MF, and MFC/R2.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001-2003, 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: tone_detect.c,v 1.30 2006/11/19 14:07:25 steveu Exp $
+ */
+ 
+/*! \file tone_detect.h */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <string.h>
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/tone_detect.h"
+#include "spandsp/tone_generate.h"
+
+#if !defined(M_PI)
+/* C99 systems may not define M_PI */
+#define M_PI 3.14159265358979323846264338327
+#endif
+
+void make_goertzel_descriptor(goertzel_descriptor_t *t, float freq, int samples)
+{
+    t->fac = 2.0f*cosf(2.0f*M_PI*(freq/(float) SAMPLE_RATE));
+    t->samples = samples;
+}
+/*- End of function --------------------------------------------------------*/
+
+goertzel_state_t *goertzel_init(goertzel_state_t *s,
+                                goertzel_descriptor_t *t)
+{
+    if (s  ||  (s = malloc(sizeof(goertzel_state_t))))
+    {
+        s->v2 =
+        s->v3 = 0.0;
+        s->fac = t->fac;
+        s->samples = t->samples;
+        s->current_sample = 0;
+    }
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+void goertzel_reset(goertzel_state_t *s)
+{
+    s->v2 =
+    s->v3 = 0.0;
+    s->current_sample = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int goertzel_update(goertzel_state_t *s,
+                    const int16_t amp[],
+                    int samples)
+{
+    int i;
+    float v1;
+
+    if (samples > s->samples - s->current_sample)
+        samples = s->samples - s->current_sample;
+    for (i = 0;  i < samples;  i++)
+    {
+        v1 = s->v2;
+        s->v2 = s->v3;
+        s->v3 = s->fac*s->v2 - v1 + amp[i];
+    }
+    s->current_sample += samples;
+    return samples;
+}
+/*- End of function --------------------------------------------------------*/
+
+float goertzel_result(goertzel_state_t *s)
+{
+    float v1;
+
+    /* Push a zero through the process to finish things off. */
+    v1 = s->v2;
+    s->v2 = s->v3;
+    s->v3 = s->fac*s->v2 - v1;
+    /* Now calculate the non-recursive side of the filter. */
+    /* The result here is not scaled down to allow for the magnification
+       effect of the filter (the usual DFT magnification effect). */
+    return s->v3*s->v3 + s->v2*s->v2 - s->v2*s->v3*s->fac;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/tone_generate.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,193 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * tone_generate.c - General telephony tone generation, and specific
+ *                   generation of Bell MF, MFC/R2, and network supervisory tones.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: tone_generate.c,v 1.31 2006/11/28 16:59:56 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/dc_restore.h"
+#include "spandsp/dds.h"
+#include "spandsp/tone_generate.h"
+
+#if !defined(M_PI)
+/* C99 systems may not define M_PI */
+#define M_PI 3.14159265358979323846264338327
+#endif
+
+#define ms_to_samples(t)            (((t)*SAMPLE_RATE)/1000)
+
+void make_tone_gen_descriptor(tone_gen_descriptor_t *s,
+                              int f1,
+                              int l1,
+                              int f2,
+                              int l2,
+                              int d1,
+                              int d2,
+                              int d3,
+                              int d4,
+                              int repeat)
+{
+    memset(s, 0, sizeof(*s));
+    if (f1 >= 1)
+    {
+        s->phase_rate[0] = dds_phase_ratef((float) f1);
+        s->gain[0] = dds_scaling_dbm0f((float) l1);
+    }
+    s->modulate = (f2 < 0);
+    if (f2)
+    {
+        s->phase_rate[1] = dds_phase_ratef((float) abs(f2));
+        s->gain[1] = (s->modulate)  ?  (float) l2/100.0f  :  dds_scaling_dbm0f((float) l2);
+    }
+
+    s->duration[0] = d1*8;
+    s->duration[1] = d2*8;
+    s->duration[2] = d3*8;
+    s->duration[3] = d4*8;
+
+    s->repeat = repeat;
+}
+/*- End of function --------------------------------------------------------*/
+
+void make_tone_descriptor(tone_gen_descriptor_t *desc, cadenced_tone_t *tone)
+{
+    make_tone_gen_descriptor(desc,
+                             tone->f1,
+                             tone->level1,
+                             tone->f2,
+                             tone->level2,
+                             tone->on_time1,
+                             tone->off_time1,
+                             tone->on_time2,
+                             tone->off_time2,
+                             tone->repeat);
+}
+/*- End of function --------------------------------------------------------*/
+
+void tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t)
+{
+    int i;
+
+    s->phase_rate[0] = t->phase_rate[0];
+    s->gain[0] = t->gain[0];
+    s->phase_rate[1] = t->phase_rate[1];
+    s->gain[1] = t->gain[1];
+    s->modulate = t->modulate;
+
+    for (i = 0;  i < 4;  i++)
+        s->duration[i] = t->duration[i];
+    s->repeat = t->repeat;
+
+    s->phase[0] = 0;
+    s->phase[1] = 0;
+
+    s->current_section = 0;
+    s->current_position = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples)
+{
+    int samples;
+    int limit;
+    float xamp;
+    float yamp;
+
+    if (s->current_section < 0)
+        return  0;
+
+    for (samples = 0;  samples < max_samples;  )
+    {
+        limit = samples + s->duration[s->current_section] - s->current_position;
+        if (limit > max_samples)
+            limit = max_samples;
+        
+        s->current_position += (limit - samples);
+        if (s->current_section & 1)
+        {
+            /* A silent section */
+            for (  ;  samples < limit;  samples++)
+                amp[samples] = 0;
+        }
+        else
+        {
+            for (  ;  samples < limit;  samples++)
+            {
+                xamp = 0.0;
+                if (s->phase_rate[0])
+                    xamp = dds_modf(&(s->phase[0]), s->phase_rate[0], s->gain[0], 0);
+                if (s->phase_rate[1])
+                {
+                    yamp = dds_modf(&(s->phase[1]), s->phase_rate[1], s->gain[1], 0);
+                    if (s->modulate)
+                        xamp *= (1.0f + yamp);
+                    else
+                        xamp += yamp;
+                }
+                /* Saturation of the answer is the right thing at this point.
+                   However, we are normally generating well controlled tones,
+                   that cannot clip. So, the overhead of doing saturation is
+                   a waste of valuable time. */
+                amp[samples] = (int16_t) lrintf(xamp);
+            }
+        }
+        if (s->current_position >= s->duration[s->current_section])
+        {
+            s->current_position = 0;
+            if (++s->current_section > 3  ||  s->duration[s->current_section] == 0)
+            {
+                if (!s->repeat)
+                {
+                    /* Force a quick exit */
+                    s->current_section = -1;
+                    break;
+                }
+                s->current_section = 0;
+            }
+        }
+    }
+    return samples;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v17rx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,12153 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v17rx.c - ITU V.17 modem receive part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v17rx.c,v 1.66 2006/11/28 16:59:56 steveu Exp $
+ */
+
+/*! \file */
+
+/* THIS IS A WORK IN PROGRESS - KIND OF FUNCTIONAL, BUT NOT ROBUST! */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/complex.h"
+#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
+#include "spandsp/async.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/arctan2.h"
+#include "spandsp/dds.h"
+#include "spandsp/complex_filters.h"
+
+#include "spandsp/v29rx.h"
+#include "spandsp/v17rx.h"
+
+#define CARRIER_NOMINAL_FREQ            1800.0f
+#define BAUD_RATE                       2400
+#define EQUALIZER_DELTA                 0.21f
+
+/* Segments of the training sequence */
+#define V17_TRAINING_SEG_1_LEN          256
+#define V17_TRAINING_SEG_2_LEN          2976
+#define V17_TRAINING_SHORT_SEG_2_LEN    38
+#define V17_TRAINING_SEG_3_LEN          64
+#define V17_TRAINING_SEG_4A_LEN         15
+#define V17_TRAINING_SEG_4_LEN          48
+
+#define V17_BRIDGE_WORD                 0x8880
+
+enum
+{
+    TRAINING_STAGE_NORMAL_OPERATION = 0,
+    TRAINING_STAGE_SYMBOL_ACQUISITION,
+    TRAINING_STAGE_LOG_PHASE,
+    TRAINING_STAGE_SHORT_WAIT_FOR_CDBA,
+    TRAINING_STAGE_WAIT_FOR_CDBA,
+    TRAINING_STAGE_TRAIN_ON_CDBA,
+    TRAINING_STAGE_SHORT_TRAIN_ON_CDBA_AND_TEST,
+    TRAINING_STAGE_TRAIN_ON_CDBA_AND_TEST,
+    TRAINING_STAGE_BRIDGE,
+    TRAINING_STAGE_TCM_WINDUP,
+    TRAINING_STAGE_TEST_ONES,
+    TRAINING_STAGE_PARKED
+};
+
+/* Raised root cosine pulse shaping; Beta = 0.5; 4 symbols either
+   side of the centre. We cannot simplify this by using only half
+   the filter, as each variant are each skewed by n/PULSESHAPER_COEFF_SETS
+   of a sample. Only one is symmetric. */
+#define PULSESHAPER_GAIN        10.00736638f
+#define PULSESHAPER_COEFF_SETS  192
+static const complexf_t pulseshaper[PULSESHAPER_COEFF_SETS][V17_RX_FILTER_STEPS] =
+{
+    {
+        {-0.0006054906f, -0.0076934876f},   /* Filter 0 */
+        { 0.0036800485f, -0.0011957203f},
+        {-0.0058580401f, -0.0095594527f},
+        { 0.0088272478f, -0.0088272478f},
+        {-0.0070156625f, -0.0042992035f},
+        { 0.0051634536f, -0.0158914760f},
+        {-0.0145681542f, -0.0011465386f},
+        {-0.0064674677f, -0.0408339841f},
+        {-0.0136664373f,  0.0056608237f},
+        {-0.0772003352f, -0.1062571456f},
+        { 0.0857393937f, -0.1003879319f},
+        {-0.1385128869f, -0.0705758410f},
+        { 0.1555698725f, -0.6479951542f},
+        { 1.0773601532f,  0.0000000000f},
+        { 0.2515047330f,  1.0475926064f},
+        {-0.5937739310f,  0.3025429291f},
+        {-0.1009610162f, -0.1182101620f},
+        {-0.0775987414f,  0.1068055047f},
+        {-0.1213433125f, -0.0502620457f},
+        { 0.0023140482f, -0.0146103256f},
+        {-0.0412155383f,  0.0032437332f},
+        {-0.0045157277f, -0.0138979808f},
+        {-0.0142470090f,  0.0087305783f},
+        {-0.0058181900f, -0.0058181900f},
+        {-0.0065226702f,  0.0106440303f},
+        {-0.0106628565f, -0.0034645721f},
+        {-0.0003035921f,  0.0038575039f},
+    },
+    {
+        {-0.0005350174f, -0.0067980401f},   /* Filter 1 */
+        { 0.0036179827f, -0.0011755538f},
+        {-0.0058922384f, -0.0096152592f},
+        { 0.0087813723f, -0.0087813723f},
+        {-0.0071152571f, -0.0043602352f},
+        { 0.0051438801f, -0.0158312350f},
+        {-0.0147911442f, -0.0011640883f},
+        {-0.0064623452f, -0.0408016420f},
+        {-0.0141731548f,  0.0058707129f},
+        {-0.0774910884f, -0.1066573331f},
+        { 0.0852944499f, -0.0998669696f},
+        {-0.1405505661f, -0.0716140904f},
+        { 0.1562083221f, -0.6506544882f},
+        { 1.0785754919f,  0.0000000000f},
+        { 0.2512098584f,  1.0463643655f},
+        {-0.5913273989f,  0.3012963588f},
+        {-0.0994933220f, -0.1164917128f},
+        {-0.0779816184f,  0.1073324898f},
+        {-0.1208747844f, -0.0500679750f},
+        { 0.0022295424f, -0.0140767766f},
+        {-0.0412382036f,  0.0032455170f},
+        {-0.0044465975f, -0.0136852198f},
+        {-0.0142966471f,  0.0087609966f},
+        {-0.0057346411f, -0.0057346411f},
+        {-0.0065550592f,  0.0106968845f},
+        {-0.0105990212f, -0.0034438307f},
+        {-0.0003085935f,  0.0039210527f},
+    },
+    {
+        {-0.0004645441f, -0.0059025926f},   /* Filter 2 */
+        { 0.0035559167f, -0.0011553874f},
+        {-0.0059264367f, -0.0096710658f},
+        { 0.0087354968f, -0.0087354967f},
+        {-0.0072148518f, -0.0044212669f},
+        { 0.0051243060f, -0.0157709923f},
+        {-0.0150141341f, -0.0011816380f},
+        {-0.0064572227f, -0.0407692998f},
+        {-0.0146798714f,  0.0060806018f},
+        {-0.0777818416f, -0.1070575206f},
+        { 0.0848495158f, -0.0993460187f},
+        {-0.1425882320f, -0.0726523330f},
+        { 0.1568467578f, -0.6533137643f},
+        { 1.0797908306f,  0.0000000000f},
+        { 0.2509149561f,  1.0451360086f},
+        {-0.5888808668f,  0.3000497884f},
+        {-0.0980256278f, -0.1147732637f},
+        {-0.0783644955f,  0.1078594748f},
+        {-0.1204062425f, -0.0498738986f},
+        { 0.0021450365f, -0.0135432277f},
+        {-0.0412608690f,  0.0032473008f},
+        {-0.0043774672f, -0.0134724587f},
+        {-0.0143462852f,  0.0087914149f},
+        {-0.0056510916f, -0.0056510916f},
+        {-0.0065874478f,  0.0107497379f},
+        {-0.0105351868f, -0.0034230897f},
+        {-0.0003135949f,  0.0039846010f},
+    },
+    {
+        {-0.0003940709f, -0.0050071451f},   /* Filter 3 */
+        { 0.0034938509f, -0.0011352210f},
+        {-0.0059606350f, -0.0097268724f},
+        { 0.0086896212f, -0.0086896212f},
+        {-0.0073144473f, -0.0044822991f},
+        { 0.0051047326f, -0.0157107513f},
+        {-0.0152371240f, -0.0011991877f},
+        {-0.0064521008f, -0.0407369614f},
+        {-0.0151865871f,  0.0062904903f},
+        {-0.0780725949f, -0.1074577081f},
+        { 0.0844045720f, -0.0988250564f},
+        {-0.1446259112f, -0.0736905824f},
+        { 0.1574852075f, -0.6559730983f},
+        { 1.0810062885f,  0.0000000000f},
+        { 0.2506200815f,  1.0439077677f},
+        {-0.5864343878f,  0.2988032451f},
+        {-0.0965579336f, -0.1130548146f},
+        {-0.0787473725f,  0.1083864599f},
+        {-0.1199377143f, -0.0496798279f},
+        { 0.0020605307f, -0.0130096788f},
+        {-0.0412835343f,  0.0032490846f},
+        {-0.0043083372f, -0.0132596986f},
+        {-0.0143959234f,  0.0088218332f},
+        {-0.0055675427f, -0.0055675427f},
+        {-0.0066198369f,  0.0108025920f},
+        {-0.0104713524f, -0.0034023486f},
+        {-0.0003185963f,  0.0040481493f},
+    },
+    {
+        {-0.0003235976f, -0.0041116977f},   /* Filter 4 */
+        { 0.0034317848f, -0.0011150545f},
+        {-0.0059948338f, -0.0097826797f},
+        { 0.0086437457f, -0.0086437457f},
+        {-0.0074140420f, -0.0045433308f},
+        { 0.0050851585f, -0.0156505086f},
+        {-0.0154601149f, -0.0012167374f},
+        {-0.0064469783f, -0.0407046192f},
+        {-0.0156933046f,  0.0065003796f},
+        {-0.0783633481f, -0.1078578956f},
+        { 0.0839596378f, -0.0983041055f},
+        {-0.1466635904f, -0.0747288318f},
+        { 0.1581236571f, -0.6586324323f},
+        { 1.0822216272f,  0.0000000000f},
+        { 0.2503251791f,  1.0426794109f},
+        {-0.5839878557f,  0.2975566747f},
+        {-0.0950902394f, -0.1113363655f},
+        {-0.0791302584f,  0.1089134570f},
+        {-0.1194691862f, -0.0494857572f},
+        { 0.0019760247f, -0.0124761289f},
+        {-0.0413061997f,  0.0032508684f},
+        {-0.0042392070f, -0.0130469375f},
+        {-0.0144455615f,  0.0088522515f},
+        {-0.0054839935f, -0.0054839935f},
+        {-0.0066522260f,  0.0108554462f},
+        {-0.0104075179f, -0.0033816076f},
+        {-0.0003235976f,  0.0041116977f},
+    },
+    {
+        {-0.0003284768f, -0.0041736941f},   /* Filter 5 */
+        { 0.0033683193f, -0.0010944333f},
+        {-0.0060281246f, -0.0098370053f},
+        { 0.0085958524f, -0.0085958524f},
+        {-0.0075123852f, -0.0046035956f},
+        { 0.0050640016f, -0.0155853942f},
+        {-0.0156828718f, -0.0012342688f},
+        {-0.0064402678f, -0.0406622506f},
+        {-0.0162074218f,  0.0067133339f},
+        {-0.0786464462f, -0.1082475467f},
+        { 0.0834926583f, -0.0977573427f},
+        {-0.1487248762f, -0.0757791094f},
+        { 0.1587593377f, -0.6612802328f},
+        { 1.0833886862f,  0.0000000000f},
+        { 0.2500192287f,  1.0414050355f},
+        {-0.5815324545f,  0.2963055853f},
+        {-0.0936404389f, -0.1096388672f},
+        {-0.0794934547f,  0.1094133538f},
+        {-0.1189896170f, -0.0492871131f},
+        { 0.0018928506f, -0.0119509884f},
+        {-0.0413190346f,  0.0032518786f},
+        {-0.0041701300f, -0.0128343404f},
+        {-0.0144908338f,  0.0088799944f},
+        {-0.0053995750f, -0.0053995750f},
+        {-0.0066830881f,  0.0109058085f},
+        {-0.0103421636f, -0.0033603726f},
+        {-0.0003284768f,  0.0041736941f},
+    },
+    {
+        {-0.0003333561f, -0.0042356910f},   /* Filter 6 */
+        { 0.0033048536f, -0.0010738120f},
+        {-0.0060614159f, -0.0098913317f},
+        { 0.0085479591f, -0.0085479591f},
+        {-0.0076107284f, -0.0046638604f},
+        { 0.0050428441f, -0.0155202782f},
+        {-0.0159056278f, -0.0012518001f},
+        {-0.0064335573f, -0.0406198820f},
+        {-0.0167215389f,  0.0069262882f},
+        {-0.0789295444f, -0.1086371979f},
+        { 0.0830256788f, -0.0972105799f},
+        {-0.1507861619f, -0.0768293869f},
+        { 0.1593950044f, -0.6639279752f},
+        { 1.0845557451f,  0.0000000000f},
+        { 0.2497133061f,  1.0401307762f},
+        {-0.5790770002f,  0.2950544689f},
+        {-0.0921906384f, -0.1079413690f},
+        {-0.0798566597f,  0.1099132627f},
+        {-0.1185100615f, -0.0490884747f},
+        { 0.0018096765f, -0.0114258479f},
+        {-0.0413318695f,  0.0032528887f},
+        {-0.0041010527f, -0.0126217423f},
+        {-0.0145361044f,  0.0089077363f},
+        {-0.0053151562f, -0.0053151562f},
+        {-0.0067139506f,  0.0109561717f},
+        {-0.0102768083f, -0.0033391374f},
+        {-0.0003333561f,  0.0042356910f},
+    },
+    {
+        {-0.0003382353f, -0.0042976874f},   /* Filter 7 */
+        { 0.0032413878f, -0.0010531907f},
+        {-0.0060947066f, -0.0099456573f},
+        { 0.0085000658f, -0.0085000658f},
+        {-0.0077090716f, -0.0047241252f},
+        { 0.0050216871f, -0.0154551638f},
+        {-0.0161283837f, -0.0012693313f},
+        {-0.0064268467f, -0.0405775134f},
+        {-0.0172356561f,  0.0071392425f},
+        {-0.0792126425f, -0.1090268491f},
+        { 0.0825586992f, -0.0966638172f},
+        {-0.1528474477f, -0.0778796645f},
+        { 0.1600306851f, -0.6665757757f},
+        { 1.0857228041f,  0.0000000000f},
+        { 0.2494073556f,  1.0388564008f},
+        {-0.5766215991f,  0.2938033795f},
+        {-0.0907408283f, -0.1062438594f},
+        {-0.0802198648f,  0.1104131716f},
+        {-0.1180305061f, -0.0488898364f},
+        { 0.0017265024f, -0.0109007073f},
+        {-0.0413447044f,  0.0032538988f},
+        {-0.0040319757f, -0.0124091451f},
+        {-0.0145813767f,  0.0089354791f},
+        {-0.0052307377f, -0.0052307377f},
+        {-0.0067448127f,  0.0110065340f},
+        {-0.0102114540f, -0.0033179025f},
+        {-0.0003382353f,  0.0042976874f},
+    },
+    {
+        {-0.0003431146f, -0.0043596843f},   /* Filter 8 */
+        { 0.0031779221f, -0.0010325695f},
+        {-0.0061279979f, -0.0099999837f},
+        { 0.0084521725f, -0.0084521725f},
+        {-0.0078074149f, -0.0047843900f},
+        { 0.0050005296f, -0.0153900477f},
+        {-0.0163511397f, -0.0012868626f},
+        {-0.0064201362f, -0.0405351449f},
+        {-0.0177497715f,  0.0073521961f},
+        {-0.0794957407f, -0.1094165002f},
+        { 0.0820917197f, -0.0961170544f},
+        {-0.1549087334f, -0.0789299420f},
+        { 0.1606663657f, -0.6692235761f},
+        { 1.0868898630f,  0.0000000000f},
+        { 0.2491014052f,  1.0375820255f},
+        {-0.5741661979f,  0.2925522901f},
+        {-0.0892910279f, -0.1045463612f},
+        {-0.0805830611f,  0.1109130684f},
+        {-0.1175509369f, -0.0486911923f},
+        { 0.0016433282f, -0.0103755659f},
+        {-0.0413575394f,  0.0032549089f},
+        {-0.0039628986f, -0.0121965479f},
+        {-0.0146266490f,  0.0089632220f},
+        {-0.0051463192f, -0.0051463192f},
+        {-0.0067756753f,  0.0110568971f},
+        {-0.0101460987f, -0.0032966673f},
+        {-0.0003431146f,  0.0043596843f},
+    },
+    {
+        {-0.0003478686f, -0.0044200894f},   /* Filter 9 */
+        { 0.0031130992f, -0.0010115072f},
+        {-0.0061603461f, -0.0100527712f},
+        { 0.0084022884f, -0.0084022884f},
+        {-0.0079044049f, -0.0048438256f},
+        { 0.0049777904f, -0.0153200636f},
+        {-0.0165734574f, -0.0013043594f},
+        {-0.0064118161f, -0.0404826137f},
+        {-0.0182710440f,  0.0075681142f},
+        {-0.0797708684f, -0.1097951811f},
+        { 0.0816025689f, -0.0955443324f},
+        {-0.1569931345f, -0.0799919974f},
+        { 0.1612990687f, -0.6718589736f},
+        { 1.0880081654f,  0.0000000000f},
+        { 0.2487845180f,  1.0362620954f},
+        {-0.5717027243f,  0.2912970876f},
+        {-0.0878594308f, -0.1028701764f},
+        {-0.0809267343f,  0.1113860940f},
+        {-0.1170608498f, -0.0484881916f},
+        { 0.0015615230f, -0.0098590683f},
+        {-0.0413606998f,  0.0032551577f},
+        {-0.0038939359f, -0.0119843024f},
+        {-0.0146675617f,  0.0089882934f},
+        {-0.0050611154f, -0.0050611154f},
+        {-0.0068049953f,  0.0111047430f},
+        {-0.0100792909f, -0.0032749601f},
+        {-0.0003478686f,  0.0044200894f},
+    },
+    {
+        {-0.0003526226f, -0.0044804944f},   /* Filter 10 */
+        { 0.0030482765f, -0.0009904451f},
+        {-0.0061926948f, -0.0101055594f},
+        { 0.0083524050f, -0.0083524049f},
+        {-0.0080013950f, -0.0049032612f},
+        { 0.0049550512f, -0.0152500795f},
+        {-0.0167957752f, -0.0013218562f},
+        {-0.0064034960f, -0.0404300825f},
+        {-0.0187923166f,  0.0077840324f},
+        {-0.0800459962f, -0.1101738620f},
+        { 0.0811134182f, -0.0949716105f},
+        {-0.1590775355f, -0.0810540528f},
+        { 0.1619317577f, -0.6744943131f},
+        { 1.0891264677f,  0.0000000000f},
+        { 0.2484676308f,  1.0349421653f},
+        {-0.5692392507f,  0.2900418852f},
+        {-0.0864278435f, -0.1011940030f},
+        {-0.0812704075f,  0.1118591195f},
+        {-0.1165707628f, -0.0482851909f},
+        { 0.0014797178f, -0.0093425708f},
+        {-0.0413638603f,  0.0032554064f},
+        {-0.0038249731f, -0.0117720568f},
+        {-0.0147084760f,  0.0090133657f},
+        {-0.0049759119f, -0.0049759119f},
+        {-0.0068343153f,  0.0111525889f},
+        {-0.0100124830f, -0.0032532529f},
+        {-0.0003526226f,  0.0044804944f},
+    },
+    {
+        {-0.0003573765f, -0.0045408995f},   /* Filter 11 */
+        { 0.0029834536f, -0.0009693828f},
+        {-0.0062250430f, -0.0101583469f},
+        { 0.0083025209f, -0.0083025209f},
+        {-0.0080983851f, -0.0049626968f},
+        { 0.0049323120f, -0.0151800954f},
+        {-0.0170180911f, -0.0013393528f},
+        {-0.0063951759f, -0.0403775514f},
+        {-0.0193135873f,  0.0079999498f},
+        {-0.0803211239f, -0.1105525428f},
+        { 0.0806242674f, -0.0943988885f},
+        {-0.1611619499f, -0.0821161150f},
+        { 0.1625644607f, -0.6771297106f},
+        { 1.0902447701f,  0.0000000000f},
+        { 0.2481507436f,  1.0336222352f},
+        {-0.5667757240f,  0.2887866556f},
+        {-0.0849962561f, -0.0995178296f},
+        {-0.0816140807f,  0.1123321451f},
+        {-0.1160806757f, -0.0480821902f},
+        { 0.0013979127f, -0.0088260732f},
+        {-0.0413670207f,  0.0032556551f},
+        {-0.0037560104f, -0.0115598113f},
+        {-0.0147493888f,  0.0090384371f},
+        {-0.0048907081f, -0.0048907081f},
+        {-0.0068636353f,  0.0112004348f},
+        {-0.0099456752f, -0.0032315458f},
+        {-0.0003573765f,  0.0045408995f},
+    },
+    {
+        {-0.0003621305f, -0.0046013046f},   /* Filter 12 */
+        { 0.0029186307f, -0.0009483206f},
+        {-0.0062573917f, -0.0102111352f},
+        { 0.0082526368f, -0.0082526368f},
+        {-0.0081953752f, -0.0050221324f},
+        { 0.0049095728f, -0.0151101113f},
+        {-0.0172404088f, -0.0013568496f},
+        {-0.0063868557f, -0.0403250202f},
+        {-0.0198348598f,  0.0082158679f},
+        {-0.0805962516f, -0.1109312237f},
+        { 0.0801351118f, -0.0938261609f},
+        {-0.1632463509f, -0.0831781703f},
+        { 0.1631971497f, -0.6797650501f},
+        { 1.0913630724f,  0.0000000000f},
+        { 0.2478338564f,  1.0323023051f},
+        {-0.5643122504f,  0.2875314531f},
+        {-0.0835646688f, -0.0978416562f},
+        {-0.0819577539f,  0.1128051707f},
+        {-0.1155905886f, -0.0478791895f},
+        { 0.0013161075f, -0.0083095757f},
+        {-0.0413701812f,  0.0032559039f},
+        {-0.0036870476f, -0.0113475657f},
+        {-0.0147903015f,  0.0090635084f},
+        {-0.0048055043f, -0.0048055043f},
+        {-0.0068929552f,  0.0112482807f},
+        {-0.0098788673f, -0.0032098386f},
+        {-0.0003621305f,  0.0046013046f},
+    },
+    {
+        {-0.0003667562f, -0.0046600797f},   /* Filter 13 */
+        { 0.0028524949f, -0.0009268318f},
+        {-0.0062887623f, -0.0102623273f},
+        { 0.0082007909f, -0.0082007909f},
+        {-0.0082909114f, -0.0050806770f},
+        { 0.0048852541f, -0.0150352662f},
+        {-0.0174620766f, -0.0013742952f},
+        {-0.0063769051f, -0.0402621940f},
+        {-0.0203630313f,  0.0084346437f},
+        {-0.0808630937f, -0.1112985002f},
+        { 0.0796236592f, -0.0932273268f},
+        {-0.1653533760f, -0.0842517533f},
+        { 0.1638266524f, -0.6823871173f},
+        { 1.0924322605f,  0.0000000000f},
+        { 0.2475061438f,  1.0309372838f},
+        {-0.5618415541f,  0.2862725705f},
+        {-0.0821516043f, -0.0961871702f},
+        {-0.0822820441f,  0.1132515179f},
+        {-0.1150904723f, -0.0476720345f},
+        { 0.0012357069f, -0.0078019464f},
+        {-0.0413638231f,  0.0032554035f},
+        {-0.0036182596f, -0.0111358578f},
+        {-0.0148268675f,  0.0090859161f},
+        {-0.0047195995f, -0.0047195995f},
+        {-0.0069207191f,  0.0112935871f},
+        {-0.0098106733f, -0.0031876810f},
+        {-0.0003667562f,  0.0046600797f},
+    },
+    {
+        {-0.0003713820f, -0.0047188553f},   /* Filter 14 */
+        { 0.0027863591f, -0.0009053429f},
+        {-0.0063201333f, -0.0103135203f},
+        { 0.0081489450f, -0.0081489450f},
+        {-0.0083864467f, -0.0051392212f},
+        { 0.0048609355f, -0.0149604211f},
+        {-0.0176837445f, -0.0013917409f},
+        {-0.0063669544f, -0.0401993678f},
+        {-0.0208912044f,  0.0086534202f},
+        {-0.0811299269f, -0.1116657647f},
+        { 0.0791122066f, -0.0926284927f},
+        {-0.1674604144f, -0.0853253430f},
+        { 0.1644561550f, -0.6850091845f},
+        { 1.0935014486f,  0.0000000000f},
+        { 0.2471784312f,  1.0295722626f},
+        {-0.5593708578f,  0.2850136878f},
+        {-0.0807385445f, -0.0945326898f},
+        {-0.0826063431f,  0.1136978772f},
+        {-0.1145903561f, -0.0474648796f},
+        { 0.0011553063f, -0.0072943168f},
+        {-0.0413574651f,  0.0032549031f},
+        {-0.0035494718f, -0.0109241508f},
+        {-0.0148634318f,  0.0091083227f},
+        {-0.0046336947f, -0.0046336947f},
+        {-0.0069484829f,  0.0113388935f},
+        {-0.0097424801f, -0.0031655237f},
+        {-0.0003713820f,  0.0047188553f},
+    },
+    {
+        {-0.0003760077f, -0.0047776305f},   /* Filter 15 */
+        { 0.0027202235f, -0.0008838542f},
+        {-0.0063515039f, -0.0103647124f},
+        { 0.0080970991f, -0.0080970991f},
+        {-0.0084819828f, -0.0051977658f},
+        { 0.0048366169f, -0.0148855761f},
+        {-0.0179054141f, -0.0014091867f},
+        {-0.0063570037f, -0.0401365416f},
+        {-0.0214193776f,  0.0088721967f},
+        {-0.0813967690f, -0.1120330412f},
+        { 0.0786007540f, -0.0920296586f},
+        {-0.1695674396f, -0.0863989259f},
+        { 0.1650856437f, -0.6876311937f},
+        { 1.0945705175f,  0.0000000000f},
+        { 0.2468507186f,  1.0282072413f},
+        {-0.5569001084f,  0.2837547781f},
+        {-0.0793254848f, -0.0928782095f},
+        {-0.0829306333f,  0.1141442244f},
+        {-0.1140902398f, -0.0472577246f},
+        { 0.0010749057f, -0.0067866875f},
+        {-0.0413511108f,  0.0032544030f},
+        {-0.0034806840f, -0.0107124438f},
+        {-0.0148999977f,  0.0091307304f},
+        {-0.0045477902f, -0.0045477902f},
+        {-0.0069762467f,  0.0113841999f},
+        {-0.0096742861f, -0.0031433661f},
+        {-0.0003760077f,  0.0047776305f},
+    },
+    {
+        {-0.0003806334f, -0.0048364061f},   /* Filter 16 */
+        { 0.0026540877f, -0.0008623654f},
+        {-0.0063828750f, -0.0104159054f},
+        { 0.0080452532f, -0.0080452532f},
+        {-0.0085775182f, -0.0052563099f},
+        { 0.0048122982f, -0.0148107310f},
+        {-0.0181270820f, -0.0014266323f},
+        {-0.0063470530f, -0.0400737154f},
+        {-0.0219475490f,  0.0090909725f},
+        {-0.0816636022f, -0.1124003057f},
+        { 0.0780893013f, -0.0914308246f},
+        {-0.1716744647f, -0.0874725088f},
+        { 0.1657151464f, -0.6902532609f},
+        { 1.0956397057f,  0.0000000000f},
+        { 0.2465230060f,  1.0268422201f},
+        {-0.5544294121f,  0.2824958955f},
+        {-0.0779124251f, -0.0912237291f},
+        {-0.0832549323f,  0.1145905836f},
+        {-0.1135901236f, -0.0470505697f},
+        { 0.0009945051f, -0.0062790583f},
+        {-0.0413447527f,  0.0032539026f},
+        {-0.0034118962f, -0.0105007368f},
+        {-0.0149365621f,  0.0091531370f},
+        {-0.0044618853f, -0.0044618853f},
+        {-0.0070040105f,  0.0114295063f},
+        {-0.0096060929f, -0.0031212088f},
+        {-0.0003806334f,  0.0048364061f},
+    },
+    {
+        {-0.0003851280f, -0.0048935157f},   /* Filter 17 */
+        { 0.0025866848f, -0.0008404648f},
+        {-0.0064132339f, -0.0104654466f},
+        { 0.0079914771f, -0.0079914771f},
+        {-0.0086714987f, -0.0053139012f},
+        { 0.0047864048f, -0.0147310392f},
+        {-0.0183478919f, -0.0014440104f},
+        {-0.0063354525f, -0.0400004728f},
+        {-0.0224823612f,  0.0093124989f},
+        {-0.0819218257f, -0.1127557199f},
+        { 0.0775554307f, -0.0908057424f},
+        {-0.1738036093f, -0.0885573622f},
+        { 0.1663412260f, -0.6928610705f},
+        { 1.0966593027f,  0.0000000000f},
+        { 0.2461845793f,  1.0254325714f},
+        {-0.5519522897f,  0.2812337386f},
+        {-0.0765181979f, -0.0895912988f},
+        {-0.0835600060f,  0.1150104815f},
+        {-0.1130804738f, -0.0468394658f},
+        { 0.0009155433f, -0.0057805131f},
+        {-0.0413290433f,  0.0032526663f},
+        {-0.0033433427f, -0.0102897508f},
+        {-0.0149687939f,  0.0091728887f},
+        {-0.0043753638f, -0.0043753638f},
+        {-0.0070302049f,  0.0114722518f},
+        {-0.0095365818f, -0.0030986233f},
+        {-0.0003851280f,  0.0048935157f},
+    },
+    {
+        {-0.0003896226f, -0.0049506252f},   /* Filter 18 */
+        { 0.0025192818f, -0.0008185643f},
+        {-0.0064435933f, -0.0105149887f},
+        { 0.0079377004f, -0.0079377004f},
+        {-0.0087654792f, -0.0053714926f},
+        { 0.0047605113f, -0.0146513473f},
+        {-0.0185687000f, -0.0014613884f},
+        {-0.0063238520f, -0.0399272301f},
+        {-0.0230171717f,  0.0095340247f},
+        {-0.0821800492f, -0.1131111340f},
+        { 0.0770215552f, -0.0901806545f},
+        {-0.1759327407f, -0.0896422088f},
+        { 0.1669673057f, -0.6954688800f},
+        { 1.0976788998f,  0.0000000000f},
+        { 0.2458461804f,  1.0240230385f},
+        {-0.5494751673f,  0.2799715817f},
+        {-0.0751239755f, -0.0879588741f},
+        {-0.0838650884f,  0.1154303915f},
+        {-0.1125708239f, -0.0466283620f},
+        { 0.0008365815f, -0.0052819680f},
+        {-0.0413133302f,  0.0032514296f},
+        {-0.0032747895f, -0.0100787656f},
+        {-0.0150010258f,  0.0091926404f},
+        {-0.0042888419f, -0.0042888419f},
+        {-0.0070563994f,  0.0115149973f},
+        {-0.0094670707f, -0.0030760377f},
+        {-0.0003896226f,  0.0049506252f},
+    },
+    {
+        {-0.0003941173f, -0.0050077347f},   /* Filter 19 */
+        { 0.0024518789f, -0.0007966637f},
+        {-0.0064739522f, -0.0105645299f},
+        { 0.0078839243f, -0.0078839243f},
+        {-0.0088594597f, -0.0054290839f},
+        { 0.0047346179f, -0.0145716555f},
+        {-0.0187895099f, -0.0014787665f},
+        {-0.0063122509f, -0.0398539838f},
+        {-0.0235519823f,  0.0097555505f},
+        {-0.0824382815f, -0.1134665602f},
+        { 0.0764876846f, -0.0895555723f},
+        {-0.1780618721f, -0.0907270554f},
+        { 0.1675933854f, -0.6980766896f},
+        { 1.0986984968f,  0.0000000000f},
+        { 0.2455077537f,  1.0226133898f},
+        {-0.5469980450f,  0.2787094248f},
+        {-0.0737297482f, -0.0863264437f},
+        {-0.0841701708f,  0.1158503014f},
+        {-0.1120611741f, -0.0464172581f},
+        { 0.0007576198f, -0.0047834232f},
+        {-0.0412976208f,  0.0032501933f},
+        {-0.0032062360f, -0.0098677796f},
+        {-0.0150332576f,  0.0092123921f},
+        {-0.0042023200f, -0.0042023200f},
+        {-0.0070825944f,  0.0115577436f},
+        {-0.0093975595f, -0.0030534522f},
+        {-0.0003941173f,  0.0050077347f},
+    },
+    {
+        {-0.0003986118f, -0.0050648438f},   /* Filter 20 */
+        { 0.0023844758f, -0.0007747632f},
+        {-0.0065043117f, -0.0106140720f},
+        { 0.0078301475f, -0.0078301475f},
+        {-0.0089534402f, -0.0054866752f},
+        { 0.0047087244f, -0.0144919637f},
+        {-0.0190103198f, -0.0014961446f},
+        {-0.0063006504f, -0.0397807411f},
+        {-0.0240867928f,  0.0099770762f},
+        {-0.0826965050f, -0.1138219743f},
+        { 0.0759538140f, -0.0889304901f},
+        {-0.1801910168f, -0.0918119088f},
+        { 0.1682194651f, -0.7006844992f},
+        { 1.0997180939f,  0.0000000000f},
+        { 0.2451693548f,  1.0212038570f},
+        {-0.5445209226f,  0.2774472679f},
+        {-0.0723355258f, -0.0846940190f},
+        {-0.0844752445f,  0.1162701993f},
+        {-0.1115515243f, -0.0462061542f},
+        { 0.0006786580f, -0.0042848781f},
+        {-0.0412819114f,  0.0032489569f},
+        {-0.0031376827f, -0.0096567945f},
+        {-0.0150654894f,  0.0092321438f},
+        {-0.0041157985f, -0.0041157985f},
+        {-0.0071087888f,  0.0116004890f},
+        {-0.0093280493f, -0.0030308669f},
+        {-0.0003986118f,  0.0050648438f},
+    },
+    {
+        {-0.0004029726f, -0.0051202528f},   /* Filter 21 */
+        { 0.0023158529f, -0.0007524662f},
+        {-0.0065336253f, -0.0106619075f},
+        { 0.0077744735f, -0.0077744735f},
+        {-0.0090457651f, -0.0055432520f},
+        { 0.0046812616f, -0.0144074419f},
+        {-0.0192300565f, -0.0015134383f},
+        {-0.0062873809f, -0.0396969606f},
+        {-0.0246279704f,  0.0102012394f},
+        {-0.0829458033f, -0.1141651041f},
+        { 0.0753974141f, -0.0882790295f},
+        {-0.1823417366f, -0.0929077553f},
+        { 0.1688419131f, -0.7032771818f},
+        { 1.1006877422f,  0.0000000000f},
+        { 0.2448203531f,  1.0197501604f},
+        {-0.5420382238f,  0.2761822697f},
+        {-0.0709604311f, -0.0830839899f},
+        {-0.0847612768f,  0.1166638890f},
+        {-0.1110328365f, -0.0459913067f},
+        { 0.0006011677f, -0.0037956237f},
+        {-0.0412570140f,  0.0032469974f},
+        {-0.0030694222f, -0.0094467102f},
+        {-0.0150934062f,  0.0092492512f},
+        {-0.0040287435f, -0.0040287435f},
+        {-0.0071334033f,  0.0116406561f},
+        {-0.0092572893f, -0.0030078756f},
+        {-0.0004029726f,  0.0051202528f},
+    },
+    {
+        {-0.0004073334f, -0.0051756619f},   /* Filter 22 */
+        { 0.0022472299f, -0.0007301693f},
+        {-0.0065629390f, -0.0107097431f},
+        { 0.0077187989f, -0.0077187989f},
+        {-0.0091380892f, -0.0055998282f},
+        { 0.0046537991f, -0.0143229210f},
+        {-0.0194497931f, -0.0015307319f},
+        {-0.0062741113f, -0.0396131801f},
+        {-0.0251691481f,  0.0104254025f},
+        {-0.0831951017f, -0.1145082339f},
+        { 0.0748410142f, -0.0876275690f},
+        {-0.1844924564f, -0.0940036018f},
+        { 0.1694643611f, -0.7058698644f},
+        { 1.1016573906f,  0.0000000000f},
+        { 0.2444713793f,  1.0182965797f},
+        {-0.5395555251f,  0.2749172715f},
+        {-0.0695853363f, -0.0814739608f},
+        {-0.0850473091f,  0.1170575787f},
+        {-0.1105141488f, -0.0457764592f},
+        { 0.0005236775f, -0.0033063695f},
+        {-0.0412321204f,  0.0032450383f},
+        {-0.0030011619f, -0.0092366267f},
+        {-0.0151213230f,  0.0092663586f},
+        {-0.0039416882f, -0.0039416882f},
+        {-0.0071580177f,  0.0116808232f},
+        {-0.0091865301f, -0.0029848846f},
+        {-0.0004073334f,  0.0051756619f},
+    },
+    {
+        {-0.0004116942f, -0.0052310710f},   /* Filter 23 */
+        { 0.0021786070f, -0.0007078723f},
+        {-0.0065922531f, -0.0107575794f},
+        { 0.0076631249f, -0.0076631248f},
+        {-0.0092304140f, -0.0056564050f},
+        { 0.0046263364f, -0.0142383992f},
+        {-0.0196695316f, -0.0015480257f},
+        {-0.0062608412f, -0.0395293959f},
+        {-0.0257103275f,  0.0106495664f},
+        {-0.0834444001f, -0.1148513637f},
+        { 0.0742846143f, -0.0869761084f},
+        {-0.1866431763f, -0.0950994483f},
+        { 0.1700868092f, -0.7084625470f},
+        { 1.1026270390f,  0.0000000000f},
+        { 0.2441223776f,  1.0168428830f},
+        {-0.5370727733f,  0.2736522463f},
+        {-0.0682102416f, -0.0798639317f},
+        {-0.0853333414f,  0.1174512684f},
+        {-0.1099954610f, -0.0455616117f},
+        { 0.0004461872f, -0.0028171151f},
+        {-0.0412072268f,  0.0032430791f},
+        {-0.0029329017f, -0.0090265432f},
+        {-0.0151492398f,  0.0092834661f},
+        {-0.0038546332f, -0.0038546332f},
+        {-0.0071826321f,  0.0117209904f},
+        {-0.0091157710f, -0.0029618935f},
+        {-0.0004116942f,  0.0052310710f},
+    },
+    {
+        {-0.0004160550f, -0.0052864800f},   /* Filter 24 */
+        { 0.0021099840f, -0.0006855754f},
+        {-0.0066215668f, -0.0108054150f},
+        { 0.0076074508f, -0.0076074508f},
+        {-0.0093227389f, -0.0057129817f},
+        { 0.0045988736f, -0.0141538774f},
+        {-0.0198892683f, -0.0015653194f},
+        {-0.0062475717f, -0.0394456154f},
+        {-0.0262515052f,  0.0108737295f},
+        {-0.0836936985f, -0.1151944935f},
+        { 0.0737282143f, -0.0863246478f},
+        {-0.1887938961f, -0.0961952948f},
+        { 0.1707092572f, -0.7110552296f},
+        { 1.1035966873f,  0.0000000000f},
+        { 0.2437734037f,  1.0153893023f},
+        {-0.5345900745f,  0.2723872481f},
+        {-0.0668351468f, -0.0782539026f},
+        {-0.0856193737f,  0.1178449581f},
+        {-0.1094767732f, -0.0453467642f},
+        { 0.0003686970f, -0.0023278609f},
+        {-0.0411823294f,  0.0032411196f},
+        {-0.0028646414f, -0.0088164598f},
+        {-0.0151771565f,  0.0093005735f},
+        {-0.0037675782f, -0.0037675782f},
+        {-0.0072072466f,  0.0117611575f},
+        {-0.0090450118f, -0.0029389025f},
+        {-0.0004160550f,  0.0052864800f},
+    },
+    {
+        {-0.0004202794f, -0.0053401557f},   /* Filter 25 */
+        { 0.0020401896f, -0.0006628978f},
+        {-0.0066498022f, -0.0108514909f},
+        { 0.0075499131f, -0.0075499131f},
+        {-0.0094133072f, -0.0057684821f},
+        { 0.0045698486f, -0.0140645479f},
+        {-0.0201077181f, -0.0015825117f},
+        {-0.0062326157f, -0.0393511866f},
+        {-0.0267987713f,  0.0111004145f},
+        {-0.0839337477f, -0.1155248929f},
+        { 0.0731491835f, -0.0856466898f},
+        {-0.1909656600f, -0.0973018638f},
+        { 0.1713278509f, -0.7136318579f},
+        { 1.1045160294f,  0.0000000000f},
+        { 0.2434139662f,  1.0138921374f},
+        {-0.5321026492f,  0.2711198415f},
+        {-0.0654794652f, -0.0766666033f},
+        {-0.0858865311f,  0.1182126686f},
+        {-0.1089495431f, -0.0451283783f},
+        { 0.0002927095f, -0.0018480947f},
+        {-0.0411484223f,  0.0032384511f},
+        {-0.0027967317f, -0.0086074552f},
+        {-0.0152007789f,  0.0093150493f},
+        {-0.0036800735f, -0.0036800735f},
+        {-0.0072302707f,  0.0117987295f},
+        {-0.0089730738f, -0.0029155284f},
+        {-0.0004202794f,  0.0053401557f},
+    },
+    {
+        {-0.0004245037f, -0.0053938313f},   /* Filter 26 */
+        { 0.0019703953f, -0.0006402202f},
+        {-0.0066780380f, -0.0108975675f},
+        { 0.0074923761f, -0.0074923761f},
+        {-0.0095038756f, -0.0058239824f},
+        { 0.0045408240f, -0.0139752192f},
+        {-0.0203261679f, -0.0015997041f},
+        {-0.0062176590f, -0.0392567541f},
+        {-0.0273460374f,  0.0113270996f},
+        {-0.0841737969f, -0.1158552923f},
+        { 0.0725701576f, -0.0849687375f},
+        {-0.1931374107f, -0.0984084260f},
+        { 0.1719464586f, -0.7162085442f},
+        { 1.1054353714f,  0.0000000000f},
+        { 0.2430545287f,  1.0123949724f},
+        {-0.5296151707f,  0.2698524080f},
+        {-0.0641237884f, -0.0750793098f},
+        {-0.0861536884f,  0.1185803792f},
+        {-0.1084223130f, -0.0449099925f},
+        { 0.0002167219f, -0.0013683284f},
+        {-0.0411145153f,  0.0032357825f},
+        {-0.0027288220f, -0.0083984506f},
+        {-0.0152244029f,  0.0093295261f},
+        {-0.0035925684f, -0.0035925684f},
+        {-0.0072532954f,  0.0118363023f},
+        {-0.0089011357f, -0.0028921543f},
+        {-0.0004245037f,  0.0053938313f},
+    },
+    {
+        {-0.0004287281f, -0.0054475065f},   /* Filter 27 */
+        { 0.0019006009f, -0.0006175427f},
+        {-0.0067062733f, -0.0109436434f},
+        { 0.0074348391f, -0.0074348391f},
+        {-0.0095944447f, -0.0058794833f},
+        { 0.0045117990f, -0.0138858896f},
+        {-0.0205446177f, -0.0016168965f},
+        {-0.0062027030f, -0.0391623253f},
+        {-0.0278933018f,  0.0115537839f},
+        {-0.0844138462f, -0.1161856917f},
+        { 0.0719911267f, -0.0842907795f},
+        {-0.1953091746f, -0.0995149950f},
+        { 0.1725650523f, -0.7187851725f},
+        { 1.1063547134f,  0.0000000000f},
+        { 0.2426950912f,  1.0108978075f},
+        {-0.5271277453f,  0.2685850014f},
+        {-0.0627681067f, -0.0734920105f},
+        {-0.0864208458f,  0.1189480897f},
+        {-0.1078950829f, -0.0446916066f},
+        { 0.0001407344f, -0.0008885622f},
+        {-0.0410806082f,  0.0032331140f},
+        {-0.0026609126f, -0.0081894468f},
+        {-0.0152480253f,  0.0093440019f},
+        {-0.0035050636f, -0.0035050636f},
+        {-0.0072763196f,  0.0118738744f},
+        {-0.0088291976f, -0.0028687802f},
+        {-0.0004287281f,  0.0054475065f},
+    },
+    {
+        {-0.0004329524f, -0.0055011821f},   /* Filter 28 */
+        { 0.0018308065f, -0.0005948651f},
+        {-0.0067345086f, -0.0109897193f},
+        { 0.0073773020f, -0.0073773020f},
+        {-0.0096850131f, -0.0059349836f},
+        { 0.0044827744f, -0.0137965609f},
+        {-0.0207630675f, -0.0016340889f},
+        {-0.0061877469f, -0.0390678966f},
+        {-0.0284405679f,  0.0117804689f},
+        {-0.0846538954f, -0.1165160911f},
+        { 0.0714121008f, -0.0836128272f},
+        {-0.1974809385f, -0.1006215640f},
+        { 0.1731836599f, -0.7213618587f},
+        { 1.1072740555f,  0.0000000000f},
+        { 0.2423356537f,  1.0094006425f},
+        {-0.5246402669f,  0.2673175678f},
+        {-0.0614124299f, -0.0719047169f},
+        {-0.0866880031f,  0.1193158002f},
+        {-0.1073678527f, -0.0444732207f},
+        { 0.0000647469f, -0.0004087959f},
+        {-0.0410467012f,  0.0032304455f},
+        {-0.0025930029f, -0.0079804422f},
+        {-0.0152716477f,  0.0093584777f},
+        {-0.0034175589f, -0.0034175589f},
+        {-0.0072993442f,  0.0119114472f},
+        {-0.0087572596f, -0.0028454061f},
+        {-0.0004329524f,  0.0055011821f},
+    },
+    {
+        {-0.0004370379f, -0.0055530933f},   /* Filter 29 */
+        { 0.0017598908f, -0.0005718232f},
+        {-0.0067616335f, -0.0110339831f},
+        { 0.0073179389f, -0.0073179389f},
+        {-0.0097737264f, -0.0059893473f},
+        { 0.0044521959f, -0.0137024501f},
+        {-0.0209800151f, -0.0016511630f},
+        {-0.0061710869f, -0.0389627091f},
+        {-0.0289936333f,  0.0120095561f},
+        {-0.0848843801f, -0.1168333262f},
+        { 0.0708103568f, -0.0829082755f},
+        {-0.1996732022f, -0.1017385781f},
+        { 0.1737981906f, -0.7239215633f},
+        { 1.1081427336f,  0.0000000000f},
+        { 0.2419659195f,  1.0078605888f},
+        {-0.5221488584f,  0.2660481318f},
+        {-0.0600764372f, -0.0703404704f},
+        {-0.0869364694f,  0.1196577848f},
+        {-0.1068325690f, -0.0442514990f},
+        {-0.0000097081f,  0.0000612947f},
+        {-0.0410039590f,  0.0032270816f},
+        {-0.0025255004f, -0.0077726909f},
+        {-0.0152910026f,  0.0093703385f},
+        {-0.0033296870f, -0.0033296870f},
+        {-0.0073207704f,  0.0119464115f},
+        {-0.0086842126f, -0.0028216717f},
+        {-0.0004370379f,  0.0055530933f},
+    },
+    {
+        {-0.0004411234f, -0.0056050049f},   /* Filter 30 */
+        { 0.0016889751f, -0.0005487813f},
+        {-0.0067887584f, -0.0110782468f},
+        { 0.0072585757f, -0.0072585757f},
+        {-0.0098624390f, -0.0060437104f},
+        { 0.0044216175f, -0.0136083393f},
+        {-0.0211969608f, -0.0016682370f},
+        {-0.0061544274f, -0.0388575254f},
+        {-0.0295467004f,  0.0122386440f},
+        {-0.0851148649f, -0.1171505612f},
+        { 0.0702086080f, -0.0822037181f},
+        {-0.2018654526f, -0.1028555855f},
+        { 0.1744127213f, -0.7264812680f},
+        { 1.1090114117f,  0.0000000000f},
+        { 0.2415961853f,  1.0063205351f},
+        {-0.5196575030f,  0.2647787229f},
+        {-0.0587404494f, -0.0687762296f},
+        {-0.0871849357f,  0.1199997693f},
+        {-0.1062972852f, -0.0440297772f},
+        {-0.0000841632f,  0.0005313853f},
+        {-0.0409612168f,  0.0032237177f},
+        {-0.0024579979f, -0.0075649396f},
+        {-0.0153103576f,  0.0093821992f},
+        {-0.0032418154f, -0.0032418154f},
+        {-0.0073421965f,  0.0119813757f},
+        {-0.0086111655f, -0.0027979373f},
+        {-0.0004411234f,  0.0056050049f},
+    },
+    {
+        {-0.0004452089f, -0.0056569160f},   /* Filter 31 */
+        { 0.0016180593f, -0.0005257393f},
+        {-0.0068158833f, -0.0111225106f},
+        { 0.0071992125f, -0.0071992125f},
+        {-0.0099511524f, -0.0060980740f},
+        { 0.0043910390f, -0.0135142285f},
+        {-0.0214139065f, -0.0016853110f},
+        {-0.0061377673f, -0.0387523380f},
+        {-0.0300997675f,  0.0124677319f},
+        {-0.0853453496f, -0.1174677962f},
+        { 0.0696068640f, -0.0814991665f},
+        {-0.2040577163f, -0.1039725996f},
+        { 0.1750272660f, -0.7290410306f},
+        { 1.1098802090f,  0.0000000000f},
+        { 0.2412264233f,  1.0047803655f},
+        {-0.5171660945f,  0.2635092868f},
+        {-0.0574044615f, -0.0672119888f},
+        {-0.0874334108f,  0.1203417659f},
+        {-0.1057620015f, -0.0438080554f},
+        {-0.0001586182f,  0.0010014759f},
+        {-0.0409184746f,  0.0032203538f},
+        {-0.0023904954f, -0.0073571883f},
+        {-0.0153297110f,  0.0093940590f},
+        {-0.0031539435f, -0.0031539435f},
+        {-0.0073636226f,  0.0120163400f},
+        {-0.0085381176f, -0.0027742026f},
+        {-0.0004452089f,  0.0056569160f},
+    },
+    {
+        {-0.0004492944f, -0.0057088271f},   /* Filter 32 */
+        { 0.0015471436f, -0.0005026974f},
+        {-0.0068430081f, -0.0111667744f},
+        { 0.0071398493f, -0.0071398493f},
+        {-0.0100398657f, -0.0061524376f},
+        { 0.0043604609f, -0.0134201186f},
+        {-0.0216308523f, -0.0017023850f},
+        {-0.0061211079f, -0.0386471542f},
+        {-0.0306528311f,  0.0126968184f},
+        {-0.0855758343f, -0.1177850312f},
+        { 0.0690051152f, -0.0807946091f},
+        {-0.2062499666f, -0.1050896070f},
+        { 0.1756417967f, -0.7316007352f},
+        { 1.1107488871f,  0.0000000000f},
+        { 0.2408566892f,  1.0032403118f},
+        {-0.5146746861f,  0.2622398508f},
+        {-0.0560684736f, -0.0656477480f},
+        {-0.0876818771f,  0.1206837505f},
+        {-0.1052267178f, -0.0435863336f},
+        {-0.0002330732f,  0.0014715665f},
+        {-0.0408757361f,  0.0032169902f},
+        {-0.0023229930f, -0.0071494375f},
+        {-0.0153490660f,  0.0094059197f},
+        {-0.0030660719f, -0.0030660719f},
+        {-0.0073850488f,  0.0120513043f},
+        {-0.0084650706f, -0.0027504682f},
+        {-0.0004492944f,  0.0057088271f},
+    },
+    {
+        {-0.0004532388f, -0.0057589445f},   /* Filter 33 */
+        { 0.0014751579f, -0.0004793079f},
+        {-0.0068689909f, -0.0112091745f},
+        { 0.0070786989f, -0.0070786989f},
+        {-0.0101266241f, -0.0062056032f},
+        { 0.0043283390f, -0.0133212575f},
+        {-0.0218460766f, -0.0017193235f},
+        {-0.0061027287f, -0.0385311125f},
+        {-0.0312114016f,  0.0129281858f},
+        {-0.0857964393f, -0.1180886679f},
+        { 0.0683805709f, -0.0800633618f},
+        {-0.2084621591f, -0.1062167754f},
+        { 0.1762520557f, -0.7341426468f},
+        { 1.1115665436f,  0.0000000000f},
+        { 0.2404767696f,  1.0016578330f},
+        {-0.5121801973f,  0.2609688453f},
+        {-0.0547524360f, -0.0641068659f},
+        {-0.0879118451f,  0.1210002742f},
+        {-0.1046838691f, -0.0433614783f},
+        {-0.0003059675f,  0.0019318029f},
+        {-0.0408243407f,  0.0032129453f},
+        {-0.0022559532f, -0.0069431100f},
+        {-0.0153641806f,  0.0094151820f},
+        {-0.0029779159f, -0.0029779159f},
+        {-0.0074048695f,  0.0120836489f},
+        {-0.0083909855f, -0.0027263965f},
+        {-0.0004532388f,  0.0057589445f},
+    },
+    {
+        {-0.0004571831f, -0.0058090623f},   /* Filter 34 */
+        { 0.0014031721f, -0.0004559183f},
+        {-0.0068949737f, -0.0112515745f},
+        { 0.0070175484f, -0.0070175484f},
+        {-0.0102133832f, -0.0062587693f},
+        { 0.0042962171f, -0.0132223965f},
+        {-0.0220612991f, -0.0017362619f},
+        {-0.0060843501f, -0.0384150744f},
+        {-0.0317699720f,  0.0131595533f},
+        {-0.0860170442f, -0.1183923046f},
+        { 0.0677560267f, -0.0793321144f},
+        {-0.2106743383f, -0.1073439370f},
+        { 0.1768623146f, -0.7366845584f},
+        { 1.1123842001f,  0.0000000000f},
+        { 0.2400968501f,  1.0000753543f},
+        {-0.5096857086f,  0.2596978398f},
+        {-0.0534364032f, -0.0625659895f},
+        {-0.0881418043f,  0.1213167859f},
+        {-0.1041410205f, -0.0431366231f},
+        {-0.0003788618f,  0.0023920396f},
+        {-0.0407729454f,  0.0032089004f},
+        {-0.0021889135f, -0.0067367830f},
+        {-0.0153792951f,  0.0094244442f},
+        {-0.0028897598f, -0.0028897598f},
+        {-0.0074246903f,  0.0121159935f},
+        {-0.0083168996f, -0.0027023245f},
+        {-0.0004571831f,  0.0058090623f},
+    },
+    {
+        {-0.0004611274f, -0.0058591796f},   /* Filter 35 */
+        { 0.0013311864f, -0.0004325287f},
+        {-0.0069209560f, -0.0112939738f},
+        { 0.0069563979f, -0.0069563979f},
+        {-0.0103001415f, -0.0063119349f},
+        { 0.0042640952f, -0.0131235355f},
+        {-0.0222765216f, -0.0017532003f},
+        {-0.0060659709f, -0.0382990327f},
+        {-0.0323285424f,  0.0133909207f},
+        {-0.0862376404f, -0.1186959292f},
+        { 0.0671314824f, -0.0786008671f},
+        {-0.2128865308f, -0.1084711053f},
+        { 0.1774725736f, -0.7392264700f},
+        { 1.1132018566f,  0.0000000000f},
+        { 0.2397169305f,  0.9984928755f},
+        {-0.5071912198f,  0.2584268343f},
+        {-0.0521203656f, -0.0610251074f},
+        {-0.0883717723f,  0.1216333097f},
+        {-0.1035981787f, -0.0429117706f},
+        {-0.0004517562f,  0.0028522762f},
+        {-0.0407215500f,  0.0032048555f},
+        {-0.0021218736f, -0.0065304555f},
+        {-0.0153944097f,  0.0094337064f},
+        {-0.0028016041f, -0.0028016041f},
+        {-0.0074445116f,  0.0121483388f},
+        {-0.0082428136f, -0.0026782525f},
+        {-0.0004611274f,  0.0058591796f},
+    },
+    {
+        {-0.0004650718f, -0.0059092970f},   /* Filter 36 */
+        { 0.0012592008f, -0.0004091391f},
+        {-0.0069469388f, -0.0113363739f},
+        { 0.0068952475f, -0.0068952475f},
+        {-0.0103869007f, -0.0063651009f},
+        { 0.0042319733f, -0.0130246745f},
+        {-0.0224917460f, -0.0017701388f},
+        {-0.0060475916f, -0.0381829910f},
+        {-0.0328871128f,  0.0136222881f},
+        {-0.0864582453f, -0.1189995658f},
+        { 0.0665069382f, -0.0778696197f},
+        {-0.2150987101f, -0.1095982669f},
+        { 0.1780828326f, -0.7417683816f},
+        { 1.1140196323f,  0.0000000000f},
+        { 0.2393370388f,  0.9969105126f},
+        {-0.5046967311f,  0.2571558288f},
+        {-0.0508043328f, -0.0594842310f},
+        {-0.0886017403f,  0.1219498335f},
+        {-0.1030553301f, -0.0426869154f},
+        {-0.0005246505f,  0.0033125128f},
+        {-0.0406701546f,  0.0032008106f},
+        {-0.0020548339f, -0.0063241285f},
+        {-0.0154095243f,  0.0094429686f},
+        {-0.0027134480f, -0.0027134480f},
+        {-0.0074643324f,  0.0121806834f},
+        {-0.0081687285f, -0.0026541808f},
+        {-0.0004650718f,  0.0059092970f},
+    },
+    {
+        {-0.0004688728f, -0.0059575936f},   /* Filter 37 */
+        { 0.0011861981f, -0.0003854191f},
+        {-0.0069717484f, -0.0113768594f},
+        { 0.0068323499f, -0.0068323499f},
+        {-0.0104716071f, -0.0064170091f},
+        { 0.0041983192f, -0.0129210977f},
+        {-0.0227050262f, -0.0017869243f},
+        {-0.0060274787f, -0.0380560029f},
+        {-0.0334508837f,  0.0138558097f},
+        {-0.0866686552f, -0.1192891701f},
+        { 0.0658595211f, -0.0771115917f},
+        {-0.2173302472f, -0.1107352919f},
+        { 0.1786885972f, -0.7442915729f},
+        { 1.1147860289f,  0.0000000000f},
+        { 0.2389470731f,  0.9952861883f},
+        {-0.5021999056f,  0.2558836327f},
+        {-0.0495085018f, -0.0579670079f},
+        {-0.0888133938f,  0.1222411496f},
+        {-0.1025054052f, -0.0424591290f},
+        {-0.0005959573f,  0.0037627266f},
+        {-0.0406102918f,  0.0031960993f},
+        {-0.0019883112f, -0.0061193927f},
+        {-0.0154204302f,  0.0094496518f},
+        {-0.0026250900f, -0.0026250900f},
+        {-0.0074825430f,  0.0122104004f},
+        {-0.0080936744f, -0.0026297942f},
+        {-0.0004688728f,  0.0059575936f},
+    },
+    {
+        {-0.0004726738f, -0.0060058898f},   /* Filter 38 */
+        { 0.0011131952f, -0.0003616991f},
+        {-0.0069965580f, -0.0114173449f},
+        { 0.0067694530f, -0.0067694529f},
+        {-0.0105563135f, -0.0064689173f},
+        { 0.0041646653f, -0.0128175219f},
+        {-0.0229183064f, -0.0018037098f},
+        {-0.0060073658f, -0.0379290149f},
+        {-0.0340146545f,  0.0140893312f},
+        {-0.0868790563f, -0.1195787623f},
+        { 0.0652121089f, -0.0763535694f},
+        {-0.2195617843f, -0.1118723169f},
+        { 0.1792943758f, -0.7468148221f},
+        { 1.1155524254f,  0.0000000000f},
+        { 0.2385571351f,  0.9936619800f},
+        {-0.4997031332f,  0.2546114636f},
+        {-0.0482126757f, -0.0564497904f},
+        {-0.0890250562f,  0.1225324778f},
+        {-0.1019554735f, -0.0422313399f},
+        {-0.0006672642f,  0.0042129402f},
+        {-0.0405504327f,  0.0031913883f},
+        {-0.0019217884f, -0.0059146564f},
+        {-0.0154313378f,  0.0094563359f},
+        {-0.0025367317f, -0.0025367317f},
+        {-0.0075007536f,  0.0122401174f},
+        {-0.0080186212f, -0.0026054079f},
+        {-0.0004726738f,  0.0060058898f},
+    },
+    {
+        {-0.0004764748f, -0.0060541865f},   /* Filter 39 */
+        { 0.0010401923f, -0.0003379790f},
+        {-0.0070213680f, -0.0114578312f},
+        { 0.0067065554f, -0.0067065554f},
+        {-0.0106410200f, -0.0065208254f},
+        { 0.0041310112f, -0.0127139452f},
+        {-0.0231315866f, -0.0018204954f},
+        {-0.0059872534f, -0.0378020306f},
+        {-0.0345784254f,  0.0143228528f},
+        {-0.0870894661f, -0.1198683666f},
+        { 0.0645646918f, -0.0755955413f},
+        {-0.2217933347f, -0.1130093486f},
+        { 0.1799001404f, -0.7493380133f},
+        { 1.1163188219f,  0.0000000000f},
+        { 0.2381671972f,  0.9920377716f},
+        {-0.4972063608f,  0.2533392945f},
+        {-0.0469168496f, -0.0549325730f},
+        {-0.0892367185f,  0.1228238060f},
+        {-0.1014055487f, -0.0420035536f},
+        {-0.0007385710f,  0.0046631539f},
+        {-0.0404905698f,  0.0031866770f},
+        {-0.0018552657f, -0.0057099206f},
+        {-0.0154422437f,  0.0094630191f},
+        {-0.0024483737f, -0.0024483736f},
+        {-0.0075189641f,  0.0122698343f},
+        {-0.0079435671f, -0.0025810214f},
+        {-0.0004764748f,  0.0060541865f},
+    },
+    {
+        {-0.0004802758f, -0.0061024827f},   /* Filter 40 */
+        { 0.0009671894f, -0.0003142589f},
+        {-0.0070461776f, -0.0114983168f},
+        { 0.0066436584f, -0.0066436584f},
+        {-0.0107257264f, -0.0065727336f},
+        { 0.0040973574f, -0.0126103694f},
+        {-0.0233448668f, -0.0018372809f},
+        {-0.0059671405f, -0.0376750426f},
+        {-0.0351421962f,  0.0145563743f},
+        {-0.0872998672f, -0.1201579589f},
+        { 0.0639172747f, -0.0748375133f},
+        {-0.2240248718f, -0.1141463735f},
+        { 0.1805059050f, -0.7518612045f},
+        { 1.1170852184f,  0.0000000000f},
+        { 0.2377772314f,  0.9904134473f},
+        {-0.4947095884f,  0.2520671255f},
+        {-0.0456210186f, -0.0534153499f},
+        {-0.0894483808f,  0.1231151342f},
+        {-0.1008556239f, -0.0417757672f},
+        {-0.0008098778f,  0.0051133675f},
+        {-0.0404307070f,  0.0031819657f},
+        {-0.0017887430f, -0.0055051848f},
+        {-0.0154531496f,  0.0094697023f},
+        {-0.0023600156f, -0.0023600156f},
+        {-0.0075371742f,  0.0122995505f},
+        {-0.0078685138f, -0.0025566351f},
+        {-0.0004802758f,  0.0061024827f},
+    },
+    {
+        {-0.0004839315f, -0.0061489327f},   /* Filter 41 */
+        { 0.0008932235f, -0.0002902259f},
+        {-0.0070697837f, -0.0115368385f},
+        { 0.0065790572f, -0.0065790572f},
+        {-0.0108082824f, -0.0066233240f},
+        { 0.0040621843f, -0.0125021177f},
+        {-0.0235559837f, -0.0018538961f},
+        {-0.0059452799f, -0.0375370199f},
+        {-0.0357108543f,  0.0147919202f},
+        {-0.0874997666f, -0.1204330968f},
+        { 0.0632469267f, -0.0740526367f},
+        {-0.2262751694f, -0.1152929574f},
+        { 0.1811069666f, -0.7543648061f},
+        { 1.1177999973f,  0.0000000000f},
+        { 0.2373774143f,  0.9887480889f},
+        {-0.4922112759f,  0.2507941716f},
+        {-0.0443456460f, -0.0519220803f},
+        {-0.0896419302f,  0.1233815321f},
+        {-0.1002991048f, -0.0415452495f},
+        {-0.0008795720f,  0.0055533987f},
+        {-0.0403625660f,  0.0031766029f},
+        {-0.0017227906f, -0.0053022041f},
+        {-0.0154598835f,  0.0094738288f},
+        {-0.0022715368f, -0.0022715368f},
+        {-0.0075537707f,  0.0123266335f},
+        {-0.0077925634f, -0.0025319573f},
+        {-0.0004839315f,  0.0061489327f},
+    },
+    {
+        {-0.0004875871f, -0.0061953822f},   /* Filter 42 */
+        { 0.0008192576f, -0.0002661929f},
+        {-0.0070933904f, -0.0115753611f},
+        { 0.0065144553f, -0.0065144553f},
+        {-0.0108908393f, -0.0066739149f},
+        { 0.0040270112f, -0.0123938661f},
+        {-0.0237670987f, -0.0018705112f},
+        {-0.0059234193f, -0.0373989973f},
+        {-0.0362795124f,  0.0150274661f},
+        {-0.0876996573f, -0.1207082227f},
+        { 0.0625765836f, -0.0732677657f},
+        {-0.2285254935f, -0.1164395548f},
+        { 0.1817080420f, -0.7568684655f},
+        { 1.1185147762f,  0.0000000000f},
+        { 0.2369775693f,  0.9870826146f},
+        {-0.4897130165f,  0.2495212449f},
+        {-0.0430702685f, -0.0504288052f},
+        {-0.0898354883f,  0.1236479420f},
+        {-0.0997425856f, -0.0413147317f},
+        {-0.0009492661f,  0.0059934300f},
+        {-0.0402944251f,  0.0031712400f},
+        {-0.0016568381f, -0.0050992234f},
+        {-0.0154666173f,  0.0094779553f},
+        {-0.0021830581f, -0.0021830581f},
+        {-0.0075703667f,  0.0123537157f},
+        {-0.0077166129f, -0.0025072795f},
+        {-0.0004875871f,  0.0061953822f},
+    },
+    {
+        {-0.0004912428f, -0.0062418321f},   /* Filter 43 */
+        { 0.0007452916f, -0.0002421599f},
+        {-0.0071169970f, -0.0116138836f},
+        { 0.0064498541f, -0.0064498541f},
+        {-0.0109733961f, -0.0067245058f},
+        { 0.0039918381f, -0.0122856144f},
+        {-0.0239782156f, -0.0018871265f},
+        {-0.0059015592f, -0.0372609784f},
+        {-0.0368481705f,  0.0152630120f},
+        {-0.0878995479f, -0.1209833486f},
+        { 0.0619062356f, -0.0724828890f},
+        {-0.2307757911f, -0.1175861387f},
+        { 0.1823091036f, -0.7593720670f},
+        { 1.1192296743f,  0.0000000000f},
+        { 0.2365777521f,  0.9854172562f},
+        {-0.4872147571f,  0.2482483181f},
+        {-0.0417948910f, -0.0489355300f},
+        {-0.0900290465f,  0.1239143519f},
+        {-0.0991860664f, -0.0410842139f},
+        {-0.0010189602f,  0.0064334613f},
+        {-0.0402262842f,  0.0031658772f},
+        {-0.0015908856f, -0.0048962423f},
+        {-0.0154733511f,  0.0094820818f},
+        {-0.0020945793f, -0.0020945793f},
+        {-0.0075869627f,  0.0123807979f},
+        {-0.0076406624f, -0.0024826017f},
+        {-0.0004912428f,  0.0062418321f},
+    },
+    {
+        {-0.0004948985f, -0.0062882816f},   /* Filter 44 */
+        { 0.0006713257f, -0.0002181269f},
+        {-0.0071406037f, -0.0116524062f},
+        { 0.0063852528f, -0.0063852528f},
+        {-0.0110559522f, -0.0067750962f},
+        { 0.0039566650f, -0.0121773628f},
+        {-0.0241893307f, -0.0019037416f},
+        {-0.0058796986f, -0.0371229558f},
+        {-0.0374168286f,  0.0154985579f},
+        {-0.0880994473f, -0.1212584865f},
+        { 0.0612358876f, -0.0716980124f},
+        {-0.2330260887f, -0.1187327226f},
+        { 0.1829101651f, -0.7618756686f},
+        { 1.1199444532f,  0.0000000000f},
+        { 0.2361779071f,  0.9837517819f},
+        {-0.4847164976f,  0.2469753914f},
+        {-0.0405195159f, -0.0474422576f},
+        {-0.0902225958f,  0.1241807498f},
+        {-0.0986295404f, -0.0408536933f},
+        {-0.0010886543f,  0.0068734926f},
+        {-0.0401581470f,  0.0031605147f},
+        {-0.0015249331f, -0.0046932616f},
+        {-0.0154800849f,  0.0094862083f},
+        {-0.0020061004f, -0.0020061004f},
+        {-0.0076035587f,  0.0124078801f},
+        {-0.0075647111f, -0.0024579236f},
+        {-0.0004948985f,  0.0062882816f},
+    },
+    {
+        {-0.0004984069f, -0.0063328608f},   /* Filter 45 */
+        { 0.0005964521f, -0.0001937990f},
+        {-0.0071629778f, -0.0116889173f},
+        { 0.0063189914f, -0.0063189914f},
+        {-0.0111362633f, -0.0068243110f},
+        { 0.0039199873f, -0.0120644805f},
+        {-0.0243980596f, -0.0019201689f},
+        {-0.0058560780f, -0.0369738213f},
+        {-0.0379900539f,  0.0157359955f},
+        {-0.0882885123f, -0.1215187121f},
+        { 0.0605425555f, -0.0708862248f},
+        {-0.2352945758f, -0.1198885745f},
+        { 0.1835063149f, -0.7643588110f},
+        { 1.1206073761f,  0.0000000000f},
+        { 0.2357683498f,  0.9820458531f},
+        {-0.4822176009f,  0.2457021399f},
+        {-0.0392648217f, -0.0459731995f},
+        {-0.0903982600f,  0.1244225307f},
+        {-0.0980669088f, -0.0406206436f},
+        {-0.0011567119f,  0.0073031915f},
+        {-0.0400819211f,  0.0031545156f},
+        {-0.0014596031f, -0.0044921963f},
+        {-0.0154826848f,  0.0094878014f},
+        {-0.0019175820f, -0.0019175820f},
+        {-0.0076185377f,  0.0124323236f},
+        {-0.0074879351f, -0.0024329776f},
+        {-0.0004984069f,  0.0063328608f},
+    },
+    {
+        {-0.0005019154f, -0.0063774399f},   /* Filter 46 */
+        { 0.0005215783f, -0.0001694711f},
+        {-0.0071853518f, -0.0117254285f},
+        { 0.0062527300f, -0.0062527300f},
+        {-0.0112165737f, -0.0068735252f},
+        { 0.0038833097f, -0.0119515982f},
+        {-0.0246067885f, -0.0019365963f},
+        {-0.0058324580f, -0.0368246905f},
+        {-0.0385632792f,  0.0159734332f},
+        {-0.0884775859f, -0.1217789497f},
+        { 0.0598492233f, -0.0700744371f},
+        {-0.2375630363f, -0.1210444129f},
+        { 0.1841024646f, -0.7668419534f},
+        { 1.1212704182f,  0.0000000000f},
+        { 0.2353587647f,  0.9803398084f},
+        {-0.4797186511f,  0.2444288614f},
+        {-0.0380101300f, -0.0445041442f},
+        {-0.0905739154f,  0.1246642996f},
+        {-0.0975042702f, -0.0403875911f},
+        {-0.0012247695f,  0.0077328901f},
+        {-0.0400056952f,  0.0031485165f},
+        {-0.0013942730f, -0.0042911310f},
+        {-0.0154852846f,  0.0094893946f},
+        {-0.0018290634f, -0.0018290634f},
+        {-0.0076335167f,  0.0124567670f},
+        {-0.0074111591f, -0.0024080316f},
+        {-0.0005019154f,  0.0063774399f},
+    },
+    {
+        {-0.0005054239f, -0.0064220191f},   /* Filter 47 */
+        { 0.0004467046f, -0.0001451431f},
+        {-0.0072077259f, -0.0117619396f},
+        { 0.0061864692f, -0.0061864692f},
+        {-0.0112968841f, -0.0069227395f},
+        { 0.0038466317f, -0.0118387150f},
+        {-0.0248155174f, -0.0019530236f},
+        {-0.0058088374f, -0.0366755560f},
+        {-0.0391365079f,  0.0162108723f},
+        {-0.0886666509f, -0.1220391752f},
+        { 0.0591558912f, -0.0692626495f},
+        {-0.2398315234f, -0.1222002648f},
+        { 0.1846986144f, -0.7693250958f},
+        { 1.1219333410f,  0.0000000000f},
+        { 0.2349492074f,  0.9786338796f},
+        {-0.4772197544f,  0.2431556099f},
+        {-0.0367554358f, -0.0430350860f},
+        {-0.0907495707f,  0.1249060685f},
+        {-0.0969416386f, -0.0401545414f},
+        {-0.0012928271f,  0.0081625890f},
+        {-0.0399294694f,  0.0031425174f},
+        {-0.0013289429f, -0.0040900657f},
+        {-0.0154878828f,  0.0094909868f},
+        {-0.0017405448f, -0.0017405448f},
+        {-0.0076484961f,  0.0124812113f},
+        {-0.0073343827f, -0.0023830854f},
+        {-0.0005054239f,  0.0064220191f},
+    },
+    {
+        {-0.0005089323f, -0.0064665982f},   /* Filter 48 */
+        { 0.0003718309f, -0.0001208152f},
+        {-0.0072301004f, -0.0117984516f},
+        { 0.0061202078f, -0.0061202077f},
+        {-0.0113771945f, -0.0069719537f},
+        { 0.0038099540f, -0.0117258327f},
+        {-0.0250242464f, -0.0019694509f},
+        {-0.0057852168f, -0.0365264215f},
+        {-0.0397097331f,  0.0164483100f},
+        {-0.0888557158f, -0.1222994008f},
+        { 0.0584625591f, -0.0684508619f},
+        {-0.2420999840f, -0.1233561032f},
+        { 0.1852947641f, -0.7718082383f},
+        { 1.1225962639f,  0.0000000000f},
+        { 0.2345396223f,  0.9769278348f},
+        {-0.4747208046f,  0.2418823314f},
+        {-0.0355007440f, -0.0415660307f},
+        {-0.0909252349f,  0.1251478494f},
+        {-0.0963790001f, -0.0399214889f},
+        {-0.0013608847f,  0.0085922880f},
+        {-0.0398532435f,  0.0031365183f},
+        {-0.0012636128f, -0.0038890005f},
+        {-0.0154904827f,  0.0094925800f},
+        {-0.0016520262f, -0.0016520262f},
+        {-0.0076634751f,  0.0125056548f},
+        {-0.0072576067f, -0.0023581394f},
+        {-0.0005089323f,  0.0064665982f},
+    },
+    {
+        {-0.0005122918f, -0.0065092847f},   /* Filter 49 */
+        { 0.0002961061f, -0.0000962107f},
+        {-0.0072512136f, -0.0118329052f},
+        { 0.0060523329f, -0.0060523329f},
+        {-0.0114551639f, -0.0070197335f},
+        { 0.0037717876f, -0.0116083685f},
+        {-0.0252303626f, -0.0019856726f},
+        {-0.0057598252f, -0.0363661052f},
+        {-0.0402871986f,  0.0166875040f},
+        {-0.0890336484f, -0.1225443041f},
+        { 0.0577462041f, -0.0676121180f},
+        {-0.2443860233f, -0.1245208984f},
+        { 0.1858857934f, -0.7742700522f},
+        { 1.1232070923f,  0.0000000000f},
+        { 0.2341204641f,  0.9751819152f},
+        {-0.4722220141f,  0.2406091340f},
+        {-0.0342669557f, -0.0401214502f},
+        {-0.0910832065f,  0.1253652787f},
+        {-0.0958107240f, -0.0396861013f},
+        {-0.0014272835f,  0.0090115135f},
+        {-0.0397691295f,  0.0031298984f},
+        {-0.0011989560f, -0.0036900071f},
+        {-0.0154889898f,  0.0094916651f},
+        {-0.0015635480f, -0.0015635480f},
+        {-0.0076768361f,  0.0125274579f},
+        {-0.0071800761f, -0.0023329481f},
+        {-0.0005122918f,  0.0065092847f},
+    },
+    {
+        {-0.0005156513f, -0.0065519712f},   /* Filter 50 */
+        { 0.0002203812f, -0.0000716062f},
+        {-0.0072723269f, -0.0118673589f},
+        { 0.0059844580f, -0.0059844580f},
+        {-0.0115331333f, -0.0070675132f},
+        { 0.0037336208f, -0.0114909033f},
+        {-0.0254364807f, -0.0020018945f},
+        {-0.0057344330f, -0.0362057853f},
+        {-0.0408646640f,  0.0169266981f},
+        {-0.0892115811f, -0.1227892073f},
+        { 0.0570298443f, -0.0667733684f},
+        {-0.2466720627f, -0.1256856936f},
+        { 0.1864768087f, -0.7767318083f},
+        { 1.1238179207f,  0.0000000000f},
+        { 0.2337013059f,  0.9734359955f},
+        {-0.4697232236f,  0.2393359367f},
+        {-0.0330331698f, -0.0386768725f},
+        {-0.0912411868f,  0.1255827200f},
+        {-0.0952424548f, -0.0394507165f},
+        {-0.0014936823f,  0.0094307390f},
+        {-0.0396850155f,  0.0031232785f},
+        {-0.0011342992f, -0.0034910138f},
+        {-0.0154874953f,  0.0094907493f},
+        {-0.0014750697f, -0.0014750697f},
+        {-0.0076901970f,  0.0125492610f},
+        {-0.0071025455f, -0.0023077569f},
+        {-0.0005156513f,  0.0065519712f},
+    },
+    {
+        {-0.0005190108f, -0.0065946577f},   /* Filter 51 */
+        { 0.0001446564f, -0.0000470017f},
+        {-0.0072934406f, -0.0119018134f},
+        { 0.0059165832f, -0.0059165832f},
+        {-0.0116111028f, -0.0071152929f},
+        { 0.0036954541f, -0.0113734382f},
+        {-0.0256425970f, -0.0020181162f},
+        {-0.0057090414f, -0.0360454690f},
+        {-0.0414421295f,  0.0171658921f},
+        {-0.0893895137f, -0.1230341106f},
+        { 0.0563134893f, -0.0659346245f},
+        {-0.2489580755f, -0.1268504753f},
+        { 0.1870678379f, -0.7791936222f},
+        { 1.1244288683f,  0.0000000000f},
+        { 0.2332821616f,  0.9716901338f},
+        {-0.4672244862f,  0.2380627664f},
+        {-0.0317993815f, -0.0372322920f},
+        {-0.0913991672f,  0.1258001613f},
+        {-0.0946741787f, -0.0392153288f},
+        {-0.0015600811f,  0.0098499645f},
+        {-0.0396009015f,  0.0031166585f},
+        {-0.0010696423f, -0.0032920205f},
+        {-0.0154860024f,  0.0094898345f},
+        {-0.0013865916f, -0.0013865916f},
+        {-0.0077035580f,  0.0125710642f},
+        {-0.0070250148f, -0.0022825657f},
+        {-0.0005190108f,  0.0065946577f},
+    },
+    {
+        {-0.0005223703f, -0.0066373442f},   /* Filter 52 */
+        { 0.0000689315f, -0.0000223972f},
+        {-0.0073145539f, -0.0119362671f},
+        { 0.0058487083f, -0.0058487083f},
+        {-0.0116890714f, -0.0071630722f},
+        { 0.0036572877f, -0.0112559740f},
+        {-0.0258487132f, -0.0020343379f},
+        {-0.0056836492f, -0.0358851491f},
+        {-0.0420195949f,  0.0174050861f},
+        {-0.0895674464f, -0.1232790139f},
+        { 0.0555971295f, -0.0650958750f},
+        {-0.2512441148f, -0.1280152706f},
+        { 0.1876588672f, -0.7816554362f},
+        { 1.1250396967f,  0.0000000000f},
+        { 0.2328630033f,  0.9699442141f},
+        {-0.4647256957f,  0.2367895690f},
+        {-0.0305655932f, -0.0357877115f},
+        {-0.0915571388f,  0.1260175906f},
+        {-0.0941059027f, -0.0389799412f},
+        {-0.0016264799f,  0.0102691900f},
+        {-0.0395167875f,  0.0031100386f},
+        {-0.0010049855f, -0.0030930272f},
+        {-0.0154845096f,  0.0094889197f},
+        {-0.0012981134f, -0.0012981134f},
+        {-0.0077169190f,  0.0125928673f},
+        {-0.0069474842f, -0.0022573745f},
+        {-0.0005223703f,  0.0066373442f},
+    },
+    {
+        {-0.0005255793f, -0.0066781181f},   /* Filter 53 */
+        {-0.0000075868f,  0.0000024651f},
+        {-0.0073343790f, -0.0119686188f},
+        { 0.0057792674f, -0.0057792674f},
+        {-0.0117646054f, -0.0072093594f},
+        { 0.0036176494f, -0.0111339801f},
+        {-0.0260519940f, -0.0020503364f},
+        {-0.0056564756f, -0.0357135811f},
+        {-0.0426009668f,  0.0176458982f},
+        {-0.0897339314f, -0.1235081609f},
+        { 0.0548577178f, -0.0642301351f},
+        {-0.2535470691f, -0.1291886844f},
+        { 0.1882445533f, -0.7840949944f},
+        { 1.1255981922f,  0.0000000000f},
+        { 0.2324344250f,  0.9681590570f},
+        {-0.4622278611f,  0.2355168587f},
+        {-0.0293529237f, -0.0343678579f},
+        {-0.0916976544f,  0.1262109936f},
+        {-0.0935324640f, -0.0387424151f},
+        {-0.0016911990f,  0.0106778105f},
+        {-0.0394249859f,  0.0031028137f},
+        {-0.0009410515f, -0.0028962589f},
+        {-0.0154789669f,  0.0094855231f},
+        {-0.0012097549f, -0.0012097549f},
+        {-0.0077286625f,  0.0126120309f},
+        {-0.0068692707f, -0.0022319613f},
+        {-0.0005255793f,  0.0066781181f},
+    },
+    {
+        {-0.0005287883f, -0.0067188919f},   /* Filter 54 */
+        {-0.0000841051f,  0.0000273274f},
+        {-0.0073542042f, -0.0120009705f},
+        { 0.0057098272f, -0.0057098272f},
+        {-0.0118401393f, -0.0072556467f},
+        { 0.0035780115f, -0.0110119870f},
+        {-0.0262552748f, -0.0020663349f},
+        {-0.0056293024f, -0.0355420169f},
+        {-0.0431823351f,  0.0178867089f},
+        {-0.0899004077f, -0.1237372958f},
+        { 0.0541183013f, -0.0633643896f},
+        {-0.2558500499f, -0.1303621117f},
+        { 0.1888302394f, -0.7865345526f},
+        { 1.1261566877f,  0.0000000000f},
+        { 0.2320058328f,  0.9663738420f},
+        {-0.4597300266f,  0.2342441485f},
+        {-0.0281402517f, -0.0329480015f},
+        {-0.0918381699f,  0.1264043967f},
+        {-0.0929590254f, -0.0385048890f},
+        {-0.0017559182f,  0.0110864309f},
+        {-0.0393331843f,  0.0030955888f},
+        {-0.0008771176f, -0.0026994905f},
+        {-0.0154734257f,  0.0094821275f},
+        {-0.0011213965f, -0.0011213965f},
+        {-0.0077404060f,  0.0126311945f},
+        {-0.0067910571f, -0.0022065482f},
+        {-0.0005287883f,  0.0067188919f},
+    },
+    {
+        {-0.0005319972f, -0.0067596658f},   /* Filter 55 */
+        {-0.0001606233f,  0.0000521897f},
+        {-0.0073740294f, -0.0120333223f},
+        { 0.0056403870f, -0.0056403870f},
+        {-0.0119156725f, -0.0073019335f},
+        { 0.0035383736f, -0.0108899940f},
+        {-0.0264585556f, -0.0020823335f},
+        {-0.0056021287f, -0.0353704489f},
+        {-0.0437637035f,  0.0181275195f},
+        {-0.0900668927f, -0.1239664428f},
+        { 0.0533788848f, -0.0624986441f},
+        {-0.2581530042f, -0.1315355255f},
+        { 0.1894159394f, -0.7889741687f},
+        { 1.1267151833f,  0.0000000000f},
+        { 0.2315772545f,  0.9645886849f},
+        {-0.4572321920f,  0.2329714382f},
+        {-0.0269275822f, -0.0315281480f},
+        {-0.0919786855f,  0.1265977998f},
+        {-0.0923855798f, -0.0382673601f},
+        {-0.0018206374f,  0.0114950523f},
+        {-0.0392413790f,  0.0030883635f},
+        {-0.0008131837f, -0.0025027222f},
+        {-0.0154678846f,  0.0094787319f},
+        {-0.0010330379f, -0.0010330379f},
+        {-0.0077521489f,  0.0126503573f},
+        {-0.0067128436f, -0.0021811351f},
+        {-0.0005319972f,  0.0067596658f},
+    },
+    {
+        {-0.0005352062f, -0.0068004397f},   /* Filter 56 */
+        {-0.0002371416f,  0.0000770520f},
+        {-0.0073938545f, -0.0120656740f},
+        { 0.0055709461f, -0.0055709461f},
+        {-0.0119912065f, -0.0073482208f},
+        { 0.0034987353f, -0.0107680001f},
+        {-0.0266618363f, -0.0020983320f},
+        {-0.0055749551f, -0.0351988810f},
+        {-0.0443450753f,  0.0183683316f},
+        {-0.0902333778f, -0.1241955898f},
+        { 0.0526394683f, -0.0616328986f},
+        {-0.2604559850f, -0.1327089529f},
+        { 0.1900016255f, -0.7914137269f},
+        { 1.1272736788f,  0.0000000000f},
+        { 0.2311486623f,  0.9628034699f},
+        {-0.4547343575f,  0.2316987279f},
+        {-0.0257149127f, -0.0301082944f},
+        {-0.0921192010f,  0.1267912028f},
+        {-0.0918121412f, -0.0380298341f},
+        {-0.0018853566f,  0.0119036728f},
+        {-0.0391495774f,  0.0030811386f},
+        {-0.0007492498f, -0.0023059538f},
+        {-0.0154623435f,  0.0094753363f},
+        {-0.0009446795f, -0.0009446795f},
+        {-0.0077638924f,  0.0126695209f},
+        {-0.0066346301f, -0.0021557220f},
+        {-0.0005352062f,  0.0068004397f},
+    },
+    {
+        {-0.0005382632f, -0.0068392824f},   /* Filter 57 */
+        {-0.0003143943f,  0.0001021529f},
+        {-0.0074123644f, -0.0120958793f},
+        { 0.0054999899f, -0.0054999899f},
+        {-0.0120642113f, -0.0073929582f},
+        { 0.0034576446f, -0.0106415359f},
+        {-0.0268620551f, -0.0021140896f},
+        {-0.0055459905f, -0.0350160062f},
+        {-0.0449300058f,  0.0186106178f},
+        {-0.0903881087f, -0.1244085586f},
+        { 0.0518769757f, -0.0607401345f},
+        {-0.2627752435f, -0.1338906741f},
+        { 0.1905817737f, -0.7938302179f},
+        { 1.1277797222f,  0.0000000000f},
+        { 0.2307108031f,  0.9609796550f},
+        {-0.4522382755f,  0.2304269106f},
+        {-0.0245235579f, -0.0287133972f},
+        {-0.0922424882f,  0.1269608931f},
+        {-0.0912340081f, -0.0377903635f},
+        {-0.0019483768f,  0.0123015668f},
+        {-0.0390502888f,  0.0030733244f},
+        {-0.0006860873f, -0.0021115595f},
+        {-0.0154528018f,  0.0094694891f},
+        {-0.0008565195f, -0.0008565195f},
+        {-0.0077740198f,  0.0126860474f},
+        {-0.0065558054f, -0.0021301103f},
+        {-0.0005382632f,  0.0068392824f},
+    },
+    {
+        {-0.0005413202f, -0.0068781251f},   /* Filter 58 */
+        {-0.0003916471f,  0.0001272538f},
+        {-0.0074308747f, -0.0121260855f},
+        { 0.0054290337f, -0.0054290337f},
+        {-0.0121372169f, -0.0074376961f},
+        { 0.0034165539f, -0.0105150716f},
+        {-0.0270622738f, -0.0021298471f},
+        {-0.0055170266f, -0.0348331350f},
+        {-0.0455149364f,  0.0188529039f},
+        {-0.0905428395f, -0.1246215274f},
+        { 0.0511144782f, -0.0598473647f},
+        {-0.2650945286f, -0.1350724088f},
+        { 0.1911619218f, -0.7962467089f},
+        { 1.1282856464f,  0.0000000000f},
+        { 0.2302729439f,  0.9591558401f},
+        {-0.4497421935f,  0.2291550933f},
+        {-0.0233322056f, -0.0273185028f},
+        {-0.0923657667f,  0.1271305714f},
+        {-0.0906558680f, -0.0375508900f},
+        {-0.0020113970f,  0.0126994609f},
+        {-0.0389510002f,  0.0030655102f},
+        {-0.0006229248f, -0.0019171654f},
+        {-0.0154432601f,  0.0094636420f},
+        {-0.0007683593f, -0.0007683593f},
+        {-0.0077841473f,  0.0127025739f},
+        {-0.0064769802f, -0.0021044984f},
+        {-0.0005413202f,  0.0068781251f},
+    },
+    {
+        {-0.0005443772f, -0.0069169683f},   /* Filter 59 */
+        {-0.0004688998f,  0.0001523548f},
+        {-0.0074493851f, -0.0121562916f},
+        { 0.0053580775f, -0.0053580775f},
+        {-0.0122102217f, -0.0074824335f},
+        { 0.0033754634f, -0.0103886083f},
+        {-0.0272624925f, -0.0021456047f},
+        {-0.0054880621f, -0.0346502602f},
+        {-0.0460998635f,  0.0190951887f},
+        {-0.0906975704f, -0.1248344962f},
+        { 0.0503519808f, -0.0589545949f},
+        {-0.2674137870f, -0.1362541301f},
+        { 0.1917420700f, -0.7986631999f},
+        { 1.1287915707f,  0.0000000000f},
+        { 0.2298350986f,  0.9573320831f},
+        {-0.4472461115f,  0.2278832760f},
+        {-0.0221408533f, -0.0259236084f},
+        {-0.0924890451f,  0.1273002496f},
+        {-0.0900777280f, -0.0373114166f},
+        {-0.0020744172f,  0.0130973549f},
+        {-0.0388517116f,  0.0030576960f},
+        {-0.0005597622f, -0.0017227710f},
+        {-0.0154337184f,  0.0094577948f},
+        {-0.0006801991f, -0.0006801991f},
+        {-0.0077942742f,  0.0127190995f},
+        {-0.0063981555f, -0.0020788868f},
+        {-0.0005443772f,  0.0069169683f},
+    },
+    {
+        {-0.0005474342f, -0.0069558110f},   /* Filter 60 */
+        {-0.0005461525f,  0.0001774557f},
+        {-0.0074678949f, -0.0121864969f},
+        { 0.0052871210f, -0.0052871210f},
+        {-0.0122832265f, -0.0075271709f},
+        { 0.0033343727f, -0.0102621440f},
+        {-0.0274627113f, -0.0021613623f},
+        {-0.0054590981f, -0.0344673891f},
+        {-0.0466847940f,  0.0193374748f},
+        {-0.0908522926f, -0.1250474530f},
+        { 0.0495894882f, -0.0580618308f},
+        {-0.2697330721f, -0.1374358648f},
+        { 0.1923222182f, -0.8010796909f},
+        { 1.1292974949f,  0.0000000000f},
+        { 0.2293972394f,  0.9555082682f},
+        {-0.4447500295f,  0.2266114587f},
+        {-0.0209494985f, -0.0245287112f},
+        {-0.0926123236f,  0.1274699279f},
+        {-0.0894995948f, -0.0370719460f},
+        {-0.0021374374f,  0.0134952489f},
+        {-0.0387524230f,  0.0030498818f},
+        {-0.0004965997f, -0.0015283766f},
+        {-0.0154241751f,  0.0094519467f},
+        {-0.0005920390f, -0.0005920390f},
+        {-0.0078044016f,  0.0127356260f},
+        {-0.0063193304f, -0.0020532749f},
+        {-0.0005474342f,  0.0069558110f},
+    },
+    {
+        {-0.0005503379f, -0.0069927062f},   /* Filter 61 */
+        {-0.0006240797f,  0.0002027758f},
+        {-0.0074850646f, -0.0122145153f},
+        { 0.0052147005f, -0.0052147005f},
+        {-0.0123536117f, -0.0075703030f},
+        { 0.0032918496f, -0.0101312715f},
+        {-0.0276596414f, -0.0021768610f},
+        {-0.0054283352f, -0.0342731595f},
+        {-0.0472729357f,  0.0195810911f},
+        {-0.0909949628f, -0.1252438216f},
+        { 0.0488039002f, -0.0571420254f},
+        {-0.2720679974f, -0.1386255687f},
+        { 0.1928966197f, -0.8034722454f},
+        { 1.1297507286f,  0.0000000000f},
+        { 0.2289502662f,  0.9536464910f},
+        {-0.4422564967f,  0.2253409403f},
+        {-0.0197796533f, -0.0231589985f},
+        {-0.0927186015f,  0.1276162068f},
+        {-0.0889172284f, -0.0368307219f},
+        {-0.0021987408f,  0.0138823033f},
+        {-0.0386458516f,  0.0030414945f},
+        {-0.0004342557f, -0.0013365016f},
+        {-0.0154106837f,  0.0094436791f},
+        {-0.0005041548f, -0.0005041548f},
+        {-0.0078129159f,  0.0127495200f},
+        {-0.0062399654f, -0.0020274877f},
+        {-0.0005503379f,  0.0069927062f},
+    },
+    {
+        {-0.0005532416f, -0.0070296015f},   /* Filter 62 */
+        {-0.0007020068f,  0.0002280958f},
+        {-0.0075022343f, -0.0122425338f},
+        { 0.0051422800f, -0.0051422800f},
+        {-0.0124239968f, -0.0076134350f},
+        { 0.0032493266f, -0.0100003989f},
+        {-0.0278565697f, -0.0021923596f},
+        {-0.0053975722f, -0.0340789300f},
+        {-0.0478610739f,  0.0198247059f},
+        {-0.0911376329f, -0.1254401903f},
+        { 0.0480183122f, -0.0562222200f},
+        {-0.2744029228f, -0.1398152726f},
+        { 0.1934710212f, -0.8058647998f},
+        { 1.1302039623f,  0.0000000000f},
+        { 0.2285032930f,  0.9517847137f},
+        {-0.4397629639f,  0.2240704219f},
+        {-0.0186098068f, -0.0217892842f},
+        {-0.0928248793f,  0.1277624857f},
+        {-0.0883348550f, -0.0365894950f},
+        {-0.0022600442f,  0.0142693578f},
+        {-0.0385392839f,  0.0030331074f},
+        {-0.0003719117f, -0.0011446265f},
+        {-0.0153971922f,  0.0094354115f},
+        {-0.0004162707f, -0.0004162707f},
+        {-0.0078214307f,  0.0127634149f},
+        {-0.0061606009f, -0.0020017006f},
+        {-0.0005532416f,  0.0070296015f},
+    },
+    {
+        {-0.0005561454f, -0.0070664968f},   /* Filter 63 */
+        {-0.0007799340f,  0.0002534159f},
+        {-0.0075194036f, -0.0122705514f},
+        { 0.0050698592f, -0.0050698592f},
+        {-0.0124943812f, -0.0076565666f},
+        { 0.0032068035f, -0.0098695263f},
+        {-0.0280534999f, -0.0022078583f},
+        {-0.0053668093f, -0.0338847005f},
+        {-0.0484492156f,  0.0200683222f},
+        {-0.0912802944f, -0.1256365469f},
+        { 0.0472327242f, -0.0553024146f},
+        {-0.2767378482f, -0.1410049765f},
+        { 0.1940454227f, -0.8082573542f},
+        { 1.1306571960f,  0.0000000000f},
+        { 0.2280563338f,  0.9499229944f},
+        {-0.4372694311f,  0.2227999035f},
+        {-0.0174399616f, -0.0204195715f},
+        {-0.0929311572f,  0.1279087646f},
+        {-0.0877524885f, -0.0363482709f},
+        {-0.0023213476f,  0.0146564122f},
+        {-0.0384327125f,  0.0030247201f},
+        {-0.0003095677f, -0.0009527514f},
+        {-0.0153837007f,  0.0094271439f},
+        {-0.0003283865f, -0.0003283865f},
+        {-0.0078299450f,  0.0127773090f},
+        {-0.0060812359f, -0.0019759133f},
+        {-0.0005561454f,  0.0070664968f},
+    },
+    {
+        {-0.0005590491f, -0.0071033921f},   /* Filter 64 */
+        {-0.0008578611f,  0.0002787360f},
+        {-0.0075365733f, -0.0122985698f},
+        { 0.0049974388f, -0.0049974388f},
+        {-0.0125647663f, -0.0076996987f},
+        { 0.0031642807f, -0.0097386546f},
+        {-0.0282504300f, -0.0022233571f},
+        {-0.0053360458f, -0.0336904673f},
+        {-0.0490373538f,  0.0203119370f},
+        {-0.0914229645f, -0.1258329156f},
+        { 0.0464471361f, -0.0543826092f},
+        {-0.2790727736f, -0.1421946804f},
+        { 0.1946198242f, -0.8106499087f},
+        { 1.1311104298f,  0.0000000000f},
+        { 0.2276093606f,  0.9480612172f},
+        {-0.4347758718f,  0.2215293715f},
+        {-0.0162701151f, -0.0190498573f},
+        {-0.0930374350f,  0.1280550435f},
+        {-0.0871701152f, -0.0361070439f},
+        {-0.0023826510f,  0.0150434667f},
+        {-0.0383261448f,  0.0030163330f},
+        {-0.0002472237f, -0.0007608763f},
+        {-0.0153702092f,  0.0094188763f},
+        {-0.0002405024f, -0.0002405024f},
+        {-0.0078384593f,  0.0127912031f},
+        {-0.0060018709f, -0.0019501261f},
+        {-0.0005590491f,  0.0071033921f},
+    },
+    {
+        {-0.0005617984f, -0.0071383251f},   /* Filter 65 */
+        {-0.0009364015f,  0.0003042553f},
+        {-0.0075523775f, -0.0123243601f},
+        { 0.0049236074f, -0.0049236074f},
+        {-0.0126324404f, -0.0077411695f},
+        { 0.0031203471f, -0.0096034410f},
+        {-0.0284438432f, -0.0022385790f},
+        {-0.0053034780f, -0.0334848426f},
+        {-0.0496283453f,  0.0205567337f},
+        {-0.0915532675f, -0.1260122621f},
+        { 0.0456384527f, -0.0534357625f},
+        {-0.2814227020f, -0.1433920287f},
+        { 0.1951882703f, -0.8130176572f},
+        { 1.1315107346f,  0.0000000000f},
+        { 0.2271534544f,  0.9461622311f},
+        {-0.4322856848f,  0.2202605579f},
+        {-0.0151219560f, -0.0177055357f},
+        {-0.0931269400f,  0.1281782366f},
+        {-0.0865839766f, -0.0358642574f},
+        {-0.0024422213f,  0.0154195785f},
+        {-0.0382125024f,  0.0030073892f},
+        {-0.0001857442f, -0.0005716617f},
+        {-0.0153528220f,  0.0094082214f},
+        {-0.0001529710f, -0.0001529710f},
+        {-0.0078453653f,  0.0128024727f},
+        {-0.0059220378f, -0.0019241867f},
+        {-0.0005617984f,  0.0071383251f},
+    },
+    {
+        {-0.0005645477f, -0.0071732585f},   /* Filter 66 */
+        {-0.0010149420f,  0.0003297747f},
+        {-0.0075681818f, -0.0123501503f},
+        { 0.0048497760f, -0.0048497760f},
+        {-0.0127001146f, -0.0077826402f},
+        { 0.0030764136f, -0.0094682274f},
+        {-0.0286372583f, -0.0022538011f},
+        {-0.0052709097f, -0.0332792142f},
+        {-0.0502193367f,  0.0208015303f},
+        {-0.0916835704f, -0.1261916087f},
+        { 0.0448297741f, -0.0524889215f},
+        {-0.2837726304f, -0.1445893771f},
+        { 0.1957567164f, -0.8153854057f},
+        { 1.1319110394f,  0.0000000000f},
+        { 0.2266975342f,  0.9442631870f},
+        {-0.4297954712f,  0.2189917307f},
+        {-0.0139737969f, -0.0163612141f},
+        {-0.0932164537f,  0.1283014417f},
+        {-0.0859978380f, -0.0356214708f},
+        {-0.0025017916f,  0.0157956903f},
+        {-0.0380988636f,  0.0029984456f},
+        {-0.0001242646f, -0.0003824470f},
+        {-0.0153354348f,  0.0093975665f},
+        {-0.0000654396f, -0.0000654396f},
+        {-0.0078522714f,  0.0128137423f},
+        {-0.0058422042f, -0.0018982472f},
+        {-0.0005645477f,  0.0071732585f},
+    },
+    {
+        {-0.0005672970f, -0.0072081915f},   /* Filter 67 */
+        {-0.0010934825f,  0.0003552940f},
+        {-0.0075839856f, -0.0123759397f},
+        { 0.0047759442f, -0.0047759442f},
+        {-0.0127677887f, -0.0078241110f},
+        { 0.0030324803f, -0.0093330147f},
+        {-0.0288306714f, -0.0022690231f},
+        {-0.0052383414f, -0.0330735858f},
+        {-0.0508103247f,  0.0210463256f},
+        {-0.0918138733f, -0.1263709553f},
+        { 0.0440210907f, -0.0515420749f},
+        {-0.2861225854f, -0.1457867389f},
+        { 0.1963251765f, -0.8177532122f},
+        { 1.1323113441f,  0.0000000000f},
+        { 0.2262416280f,  0.9423642008f},
+        {-0.4273052577f,  0.2177229035f},
+        {-0.0128256378f, -0.0150168925f},
+        {-0.0933059675f,  0.1284246468f},
+        {-0.0854116994f, -0.0353786843f},
+        {-0.0025613617f,  0.0161718012f},
+        {-0.0379852211f,  0.0029895017f},
+        {-0.0000627850f, -0.0001932324f},
+        {-0.0153180475f,  0.0093869116f},
+        { 0.0000220918f,  0.0000220918f},
+        {-0.0078591774f,  0.0128250119f},
+        {-0.0057623706f, -0.0018723077f},
+        {-0.0005672970f,  0.0072081915f},
+    },
+    {
+        {-0.0005700463f, -0.0072431250f},   /* Filter 68 */
+        {-0.0011720231f,  0.0003808134f},
+        {-0.0075997899f, -0.0124017299f},
+        { 0.0047021128f, -0.0047021128f},
+        {-0.0128354629f, -0.0078655818f},
+        { 0.0029885468f, -0.0091978012f},
+        {-0.0290240865f, -0.0022842452f},
+        {-0.0052057730f, -0.0328679574f},
+        {-0.0514013161f,  0.0212911222f},
+        {-0.0919441762f, -0.1265503019f},
+        { 0.0432124121f, -0.0505952339f},
+        {-0.2884725138f, -0.1469840873f},
+        { 0.1968936226f, -0.8201209607f},
+        { 1.1327116489f,  0.0000000000f},
+        { 0.2257857078f,  0.9404651568f},
+        {-0.4248150707f,  0.2164540899f},
+        {-0.0116774775f, -0.0136725695f},
+        {-0.0933954725f,  0.1285478398f},
+        {-0.0848255540f, -0.0351358949f},
+        {-0.0026209318f,  0.0165479121f},
+        {-0.0378715823f,  0.0029805582f},
+        {-0.0000013054f, -0.0000040177f},
+        {-0.0153006603f,  0.0093762567f},
+        { 0.0001096232f,  0.0001096232f},
+        {-0.0078660834f,  0.0128362816f},
+        {-0.0056825375f, -0.0018463684f},
+        {-0.0005700463f,  0.0072431250f},
+    },
+    {
+        {-0.0005726402f, -0.0072760831f},   /* Filter 69 */
+        {-0.0012511149f,  0.0004065119f},
+        {-0.0076142049f, -0.0124252531f},
+        { 0.0046269252f, -0.0046269252f},
+        {-0.0129003378f, -0.0079053372f},
+        { 0.0029432260f, -0.0090583183f},
+        {-0.0292137580f, -0.0022991726f},
+        {-0.0051713940f, -0.0326508970f},
+        {-0.0519947924f,  0.0215369482f},
+        {-0.0920618141f, -0.1267122165f},
+        { 0.0423806429f, -0.0496213573f},
+        {-0.2908367814f, -0.1481887418f},
+        { 0.1974559185f, -0.8224630919f},
+        { 1.1330589056f,  0.0000000000f},
+        { 0.2253210216f,  0.9385295993f},
+        {-0.4223289731f,  0.2151873599f},
+        {-0.0105511727f, -0.0123538360f},
+        {-0.0934684586f,  0.1286482965f},
+        {-0.0842360975f, -0.0348917340f},
+        {-0.0026787539f,  0.0169129866f},
+        {-0.0377510805f,  0.0029710745f},
+        { 0.0000592651f,  0.0001823992f},
+        {-0.0152794329f,  0.0093632485f},
+        { 0.0001967261f,  0.0001967261f},
+        {-0.0078713866f,  0.0128449355f},
+        {-0.0056023067f, -0.0018202998f},
+        {-0.0005726402f,  0.0072760831f},
+    },
+    {
+        {-0.0005752340f, -0.0073090413f},   /* Filter 70 */
+        {-0.0013302065f,  0.0004322103f},
+        {-0.0076286203f, -0.0124487770f},
+        { 0.0045517378f, -0.0045517378f},
+        {-0.0129652128f, -0.0079450927f},
+        { 0.0028979053f, -0.0089188354f},
+        {-0.0294034277f, -0.0023141000f},
+        {-0.0051370151f, -0.0324338367f},
+        {-0.0525882687f,  0.0217827741f},
+        {-0.0921794520f, -0.1268741312f},
+        { 0.0415488785f, -0.0486474864f},
+        {-0.2932010490f, -0.1493933963f},
+        { 0.1980182006f, -0.8248051651f},
+        { 1.1334060431f,  0.0000000000f},
+        { 0.2248563354f,  0.9365940418f},
+        {-0.4198429020f,  0.2139206434f},
+        {-0.0094248685f, -0.0110351032f},
+        {-0.0935414534f,  0.1287487654f},
+        {-0.0836466480f, -0.0346475760f},
+        {-0.0027365760f,  0.0172780610f},
+        {-0.0376305786f,  0.0029615908f},
+        { 0.0001198356f,  0.0003688162f},
+        {-0.0152582054f,  0.0093502403f},
+        { 0.0002838290f,  0.0002838290f},
+        {-0.0078766902f,  0.0128535902f},
+        {-0.0055220759f, -0.0017942312f},
+        {-0.0005752340f,  0.0073090413f},
+    },
+    {
+        {-0.0005778279f, -0.0073419995f},   /* Filter 71 */
+        {-0.0014092982f,  0.0004579088f},
+        {-0.0076430353f, -0.0124723001f},
+        { 0.0044765501f, -0.0044765501f},
+        {-0.0130300878f, -0.0079848481f},
+        { 0.0028525846f, -0.0087793526f},
+        {-0.0295930992f, -0.0023290274f},
+        {-0.0051026361f, -0.0322167763f},
+        {-0.0531817451f,  0.0220286001f},
+        {-0.0922970898f, -0.1270360458f},
+        { 0.0407171093f, -0.0476736098f},
+        {-0.2955653432f, -0.1505980644f},
+        { 0.1985804965f, -0.8271472963f},
+        { 1.1337532997f,  0.0000000000f},
+        { 0.2243916352f,  0.9346584264f},
+        {-0.4173568043f,  0.2126539134f},
+        {-0.0082985637f, -0.0097163697f},
+        {-0.0936144395f,  0.1288492221f},
+        {-0.0830571916f, -0.0344034152f},
+        {-0.0027943978f,  0.0176431337f},
+        {-0.0375100767f,  0.0029521071f},
+        { 0.0001804062f,  0.0005552331f},
+        {-0.0152369780f,  0.0093372321f},
+        { 0.0003709319f,  0.0003709319f},
+        {-0.0078819938f,  0.0128622449f},
+        {-0.0054418451f, -0.0017681627f},
+        {-0.0005778279f,  0.0073419995f},
+    },
+    {
+        {-0.0005804218f, -0.0073749577f},   /* Filter 72 */
+        {-0.0014883900f,  0.0004836072f},
+        {-0.0076574503f, -0.0124958232f},
+        { 0.0044013628f, -0.0044013628f},
+        {-0.0130949620f, -0.0080246031f},
+        { 0.0028072639f, -0.0086398697f},
+        {-0.0297827707f, -0.0023439549f},
+        {-0.0050682571f, -0.0319997159f},
+        {-0.0537752214f,  0.0222744260f},
+        {-0.0924147277f, -0.1271979605f},
+        { 0.0398853425f, -0.0466997360f},
+        {-0.2979296108f, -0.1518027189f},
+        { 0.1991427925f, -0.8294894275f},
+        { 1.1341005564f,  0.0000000000f},
+        { 0.2239269490f,  0.9327228689f},
+        {-0.4148707332f,  0.2113871969f},
+        {-0.0071722595f, -0.0083976369f},
+        {-0.0936874256f,  0.1289496789f},
+        {-0.0824677352f, -0.0341592544f},
+        {-0.0028522200f,  0.0180082081f},
+        {-0.0373895748f,  0.0029426234f},
+        { 0.0002409767f,  0.0007416500f},
+        {-0.0152157506f,  0.0093242239f},
+        { 0.0004580348f,  0.0004580348f},
+        {-0.0078872969f,  0.0128708988f},
+        {-0.0053616143f, -0.0017420941f},
+        {-0.0005804218f,  0.0073749577f},
+    },
+    {
+        {-0.0005828593f, -0.0074059299f},   /* Filter 73 */
+        {-0.0015679698f,  0.0005094643f},
+        {-0.0076704536f, -0.0125170427f},
+        { 0.0043248758f, -0.0043248758f},
+        {-0.0131569505f, -0.0080625897f},
+        { 0.0027605807f, -0.0084961938f},
+        {-0.0299684722f, -0.0023585699f},
+        {-0.0050320634f, -0.0317711978f},
+        {-0.0543708110f,  0.0225211273f},
+        {-0.0925193940f, -0.1273420212f},
+        { 0.0390305118f, -0.0456988578f},
+        {-0.3003075538f, -0.1530143413f},
+        { 0.1996987295f, -0.8318050720f},
+        { 1.1343946457f,  0.0000000000f},
+        { 0.2234536497f,  0.9307514356f},
+        {-0.4123895215f,  0.2101229563f},
+        {-0.0060679668f, -0.0071046763f},
+        {-0.0937441381f,  0.1290277369f},
+        {-0.0818754153f, -0.0339139074f},
+        {-0.0029082804f,  0.0183621597f},
+        {-0.0372624252f,  0.0029326165f},
+        { 0.0003005950f,  0.0009251361f},
+        {-0.0151907433f,  0.0093088995f},
+        { 0.0005446345f,  0.0005446345f},
+        {-0.0078910049f,  0.0128769497f},
+        {-0.0052810571f, -0.0017159195f},
+        {-0.0005828593f,  0.0074059299f},
+    },
+    {
+        {-0.0005852969f, -0.0074369026f},   /* Filter 74 */
+        {-0.0016475497f,  0.0005353213f},
+        {-0.0076834565f, -0.0125382614f},
+        { 0.0042483892f, -0.0042483892f},
+        {-0.0132189391f, -0.0081005763f},
+        { 0.0027138976f, -0.0083525178f},
+        {-0.0301541737f, -0.0023731849f},
+        {-0.0049958691f, -0.0315426760f},
+        {-0.0549663971f,  0.0227678271f},
+        {-0.0926240690f, -0.1274860940f},
+        { 0.0381756786f, -0.0446979767f},
+        {-0.3026854967f, -0.1542259638f},
+        { 0.2002546527f, -0.8341206585f},
+        { 1.1346886158f,  0.0000000000f},
+        { 0.2229803504f,  0.9287800022f},
+        {-0.4099083363f,  0.2088587294f},
+        {-0.0049636747f, -0.0058117164f},
+        {-0.0938008418f,  0.1291057828f},
+        {-0.0812830954f, -0.0336685605f},
+        {-0.0029643405f,  0.0187161094f},
+        {-0.0371352756f,  0.0029226096f},
+        { 0.0003602132f,  0.0011086223f},
+        {-0.0151657345f,  0.0092935740f},
+        { 0.0006312342f,  0.0006312342f},
+        {-0.0078947129f,  0.0128830006f},
+        {-0.0052004999f, -0.0016897448f},
+        {-0.0005852969f,  0.0074369026f},
+    },
+    {
+        {-0.0005877345f, -0.0074678748f},   /* Filter 75 */
+        {-0.0017271295f,  0.0005611784f},
+        {-0.0076964598f, -0.0125594809f},
+        { 0.0041719022f, -0.0041719022f},
+        {-0.0132809268f, -0.0081385624f},
+        { 0.0026672144f, -0.0082088419f},
+        {-0.0303398733f, -0.0023877998f},
+        {-0.0049596754f, -0.0313141580f},
+        {-0.0555619866f,  0.0230145284f},
+        {-0.0927287353f, -0.1276301548f},
+        { 0.0373208455f, -0.0436970957f},
+        {-0.3050634397f, -0.1554375863f},
+        { 0.2008105897f, -0.8364363030f},
+        { 1.1349827051f,  0.0000000000f},
+        { 0.2225070651f,  0.9268086269f},
+        {-0.4074271512f,  0.2075945024f},
+        {-0.0038593824f, -0.0045187562f},
+        {-0.0938575543f,  0.1291838409f},
+        {-0.0806907754f, -0.0334232135f},
+        {-0.0030204009f,  0.0190700610f},
+        {-0.0370081261f,  0.0029126027f},
+        { 0.0004198315f,  0.0012921084f},
+        {-0.0151407272f,  0.0092782496f},
+        { 0.0007178340f,  0.0007178340f},
+        {-0.0078984209f,  0.0128890516f},
+        {-0.0051199431f, -0.0016635704f},
+        {-0.0005877345f,  0.0074678748f},
+    },
+    {
+        {-0.0005901721f, -0.0074988475f},   /* Filter 76 */
+        {-0.0018067094f,  0.0005870355f},
+        {-0.0077094631f, -0.0125807004f},
+        { 0.0040954155f, -0.0040954155f},
+        {-0.0133429153f, -0.0081765490f},
+        { 0.0026205313f, -0.0080651659f},
+        {-0.0305255747f, -0.0024024148f},
+        {-0.0049234811f, -0.0310856362f},
+        {-0.0561575762f,  0.0232612297f},
+        {-0.0928334103f, -0.1277742276f},
+        { 0.0364660123f, -0.0426962147f},
+        {-0.3074413826f, -0.1566492087f},
+        { 0.2013665268f, -0.8387519475f},
+        { 1.1352766752f,  0.0000000000f},
+        { 0.2220337658f,  0.9248371935f},
+        {-0.4049459660f,  0.2063302754f},
+        {-0.0027550900f, -0.0032257959f},
+        {-0.0939142668f,  0.1292618989f},
+        {-0.0800984555f, -0.0331778666f},
+        {-0.0030764614f,  0.0194240126f},
+        {-0.0368809765f,  0.0029025958f},
+        { 0.0004794497f,  0.0014755945f},
+        {-0.0151157199f,  0.0092629251f},
+        { 0.0008044338f,  0.0008044338f},
+        {-0.0079021289f,  0.0128951025f},
+        {-0.0050393859f, -0.0016373957f},
+        {-0.0005901721f,  0.0074988475f},
+    },
+    {
+        {-0.0005924526f, -0.0075278244f},   /* Filter 77 */
+        {-0.0018867132f,  0.0006130303f},
+        {-0.0077210329f, -0.0125995805f},
+        { 0.0040176875f, -0.0040176875f},
+        {-0.0134019299f, -0.0082127132f},
+        { 0.0025725119f, -0.0079173775f},
+        {-0.0307070777f, -0.0024166994f},
+        {-0.0048854694f, -0.0308456401f},
+        {-0.0567548969f,  0.0235086480f},
+        {-0.0929248246f, -0.1279000486f},
+        { 0.0355881418f, -0.0416683603f},
+        {-0.3098323105f, -0.1578674473f},
+        { 0.2019159101f, -0.8410402939f},
+        { 1.1355174780f,  0.0000000000f},
+        { 0.2215520344f,  0.9228306378f},
+        {-0.4024704369f,  0.2050689303f},
+        {-0.0016729569f, -0.0019587808f},
+        {-0.0939549596f,  0.1293179078f},
+        {-0.0795037126f, -0.0329315160f},
+        {-0.0031307478f,  0.0197667639f},
+        {-0.0367473946f,  0.0028920827f},
+        { 0.0005380737f,  0.0016560207f},
+        {-0.0150869932f,  0.0092453213f},
+        { 0.0008904566f,  0.0008904566f},
+        {-0.0079042501f,  0.0128985639f},
+        {-0.0049585732f, -0.0016111381f},
+        {-0.0005924526f,  0.0075278244f},
+    },
+    {
+        {-0.0005947332f, -0.0075568019f},   /* Filter 78 */
+        {-0.0019667173f,  0.0006390252f},
+        {-0.0077326026f, -0.0126184606f},
+        { 0.0039399598f, -0.0039399598f},
+        {-0.0134609462f, -0.0082488784f},
+        { 0.0025244925f, -0.0077695890f},
+        {-0.0308885807f, -0.0024309840f},
+        {-0.0048474578f, -0.0306056440f},
+        {-0.0573522177f,  0.0237560664f},
+        {-0.0930162303f, -0.1280258577f},
+        { 0.0347102737f, -0.0406405089f},
+        {-0.3122232384f, -0.1590856859f},
+        { 0.2024652796f, -0.8433285823f},
+        { 1.1357581615f,  0.0000000000f},
+        { 0.2210703030f,  0.9208240820f},
+        {-0.3999949343f,  0.2038075987f},
+        {-0.0005908237f, -0.0006917657f},
+        {-0.0939956437f,  0.1293739046f},
+        {-0.0789089766f, -0.0326851683f},
+        {-0.0031850346f,  0.0201095172f},
+        {-0.0366138164f,  0.0028815699f},
+        { 0.0005966978f,  0.0018364470f},
+        {-0.0150582664f,  0.0092277175f},
+        { 0.0009764796f,  0.0009764796f},
+        {-0.0079063713f,  0.0129020253f},
+        {-0.0048777604f, -0.0015848804f},
+        {-0.0005947332f,  0.0075568019f},
+    },
+    {
+        {-0.0005970138f, -0.0075857793f},   /* Filter 79 */
+        {-0.0020467211f,  0.0006650200f},
+        {-0.0077441724f, -0.0126373407f},
+        { 0.0038622318f, -0.0038622318f},
+        {-0.0135199624f, -0.0082850436f},
+        { 0.0024764734f, -0.0076218015f},
+        {-0.0310700838f, -0.0024452686f},
+        {-0.0048094459f, -0.0303656461f},
+        {-0.0579495384f,  0.0240034847f},
+        {-0.0931076446f, -0.1281516788f},
+        { 0.0338324031f, -0.0396126545f},
+        {-0.3146141398f, -0.1603039110f},
+        { 0.2030146629f, -0.8456169287f},
+        { 1.1359989643f,  0.0000000000f},
+        { 0.2205885716f,  0.9188175263f},
+        {-0.3975194052f,  0.2025462536f},
+        { 0.0004913094f,  0.0005752494f},
+        {-0.0940363365f,  0.1294299135f},
+        {-0.0783142406f, -0.0324388206f},
+        {-0.0032393211f,  0.0204522686f},
+        {-0.0364802345f,  0.0028710567f},
+        { 0.0006553218f,  0.0020168732f},
+        {-0.0150295397f,  0.0092101138f},
+        { 0.0010625026f,  0.0010625026f},
+        {-0.0079084924f,  0.0129054867f},
+        {-0.0047969477f, -0.0015586228f},
+        {-0.0005970138f,  0.0075857793f},
+    },
+    {
+        {-0.0005992944f, -0.0076147568f},   /* Filter 80 */
+        {-0.0021267252f,  0.0006910149f},
+        {-0.0077557421f, -0.0126562208f},
+        { 0.0037845042f, -0.0037845041f},
+        {-0.0135789771f, -0.0083212079f},
+        { 0.0024284540f, -0.0074740130f},
+        {-0.0312515886f, -0.0024595534f},
+        {-0.0047714342f, -0.0301256501f},
+        {-0.0585468626f,  0.0242509045f},
+        {-0.0931990590f, -0.1282774999f},
+        { 0.0329545326f, -0.0385848002f},
+        {-0.3170050676f, -0.1615221496f},
+        { 0.2035640463f, -0.8479052751f},
+        { 1.1362396479f,  0.0000000000f},
+        { 0.2201068402f,  0.9168109706f},
+        {-0.3950438760f,  0.2012849085f},
+        { 0.0015734425f,  0.0018422645f},
+        {-0.0940770206f,  0.1294859103f},
+        {-0.0777195046f, -0.0321924729f},
+        {-0.0032936076f,  0.0207950200f},
+        {-0.0363466526f,  0.0028605436f},
+        { 0.0007139459f,  0.0021972994f},
+        {-0.0150008129f,  0.0091925100f},
+        { 0.0011485256f,  0.0011485256f},
+        {-0.0079106136f,  0.0129089481f},
+        {-0.0047161350f, -0.0015323651f},
+        {-0.0005992944f,  0.0076147568f},
+    },
+    {
+        {-0.0006014173f, -0.0076417320f},   /* Filter 81 */
+        {-0.0022070882f,  0.0007171264f},
+        {-0.0077658579f, -0.0126727282f},
+        { 0.0037055950f, -0.0037055950f},
+        {-0.0136349377f, -0.0083555006f},
+        { 0.0023791261f, -0.0073221971f},
+        {-0.0314286666f, -0.0024734897f},
+        {-0.0047316029f, -0.0298741650f},
+        {-0.0591455290f,  0.0244988803f},
+        {-0.0932769149f, -0.1283846594f},
+        { 0.0320536683f, -0.0375300236f},
+        {-0.3194082901f, -0.1627466526f},
+        { 0.2041066672f, -0.8501654540f},
+        { 1.1364269257f,  0.0000000000f},
+        { 0.2196168575f,  0.9147700459f},
+        {-0.3925747995f,  0.2000268512f},
+        { 0.0026332804f,  0.0030831752f},
+        {-0.0941019478f,  0.1295202197f},
+        {-0.0771227862f, -0.0319453040f},
+        {-0.0033461099f,  0.0211265068f},
+        {-0.0362068575f,  0.0028495415f},
+        { 0.0007715352f,  0.0023745411f},
+        {-0.0149684318f,  0.0091726668f},
+        { 0.0012338993f,  0.0012338993f},
+        {-0.0079111576f,  0.0129098359f},
+        {-0.0046351367f, -0.0015060472f},
+        {-0.0006014173f,  0.0076417320f},
+    },
+    {
+        {-0.0006035403f, -0.0076687068f},   /* Filter 82 */
+        {-0.0022874514f,  0.0007432380f},
+        {-0.0077759731f, -0.0126892349f},
+        { 0.0036266859f, -0.0036266859f},
+        {-0.0136908967f, -0.0083897923f},
+        { 0.0023297982f, -0.0071703817f},
+        {-0.0316057446f, -0.0024874261f},
+        {-0.0046917716f, -0.0296226799f},
+        {-0.0597441955f,  0.0247468560f},
+        {-0.0933547709f, -0.1284918188f},
+        { 0.0311528015f, -0.0364752441f},
+        {-0.3218115125f, -0.1639711556f},
+        { 0.2046492882f, -0.8524256329f},
+        { 1.1366143227f,  0.0000000000f},
+        { 0.2191268748f,  0.9127291212f},
+        {-0.3901057230f,  0.1987687939f},
+        { 0.0036931185f,  0.0043240861f},
+        {-0.0941268663f,  0.1295545170f},
+        {-0.0765260746f, -0.0316981380f},
+        {-0.0033986123f,  0.0214579936f},
+        {-0.0360670624f,  0.0028385394f},
+        { 0.0008291245f,  0.0025517827f},
+        {-0.0149360507f,  0.0091528236f},
+        { 0.0013192730f,  0.0013192730f},
+        {-0.0079117016f,  0.0129107237f},
+        {-0.0045541388f, -0.0014797294f},
+        {-0.0006035403f,  0.0076687068f},
+    },
+    {
+        {-0.0006056633f, -0.0076956820f},   /* Filter 83 */
+        {-0.0023678146f,  0.0007693496f},
+        {-0.0077860889f, -0.0127057422f},
+        { 0.0035477772f, -0.0035477772f},
+        {-0.0137468558f, -0.0084240841f},
+        { 0.0022804704f, -0.0070185662f},
+        {-0.0317828226f, -0.0025013624f},
+        {-0.0046519403f, -0.0293711948f},
+        {-0.0603428619f,  0.0249948318f},
+        {-0.0934326268f, -0.1285989783f},
+        { 0.0302519348f, -0.0354204647f},
+        {-0.3242147084f, -0.1651956450f},
+        { 0.2051919091f, -0.8546858118f},
+        { 1.1368016005f,  0.0000000000f},
+        { 0.2186368782f,  0.9106881385f},
+        {-0.3876366199f,  0.1975107231f},
+        { 0.0047529565f,  0.0055649970f},
+        {-0.0941517847f,  0.1295888143f},
+        {-0.0759293562f, -0.0314509691f},
+        {-0.0034511144f,  0.0217894786f},
+        {-0.0359272672f,  0.0028275373f},
+        { 0.0008867137f,  0.0027290242f},
+        {-0.0149036696f,  0.0091329805f},
+        { 0.0014046468f,  0.0014046468f},
+        {-0.0079122457f,  0.0129116115f},
+        {-0.0044731409f, -0.0014534116f},
+        {-0.0006056633f,  0.0076956820f},
+    },
+    {
+        {-0.0006077863f, -0.0077226572f},   /* Filter 84 */
+        {-0.0024481778f,  0.0007954612f},
+        {-0.0077962046f, -0.0127222496f},
+        { 0.0034688681f, -0.0034688680f},
+        {-0.0138028164f, -0.0084583768f},
+        { 0.0022311426f, -0.0068667507f},
+        {-0.0319599006f, -0.0025152987f},
+        {-0.0046121089f, -0.0291197098f},
+        {-0.0609415284f,  0.0252428076f},
+        {-0.0935104915f, -0.1287061499f},
+        { 0.0293510680f, -0.0343656852f},
+        {-0.3266179308f, -0.1664201480f},
+        { 0.2057345440f, -0.8569460487f},
+        { 1.1369889975f,  0.0000000000f},
+        { 0.2181468956f,  0.9086472139f},
+        {-0.3851675434f,  0.1962526657f},
+        { 0.0058127945f,  0.0068059079f},
+        {-0.0941767119f,  0.1296231237f},
+        {-0.0753326446f, -0.0312038031f},
+        {-0.0035036167f,  0.0221209654f},
+        {-0.0357874721f,  0.0028165352f},
+        { 0.0009443030f,  0.0029062657f},
+        {-0.0148712885f,  0.0091131373f},
+        { 0.0014900205f,  0.0014900205f},
+        {-0.0079127897f,  0.0129124992f},
+        {-0.0043921426f, -0.0014270936f},
+        {-0.0006077863f,  0.0077226572f},
+    },
+    {
+        {-0.0006097513f, -0.0077476247f},   /* Filter 85 */
+        {-0.0025288345f,  0.0008216681f},
+        {-0.0078048464f, -0.0127363518f},
+        { 0.0033888394f, -0.0033888394f},
+        {-0.0138556372f, -0.0084907454f},
+        { 0.0021805355f, -0.0067109982f},
+        {-0.0321323290f, -0.0025288691f},
+        {-0.0045704576f, -0.0288567339f},
+        {-0.0615411447f,  0.0254911768f},
+        {-0.0935744999f, -0.1287942500f},
+        { 0.0284272558f, -0.0332840401f},
+        {-0.3290327308f, -0.1676505501f},
+        { 0.2062702077f, -0.8591772487f},
+        { 1.1371228695f,  0.0000000000f},
+        { 0.2176488286f,  0.9065726157f},
+        {-0.3827056631f,  0.1949982750f},
+        { 0.0068502118f,  0.0080205675f},
+        {-0.0941861275f,  0.1296360831f},
+        {-0.0747343912f, -0.0309559984f},
+        {-0.0035543253f,  0.0224411270f},
+        {-0.0356416792f,  0.0028050610f},
+        { 0.0010008183f,  0.0030802021f},
+        {-0.0148353213f,  0.0090910966f},
+        { 0.0015746739f,  0.0015746739f},
+        {-0.0079117673f,  0.0129108309f},
+        {-0.0043110296f, -0.0014007384f},
+        {-0.0006097513f,  0.0077476247f},
+    },
+    {
+        {-0.0006117162f, -0.0077725917f},   /* Filter 86 */
+        {-0.0026094911f,  0.0008478751f},
+        {-0.0078134887f, -0.0127504547f},
+        { 0.0033088108f, -0.0033088108f},
+        {-0.0139084580f, -0.0085231140f},
+        { 0.0021299283f, -0.0065552451f},
+        {-0.0323047536f, -0.0025424393f},
+        {-0.0045288066f, -0.0285937598f},
+        {-0.0621407680f,  0.0257395489f},
+        {-0.0936385172f, -0.1288823621f},
+        { 0.0275034412f, -0.0322023922f},
+        {-0.3314475308f, -0.1688809521f},
+        { 0.2068058854f, -0.8614085067f},
+        { 1.1372566223f,  0.0000000000f},
+        { 0.2171507756f,  0.9044980755f},
+        {-0.3802437562f,  0.1937438708f},
+        { 0.0078876297f,  0.0092352279f},
+        {-0.0941955519f,  0.1296490546f},
+        {-0.0741361378f, -0.0307081937f},
+        {-0.0036050339f,  0.0227612885f},
+        {-0.0354958901f,  0.0027935871f},
+        { 0.0010573337f,  0.0032541385f},
+        {-0.0147993525f,  0.0090690549f},
+        { 0.0016593274f,  0.0016593274f},
+        {-0.0079107454f,  0.0129091633f},
+        {-0.0042299166f, -0.0013743832f},
+        {-0.0006117162f,  0.0077725917f},
+    },
+    {
+        {-0.0006136812f, -0.0077975591f},   /* Filter 87 */
+        {-0.0026901479f,  0.0008740821f},
+        {-0.0078221305f, -0.0127645568f},
+        { 0.0032287821f, -0.0032287821f},
+        {-0.0139612788f, -0.0085554827f},
+        { 0.0020793210f, -0.0063994921f},
+        {-0.0324771819f, -0.0025560097f},
+        {-0.0044871553f, -0.0283307839f},
+        {-0.0627403844f,  0.0259879181f},
+        {-0.0937025344f, -0.1289704742f},
+        { 0.0265796290f, -0.0311207471f},
+        {-0.3338623308f, -0.1701113542f},
+        { 0.2073415630f, -0.8636397647f},
+        { 1.1373904943f,  0.0000000000f},
+        { 0.2166527086f,  0.9024234774f},
+        {-0.3777818758f,  0.1924894801f},
+        { 0.0089250471f,  0.0104498875f},
+        {-0.0942049674f,  0.1296620140f},
+        {-0.0735378774f, -0.0304603862f},
+        {-0.0036557426f,  0.0230814501f},
+        {-0.0353500972f,  0.0027821130f},
+        { 0.0011138490f,  0.0034280747f},
+        {-0.0147633837f,  0.0090470132f},
+        { 0.0017439806f,  0.0017439806f},
+        {-0.0079097235f,  0.0129074957f},
+        {-0.0041488032f, -0.0013480279f},
+        {-0.0006136812f,  0.0077975591f},
+    },
+    {
+        {-0.0006156462f, -0.0078225271f},   /* Filter 88 */
+        {-0.0027708046f,  0.0009002890f},
+        {-0.0078307727f, -0.0127786597f},
+        { 0.0031487535f, -0.0031487535f},
+        {-0.0140140997f, -0.0085878513f},
+        { 0.0020287140f, -0.0062437396f},
+        {-0.0326496065f, -0.0025695798f},
+        {-0.0044455040f, -0.0280678079f},
+        {-0.0633400076f,  0.0262362902f},
+        {-0.0937665516f, -0.1290585864f},
+        { 0.0256558144f, -0.0300390992f},
+        {-0.3362771308f, -0.1713417562f},
+        { 0.2078772268f, -0.8658709647f},
+        { 1.1375243664f,  0.0000000000f},
+        { 0.2161546417f,  0.9003488792f},
+        {-0.3753199689f,  0.1912350759f},
+        { 0.0099624644f,  0.0116645471f},
+        {-0.0942143918f,  0.1296749855f},
+        {-0.0729396240f, -0.0302125815f},
+        {-0.0037064512f,  0.0234016117f},
+        {-0.0352043080f,  0.0027706391f},
+        { 0.0011703643f,  0.0036020110f},
+        {-0.0147274149f,  0.0090249715f},
+        { 0.0018286340f,  0.0018286340f},
+        {-0.0079087017f,  0.0129058281f},
+        {-0.0040676902f, -0.0013216727f},
+        {-0.0006156462f,  0.0078225271f},
+    },
+    {
+        {-0.0006174529f, -0.0078454830f},   /* Filter 89 */
+        {-0.0028516882f,  0.0009265697f},
+        {-0.0078379226f, -0.0127903272f},
+        { 0.0030676679f, -0.0030676679f},
+        {-0.0140637028f, -0.0086182482f},
+        { 0.0019768581f, -0.0060841437f},
+        {-0.0328171549f, -0.0025827661f},
+        {-0.0044020342f, -0.0277933504f},
+        {-0.0639401746f,  0.0264848875f},
+        {-0.0938164323f, -0.1291272413f},
+        { 0.0247091173f, -0.0289306593f},
+        {-0.3387028179f, -0.1725777056f},
+        { 0.2084057663f, -0.8680724904f},
+        { 1.1376047134f,  0.0000000000f},
+        { 0.2156486853f,  0.8982414190f},
+        {-0.3728660282f,  0.1899847307f},
+        { 0.0109773469f,  0.0128528219f},
+        {-0.0942085673f,  0.1296669688f},
+        {-0.0723402623f, -0.0299643177f},
+        {-0.0037553584f,  0.0237104001f},
+        {-0.0350527438f,  0.0027587108f},
+        { 0.0012257680f,  0.0037725260f},
+        {-0.0146879283f,  0.0090007741f},
+        { 0.0019124969f,  0.0019124969f},
+        {-0.0079061260f,  0.0129016251f},
+        {-0.0039865316f, -0.0012953026f},
+        {-0.0006174529f,  0.0078454830f},
+    },
+    {
+        {-0.0006192596f, -0.0078684390f},   /* Filter 90 */
+        {-0.0029325720f,  0.0009528504f},
+        {-0.0078450724f, -0.0128019946f},
+        { 0.0029865827f, -0.0029865826f},
+        {-0.0141133060f, -0.0086486451f},
+        { 0.0019250022f, -0.0059245475f},
+        {-0.0329847033f, -0.0025959525f},
+        {-0.0043585641f, -0.0275188910f},
+        {-0.0645403486f,  0.0267334877f},
+        {-0.0938663217f, -0.1291959082f},
+        { 0.0237624178f, -0.0278222165f},
+        {-0.3411284786f, -0.1738136414f},
+        { 0.2089342920f, -0.8702739581f},
+        { 1.1376850605f,  0.0000000000f},
+        { 0.2151427288f,  0.8961339588f},
+        {-0.3704120876f,  0.1887343854f},
+        { 0.0119922295f,  0.0140410967f},
+        {-0.0942027515f,  0.1296589641f},
+        {-0.0717408937f, -0.0297160511f},
+        {-0.0038042657f,  0.0240191886f},
+        {-0.0349011797f,  0.0027467824f},
+        { 0.0012811716f,  0.0039430408f},
+        {-0.0146484418f,  0.0089765767f},
+        { 0.0019963599f,  0.0019963599f},
+        {-0.0079035503f,  0.0128974220f},
+        {-0.0039053725f, -0.0012689324f},
+        {-0.0006192596f,  0.0078684390f},
+    },
+    {
+        {-0.0006210662f, -0.0078913950f},   /* Filter 91 */
+        {-0.0030134556f,  0.0009791311f},
+        {-0.0078522227f, -0.0128136629f},
+        { 0.0029054974f, -0.0029054974f},
+        {-0.0141629076f, -0.0086790410f},
+        { 0.0018731464f, -0.0057649517f},
+        {-0.0331522516f, -0.0026091388f},
+        {-0.0043150940f, -0.0272444315f},
+        {-0.0651405225f,  0.0269820879f},
+        {-0.0939162024f, -0.1292645631f},
+        { 0.0228157207f, -0.0267137766f},
+        {-0.3435541657f, -0.1750495907f},
+        { 0.2094628176f, -0.8724754258f},
+        { 1.1377654076f,  0.0000000000f},
+        { 0.2146367724f,  0.8940264986f},
+        {-0.3679581469f,  0.1874840402f},
+        { 0.0130071121f,  0.0152293715f},
+        {-0.0941969357f,  0.1296509593f},
+        {-0.0711415321f, -0.0294677874f},
+        {-0.0038531730f,  0.0243279770f},
+        {-0.0347496118f,  0.0027348538f},
+        { 0.0013365752f,  0.0041135556f},
+        {-0.0146089552f,  0.0089523793f},
+        { 0.0020802229f,  0.0020802229f},
+        {-0.0079009747f,  0.0128932189f},
+        {-0.0038242139f, -0.0012425624f},
+        {-0.0006210662f,  0.0078913950f},
+    },
+    {
+        {-0.0006228729f, -0.0079143509f},   /* Filter 92 */
+        {-0.0030943394f,  0.0010054118f},
+        {-0.0078593725f, -0.0128253304f},
+        { 0.0028244121f, -0.0028244121f},
+        {-0.0142125108f, -0.0087094378f},
+        { 0.0018212905f, -0.0056053559f},
+        {-0.0333198000f, -0.0026223251f},
+        {-0.0042716242f, -0.0269699740f},
+        {-0.0657406895f,  0.0272306852f},
+        {-0.0939660919f, -0.1293332301f},
+        { 0.0218690211f, -0.0256053339f},
+        {-0.3459798529f, -0.1762855401f},
+        { 0.2099913432f, -0.8746768935f},
+        { 1.1378457546f,  0.0000000000f},
+        { 0.2141308021f,  0.8919189804f},
+        {-0.3655041796f,  0.1862336815f},
+        { 0.0140219947f,  0.0164176464f},
+        {-0.0941911200f,  0.1296429546f},
+        {-0.0705421635f, -0.0292195208f},
+        {-0.0039020803f,  0.0246367655f},
+        {-0.0345980476f,  0.0027229254f},
+        { 0.0013919788f,  0.0042840704f},
+        {-0.0145694686f,  0.0089281819f},
+        { 0.0021640857f,  0.0021640857f},
+        {-0.0078983990f,  0.0128890158f},
+        {-0.0037430548f, -0.0012161922f},
+        {-0.0006228729f,  0.0079143509f},
+    },
+    {
+        {-0.0006245211f, -0.0079352931f},   /* Filter 93 */
+        {-0.0031753829f,  0.0010317444f},
+        {-0.0078650134f, -0.0128345354f},
+        { 0.0027423344f, -0.0027423344f},
+        {-0.0142588170f, -0.0087378143f},
+        { 0.0017682182f, -0.0054420161f},
+        {-0.0334822456f, -0.0026351099f},
+        {-0.0042263377f, -0.0266840458f},
+        {-0.0663410080f,  0.0274793452f},
+        {-0.0940015646f, -0.1293820540f},
+        { 0.0208995092f, -0.0244701813f},
+        {-0.3484156837f, -0.1775266579f},
+        { 0.2105125499f, -0.8768478754f},
+        { 1.1378724575f,  0.0000000000f},
+        { 0.2136171370f,  0.8897794116f},
+        {-0.3630589221f,  0.1849877605f},
+        { 0.0150142391f,  0.0175794153f},
+        {-0.0941703356f,  0.1296143474f},
+        {-0.0699421135f, -0.0289709720f},
+        {-0.0039491796f,  0.0249341385f},
+        {-0.0344409313f,  0.0027105601f},
+        { 0.0014462343f,  0.0044510515f},
+        {-0.0145265341f,  0.0089018716f},
+        { 0.0022470897f,  0.0022470897f},
+        {-0.0078942833f,  0.0128822995f},
+        {-0.0036619194f, -0.0011898297f},
+        {-0.0006245211f,  0.0079352931f},
+    },
+    {
+        {-0.0006261694f, -0.0079562362f},   /* Filter 94 */
+        {-0.0032564264f,  0.0010580771f},
+        {-0.0078706542f, -0.0128437404f},
+        { 0.0026602567f, -0.0026602567f},
+        {-0.0143051231f, -0.0087661907f},
+        { 0.0017151457f, -0.0052786758f},
+        {-0.0336446912f, -0.0026478946f},
+        {-0.0041810511f, -0.0263981176f},
+        {-0.0669413265f,  0.0277280053f},
+        {-0.0940370372f, -0.1294308779f},
+        { 0.0199299961f, -0.0233350273f},
+        {-0.3508515145f, -0.1787677757f},
+        { 0.2110337426f, -0.8790187993f},
+        { 1.1378992796f,  0.0000000000f},
+        { 0.2131034720f,  0.8876398428f},
+        {-0.3606136646f,  0.1837418396f},
+        { 0.0160064835f,  0.0187411843f},
+        {-0.0941495513f,  0.1295857402f},
+        {-0.0693420635f, -0.0287224231f},
+        {-0.0039962791f,  0.0252315134f},
+        {-0.0342838150f,  0.0026981948f},
+        { 0.0015004899f,  0.0046180330f},
+        {-0.0144836012f,  0.0088755623f},
+        { 0.0023300936f,  0.0023300936f},
+        {-0.0078901675f,  0.0128755831f},
+        {-0.0035807841f, -0.0011634673f},
+        {-0.0006261694f,  0.0079562362f},
+    },
+    {
+        {-0.0006278175f, -0.0079771783f},   /* Filter 95 */
+        {-0.0033374698f,  0.0010844097f},
+        {-0.0078762955f, -0.0128529462f},
+        { 0.0025781792f, -0.0025781792f},
+        {-0.0143514293f, -0.0087945672f},
+        { 0.0016620733f, -0.0051153355f},
+        {-0.0338071368f, -0.0026606794f},
+        {-0.0041357645f, -0.0261121894f},
+        {-0.0675416449f,  0.0279766653f},
+        {-0.0940725099f, -0.1294797019f},
+        { 0.0189604842f, -0.0221998747f},
+        {-0.3532873453f, -0.1800088935f},
+        { 0.2115549353f, -0.8811897233f},
+        { 1.1379261017f,  0.0000000000f},
+        { 0.2125897931f,  0.8855002161f},
+        {-0.3581684071f,  0.1824959187f},
+        { 0.0169987279f,  0.0199029532f},
+        {-0.0941287669f,  0.1295571330f},
+        {-0.0687420134f, -0.0284738743f},
+        {-0.0040433784f,  0.0255288864f},
+        {-0.0341266987f,  0.0026858294f},
+        { 0.0015547453f,  0.0047850141f},
+        {-0.0144406684f,  0.0088492530f},
+        { 0.0024130976f,  0.0024130976f},
+        {-0.0078860517f,  0.0128688668f},
+        {-0.0034996487f, -0.0011371048f},
+        {-0.0006278175f,  0.0079771783f},
+    },
+    {
+        {-0.0006294658f, -0.0079981214f},   /* Filter 96 */
+        {-0.0034185133f,  0.0011107423f},
+        {-0.0078819364f, -0.0128621512f},
+        { 0.0024961015f, -0.0024961015f},
+        {-0.0143977355f, -0.0088229436f},
+        { 0.0016090008f, -0.0049519952f},
+        {-0.0339695824f, -0.0026734641f},
+        {-0.0040904779f, -0.0258262613f},
+        {-0.0681419634f,  0.0282253254f},
+        {-0.0941079825f, -0.1295285258f},
+        { 0.0179909711f, -0.0210647207f},
+        {-0.3557231761f, -0.1812500113f},
+        { 0.2120761280f, -0.8833606473f},
+        { 1.1379528046f,  0.0000000000f},
+        { 0.2120761280f,  0.8833606473f},
+        {-0.3557231761f,  0.1812500113f},
+        { 0.0179909711f,  0.0210647207f},
+        {-0.0941079825f,  0.1295285258f},
+        {-0.0681419634f, -0.0282253254f},
+        {-0.0040904779f,  0.0258262613f},
+        {-0.0339695824f,  0.0026734641f},
+        { 0.0016090008f,  0.0049519952f},
+        {-0.0143977355f,  0.0088229436f},
+        { 0.0024961015f,  0.0024961015f},
+        {-0.0078819364f,  0.0128621512f},
+        {-0.0034185133f, -0.0011107423f},
+        {-0.0006294658f,  0.0079981214f},
+    },
+    {
+        {-0.0006309556f, -0.0080170507f},   /* Filter 97 */
+        {-0.0034996487f,  0.0011371048f},
+        {-0.0078860517f, -0.0128688668f},
+        { 0.0024130976f, -0.0024130976f},
+        {-0.0144406684f, -0.0088492530f},
+        { 0.0015547453f, -0.0047850141f},
+        {-0.0341266987f, -0.0026858294f},
+        {-0.0040433784f, -0.0255288864f},
+        {-0.0687420134f,  0.0284738743f},
+        {-0.0941287669f, -0.1295571330f},
+        { 0.0169987279f, -0.0199029532f},
+        {-0.3581684071f, -0.1824959187f},
+        { 0.2125897931f, -0.8855002161f},
+        { 1.1379261017f,  0.0000000000f},
+        { 0.2115549353f,  0.8811897233f},
+        {-0.3532873453f,  0.1800088935f},
+        { 0.0189604842f,  0.0221998747f},
+        {-0.0940725099f,  0.1294797019f},
+        {-0.0675416449f, -0.0279766653f},
+        {-0.0041357645f,  0.0261121894f},
+        {-0.0338071368f,  0.0026606794f},
+        { 0.0016620733f,  0.0051153355f},
+        {-0.0143514293f,  0.0087945672f},
+        { 0.0025781792f,  0.0025781792f},
+        {-0.0078762955f,  0.0128529462f},
+        {-0.0033374698f, -0.0010844097f},
+        {-0.0006309556f,  0.0080170507f},
+    },
+    {
+        {-0.0006324453f, -0.0080359799f},   /* Filter 98 */
+        {-0.0035807841f,  0.0011634673f},
+        {-0.0078901675f, -0.0128755831f},
+        { 0.0023300936f, -0.0023300936f},
+        {-0.0144836012f, -0.0088755623f},
+        { 0.0015004899f, -0.0046180330f},
+        {-0.0342838150f, -0.0026981948f},
+        {-0.0039962791f, -0.0252315134f},
+        {-0.0693420635f,  0.0287224231f},
+        {-0.0941495513f, -0.1295857402f},
+        { 0.0160064835f, -0.0187411843f},
+        {-0.3606136646f, -0.1837418396f},
+        { 0.2131034720f, -0.8876398428f},
+        { 1.1378992796f,  0.0000000000f},
+        { 0.2110337426f,  0.8790187993f},
+        {-0.3508515145f,  0.1787677757f},
+        { 0.0199299961f,  0.0233350273f},
+        {-0.0940370372f,  0.1294308779f},
+        {-0.0669413265f, -0.0277280053f},
+        {-0.0041810511f,  0.0263981176f},
+        {-0.0336446912f,  0.0026478946f},
+        { 0.0017151457f,  0.0052786758f},
+        {-0.0143051231f,  0.0087661907f},
+        { 0.0026602567f,  0.0026602567f},
+        {-0.0078706542f,  0.0128437404f},
+        {-0.0032564264f, -0.0010580771f},
+        {-0.0006324453f,  0.0080359799f},
+    },
+    {
+        {-0.0006339352f, -0.0080549101f},   /* Filter 99 */
+        {-0.0036619194f,  0.0011898297f},
+        {-0.0078942833f, -0.0128822995f},
+        { 0.0022470897f, -0.0022470897f},
+        {-0.0145265341f, -0.0089018716f},
+        { 0.0014462343f, -0.0044510515f},
+        {-0.0344409313f, -0.0027105601f},
+        {-0.0039491796f, -0.0249341385f},
+        {-0.0699421135f,  0.0289709720f},
+        {-0.0941703356f, -0.1296143474f},
+        { 0.0150142391f, -0.0175794153f},
+        {-0.3630589221f, -0.1849877605f},
+        { 0.2136171370f, -0.8897794116f},
+        { 1.1378724575f,  0.0000000000f},
+        { 0.2105125499f,  0.8768478754f},
+        {-0.3484156837f,  0.1775266579f},
+        { 0.0208995092f,  0.0244701813f},
+        {-0.0940015646f,  0.1293820540f},
+        {-0.0663410080f, -0.0274793452f},
+        {-0.0042263377f,  0.0266840458f},
+        {-0.0334822456f,  0.0026351099f},
+        { 0.0017682182f,  0.0054420161f},
+        {-0.0142588170f,  0.0087378143f},
+        { 0.0027423344f,  0.0027423344f},
+        {-0.0078650134f,  0.0128345354f},
+        {-0.0031753829f, -0.0010317444f},
+        {-0.0006339352f,  0.0080549101f},
+    },
+    {
+        {-0.0006354249f, -0.0080738394f},   /* Filter 100 */
+        {-0.0037430548f,  0.0012161922f},
+        {-0.0078983990f, -0.0128890158f},
+        { 0.0021640857f, -0.0021640857f},
+        {-0.0145694686f, -0.0089281819f},
+        { 0.0013919788f, -0.0042840704f},
+        {-0.0345980476f, -0.0027229254f},
+        {-0.0039020803f, -0.0246367655f},
+        {-0.0705421635f,  0.0292195208f},
+        {-0.0941911200f, -0.1296429546f},
+        { 0.0140219947f, -0.0164176464f},
+        {-0.3655041796f, -0.1862336815f},
+        { 0.2141308021f, -0.8919189804f},
+        { 1.1378457546f,  0.0000000000f},
+        { 0.2099913432f,  0.8746768935f},
+        {-0.3459798529f,  0.1762855401f},
+        { 0.0218690211f,  0.0256053339f},
+        {-0.0939660919f,  0.1293332301f},
+        {-0.0657406895f, -0.0272306852f},
+        {-0.0042716242f,  0.0269699740f},
+        {-0.0333198000f,  0.0026223251f},
+        { 0.0018212905f,  0.0056053559f},
+        {-0.0142125108f,  0.0087094378f},
+        { 0.0028244121f,  0.0028244121f},
+        {-0.0078593725f,  0.0128253304f},
+        {-0.0030943394f, -0.0010054118f},
+        {-0.0006354249f,  0.0080738394f},
+    },
+    {
+        {-0.0006367564f, -0.0080907567f},   /* Filter 101 */
+        {-0.0038242139f,  0.0012425624f},
+        {-0.0079009747f, -0.0128932189f},
+        { 0.0020802229f, -0.0020802229f},
+        {-0.0146089552f, -0.0089523793f},
+        { 0.0013365752f, -0.0041135556f},
+        {-0.0347496118f, -0.0027348538f},
+        {-0.0038531730f, -0.0243279770f},
+        {-0.0711415321f,  0.0294677874f},
+        {-0.0941969357f, -0.1296509593f},
+        { 0.0130071121f, -0.0152293715f},
+        {-0.3679581469f, -0.1874840402f},
+        { 0.2146367724f, -0.8940264986f},
+        { 1.1377654076f,  0.0000000000f},
+        { 0.2094628176f,  0.8724754258f},
+        {-0.3435541657f,  0.1750495907f},
+        { 0.0228157207f,  0.0267137766f},
+        {-0.0939162024f,  0.1292645631f},
+        {-0.0651405225f, -0.0269820879f},
+        {-0.0043150940f,  0.0272444315f},
+        {-0.0331522516f,  0.0026091388f},
+        { 0.0018731464f,  0.0057649517f},
+        {-0.0141629076f,  0.0086790410f},
+        { 0.0029054974f,  0.0029054974f},
+        {-0.0078522227f,  0.0128136629f},
+        {-0.0030134556f, -0.0009791311f},
+        {-0.0006367564f,  0.0080907567f},
+    },
+    {
+        {-0.0006380879f, -0.0081076750f},   /* Filter 102 */
+        {-0.0039053725f,  0.0012689324f},
+        {-0.0079035503f, -0.0128974220f},
+        { 0.0019963599f, -0.0019963599f},
+        {-0.0146484418f, -0.0089765767f},
+        { 0.0012811716f, -0.0039430408f},
+        {-0.0349011797f, -0.0027467824f},
+        {-0.0038042657f, -0.0240191886f},
+        {-0.0717408937f,  0.0297160511f},
+        {-0.0942027515f, -0.1296589641f},
+        { 0.0119922295f, -0.0140410967f},
+        {-0.3704120876f, -0.1887343854f},
+        { 0.2151427288f, -0.8961339588f},
+        { 1.1376850605f,  0.0000000000f},
+        { 0.2089342920f,  0.8702739581f},
+        {-0.3411284786f,  0.1738136414f},
+        { 0.0237624178f,  0.0278222165f},
+        {-0.0938663217f,  0.1291959082f},
+        {-0.0645403486f, -0.0267334877f},
+        {-0.0043585641f,  0.0275188910f},
+        {-0.0329847033f,  0.0025959525f},
+        { 0.0019250022f,  0.0059245475f},
+        {-0.0141133060f,  0.0086486451f},
+        { 0.0029865827f,  0.0029865826f},
+        {-0.0078450724f,  0.0128019946f},
+        {-0.0029325720f, -0.0009528504f},
+        {-0.0006380879f,  0.0081076750f},
+    },
+    {
+        {-0.0006394193f, -0.0081245932f},   /* Filter 103 */
+        {-0.0039865316f,  0.0012953026f},
+        {-0.0079061260f, -0.0129016251f},
+        { 0.0019124969f, -0.0019124969f},
+        {-0.0146879283f, -0.0090007741f},
+        { 0.0012257680f, -0.0037725260f},
+        {-0.0350527438f, -0.0027587108f},
+        {-0.0037553584f, -0.0237104001f},
+        {-0.0723402623f,  0.0299643177f},
+        {-0.0942085673f, -0.1296669688f},
+        { 0.0109773469f, -0.0128528219f},
+        {-0.3728660282f, -0.1899847307f},
+        { 0.2156486853f, -0.8982414190f},
+        { 1.1376047134f,  0.0000000000f},
+        { 0.2084057663f,  0.8680724904f},
+        {-0.3387028179f,  0.1725777056f},
+        { 0.0247091173f,  0.0289306593f},
+        {-0.0938164323f,  0.1291272413f},
+        {-0.0639401746f, -0.0264848875f},
+        {-0.0044020342f,  0.0277933504f},
+        {-0.0328171549f,  0.0025827661f},
+        { 0.0019768581f,  0.0060841437f},
+        {-0.0140637028f,  0.0086182482f},
+        { 0.0030676679f,  0.0030676679f},
+        {-0.0078379226f,  0.0127903272f},
+        {-0.0028516882f, -0.0009265697f},
+        {-0.0006394193f,  0.0081245932f},
+    },
+    {
+        {-0.0006407508f, -0.0081415105f},   /* Filter 104 */
+        {-0.0040676902f,  0.0013216727f},
+        {-0.0079087017f, -0.0129058281f},
+        { 0.0018286340f, -0.0018286340f},
+        {-0.0147274149f, -0.0090249715f},
+        { 0.0011703643f, -0.0036020110f},
+        {-0.0352043080f, -0.0027706391f},
+        {-0.0037064512f, -0.0234016117f},
+        {-0.0729396240f,  0.0302125815f},
+        {-0.0942143918f, -0.1296749855f},
+        { 0.0099624644f, -0.0116645471f},
+        {-0.3753199689f, -0.1912350759f},
+        { 0.2161546417f, -0.9003488792f},
+        { 1.1375243664f,  0.0000000000f},
+        { 0.2078772268f,  0.8658709647f},
+        {-0.3362771308f,  0.1713417562f},
+        { 0.0256558144f,  0.0300390992f},
+        {-0.0937665516f,  0.1290585864f},
+        {-0.0633400076f, -0.0262362902f},
+        {-0.0044455040f,  0.0280678079f},
+        {-0.0326496065f,  0.0025695798f},
+        { 0.0020287140f,  0.0062437396f},
+        {-0.0140140997f,  0.0085878513f},
+        { 0.0031487535f,  0.0031487535f},
+        {-0.0078307727f,  0.0127786597f},
+        {-0.0027708046f, -0.0009002890f},
+        {-0.0006407508f,  0.0081415105f},
+    },
+    {
+        {-0.0006419242f, -0.0081564205f},   /* Filter 105 */
+        {-0.0041488032f,  0.0013480279f},
+        {-0.0079097235f, -0.0129074957f},
+        { 0.0017439806f, -0.0017439806f},
+        {-0.0147633837f, -0.0090470132f},
+        { 0.0011138490f, -0.0034280747f},
+        {-0.0353500972f, -0.0027821130f},
+        {-0.0036557426f, -0.0230814501f},
+        {-0.0735378774f,  0.0304603862f},
+        {-0.0942049674f, -0.1296620140f},
+        { 0.0089250471f, -0.0104498875f},
+        {-0.3777818758f, -0.1924894801f},
+        { 0.2166527086f, -0.9024234774f},
+        { 1.1373904943f,  0.0000000000f},
+        { 0.2073415630f,  0.8636397647f},
+        {-0.3338623308f,  0.1701113542f},
+        { 0.0265796290f,  0.0311207471f},
+        {-0.0937025344f,  0.1289704742f},
+        {-0.0627403844f, -0.0259879181f},
+        {-0.0044871553f,  0.0283307839f},
+        {-0.0324771819f,  0.0025560097f},
+        { 0.0020793210f,  0.0063994921f},
+        {-0.0139612788f,  0.0085554827f},
+        { 0.0032287821f,  0.0032287821f},
+        {-0.0078221305f,  0.0127645568f},
+        {-0.0026901479f, -0.0008740821f},
+        {-0.0006419242f,  0.0081564205f},
+    },
+    {
+        {-0.0006430977f, -0.0081713305f},   /* Filter 106 */
+        {-0.0042299166f,  0.0013743832f},
+        {-0.0079107454f, -0.0129091633f},
+        { 0.0016593274f, -0.0016593274f},
+        {-0.0147993525f, -0.0090690549f},
+        { 0.0010573337f, -0.0032541385f},
+        {-0.0354958901f, -0.0027935871f},
+        {-0.0036050339f, -0.0227612885f},
+        {-0.0741361378f,  0.0307081937f},
+        {-0.0941955519f, -0.1296490546f},
+        { 0.0078876297f, -0.0092352279f},
+        {-0.3802437562f, -0.1937438708f},
+        { 0.2171507756f, -0.9044980755f},
+        { 1.1372566223f,  0.0000000000f},
+        { 0.2068058854f,  0.8614085067f},
+        {-0.3314475308f,  0.1688809521f},
+        { 0.0275034412f,  0.0322023922f},
+        {-0.0936385172f,  0.1288823621f},
+        {-0.0621407680f, -0.0257395489f},
+        {-0.0045288066f,  0.0285937598f},
+        {-0.0323047536f,  0.0025424393f},
+        { 0.0021299283f,  0.0065552451f},
+        {-0.0139084580f,  0.0085231140f},
+        { 0.0033088108f,  0.0033088108f},
+        {-0.0078134887f,  0.0127504547f},
+        {-0.0026094911f, -0.0008478751f},
+        {-0.0006430977f,  0.0081713305f},
+    },
+    {
+        {-0.0006442711f, -0.0081862405f},   /* Filter 107 */
+        {-0.0043110296f,  0.0014007384f},
+        {-0.0079117673f, -0.0129108309f},
+        { 0.0015746739f, -0.0015746739f},
+        {-0.0148353213f, -0.0090910966f},
+        { 0.0010008183f, -0.0030802021f},
+        {-0.0356416792f, -0.0028050610f},
+        {-0.0035543253f, -0.0224411270f},
+        {-0.0747343912f,  0.0309559984f},
+        {-0.0941861275f, -0.1296360831f},
+        { 0.0068502118f, -0.0080205675f},
+        {-0.3827056631f, -0.1949982750f},
+        { 0.2176488286f, -0.9065726157f},
+        { 1.1371228695f,  0.0000000000f},
+        { 0.2062702077f,  0.8591772487f},
+        {-0.3290327308f,  0.1676505501f},
+        { 0.0284272558f,  0.0332840401f},
+        {-0.0935744999f,  0.1287942500f},
+        {-0.0615411447f, -0.0254911768f},
+        {-0.0045704576f,  0.0288567339f},
+        {-0.0321323290f,  0.0025288691f},
+        { 0.0021805355f,  0.0067109982f},
+        {-0.0138556372f,  0.0084907454f},
+        { 0.0033888394f,  0.0033888394f},
+        {-0.0078048464f,  0.0127363518f},
+        {-0.0025288345f, -0.0008216681f},
+        {-0.0006442711f,  0.0081862405f},
+    },
+    {
+        {-0.0006454445f, -0.0082011506f},   /* Filter 108 */
+        {-0.0043921426f,  0.0014270936f},
+        {-0.0079127897f, -0.0129124992f},
+        { 0.0014900205f, -0.0014900205f},
+        {-0.0148712885f, -0.0091131373f},
+        { 0.0009443030f, -0.0029062657f},
+        {-0.0357874721f, -0.0028165352f},
+        {-0.0035036167f, -0.0221209654f},
+        {-0.0753326446f,  0.0312038031f},
+        {-0.0941767119f, -0.1296231237f},
+        { 0.0058127945f, -0.0068059079f},
+        {-0.3851675434f, -0.1962526657f},
+        { 0.2181468956f, -0.9086472139f},
+        { 1.1369889975f,  0.0000000000f},
+        { 0.2057345440f,  0.8569460487f},
+        {-0.3266179308f,  0.1664201480f},
+        { 0.0293510680f,  0.0343656852f},
+        {-0.0935104915f,  0.1287061499f},
+        {-0.0609415284f, -0.0252428076f},
+        {-0.0046121089f,  0.0291197098f},
+        {-0.0319599006f,  0.0025152987f},
+        { 0.0022311426f,  0.0068667507f},
+        {-0.0138028164f,  0.0084583768f},
+        { 0.0034688681f,  0.0034688680f},
+        {-0.0077962046f,  0.0127222496f},
+        {-0.0024481778f, -0.0007954612f},
+        {-0.0006454445f,  0.0082011506f},
+    },
+    {
+        {-0.0006464603f, -0.0082140570f},   /* Filter 109 */
+        {-0.0044731409f,  0.0014534116f},
+        {-0.0079122457f, -0.0129116115f},
+        { 0.0014046468f, -0.0014046468f},
+        {-0.0149036696f, -0.0091329805f},
+        { 0.0008867137f, -0.0027290242f},
+        {-0.0359272672f, -0.0028275373f},
+        {-0.0034511144f, -0.0217894786f},
+        {-0.0759293562f,  0.0314509691f},
+        {-0.0941517847f, -0.1295888143f},
+        { 0.0047529565f, -0.0055649970f},
+        {-0.3876366199f, -0.1975107231f},
+        { 0.2186368782f, -0.9106881385f},
+        { 1.1368016005f,  0.0000000000f},
+        { 0.2051919091f,  0.8546858118f},
+        {-0.3242147084f,  0.1651956450f},
+        { 0.0302519348f,  0.0354204647f},
+        {-0.0934326268f,  0.1285989783f},
+        {-0.0603428619f, -0.0249948318f},
+        {-0.0046519403f,  0.0293711948f},
+        {-0.0317828226f,  0.0025013624f},
+        { 0.0022804704f,  0.0070185662f},
+        {-0.0137468558f,  0.0084240841f},
+        { 0.0035477772f,  0.0035477772f},
+        {-0.0077860889f,  0.0127057422f},
+        {-0.0023678146f, -0.0007693496f},
+        {-0.0006464603f,  0.0082140570f},
+    },
+    {
+        {-0.0006474761f, -0.0082269643f},   /* Filter 110 */
+        {-0.0045541388f,  0.0014797294f},
+        {-0.0079117016f, -0.0129107237f},
+        { 0.0013192730f, -0.0013192730f},
+        {-0.0149360507f, -0.0091528236f},
+        { 0.0008291245f, -0.0025517827f},
+        {-0.0360670624f, -0.0028385394f},
+        {-0.0033986123f, -0.0214579936f},
+        {-0.0765260746f,  0.0316981380f},
+        {-0.0941268663f, -0.1295545170f},
+        { 0.0036931185f, -0.0043240861f},
+        {-0.3901057230f, -0.1987687939f},
+        { 0.2191268748f, -0.9127291212f},
+        { 1.1366143227f,  0.0000000000f},
+        { 0.2046492882f,  0.8524256329f},
+        {-0.3218115125f,  0.1639711556f},
+        { 0.0311528015f,  0.0364752441f},
+        {-0.0933547709f,  0.1284918188f},
+        {-0.0597441955f, -0.0247468560f},
+        {-0.0046917716f,  0.0296226799f},
+        {-0.0316057446f,  0.0024874261f},
+        { 0.0023297982f,  0.0071703817f},
+        {-0.0136908967f,  0.0083897923f},
+        { 0.0036266859f,  0.0036266859f},
+        {-0.0077759731f,  0.0126892349f},
+        {-0.0022874514f, -0.0007432380f},
+        {-0.0006474761f,  0.0082269643f},
+    },
+    {
+        {-0.0006484920f, -0.0082398716f},   /* Filter 111 */
+        {-0.0046351367f,  0.0015060472f},
+        {-0.0079111576f, -0.0129098359f},
+        { 0.0012338993f, -0.0012338993f},
+        {-0.0149684318f, -0.0091726668f},
+        { 0.0007715352f, -0.0023745411f},
+        {-0.0362068575f, -0.0028495415f},
+        {-0.0033461099f, -0.0211265068f},
+        {-0.0771227862f,  0.0319453040f},
+        {-0.0941019478f, -0.1295202197f},
+        { 0.0026332804f, -0.0030831752f},
+        {-0.3925747995f, -0.2000268512f},
+        { 0.2196168575f, -0.9147700459f},
+        { 1.1364269257f,  0.0000000000f},
+        { 0.2041066672f,  0.8501654540f},
+        {-0.3194082901f,  0.1627466526f},
+        { 0.0320536683f,  0.0375300236f},
+        {-0.0932769149f,  0.1283846594f},
+        {-0.0591455290f, -0.0244988803f},
+        {-0.0047316029f,  0.0298741650f},
+        {-0.0314286666f,  0.0024734897f},
+        { 0.0023791261f,  0.0073221971f},
+        {-0.0136349377f,  0.0083555006f},
+        { 0.0037055950f,  0.0037055950f},
+        {-0.0077658579f,  0.0126727282f},
+        {-0.0022070882f, -0.0007171264f},
+        {-0.0006484920f,  0.0082398716f},
+    },
+    {
+        {-0.0006495077f, -0.0082527780f},   /* Filter 112 */
+        {-0.0047161350f,  0.0015323651f},
+        {-0.0079106136f, -0.0129089481f},
+        { 0.0011485256f, -0.0011485256f},
+        {-0.0150008129f, -0.0091925100f},
+        { 0.0007139459f, -0.0021972994f},
+        {-0.0363466526f, -0.0028605436f},
+        {-0.0032936076f, -0.0207950200f},
+        {-0.0777195046f,  0.0321924729f},
+        {-0.0940770206f, -0.1294859103f},
+        { 0.0015734425f, -0.0018422645f},
+        {-0.3950438760f, -0.2012849085f},
+        { 0.2201068402f, -0.9168109706f},
+        { 1.1362396479f,  0.0000000000f},
+        { 0.2035640463f,  0.8479052751f},
+        {-0.3170050676f,  0.1615221496f},
+        { 0.0329545326f,  0.0385848002f},
+        {-0.0931990590f,  0.1282774999f},
+        {-0.0585468626f, -0.0242509045f},
+        {-0.0047714342f,  0.0301256501f},
+        {-0.0312515886f,  0.0024595534f},
+        { 0.0024284540f,  0.0074740130f},
+        {-0.0135789771f,  0.0083212079f},
+        { 0.0037845042f,  0.0037845041f},
+        {-0.0077557421f,  0.0126562208f},
+        {-0.0021267252f, -0.0006910149f},
+        {-0.0006495077f,  0.0082527780f},
+    },
+    {
+        {-0.0006503664f, -0.0082636892f},   /* Filter 113 */
+        {-0.0047969477f,  0.0015586228f},
+        {-0.0079084924f, -0.0129054867f},
+        { 0.0010625026f, -0.0010625026f},
+        {-0.0150295397f, -0.0092101138f},
+        { 0.0006553218f, -0.0020168732f},
+        {-0.0364802345f, -0.0028710567f},
+        {-0.0032393211f, -0.0204522686f},
+        {-0.0783142406f,  0.0324388206f},
+        {-0.0940363365f, -0.1294299135f},
+        { 0.0004913094f, -0.0005752494f},
+        {-0.3975194052f, -0.2025462536f},
+        { 0.2205885716f, -0.9188175263f},
+        { 1.1359989643f,  0.0000000000f},
+        { 0.2030146629f,  0.8456169287f},
+        {-0.3146141398f,  0.1603039110f},
+        { 0.0338324031f,  0.0396126545f},
+        {-0.0931076446f,  0.1281516788f},
+        {-0.0579495384f, -0.0240034847f},
+        {-0.0048094459f,  0.0303656461f},
+        {-0.0310700838f,  0.0024452686f},
+        { 0.0024764734f,  0.0076218015f},
+        {-0.0135199624f,  0.0082850436f},
+        { 0.0038622318f,  0.0038622318f},
+        {-0.0077441724f,  0.0126373407f},
+        {-0.0020467211f, -0.0006650200f},
+        {-0.0006503664f,  0.0082636892f},
+    },
+    {
+        {-0.0006512252f, -0.0082746004f},   /* Filter 114 */
+        {-0.0048777604f,  0.0015848804f},
+        {-0.0079063713f, -0.0129020253f},
+        { 0.0009764796f, -0.0009764796f},
+        {-0.0150582664f, -0.0092277175f},
+        { 0.0005966978f, -0.0018364470f},
+        {-0.0366138164f, -0.0028815699f},
+        {-0.0031850346f, -0.0201095172f},
+        {-0.0789089766f,  0.0326851683f},
+        {-0.0939956437f, -0.1293739046f},
+        {-0.0005908237f,  0.0006917657f},
+        {-0.3999949343f, -0.2038075987f},
+        { 0.2210703030f, -0.9208240820f},
+        { 1.1357581615f,  0.0000000000f},
+        { 0.2024652796f,  0.8433285823f},
+        {-0.3122232384f,  0.1590856859f},
+        { 0.0347102737f,  0.0406405089f},
+        {-0.0930162303f,  0.1280258577f},
+        {-0.0573522177f, -0.0237560664f},
+        {-0.0048474578f,  0.0306056440f},
+        {-0.0308885807f,  0.0024309840f},
+        { 0.0025244925f,  0.0077695890f},
+        {-0.0134609462f,  0.0082488784f},
+        { 0.0039399598f,  0.0039399598f},
+        {-0.0077326026f,  0.0126184606f},
+        {-0.0019667173f, -0.0006390252f},
+        {-0.0006512252f,  0.0082746004f},
+    },
+    {
+        {-0.0006520839f, -0.0082855115f},   /* Filter 115 */
+        {-0.0049585732f,  0.0016111381f},
+        {-0.0079042501f, -0.0128985639f},
+        { 0.0008904566f, -0.0008904566f},
+        {-0.0150869932f, -0.0092453213f},
+        { 0.0005380737f, -0.0016560207f},
+        {-0.0367473946f, -0.0028920827f},
+        {-0.0031307478f, -0.0197667639f},
+        {-0.0795037126f,  0.0329315160f},
+        {-0.0939549596f, -0.1293179078f},
+        {-0.0016729569f,  0.0019587808f},
+        {-0.4024704369f, -0.2050689303f},
+        { 0.2215520344f, -0.9228306378f},
+        { 1.1355174780f,  0.0000000000f},
+        { 0.2019159101f,  0.8410402939f},
+        {-0.3098323105f,  0.1578674473f},
+        { 0.0355881418f,  0.0416683603f},
+        {-0.0929248246f,  0.1279000486f},
+        {-0.0567548969f, -0.0235086480f},
+        {-0.0048854694f,  0.0308456401f},
+        {-0.0307070777f,  0.0024166994f},
+        { 0.0025725119f,  0.0079173775f},
+        {-0.0134019299f,  0.0082127132f},
+        { 0.0040176875f,  0.0040176875f},
+        {-0.0077210329f,  0.0125995805f},
+        {-0.0018867132f, -0.0006130303f},
+        {-0.0006520839f,  0.0082855115f},
+    },
+    {
+        {-0.0006529426f, -0.0082964227f},   /* Filter 116 */
+        {-0.0050393859f,  0.0016373957f},
+        {-0.0079021289f, -0.0128951025f},
+        { 0.0008044338f, -0.0008044338f},
+        {-0.0151157199f, -0.0092629251f},
+        { 0.0004794497f, -0.0014755945f},
+        {-0.0368809765f, -0.0029025958f},
+        {-0.0030764614f, -0.0194240126f},
+        {-0.0800984555f,  0.0331778666f},
+        {-0.0939142668f, -0.1292618989f},
+        {-0.0027550900f,  0.0032257959f},
+        {-0.4049459660f, -0.2063302754f},
+        { 0.2220337658f, -0.9248371935f},
+        { 1.1352766752f,  0.0000000000f},
+        { 0.2013665268f,  0.8387519475f},
+        {-0.3074413826f,  0.1566492087f},
+        { 0.0364660123f,  0.0426962147f},
+        {-0.0928334103f,  0.1277742276f},
+        {-0.0561575762f, -0.0232612297f},
+        {-0.0049234811f,  0.0310856362f},
+        {-0.0305255747f,  0.0024024148f},
+        { 0.0026205313f,  0.0080651659f},
+        {-0.0133429153f,  0.0081765490f},
+        { 0.0040954155f,  0.0040954155f},
+        {-0.0077094631f,  0.0125807004f},
+        {-0.0018067094f, -0.0005870355f},
+        {-0.0006529426f,  0.0082964227f},
+    },
+    {
+        {-0.0006536450f, -0.0083053470f},   /* Filter 117 */
+        {-0.0051199431f,  0.0016635704f},
+        {-0.0078984209f, -0.0128890516f},
+        { 0.0007178340f, -0.0007178340f},
+        {-0.0151407272f, -0.0092782496f},
+        { 0.0004198315f, -0.0012921084f},
+        {-0.0370081261f, -0.0029126027f},
+        {-0.0030204009f, -0.0190700610f},
+        {-0.0806907754f,  0.0334232135f},
+        {-0.0938575543f, -0.1291838409f},
+        {-0.0038593824f,  0.0045187562f},
+        {-0.4074271512f, -0.2075945024f},
+        { 0.2225070651f, -0.9268086269f},
+        { 1.1349827051f,  0.0000000000f},
+        { 0.2008105897f,  0.8364363030f},
+        {-0.3050634397f,  0.1554375863f},
+        { 0.0373208455f,  0.0436970957f},
+        {-0.0927287353f,  0.1276301548f},
+        {-0.0555619866f, -0.0230145284f},
+        {-0.0049596754f,  0.0313141580f},
+        {-0.0303398733f,  0.0023877998f},
+        { 0.0026672144f,  0.0082088419f},
+        {-0.0132809268f,  0.0081385624f},
+        { 0.0041719022f,  0.0041719022f},
+        {-0.0076964598f,  0.0125594809f},
+        {-0.0017271295f, -0.0005611784f},
+        {-0.0006536450f,  0.0083053470f},
+    },
+    {
+        {-0.0006543473f, -0.0083142712f},   /* Filter 118 */
+        {-0.0052004999f,  0.0016897448f},
+        {-0.0078947129f, -0.0128830006f},
+        { 0.0006312342f, -0.0006312342f},
+        {-0.0151657345f, -0.0092935740f},
+        { 0.0003602132f, -0.0011086223f},
+        {-0.0371352756f, -0.0029226096f},
+        {-0.0029643405f, -0.0187161094f},
+        {-0.0812830954f,  0.0336685605f},
+        {-0.0938008418f, -0.1291057828f},
+        {-0.0049636747f,  0.0058117164f},
+        {-0.4099083363f, -0.2088587294f},
+        { 0.2229803504f, -0.9287800022f},
+        { 1.1346886158f,  0.0000000000f},
+        { 0.2002546527f,  0.8341206585f},
+        {-0.3026854967f,  0.1542259638f},
+        { 0.0381756786f,  0.0446979767f},
+        {-0.0926240690f,  0.1274860940f},
+        {-0.0549663971f, -0.0227678271f},
+        {-0.0049958691f,  0.0315426760f},
+        {-0.0301541737f,  0.0023731849f},
+        { 0.0027138976f,  0.0083525178f},
+        {-0.0132189391f,  0.0081005763f},
+        { 0.0042483892f,  0.0042483892f},
+        {-0.0076834565f,  0.0125382614f},
+        {-0.0016475497f, -0.0005353213f},
+        {-0.0006543473f,  0.0083142712f},
+    },
+    {
+        {-0.0006550496f, -0.0083231946f},   /* Filter 119 */
+        {-0.0052810571f,  0.0017159195f},
+        {-0.0078910049f, -0.0128769497f},
+        { 0.0005446345f, -0.0005446345f},
+        {-0.0151907433f, -0.0093088995f},
+        { 0.0003005950f, -0.0009251361f},
+        {-0.0372624252f, -0.0029326165f},
+        {-0.0029082804f, -0.0183621597f},
+        {-0.0818754153f,  0.0339139074f},
+        {-0.0937441381f, -0.1290277369f},
+        {-0.0060679668f,  0.0071046763f},
+        {-0.4123895215f, -0.2101229563f},
+        { 0.2234536497f, -0.9307514356f},
+        { 1.1343946457f,  0.0000000000f},
+        { 0.1996987295f,  0.8318050720f},
+        {-0.3003075538f,  0.1530143413f},
+        { 0.0390305118f,  0.0456988578f},
+        {-0.0925193940f,  0.1273420212f},
+        {-0.0543708110f, -0.0225211273f},
+        {-0.0050320634f,  0.0317711978f},
+        {-0.0299684722f,  0.0023585699f},
+        { 0.0027605807f,  0.0084961938f},
+        {-0.0131569505f,  0.0080625897f},
+        { 0.0043248758f,  0.0043248758f},
+        {-0.0076704536f,  0.0125170427f},
+        {-0.0015679698f, -0.0005094643f},
+        {-0.0006550496f,  0.0083231946f},
+    },
+    {
+        {-0.0006557520f, -0.0083321189f},   /* Filter 120 */
+        {-0.0053616143f,  0.0017420941f},
+        {-0.0078872969f, -0.0128708988f},
+        { 0.0004580348f, -0.0004580348f},
+        {-0.0152157506f, -0.0093242239f},
+        { 0.0002409767f, -0.0007416500f},
+        {-0.0373895748f, -0.0029426234f},
+        {-0.0028522200f, -0.0180082081f},
+        {-0.0824677352f,  0.0341592544f},
+        {-0.0936874256f, -0.1289496789f},
+        {-0.0071722595f,  0.0083976369f},
+        {-0.4148707332f, -0.2113871969f},
+        { 0.2239269490f, -0.9327228689f},
+        { 1.1341005564f,  0.0000000000f},
+        { 0.1991427925f,  0.8294894275f},
+        {-0.2979296108f,  0.1518027189f},
+        { 0.0398853425f,  0.0466997360f},
+        {-0.0924147277f,  0.1271979605f},
+        {-0.0537752214f, -0.0222744260f},
+        {-0.0050682571f,  0.0319997159f},
+        {-0.0297827707f,  0.0023439549f},
+        { 0.0028072639f,  0.0086398697f},
+        {-0.0130949620f,  0.0080246031f},
+        { 0.0044013628f,  0.0044013628f},
+        {-0.0076574503f,  0.0124958232f},
+        {-0.0014883900f, -0.0004836072f},
+        {-0.0006557520f,  0.0083321189f},
+    },
+    {
+        {-0.0006562987f, -0.0083390655f},   /* Filter 121 */
+        {-0.0054418451f,  0.0017681627f},
+        {-0.0078819938f, -0.0128622449f},
+        { 0.0003709319f, -0.0003709319f},
+        {-0.0152369780f, -0.0093372321f},
+        { 0.0001804062f, -0.0005552331f},
+        {-0.0375100767f, -0.0029521071f},
+        {-0.0027943978f, -0.0176431337f},
+        {-0.0830571916f,  0.0344034152f},
+        {-0.0936144395f, -0.1288492221f},
+        {-0.0082985637f,  0.0097163697f},
+        {-0.4173568043f, -0.2126539134f},
+        { 0.2243916352f, -0.9346584264f},
+        { 1.1337532997f,  0.0000000000f},
+        { 0.1985804965f,  0.8271472963f},
+        {-0.2955653432f,  0.1505980644f},
+        { 0.0407171093f,  0.0476736098f},
+        {-0.0922970898f,  0.1270360458f},
+        {-0.0531817451f, -0.0220286001f},
+        {-0.0051026361f,  0.0322167763f},
+        {-0.0295930992f,  0.0023290274f},
+        { 0.0028525846f,  0.0087793526f},
+        {-0.0130300878f,  0.0079848481f},
+        { 0.0044765501f,  0.0044765501f},
+        {-0.0076430353f,  0.0124723001f},
+        {-0.0014092982f, -0.0004579088f},
+        {-0.0006562987f,  0.0083390655f},
+    },
+    {
+        {-0.0006568455f, -0.0083460131f},   /* Filter 122 */
+        {-0.0055220759f,  0.0017942312f},
+        {-0.0078766902f, -0.0128535902f},
+        { 0.0002838290f, -0.0002838290f},
+        {-0.0152582054f, -0.0093502403f},
+        { 0.0001198356f, -0.0003688162f},
+        {-0.0376305786f, -0.0029615908f},
+        {-0.0027365760f, -0.0172780610f},
+        {-0.0836466480f,  0.0346475760f},
+        {-0.0935414534f, -0.1287487654f},
+        {-0.0094248685f,  0.0110351032f},
+        {-0.4198429020f, -0.2139206434f},
+        { 0.2248563354f, -0.9365940418f},
+        { 1.1334060431f,  0.0000000000f},
+        { 0.1980182006f,  0.8248051651f},
+        {-0.2932010490f,  0.1493933963f},
+        { 0.0415488785f,  0.0486474864f},
+        {-0.0921794520f,  0.1268741312f},
+        {-0.0525882687f, -0.0217827741f},
+        {-0.0051370151f,  0.0324338367f},
+        {-0.0294034277f,  0.0023141000f},
+        { 0.0028979053f,  0.0089188354f},
+        {-0.0129652128f,  0.0079450927f},
+        { 0.0045517378f,  0.0045517378f},
+        {-0.0076286203f,  0.0124487770f},
+        {-0.0013302065f, -0.0004322103f},
+        {-0.0006568455f,  0.0083460131f},
+    },
+    {
+        {-0.0006573923f, -0.0083529607f},   /* Filter 123 */
+        {-0.0056023067f,  0.0018202998f},
+        {-0.0078713866f, -0.0128449355f},
+        { 0.0001967261f, -0.0001967261f},
+        {-0.0152794329f, -0.0093632485f},
+        { 0.0000592651f, -0.0001823992f},
+        {-0.0377510805f, -0.0029710745f},
+        {-0.0026787539f, -0.0169129866f},
+        {-0.0842360975f,  0.0348917340f},
+        {-0.0934684586f, -0.1286482965f},
+        {-0.0105511727f,  0.0123538360f},
+        {-0.4223289731f, -0.2151873599f},
+        { 0.2253210216f, -0.9385295993f},
+        { 1.1330589056f,  0.0000000000f},
+        { 0.1974559185f,  0.8224630919f},
+        {-0.2908367814f,  0.1481887418f},
+        { 0.0423806429f,  0.0496213573f},
+        {-0.0920618141f,  0.1267122165f},
+        {-0.0519947924f, -0.0215369482f},
+        {-0.0051713940f,  0.0326508970f},
+        {-0.0292137580f,  0.0022991726f},
+        { 0.0029432260f,  0.0090583183f},
+        {-0.0129003378f,  0.0079053372f},
+        { 0.0046269252f,  0.0046269252f},
+        {-0.0076142049f,  0.0124252531f},
+        {-0.0012511149f, -0.0004065119f},
+        {-0.0006573923f,  0.0083529607f},
+    },
+    {
+        {-0.0006579390f, -0.0083599074f},   /* Filter 124 */
+        {-0.0056825375f,  0.0018463684f},
+        {-0.0078660834f, -0.0128362816f},
+        { 0.0001096232f, -0.0001096232f},
+        {-0.0153006603f, -0.0093762567f},
+        {-0.0000013054f,  0.0000040177f},
+        {-0.0378715823f, -0.0029805582f},
+        {-0.0026209318f, -0.0165479121f},
+        {-0.0848255540f,  0.0351358949f},
+        {-0.0933954725f, -0.1285478398f},
+        {-0.0116774775f,  0.0136725695f},
+        {-0.4248150707f, -0.2164540899f},
+        { 0.2257857078f, -0.9404651568f},
+        { 1.1327116489f,  0.0000000000f},
+        { 0.1968936226f,  0.8201209607f},
+        {-0.2884725138f,  0.1469840873f},
+        { 0.0432124121f,  0.0505952339f},
+        {-0.0919441762f,  0.1265503019f},
+        {-0.0514013161f, -0.0212911222f},
+        {-0.0052057730f,  0.0328679574f},
+        {-0.0290240865f,  0.0022842452f},
+        { 0.0029885468f,  0.0091978012f},
+        {-0.0128354629f,  0.0078655818f},
+        { 0.0047021128f,  0.0047021128f},
+        {-0.0075997899f,  0.0124017299f},
+        {-0.0011720231f, -0.0003808134f},
+        {-0.0006579390f,  0.0083599074f},
+    },
+    {
+        {-0.0006583311f, -0.0083648895f},   /* Filter 125 */
+        {-0.0057623706f,  0.0018723077f},
+        {-0.0078591774f, -0.0128250119f},
+        { 0.0000220918f, -0.0000220918f},
+        {-0.0153180475f, -0.0093869116f},
+        {-0.0000627850f,  0.0001932324f},
+        {-0.0379852211f, -0.0029895017f},
+        {-0.0025613617f, -0.0161718012f},
+        {-0.0854116994f,  0.0353786843f},
+        {-0.0933059675f, -0.1284246468f},
+        {-0.0128256378f,  0.0150168925f},
+        {-0.4273052577f, -0.2177229035f},
+        { 0.2262416280f, -0.9423642008f},
+        { 1.1323113441f,  0.0000000000f},
+        { 0.1963251765f,  0.8177532122f},
+        {-0.2861225854f,  0.1457867389f},
+        { 0.0440210907f,  0.0515420749f},
+        {-0.0918138733f,  0.1263709553f},
+        {-0.0508103247f, -0.0210463256f},
+        {-0.0052383414f,  0.0330735858f},
+        {-0.0288306714f,  0.0022690231f},
+        { 0.0030324803f,  0.0093330147f},
+        {-0.0127677887f,  0.0078241110f},
+        { 0.0047759442f,  0.0047759442f},
+        {-0.0075839856f,  0.0123759397f},
+        {-0.0010934825f, -0.0003552940f},
+        {-0.0006583311f,  0.0083648895f},
+    },
+    {
+        {-0.0006587232f, -0.0083698725f},   /* Filter 126 */
+        {-0.0058422042f,  0.0018982472f},
+        {-0.0078522714f, -0.0128137423f},
+        {-0.0000654396f,  0.0000654396f},
+        {-0.0153354348f, -0.0093975665f},
+        {-0.0001242646f,  0.0003824470f},
+        {-0.0380988636f, -0.0029984456f},
+        {-0.0025017916f, -0.0157956903f},
+        {-0.0859978380f,  0.0356214708f},
+        {-0.0932164537f, -0.1283014417f},
+        {-0.0139737969f,  0.0163612141f},
+        {-0.4297954712f, -0.2189917307f},
+        { 0.2266975342f, -0.9442631870f},
+        { 1.1319110394f,  0.0000000000f},
+        { 0.1957567164f,  0.8153854057f},
+        {-0.2837726304f,  0.1445893771f},
+        { 0.0448297741f,  0.0524889215f},
+        {-0.0916835704f,  0.1261916087f},
+        {-0.0502193367f, -0.0208015303f},
+        {-0.0052709097f,  0.0332792142f},
+        {-0.0286372583f,  0.0022538011f},
+        { 0.0030764136f,  0.0094682274f},
+        {-0.0127001146f,  0.0077826402f},
+        { 0.0048497760f,  0.0048497760f},
+        {-0.0075681818f,  0.0123501503f},
+        {-0.0010149420f, -0.0003297747f},
+        {-0.0006587232f,  0.0083698725f},
+    },
+    {
+        {-0.0006591153f, -0.0083748546f},   /* Filter 127 */
+        {-0.0059220378f,  0.0019241867f},
+        {-0.0078453653f, -0.0128024727f},
+        {-0.0001529710f,  0.0001529710f},
+        {-0.0153528220f, -0.0094082214f},
+        {-0.0001857442f,  0.0005716617f},
+        {-0.0382125024f, -0.0030073892f},
+        {-0.0024422213f, -0.0154195785f},
+        {-0.0865839766f,  0.0358642574f},
+        {-0.0931269400f, -0.1281782366f},
+        {-0.0151219560f,  0.0177055357f},
+        {-0.4322856848f, -0.2202605579f},
+        { 0.2271534544f, -0.9461622311f},
+        { 1.1315107346f,  0.0000000000f},
+        { 0.1951882703f,  0.8130176572f},
+        {-0.2814227020f,  0.1433920287f},
+        { 0.0456384527f,  0.0534357625f},
+        {-0.0915532675f,  0.1260122621f},
+        {-0.0496283453f, -0.0205567337f},
+        {-0.0053034780f,  0.0334848426f},
+        {-0.0284438432f,  0.0022385790f},
+        { 0.0031203471f,  0.0096034410f},
+        {-0.0126324404f,  0.0077411695f},
+        { 0.0049236074f,  0.0049236074f},
+        {-0.0075523775f,  0.0123243601f},
+        {-0.0009364015f, -0.0003042553f},
+        {-0.0006591153f,  0.0083748546f},
+    },
+    {
+        {-0.0006595075f, -0.0083798376f},   /* Filter 128 */
+        {-0.0060018709f,  0.0019501261f},
+        {-0.0078384593f, -0.0127912031f},
+        {-0.0002405024f,  0.0002405024f},
+        {-0.0153702092f, -0.0094188763f},
+        {-0.0002472237f,  0.0007608763f},
+        {-0.0383261448f, -0.0030163330f},
+        {-0.0023826510f, -0.0150434667f},
+        {-0.0871701152f,  0.0361070439f},
+        {-0.0930374350f, -0.1280550435f},
+        {-0.0162701151f,  0.0190498573f},
+        {-0.4347758718f, -0.2215293715f},
+        { 0.2276093606f, -0.9480612172f},
+        { 1.1311104298f,  0.0000000000f},
+        { 0.1946198242f,  0.8106499087f},
+        {-0.2790727736f,  0.1421946804f},
+        { 0.0464471361f,  0.0543826092f},
+        {-0.0914229645f,  0.1258329156f},
+        {-0.0490373538f, -0.0203119370f},
+        {-0.0053360458f,  0.0336904673f},
+        {-0.0282504300f,  0.0022233571f},
+        { 0.0031642807f,  0.0097386546f},
+        {-0.0125647663f,  0.0076996987f},
+        { 0.0049974388f,  0.0049974388f},
+        {-0.0075365733f,  0.0122985698f},
+        {-0.0008578611f, -0.0002787360f},
+        {-0.0006595075f,  0.0083798376f},
+    },
+    {
+        {-0.0006597461f, -0.0083828690f},   /* Filter 129 */
+        {-0.0060812359f,  0.0019759133f},
+        {-0.0078299450f, -0.0127773090f},
+        {-0.0003283865f,  0.0003283865f},
+        {-0.0153837007f, -0.0094271439f},
+        {-0.0003095677f,  0.0009527514f},
+        {-0.0384327125f, -0.0030247201f},
+        {-0.0023213476f, -0.0146564122f},
+        {-0.0877524885f,  0.0363482709f},
+        {-0.0929311572f, -0.1279087646f},
+        {-0.0174399616f,  0.0204195715f},
+        {-0.4372694311f, -0.2227999035f},
+        { 0.2280563338f, -0.9499229944f},
+        { 1.1306571960f,  0.0000000000f},
+        { 0.1940454227f,  0.8082573542f},
+        {-0.2767378482f,  0.1410049765f},
+        { 0.0472327242f,  0.0553024146f},
+        {-0.0912802944f,  0.1256365469f},
+        {-0.0484492156f, -0.0200683222f},
+        {-0.0053668093f,  0.0338847005f},
+        {-0.0280534999f,  0.0022078583f},
+        { 0.0032068035f,  0.0098695263f},
+        {-0.0124943812f,  0.0076565666f},
+        { 0.0050698592f,  0.0050698592f},
+        {-0.0075194036f,  0.0122705514f},
+        {-0.0007799340f, -0.0002534159f},
+        {-0.0006597461f,  0.0083828690f},
+    },
+    {
+        {-0.0006599847f, -0.0083859004f},   /* Filter 130 */
+        {-0.0061606009f,  0.0020017006f},
+        {-0.0078214307f, -0.0127634149f},
+        {-0.0004162707f,  0.0004162707f},
+        {-0.0153971922f, -0.0094354115f},
+        {-0.0003719117f,  0.0011446265f},
+        {-0.0385392839f, -0.0030331074f},
+        {-0.0022600442f, -0.0142693578f},
+        {-0.0883348550f,  0.0365894950f},
+        {-0.0928248793f, -0.1277624857f},
+        {-0.0186098068f,  0.0217892842f},
+        {-0.4397629639f, -0.2240704219f},
+        { 0.2285032930f, -0.9517847137f},
+        { 1.1302039623f,  0.0000000000f},
+        { 0.1934710212f,  0.8058647998f},
+        {-0.2744029228f,  0.1398152726f},
+        { 0.0480183122f,  0.0562222200f},
+        {-0.0911376329f,  0.1254401903f},
+        {-0.0478610739f, -0.0198247059f},
+        {-0.0053975722f,  0.0340789300f},
+        {-0.0278565697f,  0.0021923596f},
+        { 0.0032493266f,  0.0100003989f},
+        {-0.0124239968f,  0.0076134350f},
+        { 0.0051422800f,  0.0051422800f},
+        {-0.0075022343f,  0.0122425338f},
+        {-0.0007020068f, -0.0002280958f},
+        {-0.0006599847f,  0.0083859004f},
+    },
+    {
+        {-0.0006602232f, -0.0083889308f},   /* Filter 131 */
+        {-0.0062399654f,  0.0020274877f},
+        {-0.0078129159f, -0.0127495200f},
+        {-0.0005041548f,  0.0005041548f},
+        {-0.0154106837f, -0.0094436791f},
+        {-0.0004342557f,  0.0013365016f},
+        {-0.0386458516f, -0.0030414945f},
+        {-0.0021987408f, -0.0138823033f},
+        {-0.0889172284f,  0.0368307219f},
+        {-0.0927186015f, -0.1276162068f},
+        {-0.0197796533f,  0.0231589985f},
+        {-0.4422564967f, -0.2253409403f},
+        { 0.2289502662f, -0.9536464910f},
+        { 1.1297507286f,  0.0000000000f},
+        { 0.1928966197f,  0.8034722454f},
+        {-0.2720679974f,  0.1386255687f},
+        { 0.0488039002f,  0.0571420254f},
+        {-0.0909949628f,  0.1252438216f},
+        {-0.0472729357f, -0.0195810911f},
+        {-0.0054283352f,  0.0342731595f},
+        {-0.0276596414f,  0.0021768610f},
+        { 0.0032918496f,  0.0101312715f},
+        {-0.0123536117f,  0.0075703030f},
+        { 0.0052147005f,  0.0052147005f},
+        {-0.0074850646f,  0.0122145153f},
+        {-0.0006240797f, -0.0002027758f},
+        {-0.0006602232f,  0.0083889308f},
+    },
+    {
+        {-0.0006604618f, -0.0083919631f},   /* Filter 132 */
+        {-0.0063193304f,  0.0020532749f},
+        {-0.0078044016f, -0.0127356260f},
+        {-0.0005920390f,  0.0005920390f},
+        {-0.0154241751f, -0.0094519467f},
+        {-0.0004965997f,  0.0015283766f},
+        {-0.0387524230f, -0.0030498818f},
+        {-0.0021374374f, -0.0134952489f},
+        {-0.0894995948f,  0.0370719460f},
+        {-0.0926123236f, -0.1274699279f},
+        {-0.0209494985f,  0.0245287112f},
+        {-0.4447500295f, -0.2266114587f},
+        { 0.2293972394f, -0.9555082682f},
+        { 1.1292974949f,  0.0000000000f},
+        { 0.1923222182f,  0.8010796909f},
+        {-0.2697330721f,  0.1374358648f},
+        { 0.0495894882f,  0.0580618308f},
+        {-0.0908522926f,  0.1250474530f},
+        {-0.0466847940f, -0.0193374748f},
+        {-0.0054590981f,  0.0344673891f},
+        {-0.0274627113f,  0.0021613623f},
+        { 0.0033343727f,  0.0102621440f},
+        {-0.0122832265f,  0.0075271709f},
+        { 0.0052871210f,  0.0052871210f},
+        {-0.0074678949f,  0.0121864969f},
+        {-0.0005461525f, -0.0001774557f},
+        {-0.0006604618f,  0.0083919631f},
+    },
+    {
+        {-0.0006605480f, -0.0083930587f},   /* Filter 133 */
+        {-0.0063981555f,  0.0020788868f},
+        {-0.0077942742f, -0.0127190995f},
+        {-0.0006801991f,  0.0006801991f},
+        {-0.0154337184f, -0.0094577948f},
+        {-0.0005597622f,  0.0017227710f},
+        {-0.0388517116f, -0.0030576960f},
+        {-0.0020744172f, -0.0130973549f},
+        {-0.0900777280f,  0.0373114166f},
+        {-0.0924890451f, -0.1273002496f},
+        {-0.0221408533f,  0.0259236084f},
+        {-0.4472461115f, -0.2278832760f},
+        { 0.2298350986f, -0.9573320831f},
+        { 1.1287915707f,  0.0000000000f},
+        { 0.1917420700f,  0.7986631999f},
+        {-0.2674137870f,  0.1362541301f},
+        { 0.0503519808f,  0.0589545949f},
+        {-0.0906975704f,  0.1248344962f},
+        {-0.0460998635f, -0.0190951887f},
+        {-0.0054880621f,  0.0346502602f},
+        {-0.0272624925f,  0.0021456047f},
+        { 0.0033754634f,  0.0103886083f},
+        {-0.0122102217f,  0.0074824335f},
+        { 0.0053580775f,  0.0053580775f},
+        {-0.0074493851f,  0.0121562916f},
+        {-0.0004688998f, -0.0001523548f},
+        {-0.0006605480f,  0.0083930587f},
+    },
+    {
+        {-0.0006606343f, -0.0083941543f},   /* Filter 134 */
+        {-0.0064769802f,  0.0021044984f},
+        {-0.0077841473f, -0.0127025739f},
+        {-0.0007683593f,  0.0007683593f},
+        {-0.0154432601f, -0.0094636420f},
+        {-0.0006229248f,  0.0019171654f},
+        {-0.0389510002f, -0.0030655102f},
+        {-0.0020113970f, -0.0126994609f},
+        {-0.0906558680f,  0.0375508900f},
+        {-0.0923657667f, -0.1271305714f},
+        {-0.0233322056f,  0.0273185028f},
+        {-0.4497421935f, -0.2291550933f},
+        { 0.2302729439f, -0.9591558401f},
+        { 1.1282856464f,  0.0000000000f},
+        { 0.1911619218f,  0.7962467089f},
+        {-0.2650945286f,  0.1350724088f},
+        { 0.0511144782f,  0.0598473647f},
+        {-0.0905428395f,  0.1246215274f},
+        {-0.0455149364f, -0.0188529039f},
+        {-0.0055170266f,  0.0348331350f},
+        {-0.0270622738f,  0.0021298471f},
+        { 0.0034165539f,  0.0105150716f},
+        {-0.0121372169f,  0.0074376961f},
+        { 0.0054290337f,  0.0054290337f},
+        {-0.0074308747f,  0.0121260855f},
+        {-0.0003916471f, -0.0001272538f},
+        {-0.0006606343f,  0.0083941543f},
+    },
+    {
+        {-0.0006607205f, -0.0083952499f},   /* Filter 135 */
+        {-0.0065558054f,  0.0021301103f},
+        {-0.0077740198f, -0.0126860474f},
+        {-0.0008565195f,  0.0008565195f},
+        {-0.0154528018f, -0.0094694891f},
+        {-0.0006860873f,  0.0021115595f},
+        {-0.0390502888f, -0.0030733244f},
+        {-0.0019483768f, -0.0123015668f},
+        {-0.0912340081f,  0.0377903635f},
+        {-0.0922424882f, -0.1269608931f},
+        {-0.0245235579f,  0.0287133972f},
+        {-0.4522382755f, -0.2304269106f},
+        { 0.2307108031f, -0.9609796550f},
+        { 1.1277797222f,  0.0000000000f},
+        { 0.1905817737f,  0.7938302179f},
+        {-0.2627752435f,  0.1338906741f},
+        { 0.0518769757f,  0.0607401345f},
+        {-0.0903881087f,  0.1244085586f},
+        {-0.0449300058f, -0.0186106178f},
+        {-0.0055459905f,  0.0350160062f},
+        {-0.0268620551f,  0.0021140896f},
+        { 0.0034576446f,  0.0106415359f},
+        {-0.0120642113f,  0.0073929582f},
+        { 0.0054999899f,  0.0054999899f},
+        {-0.0074123644f,  0.0120958793f},
+        {-0.0003143943f, -0.0001021529f},
+        {-0.0006607205f,  0.0083952499f},
+    },
+    {
+        {-0.0006608067f, -0.0083963454f},   /* Filter 136 */
+        {-0.0066346301f,  0.0021557220f},
+        {-0.0077638924f, -0.0126695209f},
+        {-0.0009446795f,  0.0009446795f},
+        {-0.0154623435f, -0.0094753363f},
+        {-0.0007492498f,  0.0023059538f},
+        {-0.0391495774f, -0.0030811386f},
+        {-0.0018853566f, -0.0119036728f},
+        {-0.0918121412f,  0.0380298341f},
+        {-0.0921192010f, -0.1267912028f},
+        {-0.0257149127f,  0.0301082944f},
+        {-0.4547343575f, -0.2316987279f},
+        { 0.2311486623f, -0.9628034699f},
+        { 1.1272736788f,  0.0000000000f},
+        { 0.1900016255f,  0.7914137269f},
+        {-0.2604559850f,  0.1327089529f},
+        { 0.0526394683f,  0.0616328986f},
+        {-0.0902333778f,  0.1241955898f},
+        {-0.0443450753f, -0.0183683316f},
+        {-0.0055749551f,  0.0351988810f},
+        {-0.0266618363f,  0.0020983320f},
+        { 0.0034987353f,  0.0107680001f},
+        {-0.0119912065f,  0.0073482208f},
+        { 0.0055709461f,  0.0055709461f},
+        {-0.0073938545f,  0.0120656740f},
+        {-0.0002371416f, -0.0000770520f},
+        {-0.0006608067f,  0.0083963454f},
+    },
+    {
+        {-0.0006607419f, -0.0083955219f},   /* Filter 137 */
+        {-0.0067128436f,  0.0021811351f},
+        {-0.0077521489f, -0.0126503573f},
+        {-0.0010330379f,  0.0010330379f},
+        {-0.0154678846f, -0.0094787319f},
+        {-0.0008131837f,  0.0025027222f},
+        {-0.0392413790f, -0.0030883635f},
+        {-0.0018206374f, -0.0114950523f},
+        {-0.0923855798f,  0.0382673601f},
+        {-0.0919786855f, -0.1265977998f},
+        {-0.0269275822f,  0.0315281480f},
+        {-0.4572321920f, -0.2329714382f},
+        { 0.2315772545f, -0.9645886849f},
+        { 1.1267151833f,  0.0000000000f},
+        { 0.1894159394f,  0.7889741687f},
+        {-0.2581530042f,  0.1315355255f},
+        { 0.0533788848f,  0.0624986441f},
+        {-0.0900668927f,  0.1239664428f},
+        {-0.0437637035f, -0.0181275195f},
+        {-0.0056021287f,  0.0353704489f},
+        {-0.0264585556f,  0.0020823335f},
+        { 0.0035383736f,  0.0108899940f},
+        {-0.0119156725f,  0.0073019335f},
+        { 0.0056403870f,  0.0056403870f},
+        {-0.0073740294f,  0.0120333223f},
+        {-0.0001606233f, -0.0000521897f},
+        {-0.0006607419f,  0.0083955219f},
+    },
+    {
+        {-0.0006606771f, -0.0083946984f},   /* Filter 138 */
+        {-0.0067910571f,  0.0022065482f},
+        {-0.0077404060f, -0.0126311945f},
+        {-0.0011213965f,  0.0011213965f},
+        {-0.0154734257f, -0.0094821275f},
+        {-0.0008771176f,  0.0026994905f},
+        {-0.0393331843f, -0.0030955888f},
+        {-0.0017559182f, -0.0110864309f},
+        {-0.0929590254f,  0.0385048890f},
+        {-0.0918381699f, -0.1264043967f},
+        {-0.0281402517f,  0.0329480015f},
+        {-0.4597300266f, -0.2342441485f},
+        { 0.2320058328f, -0.9663738420f},
+        { 1.1261566877f,  0.0000000000f},
+        { 0.1888302394f,  0.7865345526f},
+        {-0.2558500499f,  0.1303621117f},
+        { 0.0541183013f,  0.0633643896f},
+        {-0.0899004077f,  0.1237372958f},
+        {-0.0431823351f, -0.0178867089f},
+        {-0.0056293024f,  0.0355420169f},
+        {-0.0262552748f,  0.0020663349f},
+        { 0.0035780115f,  0.0110119870f},
+        {-0.0118401393f,  0.0072556467f},
+        { 0.0057098272f,  0.0057098272f},
+        {-0.0073542042f,  0.0120009705f},
+        {-0.0000841051f, -0.0000273274f},
+        {-0.0006606771f,  0.0083946984f},
+    },
+    {
+        {-0.0006606123f, -0.0083938758f},   /* Filter 139 */
+        {-0.0068692707f,  0.0022319613f},
+        {-0.0077286625f, -0.0126120309f},
+        {-0.0012097549f,  0.0012097549f},
+        {-0.0154789669f, -0.0094855231f},
+        {-0.0009410515f,  0.0028962589f},
+        {-0.0394249859f, -0.0031028137f},
+        {-0.0016911990f, -0.0106778105f},
+        {-0.0935324640f,  0.0387424151f},
+        {-0.0916976544f, -0.1262109936f},
+        {-0.0293529237f,  0.0343678579f},
+        {-0.4622278611f, -0.2355168587f},
+        { 0.2324344250f, -0.9681590570f},
+        { 1.1255981922f,  0.0000000000f},
+        { 0.1882445533f,  0.7840949944f},
+        {-0.2535470691f,  0.1291886844f},
+        { 0.0548577178f,  0.0642301351f},
+        {-0.0897339314f,  0.1235081609f},
+        {-0.0426009668f, -0.0176458982f},
+        {-0.0056564756f,  0.0357135811f},
+        {-0.0260519940f,  0.0020503364f},
+        { 0.0036176494f,  0.0111339801f},
+        {-0.0117646054f,  0.0072093594f},
+        { 0.0057792674f,  0.0057792674f},
+        {-0.0073343790f,  0.0119686188f},
+        {-0.0000075868f, -0.0000024651f},
+        {-0.0006606123f,  0.0083938758f},
+    },
+    {
+        {-0.0006605475f, -0.0083930522f},   /* Filter 140 */
+        {-0.0069474842f,  0.0022573745f},
+        {-0.0077169190f, -0.0125928673f},
+        {-0.0012981134f,  0.0012981134f},
+        {-0.0154845096f, -0.0094889197f},
+        {-0.0010049855f,  0.0030930272f},
+        {-0.0395167875f, -0.0031100386f},
+        {-0.0016264799f, -0.0102691900f},
+        {-0.0941059027f,  0.0389799412f},
+        {-0.0915571388f, -0.1260175906f},
+        {-0.0305655932f,  0.0357877115f},
+        {-0.4647256957f, -0.2367895690f},
+        { 0.2328630033f, -0.9699442141f},
+        { 1.1250396967f,  0.0000000000f},
+        { 0.1876588672f,  0.7816554362f},
+        {-0.2512441148f,  0.1280152706f},
+        { 0.0555971295f,  0.0650958750f},
+        {-0.0895674464f,  0.1232790139f},
+        {-0.0420195949f, -0.0174050861f},
+        {-0.0056836492f,  0.0358851491f},
+        {-0.0258487132f,  0.0020343379f},
+        { 0.0036572877f,  0.0112559740f},
+        {-0.0116890714f,  0.0071630722f},
+        { 0.0058487083f,  0.0058487083f},
+        {-0.0073145539f,  0.0119362671f},
+        { 0.0000689315f,  0.0000223972f},
+        {-0.0006605475f,  0.0083930522f},
+    },
+    {
+        {-0.0006603332f, -0.0083903291f},   /* Filter 141 */
+        {-0.0070250148f,  0.0022825657f},
+        {-0.0077035580f, -0.0125710642f},
+        {-0.0013865916f,  0.0013865916f},
+        {-0.0154860024f, -0.0094898345f},
+        {-0.0010696423f,  0.0032920205f},
+        {-0.0396009015f, -0.0031166585f},
+        {-0.0015600811f, -0.0098499645f},
+        {-0.0946741787f,  0.0392153288f},
+        {-0.0913991672f, -0.1258001613f},
+        {-0.0317993815f,  0.0372322920f},
+        {-0.4672244862f, -0.2380627664f},
+        { 0.2332821616f, -0.9716901338f},
+        { 1.1244288683f,  0.0000000000f},
+        { 0.1870678379f,  0.7791936222f},
+        {-0.2489580755f,  0.1268504753f},
+        { 0.0563134893f,  0.0659346245f},
+        {-0.0893895137f,  0.1230341106f},
+        {-0.0414421295f, -0.0171658921f},
+        {-0.0057090414f,  0.0360454690f},
+        {-0.0256425970f,  0.0020181162f},
+        { 0.0036954541f,  0.0113734382f},
+        {-0.0116111028f,  0.0071152929f},
+        { 0.0059165832f,  0.0059165832f},
+        {-0.0072934406f,  0.0119018134f},
+        { 0.0001446564f,  0.0000470017f},
+        {-0.0006603332f,  0.0083903291f},
+    },
+    {
+        {-0.0006601188f, -0.0083876050f},   /* Filter 142 */
+        {-0.0071025455f,  0.0023077569f},
+        {-0.0076901970f, -0.0125492610f},
+        {-0.0014750697f,  0.0014750697f},
+        {-0.0154874953f, -0.0094907493f},
+        {-0.0011342992f,  0.0034910138f},
+        {-0.0396850155f, -0.0031232785f},
+        {-0.0014936823f, -0.0094307390f},
+        {-0.0952424548f,  0.0394507165f},
+        {-0.0912411868f, -0.1255827200f},
+        {-0.0330331698f,  0.0386768725f},
+        {-0.4697232236f, -0.2393359367f},
+        { 0.2337013059f, -0.9734359955f},
+        { 1.1238179207f,  0.0000000000f},
+        { 0.1864768087f,  0.7767318083f},
+        {-0.2466720627f,  0.1256856936f},
+        { 0.0570298443f,  0.0667733684f},
+        {-0.0892115811f,  0.1227892073f},
+        {-0.0408646640f, -0.0169266981f},
+        {-0.0057344330f,  0.0362057853f},
+        {-0.0254364807f,  0.0020018945f},
+        { 0.0037336208f,  0.0114909033f},
+        {-0.0115331333f,  0.0070675132f},
+        { 0.0059844580f,  0.0059844580f},
+        {-0.0072723269f,  0.0118673589f},
+        { 0.0002203812f,  0.0000716062f},
+        {-0.0006601188f,  0.0083876050f},
+    },
+    {
+        {-0.0006599045f, -0.0083848818f},   /* Filter 143 */
+        {-0.0071800761f,  0.0023329481f},
+        {-0.0076768361f, -0.0125274579f},
+        {-0.0015635480f,  0.0015635480f},
+        {-0.0154889898f, -0.0094916651f},
+        {-0.0011989560f,  0.0036900071f},
+        {-0.0397691295f, -0.0031298984f},
+        {-0.0014272835f, -0.0090115135f},
+        {-0.0958107240f,  0.0396861013f},
+        {-0.0910832065f, -0.1253652787f},
+        {-0.0342669557f,  0.0401214502f},
+        {-0.4722220141f, -0.2406091340f},
+        { 0.2341204641f, -0.9751819152f},
+        { 1.1232070923f,  0.0000000000f},
+        { 0.1858857934f,  0.7742700522f},
+        {-0.2443860233f,  0.1245208984f},
+        { 0.0577462041f,  0.0676121180f},
+        {-0.0890336484f,  0.1225443041f},
+        {-0.0402871986f, -0.0166875040f},
+        {-0.0057598252f,  0.0363661052f},
+        {-0.0252303626f,  0.0019856726f},
+        { 0.0037717876f,  0.0116083685f},
+        {-0.0114551639f,  0.0070197335f},
+        { 0.0060523329f,  0.0060523329f},
+        {-0.0072512136f,  0.0118329052f},
+        { 0.0002961061f,  0.0000962107f},
+        {-0.0006599045f,  0.0083848818f},
+    },
+    {
+        {-0.0006596901f, -0.0083821578f},   /* Filter 144 */
+        {-0.0072576067f,  0.0023581394f},
+        {-0.0076634751f, -0.0125056548f},
+        {-0.0016520262f,  0.0016520262f},
+        {-0.0154904827f, -0.0094925800f},
+        {-0.0012636128f,  0.0038890005f},
+        {-0.0398532435f, -0.0031365183f},
+        {-0.0013608847f, -0.0085922880f},
+        {-0.0963790001f,  0.0399214889f},
+        {-0.0909252349f, -0.1251478494f},
+        {-0.0355007440f,  0.0415660307f},
+        {-0.4747208046f, -0.2418823314f},
+        { 0.2345396223f, -0.9769278348f},
+        { 1.1225962639f,  0.0000000000f},
+        { 0.1852947641f,  0.7718082383f},
+        {-0.2420999840f,  0.1233561032f},
+        { 0.0584625591f,  0.0684508619f},
+        {-0.0888557158f,  0.1222994008f},
+        {-0.0397097331f, -0.0164483100f},
+        {-0.0057852168f,  0.0365264215f},
+        {-0.0250242464f,  0.0019694509f},
+        { 0.0038099540f,  0.0117258327f},
+        {-0.0113771945f,  0.0069719537f},
+        { 0.0061202078f,  0.0061202077f},
+        {-0.0072301004f,  0.0117984516f},
+        { 0.0003718309f,  0.0001208152f},
+        {-0.0006596901f,  0.0083821578f},
+    },
+    {
+        {-0.0006593278f, -0.0083775545f},   /* Filter 145 */
+        {-0.0073343827f,  0.0023830854f},
+        {-0.0076484961f, -0.0124812113f},
+        {-0.0017405448f,  0.0017405448f},
+        {-0.0154878828f, -0.0094909868f},
+        {-0.0013289429f,  0.0040900657f},
+        {-0.0399294694f, -0.0031425174f},
+        {-0.0012928271f, -0.0081625890f},
+        {-0.0969416386f,  0.0401545414f},
+        {-0.0907495707f, -0.1249060685f},
+        {-0.0367554358f,  0.0430350860f},
+        {-0.4772197544f, -0.2431556099f},
+        { 0.2349492074f, -0.9786338796f},
+        { 1.1219333410f,  0.0000000000f},
+        { 0.1846986144f,  0.7693250958f},
+        {-0.2398315234f,  0.1222002648f},
+        { 0.0591558912f,  0.0692626495f},
+        {-0.0886666509f,  0.1220391752f},
+        {-0.0391365079f, -0.0162108723f},
+        {-0.0058088374f,  0.0366755560f},
+        {-0.0248155174f,  0.0019530236f},
+        { 0.0038466317f,  0.0118387150f},
+        {-0.0112968841f,  0.0069227395f},
+        { 0.0061864692f,  0.0061864692f},
+        {-0.0072077259f,  0.0117619396f},
+        { 0.0004467046f,  0.0001451431f},
+        {-0.0006593278f,  0.0083775545f},
+    },
+    {
+        {-0.0006589655f, -0.0083729503f},   /* Filter 146 */
+        {-0.0074111591f,  0.0024080316f},
+        {-0.0076335167f, -0.0124567670f},
+        {-0.0018290634f,  0.0018290634f},
+        {-0.0154852846f, -0.0094893946f},
+        {-0.0013942730f,  0.0042911310f},
+        {-0.0400056952f, -0.0031485165f},
+        {-0.0012247695f, -0.0077328901f},
+        {-0.0975042702f,  0.0403875911f},
+        {-0.0905739154f, -0.1246642996f},
+        {-0.0380101300f,  0.0445041442f},
+        {-0.4797186511f, -0.2444288614f},
+        { 0.2353587647f, -0.9803398084f},
+        { 1.1212704182f,  0.0000000000f},
+        { 0.1841024646f,  0.7668419534f},
+        {-0.2375630363f,  0.1210444129f},
+        { 0.0598492233f,  0.0700744371f},
+        {-0.0884775859f,  0.1217789497f},
+        {-0.0385632792f, -0.0159734332f},
+        {-0.0058324580f,  0.0368246905f},
+        {-0.0246067885f,  0.0019365963f},
+        { 0.0038833097f,  0.0119515982f},
+        {-0.0112165737f,  0.0068735252f},
+        { 0.0062527300f,  0.0062527300f},
+        {-0.0071853518f,  0.0117254285f},
+        { 0.0005215783f,  0.0001694711f},
+        {-0.0006589655f,  0.0083729503f},
+    },
+    {
+        {-0.0006586031f, -0.0083683461f},   /* Filter 147 */
+        {-0.0074879351f,  0.0024329776f},
+        {-0.0076185377f, -0.0124323236f},
+        {-0.0019175820f,  0.0019175820f},
+        {-0.0154826848f, -0.0094878014f},
+        {-0.0014596031f,  0.0044921963f},
+        {-0.0400819211f, -0.0031545156f},
+        {-0.0011567119f, -0.0073031915f},
+        {-0.0980669088f,  0.0406206436f},
+        {-0.0903982600f, -0.1244225307f},
+        {-0.0392648217f,  0.0459731995f},
+        {-0.4822176009f, -0.2457021399f},
+        { 0.2357683498f, -0.9820458531f},
+        { 1.1206073761f,  0.0000000000f},
+        { 0.1835063149f,  0.7643588110f},
+        {-0.2352945758f,  0.1198885745f},
+        { 0.0605425555f,  0.0708862248f},
+        {-0.0882885123f,  0.1215187121f},
+        {-0.0379900539f, -0.0157359955f},
+        {-0.0058560780f,  0.0369738213f},
+        {-0.0243980596f,  0.0019201689f},
+        { 0.0039199873f,  0.0120644805f},
+        {-0.0111362633f,  0.0068243110f},
+        { 0.0063189914f,  0.0063189914f},
+        {-0.0071629778f,  0.0116889173f},
+        { 0.0005964521f,  0.0001937990f},
+        {-0.0006586031f,  0.0083683461f},
+    },
+    {
+        {-0.0006582408f, -0.0083637419f},   /* Filter 148 */
+        {-0.0075647111f,  0.0024579236f},
+        {-0.0076035587f, -0.0124078801f},
+        {-0.0020061004f,  0.0020061004f},
+        {-0.0154800849f, -0.0094862083f},
+        {-0.0015249331f,  0.0046932616f},
+        {-0.0401581470f, -0.0031605147f},
+        {-0.0010886543f, -0.0068734926f},
+        {-0.0986295404f,  0.0408536933f},
+        {-0.0902225958f, -0.1241807498f},
+        {-0.0405195159f,  0.0474422576f},
+        {-0.4847164976f, -0.2469753914f},
+        { 0.2361779071f, -0.9837517819f},
+        { 1.1199444532f,  0.0000000000f},
+        { 0.1829101651f,  0.7618756686f},
+        {-0.2330260887f,  0.1187327226f},
+        { 0.0612358876f,  0.0716980124f},
+        {-0.0880994473f,  0.1212584865f},
+        {-0.0374168286f, -0.0154985579f},
+        {-0.0058796986f,  0.0371229558f},
+        {-0.0241893307f,  0.0019037416f},
+        { 0.0039566650f,  0.0121773628f},
+        {-0.0110559522f,  0.0067750962f},
+        { 0.0063852528f,  0.0063852528f},
+        {-0.0071406037f,  0.0116524062f},
+        { 0.0006713257f,  0.0002181269f},
+        {-0.0006582408f,  0.0083637419f},
+    },
+    {
+        {-0.0006577322f, -0.0083572799f},   /* Filter 149 */
+        {-0.0076406624f,  0.0024826017f},
+        {-0.0075869627f, -0.0123807979f},
+        {-0.0020945793f,  0.0020945793f},
+        {-0.0154733511f, -0.0094820818f},
+        {-0.0015908856f,  0.0048962423f},
+        {-0.0402262842f, -0.0031658772f},
+        {-0.0010189602f, -0.0064334613f},
+        {-0.0991860664f,  0.0410842139f},
+        {-0.0900290465f, -0.1239143519f},
+        {-0.0417948910f,  0.0489355300f},
+        {-0.4872147571f, -0.2482483181f},
+        { 0.2365777521f, -0.9854172562f},
+        { 1.1192296743f,  0.0000000000f},
+        { 0.1823091036f,  0.7593720670f},
+        {-0.2307757911f,  0.1175861387f},
+        { 0.0619062356f,  0.0724828890f},
+        {-0.0878995479f,  0.1209833486f},
+        {-0.0368481705f, -0.0152630120f},
+        {-0.0059015592f,  0.0372609784f},
+        {-0.0239782156f,  0.0018871265f},
+        { 0.0039918381f,  0.0122856144f},
+        {-0.0109733961f,  0.0067245058f},
+        { 0.0064498541f,  0.0064498541f},
+        {-0.0071169970f,  0.0116138836f},
+        { 0.0007452916f,  0.0002421599f},
+        {-0.0006577322f,  0.0083572799f},
+    },
+    {
+        {-0.0006572235f, -0.0083508170f},   /* Filter 150 */
+        {-0.0077166129f,  0.0025072795f},
+        {-0.0075703667f, -0.0123537157f},
+        {-0.0021830581f,  0.0021830581f},
+        {-0.0154666173f, -0.0094779553f},
+        {-0.0016568381f,  0.0050992234f},
+        {-0.0402944251f, -0.0031712400f},
+        {-0.0009492661f, -0.0059934300f},
+        {-0.0997425856f,  0.0413147317f},
+        {-0.0898354883f, -0.1236479420f},
+        {-0.0430702685f,  0.0504288052f},
+        {-0.4897130165f, -0.2495212449f},
+        { 0.2369775693f, -0.9870826146f},
+        { 1.1185147762f,  0.0000000000f},
+        { 0.1817080420f,  0.7568684655f},
+        {-0.2285254935f,  0.1164395548f},
+        { 0.0625765836f,  0.0732677657f},
+        {-0.0876996573f,  0.1207082227f},
+        {-0.0362795124f, -0.0150274661f},
+        {-0.0059234193f,  0.0373989973f},
+        {-0.0237670987f,  0.0018705112f},
+        { 0.0040270112f,  0.0123938661f},
+        {-0.0108908393f,  0.0066739149f},
+        { 0.0065144553f,  0.0065144553f},
+        {-0.0070933904f,  0.0115753611f},
+        { 0.0008192576f,  0.0002661929f},
+        {-0.0006572235f,  0.0083508170f},
+    },
+    {
+        {-0.0006567149f, -0.0083443540f},   /* Filter 151 */
+        {-0.0077925634f,  0.0025319573f},
+        {-0.0075537707f, -0.0123266335f},
+        {-0.0022715368f,  0.0022715368f},
+        {-0.0154598835f, -0.0094738288f},
+        {-0.0017227906f,  0.0053022041f},
+        {-0.0403625660f, -0.0031766029f},
+        {-0.0008795720f, -0.0055533987f},
+        {-0.1002991048f,  0.0415452495f},
+        {-0.0896419302f, -0.1233815321f},
+        {-0.0443456460f,  0.0519220803f},
+        {-0.4922112759f, -0.2507941716f},
+        { 0.2373774143f, -0.9887480889f},
+        { 1.1177999973f,  0.0000000000f},
+        { 0.1811069666f,  0.7543648061f},
+        {-0.2262751694f,  0.1152929574f},
+        { 0.0632469267f,  0.0740526367f},
+        {-0.0874997666f,  0.1204330968f},
+        {-0.0357108543f, -0.0147919202f},
+        {-0.0059452799f,  0.0375370199f},
+        {-0.0235559837f,  0.0018538961f},
+        { 0.0040621843f,  0.0125021177f},
+        {-0.0108082824f,  0.0066233240f},
+        { 0.0065790572f,  0.0065790572f},
+        {-0.0070697837f,  0.0115368385f},
+        { 0.0008932235f,  0.0002902259f},
+        {-0.0006567149f,  0.0083443540f},
+    },
+    {
+        {-0.0006562063f, -0.0083378920f},   /* Filter 152 */
+        {-0.0078685138f,  0.0025566351f},
+        {-0.0075371742f, -0.0122995505f},
+        {-0.0023600156f,  0.0023600156f},
+        {-0.0154531496f, -0.0094697023f},
+        {-0.0017887430f,  0.0055051848f},
+        {-0.0404307070f, -0.0031819657f},
+        {-0.0008098778f, -0.0051133675f},
+        {-0.1008556239f,  0.0417757672f},
+        {-0.0894483808f, -0.1231151342f},
+        {-0.0456210186f,  0.0534153499f},
+        {-0.4947095884f, -0.2520671255f},
+        { 0.2377772314f, -0.9904134473f},
+        { 1.1170852184f,  0.0000000000f},
+        { 0.1805059050f,  0.7518612045f},
+        {-0.2240248718f,  0.1141463735f},
+        { 0.0639172747f,  0.0748375133f},
+        {-0.0872998672f,  0.1201579589f},
+        {-0.0351421962f, -0.0145563743f},
+        {-0.0059671405f,  0.0376750426f},
+        {-0.0233448668f,  0.0018372809f},
+        { 0.0040973574f,  0.0126103694f},
+        {-0.0107257264f,  0.0065727336f},
+        { 0.0066436584f,  0.0066436584f},
+        {-0.0070461776f,  0.0114983168f},
+        { 0.0009671894f,  0.0003142589f},
+        {-0.0006562063f,  0.0083378920f},
+    },
+    {
+        {-0.0006555532f, -0.0083295935f},   /* Filter 153 */
+        {-0.0079435671f,  0.0025810214f},
+        {-0.0075189641f, -0.0122698343f},
+        {-0.0024483737f,  0.0024483736f},
+        {-0.0154422437f, -0.0094630191f},
+        {-0.0018552657f,  0.0057099206f},
+        {-0.0404905698f, -0.0031866770f},
+        {-0.0007385710f, -0.0046631539f},
+        {-0.1014055487f,  0.0420035536f},
+        {-0.0892367185f, -0.1228238060f},
+        {-0.0469168496f,  0.0549325730f},
+        {-0.4972063608f, -0.2533392945f},
+        { 0.2381671972f, -0.9920377716f},
+        { 1.1163188219f,  0.0000000000f},
+        { 0.1799001404f,  0.7493380133f},
+        {-0.2217933347f,  0.1130093486f},
+        { 0.0645646918f,  0.0755955413f},
+        {-0.0870894661f,  0.1198683666f},
+        {-0.0345784254f, -0.0143228528f},
+        {-0.0059872534f,  0.0378020306f},
+        {-0.0231315866f,  0.0018204954f},
+        { 0.0041310112f,  0.0127139452f},
+        {-0.0106410200f,  0.0065208254f},
+        { 0.0067065554f,  0.0067065554f},
+        {-0.0070213680f,  0.0114578312f},
+        { 0.0010401923f,  0.0003379790f},
+        {-0.0006555532f,  0.0083295935f},
+    },
+    {
+        {-0.0006549001f, -0.0083212950f},   /* Filter 154 */
+        {-0.0080186212f,  0.0026054079f},
+        {-0.0075007536f, -0.0122401174f},
+        {-0.0025367317f,  0.0025367317f},
+        {-0.0154313378f, -0.0094563359f},
+        {-0.0019217884f,  0.0059146564f},
+        {-0.0405504327f, -0.0031913883f},
+        {-0.0006672642f, -0.0042129402f},
+        {-0.1019554735f,  0.0422313399f},
+        {-0.0890250562f, -0.1225324778f},
+        {-0.0482126757f,  0.0564497904f},
+        {-0.4997031332f, -0.2546114636f},
+        { 0.2385571351f, -0.9936619800f},
+        { 1.1155524254f,  0.0000000000f},
+        { 0.1792943758f,  0.7468148221f},
+        {-0.2195617843f,  0.1118723169f},
+        { 0.0652121089f,  0.0763535694f},
+        {-0.0868790563f,  0.1195787623f},
+        {-0.0340146545f, -0.0140893312f},
+        {-0.0060073658f,  0.0379290149f},
+        {-0.0229183064f,  0.0018037098f},
+        { 0.0041646653f,  0.0128175219f},
+        {-0.0105563135f,  0.0064689173f},
+        { 0.0067694530f,  0.0067694529f},
+        {-0.0069965580f,  0.0114173449f},
+        { 0.0011131952f,  0.0003616991f},
+        {-0.0006549001f,  0.0083212950f},
+    },
+    {
+        {-0.0006542470f, -0.0083129965f},   /* Filter 155 */
+        {-0.0080936744f,  0.0026297942f},
+        {-0.0074825430f, -0.0122104004f},
+        {-0.0026250900f,  0.0026250900f},
+        {-0.0154204302f, -0.0094496518f},
+        {-0.0019883112f,  0.0061193927f},
+        {-0.0406102918f, -0.0031960993f},
+        {-0.0005959573f, -0.0037627266f},
+        {-0.1025054052f,  0.0424591290f},
+        {-0.0888133938f, -0.1222411496f},
+        {-0.0495085018f,  0.0579670079f},
+        {-0.5021999056f, -0.2558836327f},
+        { 0.2389470731f, -0.9952861883f},
+        { 1.1147860289f,  0.0000000000f},
+        { 0.1786885972f,  0.7442915729f},
+        {-0.2173302472f,  0.1107352919f},
+        { 0.0658595211f,  0.0771115917f},
+        {-0.0866686552f,  0.1192891701f},
+        {-0.0334508837f, -0.0138558097f},
+        {-0.0060274787f,  0.0380560029f},
+        {-0.0227050262f,  0.0017869243f},
+        { 0.0041983192f,  0.0129210977f},
+        {-0.0104716071f,  0.0064170091f},
+        { 0.0068323499f,  0.0068323499f},
+        {-0.0069717484f,  0.0113768594f},
+        { 0.0011861981f,  0.0003854191f},
+        {-0.0006542470f,  0.0083129965f},
+    },
+    {
+        {-0.0006535939f, -0.0083046980f},   /* Filter 156 */
+        {-0.0081687285f,  0.0026541808f},
+        {-0.0074643324f, -0.0121806834f},
+        {-0.0027134480f,  0.0027134480f},
+        {-0.0154095243f, -0.0094429686f},
+        {-0.0020548339f,  0.0063241285f},
+        {-0.0406701546f, -0.0032008106f},
+        {-0.0005246505f, -0.0033125128f},
+        {-0.1030553301f,  0.0426869154f},
+        {-0.0886017403f, -0.1219498335f},
+        {-0.0508043328f,  0.0594842310f},
+        {-0.5046967311f, -0.2571558288f},
+        { 0.2393370388f, -0.9969105126f},
+        { 1.1140196323f,  0.0000000000f},
+        { 0.1780828326f,  0.7417683816f},
+        {-0.2150987101f,  0.1095982669f},
+        { 0.0665069382f,  0.0778696197f},
+        {-0.0864582453f,  0.1189995658f},
+        {-0.0328871128f, -0.0136222881f},
+        {-0.0060475916f,  0.0381829910f},
+        {-0.0224917460f,  0.0017701388f},
+        { 0.0042319733f,  0.0130246745f},
+        {-0.0103869007f,  0.0063651009f},
+        { 0.0068952475f,  0.0068952475f},
+        {-0.0069469388f,  0.0113363739f},
+        { 0.0012592008f,  0.0004091391f},
+        {-0.0006535939f,  0.0083046980f},
+    },
+    {
+        {-0.0006527982f, -0.0082945881f},   /* Filter 157 */
+        {-0.0082428136f,  0.0026782525f},
+        {-0.0074445116f, -0.0121483388f},
+        {-0.0028016041f,  0.0028016041f},
+        {-0.0153944097f, -0.0094337064f},
+        {-0.0021218736f,  0.0065304555f},
+        {-0.0407215500f, -0.0032048555f},
+        {-0.0004517562f, -0.0028522762f},
+        {-0.1035981787f,  0.0429117706f},
+        {-0.0883717723f, -0.1216333097f},
+        {-0.0521203656f,  0.0610251074f},
+        {-0.5071912198f, -0.2584268343f},
+        { 0.2397169305f, -0.9984928755f},
+        { 1.1132018566f,  0.0000000000f},
+        { 0.1774725736f,  0.7392264700f},
+        {-0.2128865308f,  0.1084711053f},
+        { 0.0671314824f,  0.0786008671f},
+        {-0.0862376404f,  0.1186959292f},
+        {-0.0323285424f, -0.0133909207f},
+        {-0.0060659709f,  0.0382990327f},
+        {-0.0222765216f,  0.0017532003f},
+        { 0.0042640952f,  0.0131235355f},
+        {-0.0103001415f,  0.0063119349f},
+        { 0.0069563979f,  0.0069563979f},
+        {-0.0069209560f,  0.0112939738f},
+        { 0.0013311864f,  0.0004325287f},
+        {-0.0006527982f,  0.0082945881f},
+    },
+    {
+        {-0.0006520026f, -0.0082844791f},   /* Filter 158 */
+        {-0.0083168996f,  0.0027023245f},
+        {-0.0074246903f, -0.0121159935f},
+        {-0.0028897598f,  0.0028897598f},
+        {-0.0153792951f, -0.0094244442f},
+        {-0.0021889135f,  0.0067367830f},
+        {-0.0407729454f, -0.0032089004f},
+        {-0.0003788618f, -0.0023920396f},
+        {-0.1041410205f,  0.0431366231f},
+        {-0.0881418043f, -0.1213167859f},
+        {-0.0534364032f,  0.0625659895f},
+        {-0.5096857086f, -0.2596978398f},
+        { 0.2400968501f, -1.0000753543f},
+        { 1.1123842001f,  0.0000000000f},
+        { 0.1768623146f,  0.7366845584f},
+        {-0.2106743383f,  0.1073439370f},
+        { 0.0677560267f,  0.0793321144f},
+        {-0.0860170442f,  0.1183923046f},
+        {-0.0317699720f, -0.0131595533f},
+        {-0.0060843501f,  0.0384150744f},
+        {-0.0220612991f,  0.0017362619f},
+        { 0.0042962171f,  0.0132223965f},
+        {-0.0102133832f,  0.0062587693f},
+        { 0.0070175484f,  0.0070175484f},
+        {-0.0068949737f,  0.0112515745f},
+        { 0.0014031721f,  0.0004559183f},
+        {-0.0006520026f,  0.0082844791f},
+    },
+    {
+        {-0.0006512070f, -0.0082743692f},   /* Filter 159 */
+        {-0.0083909855f,  0.0027263965f},
+        {-0.0074048695f, -0.0120836489f},
+        {-0.0029779159f,  0.0029779159f},
+        {-0.0153641806f, -0.0094151820f},
+        {-0.0022559532f,  0.0069431100f},
+        {-0.0408243407f, -0.0032129453f},
+        {-0.0003059675f, -0.0019318029f},
+        {-0.1046838691f,  0.0433614783f},
+        {-0.0879118451f, -0.1210002742f},
+        {-0.0547524360f,  0.0641068659f},
+        {-0.5121801973f, -0.2609688453f},
+        { 0.2404767696f, -1.0016578330f},
+        { 1.1115665436f,  0.0000000000f},
+        { 0.1762520557f,  0.7341426468f},
+        {-0.2084621591f,  0.1062167754f},
+        { 0.0683805709f,  0.0800633618f},
+        {-0.0857964393f,  0.1180886679f},
+        {-0.0312114016f, -0.0129281858f},
+        {-0.0061027287f,  0.0385311125f},
+        {-0.0218460766f,  0.0017193235f},
+        { 0.0043283390f,  0.0133212575f},
+        {-0.0101266241f,  0.0062056032f},
+        { 0.0070786989f,  0.0070786989f},
+        {-0.0068689909f,  0.0112091745f},
+        { 0.0014751579f,  0.0004793079f},
+        {-0.0006512070f,  0.0082743692f},
+    },
+    {
+        {-0.0006504113f, -0.0082642593f},   /* Filter 160 */
+        {-0.0084650706f,  0.0027504682f},
+        {-0.0073850488f, -0.0120513043f},
+        {-0.0030660719f,  0.0030660719f},
+        {-0.0153490660f, -0.0094059197f},
+        {-0.0023229930f,  0.0071494375f},
+        {-0.0408757361f, -0.0032169902f},
+        {-0.0002330732f, -0.0014715665f},
+        {-0.1052267178f,  0.0435863336f},
+        {-0.0876818771f, -0.1206837505f},
+        {-0.0560684736f,  0.0656477480f},
+        {-0.5146746861f, -0.2622398508f},
+        { 0.2408566892f, -1.0032403118f},
+        { 1.1107488871f,  0.0000000000f},
+        { 0.1756417967f,  0.7316007352f},
+        {-0.2062499666f,  0.1050896070f},
+        { 0.0690051152f,  0.0807946091f},
+        {-0.0855758343f,  0.1177850312f},
+        {-0.0306528311f, -0.0126968184f},
+        {-0.0061211079f,  0.0386471542f},
+        {-0.0216308523f,  0.0017023850f},
+        { 0.0043604609f,  0.0134201186f},
+        {-0.0100398657f,  0.0061524376f},
+        { 0.0071398493f,  0.0071398493f},
+        {-0.0068430081f,  0.0111667744f},
+        { 0.0015471436f,  0.0005026974f},
+        {-0.0006504113f,  0.0082642593f},
+    },
+    {
+        {-0.0006494751f, -0.0082523639f},   /* Filter 161 */
+        {-0.0085381176f,  0.0027742026f},
+        {-0.0073636226f, -0.0120163400f},
+        {-0.0031539435f,  0.0031539435f},
+        {-0.0153297110f, -0.0093940590f},
+        {-0.0023904954f,  0.0073571883f},
+        {-0.0409184746f, -0.0032203538f},
+        {-0.0001586182f, -0.0010014759f},
+        {-0.1057620015f,  0.0438080554f},
+        {-0.0874334108f, -0.1203417659f},
+        {-0.0574044615f,  0.0672119888f},
+        {-0.5171660945f, -0.2635092868f},
+        { 0.2412264233f, -1.0047803655f},
+        { 1.1098802090f,  0.0000000000f},
+        { 0.1750272660f,  0.7290410306f},
+        {-0.2040577163f,  0.1039725996f},
+        { 0.0696068640f,  0.0814991665f},
+        {-0.0853453496f,  0.1174677962f},
+        {-0.0300997675f, -0.0124677319f},
+        {-0.0061377673f,  0.0387523380f},
+        {-0.0214139065f,  0.0016853110f},
+        { 0.0043910390f,  0.0135142285f},
+        {-0.0099511524f,  0.0060980740f},
+        { 0.0071992125f,  0.0071992125f},
+        {-0.0068158833f,  0.0111225106f},
+        { 0.0016180593f,  0.0005257393f},
+        {-0.0006494751f,  0.0082523639f},
+    },
+    {
+        {-0.0006485390f, -0.0082404695f},   /* Filter 162 */
+        {-0.0086111655f,  0.0027979373f},
+        {-0.0073421965f, -0.0119813757f},
+        {-0.0032418154f,  0.0032418154f},
+        {-0.0153103576f, -0.0093821992f},
+        {-0.0024579979f,  0.0075649396f},
+        {-0.0409612168f, -0.0032237177f},
+        {-0.0000841632f, -0.0005313853f},
+        {-0.1062972852f,  0.0440297772f},
+        {-0.0871849357f, -0.1199997693f},
+        {-0.0587404494f,  0.0687762296f},
+        {-0.5196575030f, -0.2647787229f},
+        { 0.2415961853f, -1.0063205351f},
+        { 1.1090114117f,  0.0000000000f},
+        { 0.1744127213f,  0.7264812680f},
+        {-0.2018654526f,  0.1028555855f},
+        { 0.0702086080f,  0.0822037181f},
+        {-0.0851148649f,  0.1171505612f},
+        {-0.0295467004f, -0.0122386440f},
+        {-0.0061544274f,  0.0388575254f},
+        {-0.0211969608f,  0.0016682370f},
+        { 0.0044216175f,  0.0136083393f},
+        {-0.0098624390f,  0.0060437104f},
+        { 0.0072585757f,  0.0072585757f},
+        {-0.0067887584f,  0.0110782468f},
+        { 0.0016889751f,  0.0005487813f},
+        {-0.0006485390f,  0.0082404695f},
+    },
+    {
+        {-0.0006476028f, -0.0082285742f},   /* Filter 163 */
+        {-0.0086842126f,  0.0028216717f},
+        {-0.0073207704f, -0.0119464115f},
+        {-0.0033296870f,  0.0033296870f},
+        {-0.0152910026f, -0.0093703385f},
+        {-0.0025255004f,  0.0077726909f},
+        {-0.0410039590f, -0.0032270816f},
+        {-0.0000097081f, -0.0000612947f},
+        {-0.1068325690f,  0.0442514990f},
+        {-0.0869364694f, -0.1196577848f},
+        {-0.0600764372f,  0.0703404704f},
+        {-0.5221488584f, -0.2660481318f},
+        { 0.2419659195f, -1.0078605888f},
+        { 1.1081427336f,  0.0000000000f},
+        { 0.1737981906f,  0.7239215633f},
+        {-0.1996732022f,  0.1017385781f},
+        { 0.0708103568f,  0.0829082755f},
+        {-0.0848843801f,  0.1168333262f},
+        {-0.0289936333f, -0.0120095561f},
+        {-0.0061710869f,  0.0389627091f},
+        {-0.0209800151f,  0.0016511630f},
+        { 0.0044521959f,  0.0137024501f},
+        {-0.0097737264f,  0.0059893473f},
+        { 0.0073179389f,  0.0073179389f},
+        {-0.0067616335f,  0.0110339831f},
+        { 0.0017598908f,  0.0005718232f},
+        {-0.0006476028f,  0.0082285742f},
+    },
+    {
+        {-0.0006466667f, -0.0082166789f},   /* Filter 164 */
+        {-0.0087572596f,  0.0028454061f},
+        {-0.0072993442f, -0.0119114472f},
+        {-0.0034175589f,  0.0034175589f},
+        {-0.0152716477f, -0.0093584777f},
+        {-0.0025930029f,  0.0079804422f},
+        {-0.0410467012f, -0.0032304455f},
+        { 0.0000647469f,  0.0004087959f},
+        {-0.1073678527f,  0.0444732207f},
+        {-0.0866880031f, -0.1193158002f},
+        {-0.0614124299f,  0.0719047169f},
+        {-0.5246402669f, -0.2673175678f},
+        { 0.2423356537f, -1.0094006425f},
+        { 1.1072740555f,  0.0000000000f},
+        { 0.1731836599f,  0.7213618587f},
+        {-0.1974809385f,  0.1006215640f},
+        { 0.0714121008f,  0.0836128272f},
+        {-0.0846538954f,  0.1165160911f},
+        {-0.0284405679f, -0.0117804689f},
+        {-0.0061877469f,  0.0390678966f},
+        {-0.0207630675f,  0.0016340889f},
+        { 0.0044827744f,  0.0137965609f},
+        {-0.0096850131f,  0.0059349836f},
+        { 0.0073773020f,  0.0073773020f},
+        {-0.0067345086f,  0.0109897193f},
+        { 0.0018308065f,  0.0005948651f},
+        {-0.0006466667f,  0.0082166789f},
+    },
+    {
+        {-0.0006455921f, -0.0082030260f},   /* Filter 165 */
+        {-0.0088291976f,  0.0028687802f},
+        {-0.0072763196f, -0.0118738744f},
+        {-0.0035050636f,  0.0035050636f},
+        {-0.0152480253f, -0.0093440019f},
+        {-0.0026609126f,  0.0081894468f},
+        {-0.0410806082f, -0.0032331140f},
+        { 0.0001407344f,  0.0008885622f},
+        {-0.1078950829f,  0.0446916066f},
+        {-0.0864208458f, -0.1189480897f},
+        {-0.0627681067f,  0.0734920105f},
+        {-0.5271277453f, -0.2685850014f},
+        { 0.2426950912f, -1.0108978075f},
+        { 1.1063547134f,  0.0000000000f},
+        { 0.1725650523f,  0.7187851725f},
+        {-0.1953091746f,  0.0995149950f},
+        { 0.0719911267f,  0.0842907795f},
+        {-0.0844138462f,  0.1161856917f},
+        {-0.0278933018f, -0.0115537839f},
+        {-0.0062027030f,  0.0391623253f},
+        {-0.0205446177f,  0.0016168965f},
+        { 0.0045117990f,  0.0138858896f},
+        {-0.0095944447f,  0.0058794833f},
+        { 0.0074348391f,  0.0074348391f},
+        {-0.0067062733f,  0.0109436434f},
+        { 0.0019006009f,  0.0006175427f},
+        {-0.0006455921f,  0.0082030260f},
+    },
+    {
+        {-0.0006445176f, -0.0081893731f},   /* Filter 166 */
+        {-0.0089011357f,  0.0028921543f},
+        {-0.0072532954f, -0.0118363023f},
+        {-0.0035925684f,  0.0035925684f},
+        {-0.0152244029f, -0.0093295261f},
+        {-0.0027288220f,  0.0083984506f},
+        {-0.0411145153f, -0.0032357825f},
+        { 0.0002167219f,  0.0013683284f},
+        {-0.1084223130f,  0.0449099925f},
+        {-0.0861536884f, -0.1185803792f},
+        {-0.0641237884f,  0.0750793098f},
+        {-0.5296151707f, -0.2698524080f},
+        { 0.2430545287f, -1.0123949724f},
+        { 1.1054353714f,  0.0000000000f},
+        { 0.1719464586f,  0.7162085442f},
+        {-0.1931374107f,  0.0984084260f},
+        { 0.0725701576f,  0.0849687375f},
+        {-0.0841737969f,  0.1158552923f},
+        {-0.0273460374f, -0.0113270996f},
+        {-0.0062176590f,  0.0392567541f},
+        {-0.0203261679f,  0.0015997041f},
+        { 0.0045408240f,  0.0139752192f},
+        {-0.0095038756f,  0.0058239824f},
+        { 0.0074923761f,  0.0074923761f},
+        {-0.0066780380f,  0.0108975675f},
+        { 0.0019703953f,  0.0006402202f},
+        {-0.0006445176f,  0.0081893731f},
+    },
+    {
+        {-0.0006434431f, -0.0081757193f},   /* Filter 167 */
+        {-0.0089730738f,  0.0029155284f},
+        {-0.0072302707f, -0.0117987295f},
+        {-0.0036800735f,  0.0036800735f},
+        {-0.0152007789f, -0.0093150493f},
+        {-0.0027967317f,  0.0086074552f},
+        {-0.0411484223f, -0.0032384511f},
+        { 0.0002927095f,  0.0018480947f},
+        {-0.1089495431f,  0.0451283783f},
+        {-0.0858865311f, -0.1182126686f},
+        {-0.0654794652f,  0.0766666033f},
+        {-0.5321026492f, -0.2711198415f},
+        { 0.2434139662f, -1.0138921374f},
+        { 1.1045160294f,  0.0000000000f},
+        { 0.1713278509f,  0.7136318579f},
+        {-0.1909656600f,  0.0973018638f},
+        { 0.0731491835f,  0.0856466898f},
+        {-0.0839337477f,  0.1155248929f},
+        {-0.0267987713f, -0.0111004145f},
+        {-0.0062326157f,  0.0393511866f},
+        {-0.0201077181f,  0.0015825117f},
+        { 0.0045698486f,  0.0140645479f},
+        {-0.0094133072f,  0.0057684821f},
+        { 0.0075499131f,  0.0075499131f},
+        {-0.0066498022f,  0.0108514909f},
+        { 0.0020401896f,  0.0006628978f},
+        {-0.0006434431f,  0.0081757193f},
+    },
+    {
+        {-0.0006423686f, -0.0081620665f},   /* Filter 168 */
+        {-0.0090450118f,  0.0029389025f},
+        {-0.0072072466f, -0.0117611575f},
+        {-0.0037675782f,  0.0037675782f},
+        {-0.0151771565f, -0.0093005735f},
+        {-0.0028646414f,  0.0088164598f},
+        {-0.0411823294f, -0.0032411196f},
+        { 0.0003686970f,  0.0023278609f},
+        {-0.1094767732f,  0.0453467642f},
+        {-0.0856193737f, -0.1178449581f},
+        {-0.0668351468f,  0.0782539026f},
+        {-0.5345900745f, -0.2723872481f},
+        { 0.2437734037f, -1.0153893023f},
+        { 1.1035966873f,  0.0000000000f},
+        { 0.1707092572f,  0.7110552296f},
+        {-0.1887938961f,  0.0961952948f},
+        { 0.0737282143f,  0.0863246478f},
+        {-0.0836936985f,  0.1151944935f},
+        {-0.0262515052f, -0.0108737295f},
+        {-0.0062475717f,  0.0394456154f},
+        {-0.0198892683f,  0.0015653194f},
+        { 0.0045988736f,  0.0141538774f},
+        {-0.0093227389f,  0.0057129817f},
+        { 0.0076074508f,  0.0076074508f},
+        {-0.0066215668f,  0.0108054150f},
+        { 0.0021099840f,  0.0006855754f},
+        {-0.0006423686f,  0.0081620665f},
+    },
+    {
+        {-0.0006411579f, -0.0081466839f},   /* Filter 169 */
+        {-0.0091157710f,  0.0029618935f},
+        {-0.0071826321f, -0.0117209904f},
+        {-0.0038546332f,  0.0038546332f},
+        {-0.0151492398f, -0.0092834661f},
+        {-0.0029329017f,  0.0090265432f},
+        {-0.0412072268f, -0.0032430791f},
+        { 0.0004461872f,  0.0028171151f},
+        {-0.1099954610f,  0.0455616117f},
+        {-0.0853333414f, -0.1174512684f},
+        {-0.0682102416f,  0.0798639317f},
+        {-0.5370727733f, -0.2736522463f},
+        { 0.2441223776f, -1.0168428830f},
+        { 1.1026270390f,  0.0000000000f},
+        { 0.1700868092f,  0.7084625470f},
+        {-0.1866431763f,  0.0950994483f},
+        { 0.0742846143f,  0.0869761084f},
+        {-0.0834444001f,  0.1148513637f},
+        {-0.0257103275f, -0.0106495664f},
+        {-0.0062608412f,  0.0395293959f},
+        {-0.0196695316f,  0.0015480257f},
+        { 0.0046263364f,  0.0142383992f},
+        {-0.0092304140f,  0.0056564050f},
+        { 0.0076631249f,  0.0076631248f},
+        {-0.0065922531f,  0.0107575794f},
+        { 0.0021786070f,  0.0007078723f},
+        {-0.0006411579f,  0.0081466839f},
+    },
+    {
+        {-0.0006399473f, -0.0081313013f},   /* Filter 170 */
+        {-0.0091865301f,  0.0029848846f},
+        {-0.0071580177f, -0.0116808232f},
+        {-0.0039416882f,  0.0039416882f},
+        {-0.0151213230f, -0.0092663586f},
+        {-0.0030011619f,  0.0092366267f},
+        {-0.0412321204f, -0.0032450383f},
+        { 0.0005236775f,  0.0033063695f},
+        {-0.1105141488f,  0.0457764592f},
+        {-0.0850473091f, -0.1170575787f},
+        {-0.0695853363f,  0.0814739608f},
+        {-0.5395555251f, -0.2749172715f},
+        { 0.2444713793f, -1.0182965797f},
+        { 1.1016573906f,  0.0000000000f},
+        { 0.1694643611f,  0.7058698644f},
+        {-0.1844924564f,  0.0940036018f},
+        { 0.0748410142f,  0.0876275690f},
+        {-0.0831951017f,  0.1145082339f},
+        {-0.0251691481f, -0.0104254025f},
+        {-0.0062741113f,  0.0396131801f},
+        {-0.0194497931f,  0.0015307319f},
+        { 0.0046537991f,  0.0143229210f},
+        {-0.0091380892f,  0.0055998282f},
+        { 0.0077187989f,  0.0077187989f},
+        {-0.0065629390f,  0.0107097431f},
+        { 0.0022472299f,  0.0007301693f},
+        {-0.0006399473f,  0.0081313013f},
+    },
+    {
+        {-0.0006387366f, -0.0081159187f},   /* Filter 171 */
+        {-0.0092572893f,  0.0030078756f},
+        {-0.0071334033f, -0.0116406561f},
+        {-0.0040287435f,  0.0040287435f},
+        {-0.0150934062f, -0.0092492512f},
+        {-0.0030694222f,  0.0094467102f},
+        {-0.0412570140f, -0.0032469974f},
+        { 0.0006011677f,  0.0037956237f},
+        {-0.1110328365f,  0.0459913067f},
+        {-0.0847612768f, -0.1166638890f},
+        {-0.0709604311f,  0.0830839899f},
+        {-0.5420382238f, -0.2761822697f},
+        { 0.2448203531f, -1.0197501604f},
+        { 1.1006877422f,  0.0000000000f},
+        { 0.1688419131f,  0.7032771818f},
+        {-0.1823417366f,  0.0929077553f},
+        { 0.0753974141f,  0.0882790295f},
+        {-0.0829458033f,  0.1141651041f},
+        {-0.0246279704f, -0.0102012394f},
+        {-0.0062873809f,  0.0396969606f},
+        {-0.0192300565f,  0.0015134383f},
+        { 0.0046812616f,  0.0144074419f},
+        {-0.0090457651f,  0.0055432520f},
+        { 0.0077744735f,  0.0077744735f},
+        {-0.0065336253f,  0.0106619075f},
+        { 0.0023158529f,  0.0007524662f},
+        {-0.0006387366f,  0.0081159187f},
+    },
+    {
+        {-0.0006375260f, -0.0081005361f},   /* Filter 172 */
+        {-0.0093280493f,  0.0030308669f},
+        {-0.0071087888f, -0.0116004890f},
+        {-0.0041157985f,  0.0041157985f},
+        {-0.0150654894f, -0.0092321438f},
+        {-0.0031376827f,  0.0096567945f},
+        {-0.0412819114f, -0.0032489569f},
+        { 0.0006786580f,  0.0042848781f},
+        {-0.1115515243f,  0.0462061542f},
+        {-0.0844752445f, -0.1162701993f},
+        {-0.0723355258f,  0.0846940190f},
+        {-0.5445209226f, -0.2774472679f},
+        { 0.2451693548f, -1.0212038570f},
+        { 1.0997180939f,  0.0000000000f},
+        { 0.1682194651f,  0.7006844992f},
+        {-0.1801910168f,  0.0918119088f},
+        { 0.0759538140f,  0.0889304901f},
+        {-0.0826965050f,  0.1138219743f},
+        {-0.0240867928f, -0.0099770762f},
+        {-0.0063006504f,  0.0397807411f},
+        {-0.0190103198f,  0.0014961446f},
+        { 0.0047087244f,  0.0144919637f},
+        {-0.0089534402f,  0.0054866752f},
+        { 0.0078301475f,  0.0078301475f},
+        {-0.0065043117f,  0.0106140720f},
+        { 0.0023844758f,  0.0007747632f},
+        {-0.0006375260f,  0.0081005361f},
+    },
+    {
+        {-0.0006361816f, -0.0080834535f},   /* Filter 173 */
+        {-0.0093975595f,  0.0030534522f},
+        {-0.0070825944f, -0.0115577436f},
+        {-0.0042023200f,  0.0042023200f},
+        {-0.0150332576f, -0.0092123921f},
+        {-0.0032062360f,  0.0098677796f},
+        {-0.0412976208f, -0.0032501933f},
+        { 0.0007576198f,  0.0047834232f},
+        {-0.1120611741f,  0.0464172581f},
+        {-0.0841701708f, -0.1158503014f},
+        {-0.0737297482f,  0.0863264437f},
+        {-0.5469980450f, -0.2787094248f},
+        { 0.2455077537f, -1.0226133898f},
+        { 1.0986984968f,  0.0000000000f},
+        { 0.1675933854f,  0.6980766896f},
+        {-0.1780618721f,  0.0907270554f},
+        { 0.0764876846f,  0.0895555723f},
+        {-0.0824382815f,  0.1134665602f},
+        {-0.0235519823f, -0.0097555505f},
+        {-0.0063122509f,  0.0398539838f},
+        {-0.0187895099f,  0.0014787665f},
+        { 0.0047346179f,  0.0145716555f},
+        {-0.0088594597f,  0.0054290839f},
+        { 0.0078839243f,  0.0078839243f},
+        {-0.0064739522f,  0.0105645299f},
+        { 0.0024518789f,  0.0007966637f},
+        {-0.0006361816f,  0.0080834535f},
+    },
+    {
+        {-0.0006348372f, -0.0080663719f},   /* Filter 174 */
+        {-0.0094670707f,  0.0030760377f},
+        {-0.0070563994f, -0.0115149973f},
+        {-0.0042888419f,  0.0042888419f},
+        {-0.0150010258f, -0.0091926404f},
+        {-0.0032747895f,  0.0100787656f},
+        {-0.0413133302f, -0.0032514296f},
+        { 0.0008365815f,  0.0052819680f},
+        {-0.1125708239f,  0.0466283620f},
+        {-0.0838650884f, -0.1154303915f},
+        {-0.0751239755f,  0.0879588741f},
+        {-0.5494751673f, -0.2799715817f},
+        { 0.2458461804f, -1.0240230385f},
+        { 1.0976788998f,  0.0000000000f},
+        { 0.1669673057f,  0.6954688800f},
+        {-0.1759327407f,  0.0896422088f},
+        { 0.0770215552f,  0.0901806545f},
+        {-0.0821800492f,  0.1131111340f},
+        {-0.0230171717f, -0.0095340247f},
+        {-0.0063238520f,  0.0399272301f},
+        {-0.0185687000f,  0.0014613884f},
+        { 0.0047605113f,  0.0146513473f},
+        {-0.0087654792f,  0.0053714926f},
+        { 0.0079377004f,  0.0079377004f},
+        {-0.0064435933f,  0.0105149887f},
+        { 0.0025192818f,  0.0008185643f},
+        {-0.0006348372f,  0.0080663719f},
+    },
+    {
+        {-0.0006334928f, -0.0080492893f},   /* Filter 175 */
+        {-0.0095365818f,  0.0030986233f},
+        {-0.0070302049f, -0.0114722518f},
+        {-0.0043753638f,  0.0043753638f},
+        {-0.0149687939f, -0.0091728887f},
+        {-0.0033433427f,  0.0102897508f},
+        {-0.0413290433f, -0.0032526663f},
+        { 0.0009155433f,  0.0057805131f},
+        {-0.1130804738f,  0.0468394658f},
+        {-0.0835600060f, -0.1150104815f},
+        {-0.0765181979f,  0.0895912988f},
+        {-0.5519522897f, -0.2812337386f},
+        { 0.2461845793f, -1.0254325714f},
+        { 1.0966593027f,  0.0000000000f},
+        { 0.1663412260f,  0.6928610705f},
+        {-0.1738036093f,  0.0885573622f},
+        { 0.0775554307f,  0.0908057424f},
+        {-0.0819218257f,  0.1127557199f},
+        {-0.0224823612f, -0.0093124989f},
+        {-0.0063354525f,  0.0400004728f},
+        {-0.0183478919f,  0.0014440104f},
+        { 0.0047864048f,  0.0147310392f},
+        {-0.0086714987f,  0.0053139012f},
+        { 0.0079914771f,  0.0079914771f},
+        {-0.0064132339f,  0.0104654466f},
+        { 0.0025866848f,  0.0008404648f},
+        {-0.0006334928f,  0.0080492893f},
+    },
+    {
+        {-0.0006321484f, -0.0080322076f},   /* Filter 176 */
+        {-0.0096060929f,  0.0031212088f},
+        {-0.0070040105f, -0.0114295063f},
+        {-0.0044618853f,  0.0044618853f},
+        {-0.0149365621f, -0.0091531370f},
+        {-0.0034118962f,  0.0105007368f},
+        {-0.0413447527f, -0.0032539026f},
+        { 0.0009945051f,  0.0062790583f},
+        {-0.1135901236f,  0.0470505697f},
+        {-0.0832549323f, -0.1145905836f},
+        {-0.0779124251f,  0.0912237291f},
+        {-0.5544294121f, -0.2824958955f},
+        { 0.2465230060f, -1.0268422201f},
+        { 1.0956397057f,  0.0000000000f},
+        { 0.1657151464f,  0.6902532609f},
+        {-0.1716744647f,  0.0874725088f},
+        { 0.0780893013f,  0.0914308246f},
+        {-0.0816636022f,  0.1124003057f},
+        {-0.0219475490f, -0.0090909725f},
+        {-0.0063470530f,  0.0400737154f},
+        {-0.0181270820f,  0.0014266323f},
+        { 0.0048122982f,  0.0148107310f},
+        {-0.0085775182f,  0.0052563099f},
+        { 0.0080452532f,  0.0080452532f},
+        {-0.0063828750f,  0.0104159054f},
+        { 0.0026540877f,  0.0008623654f},
+        {-0.0006321484f,  0.0080322076f},
+    },
+    {
+        {-0.0006306728f, -0.0080134576f},   /* Filter 177 */
+        {-0.0096742861f,  0.0031433661f},
+        {-0.0069762467f, -0.0113841999f},
+        {-0.0045477902f,  0.0045477902f},
+        {-0.0148999977f, -0.0091307304f},
+        {-0.0034806840f,  0.0107124438f},
+        {-0.0413511108f, -0.0032544030f},
+        { 0.0010749057f,  0.0067866875f},
+        {-0.1140902398f,  0.0472577246f},
+        {-0.0829306333f, -0.1141442244f},
+        {-0.0793254848f,  0.0928782095f},
+        {-0.5569001084f, -0.2837547781f},
+        { 0.2468507186f, -1.0282072413f},
+        { 1.0945705175f,  0.0000000000f},
+        { 0.1650856437f,  0.6876311937f},
+        {-0.1695674396f,  0.0863989259f},
+        { 0.0786007540f,  0.0920296586f},
+        {-0.0813967690f,  0.1120330412f},
+        {-0.0214193776f, -0.0088721967f},
+        {-0.0063570037f,  0.0401365416f},
+        {-0.0179054141f,  0.0014091867f},
+        { 0.0048366169f,  0.0148855761f},
+        {-0.0084819828f,  0.0051977658f},
+        { 0.0080970991f,  0.0080970991f},
+        {-0.0063515039f,  0.0103647124f},
+        { 0.0027202235f,  0.0008838542f},
+        {-0.0006306728f,  0.0080134576f},
+    },
+    {
+        {-0.0006291970f, -0.0079947065f},   /* Filter 178 */
+        {-0.0097424801f,  0.0031655237f},
+        {-0.0069484829f, -0.0113388935f},
+        {-0.0046336947f,  0.0046336947f},
+        {-0.0148634318f, -0.0091083227f},
+        {-0.0035494718f,  0.0109241508f},
+        {-0.0413574651f, -0.0032549031f},
+        { 0.0011553063f,  0.0072943168f},
+        {-0.1145903561f,  0.0474648796f},
+        {-0.0826063431f, -0.1136978772f},
+        {-0.0807385445f,  0.0945326898f},
+        {-0.5593708578f, -0.2850136878f},
+        { 0.2471784312f, -1.0295722626f},
+        { 1.0935014486f,  0.0000000000f},
+        { 0.1644561550f,  0.6850091845f},
+        {-0.1674604144f,  0.0853253430f},
+        { 0.0791122066f,  0.0926284927f},
+        {-0.0811299269f,  0.1116657647f},
+        {-0.0208912044f, -0.0086534202f},
+        {-0.0063669544f,  0.0401993678f},
+        {-0.0176837445f,  0.0013917409f},
+        { 0.0048609355f,  0.0149604211f},
+        {-0.0083864467f,  0.0051392212f},
+        { 0.0081489450f,  0.0081489450f},
+        {-0.0063201333f,  0.0103135203f},
+        { 0.0027863591f,  0.0009053429f},
+        {-0.0006291970f,  0.0079947065f},
+    },
+    {
+        {-0.0006277214f, -0.0079759565f},   /* Filter 179 */
+        {-0.0098106733f,  0.0031876810f},
+        {-0.0069207191f, -0.0112935871f},
+        {-0.0047195995f,  0.0047195995f},
+        {-0.0148268675f, -0.0090859161f},
+        {-0.0036182596f,  0.0111358578f},
+        {-0.0413638231f, -0.0032554035f},
+        { 0.0012357069f,  0.0078019464f},
+        {-0.1150904723f,  0.0476720345f},
+        {-0.0822820441f, -0.1132515179f},
+        {-0.0821516043f,  0.0961871702f},
+        {-0.5618415541f, -0.2862725705f},
+        { 0.2475061438f, -1.0309372838f},
+        { 1.0924322605f,  0.0000000000f},
+        { 0.1638266524f,  0.6823871173f},
+        {-0.1653533760f,  0.0842517533f},
+        { 0.0796236592f,  0.0932273268f},
+        {-0.0808630937f,  0.1112985002f},
+        {-0.0203630313f, -0.0084346437f},
+        {-0.0063769051f,  0.0402621940f},
+        {-0.0174620766f,  0.0013742952f},
+        { 0.0048852541f,  0.0150352662f},
+        {-0.0082909114f,  0.0050806770f},
+        { 0.0082007909f,  0.0082007909f},
+        {-0.0062887623f,  0.0102623273f},
+        { 0.0028524949f,  0.0009268318f},
+        {-0.0006277214f,  0.0079759565f},
+    },
+    {
+        {-0.0006262457f, -0.0079572064f},   /* Filter 180 */
+        {-0.0098788673f,  0.0032098386f},
+        {-0.0068929552f, -0.0112482807f},
+        {-0.0048055043f,  0.0048055043f},
+        {-0.0147903015f, -0.0090635084f},
+        {-0.0036870476f,  0.0113475657f},
+        {-0.0413701812f, -0.0032559039f},
+        { 0.0013161075f,  0.0083095757f},
+        {-0.1155905886f,  0.0478791895f},
+        {-0.0819577539f, -0.1128051707f},
+        {-0.0835646688f,  0.0978416562f},
+        {-0.5643122504f, -0.2875314531f},
+        { 0.2478338564f, -1.0323023051f},
+        { 1.0913630724f,  0.0000000000f},
+        { 0.1631971497f,  0.6797650501f},
+        {-0.1632463509f,  0.0831781703f},
+        { 0.0801351118f,  0.0938261609f},
+        {-0.0805962516f,  0.1109312237f},
+        {-0.0198348598f, -0.0082158679f},
+        {-0.0063868557f,  0.0403250202f},
+        {-0.0172404088f,  0.0013568496f},
+        { 0.0049095728f,  0.0151101113f},
+        {-0.0081953752f,  0.0050221324f},
+        { 0.0082526368f,  0.0082526368f},
+        {-0.0062573917f,  0.0102111352f},
+        { 0.0029186307f,  0.0009483206f},
+        {-0.0006262457f,  0.0079572064f},
+    },
+    {
+        {-0.0006246413f, -0.0079368204f},   /* Filter 181 */
+        {-0.0099456752f,  0.0032315458f},
+        {-0.0068636353f, -0.0112004348f},
+        {-0.0048907081f,  0.0048907081f},
+        {-0.0147493888f, -0.0090384371f},
+        {-0.0037560104f,  0.0115598113f},
+        {-0.0413670207f, -0.0032556551f},
+        { 0.0013979127f,  0.0088260732f},
+        {-0.1160806757f,  0.0480821902f},
+        {-0.0816140807f, -0.1123321451f},
+        {-0.0849962561f,  0.0995178296f},
+        {-0.5667757240f, -0.2887866556f},
+        { 0.2481507436f, -1.0336222352f},
+        { 1.0902447701f,  0.0000000000f},
+        { 0.1625644607f,  0.6771297106f},
+        {-0.1611619499f,  0.0821161150f},
+        { 0.0806242674f,  0.0943988885f},
+        {-0.0803211239f,  0.1105525428f},
+        {-0.0193135873f, -0.0079999498f},
+        {-0.0063951759f,  0.0403775514f},
+        {-0.0170180911f,  0.0013393528f},
+        { 0.0049323120f,  0.0151800954f},
+        {-0.0080983851f,  0.0049626968f},
+        { 0.0083025209f,  0.0083025209f},
+        {-0.0062250430f,  0.0101583469f},
+        { 0.0029834536f,  0.0009693828f},
+        {-0.0006246413f,  0.0079368204f},
+    },
+    {
+        {-0.0006230369f, -0.0079164344f},   /* Filter 182 */
+        {-0.0100124830f,  0.0032532529f},
+        {-0.0068343153f, -0.0111525889f},
+        {-0.0049759119f,  0.0049759119f},
+        {-0.0147084760f, -0.0090133657f},
+        {-0.0038249731f,  0.0117720568f},
+        {-0.0413638603f, -0.0032554064f},
+        { 0.0014797178f,  0.0093425708f},
+        {-0.1165707628f,  0.0482851909f},
+        {-0.0812704075f, -0.1118591195f},
+        {-0.0864278435f,  0.1011940030f},
+        {-0.5692392507f, -0.2900418852f},
+        { 0.2484676308f, -1.0349421653f},
+        { 1.0891264677f,  0.0000000000f},
+        { 0.1619317577f,  0.6744943131f},
+        {-0.1590775355f,  0.0810540528f},
+        { 0.0811134182f,  0.0949716105f},
+        {-0.0800459962f,  0.1101738620f},
+        {-0.0187923166f, -0.0077840324f},
+        {-0.0064034960f,  0.0404300825f},
+        {-0.0167957752f,  0.0013218562f},
+        { 0.0049550512f,  0.0152500795f},
+        {-0.0080013950f,  0.0049032612f},
+        { 0.0083524050f,  0.0083524049f},
+        {-0.0061926948f,  0.0101055594f},
+        { 0.0030482765f,  0.0009904451f},
+        {-0.0006230369f,  0.0079164344f},
+    },
+    {
+        {-0.0006214324f, -0.0078960474f},   /* Filter 183 */
+        {-0.0100792909f,  0.0032749601f},
+        {-0.0068049953f, -0.0111047430f},
+        {-0.0050611154f,  0.0050611154f},
+        {-0.0146675617f, -0.0089882934f},
+        {-0.0038939359f,  0.0119843024f},
+        {-0.0413606998f, -0.0032551577f},
+        { 0.0015615230f,  0.0098590683f},
+        {-0.1170608498f,  0.0484881916f},
+        {-0.0809267343f, -0.1113860940f},
+        {-0.0878594308f,  0.1028701764f},
+        {-0.5717027243f, -0.2912970876f},
+        { 0.2487845180f, -1.0362620954f},
+        { 1.0880081654f,  0.0000000000f},
+        { 0.1612990687f,  0.6718589736f},
+        {-0.1569931345f,  0.0799919974f},
+        { 0.0816025689f,  0.0955443324f},
+        {-0.0797708684f,  0.1097951811f},
+        {-0.0182710440f, -0.0075681142f},
+        {-0.0064118161f,  0.0404826137f},
+        {-0.0165734574f,  0.0013043594f},
+        { 0.0049777904f,  0.0153200636f},
+        {-0.0079044049f,  0.0048438256f},
+        { 0.0084022884f,  0.0084022884f},
+        {-0.0061603461f,  0.0100527712f},
+        { 0.0031130992f,  0.0010115072f},
+        {-0.0006214324f,  0.0078960474f},
+    },
+    {
+        {-0.0006198280f, -0.0078756614f},   /* Filter 184 */
+        {-0.0101460987f,  0.0032966673f},
+        {-0.0067756753f, -0.0110568971f},
+        {-0.0051463192f,  0.0051463192f},
+        {-0.0146266490f, -0.0089632220f},
+        {-0.0039628986f,  0.0121965479f},
+        {-0.0413575394f, -0.0032549089f},
+        { 0.0016433282f,  0.0103755659f},
+        {-0.1175509369f,  0.0486911923f},
+        {-0.0805830611f, -0.1109130684f},
+        {-0.0892910279f,  0.1045463612f},
+        {-0.5741661979f, -0.2925522901f},
+        { 0.2491014052f, -1.0375820255f},
+        { 1.0868898630f,  0.0000000000f},
+        { 0.1606663657f,  0.6692235761f},
+        {-0.1549087334f,  0.0789299420f},
+        { 0.0820917197f,  0.0961170544f},
+        {-0.0794957407f,  0.1094165002f},
+        {-0.0177497715f, -0.0073521961f},
+        {-0.0064201362f,  0.0405351449f},
+        {-0.0163511397f,  0.0012868626f},
+        { 0.0050005296f,  0.0153900477f},
+        {-0.0078074149f,  0.0047843900f},
+        { 0.0084521725f,  0.0084521725f},
+        {-0.0061279979f,  0.0099999837f},
+        { 0.0031779221f,  0.0010325695f},
+        {-0.0006198280f,  0.0078756614f},
+    },
+    {
+        {-0.0006180975f, -0.0078536738f},   /* Filter 185 */
+        {-0.0102114540f,  0.0033179025f},
+        {-0.0067448127f, -0.0110065340f},
+        {-0.0052307377f,  0.0052307377f},
+        {-0.0145813767f, -0.0089354791f},
+        {-0.0040319757f,  0.0124091451f},
+        {-0.0413447044f, -0.0032538988f},
+        { 0.0017265024f,  0.0109007073f},
+        {-0.1180305061f,  0.0488898364f},
+        {-0.0802198648f, -0.1104131716f},
+        {-0.0907408283f,  0.1062438594f},
+        {-0.5766215991f, -0.2938033795f},
+        { 0.2494073556f, -1.0388564008f},
+        { 1.0857228041f,  0.0000000000f},
+        { 0.1600306851f,  0.6665757757f},
+        {-0.1528474477f,  0.0778796645f},
+        { 0.0825586992f,  0.0966638172f},
+        {-0.0792126425f,  0.1090268491f},
+        {-0.0172356561f, -0.0071392425f},
+        {-0.0064268467f,  0.0405775134f},
+        {-0.0161283837f,  0.0012693313f},
+        { 0.0050216871f,  0.0154551638f},
+        {-0.0077090716f,  0.0047241252f},
+        { 0.0085000658f,  0.0085000658f},
+        {-0.0060947066f,  0.0099456573f},
+        { 0.0032413878f,  0.0010531907f},
+        {-0.0006180975f,  0.0078536738f},
+    },
+    {
+        {-0.0006163670f, -0.0078316853f},   /* Filter 186 */
+        {-0.0102768083f,  0.0033391374f},
+        {-0.0067139506f, -0.0109561717f},
+        {-0.0053151562f,  0.0053151562f},
+        {-0.0145361044f, -0.0089077363f},
+        {-0.0041010527f,  0.0126217423f},
+        {-0.0413318695f, -0.0032528887f},
+        { 0.0018096765f,  0.0114258479f},
+        {-0.1185100615f,  0.0490884747f},
+        {-0.0798566597f, -0.1099132627f},
+        {-0.0921906384f,  0.1079413690f},
+        {-0.5790770002f, -0.2950544689f},
+        { 0.2497133061f, -1.0401307762f},
+        { 1.0845557451f,  0.0000000000f},
+        { 0.1593950044f,  0.6639279752f},
+        {-0.1507861619f,  0.0768293869f},
+        { 0.0830256788f,  0.0972105799f},
+        {-0.0789295444f,  0.1086371979f},
+        {-0.0167215389f, -0.0069262882f},
+        {-0.0064335573f,  0.0406198820f},
+        {-0.0159056278f,  0.0012518001f},
+        { 0.0050428441f,  0.0155202782f},
+        {-0.0076107284f,  0.0046638604f},
+        { 0.0085479591f,  0.0085479591f},
+        {-0.0060614159f,  0.0098913317f},
+        { 0.0033048536f,  0.0010738120f},
+        {-0.0006163670f,  0.0078316853f},
+    },
+    {
+        {-0.0006146365f, -0.0078096977f},   /* Filter 187 */
+        {-0.0103421636f,  0.0033603726f},
+        {-0.0066830881f, -0.0109058085f},
+        {-0.0053995750f,  0.0053995750f},
+        {-0.0144908338f, -0.0088799944f},
+        {-0.0041701300f,  0.0128343404f},
+        {-0.0413190346f, -0.0032518786f},
+        { 0.0018928506f,  0.0119509884f},
+        {-0.1189896170f,  0.0492871131f},
+        {-0.0794934547f, -0.1094133538f},
+        {-0.0936404389f,  0.1096388672f},
+        {-0.5815324545f, -0.2963055853f},
+        { 0.2500192287f, -1.0414050355f},
+        { 1.0833886862f,  0.0000000000f},
+        { 0.1587593377f,  0.6612802328f},
+        {-0.1487248762f,  0.0757791094f},
+        { 0.0834926583f,  0.0977573427f},
+        {-0.0786464462f,  0.1082475467f},
+        {-0.0162074218f, -0.0067133339f},
+        {-0.0064402678f,  0.0406622506f},
+        {-0.0156828718f,  0.0012342688f},
+        { 0.0050640016f,  0.0155853942f},
+        {-0.0075123852f,  0.0046035956f},
+        { 0.0085958524f,  0.0085958524f},
+        {-0.0060281246f,  0.0098370053f},
+        { 0.0033683193f,  0.0010944333f},
+        {-0.0006146365f,  0.0078096977f},
+    },
+    {
+        {-0.0006129060f, -0.0077877092f},   /* Filter 188 */
+        {-0.0104075179f,  0.0033816076f},
+        {-0.0066522260f, -0.0108554462f},
+        {-0.0054839935f,  0.0054839935f},
+        {-0.0144455615f, -0.0088522515f},
+        {-0.0042392070f,  0.0130469375f},
+        {-0.0413061997f, -0.0032508684f},
+        { 0.0019760247f,  0.0124761289f},
+        {-0.1194691862f,  0.0494857572f},
+        {-0.0791302584f, -0.1089134570f},
+        {-0.0950902394f,  0.1113363655f},
+        {-0.5839878557f, -0.2975566747f},
+        { 0.2503251791f, -1.0426794109f},
+        { 1.0822216272f,  0.0000000000f},
+        { 0.1581236571f,  0.6586324323f},
+        {-0.1466635904f,  0.0747288318f},
+        { 0.0839596378f,  0.0983041055f},
+        {-0.0783633481f,  0.1078578956f},
+        {-0.0156933046f, -0.0065003796f},
+        {-0.0064469783f,  0.0407046192f},
+        {-0.0154601149f,  0.0012167374f},
+        { 0.0050851585f,  0.0156505086f},
+        {-0.0074140420f,  0.0045433308f},
+        { 0.0086437457f,  0.0086437457f},
+        {-0.0059948338f,  0.0097826797f},
+        { 0.0034317848f,  0.0011150545f},
+        {-0.0006129060f,  0.0077877092f},
+    },
+    {
+        {-0.0006111755f, -0.0077657207f},   /* Filter 189 */
+        {-0.0104728723f,  0.0034028425f},
+        {-0.0066213634f, -0.0108050831f},
+        {-0.0055684120f,  0.0055684120f},
+        {-0.0144002892f, -0.0088245086f},
+        {-0.0043082843f,  0.0132595356f},
+        {-0.0412933611f, -0.0032498580f},
+        { 0.0020591988f,  0.0130012694f},
+        {-0.1199487416f,  0.0496843955f},
+        {-0.0787670533f, -0.1084135481f},
+        {-0.0965400495f,  0.1130338750f},
+        {-0.5864432568f, -0.2988077641f},
+        { 0.2506311296f, -1.0439537862f},
+        { 1.0810545683f,  0.0000000000f},
+        { 0.1574879764f,  0.6559846319f},
+        {-0.1446023047f,  0.0736785543f},
+        { 0.0844266077f,  0.0988508570f},
+        {-0.0780802499f,  0.1074682444f},
+        {-0.0151791874f, -0.0062874253f},
+        {-0.0064536888f,  0.0407469878f},
+        {-0.0152373580f,  0.0011992061f},
+        { 0.0051063160f,  0.0157156247f},
+        {-0.0073156988f,  0.0044830660f},
+        { 0.0086916390f,  0.0086916390f},
+        {-0.0059615426f,  0.0097283533f},
+        { 0.0034952505f,  0.0011356757f},
+        {-0.0006111755f,  0.0077657207f},
+    },
+    {
+        {-0.0006094450f, -0.0077437326f},   /* Filter 190 */
+        {-0.0105382275f,  0.0034240777f},
+        {-0.0065905013f, -0.0107547207f},
+        {-0.0056528308f,  0.0056528308f},
+        {-0.0143550170f, -0.0087967657f},
+        {-0.0043773613f,  0.0134721328f},
+        {-0.0412805262f, -0.0032488479f},
+        { 0.0021423730f,  0.0135264109f},
+        {-0.1204282970f,  0.0498830339f},
+        {-0.0784038482f, -0.1079136392f},
+        {-0.0979898499f,  0.1147313733f},
+        {-0.5888986580f, -0.3000588535f},
+        { 0.2509370800f, -1.0452281615f},
+        { 1.0798875093f,  0.0000000000f},
+        { 0.1568522958f,  0.6533368315f},
+        {-0.1425410189f,  0.0726282767f},
+        { 0.0848935872f,  0.0993976198f},
+        {-0.0777971430f,  0.1070785812f},
+        {-0.0146650702f, -0.0060744710f},
+        {-0.0064603994f,  0.0407893564f},
+        {-0.0150146011f,  0.0011816747f},
+        { 0.0051274735f,  0.0157807408f},
+        {-0.0072173556f,  0.0044228012f},
+        { 0.0087395323f,  0.0087395323f},
+        {-0.0059282513f,  0.0096740269f},
+        { 0.0035587163f,  0.0011562970f},
+        {-0.0006094450f,  0.0077437326f},
+    },
+    {
+        {-0.0006077145f, -0.0077217446f},   /* Filter 191 */
+        {-0.0106035819f,  0.0034453126f},
+        {-0.0065596388f, -0.0107043576f},
+        {-0.0057372490f,  0.0057372490f},
+        {-0.0143097447f, -0.0087690228f},
+        {-0.0044464386f,  0.0136847309f},
+        {-0.0412676912f, -0.0032478377f},
+        { 0.0022255471f,  0.0140515514f},
+        {-0.1209078662f,  0.0500816779f},
+        {-0.0780406519f, -0.1074137424f},
+        {-0.0994396601f,  0.1164288828f},
+        {-0.5913541123f, -0.3013099699f},
+        { 0.2512430304f, -1.0465025368f},
+        { 1.0787204504f,  0.0000000000f},
+        { 0.1562166151f,  0.6506890310f},
+        {-0.1404797332f,  0.0715779992f},
+        { 0.0853605668f,  0.0999443825f},
+        {-0.0775140449f,  0.1066889300f},
+        {-0.0141509539f, -0.0058615170f},
+        {-0.0064671099f,  0.0408317250f},
+        {-0.0147918451f,  0.0011641435f},
+        { 0.0051486304f,  0.0158458551f},
+        {-0.0071190124f,  0.0043625364f},
+        { 0.0087874256f,  0.0087874256f},
+        {-0.0058949605f,  0.0096197013f},
+        { 0.0036221820f,  0.0011769183f},
+        {-0.0006077145f,  0.0077217446f},
+    },
+};
+
+/* The following table maps the 8 soft-decisions associated with every possible point in the
+   constellation space. If you look at the constellations carefully, all 4 can be accurately
+   mapped at 0.5 unit resolution. */
+static const uint8_t constel_maps[4][36][36][8] =
+{
+    {   /* 14,400bps map */
+        {
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x66, 0x7f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x66, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x76, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f}
+        },
+        {
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x66, 0x7f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x66, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x76, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f}
+        },
+        {
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x66, 0x7f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x66, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x76, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f}
+        },
+        {
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x05, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x66, 0x7f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x66, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x76, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x05, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x0d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x0d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f}
+        },
+        {
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x15, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x4c, 0x15, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x15, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x15, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x15, 0x66, 0x7f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x15, 0x66, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x15, 0x76, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x15, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x1d, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x1d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x1d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x1d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x1d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x1d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x1d, 0x56, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x1d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f}
+        },
+        {
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x15, 0x66, 0x5f},
+            {0x00, 0x49, 0x5a, 0x63, 0x6c, 0x15, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x15, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x63, 0x4c, 0x15, 0x66, 0x5f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x15, 0x66, 0x7f},
+            {0x00, 0x49, 0x7a, 0x73, 0x4c, 0x15, 0x66, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x15, 0x76, 0x7f},
+            {0x08, 0x49, 0x7a, 0x73, 0x4c, 0x15, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x1d, 0x76, 0x7f},
+            {0x08, 0x41, 0x7a, 0x73, 0x4c, 0x1d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x1d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x73, 0x44, 0x1d, 0x76, 0x7f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x1d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x1d, 0x76, 0x6f},
+            {0x08, 0x41, 0x6a, 0x53, 0x44, 0x1d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x1d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x44, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f}
+        },
+        {
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x49, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x49, 0x5a, 0x63, 0x6c, 0x15, 0x66, 0x5f},
+            {0x10, 0x49, 0x5a, 0x63, 0x6c, 0x15, 0x66, 0x5f},
+            {0x10, 0x49, 0x7a, 0x63, 0x2c, 0x15, 0x66, 0x5f},
+            {0x10, 0x49, 0x7a, 0x63, 0x2c, 0x15, 0x66, 0x5f},
+            {0x10, 0x49, 0x7a, 0x73, 0x2c, 0x15, 0x66, 0x7f},
+            {0x10, 0x49, 0x7a, 0x73, 0x2c, 0x15, 0x66, 0x7f},
+            {0x18, 0x49, 0x7a, 0x73, 0x2c, 0x15, 0x76, 0x7f},
+            {0x18, 0x49, 0x7a, 0x73, 0x2c, 0x15, 0x76, 0x7f},
+            {0x18, 0x41, 0x7a, 0x73, 0x2c, 0x1d, 0x76, 0x7f},
+            {0x18, 0x41, 0x7a, 0x73, 0x2c, 0x1d, 0x76, 0x7f},
+            {0x18, 0x41, 0x6a, 0x73, 0x24, 0x1d, 0x76, 0x7f},
+            {0x18, 0x41, 0x6a, 0x73, 0x24, 0x1d, 0x76, 0x7f},
+            {0x18, 0x41, 0x6a, 0x53, 0x24, 0x1d, 0x76, 0x6f},
+            {0x18, 0x41, 0x6a, 0x53, 0x24, 0x1d, 0x76, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x24, 0x1d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x24, 0x1d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x24, 0x5d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x24, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f}
+        },
+        {
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x69, 0x5a, 0x63, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x49, 0x5a, 0x63, 0x6c, 0x15, 0x66, 0x5f},
+            {0x10, 0x49, 0x5a, 0x63, 0x6c, 0x15, 0x66, 0x5f},
+            {0x10, 0x49, 0x7a, 0x63, 0x2c, 0x15, 0x66, 0x5f},
+            {0x10, 0x49, 0x7a, 0x63, 0x2c, 0x15, 0x66, 0x5f},
+            {0x10, 0x49, 0x7a, 0x73, 0x2c, 0x15, 0x66, 0x7f},
+            {0x10, 0x49, 0x7a, 0x73, 0x2c, 0x15, 0x66, 0x7f},
+            {0x18, 0x49, 0x7a, 0x73, 0x2c, 0x15, 0x76, 0x7f},
+            {0x18, 0x49, 0x7a, 0x73, 0x2c, 0x15, 0x76, 0x7f},
+            {0x18, 0x41, 0x7a, 0x73, 0x2c, 0x1d, 0x76, 0x7f},
+            {0x18, 0x41, 0x7a, 0x73, 0x2c, 0x1d, 0x76, 0x7f},
+            {0x18, 0x41, 0x6a, 0x73, 0x24, 0x1d, 0x76, 0x7f},
+            {0x18, 0x41, 0x6a, 0x73, 0x24, 0x1d, 0x76, 0x7f},
+            {0x18, 0x41, 0x6a, 0x53, 0x24, 0x1d, 0x76, 0x6f},
+            {0x18, 0x41, 0x6a, 0x53, 0x24, 0x1d, 0x76, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x24, 0x1d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x24, 0x1d, 0x56, 0x6f},
+            {0x58, 0x41, 0x6a, 0x53, 0x24, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x24, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x53, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f}
+        },
+        {
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x23, 0x6c, 0x55, 0x66, 0x5f},
+            {0x50, 0x69, 0x5a, 0x23, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x69, 0x5a, 0x23, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x69, 0x5a, 0x23, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x29, 0x5a, 0x23, 0x6c, 0x15, 0x66, 0x5f},
+            {0x10, 0x29, 0x5a, 0x23, 0x6c, 0x15, 0x66, 0x5f},
+            {0x10, 0x29, 0x7a, 0x23, 0x2c, 0x15, 0x66, 0x5f},
+            {0x10, 0x29, 0x7a, 0x23, 0x2c, 0x15, 0x66, 0x5f},
+            {0x10, 0x29, 0x7a, 0x33, 0x2c, 0x15, 0x66, 0x7f},
+            {0x10, 0x29, 0x7a, 0x33, 0x2c, 0x15, 0x66, 0x7f},
+            {0x18, 0x29, 0x7a, 0x33, 0x2c, 0x15, 0x76, 0x7f},
+            {0x18, 0x29, 0x7a, 0x33, 0x2c, 0x15, 0x76, 0x7f},
+            {0x18, 0x21, 0x7a, 0x33, 0x2c, 0x1d, 0x76, 0x7f},
+            {0x18, 0x21, 0x7a, 0x33, 0x2c, 0x1d, 0x76, 0x7f},
+            {0x18, 0x21, 0x6a, 0x33, 0x24, 0x1d, 0x76, 0x7f},
+            {0x18, 0x21, 0x6a, 0x33, 0x24, 0x1d, 0x76, 0x7f},
+            {0x18, 0x21, 0x6a, 0x13, 0x24, 0x1d, 0x76, 0x6f},
+            {0x18, 0x21, 0x6a, 0x13, 0x24, 0x1d, 0x76, 0x6f},
+            {0x58, 0x21, 0x6a, 0x13, 0x24, 0x1d, 0x56, 0x6f},
+            {0x58, 0x21, 0x6a, 0x13, 0x24, 0x1d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x13, 0x24, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x13, 0x24, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x13, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x13, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f}
+        },
+        {
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x23, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x5a, 0x23, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x69, 0x5a, 0x23, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x69, 0x5a, 0x23, 0x6c, 0x55, 0x66, 0x5f},
+            {0x10, 0x29, 0x5a, 0x23, 0x6c, 0x15, 0x66, 0x5f},
+            {0x10, 0x29, 0x5a, 0x23, 0x6c, 0x15, 0x66, 0x5f},
+            {0x10, 0x29, 0x7a, 0x23, 0x2c, 0x15, 0x66, 0x5f},
+            {0x10, 0x29, 0x7a, 0x23, 0x2c, 0x15, 0x66, 0x5f},
+            {0x10, 0x29, 0x7a, 0x33, 0x2c, 0x15, 0x66, 0x7f},
+            {0x10, 0x29, 0x7a, 0x33, 0x2c, 0x15, 0x66, 0x7f},
+            {0x18, 0x29, 0x7a, 0x33, 0x2c, 0x15, 0x76, 0x7f},
+            {0x18, 0x29, 0x7a, 0x33, 0x2c, 0x15, 0x76, 0x7f},
+            {0x18, 0x21, 0x7a, 0x33, 0x2c, 0x1d, 0x76, 0x7f},
+            {0x18, 0x21, 0x7a, 0x33, 0x2c, 0x1d, 0x76, 0x7f},
+            {0x18, 0x21, 0x6a, 0x33, 0x24, 0x1d, 0x76, 0x7f},
+            {0x18, 0x21, 0x6a, 0x33, 0x24, 0x1d, 0x76, 0x7f},
+            {0x18, 0x21, 0x6a, 0x13, 0x24, 0x1d, 0x76, 0x6f},
+            {0x18, 0x21, 0x6a, 0x13, 0x24, 0x1d, 0x76, 0x6f},
+            {0x58, 0x21, 0x6a, 0x13, 0x24, 0x1d, 0x56, 0x6f},
+            {0x58, 0x21, 0x6a, 0x13, 0x24, 0x1d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x13, 0x24, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x13, 0x24, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x6a, 0x13, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x13, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x56, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f}
+        },
+        {
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x1a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x1a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x1a, 0x23, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x1a, 0x23, 0x6c, 0x55, 0x46, 0x5f},
+            {0x10, 0x69, 0x1a, 0x23, 0x6c, 0x55, 0x26, 0x5f},
+            {0x10, 0x69, 0x1a, 0x23, 0x6c, 0x55, 0x26, 0x5f},
+            {0x10, 0x29, 0x1a, 0x23, 0x6c, 0x15, 0x26, 0x5f},
+            {0x10, 0x29, 0x1a, 0x23, 0x6c, 0x15, 0x26, 0x5f},
+            {0x10, 0x29, 0x3a, 0x23, 0x2c, 0x15, 0x26, 0x5f},
+            {0x10, 0x29, 0x3a, 0x23, 0x2c, 0x15, 0x26, 0x5f},
+            {0x10, 0x29, 0x3a, 0x33, 0x2c, 0x15, 0x26, 0x7f},
+            {0x10, 0x29, 0x3a, 0x33, 0x2c, 0x15, 0x26, 0x7f},
+            {0x18, 0x29, 0x3a, 0x33, 0x2c, 0x15, 0x36, 0x7f},
+            {0x18, 0x29, 0x3a, 0x33, 0x2c, 0x15, 0x36, 0x7f},
+            {0x18, 0x21, 0x3a, 0x33, 0x2c, 0x1d, 0x36, 0x7f},
+            {0x18, 0x21, 0x3a, 0x33, 0x2c, 0x1d, 0x36, 0x7f},
+            {0x18, 0x21, 0x2a, 0x33, 0x24, 0x1d, 0x36, 0x7f},
+            {0x18, 0x21, 0x2a, 0x33, 0x24, 0x1d, 0x36, 0x7f},
+            {0x18, 0x21, 0x2a, 0x13, 0x24, 0x1d, 0x36, 0x6f},
+            {0x18, 0x21, 0x2a, 0x13, 0x24, 0x1d, 0x36, 0x6f},
+            {0x58, 0x21, 0x2a, 0x13, 0x24, 0x1d, 0x16, 0x6f},
+            {0x58, 0x21, 0x2a, 0x13, 0x24, 0x1d, 0x16, 0x6f},
+            {0x58, 0x61, 0x2a, 0x13, 0x24, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x2a, 0x13, 0x24, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x4a, 0x13, 0x64, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x4a, 0x13, 0x64, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f}
+        },
+        {
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x1a, 0x43, 0x6c, 0x55, 0x46, 0x0f},
+            {0x50, 0x69, 0x1a, 0x43, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x1a, 0x23, 0x6c, 0x55, 0x46, 0x5f},
+            {0x50, 0x69, 0x1a, 0x23, 0x6c, 0x55, 0x46, 0x5f},
+            {0x10, 0x69, 0x1a, 0x23, 0x6c, 0x55, 0x26, 0x5f},
+            {0x10, 0x69, 0x1a, 0x23, 0x6c, 0x55, 0x26, 0x5f},
+            {0x10, 0x29, 0x1a, 0x23, 0x6c, 0x15, 0x26, 0x5f},
+            {0x10, 0x29, 0x1a, 0x23, 0x6c, 0x15, 0x26, 0x5f},
+            {0x10, 0x29, 0x3a, 0x23, 0x2c, 0x15, 0x26, 0x5f},
+            {0x10, 0x29, 0x3a, 0x23, 0x2c, 0x15, 0x26, 0x5f},
+            {0x10, 0x29, 0x3a, 0x33, 0x2c, 0x15, 0x26, 0x7f},
+            {0x10, 0x29, 0x3a, 0x33, 0x2c, 0x15, 0x26, 0x7f},
+            {0x18, 0x29, 0x3a, 0x33, 0x2c, 0x15, 0x36, 0x7f},
+            {0x18, 0x29, 0x3a, 0x33, 0x2c, 0x15, 0x36, 0x7f},
+            {0x18, 0x21, 0x3a, 0x33, 0x2c, 0x1d, 0x36, 0x7f},
+            {0x18, 0x21, 0x3a, 0x33, 0x2c, 0x1d, 0x36, 0x7f},
+            {0x18, 0x21, 0x2a, 0x33, 0x24, 0x1d, 0x36, 0x7f},
+            {0x18, 0x21, 0x2a, 0x33, 0x24, 0x1d, 0x36, 0x7f},
+            {0x18, 0x21, 0x2a, 0x13, 0x24, 0x1d, 0x36, 0x6f},
+            {0x18, 0x21, 0x2a, 0x13, 0x24, 0x1d, 0x36, 0x6f},
+            {0x58, 0x21, 0x2a, 0x13, 0x24, 0x1d, 0x16, 0x6f},
+            {0x58, 0x21, 0x2a, 0x13, 0x24, 0x1d, 0x16, 0x6f},
+            {0x58, 0x61, 0x2a, 0x13, 0x24, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x2a, 0x13, 0x24, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x4a, 0x13, 0x64, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x4a, 0x13, 0x64, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x16, 0x6f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x16, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x5d, 0x06, 0x4f}
+        },
+        {
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x1a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x1a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x1a, 0x23, 0x6c, 0x75, 0x46, 0x1f},
+            {0x50, 0x69, 0x1a, 0x23, 0x6c, 0x75, 0x46, 0x1f},
+            {0x10, 0x69, 0x1a, 0x23, 0x6c, 0x75, 0x26, 0x1f},
+            {0x10, 0x69, 0x1a, 0x23, 0x6c, 0x75, 0x26, 0x1f},
+            {0x10, 0x29, 0x1a, 0x23, 0x6c, 0x35, 0x26, 0x1f},
+            {0x10, 0x29, 0x1a, 0x23, 0x6c, 0x35, 0x26, 0x1f},
+            {0x10, 0x29, 0x3a, 0x23, 0x2c, 0x35, 0x26, 0x1f},
+            {0x10, 0x29, 0x3a, 0x23, 0x2c, 0x35, 0x26, 0x1f},
+            {0x10, 0x29, 0x3a, 0x33, 0x2c, 0x35, 0x26, 0x3f},
+            {0x10, 0x29, 0x3a, 0x33, 0x2c, 0x35, 0x26, 0x3f},
+            {0x18, 0x29, 0x3a, 0x33, 0x2c, 0x35, 0x36, 0x3f},
+            {0x18, 0x29, 0x3a, 0x33, 0x2c, 0x35, 0x36, 0x3f},
+            {0x18, 0x21, 0x3a, 0x33, 0x2c, 0x3d, 0x36, 0x3f},
+            {0x18, 0x21, 0x3a, 0x33, 0x2c, 0x3d, 0x36, 0x3f},
+            {0x18, 0x21, 0x2a, 0x33, 0x24, 0x3d, 0x36, 0x3f},
+            {0x18, 0x21, 0x2a, 0x33, 0x24, 0x3d, 0x36, 0x3f},
+            {0x18, 0x21, 0x2a, 0x13, 0x24, 0x3d, 0x36, 0x2f},
+            {0x18, 0x21, 0x2a, 0x13, 0x24, 0x3d, 0x36, 0x2f},
+            {0x58, 0x21, 0x2a, 0x13, 0x24, 0x3d, 0x16, 0x2f},
+            {0x58, 0x21, 0x2a, 0x13, 0x24, 0x3d, 0x16, 0x2f},
+            {0x58, 0x61, 0x2a, 0x13, 0x24, 0x7d, 0x16, 0x2f},
+            {0x58, 0x61, 0x2a, 0x13, 0x24, 0x7d, 0x16, 0x2f},
+            {0x58, 0x61, 0x4a, 0x13, 0x64, 0x7d, 0x16, 0x2f},
+            {0x58, 0x61, 0x4a, 0x13, 0x64, 0x7d, 0x16, 0x2f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x16, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x16, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x06, 0x4f}
+        },
+        {
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x0a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x1a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x1a, 0x43, 0x6c, 0x75, 0x46, 0x0f},
+            {0x50, 0x69, 0x1a, 0x23, 0x6c, 0x75, 0x46, 0x1f},
+            {0x50, 0x69, 0x1a, 0x23, 0x6c, 0x75, 0x46, 0x1f},
+            {0x10, 0x69, 0x1a, 0x23, 0x6c, 0x75, 0x26, 0x1f},
+            {0x10, 0x69, 0x1a, 0x23, 0x6c, 0x75, 0x26, 0x1f},
+            {0x10, 0x29, 0x1a, 0x23, 0x6c, 0x35, 0x26, 0x1f},
+            {0x10, 0x29, 0x1a, 0x23, 0x6c, 0x35, 0x26, 0x1f},
+            {0x10, 0x29, 0x3a, 0x23, 0x2c, 0x35, 0x26, 0x1f},
+            {0x10, 0x29, 0x3a, 0x23, 0x2c, 0x35, 0x26, 0x1f},
+            {0x10, 0x29, 0x3a, 0x33, 0x2c, 0x35, 0x26, 0x3f},
+            {0x10, 0x29, 0x3a, 0x33, 0x2c, 0x35, 0x26, 0x3f},
+            {0x18, 0x29, 0x3a, 0x33, 0x2c, 0x35, 0x36, 0x3f},
+            {0x18, 0x29, 0x3a, 0x33, 0x2c, 0x35, 0x36, 0x3f},
+            {0x18, 0x21, 0x3a, 0x33, 0x2c, 0x3d, 0x36, 0x3f},
+            {0x18, 0x21, 0x3a, 0x33, 0x2c, 0x3d, 0x36, 0x3f},
+            {0x18, 0x21, 0x2a, 0x33, 0x24, 0x3d, 0x36, 0x3f},
+            {0x18, 0x21, 0x2a, 0x33, 0x24, 0x3d, 0x36, 0x3f},
+            {0x18, 0x21, 0x2a, 0x13, 0x24, 0x3d, 0x36, 0x2f},
+            {0x18, 0x21, 0x2a, 0x13, 0x24, 0x3d, 0x36, 0x2f},
+            {0x58, 0x21, 0x2a, 0x13, 0x24, 0x3d, 0x16, 0x2f},
+            {0x58, 0x21, 0x2a, 0x13, 0x24, 0x3d, 0x16, 0x2f},
+            {0x58, 0x61, 0x2a, 0x13, 0x24, 0x7d, 0x16, 0x2f},
+            {0x58, 0x61, 0x2a, 0x13, 0x24, 0x7d, 0x16, 0x2f},
+            {0x58, 0x61, 0x4a, 0x13, 0x64, 0x7d, 0x16, 0x2f},
+            {0x58, 0x61, 0x4a, 0x13, 0x64, 0x7d, 0x16, 0x2f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x16, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x16, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x06, 0x4f},
+            {0x58, 0x61, 0x4a, 0x03, 0x64, 0x7d, 0x06, 0x4f}
+        },
+        {
+            {0x70, 0x69, 0x0a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x0a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x0a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x0a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x1a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x1a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x1a, 0x23, 0x7c, 0x75, 0x46, 0x1f},
+            {0x70, 0x69, 0x1a, 0x23, 0x7c, 0x75, 0x46, 0x1f},
+            {0x30, 0x69, 0x1a, 0x23, 0x7c, 0x75, 0x26, 0x1f},
+            {0x30, 0x69, 0x1a, 0x23, 0x7c, 0x75, 0x26, 0x1f},
+            {0x30, 0x29, 0x1a, 0x23, 0x7c, 0x35, 0x26, 0x1f},
+            {0x30, 0x29, 0x1a, 0x23, 0x7c, 0x35, 0x26, 0x1f},
+            {0x30, 0x29, 0x3a, 0x23, 0x3c, 0x35, 0x26, 0x1f},
+            {0x30, 0x29, 0x3a, 0x23, 0x3c, 0x35, 0x26, 0x1f},
+            {0x30, 0x29, 0x3a, 0x33, 0x3c, 0x35, 0x26, 0x3f},
+            {0x30, 0x29, 0x3a, 0x33, 0x3c, 0x35, 0x26, 0x3f},
+            {0x38, 0x29, 0x3a, 0x33, 0x3c, 0x35, 0x36, 0x3f},
+            {0x38, 0x29, 0x3a, 0x33, 0x3c, 0x35, 0x36, 0x3f},
+            {0x38, 0x21, 0x3a, 0x33, 0x3c, 0x3d, 0x36, 0x3f},
+            {0x38, 0x21, 0x3a, 0x33, 0x3c, 0x3d, 0x36, 0x3f},
+            {0x38, 0x21, 0x2a, 0x33, 0x34, 0x3d, 0x36, 0x3f},
+            {0x38, 0x21, 0x2a, 0x33, 0x34, 0x3d, 0x36, 0x3f},
+            {0x38, 0x21, 0x2a, 0x13, 0x34, 0x3d, 0x36, 0x2f},
+            {0x38, 0x21, 0x2a, 0x13, 0x34, 0x3d, 0x36, 0x2f},
+            {0x78, 0x21, 0x2a, 0x13, 0x34, 0x3d, 0x16, 0x2f},
+            {0x78, 0x21, 0x2a, 0x13, 0x34, 0x3d, 0x16, 0x2f},
+            {0x78, 0x61, 0x2a, 0x13, 0x34, 0x7d, 0x16, 0x2f},
+            {0x78, 0x61, 0x2a, 0x13, 0x34, 0x7d, 0x16, 0x2f},
+            {0x78, 0x61, 0x4a, 0x13, 0x74, 0x7d, 0x16, 0x2f},
+            {0x78, 0x61, 0x4a, 0x13, 0x74, 0x7d, 0x16, 0x2f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x16, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x16, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x06, 0x4f}
+        },
+        {
+            {0x70, 0x69, 0x0a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x0a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x0a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x0a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x1a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x1a, 0x43, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x69, 0x1a, 0x23, 0x7c, 0x75, 0x46, 0x1f},
+            {0x70, 0x69, 0x1a, 0x23, 0x7c, 0x75, 0x46, 0x1f},
+            {0x30, 0x69, 0x1a, 0x23, 0x7c, 0x75, 0x26, 0x1f},
+            {0x30, 0x69, 0x1a, 0x23, 0x7c, 0x75, 0x26, 0x1f},
+            {0x30, 0x29, 0x1a, 0x23, 0x7c, 0x35, 0x26, 0x1f},
+            {0x30, 0x29, 0x1a, 0x23, 0x7c, 0x35, 0x26, 0x1f},
+            {0x30, 0x29, 0x3a, 0x23, 0x3c, 0x35, 0x26, 0x1f},
+            {0x30, 0x29, 0x3a, 0x23, 0x3c, 0x35, 0x26, 0x1f},
+            {0x30, 0x29, 0x3a, 0x33, 0x3c, 0x35, 0x26, 0x3f},
+            {0x30, 0x29, 0x3a, 0x33, 0x3c, 0x35, 0x26, 0x3f},
+            {0x38, 0x29, 0x3a, 0x33, 0x3c, 0x35, 0x36, 0x3f},
+            {0x38, 0x29, 0x3a, 0x33, 0x3c, 0x35, 0x36, 0x3f},
+            {0x38, 0x21, 0x3a, 0x33, 0x3c, 0x3d, 0x36, 0x3f},
+            {0x38, 0x21, 0x3a, 0x33, 0x3c, 0x3d, 0x36, 0x3f},
+            {0x38, 0x21, 0x2a, 0x33, 0x34, 0x3d, 0x36, 0x3f},
+            {0x38, 0x21, 0x2a, 0x33, 0x34, 0x3d, 0x36, 0x3f},
+            {0x38, 0x21, 0x2a, 0x13, 0x34, 0x3d, 0x36, 0x2f},
+            {0x38, 0x21, 0x2a, 0x13, 0x34, 0x3d, 0x36, 0x2f},
+            {0x78, 0x21, 0x2a, 0x13, 0x34, 0x3d, 0x16, 0x2f},
+            {0x78, 0x21, 0x2a, 0x13, 0x34, 0x3d, 0x16, 0x2f},
+            {0x78, 0x61, 0x2a, 0x13, 0x34, 0x7d, 0x16, 0x2f},
+            {0x78, 0x61, 0x2a, 0x13, 0x34, 0x7d, 0x16, 0x2f},
+            {0x78, 0x61, 0x4a, 0x13, 0x74, 0x7d, 0x16, 0x2f},
+            {0x78, 0x61, 0x4a, 0x13, 0x74, 0x7d, 0x16, 0x2f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x16, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x16, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x61, 0x4a, 0x03, 0x74, 0x7d, 0x06, 0x4f}
+        },
+        {
+            {0x70, 0x79, 0x0a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x0a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x0a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x0a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x1a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x1a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x1a, 0x2b, 0x7c, 0x75, 0x46, 0x1f},
+            {0x70, 0x79, 0x1a, 0x2b, 0x7c, 0x75, 0x46, 0x1f},
+            {0x30, 0x79, 0x1a, 0x2b, 0x7c, 0x75, 0x26, 0x1f},
+            {0x30, 0x79, 0x1a, 0x2b, 0x7c, 0x75, 0x26, 0x1f},
+            {0x30, 0x39, 0x1a, 0x2b, 0x7c, 0x35, 0x26, 0x1f},
+            {0x30, 0x39, 0x1a, 0x2b, 0x7c, 0x35, 0x26, 0x1f},
+            {0x30, 0x39, 0x3a, 0x2b, 0x3c, 0x35, 0x26, 0x1f},
+            {0x30, 0x39, 0x3a, 0x2b, 0x3c, 0x35, 0x26, 0x1f},
+            {0x30, 0x39, 0x3a, 0x3b, 0x3c, 0x35, 0x26, 0x3f},
+            {0x30, 0x39, 0x3a, 0x3b, 0x3c, 0x35, 0x26, 0x3f},
+            {0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x35, 0x36, 0x3f},
+            {0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x35, 0x36, 0x3f},
+            {0x38, 0x31, 0x3a, 0x3b, 0x3c, 0x3d, 0x36, 0x3f},
+            {0x38, 0x31, 0x3a, 0x3b, 0x3c, 0x3d, 0x36, 0x3f},
+            {0x38, 0x31, 0x2a, 0x3b, 0x34, 0x3d, 0x36, 0x3f},
+            {0x38, 0x31, 0x2a, 0x3b, 0x34, 0x3d, 0x36, 0x3f},
+            {0x38, 0x31, 0x2a, 0x1b, 0x34, 0x3d, 0x36, 0x2f},
+            {0x38, 0x31, 0x2a, 0x1b, 0x34, 0x3d, 0x36, 0x2f},
+            {0x78, 0x31, 0x2a, 0x1b, 0x34, 0x3d, 0x16, 0x2f},
+            {0x78, 0x31, 0x2a, 0x1b, 0x34, 0x3d, 0x16, 0x2f},
+            {0x78, 0x71, 0x2a, 0x1b, 0x34, 0x7d, 0x16, 0x2f},
+            {0x78, 0x71, 0x2a, 0x1b, 0x34, 0x7d, 0x16, 0x2f},
+            {0x78, 0x71, 0x4a, 0x1b, 0x74, 0x7d, 0x16, 0x2f},
+            {0x78, 0x71, 0x4a, 0x1b, 0x74, 0x7d, 0x16, 0x2f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x16, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x16, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x06, 0x4f}
+        },
+        {
+            {0x70, 0x79, 0x0a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x0a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x0a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x0a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x1a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x1a, 0x4b, 0x7c, 0x75, 0x46, 0x0f},
+            {0x70, 0x79, 0x1a, 0x2b, 0x7c, 0x75, 0x46, 0x1f},
+            {0x70, 0x79, 0x1a, 0x2b, 0x7c, 0x75, 0x46, 0x1f},
+            {0x30, 0x79, 0x1a, 0x2b, 0x7c, 0x75, 0x26, 0x1f},
+            {0x30, 0x79, 0x1a, 0x2b, 0x7c, 0x75, 0x26, 0x1f},
+            {0x30, 0x39, 0x1a, 0x2b, 0x7c, 0x35, 0x26, 0x1f},
+            {0x30, 0x39, 0x1a, 0x2b, 0x7c, 0x35, 0x26, 0x1f},
+            {0x30, 0x39, 0x3a, 0x2b, 0x3c, 0x35, 0x26, 0x1f},
+            {0x30, 0x39, 0x3a, 0x2b, 0x3c, 0x35, 0x26, 0x1f},
+            {0x30, 0x39, 0x3a, 0x3b, 0x3c, 0x35, 0x26, 0x3f},
+            {0x30, 0x39, 0x3a, 0x3b, 0x3c, 0x35, 0x26, 0x3f},
+            {0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x35, 0x36, 0x3f},
+            {0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x35, 0x36, 0x3f},
+            {0x38, 0x31, 0x3a, 0x3b, 0x3c, 0x3d, 0x36, 0x3f},
+            {0x38, 0x31, 0x3a, 0x3b, 0x3c, 0x3d, 0x36, 0x3f},
+            {0x38, 0x31, 0x2a, 0x3b, 0x34, 0x3d, 0x36, 0x3f},
+            {0x38, 0x31, 0x2a, 0x3b, 0x34, 0x3d, 0x36, 0x3f},
+            {0x38, 0x31, 0x2a, 0x1b, 0x34, 0x3d, 0x36, 0x2f},
+            {0x38, 0x31, 0x2a, 0x1b, 0x34, 0x3d, 0x36, 0x2f},
+            {0x78, 0x31, 0x2a, 0x1b, 0x34, 0x3d, 0x16, 0x2f},
+            {0x78, 0x31, 0x2a, 0x1b, 0x34, 0x3d, 0x16, 0x2f},
+            {0x78, 0x71, 0x2a, 0x1b, 0x34, 0x7d, 0x16, 0x2f},
+            {0x78, 0x71, 0x2a, 0x1b, 0x34, 0x7d, 0x16, 0x2f},
+            {0x78, 0x71, 0x4a, 0x1b, 0x74, 0x7d, 0x16, 0x2f},
+            {0x78, 0x71, 0x4a, 0x1b, 0x74, 0x7d, 0x16, 0x2f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x16, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x16, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x06, 0x4f},
+            {0x78, 0x71, 0x4a, 0x0b, 0x74, 0x7d, 0x06, 0x4f}
+        },
+        {
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x12, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x12, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x12, 0x2b, 0x7c, 0x75, 0x4e, 0x1f},
+            {0x70, 0x79, 0x12, 0x2b, 0x7c, 0x75, 0x4e, 0x1f},
+            {0x30, 0x79, 0x12, 0x2b, 0x7c, 0x75, 0x2e, 0x1f},
+            {0x30, 0x79, 0x12, 0x2b, 0x7c, 0x75, 0x2e, 0x1f},
+            {0x30, 0x39, 0x12, 0x2b, 0x7c, 0x35, 0x2e, 0x1f},
+            {0x30, 0x39, 0x12, 0x2b, 0x7c, 0x35, 0x2e, 0x1f},
+            {0x30, 0x39, 0x32, 0x2b, 0x3c, 0x35, 0x2e, 0x1f},
+            {0x30, 0x39, 0x32, 0x2b, 0x3c, 0x35, 0x2e, 0x1f},
+            {0x30, 0x39, 0x32, 0x3b, 0x3c, 0x35, 0x2e, 0x3f},
+            {0x30, 0x39, 0x32, 0x3b, 0x3c, 0x35, 0x2e, 0x3f},
+            {0x38, 0x39, 0x32, 0x3b, 0x3c, 0x35, 0x3e, 0x3f},
+            {0x38, 0x39, 0x32, 0x3b, 0x3c, 0x35, 0x3e, 0x3f},
+            {0x38, 0x31, 0x32, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f},
+            {0x38, 0x31, 0x32, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f},
+            {0x38, 0x31, 0x22, 0x3b, 0x34, 0x3d, 0x3e, 0x3f},
+            {0x38, 0x31, 0x22, 0x3b, 0x34, 0x3d, 0x3e, 0x3f},
+            {0x38, 0x31, 0x22, 0x1b, 0x34, 0x3d, 0x3e, 0x2f},
+            {0x38, 0x31, 0x22, 0x1b, 0x34, 0x3d, 0x3e, 0x2f},
+            {0x78, 0x31, 0x22, 0x1b, 0x34, 0x3d, 0x1e, 0x2f},
+            {0x78, 0x31, 0x22, 0x1b, 0x34, 0x3d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x22, 0x1b, 0x34, 0x7d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x22, 0x1b, 0x34, 0x7d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x42, 0x1b, 0x74, 0x7d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x42, 0x1b, 0x74, 0x7d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x1e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x1e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x0e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x0e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x0e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x0e, 0x4f}
+        },
+        {
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x12, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x12, 0x4b, 0x7c, 0x75, 0x4e, 0x0f},
+            {0x70, 0x79, 0x12, 0x2b, 0x7c, 0x75, 0x4e, 0x1f},
+            {0x70, 0x79, 0x12, 0x2b, 0x7c, 0x75, 0x4e, 0x1f},
+            {0x30, 0x79, 0x12, 0x2b, 0x7c, 0x75, 0x2e, 0x1f},
+            {0x30, 0x79, 0x12, 0x2b, 0x7c, 0x75, 0x2e, 0x1f},
+            {0x30, 0x39, 0x12, 0x2b, 0x7c, 0x35, 0x2e, 0x1f},
+            {0x30, 0x39, 0x12, 0x2b, 0x7c, 0x35, 0x2e, 0x1f},
+            {0x30, 0x39, 0x32, 0x2b, 0x3c, 0x35, 0x2e, 0x1f},
+            {0x30, 0x39, 0x32, 0x2b, 0x3c, 0x35, 0x2e, 0x1f},
+            {0x30, 0x39, 0x32, 0x3b, 0x3c, 0x35, 0x2e, 0x3f},
+            {0x30, 0x39, 0x32, 0x3b, 0x3c, 0x35, 0x2e, 0x3f},
+            {0x38, 0x39, 0x32, 0x3b, 0x3c, 0x35, 0x3e, 0x3f},
+            {0x38, 0x39, 0x32, 0x3b, 0x3c, 0x35, 0x3e, 0x3f},
+            {0x38, 0x31, 0x32, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f},
+            {0x38, 0x31, 0x32, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f},
+            {0x38, 0x31, 0x22, 0x3b, 0x34, 0x3d, 0x3e, 0x3f},
+            {0x38, 0x31, 0x22, 0x3b, 0x34, 0x3d, 0x3e, 0x3f},
+            {0x38, 0x31, 0x22, 0x1b, 0x34, 0x3d, 0x3e, 0x2f},
+            {0x38, 0x31, 0x22, 0x1b, 0x34, 0x3d, 0x3e, 0x2f},
+            {0x78, 0x31, 0x22, 0x1b, 0x34, 0x3d, 0x1e, 0x2f},
+            {0x78, 0x31, 0x22, 0x1b, 0x34, 0x3d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x22, 0x1b, 0x34, 0x7d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x22, 0x1b, 0x34, 0x7d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x42, 0x1b, 0x74, 0x7d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x42, 0x1b, 0x74, 0x7d, 0x1e, 0x2f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x1e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x1e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x0e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x0e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x0e, 0x4f},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x7d, 0x0e, 0x4f}
+        },
+        {
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x12, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x12, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x12, 0x2b, 0x7c, 0x65, 0x4e, 0x17},
+            {0x70, 0x79, 0x12, 0x2b, 0x7c, 0x65, 0x4e, 0x17},
+            {0x30, 0x79, 0x12, 0x2b, 0x7c, 0x65, 0x2e, 0x17},
+            {0x30, 0x79, 0x12, 0x2b, 0x7c, 0x65, 0x2e, 0x17},
+            {0x30, 0x39, 0x12, 0x2b, 0x7c, 0x25, 0x2e, 0x17},
+            {0x30, 0x39, 0x12, 0x2b, 0x7c, 0x25, 0x2e, 0x17},
+            {0x30, 0x39, 0x32, 0x2b, 0x3c, 0x25, 0x2e, 0x17},
+            {0x30, 0x39, 0x32, 0x2b, 0x3c, 0x25, 0x2e, 0x17},
+            {0x30, 0x39, 0x32, 0x3b, 0x3c, 0x25, 0x2e, 0x37},
+            {0x30, 0x39, 0x32, 0x3b, 0x3c, 0x25, 0x2e, 0x37},
+            {0x38, 0x39, 0x32, 0x3b, 0x3c, 0x25, 0x3e, 0x37},
+            {0x38, 0x39, 0x32, 0x3b, 0x3c, 0x25, 0x3e, 0x37},
+            {0x38, 0x31, 0x32, 0x3b, 0x3c, 0x2d, 0x3e, 0x37},
+            {0x38, 0x31, 0x32, 0x3b, 0x3c, 0x2d, 0x3e, 0x37},
+            {0x38, 0x31, 0x22, 0x3b, 0x34, 0x2d, 0x3e, 0x37},
+            {0x38, 0x31, 0x22, 0x3b, 0x34, 0x2d, 0x3e, 0x37},
+            {0x38, 0x31, 0x22, 0x1b, 0x34, 0x2d, 0x3e, 0x27},
+            {0x38, 0x31, 0x22, 0x1b, 0x34, 0x2d, 0x3e, 0x27},
+            {0x78, 0x31, 0x22, 0x1b, 0x34, 0x2d, 0x1e, 0x27},
+            {0x78, 0x31, 0x22, 0x1b, 0x34, 0x2d, 0x1e, 0x27},
+            {0x78, 0x71, 0x22, 0x1b, 0x34, 0x6d, 0x1e, 0x27},
+            {0x78, 0x71, 0x22, 0x1b, 0x34, 0x6d, 0x1e, 0x27},
+            {0x78, 0x71, 0x42, 0x1b, 0x74, 0x6d, 0x1e, 0x27},
+            {0x78, 0x71, 0x42, 0x1b, 0x74, 0x6d, 0x1e, 0x27},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x1e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x1e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x0e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x0e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x0e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x02, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x12, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x12, 0x4b, 0x7c, 0x65, 0x4e, 0x07},
+            {0x70, 0x79, 0x12, 0x2b, 0x7c, 0x65, 0x4e, 0x17},
+            {0x70, 0x79, 0x12, 0x2b, 0x7c, 0x65, 0x4e, 0x17},
+            {0x30, 0x79, 0x12, 0x2b, 0x7c, 0x65, 0x2e, 0x17},
+            {0x30, 0x79, 0x12, 0x2b, 0x7c, 0x65, 0x2e, 0x17},
+            {0x30, 0x39, 0x12, 0x2b, 0x7c, 0x25, 0x2e, 0x17},
+            {0x30, 0x39, 0x12, 0x2b, 0x7c, 0x25, 0x2e, 0x17},
+            {0x30, 0x39, 0x32, 0x2b, 0x3c, 0x25, 0x2e, 0x17},
+            {0x30, 0x39, 0x32, 0x2b, 0x3c, 0x25, 0x2e, 0x17},
+            {0x30, 0x39, 0x32, 0x3b, 0x3c, 0x25, 0x2e, 0x37},
+            {0x30, 0x39, 0x32, 0x3b, 0x3c, 0x25, 0x2e, 0x37},
+            {0x38, 0x39, 0x32, 0x3b, 0x3c, 0x25, 0x3e, 0x37},
+            {0x38, 0x39, 0x32, 0x3b, 0x3c, 0x25, 0x3e, 0x37},
+            {0x38, 0x31, 0x32, 0x3b, 0x3c, 0x2d, 0x3e, 0x37},
+            {0x38, 0x31, 0x32, 0x3b, 0x3c, 0x2d, 0x3e, 0x37},
+            {0x38, 0x31, 0x22, 0x3b, 0x34, 0x2d, 0x3e, 0x37},
+            {0x38, 0x31, 0x22, 0x3b, 0x34, 0x2d, 0x3e, 0x37},
+            {0x38, 0x31, 0x22, 0x1b, 0x34, 0x2d, 0x3e, 0x27},
+            {0x38, 0x31, 0x22, 0x1b, 0x34, 0x2d, 0x3e, 0x27},
+            {0x78, 0x31, 0x22, 0x1b, 0x34, 0x2d, 0x1e, 0x27},
+            {0x78, 0x31, 0x22, 0x1b, 0x34, 0x2d, 0x1e, 0x27},
+            {0x78, 0x71, 0x22, 0x1b, 0x34, 0x6d, 0x1e, 0x27},
+            {0x78, 0x71, 0x22, 0x1b, 0x34, 0x6d, 0x1e, 0x27},
+            {0x78, 0x71, 0x42, 0x1b, 0x74, 0x6d, 0x1e, 0x27},
+            {0x78, 0x71, 0x42, 0x1b, 0x74, 0x6d, 0x1e, 0x27},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x1e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x1e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x0e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x0e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x0e, 0x47},
+            {0x78, 0x71, 0x42, 0x0b, 0x74, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x60, 0x79, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x12, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x12, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x12, 0x2b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x60, 0x79, 0x12, 0x2b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x20, 0x79, 0x12, 0x2b, 0x5c, 0x65, 0x2e, 0x17},
+            {0x20, 0x79, 0x12, 0x2b, 0x5c, 0x65, 0x2e, 0x17},
+            {0x20, 0x39, 0x12, 0x2b, 0x5c, 0x25, 0x2e, 0x17},
+            {0x20, 0x39, 0x12, 0x2b, 0x5c, 0x25, 0x2e, 0x17},
+            {0x20, 0x39, 0x32, 0x2b, 0x1c, 0x25, 0x2e, 0x17},
+            {0x20, 0x39, 0x32, 0x2b, 0x1c, 0x25, 0x2e, 0x17},
+            {0x20, 0x39, 0x32, 0x3b, 0x1c, 0x25, 0x2e, 0x37},
+            {0x20, 0x39, 0x32, 0x3b, 0x1c, 0x25, 0x2e, 0x37},
+            {0x28, 0x39, 0x32, 0x3b, 0x1c, 0x25, 0x3e, 0x37},
+            {0x28, 0x39, 0x32, 0x3b, 0x1c, 0x25, 0x3e, 0x37},
+            {0x28, 0x31, 0x32, 0x3b, 0x1c, 0x2d, 0x3e, 0x37},
+            {0x28, 0x31, 0x32, 0x3b, 0x1c, 0x2d, 0x3e, 0x37},
+            {0x28, 0x31, 0x22, 0x3b, 0x14, 0x2d, 0x3e, 0x37},
+            {0x28, 0x31, 0x22, 0x3b, 0x14, 0x2d, 0x3e, 0x37},
+            {0x28, 0x31, 0x22, 0x1b, 0x14, 0x2d, 0x3e, 0x27},
+            {0x28, 0x31, 0x22, 0x1b, 0x14, 0x2d, 0x3e, 0x27},
+            {0x68, 0x31, 0x22, 0x1b, 0x14, 0x2d, 0x1e, 0x27},
+            {0x68, 0x31, 0x22, 0x1b, 0x14, 0x2d, 0x1e, 0x27},
+            {0x68, 0x71, 0x22, 0x1b, 0x14, 0x6d, 0x1e, 0x27},
+            {0x68, 0x71, 0x22, 0x1b, 0x14, 0x6d, 0x1e, 0x27},
+            {0x68, 0x71, 0x42, 0x1b, 0x54, 0x6d, 0x1e, 0x27},
+            {0x68, 0x71, 0x42, 0x1b, 0x54, 0x6d, 0x1e, 0x27},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x1e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x1e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x60, 0x79, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x12, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x12, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x79, 0x12, 0x2b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x60, 0x79, 0x12, 0x2b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x20, 0x79, 0x12, 0x2b, 0x5c, 0x65, 0x2e, 0x17},
+            {0x20, 0x79, 0x12, 0x2b, 0x5c, 0x65, 0x2e, 0x17},
+            {0x20, 0x39, 0x12, 0x2b, 0x5c, 0x25, 0x2e, 0x17},
+            {0x20, 0x39, 0x12, 0x2b, 0x5c, 0x25, 0x2e, 0x17},
+            {0x20, 0x39, 0x32, 0x2b, 0x1c, 0x25, 0x2e, 0x17},
+            {0x20, 0x39, 0x32, 0x2b, 0x1c, 0x25, 0x2e, 0x17},
+            {0x20, 0x39, 0x32, 0x3b, 0x1c, 0x25, 0x2e, 0x37},
+            {0x20, 0x39, 0x32, 0x3b, 0x1c, 0x25, 0x2e, 0x37},
+            {0x28, 0x39, 0x32, 0x3b, 0x1c, 0x25, 0x3e, 0x37},
+            {0x28, 0x39, 0x32, 0x3b, 0x1c, 0x25, 0x3e, 0x37},
+            {0x28, 0x31, 0x32, 0x3b, 0x1c, 0x2d, 0x3e, 0x37},
+            {0x28, 0x31, 0x32, 0x3b, 0x1c, 0x2d, 0x3e, 0x37},
+            {0x28, 0x31, 0x22, 0x3b, 0x14, 0x2d, 0x3e, 0x37},
+            {0x28, 0x31, 0x22, 0x3b, 0x14, 0x2d, 0x3e, 0x37},
+            {0x28, 0x31, 0x22, 0x1b, 0x14, 0x2d, 0x3e, 0x27},
+            {0x28, 0x31, 0x22, 0x1b, 0x14, 0x2d, 0x3e, 0x27},
+            {0x68, 0x31, 0x22, 0x1b, 0x14, 0x2d, 0x1e, 0x27},
+            {0x68, 0x31, 0x22, 0x1b, 0x14, 0x2d, 0x1e, 0x27},
+            {0x68, 0x71, 0x22, 0x1b, 0x14, 0x6d, 0x1e, 0x27},
+            {0x68, 0x71, 0x22, 0x1b, 0x14, 0x6d, 0x1e, 0x27},
+            {0x68, 0x71, 0x42, 0x1b, 0x54, 0x6d, 0x1e, 0x27},
+            {0x68, 0x71, 0x42, 0x1b, 0x54, 0x6d, 0x1e, 0x27},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x1e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x1e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x71, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x12, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x12, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x12, 0x6b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x60, 0x59, 0x12, 0x6b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x20, 0x59, 0x12, 0x6b, 0x5c, 0x65, 0x2e, 0x17},
+            {0x20, 0x59, 0x12, 0x6b, 0x5c, 0x65, 0x2e, 0x17},
+            {0x20, 0x19, 0x12, 0x6b, 0x5c, 0x25, 0x2e, 0x17},
+            {0x20, 0x19, 0x12, 0x6b, 0x5c, 0x25, 0x2e, 0x17},
+            {0x20, 0x19, 0x32, 0x6b, 0x1c, 0x25, 0x2e, 0x17},
+            {0x20, 0x19, 0x32, 0x6b, 0x1c, 0x25, 0x2e, 0x17},
+            {0x20, 0x19, 0x32, 0x7b, 0x1c, 0x25, 0x2e, 0x37},
+            {0x20, 0x19, 0x32, 0x7b, 0x1c, 0x25, 0x2e, 0x37},
+            {0x28, 0x19, 0x32, 0x7b, 0x1c, 0x25, 0x3e, 0x37},
+            {0x28, 0x19, 0x32, 0x7b, 0x1c, 0x25, 0x3e, 0x37},
+            {0x28, 0x11, 0x32, 0x7b, 0x1c, 0x2d, 0x3e, 0x37},
+            {0x28, 0x11, 0x32, 0x7b, 0x1c, 0x2d, 0x3e, 0x37},
+            {0x28, 0x11, 0x22, 0x7b, 0x14, 0x2d, 0x3e, 0x37},
+            {0x28, 0x11, 0x22, 0x7b, 0x14, 0x2d, 0x3e, 0x37},
+            {0x28, 0x11, 0x22, 0x5b, 0x14, 0x2d, 0x3e, 0x27},
+            {0x28, 0x11, 0x22, 0x5b, 0x14, 0x2d, 0x3e, 0x27},
+            {0x68, 0x11, 0x22, 0x5b, 0x14, 0x2d, 0x1e, 0x27},
+            {0x68, 0x11, 0x22, 0x5b, 0x14, 0x2d, 0x1e, 0x27},
+            {0x68, 0x51, 0x22, 0x5b, 0x14, 0x6d, 0x1e, 0x27},
+            {0x68, 0x51, 0x22, 0x5b, 0x14, 0x6d, 0x1e, 0x27},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x1e, 0x27},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x1e, 0x27},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x1e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x1e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x12, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x12, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x12, 0x6b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x60, 0x59, 0x12, 0x6b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x20, 0x59, 0x12, 0x6b, 0x5c, 0x65, 0x2e, 0x17},
+            {0x20, 0x59, 0x12, 0x6b, 0x5c, 0x65, 0x2e, 0x17},
+            {0x20, 0x19, 0x12, 0x6b, 0x5c, 0x25, 0x2e, 0x17},
+            {0x20, 0x19, 0x12, 0x6b, 0x5c, 0x25, 0x2e, 0x17},
+            {0x20, 0x19, 0x32, 0x6b, 0x1c, 0x25, 0x2e, 0x17},
+            {0x20, 0x19, 0x32, 0x6b, 0x1c, 0x25, 0x2e, 0x17},
+            {0x20, 0x19, 0x32, 0x7b, 0x1c, 0x25, 0x2e, 0x37},
+            {0x20, 0x19, 0x32, 0x7b, 0x1c, 0x25, 0x2e, 0x37},
+            {0x28, 0x19, 0x32, 0x7b, 0x1c, 0x25, 0x3e, 0x37},
+            {0x28, 0x19, 0x32, 0x7b, 0x1c, 0x25, 0x3e, 0x37},
+            {0x28, 0x11, 0x32, 0x7b, 0x1c, 0x2d, 0x3e, 0x37},
+            {0x28, 0x11, 0x32, 0x7b, 0x1c, 0x2d, 0x3e, 0x37},
+            {0x28, 0x11, 0x22, 0x7b, 0x14, 0x2d, 0x3e, 0x37},
+            {0x28, 0x11, 0x22, 0x7b, 0x14, 0x2d, 0x3e, 0x37},
+            {0x28, 0x11, 0x22, 0x5b, 0x14, 0x2d, 0x3e, 0x27},
+            {0x28, 0x11, 0x22, 0x5b, 0x14, 0x2d, 0x3e, 0x27},
+            {0x68, 0x11, 0x22, 0x5b, 0x14, 0x2d, 0x1e, 0x27},
+            {0x68, 0x11, 0x22, 0x5b, 0x14, 0x2d, 0x1e, 0x27},
+            {0x68, 0x51, 0x22, 0x5b, 0x14, 0x6d, 0x1e, 0x27},
+            {0x68, 0x51, 0x22, 0x5b, 0x14, 0x6d, 0x1e, 0x27},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x1e, 0x27},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x1e, 0x27},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x1e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x1e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x20, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x17},
+            {0x20, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x17},
+            {0x20, 0x19, 0x52, 0x6b, 0x5c, 0x25, 0x6e, 0x17},
+            {0x20, 0x19, 0x52, 0x6b, 0x5c, 0x25, 0x6e, 0x17},
+            {0x20, 0x19, 0x72, 0x6b, 0x1c, 0x25, 0x6e, 0x17},
+            {0x20, 0x19, 0x72, 0x6b, 0x1c, 0x25, 0x6e, 0x17},
+            {0x20, 0x19, 0x72, 0x7b, 0x1c, 0x25, 0x6e, 0x37},
+            {0x20, 0x19, 0x72, 0x7b, 0x1c, 0x25, 0x6e, 0x37},
+            {0x28, 0x19, 0x72, 0x7b, 0x1c, 0x25, 0x7e, 0x37},
+            {0x28, 0x19, 0x72, 0x7b, 0x1c, 0x25, 0x7e, 0x37},
+            {0x28, 0x11, 0x72, 0x7b, 0x1c, 0x2d, 0x7e, 0x37},
+            {0x28, 0x11, 0x72, 0x7b, 0x1c, 0x2d, 0x7e, 0x37},
+            {0x28, 0x11, 0x62, 0x7b, 0x14, 0x2d, 0x7e, 0x37},
+            {0x28, 0x11, 0x62, 0x7b, 0x14, 0x2d, 0x7e, 0x37},
+            {0x28, 0x11, 0x62, 0x5b, 0x14, 0x2d, 0x7e, 0x27},
+            {0x28, 0x11, 0x62, 0x5b, 0x14, 0x2d, 0x7e, 0x27},
+            {0x68, 0x11, 0x62, 0x5b, 0x14, 0x2d, 0x5e, 0x27},
+            {0x68, 0x11, 0x62, 0x5b, 0x14, 0x2d, 0x5e, 0x27},
+            {0x68, 0x51, 0x62, 0x5b, 0x14, 0x6d, 0x5e, 0x27},
+            {0x68, 0x51, 0x62, 0x5b, 0x14, 0x6d, 0x5e, 0x27},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x27},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x27},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x17},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x17},
+            {0x20, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x17},
+            {0x20, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x17},
+            {0x20, 0x19, 0x52, 0x6b, 0x5c, 0x25, 0x6e, 0x17},
+            {0x20, 0x19, 0x52, 0x6b, 0x5c, 0x25, 0x6e, 0x17},
+            {0x20, 0x19, 0x72, 0x6b, 0x1c, 0x25, 0x6e, 0x17},
+            {0x20, 0x19, 0x72, 0x6b, 0x1c, 0x25, 0x6e, 0x17},
+            {0x20, 0x19, 0x72, 0x7b, 0x1c, 0x25, 0x6e, 0x37},
+            {0x20, 0x19, 0x72, 0x7b, 0x1c, 0x25, 0x6e, 0x37},
+            {0x28, 0x19, 0x72, 0x7b, 0x1c, 0x25, 0x7e, 0x37},
+            {0x28, 0x19, 0x72, 0x7b, 0x1c, 0x25, 0x7e, 0x37},
+            {0x28, 0x11, 0x72, 0x7b, 0x1c, 0x2d, 0x7e, 0x37},
+            {0x28, 0x11, 0x72, 0x7b, 0x1c, 0x2d, 0x7e, 0x37},
+            {0x28, 0x11, 0x62, 0x7b, 0x14, 0x2d, 0x7e, 0x37},
+            {0x28, 0x11, 0x62, 0x7b, 0x14, 0x2d, 0x7e, 0x37},
+            {0x28, 0x11, 0x62, 0x5b, 0x14, 0x2d, 0x7e, 0x27},
+            {0x28, 0x11, 0x62, 0x5b, 0x14, 0x2d, 0x7e, 0x27},
+            {0x68, 0x11, 0x62, 0x5b, 0x14, 0x2d, 0x5e, 0x27},
+            {0x68, 0x11, 0x62, 0x5b, 0x14, 0x2d, 0x5e, 0x27},
+            {0x68, 0x51, 0x62, 0x5b, 0x14, 0x6d, 0x5e, 0x27},
+            {0x68, 0x51, 0x62, 0x5b, 0x14, 0x6d, 0x5e, 0x27},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x27},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x27},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x20, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x20, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x20, 0x19, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x20, 0x19, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x20, 0x19, 0x72, 0x6b, 0x1c, 0x45, 0x6e, 0x57},
+            {0x20, 0x19, 0x72, 0x6b, 0x1c, 0x45, 0x6e, 0x57},
+            {0x20, 0x19, 0x72, 0x7b, 0x1c, 0x45, 0x6e, 0x77},
+            {0x20, 0x19, 0x72, 0x7b, 0x1c, 0x45, 0x6e, 0x77},
+            {0x28, 0x19, 0x72, 0x7b, 0x1c, 0x45, 0x7e, 0x77},
+            {0x28, 0x19, 0x72, 0x7b, 0x1c, 0x45, 0x7e, 0x77},
+            {0x28, 0x11, 0x72, 0x7b, 0x1c, 0x4d, 0x7e, 0x77},
+            {0x28, 0x11, 0x72, 0x7b, 0x1c, 0x4d, 0x7e, 0x77},
+            {0x28, 0x11, 0x62, 0x7b, 0x14, 0x4d, 0x7e, 0x77},
+            {0x28, 0x11, 0x62, 0x7b, 0x14, 0x4d, 0x7e, 0x77},
+            {0x28, 0x11, 0x62, 0x5b, 0x14, 0x4d, 0x7e, 0x67},
+            {0x28, 0x11, 0x62, 0x5b, 0x14, 0x4d, 0x7e, 0x67},
+            {0x68, 0x11, 0x62, 0x5b, 0x14, 0x4d, 0x5e, 0x67},
+            {0x68, 0x11, 0x62, 0x5b, 0x14, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x14, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x14, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x02, 0x4b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x20, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x20, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x20, 0x19, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x20, 0x19, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x20, 0x19, 0x72, 0x6b, 0x1c, 0x45, 0x6e, 0x57},
+            {0x20, 0x19, 0x72, 0x6b, 0x1c, 0x45, 0x6e, 0x57},
+            {0x20, 0x19, 0x72, 0x7b, 0x1c, 0x45, 0x6e, 0x77},
+            {0x20, 0x19, 0x72, 0x7b, 0x1c, 0x45, 0x6e, 0x77},
+            {0x28, 0x19, 0x72, 0x7b, 0x1c, 0x45, 0x7e, 0x77},
+            {0x28, 0x19, 0x72, 0x7b, 0x1c, 0x45, 0x7e, 0x77},
+            {0x28, 0x11, 0x72, 0x7b, 0x1c, 0x4d, 0x7e, 0x77},
+            {0x28, 0x11, 0x72, 0x7b, 0x1c, 0x4d, 0x7e, 0x77},
+            {0x28, 0x11, 0x62, 0x7b, 0x14, 0x4d, 0x7e, 0x77},
+            {0x28, 0x11, 0x62, 0x7b, 0x14, 0x4d, 0x7e, 0x77},
+            {0x28, 0x11, 0x62, 0x5b, 0x14, 0x4d, 0x7e, 0x67},
+            {0x28, 0x11, 0x62, 0x5b, 0x14, 0x4d, 0x7e, 0x67},
+            {0x68, 0x11, 0x62, 0x5b, 0x14, 0x4d, 0x5e, 0x67},
+            {0x68, 0x11, 0x62, 0x5b, 0x14, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x14, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x14, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x0b, 0x54, 0x6d, 0x0e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x40, 0x19, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x48, 0x19, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x19, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x11, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x11, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x11, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x11, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x11, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x11, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x68, 0x11, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x11, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x19, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x40, 0x19, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x48, 0x19, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x19, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x11, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x11, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x11, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x11, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x11, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x11, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x11, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x11, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x40, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x48, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x01, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x4e, 0x07},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x40, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x48, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x01, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x42, 0x5b, 0x54, 0x6d, 0x5e, 0x47}
+        },
+        {
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x40, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x48, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x01, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67}
+        },
+        {
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x60, 0x59, 0x52, 0x6b, 0x5c, 0x65, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x59, 0x52, 0x6b, 0x5c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x52, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x6b, 0x0c, 0x45, 0x6e, 0x57},
+            {0x40, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x40, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x6e, 0x77},
+            {0x48, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x09, 0x72, 0x7b, 0x0c, 0x45, 0x7e, 0x77},
+            {0x48, 0x01, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x72, 0x7b, 0x0c, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x7b, 0x04, 0x4d, 0x7e, 0x77},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x7e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x48, 0x01, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x04, 0x4d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67},
+            {0x68, 0x51, 0x62, 0x5b, 0x54, 0x6d, 0x5e, 0x67}
+        }
+    },
+    {   /* 12,000bps map */
+        {
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27}
+        },
+        {
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27}
+        },
+        {
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27}
+        },
+        {
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27}
+        },
+        {
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x1e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x13, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x3d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x1b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x14, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x0e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x32, 0x0b, 0x24, 0x3d, 0x16, 0x37},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x0e, 0x27},
+            {0x38, 0x01, 0x22, 0x1b, 0x04, 0x2d, 0x0e, 0x27},
+            {0x28, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x22, 0x3b, 0x0c, 0x35, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x30, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x13, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x18, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x16, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x0e, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x0e, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x3d, 0x0e, 0x37},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x22, 0x0b, 0x04, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x0b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x0b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x01, 0x22, 0x1b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x30, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x1e, 0x27},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x3e, 0x27},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x14, 0x35, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x0e, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x0e, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x0e, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x0e, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x0b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x0b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x0b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x0b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x3e, 0x27},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x3e, 0x27},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x3e, 0x27},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x3e, 0x27},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x0e, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x0e, 0x37},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x0e, 0x2f},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x0e, 0x2f},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x2d, 0x0e, 0x2f},
+            {0x38, 0x01, 0x2a, 0x0b, 0x24, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x2a, 0x0b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x2a, 0x0b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x0b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x22, 0x0b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x22, 0x2b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x22, 0x2b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x09, 0x22, 0x3b, 0x0c, 0x2d, 0x0e, 0x27},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x2e, 0x27},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x2e, 0x27},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x3e, 0x27},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x3e, 0x27},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x06, 0x2f},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x0e, 0x2f},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x0e, 0x2f},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x21, 0x2a, 0x0b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x2a, 0x0b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x2a, 0x0b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x2a, 0x0b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x22, 0x2b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x22, 0x2b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x22, 0x2b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x2e, 0x27},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x2e, 0x27},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x2e, 0x27},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x2e, 0x07},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x32, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x1d, 0x06, 0x37},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x06, 0x2f},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x06, 0x2f},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x06, 0x2f},
+            {0x38, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x21, 0x2a, 0x0b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x01, 0x2a, 0x0b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x22, 0x2b, 0x0c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x2d, 0x2e, 0x27},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x2e, 0x07},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x2e, 0x07},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x2e, 0x07},
+            {0x30, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x3e, 0x07},
+            {0x30, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x30, 0x11, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x06, 0x2f},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x06, 0x2f},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x06, 0x2f},
+            {0x08, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x28, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x2e, 0x07},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x2e, 0x07},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x2e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x0b, 0x24, 0x0d, 0x06, 0x2f},
+            {0x08, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x08, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x08, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x28, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x2a, 0x2b, 0x2c, 0x2d, 0x0e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x02, 0x3b, 0x0c, 0x25, 0x2e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x03, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x08, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x08, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x2b, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x1d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x2a, 0x03, 0x24, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x03, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x03, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x03, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x0b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x08, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x08, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x0e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x2e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x2e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x02, 0x2b, 0x0c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x2b, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x2b, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x2b, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07},
+            {0x20, 0x19, 0x02, 0x3b, 0x1c, 0x25, 0x3e, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x03, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x03, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x03, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x23, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x08, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x08, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x2e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x2e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x2e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x2e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x2b, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x2b, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x2b, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x2a, 0x03, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x23, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x23, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x23, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x2b, 0x2c, 0x0d, 0x06, 0x2f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x26, 0x2f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x26, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x2e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x2e, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x2e, 0x0f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x2e, 0x0f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x28, 0x09, 0x0a, 0x2b, 0x2c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x02, 0x2b, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x3a, 0x23, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x23, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x23, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x23, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x26, 0x2f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x26, 0x2f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x26, 0x2f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x26, 0x2f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x2e, 0x0f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x2e, 0x0f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x2e, 0x0f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07}
+        },
+        {
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x18, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x21, 0x3a, 0x03, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x3a, 0x23, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x3a, 0x23, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x3a, 0x23, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x2a, 0x23, 0x2c, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x26, 0x2f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x0d, 0x26, 0x2f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x26, 0x0f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x26, 0x0f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x2e, 0x0f},
+            {0x28, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x09, 0x0a, 0x2b, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07},
+            {0x20, 0x19, 0x02, 0x33, 0x1c, 0x25, 0x36, 0x07}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x29, 0x3a, 0x23, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x3a, 0x23, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x3a, 0x23, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x26, 0x0f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x26, 0x0f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x26, 0x0f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x26, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x29, 0x3a, 0x23, 0x34, 0x0d, 0x06, 0x3f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x26, 0x0f},
+            {0x08, 0x29, 0x0a, 0x2b, 0x2c, 0x05, 0x26, 0x0f},
+            {0x00, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x26, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x0a, 0x33, 0x3c, 0x25, 0x2e, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x26, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x0d, 0x26, 0x3f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x0a, 0x23, 0x2c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x29, 0x0a, 0x2b, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x2e, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x0f},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x08, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x0f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x03, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x08, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x29, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x0a, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x0f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x1c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17},
+            {0x20, 0x19, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17}
+        },
+        {
+            {0x10, 0x31, 0x3a, 0x23, 0x34, 0x15, 0x06, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x3f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x10, 0x31, 0x1a, 0x23, 0x34, 0x15, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x31, 0x1a, 0x23, 0x34, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x1a, 0x23, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x26, 0x1f},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x00, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x05, 0x36, 0x17},
+            {0x20, 0x39, 0x12, 0x33, 0x3c, 0x25, 0x36, 0x17}
+        }
+    },
+    {   /* 9,600bps map */
+        {
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x0e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x01, 0x12, 0x13, 0x1c, 0x1d, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x12, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x1c, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x00, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x01, 0x12, 0x13, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x12, 0x13, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x09, 0x02, 0x13, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x09, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x1b, 0x0c, 0x1d, 0x0e, 0x07},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x10, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x0e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x11, 0x12, 0x0b, 0x0c, 0x1d, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x12, 0x0b, 0x0c, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x0b, 0x14, 0x15, 0x1e, 0x0f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f},
+            {0x08, 0x19, 0x02, 0x03, 0x14, 0x15, 0x1e, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x1d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x06, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x1d, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x15, 0x16, 0x0f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x15, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x06, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x11, 0x1a, 0x0b, 0x0c, 0x0d, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x1a, 0x0b, 0x0c, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x08, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x07},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x1f}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17}
+        },
+        {
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x10, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x1b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x06, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x11, 0x1a, 0x0b, 0x04, 0x0d, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x1a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x0b, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x04, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17},
+            {0x18, 0x19, 0x0a, 0x03, 0x14, 0x05, 0x16, 0x17}
+        }
+    },
+    {   /* 7,200bps map */
+        {
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f}
+        },
+        {
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f}
+        },
+        {
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f}
+        },
+        {
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f}
+        },
+        {
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f}
+        },
+        {
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f}
+        },
+        {
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f}
+        },
+        {
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f}
+        },
+        {
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x03, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x04, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x06, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x03, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x04, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07},
+            {0x08, 0x01, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07}
+        },
+        {
+            {0x00, 0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x0f},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x00, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x05, 0x0e, 0x07},
+            {0x08, 0x09, 0x02, 0x0b, 0x0c, 0x0d, 0x0e, 0x07}
+        }
+    },
+};
+
+/* Coefficients for the band edge symbol timing synchroniser */
+#define SYNC_LOW_BAND_EDGE_COEFF_0       1.764193f    /* 2*alpha*cos(low_edge) */
+#define SYNC_LOW_BAND_EDGE_COEFF_1      -0.980100f    /* -alpha^2 */
+#define SYNC_HIGH_BAND_EDGE_COEFF_0     -1.400072f    /* 2*alpha*cos(high_edge) */
+#define SYNC_HIGH_BAND_EDGE_COEFF_1     -0.980100f    /* -alpha^2 */
+#define SYNC_CROSS_CORR_COEFF_A         -0.932131f    /* -alpha^2*sin(freq_diff) */
+#define SYNC_CROSS_CORR_COEFF_B          0.700036f    /* alpha*sin(high_edge) */
+#define SYNC_CROSS_CORR_COEFF_C         -0.449451f    /* -alpha*sin(low_edge) */
+
+float v17_rx_carrier_frequency(v17_rx_state_t *s)
+{
+    return dds_frequency(s->carrier_phase_rate);
+}
+/*- End of function --------------------------------------------------------*/
+
+float v17_rx_symbol_timing_correction(v17_rx_state_t *s)
+{
+    return (float) s->total_baud_timing_correction/((float) PULSESHAPER_COEFF_SETS*10.0f/3.0f);
+}
+/*- End of function --------------------------------------------------------*/
+
+float v17_rx_signal_power(v17_rx_state_t *s)
+{
+    return power_meter_dbm0(&s->power);
+}
+/*- End of function --------------------------------------------------------*/
+
+void v17_rx_signal_cutoff(v17_rx_state_t *s, float cutoff)
+{
+    /* The 0.4 factor allows for the gain of the DC blocker */
+    s->carrier_on_power = (int32_t) (power_meter_level_dbm0(cutoff + 2.5f)*0.4f);
+    s->carrier_off_power = (int32_t) (power_meter_level_dbm0(cutoff - 2.5f)*0.4f);
+}
+/*- End of function --------------------------------------------------------*/
+
+int v17_rx_equalizer_state(v17_rx_state_t *s, complexf_t **coeffs)
+{
+    *coeffs = s->eq_coeff;
+    return V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_save(v17_rx_state_t *s)
+{
+    cvec_copyf(s->eq_coeff_save, s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_restore(v17_rx_state_t *s)
+{
+    cvec_copyf(s->eq_coeff, s->eq_coeff_save, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+    cvec_zerof(s->eq_buf, V17_EQUALIZER_MASK);
+
+    s->eq_put_step = PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
+    s->eq_step = 0;
+    s->eq_delta = EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_reset(v17_rx_state_t *s)
+{
+    /* Start with an equalizer based on everything being perfect */
+    cvec_zerof(s->eq_coeff, V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+    s->eq_coeff[V17_EQUALIZER_PRE_LEN] = complex_setf(3.0f, 0.0f);
+    cvec_zerof(s->eq_buf, V17_EQUALIZER_MASK);
+
+    s->eq_put_step = PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
+    s->eq_step = 0;
+    s->eq_delta = EQUALIZER_DELTA/(V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complexf_t equalizer_get(v17_rx_state_t *s)
+{
+    int i;
+    int p;
+    complexf_t z;
+    complexf_t z1;
+
+    /* Get the next equalized value. */
+    z = complex_setf(0.0f, 0.0f);
+    p = s->eq_step - 1;
+    for (i = 0;  i < V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN;  i++)
+    {
+        p = (p - 1) & V17_EQUALIZER_MASK;
+        z1 = complex_mulf(&s->eq_coeff[i], &s->eq_buf[p]);
+        z = complex_addf(&z, &z1);
+    }
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void tune_equalizer(v17_rx_state_t *s, const complexf_t *z, const complexf_t *target)
+{
+    int i;
+    int p;
+    complexf_t ez;
+    complexf_t z1;
+
+    /* Find the x and y mismatch from the exact constellation position. */
+    ez = complex_subf(target, z);
+    //span_log(&s->logging, SPAN_LOG_FLOW, "Equalizer error %f\n", sqrt(ez.re*ez.re + ez.im*ez.im));
+    ez.re *= s->eq_delta;
+    ez.im *= s->eq_delta;
+
+    p = s->eq_step - 1;
+    for (i = 0;  i < V17_EQUALIZER_PRE_LEN + 1 + V17_EQUALIZER_POST_LEN;  i++)
+    {
+        p = (p - 1) & V17_EQUALIZER_MASK;
+        z1 = complex_conjf(&s->eq_buf[p]);
+        z1 = complex_mulf(&ez, &z1);
+        s->eq_coeff[i] = complex_addf(&s->eq_coeff[i], &z1);
+        /* Leak a little to tame uncontrolled wandering */
+        s->eq_coeff[i].re *= 0.9999f;
+        s->eq_coeff[i].im *= 0.9999f;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int descramble(v17_rx_state_t *s, int in_bit)
+{
+    int out_bit;
+
+    out_bit = (in_bit ^ (s->scramble_reg >> 17) ^ (s->scramble_reg >> 22)) & 1;
+    s->scramble_reg <<= 1;
+    if (s->in_training > TRAINING_STAGE_NORMAL_OPERATION  &&  s->in_training < TRAINING_STAGE_TCM_WINDUP)
+        s->scramble_reg |= out_bit;
+    else
+        s->scramble_reg |= (in_bit & 1);
+    return out_bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int find_quadrant(complexf_t *z)
+{
+    int b1;
+    int b2;
+
+    /* Split the space along the two diagonals. */
+    b1 = (z->im > z->re);
+    b2 = (z->im < -z->re);
+    return (b2 << 1) | (b1 ^ b2);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void track_carrier(v17_rx_state_t *s, const complexf_t *z, const complexf_t *target)
+{
+    float error;
+
+    /* For small errors the imaginary part of the difference between the actual and the target
+       positions is proportional to the phase error, for any particular target. However, the
+       different amplitudes of the various target positions scale things. */
+    error = z->im*target->re - z->re*target->im;
+    
+    s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
+    s->carrier_phase += (int32_t) (s->carrier_track_p*error);
+    span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f   f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
+    printf("Im = %15.5f (%15.5f)  f = %15.5f\n", error, s->carrier_track_i, dds_frequencyf(s->carrier_phase_rate));
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void put_bit(v17_rx_state_t *s, int bit)
+{
+    int out_bit;
+
+    /* We need to strip the last part of the training - the test period of all 1s -
+       before we let data go to the application. */
+    if (s->in_training == TRAINING_STAGE_NORMAL_OPERATION)
+    {
+        out_bit = descramble(s, bit);
+        s->put_bit(s->user_data, out_bit);
+    }
+    else if (s->in_training == TRAINING_STAGE_TEST_ONES)
+    {
+        /* The bits during the final stage of training should be all ones. However,
+           buggy modems mean you cannot rely on this. Therefore we don't bother
+           testing for ones, but just rely on a constellation mismatch measurement. */
+        out_bit = descramble(s, bit);
+        span_log(&s->logging, SPAN_LOG_FLOW, "A 1 is really %d\n", out_bit);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int decode_baud(v17_rx_state_t *s, complexf_t *z)
+{
+    static const int diff_code[16] =
+    {
+        0, 3, 2, 1, 1, 0, 3, 2, 2, 1, 0, 3, 3, 2, 1, 0                         
+    };
+    static const int tcm_paths[8][4] =
+    {
+        {0, 6, 2, 4},
+        {6, 0, 4, 2},
+        {2, 4, 0, 6},
+        {4, 2, 6, 0},
+        {1, 3, 7, 5},
+        {5, 7, 3, 1},
+        {7, 5, 1, 3},
+        {3, 1, 5, 7}
+    };
+    int nearest;
+    int i;
+    int j;
+    int k;
+    int re;
+    int im;
+    int raw;
+    int constellation_state;
+    float distances[8];
+    float new_distances[8];
+    float min;
+
+    re = (int) ((z->re + 9.0f)*2.0f);
+    if (re > 35)
+        re = 35;
+    else if (re < 0)
+        re = 0;
+    im = (int) ((z->im + 9.0f)*2.0f);
+    if (im > 35)
+        im = 35;
+    else if (im < 0)
+        im = 0;
+
+    /* Find a set of 8 candidate constellation positions, that are the closest
+       to the target, with different patterns in the last 3 bits. */
+    min = 9999999.0;
+    j = 0;
+    for (i = 0;  i < 8;  i++)
+    {
+        nearest = constel_maps[s->space_map][re][im][i];
+        distances[i] = (s->constellation[nearest].re - z->re)*(s->constellation[nearest].re - z->re)
+                     + (s->constellation[nearest].im - z->im)*(s->constellation[nearest].im - z->im);
+        if (min > distances[i])
+        {
+            min = distances[i];
+            j = i;
+        }
+    }
+    /* Use the nearest of these soft-decisions as the basis for DFE */
+    constellation_state = constel_maps[s->space_map][re][im][j];
+    /* Control the equalizer, carrier tracking, etc. based on the non-trellis
+       corrected information. The trellis correct stuff comes out a bit late. */
+    track_carrier(s, z, &s->constellation[constellation_state]);
+    //tune_equalizer(s, z, &s->constellation[constellation_state]);
+
+    /* Now do the trellis decoding */
+
+    /* TODO: change to processing blocks of stored symbols here, instead of processing
+             one symbol at a time, to speed up the processing. */
+
+    /* Update the minimum accumulated distance to each of the 8 states */
+    if (++s->trellis_ptr >= V17_TRELLIS_STORAGE_DEPTH)
+        s->trellis_ptr = 0;
+    for (i = 0;  i < 4;  i++)
+    {
+        min = distances[tcm_paths[i][0]] + s->distances[0];
+        k = 0;
+        for (j = 1;  j < 4;  j++)
+        {
+            if (min > distances[tcm_paths[i][j]] + s->distances[j << 1])
+            {
+                min = distances[tcm_paths[i][j]] + s->distances[j << 1];
+                k = j;
+            }
+        }
+        /* Use an elementary IIR filter to track the distance to date. */
+        new_distances[i] = s->distances[k << 1]*0.9f + distances[tcm_paths[i][k]]*0.1f;
+        s->full_path_to_past_state_locations[s->trellis_ptr][i] = constel_maps[s->space_map][re][im][tcm_paths[i][k]];
+        s->past_state_locations[s->trellis_ptr][i] = k << 1;
+    }
+    for (i = 4;  i < 8;  i++)
+    {
+        min = distances[tcm_paths[i][0]] + s->distances[1];
+        k = 0;
+        for (j = 1;  j < 4;  j++)
+        {
+            if (min > distances[tcm_paths[i][j]] + s->distances[(j << 1) + 1])
+            {
+                min = distances[tcm_paths[i][j]] + s->distances[(j << 1) + 1];
+                k = j;
+            }
+        }
+        new_distances[i] = s->distances[(k << 1) + 1]*0.9f + distances[tcm_paths[i][k]]*0.1f;
+        s->full_path_to_past_state_locations[s->trellis_ptr][i] = constel_maps[s->space_map][re][im][tcm_paths[i][k]];
+        s->past_state_locations[s->trellis_ptr][i] = (k << 1) + 1;
+    }
+    memcpy(s->distances, new_distances, sizeof(s->distances));
+
+    /* Find the minimum distance to date. This is the start of the path back to the result. */
+    min = s->distances[0];
+    k = 0;
+    for (i = 1;  i < 8;  i++)
+    {
+        if (min > s->distances[i])
+        {
+            min = s->distances[i];
+            k = i;
+        }
+    }
+    /* Trace back through every time step, starting with the current one, and find the
+       state from which the path came one step before. At the end of this search, the
+       last state found also points to the constellation point at that state. This is the
+       output of the trellis. */
+    for (i = 0, j = s->trellis_ptr;  i < V17_TRELLIS_LOOKBACK_DEPTH - 1;  i++)
+    {
+        k = s->past_state_locations[j][k];
+        if (--j < 0)
+            j = V17_TRELLIS_STORAGE_DEPTH - 1;
+    }
+    nearest = s->full_path_to_past_state_locations[j][k] >> 1;
+
+    /* Differentially decode */
+    raw = (nearest & 0x3C) | diff_code[((nearest & 0x03) << 2) | s->diff];
+    s->diff = nearest & 0x03;
+    for (i = 0;  i < s->bits_per_symbol;  i++)
+    {
+        put_bit(s, raw);
+        raw >>= 1;
+    }
+    return constellation_state;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_half_baud(v17_rx_state_t *s, const complexf_t *sample)
+{
+    static const complexf_t cdba[4] =
+    {
+        { 6.0f,  2.0f},
+        {-2.0f,  6.0f},
+        { 2.0f, -6.0f},
+        {-6.0f, -2.0f}
+    };
+    complexf_t z;
+    complexf_t zz;
+    const complexf_t *target;
+    float v;
+    float p;
+    int bit;
+    int i;
+    int j;
+    int32_t angle;
+    int32_t ang;
+    int constellation_state;
+
+    /* This routine processes every half a baud, as we put things into the equalizer at the T/2 rate.
+       This routine adapts the position of the half baud samples, which the caller takes. */
+
+    /* Add a sample to the equalizer's circular buffer, but don't calculate anything
+       at this time. */
+    s->eq_buf[s->eq_step] = *sample;
+    s->eq_step = (s->eq_step + 1) & V17_EQUALIZER_MASK;
+
+    /* On alternate insertions we have a whole baud and must process it. */
+    if ((s->baud_half ^= 1))
+        return;
+
+    /* Symbol timing synchronisation */
+    /* Cross correlate */
+    v = s->symbol_sync_low[1]*s->symbol_sync_high[1]*SYNC_CROSS_CORR_COEFF_A
+      + s->symbol_sync_low[0]*s->symbol_sync_high[1]*SYNC_CROSS_CORR_COEFF_B
+      + s->symbol_sync_low[1]*s->symbol_sync_high[0]*SYNC_CROSS_CORR_COEFF_C;
+
+    /* Filter away any DC component  */
+    p = v - s->symbol_sync_dc_filter[1];
+    s->symbol_sync_dc_filter[1] = s->symbol_sync_dc_filter[0];
+    s->symbol_sync_dc_filter[0] = v;
+    /* A little integration will now filter away much of the HF noise */
+    s->baud_phase -= p;
+
+#if 0
+    if (s->in_training  &&  s->in_training < TRAINING_STAGE_WAIT_FOR_CDBA)
+        s->baud_balance += (s->baud_phase < 0)  ?  -160  :  160;
+    else
+        s->baud_balance += (s->baud_phase < 0)  ?  -1  :  1;
+
+    printf("v = %10.5f %5d - %f %f %d %d\n", v, i, p, s->baud_phase, s->total_baud_timing_correction, s->baud_balance);
+
+    if (abs(s->baud_balance) > 16)
+    {
+        s->eq_put_step += (s->baud_balance >> 4);
+        s->total_baud_timing_correction += (s->baud_balance >> 4);
+        s->baud_balance = 0;
+    }
+#else
+    i = 0;
+    if (s->baud_phase > 1000.0f)
+        i = 15;
+    else if (s->baud_phase < -1000.0f)
+        i = -15;
+    else if (s->baud_phase > 100.0f)
+        i = 1;
+    else if (s->baud_phase < -100.0f)
+        i = -1;
+
+    printf("v = %10.5f %5d - %f %f %d\n", v, i, p, s->baud_phase, s->total_baud_timing_correction);
+
+    if (i)
+    {
+        s->eq_put_step += i;
+        s->total_baud_timing_correction += i;
+    }
+#endif
+
+    z = equalizer_get(s);
+
+    constellation_state = 0;
+    switch (s->in_training)
+    {
+    case TRAINING_STAGE_NORMAL_OPERATION:
+        /* Normal operation. */
+        constellation_state = decode_baud(s, &z);
+        target = &s->constellation[constellation_state];
+        break;
+    case TRAINING_STAGE_SYMBOL_ACQUISITION:
+        /* Allow time for the symbol synchronisation to settle the symbol timing. */
+        target = &z;
+        if (++s->training_count >= 50)
+        {
+            /* Record the current phase angle */
+            s->angles[0] =
+            s->start_angles[0] = arctan2(z.im, z.re);
+            s->in_training = TRAINING_STAGE_LOG_PHASE;
+        }
+        break;
+    case TRAINING_STAGE_LOG_PHASE:
+        /* Record the current alternate phase angle */
+        target = &z;
+        angle = arctan2(z.im, z.re);
+        s->training_count = 1;
+        if (s->short_train)
+        {
+            /* We should already know the accurate carrier frequency. All we need to sort
+               out is the phase. */
+            /* Check if we just saw A or B */
+            if ((uint32_t) (angle - s->start_angles[0]) < 0x80000000U)
+            {
+                angle = s->start_angles[0];
+                s->angles[0] = 0x80000000 + 219937506;
+                s->angles[1] = 0xC0000000 + 219937506;
+            }
+            else
+            {
+                s->training_count = 0;
+                s->angles[0] = 0xC0000000 + 219937506;
+                s->angles[1] = 0x80000000 + 219937506;
+            }
+            /* Make a step shift in the phase, to pull it into line. We need to rotate the equalizer
+               buffer, as well as the carrier phase, for this to play out nicely. */
+            /* angle is now the difference between where A is, and where it should be */
+            p = 3.14159f + angle*2.0f*3.14159f/(65536.0f*65536.0f) - 0.321751f;
+            span_log(&s->logging, SPAN_LOG_FLOW, "Spin (short) by %.5f rads\n", p);
+            printf("Spin (short) by %.5f rads\n", p);
+            zz = complex_setf(cosf(p), -sinf(p));
+            for (i = 0;  i <= V17_EQUALIZER_MASK;  i++)
+                s->eq_buf[i] = complex_mulf(&s->eq_buf[i], &zz);
+            s->carrier_phase += (0x80000000 + angle - 219937506);
+
+            s->carrier_track_i = 100.0f;
+            s->carrier_track_p = 500000.0f;
+
+            s->in_training = TRAINING_STAGE_SHORT_WAIT_FOR_CDBA;
+        }
+        else
+        {
+            s->angles[1] =
+            s->start_angles[1] = angle;
+            s->in_training = TRAINING_STAGE_WAIT_FOR_CDBA;
+        }
+        break;
+    case TRAINING_STAGE_WAIT_FOR_CDBA:
+        target = &z;
+        angle = arctan2(z.im, z.re);
+        /* Look for the initial ABAB sequence to display a phase reversal, which will
+           signal the start of the scrambled CDBA segment */
+        ang = angle - s->angles[(s->training_count - 1) & 0xF];
+//printf("Ang= %10d %15.5f %15.5f\n", angle, z.im, z.re);
+        s->angles[(s->training_count + 1) & 0xF] = angle;
+
+        if (s->training_count == 100)
+        {
+            i = s->training_count;
+            /* Avoid the possibility of a divide by zero */
+            if (i)
+            {
+                j = i & 0xF;
+                ang = (s->angles[j] - s->start_angles[0])/i
+                    + (s->angles[j | 0x1] - s->start_angles[1])/i;
+                s->carrier_phase_rate += 3*(ang/20);
+
+                s->start_angles[0] = s->angles[j];
+                s->start_angles[1] = s->angles[j | 0x1];
+span_log(&s->logging, SPAN_LOG_FLOW, "Angles %x, %x, %x, %x, dist %d\n", s->angles[j], s->start_angles[0], s->angles[j | 0x1], s->start_angles[1], i);
+            }
+            //span_log(&s->logging, SPAN_LOG_FLOW, "%d %d %d %d %d\n", s->angles[s->training_count & 0xF], s->start_angles[0], s->angles[(s->training_count | 0x1) & 0xF], s->start_angles[1], s->training_count);
+            span_log(&s->logging, SPAN_LOG_FLOW, "Coarse carrier frequency %7.2f (%d)\n", dds_frequencyf(s->carrier_phase_rate), s->training_count);
+
+        }
+        if ((ang > 0x40000000  ||  ang < -0x40000000)  &&  s->training_count >= 13)
+        {
+span_log(&s->logging, SPAN_LOG_FLOW, "We seem to have a reversal at symbol %d\n", s->training_count);
+//printf("We seem to have a reversal at symbol %d\n", s->training_count);
+            /* We seem to have a phase reversal */
+            /* Slam the carrier frequency into line, based on the total phase drift over the last
+               section. Use the shift from the odd bits and the shift from the even bits to get
+               better jitter suppression. */
+            /* TODO: We are supposed to deal with frequancy errors up to +-8Hz. Over 200+
+                     symbols that is more than half a cycle. We get confused an do crazy things.
+                     We can only cope with errors up to 5Hz right now. We need to implement
+                     greater tolerance to be compliant, although it doesn't really matter much
+                     these days. */
+            /* Step back a few symbols so we don't get ISI distorting things. */
+            i = (s->training_count - 8) & ~1;
+            /* Avoid the possibility of a divide by zero */
+            if (i)
+            {
+                j = i & 0xF;
+                ang = (s->angles[j] - s->start_angles[0])/(i - 100 + 8)
+                    + (s->angles[j | 0x1] - s->start_angles[1])/(i - 100 + 8);
+                s->carrier_phase_rate += 3*(ang/20);
+span_log(&s->logging, SPAN_LOG_FLOW, "Angles %x, %x, %x, %x, dist %d\n", s->angles[j], s->start_angles[0], s->angles[j | 0x1], s->start_angles[1], i);
+            }
+            //span_log(&s->logging, SPAN_LOG_FLOW, "%d %d %d %d %d\n", s->angles[s->training_count & 0xF], s->start_angles[0], s->angles[(s->training_count | 0x1) & 0xF], s->start_angles[1], s->training_count);
+            span_log(&s->logging, SPAN_LOG_FLOW, "Coarse carrier frequency %7.2f (%d)\n", dds_frequencyf(s->carrier_phase_rate), s->training_count);
+            /* Check if the carrier frequency is plausible */
+            if (s->carrier_phase_rate < dds_phase_ratef(CARRIER_NOMINAL_FREQ - 20.0f)
+                ||
+                s->carrier_phase_rate > dds_phase_ratef(CARRIER_NOMINAL_FREQ + 20.0f))
+            {
+               span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
+               /* Park this modem */
+               s->in_training = TRAINING_STAGE_PARKED;
+               s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+               break;
+            }
+
+            /* Make a step shift in the phase, to pull it into line. We need to rotate the equalizer buffer,
+               as well as the carrier phase, for this to play out nicely. */
+            /* angle is now the difference between where C is, and where it should be */
+            p = angle*2.0f*3.14159f/(65536.0f*65536.0f) - 0.321751f;
+            span_log(&s->logging, SPAN_LOG_FLOW, "Spin (long) by %.5f rads\n", p);
+            printf("Spin (long) by %.5f rads\n", p);
+            zz = complex_setf(cosf(p), -sinf(p));
+            for (i = 0;  i <= V17_EQUALIZER_MASK;  i++)
+                s->eq_buf[i] = complex_mulf(&s->eq_buf[i], &zz);
+            s->carrier_phase += (angle - 219937506);
+
+            /* We have just seen the first symbol of the scrambled sequence, so skip it. */
+            descramble(s, 1);
+            descramble(s, 1);
+            s->training_count = 1;
+            s->in_training = TRAINING_STAGE_TRAIN_ON_CDBA;
+        }
+        else if (++s->training_count > V17_TRAINING_SEG_1_LEN)
+        {
+            /* This is bogus. There are not this many bits in this section
+               of a real training sequence. */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
+            /* Park this modem */
+            s->in_training = TRAINING_STAGE_PARKED;
+            s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+        }
+        break;
+    case TRAINING_STAGE_TRAIN_ON_CDBA:
+        /* Train on the scrambled CDBA section. */
+        bit = descramble(s, 1);
+        bit = (bit << 1) | descramble(s, 1);
+        target = &cdba[bit];
+        track_carrier(s, &z, target);
+        tune_equalizer(s, &z, target);
+        if (s->training_count == V17_TRAINING_SEG_2_LEN - 2000)
+            s->eq_delta /= 2.0;
+        if (++s->training_count >= V17_TRAINING_SEG_2_LEN - 48)
+        {
+            s->training_error = 0.0f;
+            s->carrier_track_i = 100.0f;
+            s->carrier_track_p = 500000.0f;
+            s->in_training = TRAINING_STAGE_TRAIN_ON_CDBA_AND_TEST;
+        }
+        break;
+    case TRAINING_STAGE_TRAIN_ON_CDBA_AND_TEST:
+        /* Continue training on the scrambled CDBA section, but measure the quality of training too. */
+        bit = descramble(s, 1);
+        bit = (bit << 1) | descramble(s, 1);
+
+        //span_log(&s->logging, SPAN_LOG_FLOW, "%5d [%15.5f, %15.5f]     [%15.5f, %15.5f]\n", s->training_count, z.re, z.im, cdba[bit].re, cdba[bit].im);
+        target = &cdba[bit];
+        track_carrier(s, &z, target);
+        tune_equalizer(s, &z, target);
+        /* Measure the training error */
+        zz = complex_subf(&z, &cdba[bit]);
+        s->training_error += powerf(&zz);
+        if (++s->training_count >= V17_TRAINING_SEG_2_LEN)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Constellation mismatch %f\n", s->training_error);
+            if (s->training_error < 100.0f)
+            {
+                s->training_count = 0;
+                s->training_error = 0.0f;
+                s->in_training = TRAINING_STAGE_BRIDGE;
+            }
+            else
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (convergence failed)\n");
+                /* Park this modem */
+                s->in_training = TRAINING_STAGE_PARKED;
+                s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+            }
+        }
+        break;
+    case TRAINING_STAGE_BRIDGE:
+        descramble(s, V17_BRIDGE_WORD >> ((s->training_count & 0x7) << 1));
+        descramble(s, V17_BRIDGE_WORD >> (((s->training_count & 0x7) << 1) + 1));
+        target = &z;
+        if (++s->training_count >= V17_TRAINING_SEG_3_LEN)
+        {
+            s->training_count = 0;
+            s->training_error = 0.0;
+            s->in_training = TRAINING_STAGE_TCM_WINDUP;
+        }
+        break;
+    case TRAINING_STAGE_SHORT_WAIT_FOR_CDBA:
+        target = &cdba[(s->training_count & 1) + 2];
+        angle = arctan2(z.im, z.re);
+        /* Look for the initial ABAB sequence to display a phase reversal, which will
+           signal the start of the scrambled CDBA segment */
+        ang = angle - s->angles[(s->training_count - 1) & 0xF];
+        s->angles[(s->training_count + 1) & 0xF] = angle;
+        if (ang > 0x40000000  ||  ang < -0x40000000)
+        {
+            /* We seem to have a phase reversal */
+            /* We have just seen the first symbol of the scrambled sequence, so skip it. */
+            descramble(s, 1);
+            descramble(s, 1);
+            s->training_count = 1;
+            s->in_training = TRAINING_STAGE_SHORT_TRAIN_ON_CDBA_AND_TEST;
+        }
+        else
+        {
+            track_carrier(s, &z, target);
+            if (++s->training_count > V17_TRAINING_SEG_1_LEN)
+            {
+                /* This is bogus. There are not this many bits in this section
+                   of a real training sequence. */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
+                /* Park this modem */
+                s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+                s->in_training = TRAINING_STAGE_PARKED;
+            }
+        }
+        break;
+    case TRAINING_STAGE_SHORT_TRAIN_ON_CDBA_AND_TEST:
+        /* Short retrain on the scrambled CDBA section, but measure the quality of training too. */
+        bit = descramble(s, 1);
+        bit = (bit << 1) | descramble(s, 1);
+        //span_log(&s->logging, SPAN_LOG_FLOW, "%5d [%15.5f, %15.5f]     [%15.5f, %15.5f] %d\n", s->training_count, z.re, z.im, cdba[bit].re, cdba[bit].im, arctan2(z.im, z.re));
+        target = &cdba[bit];
+        track_carrier(s, &z, target);
+        //tune_equalizer(s, &z, target);
+        /* Measure the training error */
+        if (s->training_count > 8)
+        {
+            zz = complex_subf(&z, &cdba[bit]);
+            s->training_error += powerf(&zz);
+        }
+        if (++s->training_count >= V17_TRAINING_SHORT_SEG_2_LEN)
+        {
+            s->carrier_track_i = 100.0f;
+            s->carrier_track_p = 500000.0f;
+            span_log(&s->logging, SPAN_LOG_FLOW, "Short training error %f\n", s->training_error);
+            if (s->training_error < 4000.0f)
+            {
+                s->training_count = 0;
+                s->in_training = TRAINING_STAGE_TCM_WINDUP;
+            }
+            else
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Short training failed (convergence failed)\n");
+                /* Park this modem */
+                s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+                s->in_training = TRAINING_STAGE_PARKED;
+            }
+        }
+        break;
+    case TRAINING_STAGE_TCM_WINDUP:
+        /* We need to wait 15 bauds while the trellis fills up. */
+        //span_log(&s->logging, SPAN_LOG_FLOW, "%5d %15.5f, %15.5f\n", s->training_count, z.re, z.im);
+        constellation_state = decode_baud(s, &z);
+        target = &s->constellation[constellation_state];
+        /* Measure the training error */
+        zz = complex_subf(&z, target);
+        s->training_error += powerf(&zz);
+        if (++s->training_count >= V17_TRAINING_SEG_4A_LEN)
+        {
+            s->training_count = 0;
+            s->training_error = 0.0;
+            /* Restart the differential decoder */
+            s->diff = (s->short_train)  ?  0  :  1;
+            s->in_training = TRAINING_STAGE_TEST_ONES;
+        }
+        break;
+    case TRAINING_STAGE_TEST_ONES:
+        /* We are in the test phase, where we check that we can receive reliably.
+           We should get a run of 1's, 48 symbols long. */
+        //span_log(&s->logging, SPAN_LOG_FLOW, "%5d %15.5f, %15.5f\n", s->training_count, z.re, z.im);
+        constellation_state = decode_baud(s, &z);
+        target = &s->constellation[constellation_state];
+        /* Measure the training error */
+        zz = complex_subf(&z, target);
+        s->training_error += powerf(&zz);
+        if (++s->training_count >= V17_TRAINING_SEG_4_LEN)
+        {
+            if (s->training_error < 25.0f)
+            {
+                /* We are up and running */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Training succeeded (constellation mismatch %f)\n", s->training_error);
+                s->put_bit(s->user_data, PUTBIT_TRAINING_SUCCEEDED);
+                /* Apply some lag to the carrier off condition, to ensure the last few bits get pushed through
+                   the processing. */
+                s->carrier_present = 60;
+                equalizer_save(s);
+                s->carrier_phase_rate_save = s->carrier_phase_rate;
+                s->agc_scaling_save = s->agc_scaling;
+                s->short_train = TRUE;
+                s->in_training = TRAINING_STAGE_NORMAL_OPERATION;
+            }
+            else
+            {
+                /* Training has failed */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (constellation mismatch %f)\n", s->training_error);
+                /* Park this modem */
+                s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+                s->in_training = TRAINING_STAGE_PARKED;
+            }
+        }
+        break;
+    case TRAINING_STAGE_PARKED:
+    default:
+        /* We failed to train! */
+        /* Park here until the carrier drops. */
+        target = &z;
+        break;
+    }
+    if (s->qam_report)
+        s->qam_report(s->qam_user_data, &z, target, constellation_state);
+}
+/*- End of function --------------------------------------------------------*/
+
+void v17_rx(v17_rx_state_t *s, const int16_t amp[], int len)
+{
+    int i;
+    int j;
+    int step;
+    complexf_t z;
+    complexf_t zz;
+    complexf_t sample;
+    int32_t power;
+    float x;
+    float v;
+
+    x = 0.0;
+    for (i = 0;  i < len;  i++)
+    {
+        s->rrc_filter[s->rrc_filter_step] =
+        s->rrc_filter[s->rrc_filter_step + V17_RX_FILTER_STEPS] = amp[i];
+        if (++s->rrc_filter_step >= V17_RX_FILTER_STEPS)
+            s->rrc_filter_step = 0;
+
+        /* There should be no DC in the signal, but sometimes there is.
+           We need to measure the power with the DC blocked, but not using
+           a slow to respond DC blocker. Use the most elementary HPF. */
+        power = power_meter_update(&(s->power), (amp[i] - s->last_sample) >> 1);
+        s->last_sample = amp[i];
+        if (s->carrier_present)
+        {
+            /* Look for power below turnoff threshold to turn the carrier off */
+            if (power < s->carrier_off_power)
+            {
+                if (--s->carrier_present <= 0)
+                {
+                    /* Count down a short delay, to ensure we push the last
+                       few bits through the filters before stopping. */
+                    v17_rx_restart(s, s->bit_rate, s->short_train);
+                    s->put_bit(s->user_data, PUTBIT_CARRIER_DOWN);
+                    continue;
+                }
+            }
+        }
+        else
+        {
+            /* Look for power exceeding turnon threshold to turn the carrier on */
+            if (power < s->carrier_on_power)
+                continue;
+            s->carrier_present = 1;
+            s->put_bit(s->user_data, PUTBIT_CARRIER_UP);
+        }
+        if (s->in_training != TRAINING_STAGE_PARKED)
+        {
+            /* Only spend effort processing this data if the modem is not
+               parked, after training failure. */
+
+            s->eq_put_step -= PULSESHAPER_COEFF_SETS;
+            step = -s->eq_put_step;
+            if (step > PULSESHAPER_COEFF_SETS - 1)
+                step = PULSESHAPER_COEFF_SETS - 1;
+            if (step < 0)
+                step += PULSESHAPER_COEFF_SETS;
+            zz.re = pulseshaper[step][0].re*s->rrc_filter[s->rrc_filter_step];
+            for (j = 1;  j < V17_RX_FILTER_STEPS;  j++)
+                zz.re += pulseshaper[step][j].re*s->rrc_filter[j + s->rrc_filter_step];
+            sample.re = zz.re*s->agc_scaling;
+
+            /* Symbol timing synchronisation band edge filters */
+            /* Low Nyquist band edge filter */
+            v = s->symbol_sync_low[0]*SYNC_LOW_BAND_EDGE_COEFF_0 + s->symbol_sync_low[1]*SYNC_LOW_BAND_EDGE_COEFF_1 + sample.re;
+            s->symbol_sync_low[1] = s->symbol_sync_low[0];
+            s->symbol_sync_low[0] = v;
+            /* High Nyquist band edge filter */
+            v = s->symbol_sync_high[0]*SYNC_HIGH_BAND_EDGE_COEFF_0 + s->symbol_sync_high[1]*SYNC_HIGH_BAND_EDGE_COEFF_1 + sample.re;
+            s->symbol_sync_high[1] = s->symbol_sync_high[0];
+            s->symbol_sync_high[0] = v;
+
+            z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
+
+            /* Put things into the equalization buffer at T/2 rate. The symbol sync.
+               will fiddle the step to align this with the symbols. */
+            if (s->eq_put_step <= 0)
+            {
+                if (s->in_training == TRAINING_STAGE_SYMBOL_ACQUISITION)
+                {
+                    /* Only AGC during the initial training */
+                    s->agc_scaling = (1.0f/PULSESHAPER_GAIN)*6.5f/sqrtf(power);
+                }
+                /* Pulse shape while still at the carrier frequency, using a quadrature
+                   pair of filters. This results in a properly bandpass filtered complex
+                   signal, which can be brought directly to bandband by complex mixing.
+                   No further filtering, to remove mixer harmonics, is needed. */
+                step = -s->eq_put_step;
+                if (step > PULSESHAPER_COEFF_SETS - 1)
+                    step = PULSESHAPER_COEFF_SETS - 1;
+                zz.im = pulseshaper[step][0].im*s->rrc_filter[s->rrc_filter_step];
+                for (j = 1;  j < V17_RX_FILTER_STEPS;  j++)
+                    zz.im += pulseshaper[step][j].im*s->rrc_filter[j + s->rrc_filter_step];
+                sample.re = zz.re*s->agc_scaling;
+                sample.im = zz.im*s->agc_scaling;
+                s->eq_put_step += PULSESHAPER_COEFF_SETS*10/(3*2);
+                /* Shift to baseband - since this is done in a full complex form, the
+                   result is clean, and requires no further filtering, apart from the
+                   equalizer. */
+                zz.re = sample.re*z.re - sample.im*z.im;
+                zz.im = -sample.re*z.im - sample.im*z.re;
+                process_half_baud(s, &zz);
+            }
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void v17_rx_set_put_bit(v17_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
+{
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v17_rx_restart(v17_rx_state_t *s, int rate, int short_train)
+{
+    int i;
+    int j;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Restarting V.17\n");
+    switch (rate)
+    {
+    case 14400:
+        s->constellation = v17_14400_constellation;
+        s->space_map = 0;
+        s->bits_per_symbol = 6;
+        break;
+    case 12000:
+        s->constellation = v17_12000_constellation;
+        s->space_map = 1;
+        s->bits_per_symbol = 5;
+        break;
+    case 9600:
+        s->constellation = v17_9600_constellation;
+        s->space_map = 2;
+        s->bits_per_symbol = 4;
+        break;
+    case 7200:
+        s->constellation = v17_7200_constellation;
+        s->space_map = 3;
+        s->bits_per_symbol = 3;
+        break;
+    default:
+        return -1;
+    }
+    s->bit_rate = rate;
+    vec_zerof(s->rrc_filter, sizeof(s->rrc_filter)/sizeof(s->rrc_filter[0]));
+    s->rrc_filter_step = 0;
+
+    s->diff = 1;
+    s->scramble_reg = 0x2ECDD5;
+    s->in_training = TRAINING_STAGE_SYMBOL_ACQUISITION;
+    s->training_count = 0;
+    s->carrier_present = 0;
+    s->short_train = short_train;
+
+    /* Initialise the TCM decoder parameters. */
+    /* The accumulated distance vectors are set so state zero starts
+       at a value of zero, and all others start larger. This forces the
+       initial paths to merge at the zero states. */
+    for (i = 0;  i < 8;  i++)
+    {
+        s->distances[i] = 99.0;
+        for (j = 0;  j < 16;  j++)
+        {
+            s->full_path_to_past_state_locations[j][i] = 0;
+            s->past_state_locations[j][i] = 0;
+        }
+    }
+    s->distances[0] = 0;
+    s->trellis_ptr = 14;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Phase rates %f %f\n", dds_frequencyf(s->carrier_phase_rate), dds_frequencyf(s->carrier_phase_rate_save));
+    s->carrier_phase = 0;
+    power_meter_init(&(s->power), 4);
+
+printf("Restart %d\n", s->short_train);
+    if (s->short_train)
+    {
+        s->carrier_phase_rate = s->carrier_phase_rate_save;
+        s->agc_scaling = s->agc_scaling_save;
+        equalizer_restore(s);
+        s->carrier_track_i = 500.0f;
+        s->carrier_track_p = 40000.0f;
+    }
+    else
+    {
+        s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
+        s->agc_scaling = 0.0005f;
+        equalizer_reset(s);
+        s->carrier_track_i = 5000.0f;
+        s->carrier_track_p = 40000.0f;
+    }
+    s->last_sample = 0;
+
+    /* Initialise the working data for symbol timing synchronisation */
+    s->symbol_sync_low[0] = 0.0f;
+    s->symbol_sync_low[1] = 0.0f;
+    s->symbol_sync_high[0] = 0.0f;
+    s->symbol_sync_high[1] = 0.0f;
+    s->symbol_sync_dc_filter[0] = 0.0f;
+    s->symbol_sync_dc_filter[1] = 0.0f;
+    s->baud_phase = 0.0f;
+    s->baud_half = 0;
+    
+    s->total_baud_timing_correction = 0;
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+v17_rx_state_t *v17_rx_init(v17_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data)
+{
+    if (s == NULL)
+    {
+        if ((s = (v17_rx_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+    s->short_train = FALSE;
+    v17_rx_signal_cutoff(s, -45.5f);
+    s->agc_scaling = 0.0005f;
+    s->agc_scaling_save = 0.0005f;
+    s->carrier_phase_rate_save = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "V.17");
+
+    v17_rx_restart(s, rate, s->short_train);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v17_rx_release(v17_rx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v17_rx_set_qam_report_handler(v17_rx_state_t *s, qam_report_handler_t *handler, void *user_data)
+{
+    s->qam_report = handler;
+    s->qam_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v17tx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,717 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v17tx.c - ITU V.17 modem transmit part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v17tx.c,v 1.46 2006/11/28 16:59:57 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/complex.h"
+#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
+#include "spandsp/async.h"
+#include "spandsp/dds.h"
+#include "spandsp/power_meter.h"
+
+#include "spandsp/v17tx.h"
+
+#define CARRIER_NOMINAL_FREQ        1800.0f
+
+/* Segments of the training sequence */
+#define V17_TRAINING_SEG_TEP_A      0
+#define V17_TRAINING_SEG_TEP_B      (V17_TRAINING_SEG_TEP_A + 480)
+#define V17_TRAINING_SEG_1          (V17_TRAINING_SEG_TEP_B + 48)
+#define V17_TRAINING_SEG_2          (V17_TRAINING_SEG_1 + 256)
+#define V17_TRAINING_SEG_3          (V17_TRAINING_SEG_2 + 2976)
+#define V17_TRAINING_SEG_4          (V17_TRAINING_SEG_3 + 64)
+#define V17_TRAINING_END            (V17_TRAINING_SEG_4 + 48)
+#define V17_TRAINING_SHUTDOWN_A     (V17_TRAINING_END + 32)
+#define V17_TRAINING_SHUTDOWN_END   (V17_TRAINING_SHUTDOWN_A + 48)
+
+#define V17_TRAINING_SHORT_SEG_4    (V17_TRAINING_SEG_2 + 38)
+
+#define V17_BRIDGE_WORD             0x8880
+
+const complexf_t v17_14400_constellation[128] =
+{
+    {-8, -3},       /* 0x00 */
+    { 9,  2},       /* 0x01 */
+    { 2, -9},       /* 0x02 */
+    {-3,  8},       /* 0x03 */
+    { 8,  3},       /* 0x04 */
+    {-9, -2},       /* 0x05 */
+    {-2,  9},       /* 0x06 */
+    { 3, -8},       /* 0x07 */
+    {-8,  1},       /* 0x08 */
+    { 9, -2},       /* 0x09 */
+    {-2, -9},       /* 0x0A */
+    { 1,  8},       /* 0x0B */
+    { 8, -1},       /* 0x0C */
+    {-9,  2},       /* 0x0D */
+    { 2,  9},       /* 0x0E */
+    {-1, -8},       /* 0x0F */
+    {-4, -3},       /* 0x10 */
+    { 5,  2},       /* 0x11 */
+    { 2, -5},       /* 0x12 */
+    {-3,  4},       /* 0x13 */
+    { 4,  3},       /* 0x14 */
+    {-5, -2},       /* 0x15 */
+    {-2,  5},       /* 0x16 */
+    { 3, -4},       /* 0x17 */
+    {-4,  1},       /* 0x18 */
+    { 5, -2},       /* 0x19 */
+    {-2, -5},       /* 0x1A */
+    { 1,  4},       /* 0x1B */
+    { 4, -1},       /* 0x1C */
+    {-5,  2},       /* 0x1D */
+    { 2,  5},       /* 0x1E */
+    {-1, -4},       /* 0x1F */
+    { 4, -3},       /* 0x20 */
+    {-3,  2},       /* 0x21 */
+    { 2,  3},       /* 0x22 */
+    {-3, -4},       /* 0x23 */
+    {-4,  3},       /* 0x24 */
+    { 3, -2},       /* 0x25 */
+    {-2, -3},       /* 0x26 */
+    { 3,  4},       /* 0x27 */
+    { 4,  1},       /* 0x28 */
+    {-3, -2},       /* 0x29 */
+    {-2,  3},       /* 0x2A */
+    { 1, -4},       /* 0x2B */
+    {-4, -1},       /* 0x2C */
+    { 3,  2},       /* 0x2D */
+    { 2, -3},       /* 0x2E */
+    {-1,  4},       /* 0x2F */
+    { 0, -3},       /* 0x30 */
+    { 1,  2},       /* 0x31 */
+    { 2, -1},       /* 0x32 */
+    {-3,  0},       /* 0x33 */
+    { 0,  3},       /* 0x34 */
+    {-1, -2},       /* 0x35 */
+    {-2,  1},       /* 0x36 */
+    { 3,  0},       /* 0x37 */
+    { 0,  1},       /* 0x38 */
+    { 1, -2},       /* 0x39 */
+    {-2, -1},       /* 0x3A */
+    { 1,  0},       /* 0x3B */
+    { 0, -1},       /* 0x3C */
+    {-1,  2},       /* 0x3D */
+    { 2,  1},       /* 0x3E */
+    {-1,  0},       /* 0x3F */
+    { 8, -3},       /* 0x40 */
+    {-7,  2},       /* 0x41 */
+    { 2,  7},       /* 0x42 */
+    {-3, -8},       /* 0x43 */
+    {-8,  3},       /* 0x44 */
+    { 7, -2},       /* 0x45 */
+    {-2, -7},       /* 0x46 */
+    { 3,  8},       /* 0x47 */
+    { 8,  1},       /* 0x48 */
+    {-7, -2},       /* 0x49 */
+    {-2,  7},       /* 0x4A */
+    { 1, -8},       /* 0x4B */
+    {-8, -1},       /* 0x4C */
+    { 7,  2},       /* 0x4D */
+    { 2, -7},       /* 0x4E */
+    {-1,  8},       /* 0x4F */
+    {-4, -7},       /* 0x50 */
+    { 5,  6},       /* 0x51 */
+    { 6, -5},       /* 0x52 */
+    {-7,  4},       /* 0x53 */
+    { 4,  7},       /* 0x54 */
+    {-5, -6},       /* 0x55 */
+    {-6,  5},       /* 0x56 */
+    { 7, -4},       /* 0x57 */
+    {-4,  5},       /* 0x58 */
+    { 5, -6},       /* 0x59 */
+    {-6, -5},       /* 0x5A */
+    { 5,  4},       /* 0x5B */
+    { 4, -5},       /* 0x5C */
+    {-5,  6},       /* 0x5D */
+    { 6,  5},       /* 0x5E */
+    {-5, -4},       /* 0x5F */
+    { 4, -7},       /* 0x60 */
+    {-3,  6},       /* 0x61 */
+    { 6,  3},       /* 0x62 */
+    {-7, -4},       /* 0x63 */
+    {-4,  7},       /* 0x64 */
+    { 3, -6},       /* 0x65 */
+    {-6, -3},       /* 0x66 */
+    { 7,  4},       /* 0x67 */
+    { 4,  5},       /* 0x68 */
+    {-3, -6},       /* 0x69 */
+    {-6,  3},       /* 0x6A */
+    { 5, -4},       /* 0x6B */
+    {-4, -5},       /* 0x6C */
+    { 3,  6},       /* 0x6D */
+    { 6, -3},       /* 0x6E */
+    {-5,  4},       /* 0x6F */
+    { 0, -7},       /* 0x70 */
+    { 1,  6},       /* 0x71 */
+    { 6, -1},       /* 0x72 */
+    {-7,  0},       /* 0x73 */
+    { 0,  7},       /* 0x74 */
+    {-1, -6},       /* 0x75 */
+    {-6,  1},       /* 0x76 */
+    { 7,  0},       /* 0x77 */
+    { 0,  5},       /* 0x78 */
+    { 1, -6},       /* 0x79 */
+    {-6, -1},       /* 0x7A */
+    { 5,  0},       /* 0x7B */
+    { 0, -5},       /* 0x7C */
+    {-1,  6},       /* 0x7D */
+    { 6,  1},       /* 0x7E */
+    {-5,  0}        /* 0x7F */
+};
+
+const complexf_t v17_12000_constellation[64] =
+{
+    { 7,  1},       /* 0x00 */
+    {-5, -1},       /* 0x01 */
+    {-1,  5},       /* 0x02 */
+    { 1, -7},       /* 0x03 */
+    {-7, -1},       /* 0x04 */
+    { 5,  1},       /* 0x05 */
+    { 1, -5},       /* 0x06 */
+    {-1,  7},       /* 0x07 */
+    { 3, -3},       /* 0x08 */
+    {-1,  3},       /* 0x09 */
+    { 3,  1},       /* 0x0A */
+    {-3, -3},       /* 0x0B */
+    {-3,  3},       /* 0x0C */
+    { 1, -3},       /* 0x0D */
+    {-3, -1},       /* 0x0E */
+    { 3,  3},       /* 0x0F */
+    { 7, -7},       /* 0x10 */
+    {-5,  7},       /* 0x11 */
+    { 7,  5},       /* 0x12 */
+    {-7, -7},       /* 0x13 */
+    {-7,  7},       /* 0x14 */
+    { 5, -7},       /* 0x15 */
+    {-7, -5},       /* 0x16 */
+    { 7,  7},       /* 0x17 */
+    {-1, -7},       /* 0x18 */
+    { 3,  7},       /* 0x19 */
+    { 7, -3},       /* 0x1A */
+    {-7,  1},       /* 0x1B */
+    { 1,  7},       /* 0x1C */
+    {-3, -7},       /* 0x1D */
+    {-7,  3},       /* 0x1E */
+    { 7, -1},       /* 0x1F */
+    { 3,  5},       /* 0x20 */
+    {-1, -5},       /* 0x21 */
+    {-5,  1},       /* 0x22 */
+    { 5, -3},       /* 0x23 */
+    {-3, -5},       /* 0x24 */
+    { 1,  5},       /* 0x25 */
+    { 5, -1},       /* 0x26 */
+    {-5,  3},       /* 0x27 */
+    {-1,  1},       /* 0x28 */
+    { 3, -1},       /* 0x29 */
+    {-1, -3},       /* 0x2A */
+    { 1,  1},       /* 0x2B */
+    { 1, -1},       /* 0x2C */
+    {-3,  1},       /* 0x2D */
+    { 1,  3},       /* 0x2E */
+    {-1, -1},       /* 0x2F */
+    {-5,  5},       /* 0x30 */
+    { 7, -5},       /* 0x31 */
+    {-5, -7},       /* 0x32 */
+    { 5,  5},       /* 0x33 */
+    { 5, -5},       /* 0x34 */
+    {-7,  5},       /* 0x35 */
+    { 5,  7},       /* 0x36 */
+    {-5, -5},       /* 0x37 */
+    {-5, -3},       /* 0x38 */
+    { 7,  3},       /* 0x39 */
+    { 3, -7},       /* 0x3A */
+    {-3,  5},       /* 0x3B */
+    { 5,  3},       /* 0x3C */
+    {-7, -3},       /* 0x3D */
+    {-3,  7},       /* 0x3E */
+    { 3, -5}        /* 0x3F */
+};
+
+const complexf_t v17_9600_constellation[32] =
+{
+    {-8,  2},       /* 0x00 */
+    {-6, -4},       /* 0x01 */
+    {-4,  6},       /* 0x02 */
+    { 2,  8},       /* 0x03 */
+    { 8, -2},       /* 0x04 */
+    { 6,  4},       /* 0x05 */
+    { 4, -6},       /* 0x06 */
+    {-2, -8},       /* 0x07 */
+    { 0,  2},       /* 0x08 */
+    {-6,  4},       /* 0x09 */
+    { 4,  6},       /* 0x0A */
+    { 2,  0},       /* 0x0B */
+    { 0, -2},       /* 0x0C */
+    { 6, -4},       /* 0x0D */
+    {-4, -6},       /* 0x0E */
+    {-2,  0},       /* 0x0F */
+    { 0, -6},       /* 0x10 */
+    { 2, -4},       /* 0x11 */
+    {-4, -2},       /* 0x12 */
+    {-6,  0},       /* 0x13 */
+    { 0,  6},       /* 0x14 */
+    {-2,  4},       /* 0x15 */
+    { 4,  2},       /* 0x16 */
+    { 6,  0},       /* 0x17 */
+    { 8,  2},       /* 0x18 */
+    { 2,  4},       /* 0x19 */
+    { 4, -2},       /* 0x1A */
+    { 2, -8},       /* 0x1B */
+    {-8, -2},       /* 0x1C */
+    {-2, -4},       /* 0x1D */
+    {-4,  2},       /* 0x1E */
+    {-2,  8}        /* 0x1F */
+};
+
+const complexf_t v17_7200_constellation[16] =
+{
+    { 6, -6},       /* 0x00 */
+    {-2,  6},       /* 0x01 */
+    { 6,  2},       /* 0x02 */
+    {-6, -6},       /* 0x03 */
+    {-6,  6},       /* 0x04 */
+    { 2, -6},       /* 0x05 */
+    {-6, -2},       /* 0x06 */
+    { 6,  6},       /* 0x07 */
+    {-2,  2},       /* 0x08 */
+    { 6, -2},       /* 0x09 */
+    {-2, -6},       /* 0x0A */
+    { 2,  2},       /* 0x0B */
+    { 2, -2},       /* 0x0C */
+    {-6,  2},       /* 0x0D */
+    { 2,  6},       /* 0x0E */
+    {-2, -2}        /* 0x0F */
+};
+
+/* Raised root cosine pulse shaping; Beta = 0.25; 4 symbols either
+   side of the centre. */
+/* Created with mkshape -r 0.05 0.25 91 -l and then split up */
+#define PULSESHAPER_GAIN            (9.9888356312f/10.0f)
+#define PULSESHAPER_COEFF_SETS      10
+
+static const float pulseshaper[PULSESHAPER_COEFF_SETS][V17_TX_FILTER_STEPS] =
+{
+    {
+        -0.0029426223f,         /* Filter 0 */
+        -0.0183060118f,
+         0.0653192857f,
+        -0.1703207714f,
+         0.6218069936f,
+         0.6218069936f,
+        -0.1703207714f,
+         0.0653192857f,
+        -0.0183060118f
+    },
+    {
+         0.0031876922f,         /* Filter 1 */
+        -0.0300884145f,
+         0.0832744718f,
+        -0.1974255221f,
+         0.7664229820f,
+         0.4670580725f,
+        -0.1291107519f,
+         0.0424189243f,
+        -0.0059810465f
+    },
+    {
+         0.0097229236f,         /* Filter 2 */
+        -0.0394811291f,
+         0.0931039664f,
+        -0.2043906784f,
+         0.8910868760f,
+         0.3122713836f,
+        -0.0802880559f,
+         0.0179050490f,
+         0.0052057308f
+    },
+    {
+         0.0156117223f,         /* Filter 3 */
+        -0.0447125347f,
+         0.0922040267f,
+        -0.1862939416f,
+         0.9870942864f,
+         0.1669790517f,
+        -0.0301581072f,
+        -0.0051358510f,
+         0.0139350286f
+    },
+    {
+         0.0197702545f,         /* Filter 4 */
+        -0.0443470335f,
+         0.0789538534f,
+        -0.1399184160f,
+         1.0476130256f,
+         0.0393903028f,
+         0.0157339854f,
+        -0.0241879599f,
+         0.0193774571f
+    },
+    {
+         0.0212455717f,         /* Filter 5 */
+        -0.0375307894f,
+         0.0530516472f,
+        -0.0642195521f,
+         1.0682849922f,
+        -0.0642195521f,
+         0.0530516472f,
+        -0.0375307894f,
+         0.0212455717f
+    },
+    {
+         0.0193774571f,         /* Filter 6 */
+        -0.0241879599f,
+         0.0157339854f,
+         0.0393903028f,
+         1.0476130256f,
+        -0.1399184160f,
+         0.0789538534f,
+        -0.0443470335f,
+         0.0197702545f
+    },
+    {
+         0.0139350286f,         /* Filter 7 */
+        -0.0051358510f,
+        -0.0301581072f,
+         0.1669790517f,
+         0.9870942864f,
+        -0.1862939416f,
+         0.0922040267f,
+        -0.0447125347f,
+         0.0156117223f
+    },
+    {
+         0.0052057308f,         /* Filter 8 */
+         0.0179050490f,
+        -0.0802880559f,
+         0.3122713836f,
+         0.8910868760f,
+        -0.2043906784f,
+         0.0931039664f,
+        -0.0394811291f,
+         0.0097229236f
+    },
+    {
+        -0.0059810465f,         /* Filter 9 */
+         0.0424189243f,
+        -0.1291107519f,
+         0.4670580725f,
+         0.7664229820f,
+        -0.1974255221f,
+         0.0832744718f,
+        -0.0300884145f,
+         0.0031876922f
+    },
+};
+
+static __inline__ int scramble(v17_tx_state_t *s, int in_bit)
+{
+    int out_bit;
+
+    out_bit = (in_bit ^ (s->scramble_reg >> 17) ^ (s->scramble_reg >> 22)) & 1;
+    s->scramble_reg = (s->scramble_reg << 1) | out_bit;
+    return out_bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complexf_t training_get(v17_tx_state_t *s)
+{
+    static const complexf_t abcd[4] =
+    {
+        {-6.0f, -2.0f},
+        { 2.0f, -6.0f},
+        { 6.0f,  2.0f},
+        {-2.0f,  6.0f}
+    };
+    static const int cdba_to_abcd[4] =
+    {
+        2, 3, 1, 0
+    };
+    static const int dibit_to_step[4] =
+    {
+        1, 0, 2, 3
+    };
+    int bits;
+    int shift;
+
+    if (++s->training_step <= V17_TRAINING_SEG_3)
+    {
+        if (s->training_step <= V17_TRAINING_SEG_2)
+        {
+            if (s->training_step <= V17_TRAINING_SEG_TEP_B)
+            {
+                /* Optional segment: Unmodulated carrier (talker echo protection) */
+                return abcd[0];
+            }
+            if (s->training_step <= V17_TRAINING_SEG_1)
+            {
+                /* Optional segment: silence (talker echo protection) */
+                return complex_setf(0.0f, 0.0f);
+            }
+            /* Segment 1: ABAB... */
+            return abcd[(s->training_step & 1) ^ 1];
+        }
+        /* Segment 2: CDBA... */
+        /* Apply the scrambler */
+        bits = scramble(s, 1);
+        bits = (bits << 1) | scramble(s, 1);
+        s->constellation_state = cdba_to_abcd[bits];
+        if (s->short_train  &&  s->training_step == V17_TRAINING_SHORT_SEG_4)
+        {
+            /* Go straight to the ones test. */
+            s->training_step = V17_TRAINING_SEG_4;
+        }
+        return abcd[s->constellation_state];
+    }
+    /* Segment 3: Bridge... */
+    shift = ((s->training_step - V17_TRAINING_SEG_3 - 1) & 0x7) << 1;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Seg 3 shift %d\n", shift);
+    bits = scramble(s, V17_BRIDGE_WORD >> shift);
+    bits = (bits << 1) | scramble(s, V17_BRIDGE_WORD >> (shift + 1));
+    s->constellation_state = (s->constellation_state + dibit_to_step[bits]) & 3;
+    return abcd[s->constellation_state];
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int diff_and_convolutional_encode(v17_tx_state_t *s, int q)
+{
+    static const int diff_code[16] =
+    {
+        0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2
+    };
+    int y1;
+    int y2;
+    int this1;
+    int this2;
+
+    /* Differentially encode */
+    s->diff = diff_code[((q & 0x03) << 2) | s->diff];
+
+    /* Convolutionally encode the redundant bit */
+    y2 = s->diff >> 1;
+    y1 = s->diff;
+    this2 = y2 ^ y1 ^ (s->convolution >> 2) ^ ((y2 ^ (s->convolution >> 1)) & s->convolution);
+    this1 = y2 ^ (s->convolution >> 1) ^ (y1 & s->convolution);
+    s->convolution = ((s->convolution & 1) << 2) | ((this2 & 1) << 1) | (this1 & 1);
+    return ((q << 1) & 0x78) | (s->diff << 1) | ((s->convolution >> 2) & 1);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int fake_get_bit(void *user_data)
+{
+    return 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complexf_t getbaud(v17_tx_state_t *s)
+{
+    int i;
+    int bit;
+    int bits;
+
+    if (s->in_training)
+    {
+        if (s->training_step <= V17_TRAINING_END)
+        {
+            /* Send the training sequence */
+            if (s->training_step < V17_TRAINING_SEG_4)
+                return training_get(s);
+            /* The last step in training is to send some 1's */
+            if (++s->training_step > V17_TRAINING_END)
+            {
+                /* Training finished - commence normal operation. */
+                s->current_get_bit = s->get_bit;
+                s->in_training = FALSE;
+            }
+        }
+        else
+        {
+            if (++s->training_step > V17_TRAINING_SHUTDOWN_A)
+            {
+                /* The shutdown sequence is 32 bauds of all 1's, then 48 bauds
+                   of silence */
+                return complex_setf(0.0f, 0.0f);
+            }
+        }
+    }
+    bits = 0;
+    for (i = 0;  i < s->bits_per_symbol;  i++)
+    {
+        if ((bit = s->current_get_bit(s->user_data)) == PUTBIT_END_OF_DATA)
+        {
+printf("End of real data\n");
+            /* End of real data. Switch to the fake get_bit routine, until we
+               have shut down completely. */
+            s->current_get_bit = fake_get_bit;
+            s->in_training = TRUE;
+            bit = 1;
+        }
+        bits |= (scramble(s, bit) << i);
+    }
+    return s->constellation[diff_and_convolutional_encode(s, bits)];
+}
+/*- End of function --------------------------------------------------------*/
+
+int v17_tx(v17_tx_state_t *s, int16_t amp[], int len)
+{
+    complexf_t x;
+    complexf_t z;
+    int i;
+    int sample;
+
+    if (s->training_step >= V17_TRAINING_SHUTDOWN_END)
+    {
+        /* Once we have sent the shutdown sequence, we stop sending completely. */
+        return 0;
+    }
+    for (sample = 0;  sample < len;  sample++)
+    {
+        if ((s->baud_phase += 3) >= 10)
+        {
+            s->baud_phase -= 10;
+            s->rrc_filter[s->rrc_filter_step] =
+            s->rrc_filter[s->rrc_filter_step + V17_TX_FILTER_STEPS] = getbaud(s);
+            if (++s->rrc_filter_step >= V17_TX_FILTER_STEPS)
+                s->rrc_filter_step = 0;
+        }
+        /* Root raised cosine pulse shaping at baseband */
+        x.re = 0.0f;
+        x.im = 0.0f;
+        for (i = 0;  i < V17_TX_FILTER_STEPS;  i++)
+        {
+            x.re += pulseshaper[9 - s->baud_phase][i]*s->rrc_filter[i + s->rrc_filter_step].re;
+            x.im += pulseshaper[9 - s->baud_phase][i]*s->rrc_filter[i + s->rrc_filter_step].im;
+        }
+        /* Now create and modulate the carrier */
+        z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
+        /* Don't bother saturating. We should never clip. */
+        amp[sample] = (int16_t) lrintf((x.re*z.re - x.im*z.im)*s->gain);
+    }
+    return sample;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v17_tx_power(v17_tx_state_t *s, float power)
+{
+    /* The constellation design seems to keep the average power the same, regardless
+       of which bit rate is in use. */
+    s->gain = 0.223f*powf(10.0f, (power - DBM0_MAX_POWER)/20.0f)*32768.0f/PULSESHAPER_GAIN;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v17_tx_set_get_bit(v17_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
+{
+    if (s->get_bit == s->current_get_bit)
+        s->current_get_bit = get_bit;
+    s->get_bit = get_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v17_tx_restart(v17_tx_state_t *s, int rate, int tep, int short_train)
+{
+    switch (rate)
+    {
+    case 14400:
+        s->bits_per_symbol = 6;
+        s->constellation = v17_14400_constellation;
+        break;
+    case 12000:
+        s->bits_per_symbol = 5;
+        s->constellation = v17_12000_constellation;
+        break;
+    case 9600:
+        s->bits_per_symbol = 4;
+        s->constellation = v17_9600_constellation;
+        break;
+    case 7200:
+        s->bits_per_symbol = 3;
+        s->constellation = v17_7200_constellation;
+        break;
+    default:
+        return -1;
+    }
+    /* NB: some modems seem to use 3 instead of 1 for long training */
+    s->diff = (short_train)  ?  0  :  1;
+    s->bit_rate = rate;
+    cvec_zerof(s->rrc_filter, sizeof(s->rrc_filter)/sizeof(s->rrc_filter[0]));
+    s->rrc_filter_step = 0;
+    s->convolution = 0;
+    s->scramble_reg = 0x2ECDD5;
+    s->in_training = TRUE;
+    s->short_train = short_train;
+    s->training_step =  (tep)  ?  V17_TRAINING_SEG_TEP_A  :  V17_TRAINING_SEG_1;
+    s->carrier_phase = 0;
+    s->baud_phase = 0;
+    s->constellation_state = 0;
+    s->current_get_bit = fake_get_bit;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+v17_tx_state_t *v17_tx_init(v17_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data)
+{
+    if (s == NULL)
+    {
+        if ((s = (v17_tx_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    s->get_bit = get_bit;
+    s->user_data = user_data;
+    s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
+    v17_tx_power(s, -14.0f);
+    v17_tx_restart(s, rate, tep, FALSE);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v17_tx_release(v17_tx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v22bis_rx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1662 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v22bis_rx.c - ITU V.22bis modem receive part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v22bis_rx.c,v 1.32 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \file */
+
+/* THIS IS A WORK IN PROGRESS - NOT YET FUNCTIONAL! */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/vector_float.h"
+#include "spandsp/async.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/arctan2.h"
+#include "spandsp/complex.h"
+#include "spandsp/dds.h"
+#include "spandsp/complex_filters.h"
+
+#include "spandsp/v29rx.h"
+#include "spandsp/v22bis.h"
+
+#define ms_to_symbols(t)    (((t)*600)/1000)
+
+#define EQUALIZER_DELTA     0.25f
+
+/*
+The basic method used by the V.22bis receiver is:
+
+    Put each sample into the pulse-shaping and phase shift filter buffer
+
+    At T/2 rate:
+        Filter and demodulate the contents of the input filter buffer, producing a sample
+        in the equalizer filter buffer.
+
+        Tune the symbol timing based on the latest 3 samples in the equalizer buffer. This
+        updates the decision points for taking the T/2 samples.
+
+        Equalize the contents of the equalizer buffer, producing a demodulated constellation
+        point.
+
+        Find the nearest constellation point to the received position. This is our received
+        symbol.
+
+        Tune the local carrier, based on the angular mismatch between the actual signal and
+        the decision.
+        
+        Tune the equalizer, based on the mismatch between the actual signal and the decision.
+
+        Descramble and output the bits represented by the decision.
+*/
+
+enum
+{
+    V22BIS_TRAINING_STAGE_NORMAL_OPERATION,
+    V22BIS_TRAINING_STAGE_SYMBOL_ACQUISITION,
+    V22BIS_TRAINING_STAGE_LOG_PHASE,
+    V22BIS_TRAINING_STAGE_UNSCRAMBLED_ONES,
+    V22BIS_TRAINING_STAGE_UNSCRAMBLED_0011,
+    V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200,
+    V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_2400,
+    V22BIS_TRAINING_STAGE_WAIT_FOR_START_1,
+    V22BIS_TRAINING_STAGE_WAIT_FOR_START_2,
+    V22BIS_TRAINING_STAGE_PARKED
+};
+
+/* Raised root cosine pulse shaping; Beta = 0.75; 4 symbols either
+   side of the centre. We cannot simplify this by using only half
+   the filter, as each variant are each skewed by a n/PULSESHAPER_COEFF_SETS of a
+   sample. Only one is symmetric. */
+//#define PULSESHAPER_GAIN        159.37711522f
+#define PULSESHAPER_GAIN        39.98830768f
+#define PULSESHAPER_COEFF_SETS  12
+static const complexf_t pulseshaper_1200[PULSESHAPER_COEFF_SETS][V22BIS_RX_FILTER_STEPS] =
+{
+    {
+        { 0.0079885982f, -0.0245863758f},       /* Filter 0 */
+        { 0.0511994623f, -0.0166357141f},
+        { 0.0660513043f,  0.0479890816f},
+        {-0.0000000000f,  0.1045738682f},
+        {-0.0949529186f,  0.0689873323f},
+        {-0.1091215536f, -0.0354557447f},
+        {-0.0284108873f, -0.0874397159f},
+        { 0.0266686007f, -0.0367061794f},
+        {-0.0269077960f, -0.0000000000f},
+        {-0.0733404681f, -0.1009444892f},
+        { 0.0759629756f, -0.2337899953f},
+        { 0.3664972484f, -0.1190821752f},
+        { 0.4341508448f,  0.3154290617f},
+        {-0.0000000001f,  0.6913219094f},
+        {-0.6796512008f,  0.4937954843f},
+        {-0.9258067012f, -0.3008128405f},
+        {-0.3345100582f, -1.0295161009f},
+        { 0.6816816330f, -0.9382542372f},
+        { 1.1997879744f,  0.0000000000f},
+        { 0.7052176595f,  0.9706488252f},
+        {-0.3583812416f,  1.1029839516f},
+        {-1.0295161009f,  0.3345100582f},
+        {-0.7875382304f, -0.5721800327f},
+        {-0.0000000001f, -0.8400950432f},
+        { 0.5592911839f, -0.4063488245f},
+        { 0.5103749037f,  0.1658308655f},
+        { 0.1190821752f,  0.3664972484f},
+        {-0.1444901675f,  0.1988736391f},
+        {-0.1247742549f,  0.0000000000f},
+        {-0.0158160049f, -0.0217688642f},
+        {-0.0140205137f,  0.0431507044f},
+        {-0.0874397159f,  0.0284108873f},
+        {-0.0928243399f, -0.0674408302f},
+        {-0.0000000000f, -0.1173682660f},
+        { 0.0846020356f, -0.0614669770f},
+        { 0.0776479617f,  0.0252293516f},
+        { 0.0166357141f,  0.0511994623f},
+    },
+    {
+        { 0.0086805914f, -0.0267161131f},       /* Filter 1 */
+        { 0.0534664392f, -0.0173722990f},
+        { 0.0678047314f,  0.0492630191f},
+        {-0.0000000000f,  0.1061014757f},
+        {-0.0953093544f,  0.0692462996f},
+        {-0.1081032082f, -0.0351248607f},
+        {-0.0275043193f, -0.0846495852f},
+        { 0.0237129591f, -0.0326380879f},
+        {-0.0341038331f, -0.0000000000f},
+        {-0.0787785500f, -0.1084293649f},
+        { 0.0793628618f, -0.2442537695f},
+        { 0.3781612813f, -0.1228720471f},
+        { 0.4445744753f,  0.3230022490f},
+        {-0.0000000001f,  0.7040774226f},
+        {-0.6892225146f,  0.5007494688f},
+        {-0.9354411960f, -0.3039432764f},
+        {-0.3369024098f, -1.0368790627f},
+        { 0.6845118403f, -0.9421496987f},
+        { 1.2013363838f,  0.0000000000f},
+        { 0.7041431069f,  0.9691697955f},
+        {-0.3568129838f,  1.0981574059f},
+        {-1.0219419003f,  0.3320490718f},
+        {-0.7792053819f, -0.5661258698f},
+        {-0.0000000001f, -0.8281568289f},
+        { 0.5489386916f, -0.3988272846f},
+        { 0.4981442094f,  0.1618568748f},
+        { 0.1153177992f,  0.3549116850f},
+        {-0.1380993575f,  0.1900774688f},
+        {-0.1156847477f,  0.0000000000f},
+        {-0.0116915042f, -0.0160919763f},
+        {-0.0155188413f,  0.0477620810f},
+        {-0.0900719389f,  0.0292661469f},
+        {-0.0935767666f, -0.0679875016f},
+        {-0.0000000000f, -0.1168202460f},
+        { 0.0833092555f, -0.0605277158f},
+        { 0.0755547658f,  0.0245492328f},
+        { 0.0158989299f,  0.0489318743f},
+    },
+    {
+        { 0.0093799150f, -0.0288684089f},       /* Filter 2 */
+        { 0.0557304025f, -0.0181079060f},
+        { 0.0695286095f,  0.0505154915f},
+        {-0.0000000000f,  0.1075555831f},
+        {-0.0955764726f,  0.0694403723f},
+        {-0.1069486886f, -0.0347497351f},
+        {-0.0265459362f, -0.0816999897f},
+        { 0.0206513591f, -0.0284241568f},
+        {-0.0414781198f, -0.0000000000f},
+        {-0.0843107775f, -0.1160438284f},
+        { 0.0828017443f, -0.2548375726f},
+        { 0.3898994923f, -0.1266860217f},
+        { 0.4550133944f,  0.3305865824f},
+        {-0.0000000001f,  0.7167864442f},
+        {-0.6987025142f,  0.5076370835f},
+        {-0.9449097514f, -0.3070197999f},
+        {-0.3392250240f, -1.0440272093f},
+        { 0.6871879101f, -0.9458330274f},
+        { 1.2026044130f,  0.0000000000f},
+        { 0.7029046416f,  0.9674652219f},
+        {-0.3551651835f,  1.0930860043f},
+        {-1.0141602755f,  0.3295206726f},
+        {-0.7707393169f, -0.5599749088f},
+        {-0.0000000001f, -0.8161166310f},
+        { 0.5385575294f, -0.3912849724f},
+        { 0.4859414399f,  0.1578919441f},
+        { 0.1115802750f,  0.3434087634f},
+        {-0.1317866892f,  0.1813888103f},
+        {-0.1067595631f,  0.0000000000f},
+        {-0.0076726158f, -0.0105604501f},
+        {-0.0169618148f,  0.0522031002f},
+        {-0.0925478712f,  0.0300706252f},
+        {-0.0942174047f, -0.0684529543f},
+        {-0.0000000000f, -0.1161677912f},
+        { 0.0819620788f, -0.0595489368f},
+        { 0.0734324455f,  0.0238596480f},
+        { 0.0151627110f,  0.0466660261f},
+    },
+    {
+        { 0.0100859674f, -0.0310414154f},       /* Filter 3 */
+        { 0.0579889156f, -0.0188417397f},
+        { 0.0712205172f,  0.0517447330f},
+        {-0.0000000000f,  0.1089330688f},
+        {-0.0957518741f,  0.0695678070f},
+        {-0.1056557149f, -0.0343296230f},
+        {-0.0255352631f, -0.0785894617f},
+        { 0.0174835511f, -0.0240640435f},
+        {-0.0490297712f, -0.0000000000f},
+        {-0.0899358466f, -0.1237860769f},
+        { 0.0862785354f, -0.2655380368f},
+        { 0.4017075598f, -0.1305226982f},
+        { 0.4654633999f,  0.3381789625f},
+        {-0.0000000001f,  0.7294434309f},
+        {-0.7080869079f,  0.5144552588f},
+        {-0.9542079568f, -0.3100409508f},
+        {-0.3414767087f, -1.0509572029f},
+        { 0.6897085309f, -0.9493023753f},
+        { 1.2035913467f,  0.0000000000f},
+        { 0.7015029192f,  0.9655358791f},
+        {-0.3534386754f,  1.0877723694f},
+        {-1.0061750412f,  0.3269260824f},
+        {-0.7621439099f, -0.5537299514f},
+        {-0.0000000001f, -0.8039799333f},
+        { 0.5281522870f, -0.3837251067f},
+        { 0.4737714827f,  0.1539376825f},
+        { 0.1078709438f,  0.3319926262f},
+        {-0.1255540103f,  0.1728102714f},
+        {-0.0980006009f,  0.0000000000f},
+        {-0.0037596615f, -0.0051747300f},
+        {-0.0183496606f,  0.0564744473f},
+        {-0.0948692262f,  0.0308248810f},
+        {-0.0947483405f, -0.0688387007f},
+        {-0.0000000000f, -0.1154139340f},
+        { 0.0805630460f, -0.0585324802f},
+        { 0.0712837577f,  0.0231614988f},
+        { 0.0144278063f,  0.0444042198f},
+    },
+    {
+        { 0.0107981311f, -0.0332332328f},       /* Filter 4 */
+        { 0.0602394938f, -0.0195729975f},
+        { 0.0728780255f,  0.0529489815f},
+        {-0.0000000000f,  0.1102307960f},
+        {-0.0958332121f,  0.0696269050f},
+        {-0.1042220443f, -0.0338637941f},
+        {-0.0244718455f, -0.0753165931f},
+        { 0.0142093524f, -0.0195574965f},
+        {-0.0567577891f, -0.0000000000f},
+        {-0.0956523716f, -0.1316542029f},
+        { 0.0897921249f, -0.2763517499f},
+        { 0.4135811031f, -0.1343806386f},
+        { 0.4759201407f,  0.3457762301f},
+        {-0.0000000001f,  0.7420427203f},
+        {-0.7173712850f,  0.5212007165f},
+        {-0.9633312821f, -0.3130052984f},
+        {-0.3436563909f, -1.0576655865f},
+        { 0.6920724511f, -0.9525560141f},
+        { 1.2042965889f,  0.0000000000f},
+        { 0.6999385953f,  0.9633828402f},
+        {-0.3516343236f,  1.0822191238f},
+        {-0.9979898930f,  0.3242665529f},
+        {-0.7534233332f, -0.5473940969f},
+        {-0.0000000001f, -0.7917523384f},
+        { 0.5177274346f, -0.3761509955f},
+        { 0.4616391361f,  0.1499956548f},
+        { 0.1041911170f,  0.3206672966f},
+        {-0.1194031686f,  0.1643443555f},
+        {-0.0894096494f,  0.0000000000f},
+        { 0.0000471013f,  0.0000648294f},
+        {-0.0196826290f,  0.0605769046f},
+        {-0.0970377848f,  0.0315294862f},
+        {-0.0951716974f, -0.0691462904f},
+        {-0.0000000000f, -0.1145617142f},
+        { 0.0791146755f, -0.0574801750f},
+        { 0.0691114515f,  0.0224556718f},
+        { 0.0136949494f,  0.0421487205f},
+    },
+    {
+        { 0.0115157729f, -0.0354419053f},       /* Filter 5 */
+        { 0.0624796189f, -0.0203008596f},
+        { 0.0744986683f,  0.0541264527f},
+        {-0.0000000000f,  0.1114456356f},
+        {-0.0958181471f,  0.0696159601f},
+        {-0.1026455015f, -0.0333515443f},
+        {-0.0233552568f, -0.0718800873f},
+        { 0.0108286384f, -0.0149043426f},
+        {-0.0646610633f, -0.0000000000f},
+        {-0.1014589071f, -0.1396462023f},
+        { 0.0933413655f, -0.2872751951f},
+        { 0.4255155921f, -0.1382583976f},
+        { 0.4863792956f,  0.3533752263f},
+        {-0.0000000001f,  0.7545788884f},
+        {-0.7265513539f,  0.5278704762f},
+        {-0.9722753763f, -0.3159114122f},
+        {-0.3457630277f, -1.0641491413f},
+        { 0.6942784786f, -0.9555923343f},
+        { 1.2047197819f,  0.0000000000f},
+        { 0.6982125044f,  0.9610070586f},
+        {-0.3497529626f,  1.0764288902f},
+        {-0.9896088243f,  0.3215433955f},
+        {-0.7445815802f, -0.5409702063f},
+        {-0.0000000001f, -0.7794392109f},
+        { 0.5072873235f, -0.3685658276f},
+        { 0.4495492578f,  0.1460674107f},
+        { 0.1005420759f,  0.3094367087f},
+        {-0.1133359149f,  0.1559935063f},
+        {-0.0809883848f,  0.0000000000f},
+        { 0.0037474802f,  0.0051579643f},
+        {-0.0209610034f,  0.0645113364f},
+        {-0.0990553871f,  0.0321850479f},
+        {-0.0954896435f, -0.0693772882f},
+        {-0.0000000000f, -0.1136142015f},
+        { 0.0776194856f, -0.0563938580f},
+        { 0.0669182166f,  0.0217430461f},
+        { 0.0129648596f,  0.0399017334f},
+    },
+    {
+        { 0.0122382389f, -0.0376654267f},       /* Filter 6 */
+        { 0.0647067279f, -0.0210244898f},
+        { 0.0760799870f,  0.0552753434f},
+        {-0.0000000000f,  0.1125744730f},
+        {-0.0957043841f,  0.0695333034f},
+        {-0.1009239629f, -0.0327921845f},
+        {-0.0221851002f, -0.0682787150f},
+        { 0.0073413476f, -0.0101044979f},
+        {-0.0727383792f, -0.0000000000f},
+        {-0.1073539481f, -0.1477600336f},
+        { 0.0969250873f, -0.2983047366f},
+        { 0.4375065267f, -0.1421544850f},
+        { 0.4968364835f,  0.3609728217f},
+        {-0.0000000001f,  0.7670462132f},
+        {-0.7356228828f,  0.5344613194f},
+        {-0.9810359478f, -0.3187578917f},
+        {-0.3477955461f, -1.0704045296f},
+        { 0.6963254809f, -0.9584097862f},
+        { 1.2048609257f,  0.0000000000f},
+        { 0.6963254809f,  0.9584097862f},
+        {-0.3477955461f,  1.0704045296f},
+        {-0.9810359478f,  0.3187578917f},
+        {-0.7356228828f, -0.5344613194f},
+        {-0.0000000001f, -0.7670462132f},
+        { 0.4968364835f, -0.3609728217f},
+        { 0.4375065267f,  0.1421544850f},
+        { 0.0969250873f,  0.2983047366f},
+        {-0.1073539481f,  0.1477600336f},
+        {-0.0727383792f,  0.0000000000f},
+        { 0.0073413476f,  0.0101044979f},
+        {-0.0221851002f,  0.0682787150f},
+        {-0.1009239629f,  0.0327921845f},
+        {-0.0957043841f, -0.0695333034f},
+        {-0.0000000000f, -0.1125744730f},
+        { 0.0760799870f, -0.0552753434f},
+        { 0.0647067279f,  0.0210244898f},
+        { 0.0122382389f,  0.0376654267f},
+    },
+    {
+        { 0.0129648596f, -0.0399017334f},       /* Filter 7 */
+        { 0.0669182166f, -0.0217430461f},
+        { 0.0776194856f,  0.0563938580f},
+        {-0.0000000000f,  0.1136142015f},
+        {-0.0954896435f,  0.0693772882f},
+        {-0.0990553871f, -0.0321850479f},
+        {-0.0209610034f, -0.0645113364f},
+        { 0.0037474802f, -0.0051579643f},
+        {-0.0809883848f, -0.0000000000f},
+        {-0.1133359149f, -0.1559935063f},
+        { 0.1005420759f, -0.3094367087f},
+        { 0.4495492578f, -0.1460674107f},
+        { 0.5072873235f,  0.3685658276f},
+        {-0.0000000001f,  0.7794392109f},
+        {-0.7445815802f,  0.5409702063f},
+        {-0.9896088243f, -0.3215433955f},
+        {-0.3497529626f, -1.0764288902f},
+        { 0.6982125044f, -0.9610070586f},
+        { 1.2047197819f,  0.0000000000f},
+        { 0.6942784786f,  0.9555923343f},
+        {-0.3457630277f,  1.0641491413f},
+        {-0.9722753763f,  0.3159114122f},
+        {-0.7265513539f, -0.5278704762f},
+        {-0.0000000001f, -0.7545788884f},
+        { 0.4863792956f, -0.3533752263f},
+        { 0.4255155921f,  0.1382583976f},
+        { 0.0933413655f,  0.2872751951f},
+        {-0.1014589071f,  0.1396462023f},
+        {-0.0646610633f,  0.0000000000f},
+        { 0.0108286384f,  0.0149043426f},
+        {-0.0233552568f,  0.0718800873f},
+        {-0.1026455015f,  0.0333515443f},
+        {-0.0958181471f, -0.0696159601f},
+        {-0.0000000000f, -0.1114456356f},
+        { 0.0744986683f, -0.0541264527f},
+        { 0.0624796189f,  0.0203008596f},
+        { 0.0115157729f,  0.0354419053f},
+    },
+    {
+        { 0.0136949494f, -0.0421487205f},       /* Filter 8 */
+        { 0.0691114515f, -0.0224556718f},
+        { 0.0791146755f,  0.0574801750f},
+        {-0.0000000000f,  0.1145617142f},
+        {-0.0951716974f,  0.0691462904f},
+        {-0.0970377848f, -0.0315294862f},
+        {-0.0196826290f, -0.0605769046f},
+        { 0.0000471013f, -0.0000648294f},
+        {-0.0894096494f, -0.0000000000f},
+        {-0.1194031686f, -0.1643443555f},
+        { 0.1041911170f, -0.3206672966f},
+        { 0.4616391361f, -0.1499956548f},
+        { 0.5177274346f,  0.3761509955f},
+        {-0.0000000001f,  0.7917523384f},
+        {-0.7534233332f,  0.5473940969f},
+        {-0.9979898930f, -0.3242665529f},
+        {-0.3516343236f, -1.0822191238f},
+        { 0.6999385953f, -0.9633828402f},
+        { 1.2042965889f,  0.0000000000f},
+        { 0.6920724511f,  0.9525560141f},
+        {-0.3436563909f,  1.0576655865f},
+        {-0.9633312821f,  0.3130052984f},
+        {-0.7173712850f, -0.5212007165f},
+        {-0.0000000001f, -0.7420427203f},
+        { 0.4759201407f, -0.3457762301f},
+        { 0.4135811031f,  0.1343806386f},
+        { 0.0897921249f,  0.2763517499f},
+        {-0.0956523716f,  0.1316542029f},
+        {-0.0567577891f,  0.0000000000f},
+        { 0.0142093524f,  0.0195574965f},
+        {-0.0244718455f,  0.0753165931f},
+        {-0.1042220443f,  0.0338637941f},
+        {-0.0958332121f, -0.0696269050f},
+        {-0.0000000000f, -0.1102307960f},
+        { 0.0728780255f, -0.0529489815f},
+        { 0.0602394938f,  0.0195729975f},
+        { 0.0107981311f,  0.0332332328f},
+    },
+    {
+        { 0.0144278063f, -0.0444042198f},       /* Filter 9 */
+        { 0.0712837577f, -0.0231614988f},
+        { 0.0805630460f,  0.0585324802f},
+        {-0.0000000000f,  0.1154139340f},
+        {-0.0947483405f,  0.0688387007f},
+        {-0.0948692262f, -0.0308248810f},
+        {-0.0183496606f, -0.0564744473f},
+        {-0.0037596615f,  0.0051747300f},
+        {-0.0980006009f, -0.0000000000f},
+        {-0.1255540103f, -0.1728102714f},
+        { 0.1078709438f, -0.3319926262f},
+        { 0.4737714827f, -0.1539376825f},
+        { 0.5281522870f,  0.3837251067f},
+        {-0.0000000001f,  0.8039799333f},
+        {-0.7621439099f,  0.5537299514f},
+        {-1.0061750412f, -0.3269260824f},
+        {-0.3534386754f, -1.0877723694f},
+        { 0.7015029192f, -0.9655358791f},
+        { 1.2035913467f,  0.0000000000f},
+        { 0.6897085309f,  0.9493023753f},
+        {-0.3414767087f,  1.0509572029f},
+        {-0.9542079568f,  0.3100409508f},
+        {-0.7080869079f, -0.5144552588f},
+        {-0.0000000001f, -0.7294434309f},
+        { 0.4654633999f, -0.3381789625f},
+        { 0.4017075598f,  0.1305226982f},
+        { 0.0862785354f,  0.2655380368f},
+        {-0.0899358466f,  0.1237860769f},
+        {-0.0490297712f,  0.0000000000f},
+        { 0.0174835511f,  0.0240640435f},
+        {-0.0255352631f,  0.0785894617f},
+        {-0.1056557149f,  0.0343296230f},
+        {-0.0957518741f, -0.0695678070f},
+        {-0.0000000000f, -0.1089330688f},
+        { 0.0712205172f, -0.0517447330f},
+        { 0.0579889156f,  0.0188417397f},
+        { 0.0100859674f,  0.0310414154f},
+    },
+    {
+        { 0.0151627110f, -0.0466660261f},       /* Filter 10 */
+        { 0.0734324455f, -0.0238596480f},
+        { 0.0819620788f,  0.0595489368f},
+        {-0.0000000000f,  0.1161677912f},
+        {-0.0942174047f,  0.0684529543f},
+        {-0.0925478712f, -0.0300706252f},
+        {-0.0169618148f, -0.0522031002f},
+        {-0.0076726158f,  0.0105604501f},
+        {-0.1067595631f, -0.0000000000f},
+        {-0.1317866892f, -0.1813888103f},
+        { 0.1115802750f, -0.3434087634f},
+        { 0.4859414399f, -0.1578919441f},
+        { 0.5385575294f,  0.3912849724f},
+        {-0.0000000001f,  0.8161166310f},
+        {-0.7707393169f,  0.5599749088f},
+        {-1.0141602755f, -0.3295206726f},
+        {-0.3551651835f, -1.0930860043f},
+        { 0.7029046416f, -0.9674652219f},
+        { 1.2026044130f,  0.0000000000f},
+        { 0.6871879101f,  0.9458330274f},
+        {-0.3392250240f,  1.0440272093f},
+        {-0.9449097514f,  0.3070197999f},
+        {-0.6987025142f, -0.5076370835f},
+        {-0.0000000001f, -0.7167864442f},
+        { 0.4550133944f, -0.3305865824f},
+        { 0.3898994923f,  0.1266860217f},
+        { 0.0828017443f,  0.2548375726f},
+        {-0.0843107775f,  0.1160438284f},
+        {-0.0414781198f,  0.0000000000f},
+        { 0.0206513591f,  0.0284241568f},
+        {-0.0265459362f,  0.0816999897f},
+        {-0.1069486886f,  0.0347497351f},
+        {-0.0955764726f, -0.0694403723f},
+        {-0.0000000000f, -0.1075555831f},
+        { 0.0695286095f, -0.0505154915f},
+        { 0.0557304025f,  0.0181079060f},
+        { 0.0093799150f,  0.0288684089f},
+    },
+    {
+        { 0.0158989299f, -0.0489318743f},       /* Filter 11 */
+        { 0.0755547658f, -0.0245492328f},
+        { 0.0833092555f,  0.0605277158f},
+        {-0.0000000000f,  0.1168202460f},
+        {-0.0935767666f,  0.0679875016f},
+        {-0.0900719389f, -0.0292661469f},
+        {-0.0155188413f, -0.0477620810f},
+        {-0.0116915042f,  0.0160919763f},
+        {-0.1156847477f, -0.0000000000f},
+        {-0.1380993575f, -0.1900774688f},
+        { 0.1153177992f, -0.3549116850f},
+        { 0.4981442094f, -0.1618568748f},
+        { 0.5489386916f,  0.3988272846f},
+        {-0.0000000001f,  0.8281568289f},
+        {-0.7792053819f,  0.5661258698f},
+        {-1.0219419003f, -0.3320490718f},
+        {-0.3568129838f, -1.0981574059f},
+        { 0.7041431069f, -0.9691697955f},
+        { 1.2013363838f,  0.0000000000f},
+        { 0.6845118403f,  0.9421496987f},
+        {-0.3369024098f,  1.0368790627f},
+        {-0.9354411960f,  0.3039432764f},
+        {-0.6892225146f, -0.5007494688f},
+        {-0.0000000001f, -0.7040774226f},
+        { 0.4445744753f, -0.3230022490f},
+        { 0.3781612813f,  0.1228720471f},
+        { 0.0793628618f,  0.2442537695f},
+        {-0.0787785500f,  0.1084293649f},
+        {-0.0341038331f,  0.0000000000f},
+        { 0.0237129591f,  0.0326380879f},
+        {-0.0275043193f,  0.0846495852f},
+        {-0.1081032082f,  0.0351248607f},
+        {-0.0953093544f, -0.0692462996f},
+        {-0.0000000000f, -0.1061014757f},
+        { 0.0678047314f, -0.0492630191f},
+        { 0.0534664392f,  0.0173722990f},
+        { 0.0086805914f,  0.0267161131f},
+    },
+};
+
+static const complexf_t pulseshaper_2400[PULSESHAPER_COEFF_SETS][V22BIS_RX_FILTER_STEPS] =
+{
+    {
+        { 0.0209144205f,  0.0151952161f},       /* Filter 0 */
+        {-0.0435528643f,  0.0316430070f},
+        {-0.0252293516f, -0.0776479617f},
+        { 0.1045738682f,  0.0000000001f},
+        {-0.0362687893f,  0.1116238534f},
+        {-0.0928243399f, -0.0674408302f},
+        { 0.0743806660f, -0.0540407188f},
+        { 0.0140205137f,  0.0431507044f},
+        { 0.0269077960f,  0.0000000000f},
+        {-0.0385573655f,  0.1186673641f},
+        {-0.1988736391f, -0.1444901675f},
+        { 0.3117611706f, -0.2265077531f},
+        { 0.1658308655f,  0.5103749037f},
+        {-0.6913219094f, -0.0000000002f},
+        { 0.2596036494f, -0.7989778519f},
+        { 0.7875382304f,  0.5721800327f},
+        {-0.8757586479f,  0.6362759471f},
+        {-0.3583812416f, -1.1029839516f},
+        { 1.1997879744f,  0.0000000000f},
+        {-0.3707548678f,  1.1410661936f},
+        {-0.9382542372f, -0.6816816330f},
+        { 0.8757586479f, -0.6362759471f},
+        { 0.3008128405f,  0.9258067012f},
+        {-0.8400950432f,  0.0000000002f},
+        { 0.2136302292f, -0.6574862003f},
+        { 0.4341508448f,  0.3154290617f},
+        {-0.3117611706f,  0.2265077531f},
+        {-0.0759629756f, -0.2337899953f},
+        { 0.1247742549f, -0.0000000001f},
+        {-0.0083149662f,  0.0255908351f},
+        { 0.0367061794f,  0.0266686007f},
+        {-0.0743806660f,  0.0540407188f},
+        {-0.0354557447f, -0.1091215536f},
+        { 0.1173682660f, -0.0000000001f},
+        {-0.0323151015f,  0.0994556621f},
+        {-0.0660513043f, -0.0479890816f},
+        { 0.0435528643f, -0.0316430070f},
+    },
+    {
+        { 0.0227260832f,  0.0165114664f},       /* Filter 1 */
+        {-0.0454812683f,  0.0330440775f},
+        {-0.0258991010f, -0.0797092393f},
+        { 0.1061014757f,  0.0000000001f},
+        {-0.0364049338f,  0.1120428666f},
+        {-0.0919580832f, -0.0668114573f},
+        { 0.0720072389f, -0.0523163229f},
+        { 0.0124666411f,  0.0383683741f},
+        { 0.0341038331f,  0.0000000000f},
+        {-0.0414163321f,  0.1274663657f},
+        {-0.2077746689f, -0.1509571373f},
+        { 0.3216831982f, -0.2337165177f},
+        { 0.1698123366f,  0.5226286054f},
+        {-0.7040774226f, -0.0000000002f},
+        { 0.2632595599f, -0.8102296591f},
+        { 0.7957338095f,  0.5781344771f},
+        {-0.8820219636f,  0.6408264637f},
+        {-0.3598691821f, -1.1075633764f},
+        { 1.2013363838f,  0.0000000000f},
+        {-0.3701899350f,  1.1393274069f},
+        {-0.9341484904f, -0.6786985993f},
+        { 0.8693157434f, -0.6315948367f},
+        { 0.2976299822f,  0.9160109162f},
+        {-0.8281568289f,  0.0000000002f},
+        { 0.2096759230f, -0.6453161240f},
+        { 0.4237467945f,  0.3078700602f},
+        {-0.3019059300f,  0.2193474919f},
+        {-0.0726031289f, -0.2234494686f},
+        { 0.1156847477f, -0.0000000001f},
+        {-0.0061465879f,  0.0189172514f},
+        { 0.0406288542f,  0.0295185894f},
+        {-0.0766197667f,  0.0556675196f},
+        {-0.0357431434f, -0.1100060865f},
+        { 0.1168202460f, -0.0000000001f},
+        {-0.0318213031f,  0.0979359001f},
+        {-0.0642707273f, -0.0466954149f},
+        { 0.0416239388f, -0.0302415621f},
+    },
+    {
+        { 0.0245569348f,  0.0178416576f},       /* Filter 2 */
+        {-0.0474071130f,  0.0344432816f},
+        {-0.0265575647f, -0.0817357823f},
+        { 0.1075555831f,  0.0000000001f},
+        {-0.0365069620f,  0.1123568788f},
+        {-0.0909759924f, -0.0660979301f},
+        { 0.0694981664f, -0.0504933707f},
+        { 0.0108570615f,  0.0334145986f},
+        { 0.0414781198f,  0.0000000000f},
+        {-0.0443248004f,  0.1364177018f},
+        {-0.2167777866f, -0.1574982852f},
+        { 0.3316683173f, -0.2409711480f},
+        { 0.1737996489f,  0.5349003077f},
+        {-0.7167864442f, -0.0000000002f},
+        { 0.2668806314f, -0.8213740587f},
+        { 0.8037882447f,  0.5839863420f},
+        {-0.8881026506f,  0.6452443004f},
+        {-0.3612760901f, -1.1118934155f},
+        { 1.2026044130f,  0.0000000000f},
+        {-0.3695388138f,  1.1373236179f},
+        {-0.9298345447f, -0.6755643487f},
+        { 0.8626962900f, -0.6267855763f},
+        { 0.2943962216f,  0.9060583711f},
+        {-0.8161166310f,  0.0000000002f},
+        { 0.2057106793f, -0.6331123710f},
+        { 0.4133664668f,  0.3003283143f},
+        {-0.2921209633f,  0.2122382969f},
+        {-0.0692843646f, -0.2132353336f},
+        { 0.1067595631f, -0.0000000001f},
+        {-0.0040337327f,  0.0124145532f},
+        { 0.0444066115f,  0.0322632901f},
+        {-0.0787259191f,  0.0571977310f},
+        {-0.0359878466f, -0.1107592061f},
+        { 0.1161677912f, -0.0000000001f},
+        {-0.0313067287f,  0.0963522047f},
+        {-0.0624653697f, -0.0453837477f},
+        { 0.0396964923f, -0.0288411900f},
+    },
+    {
+        { 0.0264054053f,  0.0191846490f},       /* Filter 3 */
+        {-0.0493283160f,  0.0358391218f},
+        {-0.0272038169f, -0.0837247372f},
+        { 0.1089330688f,  0.0000000001f},
+        {-0.0365739614f,  0.1125630811f},
+        {-0.0898761228f, -0.0652988255f},
+        { 0.0668521896f, -0.0485709570f},
+        { 0.0091916462f,  0.0282889791f},
+        { 0.0490297712f,  0.0000000000f},
+        {-0.0472820736f,  0.1455192566f},
+        {-0.2258801460f, -0.1641115248f},
+        { 0.3417128623f, -0.2482689321f},
+        { 0.1777911931f,  0.5471850634f},
+        {-0.7294434309f, -0.0000000002f},
+        { 0.2704651356f, -0.8324060440f},
+        { 0.8116977811f,  0.5897329450f},
+        {-0.8939976096f,  0.6495273113f},
+        {-0.3626012504f, -1.1159719229f},
+        { 1.2035913467f,  0.0000000000f},
+        {-0.3688018918f,  1.1350555420f},
+        {-0.9253144860f, -0.6722803116f},
+        { 0.8559035659f, -0.6218503714f},
+        { 0.2911130786f,  0.8959538937f},
+        {-0.8039799333f,  0.0000000002f},
+        { 0.2017362267f, -0.6208803058f},
+        { 0.4030140936f,  0.2928068638f},
+        {-0.2824097872f,  0.2051827312f},
+        {-0.0660076514f, -0.2031506598f},
+        { 0.0980006009f, -0.0000000001f},
+        {-0.0019765710f,  0.0060832603f},
+        { 0.0480400361f,  0.0349031277f},
+        {-0.0807005838f,  0.0586324073f},
+        {-0.0361906476f, -0.1113833562f},
+        { 0.1154139340f, -0.0000000001f},
+        {-0.0307723451f,  0.0947075412f},
+        {-0.0606375895f, -0.0440557860f},
+        { 0.0377724878f, -0.0274433177f},
+    },
+    {
+        { 0.0282698758f,  0.0205392670f},       /* Filter 4 */
+        {-0.0512427762f,  0.0372300558f},
+        {-0.0278369281f, -0.0856732503f},
+        { 0.1102307960f,  0.0000000001f},
+        {-0.0366050303f,  0.1126586944f},
+        {-0.0886565670f, -0.0644127652f},
+        { 0.0640681237f, -0.0465482138f},
+        { 0.0074702986f,  0.0229912158f},
+        { 0.0567577891f,  0.0000000000f},
+        {-0.0502874292f,  0.1547687948f},
+        {-0.2350788414f, -0.1707947701f},
+        { 0.3518131077f, -0.2556071877f},
+        { 0.1817853153f,  0.5594776869f},
+        {-0.7420427203f, -0.0000000002f},
+        { 0.2740114331f, -0.8433204889f},
+        { 0.8194585443f,  0.5953714848f},
+        {-0.8997041583f,  0.6536732912f},
+        {-0.3638440073f, -1.1197967529f},
+        { 1.2042965889f,  0.0000000000f},
+        {-0.3679794967f,  1.1325244904f},
+        {-0.9205905795f, -0.6688482165f},
+        { 0.8489409089f, -0.6167916656f},
+        { 0.2877821028f,  0.8857022524f},
+        {-0.7917523384f,  0.0000000002f},
+        { 0.1977542788f, -0.6086250544f},
+        { 0.3926937282f,  0.2853086889f},
+        {-0.2727758884f,  0.1981832832f},
+        {-0.0627739578f, -0.1931983829f},
+        { 0.0894096494f, -0.0000000000f},
+        { 0.0000247626f, -0.0000762115f},
+        { 0.0515297912f,  0.0374385864f},
+        {-0.0825452656f,  0.0599726476f},
+        {-0.0363523550f, -0.1118810475f},
+        { 0.1145617142f, -0.0000000001f},
+        {-0.0302191172f,  0.0930048823f},
+        {-0.0587897114f, -0.0427132249f},
+        { 0.0358538441f, -0.0260493420f},
+    },
+    {
+        { 0.0301486850f,  0.0219043009f},       /* Filter 5 */
+        {-0.0531483367f,  0.0386145264f},
+        {-0.0284559596f, -0.0875784382f},
+        { 0.1114456356f,  0.0000000001f},
+        {-0.0365992747f,  0.1126409844f},
+        {-0.0873154774f, -0.0634384081f},
+        { 0.0611448549f, -0.0444243364f},
+        { 0.0056929523f,  0.0175211057f},
+        { 0.0646610633f,  0.0000000000f},
+        {-0.0533401072f,  0.1641639620f},
+        {-0.2443708777f, -0.1775458306f},
+        { 0.3619651794f, -0.2629830837f},
+        { 0.1857803613f,  0.5717731118f},
+        {-0.7545788884f, -0.0000000002f},
+        { 0.2775179148f, -0.8541123271f},
+        { 0.8270668387f,  0.6008992195f},
+        {-0.9052193165f,  0.6576803327f},
+        {-0.3650037944f, -1.1233661175f},
+        { 1.2047197819f,  0.0000000000f},
+        {-0.3670720458f,  1.1297315359f},
+        {-0.9156650901f, -0.6652696729f},
+        { 0.8418115377f, -0.6116119027f},
+        { 0.2844048440f,  0.8753081560f},
+        {-0.7794392109f,  0.0000000002f},
+        { 0.1937665194f, -0.5963520408f},
+        { 0.3824094236f,  0.2778367102f},
+        {-0.2632225752f,  0.1912423968f},
+        {-0.0595842153f, -0.1833813637f},
+        { 0.0809883848f, -0.0000000000f},
+        { 0.0019701670f, -0.0060635507f},
+        { 0.0548766218f,  0.0398701988f},
+        {-0.0842615440f,  0.0612195991f},
+        {-0.0364737995f, -0.1122548133f},
+        { 0.1136142015f, -0.0000000001f},
+        {-0.0296480060f,  0.0912471786f},
+        {-0.0569240339f, -0.0413577296f},
+        { 0.0339424424f, -0.0246606283f},
+    },
+    {
+        { 0.0320401229f,  0.0232785121f},       /* Filter 6 */
+        {-0.0550428294f,  0.0399909541f},
+        {-0.0290599689f, -0.0894373879f},
+        { 0.1125744730f,  0.0000000001f},
+        {-0.0365558229f,  0.1125072464f},
+        {-0.0858510509f, -0.0623744428f},
+        { 0.0580813438f, -0.0421985686f},
+        { 0.0038595749f,  0.0118785501f},
+        { 0.0727383792f,  0.0000000000f},
+        {-0.0564393103f,  0.1737023294f},
+        {-0.2537531555f, -0.1843624711f},
+        { 0.3721652627f, -0.2703939080f},
+        { 0.1897746474f,  0.5840663314f},
+        {-0.7670462132f, -0.0000000002f},
+        { 0.2809829414f, -0.8647765517f},
+        { 0.8345190287f,  0.6063135862f},
+        {-0.9105405211f,  0.6615464091f},
+        {-0.3660799563f, -1.1266783476f},
+        { 1.2048609257f,  0.0000000000f},
+        {-0.3660799563f,  1.1266783476f},
+        {-0.9105405211f, -0.6615464091f},
+        { 0.8345190287f, -0.6063135862f},
+        { 0.2809829414f,  0.8647765517f},
+        {-0.7670462132f,  0.0000000002f},
+        { 0.1897746474f, -0.5840663314f},
+        { 0.3721652627f,  0.2703939080f},
+        {-0.2537531555f,  0.1843624711f},
+        {-0.0564393103f, -0.1737023294f},
+        { 0.0727383792f, -0.0000000000f},
+        { 0.0038595749f, -0.0118785501f},
+        { 0.0580813438f,  0.0421985686f},
+        {-0.0858510509f,  0.0623744428f},
+        {-0.0365558229f, -0.1125072464f},
+        { 0.1125744730f, -0.0000000001f},
+        {-0.0290599689f,  0.0894373879f},
+        {-0.0550428294f, -0.0399909541f},
+        { 0.0320401229f, -0.0232785121f},
+    },
+    {
+        { 0.0339424424f,  0.0246606283f},       /* Filter 7 */
+        {-0.0569240339f,  0.0413577296f},
+        {-0.0296480060f, -0.0912471786f},
+        { 0.1136142015f,  0.0000000001f},
+        {-0.0364737995f,  0.1122548133f},
+        {-0.0842615440f, -0.0612195991f},
+        { 0.0548766218f, -0.0398701988f},
+        { 0.0019701670f,  0.0060635507f},
+        { 0.0809883848f,  0.0000000000f},
+        {-0.0595842153f,  0.1833813637f},
+        {-0.2632225752f, -0.1912423968f},
+        { 0.3824094236f, -0.2778367102f},
+        { 0.1937665194f,  0.5963520408f},
+        {-0.7794392109f, -0.0000000002f},
+        { 0.2844048440f, -0.8753081560f},
+        { 0.8418115377f,  0.6116119027f},
+        {-0.9156650901f,  0.6652696729f},
+        {-0.3670720458f, -1.1297315359f},
+        { 1.2047197819f,  0.0000000000f},
+        {-0.3650037944f,  1.1233661175f},
+        {-0.9052193165f, -0.6576803327f},
+        { 0.8270668387f, -0.6008992195f},
+        { 0.2775179148f,  0.8541123271f},
+        {-0.7545788884f,  0.0000000002f},
+        { 0.1857803613f, -0.5717731118f},
+        { 0.3619651794f,  0.2629830837f},
+        {-0.2443708777f,  0.1775458306f},
+        {-0.0533401072f, -0.1641639620f},
+        { 0.0646610633f, -0.0000000000f},
+        { 0.0056929523f, -0.0175211057f},
+        { 0.0611448549f,  0.0444243364f},
+        {-0.0873154774f,  0.0634384081f},
+        {-0.0365992747f, -0.1126409844f},
+        { 0.1114456356f, -0.0000000001f},
+        {-0.0284559596f,  0.0875784382f},
+        {-0.0531483367f, -0.0386145264f},
+        { 0.0301486850f, -0.0219043009f},
+    },
+    {
+        { 0.0358538441f,  0.0260493420f},       /* Filter 8 */
+        {-0.0587897114f,  0.0427132249f},
+        {-0.0302191172f, -0.0930048823f},
+        { 0.1145617142f,  0.0000000001f},
+        {-0.0363523550f,  0.1118810475f},
+        {-0.0825452656f, -0.0599726476f},
+        { 0.0515297912f, -0.0374385864f},
+        { 0.0000247626f,  0.0000762115f},
+        { 0.0894096494f,  0.0000000000f},
+        {-0.0627739578f,  0.1931983829f},
+        {-0.2727758884f, -0.1981832832f},
+        { 0.3926937282f, -0.2853086889f},
+        { 0.1977542788f,  0.6086250544f},
+        {-0.7917523384f, -0.0000000002f},
+        { 0.2877821028f, -0.8857022524f},
+        { 0.8489409089f,  0.6167916656f},
+        {-0.9205905795f,  0.6688482165f},
+        {-0.3679794967f, -1.1325244904f},
+        { 1.2042965889f,  0.0000000000f},
+        {-0.3638440073f,  1.1197967529f},
+        {-0.8997041583f, -0.6536732912f},
+        { 0.8194585443f, -0.5953714848f},
+        { 0.2740114331f,  0.8433204889f},
+        {-0.7420427203f,  0.0000000002f},
+        { 0.1817853153f, -0.5594776869f},
+        { 0.3518131077f,  0.2556071877f},
+        {-0.2350788414f,  0.1707947701f},
+        {-0.0502874292f, -0.1547687948f},
+        { 0.0567577891f, -0.0000000000f},
+        { 0.0074702986f, -0.0229912158f},
+        { 0.0640681237f,  0.0465482138f},
+        {-0.0886565670f,  0.0644127652f},
+        {-0.0366050303f, -0.1126586944f},
+        { 0.1102307960f, -0.0000000001f},
+        {-0.0278369281f,  0.0856732503f},
+        {-0.0512427762f, -0.0372300558f},
+        { 0.0282698758f, -0.0205392670f},
+    },
+    {
+        { 0.0377724878f,  0.0274433177f},       /* Filter 9 */
+        {-0.0606375895f,  0.0440557860f},
+        {-0.0307723451f, -0.0947075412f},
+        { 0.1154139340f,  0.0000000001f},
+        {-0.0361906476f,  0.1113833562f},
+        {-0.0807005838f, -0.0586324073f},
+        { 0.0480400361f, -0.0349031277f},
+        {-0.0019765710f, -0.0060832603f},
+        { 0.0980006009f,  0.0000000001f},
+        {-0.0660076514f,  0.2031506598f},
+        {-0.2824097872f, -0.2051827312f},
+        { 0.4030140936f, -0.2928068638f},
+        { 0.2017362267f,  0.6208803058f},
+        {-0.8039799333f, -0.0000000002f},
+        { 0.2911130786f, -0.8959538937f},
+        { 0.8559035659f,  0.6218503714f},
+        {-0.9253144860f,  0.6722803116f},
+        {-0.3688018918f, -1.1350555420f},
+        { 1.2035913467f,  0.0000000000f},
+        {-0.3626012504f,  1.1159719229f},
+        {-0.8939976096f, -0.6495273113f},
+        { 0.8116977811f, -0.5897329450f},
+        { 0.2704651356f,  0.8324060440f},
+        {-0.7294434309f,  0.0000000002f},
+        { 0.1777911931f, -0.5471850634f},
+        { 0.3417128623f,  0.2482689321f},
+        {-0.2258801460f,  0.1641115248f},
+        {-0.0472820736f, -0.1455192566f},
+        { 0.0490297712f, -0.0000000000f},
+        { 0.0091916462f, -0.0282889791f},
+        { 0.0668521896f,  0.0485709570f},
+        {-0.0898761228f,  0.0652988255f},
+        {-0.0365739614f, -0.1125630811f},
+        { 0.1089330688f, -0.0000000001f},
+        {-0.0272038169f,  0.0837247372f},
+        {-0.0493283160f, -0.0358391218f},
+        { 0.0264054053f, -0.0191846490f},
+    },
+    {
+        { 0.0396964923f,  0.0288411900f},       /* Filter 10 */
+        {-0.0624653697f,  0.0453837477f},
+        {-0.0313067287f, -0.0963522047f},
+        { 0.1161677912f,  0.0000000001f},
+        {-0.0359878466f,  0.1107592061f},
+        {-0.0787259191f, -0.0571977310f},
+        { 0.0444066115f, -0.0322632901f},
+        {-0.0040337327f, -0.0124145532f},
+        { 0.1067595631f,  0.0000000001f},
+        {-0.0692843646f,  0.2132353336f},
+        {-0.2921209633f, -0.2122382969f},
+        { 0.4133664668f, -0.3003283143f},
+        { 0.2057106793f,  0.6331123710f},
+        {-0.8161166310f, -0.0000000002f},
+        { 0.2943962216f, -0.9060583711f},
+        { 0.8626962900f,  0.6267855763f},
+        {-0.9298345447f,  0.6755643487f},
+        {-0.3695388138f, -1.1373236179f},
+        { 1.2026044130f,  0.0000000000f},
+        {-0.3612760901f,  1.1118934155f},
+        {-0.8881026506f, -0.6452443004f},
+        { 0.8037882447f, -0.5839863420f},
+        { 0.2668806314f,  0.8213740587f},
+        {-0.7167864442f,  0.0000000002f},
+        { 0.1737996489f, -0.5349003077f},
+        { 0.3316683173f,  0.2409711480f},
+        {-0.2167777866f,  0.1574982852f},
+        {-0.0443248004f, -0.1364177018f},
+        { 0.0414781198f, -0.0000000000f},
+        { 0.0108570615f, -0.0334145986f},
+        { 0.0694981664f,  0.0504933707f},
+        {-0.0909759924f,  0.0660979301f},
+        {-0.0365069620f, -0.1123568788f},
+        { 0.1075555831f, -0.0000000001f},
+        {-0.0265575647f,  0.0817357823f},
+        {-0.0474071130f, -0.0344432816f},
+        { 0.0245569348f, -0.0178416576f},
+    },
+    {
+        { 0.0416239388f,  0.0302415621f},       /* Filter 11 */
+        {-0.0642707273f,  0.0466954149f},
+        {-0.0318213031f, -0.0979359001f},
+        { 0.1168202460f,  0.0000000001f},
+        {-0.0357431434f,  0.1100060865f},
+        {-0.0766197667f, -0.0556675196f},
+        { 0.0406288542f, -0.0295185894f},
+        {-0.0061465879f, -0.0189172514f},
+        { 0.1156847477f,  0.0000000001f},
+        {-0.0726031289f,  0.2234494686f},
+        {-0.3019059300f, -0.2193474919f},
+        { 0.4237467945f, -0.3078700602f},
+        { 0.2096759230f,  0.6453161240f},
+        {-0.8281568289f, -0.0000000002f},
+        { 0.2976299822f, -0.9160109162f},
+        { 0.8693157434f,  0.6315948367f},
+        {-0.9341484904f,  0.6786985993f},
+        {-0.3701899350f, -1.1393274069f},
+        { 1.2013363838f,  0.0000000000f},
+        {-0.3598691821f,  1.1075633764f},
+        {-0.8820219636f, -0.6408264637f},
+        { 0.7957338095f, -0.5781344771f},
+        { 0.2632595599f,  0.8102296591f},
+        {-0.7040774226f,  0.0000000002f},
+        { 0.1698123366f, -0.5226286054f},
+        { 0.3216831982f,  0.2337165177f},
+        {-0.2077746689f,  0.1509571373f},
+        {-0.0414163321f, -0.1274663657f},
+        { 0.0341038331f, -0.0000000000f},
+        { 0.0124666411f, -0.0383683741f},
+        { 0.0720072389f,  0.0523163229f},
+        {-0.0919580832f,  0.0668114573f},
+        {-0.0364049338f, -0.1120428666f},
+        { 0.1061014757f, -0.0000000001f},
+        {-0.0258991010f,  0.0797092393f},
+        {-0.0454812683f, -0.0330440775f},
+        { 0.0227260832f, -0.0165114664f},
+    },
+};
+
+static const uint8_t space_map_v22bis[6][6] =
+{
+    {11,  9,  9,  6,  6,  7},
+    {10,  8,  8,  4,  4,  5},
+    {10,  8,  8,  4,  4,  5},
+    {13, 12, 12,  0,  0,  2},
+    {13, 12, 12,  0,  0,  2},
+    {15, 14, 14,  1,  1,  3}
+};
+
+float v22bis_rx_carrier_frequency(v22bis_state_t *s)
+{
+    return dds_frequencyf(s->rx_carrier_phase_rate);
+}
+/*- End of function --------------------------------------------------------*/
+
+float v22bis_rx_symbol_timing_correction(v22bis_state_t *s)
+{
+    return (float) s->total_baud_timing_correction/((float) PULSESHAPER_COEFF_SETS*40.0f/(3.0f*2.0f));
+}
+/*- End of function --------------------------------------------------------*/
+
+float v22bis_rx_signal_power(v22bis_state_t *s)
+{
+    return power_meter_dbm0(&s->rx_power);
+}
+/*- End of function --------------------------------------------------------*/
+
+int v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coeffs)
+{
+    *coeffs = s->eq_coeff;
+    return 2*V22BIS_EQUALIZER_LEN + 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_reset(v22bis_state_t *s)
+{
+    int i;
+
+    /* Start with an equalizer based on everything being perfect */
+    for (i = 0;  i < 2*V22BIS_EQUALIZER_LEN + 1;  i++)
+        s->eq_coeff[i] = complex_setf(0.0f, 0.0f);
+    s->eq_coeff[V22BIS_EQUALIZER_LEN] = complex_setf(3.0f, 0.0f);
+    for (i = 0;  i <= V22BIS_EQUALIZER_MASK;  i++)
+        s->eq_buf[i] = complex_setf(0.0f, 0.0f);
+
+    s->eq_coeff[V22BIS_EQUALIZER_LEN - 6].re = -0.02f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN - 5].re =  0.035f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN - 4].re =  0.08f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN - 3].re = -0.30f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN - 2].re = -0.37f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN - 1].re =  0.09f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN].re     =  3.19f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN + 1].re =  0.09f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN + 2].re = -0.37f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN + 3].re = -0.30f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN + 5].re =  0.035f;
+    s->eq_coeff[V22BIS_EQUALIZER_LEN + 6].re = -0.02f;
+
+    s->eq_put_step = 20 - 1;
+    s->eq_step = 0;
+    s->eq_delta = EQUALIZER_DELTA/(2*V22BIS_EQUALIZER_LEN + 1);
+}
+/*- End of function --------------------------------------------------------*/
+
+static complexf_t equalizer_get(v22bis_state_t *s)
+{
+    int i;
+    int p;
+    complexf_t z;
+    complexf_t z1;
+
+    /* Get the next equalized value. */
+    z = complex_setf(0.0f, 0.0f);
+    p = s->eq_step - 1;
+    for (i = 0;  i < 2*V22BIS_EQUALIZER_LEN + 1;  i++)
+    {
+        p = (p - 1) & V22BIS_EQUALIZER_MASK;
+        z1 = complex_mulf(&s->eq_coeff[i], &s->eq_buf[p]);
+        z = complex_addf(&z, &z1);
+    }
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void tune_equalizer(v22bis_state_t *s, const complexf_t *z, const complexf_t *target)
+{
+    int i;
+    int p;
+    complexf_t ez;
+    complexf_t z1;
+
+    /* Find the x and y mismatch from the exact constellation position. */
+    ez = complex_subf(target, z);
+    ez.re *= s->eq_delta;
+    ez.im *= s->eq_delta;
+
+    p = s->eq_step - 1;
+    for (i = 0;  i < 2*V22BIS_EQUALIZER_LEN + 1;  i++)
+    {
+        p = (p - 1) & V22BIS_EQUALIZER_MASK;
+        z1 = complex_conjf(&s->eq_buf[p]);
+        z1 = complex_mulf(&ez, &z1);
+        s->eq_coeff[i] = complex_addf(&s->eq_coeff[i], &z1);
+        /* If we don't leak a little bit we seem to get some wandering adaption */
+        s->eq_coeff[i].re *= 0.9999f;
+        s->eq_coeff[i].im *= 0.9999f;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void track_carrier(v22bis_state_t *s, const complexf_t *z, const complexf_t *target)
+{
+    float error;
+
+    /* For small errors the imaginary part of the difference between the actual and the target
+       positions is proportional to the phase error, for any particular target. However, the
+       different amplitudes of the various target positions scale things. */
+    error = z->im*target->re - z->re*target->im;
+    
+    s->rx_carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
+    s->rx_carrier_phase += (int32_t) (s->carrier_track_p*error);
+    //span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f   f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void put_bit(v22bis_state_t *s, int bit)
+{
+    int out_bit;
+
+    bit &= 1;
+
+    /* Descramble the bit */
+    s->rx_scramble_reg = (s->rx_scramble_reg << 1) | bit;
+    out_bit = (bit ^ (s->rx_scramble_reg >> 15) ^ (s->rx_scramble_reg >> 18)) & 1;
+    if (s->rx_scrambler_pattern_count >= 64)
+    {
+        out_bit ^= 1;
+        s->rx_scrambler_pattern_count = 0;
+    }
+    if (bit)
+        s->rx_scrambler_pattern_count++;
+    else
+        s->rx_scrambler_pattern_count = 0;
+
+    s->put_bit(s->user_data, out_bit);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void decode_baud(v22bis_state_t *s, int nearest)
+{
+    static const uint8_t phase_steps[4] =
+    {
+        1, 0, 2, 3
+    };
+    int raw_bits;
+
+    raw_bits = phase_steps[((nearest - s->rx_constellation_state) >> 2) & 3];
+    /* The first two bits are the quadrant */
+    put_bit(s, raw_bits);
+    put_bit(s, raw_bits >> 1);
+    if (s->bit_rate == 2400)
+    {
+        /* The other two bits are the position within the quadrant */
+        put_bit(s, nearest >> 1);
+        put_bit(s, nearest);
+    }
+    s->rx_constellation_state = nearest;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int find_quadrant(const complexf_t *z)
+{
+    int b1;
+    int b2;
+
+#if 0
+    /* Split along the axes, as follows:
+        1  0
+        2  3
+     */
+    b1 = (z->re <= 0.0f);
+    b2 = (z->im <= 0.0f);
+    return (b2 << 1) | (b1 ^ b2);
+#endif    
+    /* Split the space along the two diagonals, as follows:
+         \ 1 /
+        2     0
+         / 3 \
+     */
+    b1 = (z->im > z->re);
+    b2 = (z->im < -z->re);
+    return (b2 << 1) | (b1 ^ b2);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_half_baud(v22bis_state_t *s, const complexf_t *sample)
+{
+    complexf_t a;
+    complexf_t b;
+    complexf_t c;
+
+    complexf_t z;
+    complexf_t zz;
+    const complexf_t *target;
+    float p;
+    float q;
+    int re;
+    int im;
+    int nearest;
+
+    z.re = sample->re;
+    z.im = sample->im;
+
+    /* Add a sample to the equalizer's circular buffer, but don't calculate anything
+       at this time. */
+    s->eq_buf[s->eq_step] = z;
+    s->eq_step = (s->eq_step + 1) & V22BIS_EQUALIZER_MASK;
+
+    /* On alternate insertions we have a whole baud and must process it. */
+    if ((s->rx_baud_phase ^= 1))
+        return;
+
+    /* Perform a Gardner test for baud alignment on the three most recent samples. */
+#if 0
+    p = s->eq_buf[(s->eq_step - 3) & V22BIS_EQUALIZER_MASK].re
+      - s->eq_buf[(s->eq_step - 1) & V22BIS_EQUALIZER_MASK].re;
+    p *= s->eq_buf[(s->eq_step - 2) & V22BIS_EQUALIZER_MASK].re;
+
+    q = s->eq_buf[(s->eq_step - 3) & V22BIS_EQUALIZER_MASK].im
+      - s->eq_buf[(s->eq_step - 1) & V22BIS_EQUALIZER_MASK].im;
+    q *= s->eq_buf[(s->eq_step - 2) & V22BIS_EQUALIZER_MASK].im;
+#else
+    if (s->sixteen_way_decisions)
+    {
+        p = s->eq_buf[(s->eq_step - 3) & V22BIS_EQUALIZER_MASK].re
+          - s->eq_buf[(s->eq_step - 1) & V22BIS_EQUALIZER_MASK].re;
+        p *= s->eq_buf[(s->eq_step - 2) & V22BIS_EQUALIZER_MASK].re;
+
+        q = s->eq_buf[(s->eq_step - 3) & V22BIS_EQUALIZER_MASK].im
+        - s->eq_buf[(s->eq_step - 1) & V22BIS_EQUALIZER_MASK].im;
+        q *= s->eq_buf[(s->eq_step - 2) & V22BIS_EQUALIZER_MASK].im;
+    }
+    else
+    {
+        /* Rotate the points to the 45 degree positions, to maximise the effectiveness of the Gardner algorithm */
+        zz = complex_setf(cosf(26.57f*3.14159f/180.0f), sinf(26.57f*3.14159f/180.0f));
+        a = complex_mulf(&s->eq_buf[(s->eq_step - 3) & V22BIS_EQUALIZER_MASK], &zz);
+        b = complex_mulf(&s->eq_buf[(s->eq_step - 2) & V22BIS_EQUALIZER_MASK], &zz);
+        c = complex_mulf(&s->eq_buf[(s->eq_step - 1) & V22BIS_EQUALIZER_MASK], &zz);
+        p = (a.re - c.re)*b.re;
+        q = (a.im - c.im)*b.im;
+    }
+#endif
+
+    p += q;
+    s->gardner_integrate += ((p + q) > 0.0f)  ?  s->gardner_step  :  -s->gardner_step;
+
+    if (abs(s->gardner_integrate) >= 16)
+    {
+        /* This integrate and dump approach avoids rapid changes of the equalizer put step.
+           Rapid changes, without hysteresis, are bad. They degrade the equalizer performance
+           when the true symbol boundary is close to a sample boundary. */
+        s->eq_put_step += (s->gardner_integrate/16);
+        s->total_baud_timing_correction += (s->gardner_integrate/16);
+span_log(&s->logging, SPAN_LOG_FLOW, "Gardner kick %d [total %d]\n", s->gardner_integrate, s->total_baud_timing_correction);
+        if (s->qam_report)
+            s->qam_report(s->qam_user_data, NULL, NULL, s->gardner_integrate);
+        s->gardner_integrate = 0;
+    }
+
+    z = equalizer_get(s);
+printf("VVV %15.5f %15.5f\n", z.re, z.im);
+
+span_log(&s->logging, SPAN_LOG_FLOW, "VVV %p %d\n", s->user_data, s->rx_training);
+    if (s->sixteen_way_decisions)
+    {
+        re = (int) (z.re + 3.0f);
+        if (re > 5)
+            re = 5;
+        else if (re < 0)
+            re = 0;
+        im = (int) (z.im + 3.0f);
+        if (im > 5)
+            im = 5;
+        else if (im < 0)
+            im = 0;
+        nearest = space_map_v22bis[re][im];
+    }
+    else
+    {
+        zz = complex_setf(3.0f/sqrtf(10.0f), -1.0f/sqrtf(10.0f));
+        zz = complex_mulf(&z, &zz);
+        nearest = (find_quadrant(&zz) << 2) | 0x01;
+        printf("Trackit %15.5f %15.5f     %15.5f %15.5f   %d\n", z.re, z.im, zz.re, zz.im, nearest);
+    }
+
+    switch (s->rx_training)
+    {
+    case V22BIS_TRAINING_STAGE_NORMAL_OPERATION:
+        /* Normal operation. */
+        track_carrier(s, &z, &v22bis_constellation[nearest]);
+        tune_equalizer(s, &z, &v22bis_constellation[nearest]);
+        decode_baud(s, nearest);
+        target = &v22bis_constellation[s->rx_constellation_state];
+        break;
+    case V22BIS_TRAINING_STAGE_SYMBOL_ACQUISITION:
+        /* Allow time for the Gardner algorithm to settle the symbol timing. */
+        target = &z;
+        if (++s->rx_training_count >= 40)
+        {
+            s->gardner_step = 4;
+            if (s->caller)
+            {
+                s->rx_training = V22BIS_TRAINING_STAGE_UNSCRAMBLED_ONES;
+            }
+            else
+            {
+                if (s->bit_rate == 2400)
+                    s->rx_training = V22BIS_TRAINING_STAGE_UNSCRAMBLED_0011;
+                else
+                    s->rx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+            }
+            break;
+        }
+
+        /* QAM and Gardner only play nicely with heavy damping, so we need to change to
+           a slow rate of symbol timing adaption. However, it must not be so slow that it
+           cannot track the worst case timing error specified in V.22bis. This should be 0.01%,
+           but since we might be off in the opposite direction from the source, the total
+           error could be higher. */
+        if (s->rx_training_count == 30)
+            s->gardner_step = 32;
+        break;
+    case V22BIS_TRAINING_STAGE_UNSCRAMBLED_ONES:
+        /* The answering modem should initially receive unscrambled ones at 1200bps */
+        track_carrier(s, &z, &v22bis_constellation[nearest]);
+        target = &z;
+        if (nearest == ((s->rx_constellation_state - 4) & 0x0F))
+            s->detected_unscrambled_ones++;
+        if (nearest == ((s->rx_constellation_state + 4) & 0x0F))
+            s->detected_unscrambled_zeros++;
+        s->rx_constellation_state = nearest;
+span_log(&s->logging, SPAN_LOG_FLOW, "TWIDDLING THUMBS - %d\n", s->rx_training_count);
+        if (++s->rx_training_count == ms_to_symbols(155 + 456))
+        {
+            if (s->detected_unscrambled_ones >= 250  ||  s->detected_unscrambled_zeros >= 250)
+                s->detected_unscrambled_ones_or_zeros = TRUE;
+        }
+        if (s->rx_training_count == ms_to_symbols(155 + 457))
+        {
+            /* We should only bother looking for the 2400bps marker if we are allowed to use
+               2400bps */
+            s->rx_training_count = 0;
+            if (s->bit_rate == 2400)
+                s->rx_training = V22BIS_TRAINING_STAGE_UNSCRAMBLED_0011;
+            else
+                s->rx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+        }
+        break;
+    case V22BIS_TRAINING_STAGE_UNSCRAMBLED_0011:
+s->sixteen_way_decisions = TRUE;
+        /* If we can actually find this it means we can use 2400bps. If we find unscrambled ones, it means we
+           we must use 1200bps. */
+        track_carrier(s, &z, &v22bis_constellation[nearest]);
+        tune_equalizer(s, &z, &v22bis_constellation[nearest]);
+        target = &z;
+        //s->carrier_track_i = 1000.0f;
+        //s->carrier_track_p = 1000000.0f;
+#if 0
+        if (++s->rx_training_count > ms_to_symbols(800))
+        {
+            s->detected_unscrambled_0011_ending = TRUE;
+            s->rx_training = V22BIS_TRAINING_STAGE_UNSCRAMBLED_ONES;
+        }
+#else
+        if (++s->rx_training_count == 1)
+        {
+            s->detected_unscrambled_zeros = nearest;
+            s->detected_unscrambled_ones = 0;
+        }
+        else
+        {
+span_log(&s->logging, SPAN_LOG_FLOW, "0x%X 0x%X 0x%X\n", s->detected_unscrambled_zeros, nearest, (s->detected_unscrambled_zeros + nearest) & 0x0F);
+            if ((s->rx_training_count & 1) == 0)
+            {
+span_log(&s->logging, SPAN_LOG_FLOW, "AAA\n");
+                if (((s->detected_unscrambled_zeros + nearest) & 0x0F) == 0x06)
+                    s->detected_unscrambled_ones = 1;
+                else if (((s->detected_unscrambled_zeros + nearest) & 0x0F) == 0x02)
+                    s->detected_unscrambled_ones = -1;
+                else
+                {
+span_log(&s->logging, SPAN_LOG_FLOW, "AAA 1\n");
+                    if (s->detected_unscrambled_ones > 5  ||  s->detected_unscrambled_ones < -5)
+                        s->detected_unscrambled_0011_ending = TRUE;
+                    else
+                        s->bit_rate = 1200;
+                    s->rx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+                }
+            }
+            else
+            {
+span_log(&s->logging, SPAN_LOG_FLOW, "BBB\n");
+                if (((s->detected_unscrambled_zeros + nearest) & 0x0F) == 0x06)
+                    s->detected_unscrambled_ones = 1;
+                else if (((s->detected_unscrambled_zeros + nearest) & 0x0F) == 0x02)
+                    s->detected_unscrambled_ones = -1;
+                else
+                {
+span_log(&s->logging, SPAN_LOG_FLOW, "BBB 1\n");
+                    if (s->detected_unscrambled_ones > 5  ||  s->detected_unscrambled_ones < -5)
+                        s->detected_unscrambled_0011_ending = TRUE;
+                    else
+                        s->bit_rate = 1200;
+                    s->rx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+                }
+            }
+        }
+#endif
+        break;
+    case V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200:
+        track_carrier(s, &z, &v22bis_constellation[nearest]);
+        tune_equalizer(s, &z, &v22bis_constellation[nearest]);
+        target = &z;
+span_log(&s->logging, SPAN_LOG_FLOW, "S11 0x%02x\n", nearest);
+        if (++s->rx_training_count > ms_to_symbols(900))
+        {
+            s->detected_scrambled_ones_or_zeros_at_1200bps = TRUE;
+            s->rx_training = V22BIS_TRAINING_STAGE_NORMAL_OPERATION;
+        }
+        if (s->bit_rate == 2400  &&  s->rx_training_count == ms_to_symbols(450))
+            s->sixteen_way_decisions = TRUE;
+        break;
+    case V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_2400:
+        track_carrier(s, &z, &v22bis_constellation[nearest]);
+        tune_equalizer(s, &z, &v22bis_constellation[nearest]);
+        s->sixteen_way_decisions = TRUE;
+        target = &z;
+        break;
+    case V22BIS_TRAINING_STAGE_PARKED:
+    default:
+        /* We failed to train! */
+        /* Park here until the carrier drops. */
+        target = &z;
+        break;
+    }
+    if (s->qam_report)
+        s->qam_report(s->qam_user_data, &z, target, s->rx_constellation_state);
+}
+/*- End of function --------------------------------------------------------*/
+
+int v22bis_rx(v22bis_state_t *s, const int16_t amp[], int len)
+{
+    int i;
+    int j;
+    int step;
+    complexf_t z;
+    complexf_t zz;
+    int32_t power;
+    complexf_t sample;
+    float ii;
+    float qq;
+
+    for (i = 0;  i < len;  i++)
+    {
+        /* Complex bandpass filter the signal, using a pair of FIRs, and RRC coeffs shifted
+           to centre at 1200Hz or 2400Hz. The filters support 12 fractional phase shifts, to 
+           permit signal extraction very close to the middle of a symbol. */
+        s->rx_rrc_filter[s->rx_rrc_filter_step] =
+        s->rx_rrc_filter[s->rx_rrc_filter_step + V22BIS_RX_FILTER_STEPS] = amp[i];
+        if (++s->rx_rrc_filter_step >= V22BIS_RX_FILTER_STEPS)
+            s->rx_rrc_filter_step = 0;
+
+        /* Calculate the I filter, with an arbitrary phase step, just so we can calculate
+           the signal power. */
+        /* TODO: get rid of this */
+        if (s->caller)
+        {
+            ii = pulseshaper_2400[6][0].re*s->rx_rrc_filter[s->rx_rrc_filter_step];
+            for (j = 1;  j < V22BIS_RX_FILTER_STEPS;  j++)
+                ii += pulseshaper_2400[6][j].re*s->rx_rrc_filter[j + s->rx_rrc_filter_step];
+        }
+        else
+        {
+            ii = pulseshaper_1200[6][0].re*s->rx_rrc_filter[s->rx_rrc_filter_step];
+            for (j = 1;  j < V22BIS_RX_FILTER_STEPS;  j++)
+                ii += pulseshaper_1200[6][j].re*s->rx_rrc_filter[j + s->rx_rrc_filter_step];
+        }
+        power = power_meter_update(&(s->rx_power), (int16_t) (ii/10.0f));
+        if (s->carrier_present)
+        {
+            /* Look for power below -48dBm0 to turn the carrier off */
+            if (power < s->carrier_off_power)
+            {
+                v22bis_rx_restart(s, s->bit_rate);
+                s->put_bit(s->user_data, PUTBIT_CARRIER_DOWN);
+                continue;
+            }
+        }
+        else
+        {
+            /* Look for power exceeding -43dBm0 to turn the carrier on */
+            if (power < s->carrier_on_power)
+                continue;
+            s->carrier_present = TRUE;
+            s->put_bit(s->user_data, PUTBIT_CARRIER_UP);
+        }
+        if (s->rx_training != V22BIS_TRAINING_STAGE_PARKED)
+        {
+            /* Only spend effort processing this data if the modem is not
+               parked, after training failure. */
+            z = dds_complexf(&(s->rx_carrier_phase), s->rx_carrier_phase_rate);
+            if (s->rx_training == V22BIS_TRAINING_STAGE_SYMBOL_ACQUISITION)
+            {
+                /* Only AGC during the initial symbol acquisition, and then lock the gain. */
+                s->agc_scaling = 0.018f*3.60f/sqrtf(power);
+            }
+            /* Put things into the equalization buffer at T/2 rate. The Gardner algorithm
+               will fiddle the step to align this with the symbols. */
+            if ((s->eq_put_step -= PULSESHAPER_COEFF_SETS) <= 0)
+            {
+                /* Pulse shape while still at the carrier frequency, using a quadrature
+                   pair of filters. This results in a properly bandpass filtered complex
+                   signal, which can be brought directly to bandband by complex mixing.
+                   No further filtering, to remove mixer harmonics, is needed. */
+                step = -s->eq_put_step;
+                if (step > PULSESHAPER_COEFF_SETS - 1)
+                    step = PULSESHAPER_COEFF_SETS - 1;
+                s->eq_put_step += PULSESHAPER_COEFF_SETS*40/(3*2);
+                if (s->caller)
+                {
+                    ii = pulseshaper_2400[step][0].re*s->rx_rrc_filter[s->rx_rrc_filter_step];
+                    qq = pulseshaper_2400[step][0].im*s->rx_rrc_filter[s->rx_rrc_filter_step];
+                    for (j = 1;  j < V22BIS_RX_FILTER_STEPS;  j++)
+                    {
+                        ii += pulseshaper_2400[step][j].re*s->rx_rrc_filter[j + s->rx_rrc_filter_step];
+                        qq += pulseshaper_2400[step][j].im*s->rx_rrc_filter[j + s->rx_rrc_filter_step];
+                    }
+                }
+                else
+                {
+                    ii = pulseshaper_1200[step][0].re*s->rx_rrc_filter[s->rx_rrc_filter_step];
+                    qq = pulseshaper_1200[step][0].im*s->rx_rrc_filter[s->rx_rrc_filter_step];
+                    for (j = 1;  j < V22BIS_RX_FILTER_STEPS;  j++)
+                    {
+                        ii += pulseshaper_1200[step][j].re*s->rx_rrc_filter[j + s->rx_rrc_filter_step];
+                        qq += pulseshaper_1200[step][j].im*s->rx_rrc_filter[j + s->rx_rrc_filter_step];
+                    }
+                }
+                sample.re = ii*s->agc_scaling;
+                sample.im = qq*s->agc_scaling;
+                /* Shift to baseband - since this is done in a full complex form, the
+                   result is clean, and requires no further filtering apart from the
+                   equalizer. */
+                zz.re = sample.re*z.re - sample.im*z.im;
+                zz.im = -sample.re*z.im - sample.im*z.re;
+                process_half_baud(s, &zz);
+            }
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v22bis_rx_restart(v22bis_state_t *s, int bit_rate)
+{
+    /* If bit_rate is 2400, the real bit rate is negotiated. If bit_rate
+       is 1200, the real bit rate is forced to 1200. */
+    s->bit_rate = bit_rate;
+    vec_zerof(s->rx_rrc_filter, sizeof(s->rx_rrc_filter)/sizeof(s->rx_rrc_filter[0]));
+    s->rx_rrc_filter_step = 0;
+    s->rx_scramble_reg = 0;
+    s->rx_scrambler_pattern_count = 0;
+    s->rx_training = V22BIS_TRAINING_STAGE_SYMBOL_ACQUISITION;
+    s->rx_training_count = 0;
+    s->carrier_present = FALSE;
+
+    s->rx_carrier_phase_rate = dds_phase_ratef((s->caller)  ?  2400.0f  :  1200.0f);
+    s->rx_carrier_phase = 0;
+    power_meter_init(&(s->rx_power), 5);
+    s->carrier_on_power = power_meter_level_dbm0(-43);
+    s->carrier_off_power = power_meter_level_dbm0(-48);
+    s->agc_scaling = 0.0005f*0.025f;
+
+    s->rx_constellation_state = 0;
+    s->sixteen_way_decisions = FALSE;
+
+    equalizer_reset(s);
+
+    s->detected_unscrambled_ones = 0;
+    s->detected_unscrambled_zeros = 0;
+    s->gardner_integrate = 0;
+    s->gardner_step = 256;
+    s->rx_baud_phase = 0;
+    s->carrier_track_i = 8000.0f;
+    s->carrier_track_p = 8000000.0f;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t *handler, void *user_data)
+{
+    s->qam_report = handler;
+    s->qam_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v22bis_tx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1107 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v22bis_tx.c - ITU V.22bis modem transmit part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v22bis_tx.c,v 1.34 2006/11/28 16:59:57 steveu Exp $
+ */
+
+/*! \file */
+
+/* THIS IS A WORK IN PROGRESS - NOT YET FUNCTIONAL! */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/complex.h"
+#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
+#include "spandsp/async.h"
+#include "spandsp/dds.h"
+#include "spandsp/power_meter.h"
+
+#include "spandsp/v29rx.h"
+#include "spandsp/v22bis.h"
+
+/* Quoting from the V.22bis spec.
+
+6.3.1.1 Interworking at 2400 bit/s
+
+6.3.1.1.1   Calling modem
+
+a)  On connection to line the calling modem shall be conditioned to receive signals
+    in the high channel at 1200 bit/s and transmit signals in the low channel at 1200 bit/s
+    in accordance with section 2.5.2.2. It shall apply an ON condition to circuit 107 in accordance
+    with Recommendation V.25. The modem shall initially remain silent.
+
+b)  After 155 +-10 ms of unscrambled binary 1 has been detected, the modem shall remain silent
+    for a further 456 +-10 ms then transmit an unscrambled repetitive double dibit pattern of 00
+    and 11 at 1200 bit/s for 100 +-3 ms. Following this signal the modem shall transmit scrambled
+    binary 1 at 1200 bit/s.
+
+c)  If the modem detects scrambled binary 1 in the high channel at 1200 bit/s for 270 +-40 ms,
+    the handshake shall continue in accordance with section 6.3.1.2.1 c) and d). However, if unscrambled
+    repetitive double dibit 00 and 11 at 1200 bit/s is detected in the high channel, then at the
+    end of receipt of this signal the modem shall apply an ON condition to circuit 112.
+
+d)  600 +-10 ms after circuit 112 has been turned ON the modem shall begin transmitting scrambled
+    binary 1 at 2400 bit/s, and 450 +-10 ms after circuit 112 has been turned ON the receiver may
+    begin making 16-way decisions.
+
+e)  Following transmission of scrambled binary 1 at 2400 bit/s for 200 +-10 ms, circuit 106 shall
+    be conditioned to respond to circuit 105 and the modem shall be ready to transmit data at
+    2400 bit/s.
+
+f)  When 32 consecutive bits of scrambled binary 1 at 2400 bit/s have been detected in the high
+    channel the modem shall be ready to receive data at 2400 bit/s and shall apply an ON condition
+    to circuit 109.
+
+6.3.1.1.2   Answering modem
+
+a)  On connection to line the answering modem shall be conditioned to transmit signals in the high
+    channel at 1200 bit/s in accordance with  section 2.5.2.2 and receive signals in the low channel at
+    1200 bit/s. Following transmission of the answer sequence in accordance with Recommendation
+    V.25, the modem shall apply an ON condition to circuit 107 and then transmit unscrambled
+    binary 1 at 1200 bit/s.
+
+b)  If the modem detects scrambled binary 1 or 0 in the low channel at 1200 bit/s for 270 +-40 ms,
+    the handshake shall continue in accordance with section 6.3.1.2.2 b) and c). However, if unscrambled
+    repetitive double dibit 00 and 11 at 1200 bit/s is detected in the low channel, at the end of
+    receipt of this signal the modem shall apply an ON condition to circuit 112 and then transmit
+    an unscrambled repetitive double dibit pattern of 00 and 11 at 1200 bit/s for 100 +-3 ms.
+    Following these signals the modem shall transmit scrambled binary 1 at 1200 bit/s.
+
+c)  600 +-10 ms after circuit 112 has been turned ON the modem shall begin transmitting scrambled
+    binary 1 at 2400 bit/s, and 450 +-10 ms after circuit 112 has been turned ON the receiver may
+    begin making 16-way decisions.
+
+d)  Following transmission of scrambled binary 1 at 2400 bit/s for 200 +-10 ms, circuit 106 shall
+    be conditioned to respond to circuit 105 and the modem shall be ready to transmit data at
+    2400 bit/s.
+
+e)  When 32 consecutive bits of scrambled binary 1 at 2400 bit/s have been detected in the low
+    channel the modem shall be ready to receive data at 2400 bit/s and shall apply an ON
+    condition to circuit 109.
+
+6.3.1.2 Interworking at 1200 bit/s
+
+The following handshake is identical to the Recommendation V.22 alternative A and B handshake.
+
+6.3.1.2.1   Calling modem
+
+a)  On connection to line the calling modem shall be conditioned to receive signals in the high
+    channel at 1200 bit/s and transmit signals in the low channel at 1200 bit/s in accordance
+    with section 2.5.2.2. It shall apply an ON condition to circuit 107 in accordance with
+    Recommendation V.25. The modem shall initially remain silent.
+
+b)  After 155 +-10 ms of unscrambled binary 1 has been detected, the modem shall remain silent
+    for a further 456 +-10 ms then transmit scrambled binary 1 at 1200 bit/s (a preceding V.22 bis
+    signal, as shown in Figure 7/V.22 bis, would not affect the operation of a V.22 answer modem).
+
+c)  On detection of scrambled binary 1 in the high channel at 1200 bit/s for 270 +-40 ms the modem
+    shall be ready to receive data at 1200 bit/s and shall apply an ON condition to circuit 109 and
+    an OFF condition to circuit 112.
+
+d)  765 +-10 ms after circuit 109 has been turned ON, circuit 106 shall be conditioned to respond
+    to circuit 105 and the modem shall be ready to transmit data at 1200 bit/s.
+ 
+6.3.1.2.2   Answering modem
+
+a)  On connection to line the answering modem shall be conditioned to transmit signals in the high
+    channel at 1200 bit/s in accordance with section 2.5.2.2 and receive signals in the low channel at
+    1200 bit/s.
+
+    Following transmission of the answer sequence in accordance with V.25 the modem shall apply
+    an ON condition to circuit 107 and then transmit unscrambled binary 1 at 1200 bit/s.
+
+b)  On detection of scrambled binary 1 or 0 in the low channel at 1200 bit/s for 270 +-40 ms the
+    modem shall apply an OFF condition to circuit 112 and shall then transmit scrambled binary 1
+    at 1200 bit/s.
+
+c)  After scrambled binary 1 has been transmitted at 1200 bit/s for 765 +-10 ms the modem shall be
+    ready to transmit and receive data at 1200 bit/s, shall condition circuit 106 to respond to
+    circuit 105 and shall apply an ON condition to circuit 109.
+
+Note - Manufacturers may wish to note that in certain countries, for national purposes, modems are
+       in service which emit an answering tone of 2225 Hz instead of unscrambled binary 1.
+
+
+V.22bis to V.22bis
+------------------
+Calling party
+                                                           S1       scrambled 1's                  scrambled 1's  data
+                                                                    at 1200bps                     at 2400bps
+|---------------------------------------------------------|XXXXXXXX|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|XXXXXXXXXXXXXX|XXXXXXXXXXXXX
+                                      |<155+-10>|<456+-10>|<100+-3>|        |<------600+-10------>|<---200+-10-->|
+                                      ^                            |        ^<----450+-100---->|[16 way decisions begin]
+                                      |                            |        |
+                                      |                            v        |
+                                      |                            |<------450+-100----->|[16 way decisions begin]
+                                      |                            |<----------600+-10-------->|
+  |<2150+-350>|<--3300+-700->|<75+-20>|                            |<100+-3>|                  |<---200+-10-->
+  |-----------|XXXXXXXXXXXXXX|--------|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|XXXXXXXX|XXXXXXXXXXXXXXXXXX|XXXXXXXXXXXXXX|XXXXXXXXXXXXX
+   silence    2100Hz                   unscrambled 1's              S1       scrambled 1's      scrambled 1's  data
+                                       at 1200bps                            at 1200bps         at 2400bps
+Answering party
+
+S1 = Unscrambled double dibit 00 and 11 at 1200bps
+When the 2400bps section starts, both sides should look for 32 bits of continuous ones, as a test of integrity.
+
+
+
+
+V.22 to V.22bis
+---------------
+Calling party
+                                                           scrambled 1's                                 data
+                                                           at 1200bps
+|---------------------------------------------------------|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|XXXXXXXXXXXXX
+                                      |<155+-10>|<456+-10>|         |<270+-40>|<--------765+-10-------->|
+                                      ^                   |         ^
+                                      |                   |         |
+                                      |                   |         |
+                                      |                   |         |
+                                      |                   v         |
+  |<2150+-350>|<--3300+-700->|<75+-20>|                   |<270+-40>|<---------765+-10-------->|
+  |-----------|XXXXXXXXXXXXXX|--------|XXXXXXXXXXXXXXXXXXXXXXXXXXXXX|XXXXXXXXXXXXXXXXXXXXXXXXXX|XXXXXXXXXXXXX
+   silence    2100Hz                   unscrambled 1's                scrambled 1's             data
+                                       at 1200bps                     at 1200bps
+Answering party
+
+Both ends should accept unscrambled binary 1 or binary 0 as the preamble.
+
+
+
+
+V.22bis to V.22
+---------------
+Calling party
+                                                           S1      scrambled 1's                                 data
+                                                                   at 1200bps
+|---------------------------------------------------------|XXXXXXXX|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|XXXXXXXXXXXXX
+                                      |<155+-10>|<456+-10>|<100+-3>|           |<-270+-40-><------765+-10------>|
+                                      ^                            |           ^
+                                      |                            |           |
+                                      |                            v           |
+                                      |                            |
+                                      |                            |
+  |<2150+-350>|<--3300+-700->|<75+-20>|                            |<-270+-40->|<------765+-10----->|
+  |-----------|XXXXXXXXXXXXXX|--------|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|XXXXXXXXXXXXXXXXXXXX|XXXXXXXXXXXXX
+   silence    2100Hz                   unscrambled 1's                          scrambled 1's        data
+                                       at 1200bps                               at 1200bps
+Answering party
+
+Both ends should accept unscrambled binary 1 or binary 0 as the preamble.
+*/
+
+#define ms_to_symbols(t)    (((t)*600)/1000)
+
+/* Segments of the training sequence */
+enum
+{
+    V22BIS_TRAINING_STAGE_NORMAL_OPERATION = 0,
+    V22BIS_TRAINING_STAGE_INITIAL_SILENCE,
+    V22BIS_TRAINING_STAGE_UNSCRAMBLED_ONES,
+    V22BIS_TRAINING_STAGE_UNSCRAMBLED_0011,
+    V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200,
+    V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_2400,
+    V22BIS_TRAINING_STAGE_PARKED
+};
+
+static const int phase_steps[4] =
+{
+    1, 0, 2, 3
+};
+
+const complexf_t v22bis_constellation[16] =
+{
+    { 1.0f,  1.0f},
+    { 3.0f,  1.0f},
+    { 1.0f,  3.0f},
+    { 3.0f,  3.0f},
+    {-1.0f,  1.0f},
+    {-1.0f,  3.0f},
+    {-3.0f,  1.0f},
+    {-3.0f,  3.0f},
+    {-1.0f, -1.0f},
+    {-3.0f, -1.0f},
+    {-1.0f, -3.0f},
+    {-3.0f, -3.0f},
+    { 1.0f, -1.0f},
+    { 1.0f, -3.0f},
+    { 3.0f, -1.0f},
+    { 3.0f, -3.0f}
+};
+
+/* Raised root cosine pulse shaping; Beta = 0.75; 4 symbols either
+   side of the centre. */
+/* Created with mkshape -r 0.0125 0.75 361 -l and then split up */
+#define PULSESHAPER_GAIN            (40.000612087f/40.0f)
+#define PULSESHAPER_COEFF_SETS      40
+
+static const float pulseshaper[PULSESHAPER_COEFF_SETS][V22BIS_TX_FILTER_STEPS] =
+{
+    {
+        -0.0047287346f,         /* Filter 0 */
+        -0.0083947197f,
+        -0.0087380763f,
+         0.0088053673f,
+         0.5108981827f,
+         0.5108981827f,
+         0.0088053673f,
+        -0.0087380763f,
+        -0.0083947197f
+    },
+    {
+        -0.0044638629f,         /* Filter 1 */
+        -0.0089241700f,
+        -0.0111288952f,
+         0.0023412184f,
+         0.5623914901f,
+         0.4599551720f,
+         0.0144817755f,
+        -0.0063186648f,
+        -0.0077293609f
+    },
+    {
+        -0.0041048584f,         /* Filter 2 */
+        -0.0093040596f,
+        -0.0134459768f,
+        -0.0048558766f,
+         0.6141017035f,
+         0.4098822897f,
+         0.0193317049f,
+        -0.0039145680f,
+        -0.0069438567f
+    },
+    {
+        -0.0036565006f,         /* Filter 3 */
+        -0.0095231635f,
+        -0.0156437084f,
+        -0.0127148737f,
+         0.6656848457f,
+         0.3609830295f,
+         0.0233320755f,
+        -0.0015677363f,
+        -0.0060557371f
+    },
+    {
+        -0.0031253709f,         /* Filter 4 */
+        -0.0095729633f,
+        -0.0176768181f,
+        -0.0211485021f,
+         0.7167894869f,
+         0.3135419896f,
+         0.0264748749f,
+         0.0006824956f,
+        -0.0050839319f
+    },
+    {
+        -0.0025197700f,         /* Filter 5 */
+        -0.0094478866f,
+        -0.0195012095f,
+        -0.0300535107f,
+         0.7670600056f,
+         0.2678225635f,
+         0.0287663895f,
+         0.0027999985f,
+        -0.0040483891f
+    },
+    {
+        -0.0018496023f,         /* Filter 6 */
+        -0.0091454978f,
+        -0.0210748106f,
+        -0.0393111426f,
+         0.8161399423f,
+         0.2240649005f,
+         0.0302262769f,
+         0.0047523617f,
+        -0.0029696854f
+    },
+    {
+        -0.0011262266f,         /* Filter 7 */
+        -0.0086666380f,
+        -0.0223584207f,
+        -0.0487878398f,
+         0.8636754069f,
+         0.1824841563f,
+         0.0308864956f,
+         0.0065113237f,
+        -0.0018686358f
+    },
+    {
+        -0.0003622774f,         /* Filter 8 */
+        -0.0080155088f,
+        -0.0233165437f,
+        -0.0583361774f,
+         0.9093185032f,
+         0.1432690480f,
+         0.0307901140f,
+         0.0080531155f,
+        -0.0007659096f
+    },
+    {
+         0.0004285425f,         /* Filter 9 */
+        -0.0071996967f,
+        -0.0239181901f,
+        -0.0677960213f,
+         0.9527307304f,
+         0.1065807242f,
+         0.0299900191f,
+         0.0093587151f,
+         0.0003183408f
+    },
+    {
+         0.0012316933f,         /* Filter 10 */
+        -0.0062301368f,
+        -0.0241376359f,
+        -0.0769959031f,
+         0.9935863233f,
+         0.0725519600f,
+         0.0285475474f,
+         0.0104140102f,
+         0.0013648323f
+    },
+    {
+         0.0020320508f,         /* Filter 11 */
+        -0.0051210137f,
+        -0.0239551212f,
+        -0.0857546018f,
+         1.0315754934f,
+         0.0412866769f,
+         0.0265310587f,
+         0.0112098711f,
+         0.0023554782f
+    },
+    {
+         0.0028141763f,         /* Filter 12 */
+        -0.0038896008f,
+        -0.0233574765f,
+        -0.0938829156f,
+         1.0664075323f,
+         0.0128597894f,
+         0.0240144782f,
+         0.0117421344f,
+         0.0032736852f
+    },
+    {
+         0.0035625973f,         /* Filter 13 */
+        -0.0025560369f,
+        -0.0223386620f,
+        -0.1011856112f,
+         1.0978137424f,
+        -0.0126826277f,
+         0.0210758250f,
+         0.0120115019f,
+         0.0041046165f
+    },
+    {
+         0.0042620971f,         /* Filter 14 */
+        -0.0011430452f,
+        -0.0209002083f,
+        -0.1074635265f,
+         1.1255501596f,
+        -0.0353228594f,
+         0.0177957527f,
+         0.0120233576f,
+         0.0048354157f
+    },
+    {
+         0.0048980053f,         /* Filter 15 */
+         0.0003244045f,
+        -0.0190515462f,
+        -0.1125158080f,
+         1.1494000377f,
+        -0.0550707703f,
+         0.0142561191f,
+         0.0117875105f,
+         0.0054553898f
+    },
+    {
+         0.0054564857f,         /* Filter 16 */
+         0.0018194852f,
+        -0.0168102168f,
+        -0.1161422557f,
+         1.1691760633f,
+        -0.0719627404f,
+         0.0105386068f,
+         0.0113178688f,
+         0.0059561483f
+    },
+    {
+         0.0059248154f,         /* Filter 17 */
+         0.0033139475f,
+        -0.0142019526f,
+        -0.1181457502f,
+         1.1847222770f,
+        -0.0860603350f,
+         0.0067234125f,
+         0.0106320540f,
+         0.0063316975f
+    },
+    {
+         0.0062916504f,         /* Filter 18 */
+         0.0047785946f,
+        -0.0112606234f,
+        -0.1183347329f,
+         1.1959156771f,
+        -0.0974487311f,
+         0.0028880206f,
+         0.0097509621f,
+         0.0065784888f
+    },
+    {
+         0.0065472715f,         /* Filter 19 */
+         0.0061837898f,
+        -0.0080280420f,
+        -0.1165257094f,
+         1.2026674866f,
+        -0.1062349247f,
+        -0.0008939235f,
+         0.0086982833f,
+         0.0066954225f
+    },
+    {
+         0.0066838062f,         /* Filter 20 */
+         0.0074999881f,
+        -0.0045536271f,
+        -0.1125457458f,
+         1.2049240699f,
+        -0.1125457458f,
+        -0.0045536271f,
+         0.0074999881f,
+         0.0066838062f
+    },
+    {
+         0.0066954225f,         /* Filter 21 */
+         0.0086982833f,
+        -0.0008939235f,
+        -0.1062349247f,
+         1.2026674866f,
+        -0.1165257094f,
+        -0.0080280420f,
+         0.0061837898f,
+         0.0065472715f
+    },
+    {
+         0.0065784888f,         /* Filter 22 */
+         0.0097509621f,
+         0.0028880206f,
+        -0.0974487311f,
+         1.1959156771f,
+        -0.1183347329f,
+        -0.0112606234f,
+         0.0047785946f,
+         0.0062916504f
+    },
+    {
+         0.0063316975f,         /* Filter 23 */
+         0.0106320540f,
+         0.0067234125f,
+        -0.0860603350f,
+         1.1847222770f,
+        -0.1181457502f,
+        -0.0142019526f,
+         0.0033139475f,
+         0.0059248154f
+    },
+    {
+         0.0059561483f,         /* Filter 24 */
+         0.0113178688f,
+         0.0105386068f,
+        -0.0719627404f,
+         1.1691760633f,
+        -0.1161422557f,
+        -0.0168102168f,
+         0.0018194852f,
+         0.0054564857f
+    },
+    {
+         0.0054553898f,         /* Filter 25 */
+         0.0117875105f,
+         0.0142561191f,
+        -0.0550707703f,
+         1.1494000377f,
+        -0.1125158080f,
+        -0.0190515462f,
+         0.0003244045f,
+         0.0048980053f
+    },
+    {
+         0.0048354157f,         /* Filter 26 */
+         0.0120233576f,
+         0.0177957527f,
+        -0.0353228594f,
+         1.1255501596f,
+        -0.1074635265f,
+        -0.0209002083f,
+        -0.0011430452f,
+         0.0042620971f
+    },
+    {
+         0.0041046165f,         /* Filter 27 */
+         0.0120115019f,
+         0.0210758250f,
+        -0.0126826277f,
+         1.0978137424f,
+        -0.1011856112f,
+        -0.0223386620f,
+        -0.0025560369f,
+         0.0035625973f
+    },
+    {
+         0.0032736852f,         /* Filter 28 */
+         0.0117421344f,
+         0.0240144782f,
+         0.0128597894f,
+         1.0664075323f,
+        -0.0938829156f,
+        -0.0233574765f,
+        -0.0038896008f,
+         0.0028141763f
+    },
+    {
+         0.0023554782f,         /* Filter 29 */
+         0.0112098711f,
+         0.0265310587f,
+         0.0412866769f,
+         1.0315754934f,
+        -0.0857546018f,
+        -0.0239551212f,
+        -0.0051210137f,
+         0.0020320508f
+    },
+    {
+         0.0013648323f,         /* Filter 30 */
+         0.0104140102f,
+         0.0285475474f,
+         0.0725519600f,
+         0.9935863233f,
+        -0.0769959031f,
+        -0.0241376359f,
+        -0.0062301368f,
+         0.0012316933f
+    },
+    {
+         0.0003183408f,         /* Filter 31 */
+         0.0093587151f,
+         0.0299900191f,
+         0.1065807242f,
+         0.9527307304f,
+        -0.0677960213f,
+        -0.0239181901f,
+        -0.0071996967f,
+         0.0004285425f
+    },
+    {
+        -0.0007659096f,         /* Filter 32 */
+         0.0080531155f,
+         0.0307901140f,
+         0.1432690480f,
+         0.9093185032f,
+        -0.0583361774f,
+        -0.0233165437f,
+        -0.0080155088f,
+        -0.0003622774f
+    },
+    {
+        -0.0018686358f,         /* Filter 33 */
+         0.0065113237f,
+         0.0308864956f,
+         0.1824841563f,
+         0.8636754069f,
+        -0.0487878398f,
+        -0.0223584207f,
+        -0.0086666380f,
+        -0.0011262266f
+    },
+    {
+        -0.0029696854f,         /* Filter 34 */
+         0.0047523617f,
+         0.0302262769f,
+         0.2240649005f,
+         0.8161399423f,
+        -0.0393111426f,
+        -0.0210748106f,
+        -0.0091454978f,
+        -0.0018496023f
+    },
+    {
+        -0.0040483891f,         /* Filter 35 */
+         0.0027999985f,
+         0.0287663895f,
+         0.2678225635f,
+         0.7670600056f,
+        -0.0300535107f,
+        -0.0195012095f,
+        -0.0094478866f,
+        -0.0025197700f
+    },
+    {
+        -0.0050839319f,         /* Filter 36 */
+         0.0006824956f,
+         0.0264748749f,
+         0.3135419896f,
+         0.7167894869f,
+        -0.0211485021f,
+        -0.0176768181f,
+        -0.0095729633f,
+        -0.0031253709f
+    },
+    {
+        -0.0060557371f,         /* Filter 37 */
+        -0.0015677363f,
+         0.0233320755f,
+         0.3609830295f,
+         0.6656848457f,
+        -0.0127148737f,
+        -0.0156437084f,
+        -0.0095231635f,
+        -0.0036565006f
+    },
+    {
+        -0.0069438567f,         /* Filter 38 */
+        -0.0039145680f,
+         0.0193317049f,
+         0.4098822897f,
+         0.6141017035f,
+        -0.0048558766f,
+        -0.0134459768f,
+        -0.0093040596f,
+        -0.0041048584f
+    },
+    {
+        -0.0077293609f,         /* Filter 39 */
+        -0.0063186648f,
+         0.0144817755f,
+         0.4599551720f,
+         0.5623914901f,
+         0.0023412184f,
+        -0.0111288952f,
+        -0.0089241700f,
+        -0.0044638629f
+    },
+};
+
+static int fake_get_bit(void *user_data)
+{
+    return 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int scramble(v22bis_state_t *s, int bit)
+{
+    int out_bit;
+
+    out_bit = (bit ^ (s->tx_scramble_reg >> 14) ^ (s->tx_scramble_reg >> 17)) & 1;
+    if (s->tx_scrambler_pattern_count >= 64)
+    {
+        out_bit ^= 1;
+        s->tx_scrambler_pattern_count = 0;
+    }
+    if (out_bit == 1)
+        s->tx_scrambler_pattern_count++;
+    else
+        s->tx_scrambler_pattern_count = 0;
+    s->tx_scramble_reg = (s->tx_scramble_reg << 1) | out_bit;
+    return out_bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int get_scrambled_bit(v22bis_state_t *s)
+{
+    int bit;
+
+    if ((bit = s->current_get_bit(s->user_data)) == PUTBIT_END_OF_DATA)
+    {
+        /* Fill out this symbol with ones, and prepare to send
+           the rest of the shutdown sequence. */
+        s->current_get_bit = fake_get_bit;
+        s->shutdown = 1;
+        bit = 1;
+    }
+    return scramble(s, bit);
+}
+/*- End of function --------------------------------------------------------*/
+
+static complexf_t training_get(v22bis_state_t *s)
+{
+    complexf_t z;
+    int bits;
+
+    /* V.22bis training sequence */
+    switch (s->tx_training)
+    {
+    case V22BIS_TRAINING_STAGE_INITIAL_SILENCE:
+        /* Segment 1: silence */
+        s->tx_constellation_state = 0;
+        z = complex_setf(0.0f, 0.0f);
+        if (s->caller)
+        {
+            /* The caller just waits for a signal from the far end, which should be unscrambled ones */
+            if (s->detected_unscrambled_ones_or_zeros)
+            {
+                if (s->bit_rate == 2400)
+                {
+                    /* Try to establish at 2400bps */
+                    span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting unscrambled 0011 at 1200 (S1)\n");
+                    s->tx_training = V22BIS_TRAINING_STAGE_UNSCRAMBLED_0011;
+                }
+                else
+                {
+                    /* Only try at 1200bps */
+                    span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting scrambled ones at 1200 (A)\n");
+                    s->tx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+                }
+                s->tx_training_count = 0;
+            }
+        }
+        else
+        {
+            /* The answerer waits 75ms, then sends unscrambled ones */
+            if (++s->tx_training_count >= ms_to_symbols(75))
+            {
+                /* Inital 75ms of silence is over */
+                span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting unscrambled ones at 1200\n");
+                s->tx_training = V22BIS_TRAINING_STAGE_UNSCRAMBLED_ONES;
+                s->tx_training_count = 0;
+            }
+        }
+        break;
+    case V22BIS_TRAINING_STAGE_UNSCRAMBLED_ONES:
+        /* Segment 2: Continuous unscrambled ones at 1200bps (i.e. reversals). */
+        /* Only the answering modem sends unscrambled ones. It is the first thing exchanged between the modems. */
+        s->tx_constellation_state = (s->tx_constellation_state + phase_steps[3]) & 3;
+        z = v22bis_constellation[(s->tx_constellation_state << 2) | 0x01];
+        if (s->bit_rate == 2400  &&  s->detected_unscrambled_0011_ending)
+        {
+            /* We are allowed to use 2400bps, and the far end is requesting 2400bps. Result: we are going to
+               work at 2400bps */
+            span_log(&s->logging, SPAN_LOG_FLOW, "+++ [2400] starting unscrambled 0011 at 1200 (S1)\n");
+            s->tx_training = V22BIS_TRAINING_STAGE_UNSCRAMBLED_0011;
+            s->tx_training_count = 0;
+            break;
+        }
+        if (s->detected_scrambled_ones_or_zeros_at_1200bps)
+        {
+            /* We are going to work at 1200bps. */
+            span_log(&s->logging, SPAN_LOG_FLOW, "+++ [1200] starting scrambled ones at 1200 (B)\n");
+            s->bit_rate = 1200;
+            s->tx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+            s->tx_training_count = 0;
+            break;
+        }
+        break;
+    case V22BIS_TRAINING_STAGE_UNSCRAMBLED_0011:
+        /* Segment 3: Continuous unscrambled double dibit 00 11 at 1200bps. This is termed the S1 segment in
+           the V.22bis spec. It is only sent to request or accept 2400bps mode, and lasts 100+-3ms. After this
+           timed burst, we unconditionally change to sending scrambled ones at 1200bps. */
+        s->tx_constellation_state = (s->tx_constellation_state + phase_steps[(s->tx_training_count & 1)  ?  3  :  0]) & 3;
+span_log(&s->logging, SPAN_LOG_FLOW, "U0011 Tx 0x%02x\n", s->tx_constellation_state);
+        z = v22bis_constellation[(s->tx_constellation_state << 2) | 0x01];
+        if (++s->tx_training_count >= ms_to_symbols(100))
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting scrambled ones at 1200 (C)\n");
+            s->tx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+            s->tx_training_count = 0;
+        }
+        break;
+    case V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200:
+        /* Segment 4: Scrambled ones at 1200bps. */
+        bits = scramble(s, 1);
+        bits = (bits << 1) | scramble(s, 1);
+        s->tx_constellation_state = (s->tx_constellation_state + phase_steps[bits]) & 3;
+        z = v22bis_constellation[(s->tx_constellation_state << 2) | 0x01];
+        if (s->caller)
+        {
+            if (s->detected_unscrambled_0011_ending)
+            {
+                /* Continue for a further 600+-10ms */
+                if (++s->tx_training_count >= ms_to_symbols(600))
+                {
+                    span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting scrambled ones at 2400 (A)\n");
+                    s->tx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_2400;
+                    s->tx_training_count = 0;
+                }
+            }
+            else if (s->detected_scrambled_ones_or_zeros_at_1200bps)
+            {
+                if (s->bit_rate == 2400)
+                {
+                    /* Continue for a further 756+-10ms */
+                    if (++s->tx_training_count >= ms_to_symbols(756))
+                    {
+                        span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting scrambled ones at 2400 (B)\n");
+                        s->tx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_2400;
+                        s->tx_training_count = 0;
+                    }
+                }
+                else
+                {
+                    span_log(&s->logging, SPAN_LOG_FLOW, "+++ finished\n");
+                    s->tx_training = V22BIS_TRAINING_STAGE_NORMAL_OPERATION;
+                    s->tx_training_count = 0;
+                    s->current_get_bit = s->get_bit;
+                }
+            }
+        }
+        else
+        {
+            if (s->bit_rate == 2400)
+            {
+                if (++s->tx_training_count >= ms_to_symbols(500))
+                {
+                    span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting scrambled ones at 2400 (C)\n");
+                    s->tx_training = V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_2400;
+                    s->tx_training_count = 0;
+                }
+            }
+            else
+            {
+                if (++s->tx_training_count >= ms_to_symbols(756))
+                {
+                    span_log(&s->logging, SPAN_LOG_FLOW, "+++ finished\n");
+                    s->tx_training = 0;
+                    s->tx_training_count = 0;
+                }
+            }
+        }
+        break;
+    case V22BIS_TRAINING_STAGE_SCRAMBLED_ONES_AT_2400:
+        /* Segment 4: Scrambled ones at 2400bps. */
+        bits = scramble(s, 1);
+        bits = (bits << 1) | scramble(s, 1);
+        s->tx_constellation_state = (s->tx_constellation_state + phase_steps[bits]) & 3;
+        bits = scramble(s, 1);
+        bits = (bits << 1) | scramble(s, 1);
+        z = v22bis_constellation[(s->tx_constellation_state << 2) | 0x01];
+        if (++s->tx_training_count >= ms_to_symbols(200))
+        {
+            /* We have completed training. Now handle some real work. */
+            span_log(&s->logging, SPAN_LOG_FLOW, "+++ finished\n");
+            s->tx_training = 0;
+            s->tx_training_count = 0;
+            s->current_get_bit = s->get_bit;
+        }
+        break;
+    case V22BIS_TRAINING_STAGE_PARKED:
+    default:
+        z = complex_setf(0.0f, 0.0f);
+        break;
+    }
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static complexf_t getbaud(v22bis_state_t *s)
+{
+    int bits;
+
+    if (s->tx_training)
+    {
+        /* Send the training sequence */
+        return training_get(s);
+    }
+
+    /* There is no graceful shutdown procedure defined for V.22bis. Just
+       send some ones, to ensure we get the real data bits through, even
+       with bad ISI. */
+    if (s->shutdown)
+    {
+        if (++s->shutdown > 10)
+            return complex_setf(0.0f, 0.0f);
+    }
+    /* The first two bits define the quadrant */
+    bits = get_scrambled_bit(s);
+    bits = (bits << 1) | get_scrambled_bit(s);
+    s->tx_constellation_state = (s->tx_constellation_state + phase_steps[bits]) & 3;
+    if (s->bit_rate == 1200)
+    {
+        bits = 0x01;
+    }
+    else
+    {
+        /* The other two bits define the position within the quadrant */
+        bits = get_scrambled_bit(s);
+        bits = (bits << 1) | get_scrambled_bit(s);
+    }
+    return v22bis_constellation[(s->tx_constellation_state << 2) | bits];
+}
+/*- End of function --------------------------------------------------------*/
+
+int v22bis_tx(v22bis_state_t *s, int16_t amp[], int len)
+{
+    complexf_t x;
+    complexf_t z;
+    int i;
+    int sample;
+    float famp;
+
+    if (s->shutdown > 10)
+        return 0;
+    for (sample = 0;  sample < len;  sample++)
+    {
+        if ((s->tx_baud_phase += 3) >= 40)
+        {
+            s->tx_baud_phase -= 40;
+            s->tx_rrc_filter[s->tx_rrc_filter_step] =
+            s->tx_rrc_filter[s->tx_rrc_filter_step + V22BIS_TX_FILTER_STEPS] = getbaud(s);
+            if (++s->tx_rrc_filter_step >= V22BIS_TX_FILTER_STEPS)
+                s->tx_rrc_filter_step = 0;
+        }
+        /* Root raised cosine pulse shaping at baseband */
+        x.re = 0.0f;
+        x.im = 0.0f;
+        for (i = 0;  i < V22BIS_TX_FILTER_STEPS;  i++)
+        {
+            x.re += pulseshaper[39 - s->tx_baud_phase][i]*s->tx_rrc_filter[i + s->tx_rrc_filter_step].re;
+            x.im += pulseshaper[39 - s->tx_baud_phase][i]*s->tx_rrc_filter[i + s->tx_rrc_filter_step].im;
+        }
+        /* Now create and modulate the carrier */
+        z = dds_complexf(&(s->tx_carrier_phase), s->tx_carrier_phase_rate);
+        famp = (x.re*z.re - x.im*z.im)*s->tx_gain;
+        if (s->guard_phase_rate  &&  (s->tx_rrc_filter[s->tx_rrc_filter_step].re != 0.0f  ||  s->tx_rrc_filter[i + s->tx_rrc_filter_step].im != 0.0f))
+        {
+            /* Add the guard tone */
+            famp += dds_modf(&(s->guard_phase), s->guard_phase_rate, s->guard_level, 0);
+        }
+        /* Don't bother saturating. We should never clip. */
+        amp[sample] = (int16_t) lrintf(famp);
+    }
+    return sample;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v22bis_tx_power(v22bis_state_t *s, float power)
+{
+    float l;
+
+    l = 1.6f*powf(10.0f, (power - DBM0_MAX_POWER)/20.0f);
+    s->tx_gain = l*32768.0f/(PULSESHAPER_GAIN*3.0f);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int v22bis_tx_restart(v22bis_state_t *s, int bit_rate)
+{
+    s->bit_rate = bit_rate;
+    cvec_zerof(s->tx_rrc_filter, sizeof(s->tx_rrc_filter)/sizeof(s->tx_rrc_filter[0]));
+    s->tx_rrc_filter_step = 0;
+    s->tx_scramble_reg = 0;
+    s->tx_scrambler_pattern_count = 0;
+    s->tx_training = V22BIS_TRAINING_STAGE_INITIAL_SILENCE;
+    s->tx_training_count = 0;
+    s->tx_carrier_phase = 0;
+    s->guard_phase = 0;
+    s->tx_baud_phase = 0;
+    s->tx_constellation_state = 0;
+    s->current_get_bit = fake_get_bit;
+    s->shutdown = 0;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v22bis_set_get_bit(v22bis_state_t *s, get_bit_func_t get_bit, void *user_data)
+{
+    s->get_bit = get_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v22bis_set_put_bit(v22bis_state_t *s, put_bit_func_t put_bit, void *user_data)
+{
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v22bis_restart(v22bis_state_t *s, int bit_rate)
+{
+    if (v22bis_tx_restart(s, bit_rate))
+        return -1;
+    return v22bis_rx_restart(s, bit_rate);
+}
+/*- End of function --------------------------------------------------------*/
+
+v22bis_state_t *v22bis_init(v22bis_state_t *s,
+                            int bit_rate,
+                            int guard,
+                            int caller,
+                            get_bit_func_t get_bit,
+                            put_bit_func_t put_bit,
+                            void *user_data)
+{
+    if (s == NULL)
+    {
+        if ((s = (v22bis_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    s->bit_rate = bit_rate;
+    s->caller = caller;
+
+    s->get_bit = get_bit;
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+
+    if (s->caller)
+    {
+        s->tx_carrier_phase_rate = dds_phase_ratef(1200.0f);
+    }
+    else
+    {
+        s->tx_carrier_phase_rate = dds_phase_ratef(2400.0f);
+        if (guard)
+        {
+            if (guard == 1)
+            {
+                s->guard_phase_rate = dds_phase_ratef(550.0f);
+                s->guard_level = 1500.0f;
+            }
+            else
+            {
+                s->guard_phase_rate = dds_phase_ratef(1800.0f);
+                s->guard_level = 1000.0f;
+            }
+        }
+    }
+    v22bis_tx_power(s, -10.0f);
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "V.22bis");
+    v22bis_restart(s, s->bit_rate);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v27ter_rx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1443 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v27ter_rx.c - ITU V.27ter modem receive part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v27ter_rx.c,v 1.75 2006/11/28 16:59:57 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/complex.h"
+#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
+#include "spandsp/async.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/arctan2.h"
+#include "spandsp/dds.h"
+#include "spandsp/complex_filters.h"
+
+#include "spandsp/v29rx.h"
+#include "spandsp/v27ter_rx.h"
+
+/* V.27ter is a DPSK modem, but this code treats it like QAM. It nails down the
+   signal to a static constellation, even though dealing with differences is all
+   that is necessary. */
+
+#define CARRIER_NOMINAL_FREQ        1800.0f
+#define EQUALIZER_DELTA             0.25f
+
+/* Segments of the training sequence */
+/* V.27ter defines a long and a short sequence. FAX doesn't use the
+   short sequence, so it is not implemented here. */
+#define V27TER_TRAINING_SEG_3_LEN   50
+#define V27TER_TRAINING_SEG_5_LEN   1074
+#define V27TER_TRAINING_SEG_6_LEN   8
+
+enum
+{
+    TRAINING_STAGE_NORMAL_OPERATION = 0,
+    TRAINING_STAGE_SYMBOL_ACQUISITION,
+    TRAINING_STAGE_LOG_PHASE,
+    TRAINING_STAGE_WAIT_FOR_HOP,
+    TRAINING_STAGE_TRAIN_ON_ABAB,
+    TRAINING_STAGE_TEST_ONES,
+    TRAINING_STAGE_PARKED
+};
+
+static const complexf_t v27ter_constellation[8] =
+{
+    { 1.414f,  0.0f},       /*   0deg */
+    { 1.0f,    1.0f},       /*  45deg */
+    { 0.0f,    1.414f},     /*  90deg */
+    {-1.0f,    1.0f},       /* 135deg */
+    {-1.414f,  0.0f},       /* 180deg */
+    {-1.0f,   -1.0f},       /* 225deg */
+    { 0.0f,   -1.414f},     /* 270deg */
+    { 1.0f,   -1.0f}        /* 315deg */
+};
+
+/* Raised root cosine pulse shaping filter set; beta 0.5; sample rate 8000; 8 phase steps;
+   baud rate 1600; shifted to centre at 1800Hz; complex. */
+#define PULSESHAPER_4800_GAIN           (2.4975f*2.0f)
+#define PULSESHAPER_4800_COEFF_SETS     8
+static const complexf_t pulseshaper_4800[PULSESHAPER_4800_COEFF_SETS][V27TER_RX_4800_FILTER_STEPS] =
+{
+    {
+        {-0.0050334423f, -0.0025646669f},   /* Filter 0 */
+        { 0.0001996320f, -0.0006144041f},
+        {-0.0064914716f, -0.0010281481f},
+        {-0.0000000000f,  0.0057152766f},
+        {-0.0060638961f,  0.0009604268f},
+        { 0.0046534477f,  0.0143218395f},
+        {-0.0027026909f,  0.0013770898f},
+        { 0.0114324470f,  0.0157354133f},
+        { 0.0161335660f, -0.0161335660f},
+        { 0.0216170550f,  0.0157057098f},
+        { 0.0523957134f, -0.1028323775f},
+        { 0.1009107956f,  0.0327879051f},
+        { 0.0626681574f, -0.3956711736f},
+        { 1.0309650898f,  0.0000000000f},
+        { 0.1612784723f,  1.0182721987f},
+        {-0.3809963452f,  0.1237932168f},
+        { 0.0481701579f,  0.0945392579f},
+        {-0.0933698449f,  0.0678371631f},
+        { 0.0188939989f,  0.0188939989f},
+        {-0.0134110893f,  0.0184587808f},
+        { 0.0173301130f,  0.0088301336f},
+        { 0.0009373415f, -0.0028848406f},
+        { 0.0148734735f,  0.0023557268f},
+        {-0.0000000000f, -0.0061394833f},
+        { 0.0056449120f, -0.0008940662f},
+        {-0.0020309798f, -0.0062507130f},
+        {-0.0005756104f,  0.0002932882f},
+    },
+    {
+        {-0.0018682578f, -0.0009519249f},   /* Filter 1 */
+        {-0.0002684621f,  0.0008262413f},
+        {-0.0059141931f, -0.0009367162f},
+        {-0.0000000000f,  0.0073941285f},
+        {-0.0037772132f,  0.0005982518f},
+        { 0.0050394423f,  0.0155098087f},
+        { 0.0010806327f, -0.0005506098f},
+        { 0.0105277637f,  0.0144902237f},
+        { 0.0209691082f, -0.0209691082f},
+        { 0.0125153543f,  0.0090929371f},
+        { 0.0603186345f, -0.1183819857f},
+        { 0.0675630592f,  0.0219525687f},
+        { 0.0765237582f, -0.4831519944f},
+        { 1.0763458014f,  0.0000000000f},
+        { 0.1524445751f,  0.9624971666f},
+        {-0.2992580667f,  0.0972348401f},
+        { 0.0600222537f,  0.1178003057f},
+        {-0.0774892752f,  0.0562992540f},
+        { 0.0247376160f,  0.0247376159f},
+        {-0.0090916622f,  0.0125135995f},
+        { 0.0175076452f,  0.0089205908f},
+        { 0.0021568809f, -0.0066381970f},
+        { 0.0129897446f,  0.0020573734f},
+        {-0.0000000000f, -0.0079766726f},
+        { 0.0037729191f, -0.0005975717f},
+        {-0.0020837980f, -0.0064132707f},
+        {-0.0018682578f,  0.0009519249f},
+    },
+    {
+        {-0.0030355143f, -0.0015466718f},   /* Filter 2 */
+        {-0.0007306011f,  0.0022485590f},
+        {-0.0049435003f, -0.0007829735f},
+        {-0.0000000000f,  0.0087472824f},
+        {-0.0011144870f,  0.0001765174f},
+        { 0.0051901643f,  0.0159736834f},
+        { 0.0049297142f, -0.0025118148f},
+        { 0.0088213528f,  0.0121415505f},
+        { 0.0251126307f, -0.0251126307f},
+        { 0.0011182680f,  0.0008124692f},
+        { 0.0667555589f, -0.1310151612f},
+        { 0.0256033627f,  0.0083190368f},
+        { 0.0905183226f, -0.5715101964f},
+        { 1.1095595360f,  0.0000000000f},
+        { 0.1420835849f,  0.8970804494f},
+        {-0.2215345589f,  0.0719809416f},
+        { 0.0679608493f,  0.1333806768f},
+        {-0.0606982839f,  0.0440998847f},
+        { 0.0284660210f,  0.0284660210f},
+        {-0.0047348689f,  0.0065169880f},
+        { 0.0165731197f,  0.0084444263f},
+        { 0.0032233168f, -0.0099203492f},
+        { 0.0105861265f,  0.0016766777f},
+        {-0.0000000000f, -0.0092685623f},
+        { 0.0018009090f, -0.0002852360f},
+        {-0.0020112222f, -0.0061899056f},
+        {-0.0030355143f,  0.0015466718f},
+    },
+    {
+        {-0.0040182937f, -0.0020474229f},   /* Filter 3 */
+        {-0.0011603659f,  0.0035712391f},
+        {-0.0036173562f, -0.0005729329f},
+        {-0.0000000000f,  0.0096778115f},
+        { 0.0018022529f, -0.0002854488f},
+        { 0.0050847711f,  0.0156493164f},
+        { 0.0086257291f, -0.0043950285f},
+        { 0.0063429899f,  0.0087303766f},
+        { 0.0282322904f, -0.0282322904f},
+        {-0.0123306868f, -0.0089587683f},
+        { 0.0712060603f, -0.1397497620f},
+        {-0.0248170325f, -0.0080635427f},
+        { 0.1043647251f, -0.6589329411f},
+        { 1.1298123598f,  0.0000000000f},
+        { 0.1304361227f,  0.8235412673f},
+        {-0.1491678531f,  0.0484675735f},
+        { 0.0722366382f,  0.1417723850f},
+        {-0.0437871917f,  0.0318132570f},
+        { 0.0301678844f,  0.0301678844f},
+        {-0.0005794433f,  0.0007975353f},
+        { 0.0146599874f,  0.0074696367f},
+        { 0.0040878789f, -0.0125811975f},
+        { 0.0078126085f,  0.0012373956f},
+        {-0.0000000000f, -0.0099797659f},
+        {-0.0001576582f,  0.0000249706f},
+        {-0.0018223262f, -0.0056085432f},
+        {-0.0040182937f,  0.0020474229f},
+    },
+    {
+        {-0.0047695783f, -0.0024302215f},   /* Filter 4 */
+        {-0.0015320920f,  0.0047152944f},
+        {-0.0019955989f, -0.0003160718f},
+        {-0.0000000000f,  0.0101070339f},
+        { 0.0048302421f, -0.0007650352f},
+        { 0.0047152968f,  0.0145121913f},
+        { 0.0119428503f, -0.0060851862f},
+        { 0.0031686377f,  0.0043612557f},
+        { 0.0300119095f, -0.0300119094f},
+        {-0.0274628457f, -0.0199529254f},
+        { 0.0731841827f, -0.1436320457f},
+        {-0.0832936387f, -0.0270637438f},
+        { 0.1177684882f, -0.7435609707f},
+        { 1.1366178989f,  0.0000000000f},
+        { 0.1177684882f,  0.7435609707f},
+        {-0.0832936387f,  0.0270637438f},
+        { 0.0731841827f,  0.1436320457f},
+        {-0.0274628457f,  0.0199529254f},
+        { 0.0300119095f,  0.0300119094f},
+        { 0.0031686377f, -0.0043612557f},
+        { 0.0119428503f,  0.0060851862f},
+        { 0.0047152968f, -0.0145121913f},
+        { 0.0048302421f,  0.0007650352f},
+        {-0.0000000000f, -0.0101070339f},
+        {-0.0019955989f,  0.0003160718f},
+        {-0.0015320920f, -0.0047152944f},
+        {-0.0047695783f,  0.0024302215f},
+    },
+    {
+        {-0.0052564711f, -0.0026783058f},   /* Filter 5 */
+        {-0.0018223262f,  0.0056085432f},
+        {-0.0001576582f, -0.0000249706f},
+        {-0.0000000000f,  0.0099797659f},
+        { 0.0078126085f, -0.0012373956f},
+        { 0.0040878789f,  0.0125811975f},
+        { 0.0146599874f, -0.0074696367f},
+        {-0.0005794433f, -0.0007975353f},
+        { 0.0301678844f, -0.0301678844f},
+        {-0.0437871917f, -0.0318132570f},
+        { 0.0722366382f, -0.1417723850f},
+        {-0.1491678531f, -0.0484675735f},
+        { 0.1304361227f, -0.8235412673f},
+        { 1.1298123598f,  0.0000000000f},
+        { 0.1043647251f,  0.6589329411f},
+        {-0.0248170325f,  0.0080635427f},
+        { 0.0712060603f,  0.1397497620f},
+        {-0.0123306868f,  0.0089587683f},
+        { 0.0282322904f,  0.0282322904f},
+        { 0.0063429899f, -0.0087303766f},
+        { 0.0086257291f,  0.0043950285f},
+        { 0.0050847711f, -0.0156493164f},
+        { 0.0018022529f,  0.0002854488f},
+        {-0.0000000000f, -0.0096778115f},
+        {-0.0036173562f,  0.0005729329f},
+        {-0.0011603659f, -0.0035712391f},
+        {-0.0052564711f,  0.0026783058f},
+    },
+    {
+        {-0.0054614245f, -0.0027827348f},   /* Filter 6 */
+        {-0.0020112222f,  0.0061899056f},
+        { 0.0018009090f,  0.0002852360f},
+        {-0.0000000000f,  0.0092685623f},
+        { 0.0105861265f, -0.0016766777f},
+        { 0.0032233168f,  0.0099203492f},
+        { 0.0165731197f, -0.0084444263f},
+        {-0.0047348689f, -0.0065169880f},
+        { 0.0284660210f, -0.0284660210f},
+        {-0.0606982839f, -0.0440998847f},
+        { 0.0679608493f, -0.1333806768f},
+        {-0.2215345589f, -0.0719809416f},
+        { 0.1420835849f, -0.8970804494f},
+        { 1.1095595360f,  0.0000000000f},
+        { 0.0905183226f,  0.5715101964f},
+        { 0.0256033627f, -0.0083190368f},
+        { 0.0667555589f,  0.1310151612f},
+        { 0.0011182680f, -0.0008124692f},
+        { 0.0251126307f,  0.0251126307f},
+        { 0.0088213528f, -0.0121415505f},
+        { 0.0049297142f,  0.0025118148f},
+        { 0.0051901643f, -0.0159736834f},
+        {-0.0011144870f, -0.0001765174f},
+        {-0.0000000000f, -0.0087472824f},
+        {-0.0049435003f,  0.0007829735f},
+        {-0.0007306011f, -0.0022485590f},
+        {-0.0054614245f,  0.0027827348f},
+    },
+    {
+        {-0.0053826099f, -0.0027425768f},   /* Filter 7 */
+        {-0.0020837980f,  0.0064132707f},
+        { 0.0037729191f,  0.0005975717f},
+        {-0.0000000000f,  0.0079766726f},
+        { 0.0129897446f, -0.0020573734f},
+        { 0.0021568809f,  0.0066381970f},
+        { 0.0175076452f, -0.0089205908f},
+        {-0.0090916622f, -0.0125135995f},
+        { 0.0247376160f, -0.0247376159f},
+        {-0.0774892752f, -0.0562992540f},
+        { 0.0600222537f, -0.1178003057f},
+        {-0.2992580667f, -0.0972348401f},
+        { 0.1524445751f, -0.9624971666f},
+        { 1.0763458014f,  0.0000000000f},
+        { 0.0765237582f,  0.4831519944f},
+        { 0.0675630592f, -0.0219525687f},
+        { 0.0603186345f,  0.1183819857f},
+        { 0.0125153543f, -0.0090929371f},
+        { 0.0209691082f,  0.0209691082f},
+        { 0.0105277637f, -0.0144902237f},
+        { 0.0010806327f,  0.0005506098f},
+        { 0.0050394423f, -0.0155098087f},
+        {-0.0037772132f, -0.0005982518f},
+        {-0.0000000000f, -0.0073941285f},
+        {-0.0059141931f,  0.0009367162f},
+        {-0.0002684621f, -0.0008262413f},
+        {-0.0053826099f,  0.0027425768f},
+    },
+};
+
+/* Raised root cosine pulse shaping filter set; beta 0.5; sample rate 8000; 12 phase steps;
+   baud rate 1200; shifted to centre at 1800Hz; complex. */
+#define PULSESHAPER_2400_GAIN           2.223f
+#define PULSESHAPER_2400_COEFF_SETS     12
+static const complexf_t pulseshaper_2400[PULSESHAPER_2400_COEFF_SETS][V27TER_RX_2400_FILTER_STEPS] =
+{
+    {
+        { 0.0036326320f,  0.0018509185f},   /* Filter 0 */
+        { 0.0003793370f, -0.0011674794f},
+        { 0.0048754563f,  0.0007721964f},
+        { 0.0000000000f, -0.0062069190f},
+        {-0.0027810383f,  0.0004404732f},
+        {-0.0021925965f, -0.0067481182f},
+        {-0.0140173459f,  0.0071421944f},
+        { 0.0019772880f,  0.0027215034f},
+        {-0.0092149554f,  0.0092149553f},
+        { 0.0334995425f,  0.0243388423f},
+        { 0.0199195813f, -0.0390943796f},
+        { 0.1477459776f,  0.0480055782f},
+        { 0.0427277333f, -0.2697722907f},
+        { 1.0040582418f,  0.0000000000f},
+        { 0.1570693140f,  0.9916966187f},
+        {-0.2597668560f,  0.0844033680f},
+        { 0.0705271128f,  0.1384172525f},
+        {-0.0354969538f,  0.0257900466f},
+        { 0.0292796738f,  0.0292796738f},
+        { 0.0076599673f, -0.0105430406f},
+        { 0.0029973132f,  0.0015272073f},
+        { 0.0048614662f, -0.0149620544f},
+        {-0.0070080354f, -0.0011099638f},
+        {-0.0000000000f, -0.0028157043f},
+        {-0.0061305015f,  0.0009709761f},
+        { 0.0015253788f,  0.0046946332f},
+        {-0.0010937644f,  0.0005573008f},
+    },
+    {
+        {-0.0002819961f, -0.0001436842f},   /* Filter 1 */
+        { 0.0006588563f, -0.0020277512f},
+        { 0.0041797109f,  0.0006620012f},
+        { 0.0000000000f, -0.0065623410f},
+        {-0.0042368606f,  0.0006710528f},
+        {-0.0017245111f, -0.0053074995f},
+        {-0.0146686673f,  0.0074740593f},
+        { 0.0038644283f,  0.0053189292f},
+        {-0.0067358415f,  0.0067358415f},
+        { 0.0345347757f,  0.0250909833f},
+        { 0.0269170677f, -0.0528277198f},
+        { 0.1389398473f,  0.0451442930f},
+        { 0.0525256151f, -0.3316336818f},
+        { 1.0434222221f,  0.0000000000f},
+        { 0.1499906453f,  0.9470036639f},
+        {-0.2028542371f,  0.0659113371f},
+        { 0.0727579142f,  0.1427954467f},
+        {-0.0235379981f,  0.0171013566f},
+        { 0.0275384769f,  0.0275384769f},
+        { 0.0093041035f, -0.0128059998f},
+        { 0.0001136455f,  0.0000579053f},
+        { 0.0045116911f, -0.0138855574f},
+        {-0.0082179267f, -0.0013015917f},
+        {-0.0000000000f, -0.0013177606f},
+        {-0.0055834514f,  0.0008843318f},
+        { 0.0016945064f,  0.0052151545f},
+        {-0.0002819961f,  0.0001436842f},
+    },
+    {
+        { 0.0005112062f,  0.0002604726f},   /* Filter 2 */
+        { 0.0009277352f, -0.0028552754f},
+        { 0.0033466091f,  0.0005300508f},
+        { 0.0000000000f, -0.0067017064f},
+        {-0.0056208495f,  0.0008902551f},
+        {-0.0011771217f, -0.0036228080f},
+        {-0.0149285967f,  0.0076064999f},
+        { 0.0056743444f,  0.0078100650f},
+        {-0.0038028170f,  0.0038028170f},
+        { 0.0344837758f,  0.0250539297f},
+        { 0.0340482504f, -0.0668234539f},
+        { 0.1257304818f,  0.0408523100f},
+        { 0.0626620127f, -0.3956323778f},
+        { 1.0763765574f,  0.0000000000f},
+        { 0.1420845360f,  0.8970864542f},
+        {-0.1491315874f,  0.0484557901f},
+        { 0.0731690629f,  0.1436023716f},
+        {-0.0123276338f,  0.0089565502f},
+        { 0.0250869159f,  0.0250869159f},
+        { 0.0105070407f, -0.0144617008f},
+        {-0.0027029676f, -0.0013772308f},
+        { 0.0040530413f, -0.0124739786f},
+        {-0.0091186142f, -0.0014442466f},
+        { 0.0000000000f,  0.0001565015f},
+        {-0.0048632493f,  0.0007702630f},
+        { 0.0018111360f,  0.0055741034f},
+        { 0.0005112062f, -0.0002604726f},
+    },
+    {
+        { 0.0012626700f,  0.0006433625f},   /* Filter 3 */
+        { 0.0011774450f, -0.0036238031f},
+        { 0.0023987660f,  0.0003799272f},
+        { 0.0000000000f, -0.0066136620f},
+        {-0.0068852097f,  0.0010905101f},
+        {-0.0005635325f, -0.0017343746f},
+        {-0.0147735044f,  0.0075274764f},
+        { 0.0073440948f,  0.0101082792f},
+        {-0.0004807357f,  0.0004807357f},
+        { 0.0332365955f,  0.0241478001f},
+        { 0.0411429005f, -0.0807474888f},
+        { 0.1079056364f,  0.0350606666f},
+        { 0.0730301872f, -0.4610944549f},
+        { 1.1024802923f,  0.0000000000f},
+        { 0.1334542238f,  0.8425968074f},
+        {-0.0990668329f,  0.0321887653f},
+        { 0.0719339457f,  0.1411783175f},
+        {-0.0020666801f,  0.0015015310f},
+        { 0.0220599213f,  0.0220599213f},
+        { 0.0112587393f, -0.0154963252f},
+        {-0.0053688554f, -0.0027355684f},
+        { 0.0035031104f, -0.0107814651f},
+        {-0.0096971580f, -0.0015358789f},
+        { 0.0000000000f,  0.0015619067f},
+        {-0.0039973434f,  0.0006331170f},
+        { 0.0018730190f,  0.0057645597f},
+        { 0.0012626700f, -0.0006433625f},
+    },
+    {
+        { 0.0019511001f,  0.0009941351f},   /* Filter 4 */
+        { 0.0013998188f, -0.0043081992f},
+        { 0.0013630316f,  0.0002158830f},
+        { 0.0000000000f, -0.0062936717f},
+        {-0.0079839961f,  0.0012645408f},
+        { 0.0001005750f,  0.0003095379f},
+        {-0.0141915007f,  0.0072309308f},
+        { 0.0088117029f,  0.0121282686f},
+        { 0.0031486956f, -0.0031486956f},
+        { 0.0307069943f,  0.0223099373f},
+        { 0.0480159027f, -0.0942365150f},
+        { 0.0853178815f,  0.0277214601f},
+        { 0.0835162618f, -0.5273009241f},
+        { 1.1213819981f,  0.0000000000f},
+        { 0.1242110958f,  0.7842379942f},
+        {-0.0530547129f,  0.0172385212f},
+        { 0.0692420091f,  0.1358950944f},
+        { 0.0070828755f, -0.0051460103f},
+        { 0.0185973391f,  0.0185973390f},
+        { 0.0115630893f, -0.0159152271f},
+        {-0.0078088406f, -0.0039788030f},
+        { 0.0028814530f, -0.0088682003f},
+        {-0.0099506630f, -0.0015760302f},
+        { 0.0000000000f,  0.0028570218f},
+        {-0.0030168074f,  0.0004778154f},
+        { 0.0018796273f,  0.0057848981f},
+        { 0.0019511001f, -0.0009941351f},
+    },
+    {
+        { 0.0025576725f,  0.0013031992f},   /* Filter 5 */
+        { 0.0015873149f, -0.0048852529f},
+        { 0.0002697804f,  0.0000427290f},
+        { 0.0000000000f, -0.0057443897f},
+        {-0.0088745956f,  0.0014055979f},
+        { 0.0007973152f,  0.0024538838f},
+        {-0.0131833524f,  0.0067172536f},
+        { 0.0100180850f,  0.0137887111f},
+        { 0.0069881240f, -0.0069881240f},
+        { 0.0268364889f,  0.0194978505f},
+        { 0.0544701590f, -0.1069037062f},
+        { 0.0578903347f,  0.0188097100f},
+        { 0.0940009470f, -0.5934986215f},
+        { 1.1328263283f,  0.0000000000f},
+        { 0.1144728051f,  0.7227528464f},
+        {-0.0114127678f,  0.0037082330f},
+        { 0.0652944573f,  0.1281475878f},
+        { 0.0149986858f, -0.0108971831f},
+        { 0.0148400450f,  0.0148400450f},
+        { 0.0114369676f, -0.0157416354f},
+        {-0.0099579979f, -0.0050738534f},
+        { 0.0022089316f, -0.0067983924f},
+        {-0.0098859888f, -0.0015657868f},
+        { 0.0000000000f,  0.0040052626f},
+        {-0.0019552917f,  0.0003096878f},
+        { 0.0018321212f,  0.0056386894f},
+        { 0.0025576725f, -0.0013031992f},
+    },
+    {
+        { 0.0030665390f,  0.0015624797f},   /* Filter 6 */
+        { 0.0017332683f, -0.0053344513f},
+        {-0.0008479269f, -0.0001342984f},
+        { 0.0000000000f, -0.0049758209f},
+        {-0.0095191676f,  0.0015076880f},
+        { 0.0015070535f,  0.0046382337f},
+        {-0.0117630486f,  0.0059935726f},
+        { 0.0109089996f,  0.0150149499f},
+        { 0.0109262557f, -0.0109262557f},
+        { 0.0215979519f,  0.0156918306f},
+        { 0.0602999226f, -0.1183452615f},
+        { 0.0256212387f,  0.0083248451f},
+        { 0.1043613218f, -0.6589114533f},
+        { 1.1366584301f,  0.0000000000f},
+        { 0.1043613218f,  0.6589114533f},
+        { 0.0256212387f, -0.0083248451f},
+        { 0.0602999226f,  0.1183452615f},
+        { 0.0215979519f, -0.0156918306f},
+        { 0.0109262557f,  0.0109262557f},
+        { 0.0109089996f, -0.0150149499f},
+        {-0.0117630486f, -0.0059935726f},
+        { 0.0015070535f, -0.0046382337f},
+        {-0.0095191676f, -0.0015076880f},
+        { 0.0000000000f,  0.0049758209f},
+        {-0.0008479269f,  0.0001342984f},
+        { 0.0017332683f,  0.0053344513f},
+        { 0.0030665390f, -0.0015624797f},
+    },
+    {
+        { 0.0034652296f,  0.0017656227f},   /* Filter 7 */
+        { 0.0018321212f, -0.0056386894f},
+        {-0.0019552917f, -0.0003096878f},
+        { 0.0000000000f, -0.0040052626f},
+        {-0.0098859888f,  0.0015657868f},
+        { 0.0022089316f,  0.0067983924f},
+        {-0.0099579979f,  0.0050738534f},
+        { 0.0114369676f,  0.0157416354f},
+        { 0.0148400450f, -0.0148400450f},
+        { 0.0149986858f,  0.0108971831f},
+        { 0.0652944573f, -0.1281475878f},
+        {-0.0114127678f, -0.0037082330f},
+        { 0.1144728051f, -0.7227528464f},
+        { 1.1328263283f,  0.0000000000f},
+        { 0.0940009470f,  0.5934986215f},
+        { 0.0578903347f, -0.0188097100f},
+        { 0.0544701590f,  0.1069037062f},
+        { 0.0268364889f, -0.0194978505f},
+        { 0.0069881240f,  0.0069881240f},
+        { 0.0100180850f, -0.0137887111f},
+        {-0.0131833524f, -0.0067172536f},
+        { 0.0007973152f, -0.0024538838f},
+        {-0.0088745956f, -0.0014055979f},
+        { 0.0000000000f,  0.0057443897f},
+        { 0.0002697804f, -0.0000427290f},
+        { 0.0015873149f,  0.0048852529f},
+        { 0.0034652296f, -0.0017656227f},
+    },
+    {
+        { 0.0037449420f,  0.0019081433f},   /* Filter 8 */
+        { 0.0018796273f, -0.0057848981f},
+        {-0.0030168074f, -0.0004778154f},
+        { 0.0000000000f, -0.0028570218f},
+        {-0.0099506630f,  0.0015760302f},
+        { 0.0028814530f,  0.0088682003f},
+        {-0.0078088406f,  0.0039788030f},
+        { 0.0115630893f,  0.0159152271f},
+        { 0.0185973391f, -0.0185973390f},
+        { 0.0070828755f,  0.0051460103f},
+        { 0.0692420091f, -0.1358950944f},
+        {-0.0530547129f, -0.0172385212f},
+        { 0.1242110958f, -0.7842379942f},
+        { 1.1213819981f,  0.0000000000f},
+        { 0.0835162618f,  0.5273009241f},
+        { 0.0853178815f, -0.0277214601f},
+        { 0.0480159027f,  0.0942365150f},
+        { 0.0307069943f, -0.0223099373f},
+        { 0.0031486956f,  0.0031486956f},
+        { 0.0088117029f, -0.0121282686f},
+        {-0.0141915007f, -0.0072309308f},
+        { 0.0001005750f, -0.0003095379f},
+        {-0.0079839961f, -0.0012645408f},
+        { 0.0000000000f,  0.0062936717f},
+        { 0.0013630316f, -0.0002158830f},
+        { 0.0013998188f,  0.0043081992f},
+        { 0.0037449420f, -0.0019081433f},
+    },
+    {
+        { 0.0039007144f,  0.0019875132f},   /* Filter 9 */
+        { 0.0018730190f, -0.0057645597f},
+        {-0.0039973434f, -0.0006331170f},
+        { 0.0000000000f, -0.0015619067f},
+        {-0.0096971580f,  0.0015358789f},
+        { 0.0035031104f,  0.0107814651f},
+        {-0.0053688554f,  0.0027355684f},
+        { 0.0112587393f,  0.0154963252f},
+        { 0.0220599213f, -0.0220599213f},
+        {-0.0020666801f, -0.0015015310f},
+        { 0.0719339457f, -0.1411783175f},
+        {-0.0990668329f, -0.0321887653f},
+        { 0.1334542238f, -0.8425968074f},
+        { 1.1024802923f,  0.0000000000f},
+        { 0.0730301872f,  0.4610944549f},
+        { 0.1079056364f, -0.0350606666f},
+        { 0.0411429005f,  0.0807474888f},
+        { 0.0332365955f, -0.0241478001f},
+        {-0.0004807357f, -0.0004807357f},
+        { 0.0073440948f, -0.0101082792f},
+        {-0.0147735044f, -0.0075274764f},
+        {-0.0005635325f,  0.0017343746f},
+        {-0.0068852097f, -0.0010905101f},
+        { 0.0000000000f,  0.0066136620f},
+        { 0.0023987660f, -0.0003799272f},
+        { 0.0011774450f,  0.0036238031f},
+        { 0.0039007144f, -0.0019875132f},
+    },
+    {
+        { 0.0039314768f,  0.0020031875f},   /* Filter 10 */
+        { 0.0018111360f, -0.0055741034f},
+        {-0.0048632493f, -0.0007702630f},
+        { 0.0000000000f, -0.0001565015f},
+        {-0.0091186142f,  0.0014442466f},
+        { 0.0040530413f,  0.0124739786f},
+        {-0.0027029676f,  0.0013772308f},
+        { 0.0105070407f,  0.0144617008f},
+        { 0.0250869159f, -0.0250869159f},
+        {-0.0123276338f, -0.0089565502f},
+        { 0.0731690629f, -0.1436023716f},
+        {-0.1491315874f, -0.0484557901f},
+        { 0.1420845360f, -0.8970864542f},
+        { 1.0763765574f,  0.0000000000f},
+        { 0.0626620127f,  0.3956323778f},
+        { 0.1257304818f, -0.0408523100f},
+        { 0.0340482504f,  0.0668234539f},
+        { 0.0344837758f, -0.0250539297f},
+        {-0.0038028170f, -0.0038028170f},
+        { 0.0056743444f, -0.0078100650f},
+        {-0.0149285967f, -0.0076064999f},
+        {-0.0011771217f,  0.0036228080f},
+        {-0.0056208495f, -0.0008902551f},
+        { 0.0000000000f,  0.0067017064f},
+        { 0.0033466091f, -0.0005300508f},
+        { 0.0009277352f,  0.0028552754f},
+        { 0.0039314768f, -0.0020031875f},
+    },
+    {
+        { 0.0038399827f,  0.0019565689f},   /* Filter 11 */
+        { 0.0016945064f, -0.0052151545f},
+        {-0.0055834514f, -0.0008843318f},
+        {-0.0000000000f,  0.0013177606f},
+        {-0.0082179267f,  0.0013015917f},
+        { 0.0045116911f,  0.0138855574f},
+        { 0.0001136455f, -0.0000579053f},
+        { 0.0093041035f,  0.0128059998f},
+        { 0.0275384769f, -0.0275384769f},
+        {-0.0235379981f, -0.0171013566f},
+        { 0.0727579142f, -0.1427954467f},
+        {-0.2028542371f, -0.0659113371f},
+        { 0.1499906453f, -0.9470036639f},
+        { 1.0434222221f,  0.0000000000f},
+        { 0.0525256151f,  0.3316336818f},
+        { 0.1389398473f, -0.0451442930f},
+        { 0.0269170677f,  0.0528277198f},
+        { 0.0345347757f, -0.0250909833f},
+        {-0.0067358415f, -0.0067358415f},
+        { 0.0038644283f, -0.0053189292f},
+        {-0.0146686673f, -0.0074740593f},
+        {-0.0017245111f,  0.0053074995f},
+        {-0.0042368606f, -0.0006710528f},
+        { 0.0000000000f,  0.0065623410f},
+        { 0.0041797109f, -0.0006620012f},
+        { 0.0006588563f,  0.0020277512f},
+        { 0.0038399827f, -0.0019565689f},
+    },
+};
+
+float v27ter_rx_carrier_frequency(v27ter_rx_state_t *s)
+{
+    return dds_frequencyf(s->carrier_phase_rate);
+}
+/*- End of function --------------------------------------------------------*/
+
+float v27ter_rx_symbol_timing_correction(v27ter_rx_state_t *s)
+{
+    int steps_per_symbol;
+    
+    steps_per_symbol = (s->bit_rate == 4800)  ?  PULSESHAPER_4800_COEFF_SETS*5  :  PULSESHAPER_2400_COEFF_SETS*20/3;
+    return (float) s->total_baud_timing_correction/(float) steps_per_symbol;
+}
+/*- End of function --------------------------------------------------------*/
+
+float v27ter_rx_signal_power(v27ter_rx_state_t *s)
+{
+    return power_meter_dbm0(&s->power);
+}
+/*- End of function --------------------------------------------------------*/
+
+void v27ter_rx_signal_cutoff(v27ter_rx_state_t *s, float cutoff)
+{
+    /* The 0.4 factor allows for the gain of the DC blocker */
+    s->carrier_on_power = (int32_t) (power_meter_level_dbm0(cutoff + 2.5f)*0.4f);
+    s->carrier_off_power = (int32_t) (power_meter_level_dbm0(cutoff - 2.5f)*0.4f);
+}
+/*- End of function --------------------------------------------------------*/
+
+int v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexf_t **coeffs)
+{
+    *coeffs = s->eq_coeff;
+    return V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_save(v27ter_rx_state_t *s)
+{
+    cvec_copyf(s->eq_coeff_save, s->eq_coeff, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_restore(v27ter_rx_state_t *s)
+{
+    cvec_copyf(s->eq_coeff, s->eq_coeff_save, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+    cvec_zerof(s->eq_buf, V27TER_EQUALIZER_MASK);
+
+    s->eq_put_step = (s->bit_rate == 4800)  ?  PULSESHAPER_4800_COEFF_SETS*5/2  :  PULSESHAPER_2400_COEFF_SETS*20/(3*2);
+    s->eq_step = 0;
+    s->eq_delta = EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_reset(v27ter_rx_state_t *s)
+{
+    /* Start with an equalizer based on everything being perfect */
+    cvec_zerof(s->eq_coeff, V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+    s->eq_coeff[V27TER_EQUALIZER_PRE_LEN] = complex_setf(1.414f, 0.0f);
+    cvec_zerof(s->eq_buf, V27TER_EQUALIZER_MASK);
+
+    s->eq_put_step = (s->bit_rate == 4800)  ?  PULSESHAPER_4800_COEFF_SETS*5/2  :  PULSESHAPER_2400_COEFF_SETS*20/(3*2);
+    s->eq_step = 0;
+    s->eq_delta = EQUALIZER_DELTA/(V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complexf_t equalizer_get(v27ter_rx_state_t *s)
+{
+    int i;
+    int p;
+    complexf_t z;
+    complexf_t z1;
+
+    /* Get the next equalized value. */
+    z = complex_setf(0.0, 0.0);
+    p = s->eq_step - 1;
+    for (i = 0;  i < V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN;  i++)
+    {
+        p = (p - 1) & V27TER_EQUALIZER_MASK;
+        z1 = complex_mulf(&s->eq_coeff[i], &s->eq_buf[p]);
+        z = complex_addf(&z, &z1);
+    }
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void tune_equalizer(v27ter_rx_state_t *s, const complexf_t *z, const complexf_t *target)
+{
+    int i;
+    int p;
+    complexf_t ez;
+    complexf_t z1;
+
+    /* Find the x and y mismatch from the exact constellation position. */
+    ez = complex_subf(target, z);
+    ez.re *= s->eq_delta;
+    ez.im *= s->eq_delta;
+
+    p = s->eq_step - 1;
+    for (i = 0;  i < V27TER_EQUALIZER_PRE_LEN + 1 + V27TER_EQUALIZER_POST_LEN;  i++)
+    {
+        p = (p - 1) & V27TER_EQUALIZER_MASK;
+        z1 = complex_conjf(&s->eq_buf[p]);
+        z1 = complex_mulf(&ez, &z1);
+        s->eq_coeff[i] = complex_addf(&s->eq_coeff[i], &z1);
+        /* Leak a little to tame uncontrolled wandering */
+        s->eq_coeff[i].re *= 0.9999f;
+        s->eq_coeff[i].im *= 0.9999f;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void track_carrier(v27ter_rx_state_t *s, const complexf_t *z, const complexf_t *target)
+{
+    float error;
+
+    /* For small errors the imaginary part of the difference between the actual and the target
+       positions is proportional to the phase error, for any particular target. However, the
+       different amplitudes of the various target positions scale things. */
+    error = z->im*target->re - z->re*target->im;
+    
+    s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
+    s->carrier_phase += (int32_t) (s->carrier_track_p*error);
+    //span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f   f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int descramble(v27ter_rx_state_t *s, int in_bit)
+{
+    int out_bit;
+
+    out_bit = (in_bit ^ (s->scramble_reg >> 5) ^ (s->scramble_reg >> 6)) & 1;
+    if (s->scrambler_pattern_count >= 33)
+    {
+        out_bit ^= 1;
+        s->scrambler_pattern_count = 0;
+    }
+    else
+    {
+        if (s->in_training > TRAINING_STAGE_NORMAL_OPERATION  &&  s->in_training < TRAINING_STAGE_TEST_ONES)
+        {
+            s->scrambler_pattern_count = 0;
+        }
+        else
+        {
+            if ((((s->scramble_reg >> 7) ^ in_bit) & ((s->scramble_reg >> 8) ^ in_bit) & ((s->scramble_reg >> 11) ^ in_bit) & 1))
+                s->scrambler_pattern_count = 0;
+            else
+                s->scrambler_pattern_count++;
+        }
+    }
+    s->scramble_reg <<= 1;
+    if (s->in_training > TRAINING_STAGE_NORMAL_OPERATION  &&  s->in_training < TRAINING_STAGE_TEST_ONES)
+        s->scramble_reg |= out_bit;
+    else
+        s->scramble_reg |= in_bit;
+    return out_bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void put_bit(v27ter_rx_state_t *s, int bit)
+{
+    int out_bit;
+
+    bit &= 1;
+
+    out_bit = descramble(s, bit);
+
+    /* We need to strip the last part of the training before we let data
+       go to the application. */
+    if (s->in_training == TRAINING_STAGE_NORMAL_OPERATION)
+    {
+        s->put_bit(s->user_data, out_bit);
+    }
+    else
+    {
+        //span_log(&s->logging, SPAN_LOG_FLOW, "Test bit %d\n", out_bit);
+        /* The bits during the final stage of training should be all ones. However,
+           buggy modems mean you cannot rely on this. Therefore we don't bother
+           testing for ones, but just rely on a constellation mismatch measurement. */
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int find_quadrant(const complexf_t *z)
+{
+    int b1;
+    int b2;
+
+    /* Split the space along the two diagonals. */
+    b1 = (z->im > z->re);
+    b2 = (z->im < -z->re);
+    return (b2 << 1) | (b1 ^ b2);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int find_octant(complexf_t *z)
+{
+    float abs_re;
+    float abs_im;
+    int b1;
+    int b2;
+    int bits;
+
+    /* Are we near an axis or a diagonal? */
+    abs_re = fabsf(z->re);
+    abs_im = fabsf(z->im);
+    if (abs_im > abs_re*0.4142136  &&  abs_im < abs_re*2.4142136)
+    {
+        /* Split the space along the two axes. */
+        b1 = (z->re < 0.0);
+        b2 = (z->im < 0.0);
+        bits = (b2 << 2) | ((b1 ^ b2) << 1) | 1;
+    }
+    else
+    {
+        /* Split the space along the two diagonals. */
+        b1 = (z->im > z->re);
+        b2 = (z->im < -z->re);
+        bits = (b2 << 2) | ((b1 ^ b2) << 1);
+    }
+    return bits;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void decode_baud(v27ter_rx_state_t *s, complexf_t *z)
+{
+    static const uint8_t phase_steps_4800[8] =
+    {
+        4, 0, 2, 6, 7, 3, 1, 5
+    };
+    static const uint8_t phase_steps_2400[4] =
+    {
+        0, 2, 3, 1
+    };
+    int nearest;
+    int raw_bits;
+
+    switch (s->bit_rate)
+    {
+    case 4800:
+    default:
+        nearest = find_octant(z);
+        raw_bits = phase_steps_4800[(nearest - s->constellation_state) & 7];
+        put_bit(s, raw_bits);
+        put_bit(s, raw_bits >> 1);
+        put_bit(s, raw_bits >> 2);
+        s->constellation_state = nearest;
+        break;
+    case 2400:
+        nearest = find_quadrant(z);
+        raw_bits = phase_steps_2400[(nearest - s->constellation_state) & 3];
+        put_bit(s, raw_bits);
+        put_bit(s, raw_bits >> 1);
+        s->constellation_state = nearest;
+        nearest <<= 1;
+        break;
+    }
+    track_carrier(s, z, &v27ter_constellation[nearest]);
+    if (--s->eq_skip <= 0)
+    {
+        /* Once we are in the data the equalization should not need updating.
+           However, the line characteristics may slowly drift. We, therefore,
+           tune up on the occassional sample, keeping the compute down. */
+        s->eq_skip = 100;
+        tune_equalizer(s, z, &v27ter_constellation[nearest]);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void process_half_baud(v27ter_rx_state_t *s, const complexf_t *sample)
+{
+    static const int abab_pos[2] =
+    {
+        0, 4
+    };
+    complexf_t z;
+    complexf_t zz;
+    float p;
+    float q;
+    int i;
+    int j;
+    int32_t angle;
+    int32_t ang;
+
+    /* Add a sample to the equalizer's circular buffer, but don't calculate anything
+       at this time. */
+    s->eq_buf[s->eq_step] = *sample;
+    s->eq_step = (s->eq_step + 1) & V27TER_EQUALIZER_MASK;
+        
+    /* On alternate insertions we have a whole baud, and must process it. */
+    if ((s->baud_phase ^= 1))
+    {
+        //span_log(&s->logging, SPAN_LOG_FLOW, "Samp, %f, %f, %f, -1, 0x%X\n", z.re, z.im, sqrt(z.re*z.re + z.im*z.im), s->eq_put_step);
+        return;
+    }
+    //span_log(&s->logging, SPAN_LOG_FLOW, "Samp, %f, %f, %f, 1, 0x%X\n", z.re, z.im, sqrt(z.re*z.re + z.im*z.im), s->eq_put_step);
+
+    /* Perform a Gardner test for baud alignment */
+    p = s->eq_buf[(s->eq_step - 3) & V27TER_EQUALIZER_MASK].re
+      - s->eq_buf[(s->eq_step - 1) & V27TER_EQUALIZER_MASK].re;
+    p *= s->eq_buf[(s->eq_step - 2) & V27TER_EQUALIZER_MASK].re;
+
+    q = s->eq_buf[(s->eq_step - 3) & V27TER_EQUALIZER_MASK].im
+      - s->eq_buf[(s->eq_step - 1) & V27TER_EQUALIZER_MASK].im;
+    q *= s->eq_buf[(s->eq_step - 2) & V27TER_EQUALIZER_MASK].im;
+
+    s->gardner_integrate += (p + q > 0.0)  ?  s->gardner_step  :  -s->gardner_step;
+
+    if (abs(s->gardner_integrate) >= 256)
+    {
+        /* This integrate and dump approach avoids rapid changes of the equalizer put step.
+           Rapid changes, without hysteresis, are bad. They degrade the equalizer performance
+           when the true symbol boundary is close to a sample boundary. */
+        //span_log(&s->logging, SPAN_LOG_FLOW, "Hop %d\n", s->gardner_integrate);
+        s->eq_put_step += (s->gardner_integrate/256);
+        s->total_baud_timing_correction += (s->gardner_integrate/256);
+        if (s->qam_report)
+            s->qam_report(s->qam_user_data, NULL, NULL, s->gardner_integrate);
+        s->gardner_integrate = 0;
+    }
+    //span_log(&s->logging, SPAN_LOG_FLOW, "Gardner=%10.5f 0x%X\n", p, s->eq_put_step);
+
+    z = equalizer_get(s);
+
+    //span_log(&s->logging, SPAN_LOG_FLOW, "Equalized symbol - %15.5f %15.5f\n", z.re, z.im);
+    switch (s->in_training)
+    {
+    case TRAINING_STAGE_NORMAL_OPERATION:
+        decode_baud(s, &z);
+        break;
+    case TRAINING_STAGE_SYMBOL_ACQUISITION:
+        /* Allow time for the Gardner algorithm to settle the baud timing */
+        /* Don't start narrowing the bandwidth of the Gardner algorithm too early.
+           Some modems are a bit wobbly when they start sending the signal. Also, we start
+           this analysis before our filter buffers have completely filled. */
+        if (++s->training_count >= 30)
+        {
+            s->gardner_step = 32;
+            s->in_training = TRAINING_STAGE_LOG_PHASE;
+            s->angles[0] =
+            s->start_angles[0] = arctan2(z.im, z.re);
+        }
+        break;
+    case TRAINING_STAGE_LOG_PHASE:
+        /* Record the current alternate phase angle */
+        angle = arctan2(z.im, z.re);
+        s->angles[1] =
+        s->start_angles[1] = angle;
+        s->training_count = 1;
+        s->in_training = TRAINING_STAGE_WAIT_FOR_HOP;
+        break;
+    case TRAINING_STAGE_WAIT_FOR_HOP:
+        angle = arctan2(z.im, z.re);
+        /* Look for the initial ABAB sequence to display a phase reversal, which will
+           signal the start of the scrambled ABAB segment */
+        ang = angle - s->angles[(s->training_count - 1) & 0xF];
+        s->angles[(s->training_count + 1) & 0xF] = angle;
+        if ((ang > 0x20000000  ||  ang < -0x20000000)  &&  s->training_count >= 3)
+        {
+            /* We seem to have a phase reversal */
+            /* Slam the carrier frequency into line, based on the total phase drift over the last
+               section. Use the shift from the odd bits and the shift from the even bits to get
+               better jitter suppression. We need to scale here, or at the maximum specified
+               frequency deviation we could overflow, and get a silly answer. */
+            /* Step back a few symbols so we don't get ISI distorting things. */
+            i = (s->training_count - 8) & ~1;
+            /* Avoid the possibility of a divide by zero */
+            if (i)
+            {
+                j = i & 0xF;
+                ang = (s->angles[j] - s->start_angles[0])/i
+                    + (s->angles[j | 0x1] - s->start_angles[1])/i;
+                if (s->bit_rate == 4800)
+                    s->carrier_phase_rate += ang/10;
+                else
+                    s->carrier_phase_rate += 3*(ang/40);
+            }
+            span_log(&s->logging, SPAN_LOG_FLOW, "Coarse carrier frequency %7.2f (%d)\n", dds_frequencyf(s->carrier_phase_rate), s->training_count);
+            /* Check if the carrier frequency is plausible */
+            if (s->carrier_phase_rate < dds_phase_ratef(CARRIER_NOMINAL_FREQ - 20.0f)
+                ||
+                s->carrier_phase_rate > dds_phase_ratef(CARRIER_NOMINAL_FREQ + 20.0f))
+            {
+               span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
+               /* Park this modem */
+               s->in_training = TRAINING_STAGE_PARKED;
+               s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+               break;
+            }
+
+            /* Make a step shift in the phase, to pull it into line. We need to rotate the equalizer
+               buffer, as well as the carrier phase, for this to play out nicely. */
+            angle += 0x80000000;
+            p = angle*2.0f*3.14159f/(65536.0f*65536.0f);
+            zz = complex_setf(cosf(p), -sinf(p));
+            for (i = 0;  i <= V27TER_EQUALIZER_MASK;  i++)
+                s->eq_buf[i] = complex_mulf(&s->eq_buf[i], &zz);
+            s->carrier_phase += angle;
+
+            s->gardner_step = 1;
+            /* We have just seen the first element of the scrambled sequence so skip it. */
+            s->training_bc = 1;
+            s->training_bc ^= descramble(s, 1);
+            descramble(s, 1);
+            descramble(s, 1);
+            s->training_count = 1;
+            s->in_training = TRAINING_STAGE_TRAIN_ON_ABAB;
+        }
+        else if (++s->training_count > V27TER_TRAINING_SEG_3_LEN)
+        {
+            /* This is bogus. There are not this many bits in this section
+               of a real training sequence. */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
+            /* Park this modem */
+            s->in_training = TRAINING_STAGE_PARKED;
+            s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+        }
+        break;
+    case TRAINING_STAGE_TRAIN_ON_ABAB:
+        /* Train on the scrambled ABAB section */
+        s->training_bc ^= descramble(s, 1);
+        descramble(s, 1);
+        descramble(s, 1);
+        s->constellation_state = abab_pos[s->training_bc];
+        track_carrier(s, &z, &v27ter_constellation[s->constellation_state]);
+        tune_equalizer(s, &z, &v27ter_constellation[s->constellation_state]);
+
+        if (++s->training_count >= V27TER_TRAINING_SEG_5_LEN)
+        {
+            s->constellation_state = (s->bit_rate == 4800)  ?  4  :  2;
+            s->training_count = 0;
+            s->in_training = TRAINING_STAGE_TEST_ONES;
+            s->carrier_track_i = 400.0;
+            s->carrier_track_p = 1000000.0;
+        }
+        break;
+    case TRAINING_STAGE_TEST_ONES:
+        decode_baud(s, &z);
+        /* Measure the training error */
+        if (s->bit_rate == 4800)
+            zz = complex_subf(&z, &v27ter_constellation[s->constellation_state]);
+        else
+            zz = complex_subf(&z, &v27ter_constellation[s->constellation_state << 1]);
+        s->training_error += powerf(&zz);
+        if (++s->training_count >= V27TER_TRAINING_SEG_6_LEN)
+        {
+            if ((s->bit_rate == 4800  &&  s->training_error < 1.0f)
+                ||
+                (s->bit_rate == 2400  &&  s->training_error < 1.0f))
+            {
+                /* We are up and running */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Training succeeded (constellation mismatch %f)\n", s->training_error);
+                s->put_bit(s->user_data, PUTBIT_TRAINING_SUCCEEDED);
+                /* Apply some lag to the carrier off condition, to ensure the last few bits get pushed through
+                   the processing. */
+                s->carrier_present = (s->bit_rate == 4800)  ?  90  :  120;
+                s->in_training = TRAINING_STAGE_NORMAL_OPERATION;
+                equalizer_save(s);
+                s->carrier_phase_rate_save = s->carrier_phase_rate;
+                s->agc_scaling_save = s->agc_scaling;
+            }
+            else
+            {
+                /* Training has failed */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (constellation mismatch %f)\n", s->training_error);
+                /* Park this modem */
+                s->in_training = TRAINING_STAGE_PARKED;
+                s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+            }
+        }
+        break;
+    case TRAINING_STAGE_PARKED:
+        /* We failed to train! */
+        /* Park here until the carrier drops. */
+        break;
+    }
+    if (s->qam_report)
+    {
+        s->qam_report(s->qam_user_data,
+                      &z,
+                      &v27ter_constellation[s->constellation_state],
+                      s->constellation_state);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len)
+{
+    int i;
+    int j;
+    int step;
+    complexf_t z;
+    complexf_t zz;
+    complexf_t samplex;
+    int32_t power;
+
+    if (s->bit_rate == 4800)
+    {
+        for (i = 0;  i < len;  i++)
+        {
+            s->rrc_filter[s->rrc_filter_step] =
+            s->rrc_filter[s->rrc_filter_step + V27TER_RX_4800_FILTER_STEPS] = amp[i];
+            if (++s->rrc_filter_step >= V27TER_RX_4800_FILTER_STEPS)
+                s->rrc_filter_step = 0;
+
+            /* There should be no DC in the signal, but sometimes there is.
+               We need to measure the power with the DC blocked, but not using
+               a slow to respond DC blocker. Use the most elementary HPF. */
+            power = power_meter_update(&(s->power), (amp[i] - s->last_sample) >> 1);
+            s->last_sample = amp[i];
+            //span_log(&s->logging, SPAN_LOG_FLOW, "Power = %f\n", power_meter_dbm0(&(s->power)));
+            if (s->carrier_present)
+            {
+                /* Look for power below turnoff threshold to turn the carrier off */
+                if (power < s->carrier_off_power)
+                {
+                    if (--s->carrier_present <= 0)
+                    {
+                        /* Count down a short delay, to ensure we push the last
+                           few bits through the filters before stopping. */
+                        v27ter_rx_restart(s, s->bit_rate, FALSE);
+                        s->put_bit(s->user_data, PUTBIT_CARRIER_DOWN);
+                        continue;
+                    }
+                }
+            }
+            else
+            {
+                /* Look for power exceeding turnon threshold to turn the carrier on */
+                if (power < s->carrier_on_power)
+                    continue;
+                s->carrier_present = 1;
+                s->put_bit(s->user_data, PUTBIT_CARRIER_UP);
+            }
+            if (s->in_training != TRAINING_STAGE_PARKED)
+            {
+                /* Only spend effort processing this data if the modem is not
+                   parked, after training failure. */
+                z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
+        
+                /* Put things into the equalization buffer at T/2 rate. The Gardner algorithm
+                   will fiddle the step to align this with the symbols. */
+                if ((s->eq_put_step -= PULSESHAPER_4800_COEFF_SETS) <= 0)
+                {
+                    if (s->in_training == TRAINING_STAGE_SYMBOL_ACQUISITION)
+                    {
+                        /* Only AGC during the initial training */
+                        s->agc_scaling = (1.0f/PULSESHAPER_4800_GAIN)*1.414f/sqrtf(power);
+                    }
+                    /* Pulse shape while still at the carrier frequency, using a quadrature
+                       pair of filters. This results in a properly bandpass filtered complex
+                       signal, which can be brought directly to bandband by complex mixing.
+                       No further filtering, to remove mixer harmonics, is needed. */
+                    step = -s->eq_put_step;
+                    if (step > PULSESHAPER_4800_COEFF_SETS - 1)
+                        step = PULSESHAPER_4800_COEFF_SETS - 1;
+                    s->eq_put_step += PULSESHAPER_4800_COEFF_SETS*5/2;
+                    zz.re = pulseshaper_4800[step][0].re*s->rrc_filter[s->rrc_filter_step];
+                    zz.im = pulseshaper_4800[step][0].im*s->rrc_filter[s->rrc_filter_step];
+                    for (j = 1;  j < V27TER_RX_4800_FILTER_STEPS;  j++)
+                    {
+                        zz.re += pulseshaper_4800[step][j].re*s->rrc_filter[j + s->rrc_filter_step];
+                        zz.im += pulseshaper_4800[step][j].im*s->rrc_filter[j + s->rrc_filter_step];
+                    }
+                    samplex.re = zz.re*s->agc_scaling;
+                    samplex.im = zz.im*s->agc_scaling;
+                    /* Shift to baseband - since this is done in a full complex form, the
+                       result is clean, and requires no further filtering, apart from the
+                       equalizer. */
+                    zz.re = samplex.re*z.re - samplex.im*z.im;
+                    zz.im = -samplex.re*z.im - samplex.im*z.re;
+                    process_half_baud(s, &zz);
+                }
+            }
+        }
+    }
+    else
+    {
+        for (i = 0;  i < len;  i++)
+        {
+            s->rrc_filter[s->rrc_filter_step] =
+            s->rrc_filter[s->rrc_filter_step + V27TER_RX_2400_FILTER_STEPS] = amp[i];
+            if (++s->rrc_filter_step >= V27TER_RX_2400_FILTER_STEPS)
+                s->rrc_filter_step = 0;
+
+            /* There should be no DC in the signal, but sometimes there is.
+               We need to measure the power with the DC blocked, but not using
+               a slow to respond DC blocker. Use the most elementary HPF. */
+            power = power_meter_update(&(s->power), (amp[i] - s->last_sample) >> 1);
+            s->last_sample = amp[i];
+            //span_log(&s->logging, SPAN_LOG_FLOW, "Power = %f\n", power_meter_dbm0(&(s->power)));
+            if (s->carrier_present)
+            {
+                /* Look for power below turnoff threshold to turn the carrier off */
+                if (power < s->carrier_off_power)
+                {
+                    if (--s->carrier_present <= 0)
+                    {
+                        /* Count down a short delay, to ensure we push the last
+                           few bits through the filters before stopping. */
+                        v27ter_rx_restart(s, s->bit_rate, FALSE);
+                        s->put_bit(s->user_data, PUTBIT_CARRIER_DOWN);
+                        continue;
+                    }
+                }
+            }
+            else
+            {
+                /* Look for power exceeding turnon threshold to turn the carrier on */
+                if (power < s->carrier_on_power)
+                    continue;
+                s->carrier_present = 1;
+                s->put_bit(s->user_data, PUTBIT_CARRIER_UP);
+            }
+            if (s->in_training != TRAINING_STAGE_PARKED)
+            {
+                /* Only spend effort processing this data if the modem is not
+                   parked, after training failure. */
+                z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
+        
+                /* Put things into the equalization buffer at T/2 rate. The Gardner algorithm
+                   will fiddle the step to align this with the symbols. */
+                if ((s->eq_put_step -= PULSESHAPER_2400_COEFF_SETS) <= 0)
+                {
+                    if (s->in_training == TRAINING_STAGE_SYMBOL_ACQUISITION)
+                    {
+                        /* Only AGC during the initial training */
+                        s->agc_scaling = (1.0f/PULSESHAPER_2400_GAIN)*1.414f/sqrtf(power);
+                    }
+                    /* Pulse shape while still at the carrier frequency, using a quadrature
+                       pair of filters. This results in a properly bandpass filtered complex
+                       signal, which can be brought directly to bandband by complex mixing.
+                       No further filtering, to remove mixer harmonics, is needed. */
+                    step = -s->eq_put_step;
+                    if (step > PULSESHAPER_2400_COEFF_SETS - 1)
+                        step = PULSESHAPER_2400_COEFF_SETS - 1;
+                    s->eq_put_step += PULSESHAPER_2400_COEFF_SETS*20/(3*2);
+                    zz.re = pulseshaper_2400[step][0].re*s->rrc_filter[s->rrc_filter_step];
+                    zz.im = pulseshaper_2400[step][0].im*s->rrc_filter[s->rrc_filter_step];
+                    for (j = 1;  j < V27TER_RX_2400_FILTER_STEPS;  j++)
+                    {
+                        zz.re += pulseshaper_2400[step][j].re*s->rrc_filter[j + s->rrc_filter_step];
+                        zz.im += pulseshaper_2400[step][j].im*s->rrc_filter[j + s->rrc_filter_step];
+                    }
+                    samplex.re = zz.re*s->agc_scaling;
+                    samplex.im = zz.im*s->agc_scaling;
+                    /* Shift to baseband - since this is done in a full complex form, the
+                       result is clean, and requires no further filtering apart from the
+                       equalizer. */
+                    zz.re = samplex.re*z.re - samplex.im*z.im;
+                    zz.im = -samplex.re*z.im - samplex.im*z.re;
+                    process_half_baud(s, &zz);
+                }
+            }
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v27ter_rx_set_put_bit(v27ter_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
+{
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v27ter_rx_restart(v27ter_rx_state_t *s, int rate, int old_train)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "Restarting V.27ter\n");
+    if (rate != 4800  &&  rate != 2400)
+        return -1;
+    s->bit_rate = rate;
+
+    vec_zerof(s->rrc_filter, sizeof(s->rrc_filter)/sizeof(s->rrc_filter[0]));
+    s->rrc_filter_step = 0;
+
+    s->scramble_reg = 0x3C;
+    s->scrambler_pattern_count = 0;
+    s->in_training = TRAINING_STAGE_SYMBOL_ACQUISITION;
+    s->training_bc = 0;
+    s->training_count = 0;
+    s->training_error = 0.0f;
+    s->carrier_present = 0;
+
+    s->carrier_phase = 0;
+    //s->carrier_track_i = 100000.0f;
+    //s->carrier_track_p = 20000000.0f;
+    s->carrier_track_i = 200000.0f;
+    s->carrier_track_p = 10000000.0f;
+    power_meter_init(&(s->power), 4);
+
+    s->constellation_state = 0;
+
+    if (s->old_train)
+    {
+        s->carrier_phase_rate = s->carrier_phase_rate_save;
+        s->agc_scaling = s->agc_scaling_save;
+        equalizer_restore(s);
+    }
+    else
+    {
+        s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
+        s->agc_scaling = 0.0005f;
+        equalizer_reset(s);
+    }
+    s->eq_skip = 0;
+    s->last_sample = 0;
+
+    s->gardner_integrate = 0;
+    s->total_baud_timing_correction = 0;
+    s->gardner_step = 512;
+    s->baud_phase = 0;
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+v27ter_rx_state_t *v27ter_rx_init(v27ter_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data)
+{
+    if (s == NULL)
+    {
+        if ((s = (v27ter_rx_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    v27ter_rx_signal_cutoff(s, -45.5f);
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "V.27ter");
+
+    v27ter_rx_restart(s, rate, FALSE);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v27ter_rx_release(v27ter_rx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v27ter_rx_set_qam_report_handler(v27ter_rx_state_t *s, qam_report_handler_t *handler, void *user_data)
+{
+    s->qam_report = handler;
+    s->qam_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v27ter_tx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,624 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v27ter_tx.c - ITU V.27ter modem transmit part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v27ter_tx.c,v 1.48 2006/11/28 16:59:57 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/complex.h"
+#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
+#include "spandsp/async.h"
+#include "spandsp/dds.h"
+#include "spandsp/power_meter.h"
+
+#include "spandsp/v27ter_tx.h"
+
+#define CARRIER_NOMINAL_FREQ            1800.0f
+
+/* Segments of the training sequence */
+/* V.27ter defines a long and a short sequence. FAX doesn't use the
+   short sequence, so it is not implemented here. */
+#define V27TER_TRAINING_SEG_1           0
+#define V27TER_TRAINING_SEG_2           (V27TER_TRAINING_SEG_1 + 320)
+#define V27TER_TRAINING_SEG_3           (V27TER_TRAINING_SEG_2 + 32)
+#define V27TER_TRAINING_SEG_4           (V27TER_TRAINING_SEG_3 + 50)
+#define V27TER_TRAINING_SEG_5           (V27TER_TRAINING_SEG_4 + 1074)
+#define V27TER_TRAINING_END             (V27TER_TRAINING_SEG_5 + 8)
+#define V27TER_TRAINING_SHUTDOWN_END    (V27TER_TRAINING_END + 32)
+
+/* Raised root cosine pulse shaping; Beta = 0.5; 4 symbols either
+   side of the centre. */
+/* Created with mkshape -r 0.025 0.5 181 -l and then split up */
+#define PULSESHAPER_2400_GAIN           (19.972065748f/20.0f)
+#define PULSESHAPER_2400_COEFF_SETS     20
+static const float pulseshaper_2400[PULSESHAPER_2400_COEFF_SETS][V27TER_TX_FILTER_STEPS] =
+{
+    {
+         0.0050051219f,         /* Filter 0 */
+         0.0107180844f,
+        -0.0150077814f,
+        -0.0750272071f,
+         0.5786341413f,
+         0.5786341413f,
+        -0.0750272071f,
+        -0.0150077814f,
+         0.0107180844f
+    },
+    {
+         0.0036624469f,         /* Filter 1 */
+         0.0131516633f,
+        -0.0107913392f,
+        -0.0957820135f,
+         0.6671466059f,
+         0.4891745311f,
+        -0.0541239470f,
+        -0.0179109014f,
+         0.0079099936f
+    },
+    {
+         0.0020204744f,         /* Filter 2 */
+         0.0150588729f,
+        -0.0053908083f,
+        -0.1154114754f,
+         0.7528295479f,
+         0.4006032722f,
+        -0.0339459430f,
+        -0.0194500407f,
+         0.0048904515f
+    },
+    {
+         0.0001596234f,         /* Filter 3 */
+         0.0163079778f,
+         0.0009858079f,
+        -0.1328632049f,
+         0.8338068363f,
+         0.3146585634f,
+        -0.0152415667f,
+        -0.0196492903f,
+         0.0018247182f
+    },
+    {
+        -0.0018233575f,         /* Filter 4 */
+         0.0167957238f,
+         0.0080554403f,
+        -0.1470417557f,
+         0.9082626683f,
+         0.2329352195f,
+         0.0013822552f,
+        -0.0186004475f,
+        -0.0011283792f
+    },
+    {
+        -0.0038199491f,         /* Filter 5 */
+         0.0164546659f,
+         0.0154676597f,
+        -0.1568448230f,
+         0.9744947974f,
+         0.1568443643f,
+         0.0154698286f,
+        -0.0164532877f,
+        -0.0038242967f
+    },
+    {
+        -0.0057152767f,          /* Filter 6 */
+         0.0152590213f,
+         0.0228163087f,
+        -0.1612020164f,
+         1.0309651039f,
+         0.0875801110f,
+         0.0267201501f,
+        -0.0134037738f,
+        -0.0061394831f
+    },
+    {
+        -0.0073941287f,         /* Filter 7 */
+         0.0132286539f,
+         0.0296547979f,
+        -0.1591148676f,
+         1.0763457753f,
+         0.0260941722f,
+         0.0349842710f,
+        -0.0096808822f,
+        -0.0079766730f
+    },
+    {
+        -0.0087472825f,         /* Filter 8 */
+         0.0104308721f,
+         0.0355146231f,
+        -0.1496966290f,
+         1.1095595051f,
+        -0.0269209682f,
+         0.0402570324f,
+        -0.0055327477f,
+        -0.0092685626f
+    },
+    {
+        -0.0096778115f,         /* Filter 9 */
+         0.0069798134f,
+         0.0399264862f,
+        -0.1322103702f,
+         1.1298123136f,
+        -0.0710400038f,
+         0.0426638320f,
+        -0.0012128224f,
+        -0.0099797659f
+    },
+    {
+        -0.0101070340f,         /* Filter 10 */
+         0.0030333009f,
+         0.0424432507f,
+        -0.1061038872f,
+         1.1366178484f,
+        -0.1061038872f,
+         0.0424432507f,
+         0.0030333009f,
+        -0.0101070340f
+    },
+    {
+        -0.0099797659f,         /* Filter 11 */
+        -0.0012128224f,
+         0.0426638320f,
+        -0.0710400038f,
+         1.1298123136f,
+        -0.1322103702f,
+         0.0399264862f,
+         0.0069798134f,
+        -0.0096778115f
+    },
+    {
+        -0.0092685626f,         /* Filter 12 */
+        -0.0055327477f,
+         0.0402570324f,
+        -0.0269209682f,
+         1.1095595051f,
+        -0.1496966290f,
+         0.0355146231f,
+         0.0104308721f,
+        -0.0087472825f
+    },
+    {
+        -0.0079766730f,         /* Filter 13 */
+        -0.0096808822f,
+         0.0349842710f,
+         0.0260941722f,
+         1.0763457753f,
+        -0.1591148676f,
+         0.0296547979f,
+         0.0132286539f,
+        -0.0073941287f
+    },
+    {
+        -0.0061394831f,         /* Filter 14 */
+        -0.0134037738f,
+         0.0267201501f,
+         0.0875801110f,
+         1.0309651039f,
+        -0.1612020164f,
+         0.0228163087f,
+         0.0152590213f,
+        -0.0057152767f
+    },
+    {
+        -0.0038242967f,         /* Filter 15 */
+        -0.0164532877f,
+         0.0154698286f,
+         0.1568443643f,
+         0.9744947974f,
+        -0.1568448230f,
+         0.0154676597f,
+         0.0164546659f,
+        -0.0038199491f
+    },
+    {
+        -0.0011283792f,         /* Filter 16 */
+        -0.0186004475f,
+         0.0013822552f,
+         0.2329352195f,
+         0.9082626683f,
+        -0.1470417557f,
+         0.0080554403f,
+         0.0167957238f,
+        -0.0018233575f
+    },
+    {
+         0.0018247182f,         /* Filter 17 */
+        -0.0196492903f,
+        -0.0152415667f,
+         0.3146585634f,
+         0.8338068363f,
+        -0.1328632049f,
+         0.0009858079f,
+         0.0163079778f,
+         0.0001596234f
+    },
+    {
+         0.0048904515f,         /* Filter 18 */
+        -0.0194500407f,
+        -0.0339459430f,
+         0.4006032722f,
+         0.7528295479f,
+        -0.1154114754f,
+        -0.0053908083f,
+         0.0150588729f,
+         0.0020204744f
+    },
+    {
+         0.0079099936f,         /* Filter 19 */
+        -0.0179109014f,
+        -0.0541239470f,
+         0.4891745311f,
+         0.6671466059f,
+        -0.0957820135f,
+        -0.0107913392f,
+         0.0131516633f,
+         0.0036624469f
+    },
+};
+
+/* Raised root cosine pulse shaping; Beta = 0.5; 4 symbols either
+   side of the centre. */
+/* Created with mkshape -r 0.1 0.5 45 -l and then split up */
+#define PULSESHAPER_4800_GAIN           (4.9913162900f/5.0f)
+#define PULSESHAPER_4800_COEFF_SETS     5
+static const float pulseshaper_4800[PULSESHAPER_4800_COEFF_SETS][V27TER_TX_FILTER_STEPS] =
+{
+    {
+         0.0020173211f,         /* Filter 0 */
+         0.0150576434f,
+        -0.0053888047f,
+        -0.1154099010f,
+         0.7528286821f,
+         0.4006013374f,
+        -0.0339462085f,
+        -0.0194477281f,
+         0.0048918464f
+    },
+    {
+        -0.0057162575f,         /* Filter 1 */
+         0.0152563286f,
+         0.0228163350f,
+        -0.1612000503f,
+         1.0309660372f,
+         0.0875788553f,
+         0.0267182476f,
+        -0.0134032156f,
+        -0.0061365979f
+    },
+    {
+        -0.0101052019f,         /* Filter 2 */
+         0.0030314952f,
+         0.0424414442f,
+        -0.1061032862f,
+         1.1366196464f,
+        -0.1061032862f,
+         0.0424414442f,
+         0.0030314952f,
+        -0.0101052019f
+    },
+    {
+        -0.0061365979f,         /* Filter 3 */
+        -0.0134032156f,
+         0.0267182476f,
+         0.0875788553f,
+         1.0309660372f,
+        -0.1612000503f,
+         0.0228163350f,
+         0.0152563286f,
+        -0.0057162575f
+    },
+    {
+         0.0048918464f,         /* Filter 4 */
+        -0.0194477281f,
+        -0.0339462085f,
+         0.4006013374f,
+         0.7528286821f,
+        -0.1154099010f,
+        -0.0053888047f,
+         0.0150576434f,
+         0.0020173211f
+    },
+};
+
+static int fake_get_bit(void *user_data)
+{
+    return 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int scramble(v27ter_tx_state_t *s, int in_bit)
+{
+    int out_bit;
+
+    /* This scrambler is really quite messy to implement. There seems to be no efficient shortcut */
+    out_bit = (in_bit ^ (s->scramble_reg >> 5) ^ (s->scramble_reg >> 6)) & 1;
+    if (s->scrambler_pattern_count >= 33)
+    {
+        out_bit ^= 1;
+        s->scrambler_pattern_count = 0;
+    }
+    else
+    {
+        if ((((s->scramble_reg >> 7) ^ out_bit) & ((s->scramble_reg >> 8) ^ out_bit) & ((s->scramble_reg >> 11) ^ out_bit) & 1))
+            s->scrambler_pattern_count = 0;
+        else
+            s->scrambler_pattern_count++;
+    }
+    s->scramble_reg = (s->scramble_reg << 1) | out_bit;
+    return out_bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int get_scrambled_bit(v27ter_tx_state_t *s)
+{
+    int bit;
+    
+    if ((bit = s->current_get_bit(s->user_data)) == PUTBIT_END_OF_DATA)
+    {
+        /* End of real data. Switch to the fake get_bit routine, until we
+           have shut down completely. */
+        s->current_get_bit = fake_get_bit;
+        s->in_training = TRUE;
+        bit = 1;
+    }
+    return scramble(s, bit);
+}
+/*- End of function --------------------------------------------------------*/
+
+static complexf_t getbaud(v27ter_tx_state_t *s)
+{
+    static const int phase_steps_4800[8] =
+    {
+        1, 0, 2, 3, 6, 7, 5, 4
+    };
+    static const int phase_steps_2400[4] =
+    {
+        0, 2, 6, 4
+    };
+    static const complexf_t constellation[8] =
+    {
+        { 1.414f,  0.0f},       /*   0deg */
+        { 1.0f,    1.0f},       /*  45deg */
+        { 0.0f,    1.414f},     /*  90deg */
+        {-1.0f,    1.0f},       /* 135deg */
+        {-1.414f,  0.0f},       /* 180deg */
+        {-1.0f,   -1.0f},       /* 225deg */
+        { 0.0f,   -1.414f},     /* 270deg */
+        { 1.0f,   -1.0f}        /* 315deg */
+    };
+    int bits;
+
+    if (s->in_training)
+    {
+       	/* Send the training sequence */
+        if (++s->training_step <= V27TER_TRAINING_SEG_5)
+        {
+            if (s->training_step <= V27TER_TRAINING_SEG_4)
+            {
+                if (s->training_step <= V27TER_TRAINING_SEG_2)
+                {
+                    /* Segment 1: Unmodulated carrier (talker echo protection) */
+                    return constellation[0];
+                }
+                if (s->training_step <= V27TER_TRAINING_SEG_3)
+                {
+                    /* Segment 2: Silence */
+                    return complex_setf(0.0, 0.0);
+                }
+                /* Segment 3: Regular reversals... */
+                s->constellation_state = (s->constellation_state + 4) & 7;
+                return constellation[s->constellation_state];
+            }
+            /* Segment 4: Scrambled reversals... */
+            /* Apply the 1 + x^-6 + x^-7 scrambler. We want every third
+               bit from the scrambler. */
+            bits = get_scrambled_bit(s) << 2;
+            get_scrambled_bit(s);
+            get_scrambled_bit(s);
+            s->constellation_state = (s->constellation_state + bits) & 7;
+            return constellation[s->constellation_state];
+        }
+        /* We should be in the block of test ones, or shutdown ones, if we get here. */
+        /* There is no graceful shutdown procedure defined for V.27ter. Just
+           send some ones, to ensure we get the real data bits through, even
+           with bad ISI. */
+        if (s->training_step == V27TER_TRAINING_END + 1)
+        {
+            /* End of the last segment - segment 5: All ones */
+            /* Switch from the fake get_bit routine, to the user supplied real
+               one, and we are up and running. */
+            s->current_get_bit = s->get_bit;
+            s->in_training = FALSE;
+        }
+    }
+    /* 4800bps uses 8 phases. 2400bps uses 4 phases. */
+    if (s->bit_rate == 4800)
+    {
+        bits = get_scrambled_bit(s);
+        bits = (bits << 1) | get_scrambled_bit(s);
+        bits = (bits << 1) | get_scrambled_bit(s);
+        bits = phase_steps_4800[bits];
+    }
+    else
+    {
+        bits = get_scrambled_bit(s);
+        bits = (bits << 1) | get_scrambled_bit(s);
+        bits = phase_steps_2400[bits];
+    }
+    s->constellation_state = (s->constellation_state + bits) & 7;
+    return constellation[s->constellation_state];
+}
+/*- End of function --------------------------------------------------------*/
+
+int v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len)
+{
+    complexf_t x;
+    complexf_t z;
+    int i;
+    int sample;
+
+    if (s->training_step >= V27TER_TRAINING_SHUTDOWN_END)
+    {
+        /* Once we have sent the shutdown symbols, we stop sending completely. */
+        return 0;
+    }
+    /* The symbol rates for the two bit rates are different. This makes it difficult to
+       merge both generation procedures into a single efficient loop. We do not bother
+       trying. We use two independent loops, filter coefficients, etc. */
+    if (s->bit_rate == 4800)
+    {
+        for (sample = 0;  sample < len;  sample++)
+        {
+            if (++s->baud_phase >= 5)
+            {
+                s->baud_phase -= 5;
+                s->rrc_filter[s->rrc_filter_step] =
+                s->rrc_filter[s->rrc_filter_step + V27TER_TX_FILTER_STEPS] = getbaud(s);
+                if (++s->rrc_filter_step >= V27TER_TX_FILTER_STEPS)
+                    s->rrc_filter_step = 0;
+            }
+            /* Root raised cosine pulse shaping at baseband */
+            x.re = 0.0f;
+            x.im = 0.0f;
+            for (i = 0;  i < V27TER_TX_FILTER_STEPS;  i++)
+            {
+                x.re += pulseshaper_4800[4 - s->baud_phase][i]*s->rrc_filter[i + s->rrc_filter_step].re;
+                x.im += pulseshaper_4800[4 - s->baud_phase][i]*s->rrc_filter[i + s->rrc_filter_step].im;
+            }
+            /* Now create and modulate the carrier */
+            z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
+            /* Don't bother saturating. We should never clip. */
+            amp[sample] = (int16_t) lrintf((x.re*z.re - x.im*z.im)*s->gain_4800);
+        }
+    }
+    else
+    {
+        for (sample = 0;  sample < len;  sample++)
+        {
+            if ((s->baud_phase += 3) >= 20)
+            {
+                s->baud_phase -= 20;
+                s->rrc_filter[s->rrc_filter_step] =
+                s->rrc_filter[s->rrc_filter_step + V27TER_TX_FILTER_STEPS] = getbaud(s);
+                if (++s->rrc_filter_step >= V27TER_TX_FILTER_STEPS)
+                    s->rrc_filter_step = 0;
+            }
+            /* Root raised cosine pulse shaping at baseband */
+            x.re = 0.0f;
+            x.im = 0.0f;
+            for (i = 0;  i < V27TER_TX_FILTER_STEPS;  i++)
+            {
+                x.re += pulseshaper_2400[19 - s->baud_phase][i]*s->rrc_filter[i + s->rrc_filter_step].re;
+                x.im += pulseshaper_2400[19 - s->baud_phase][i]*s->rrc_filter[i + s->rrc_filter_step].im;
+            }
+            /* Now create and modulate the carrier */
+            z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
+            /* Don't bother saturating. We should never clip. */
+            amp[sample] = (int16_t) lrintf((x.re*z.re - x.im*z.im)*s->gain_2400);
+        }
+    }
+    return sample;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v27ter_tx_power(v27ter_tx_state_t *s, float power)
+{
+    float l;
+
+    l = powf(10.0f, (power - DBM0_MAX_POWER)/20.0f)*32768.0f;
+    s->gain_2400 = l/PULSESHAPER_2400_GAIN;
+    s->gain_4800 = l/PULSESHAPER_4800_GAIN;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v27ter_tx_set_get_bit(v27ter_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
+{
+    if (s->get_bit == s->current_get_bit)
+        s->current_get_bit = get_bit;
+    s->get_bit = get_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v27ter_tx_restart(v27ter_tx_state_t *s, int rate, int tep)
+{
+    if (rate != 4800  &&  rate != 2400)
+        return -1;
+    s->bit_rate = rate;
+    cvec_zerof(s->rrc_filter, sizeof(s->rrc_filter)/sizeof(s->rrc_filter[0]));
+    s->rrc_filter_step = 0;
+    s->scramble_reg = 0x3C;
+    s->scrambler_pattern_count = 0;
+    s->in_training = TRUE;
+    s->training_step = (tep)  ?  V27TER_TRAINING_SEG_1  :  V27TER_TRAINING_SEG_2;
+    s->carrier_phase = 0;
+    s->baud_phase = 0;
+    s->constellation_state = 0;
+    s->current_get_bit = fake_get_bit;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+v27ter_tx_state_t *v27ter_tx_init(v27ter_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data)
+{
+    if (s == NULL)
+    {
+        if ((s = (v27ter_tx_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    s->get_bit = get_bit;
+    s->user_data = user_data;
+    s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
+    v27ter_tx_power(s, -14.0f);
+    v27ter_tx_restart(s, rate, tep);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v27ter_tx_release(v27ter_tx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v29rx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,2265 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v29rx.c - ITU V.29 modem receive part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v29rx.c,v 1.100 2006/11/28 16:59:57 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/complex.h"
+#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
+#include "spandsp/async.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/arctan2.h"
+#include "spandsp/dds.h"
+#include "spandsp/complex_filters.h"
+
+#include "spandsp/v29rx.h"
+
+#define CARRIER_NOMINAL_FREQ        1700.0f
+#define BAUD_RATE                   2400
+#define EQUALIZER_DELTA             0.21f
+
+/* Segments of the training sequence */
+#define V29_TRAINING_SEG_2_LEN      128
+#define V29_TRAINING_SEG_3_LEN      384
+#define V29_TRAINING_SEG_4_LEN      48
+
+enum
+{
+    TRAINING_STAGE_NORMAL_OPERATION = 0,
+    TRAINING_STAGE_SYMBOL_ACQUISITION,
+    TRAINING_STAGE_LOG_PHASE,
+    TRAINING_STAGE_WAIT_FOR_CDCD,
+    TRAINING_STAGE_TRAIN_ON_CDCD,
+    TRAINING_STAGE_TRAIN_ON_CDCD_AND_TEST,
+    TRAINING_STAGE_TEST_ONES,
+    TRAINING_STAGE_PARKED
+};
+
+static const complexf_t v29_constellation[16] =
+{
+    { 3.0f,  0.0f},     /*   0deg low  */
+    { 1.0f,  1.0f},     /*  45deg low  */
+    { 0.0f,  3.0f},     /*  90deg low  */
+    {-1.0f,  1.0f},     /* 135deg low  */
+    {-3.0f,  0.0f},     /* 180deg low  */
+    {-1.0f, -1.0f},     /* 225deg low  */
+    { 0.0f, -3.0f},     /* 270deg low  */
+    { 1.0f, -1.0f},     /* 315deg low  */
+    { 5.0f,  0.0f},     /*   0deg high */
+    { 3.0f,  3.0f},     /*  45deg high */
+    { 0.0f,  5.0f},     /*  90deg high */
+    {-3.0f,  3.0f},     /* 135deg high */
+    {-5.0f,  0.0f},     /* 180deg high */
+    {-3.0f, -3.0f},     /* 225deg high */
+    { 0.0f, -5.0f},     /* 270deg high */
+    { 3.0f, -3.0f}      /* 315deg high */
+};
+
+static const uint8_t space_map_9600[20][20] =
+{
+    {13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11},
+    {13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11},
+    {13, 13, 13, 13, 13, 13, 13,  4,  4,  4,  4,  4,  4, 11, 11, 11, 11, 11, 11, 11},
+    {13, 13, 13, 13, 13, 13, 13,  4,  4,  4,  4,  4,  4, 11, 11, 11, 11, 11, 11, 11},
+    {13, 13, 13, 13, 13, 13, 13,  4,  4,  4,  4,  4,  4, 11, 11, 11, 11, 11, 11, 11},
+    {13, 13, 13, 13, 13, 13, 13,  5,  4,  4,  4,  4,  3, 11, 11, 11, 11, 11, 11, 11},
+    {14, 13, 13, 13, 13, 13,  5,  5,  5,  5,  3,  3,  3,  3, 11, 11, 11, 11, 11, 10},
+    {14, 14,  6,  6,  6,  5,  5,  5,  5,  5,  3,  3,  3,  3,  3,  2,  2,  2, 10, 10},
+    {14, 14,  6,  6,  6,  6,  5,  5,  5,  5,  3,  3,  3,  3,  2,  2,  2,  2, 10, 10},
+    {14, 14,  6,  6,  6,  6,  5,  5,  5,  5,  3,  3,  3,  3,  2,  2,  2,  2, 10, 10},
+    {14, 14,  6,  6,  6,  6,  7,  7,  7,  7,  1,  1,  1,  1,  2,  2,  2,  2, 10, 10},
+    {14, 14,  6,  6,  6,  6,  7,  7,  7,  7,  1,  1,  1,  1,  2,  2,  2,  2, 10, 10},
+    {14, 14,  6,  6,  6,  7,  7,  7,  7,  7,  1,  1,  1,  1,  1,  2,  2,  2, 10, 10},
+    {14, 15, 15, 15, 15, 15,  7,  7,  7,  7,  1,  1,  1,  1,  9,  9,  9,  9,  9, 10},
+    {15, 15, 15, 15, 15, 15, 15,  7,  0,  0,  0,  0,  1,  9,  9,  9,  9,  9,  9,  9},
+    {15, 15, 15, 15, 15, 15, 15,  0,  0,  0,  0,  0,  0,  9,  9,  9,  9,  9,  9,  9},
+    {15, 15, 15, 15, 15, 15, 15,  0,  0,  0,  0,  0,  0,  9,  9,  9,  9,  9,  9,  9},
+    {15, 15, 15, 15, 15, 15, 15,  0,  0,  0,  0,  0,  0,  9,  9,  9,  9,  9,  9,  9},
+    {15, 15, 15, 15, 15, 15, 15,  8,  8,  8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9},
+    {15, 15, 15, 15, 15, 15,  8,  8,  8,  8,  8,  8,  8,  8,  9,  9,  9,  9,  9,  9}
+};
+
+/* Raised root cosine pulse shaping; Beta = 0.5; 4 symbols either
+   side of the centre. We cannot simplify this by using only half
+   the filter, as each variant are each skewed by n/PULSESHAPER_COEFF_SETS of a
+   sample. Only one is symmetric. */
+#define PULSESHAPER_GAIN        10.00736638f
+#define PULSESHAPER_COEFF_SETS  48
+static const complexf_t pulseshaper[PULSESHAPER_COEFF_SETS][V29_RX_FILTER_STEPS] =
+{
+    {
+        {-0.0006054906f, -0.0076934875f},       /* Filter 0 */
+        { 0.0036800486f, -0.0011957203f},
+        {-0.0058580399f, -0.0095594523f},
+        { 0.0088272477f, -0.0088272477f},
+        {-0.0070156625f, -0.0042992035f},
+        { 0.0051634535f, -0.0158914757f},
+        {-0.0145681539f, -0.0011465386f},
+        {-0.0064674675f, -0.0408339830f},
+        {-0.0136664375f,  0.0056608238f},
+        {-0.0772003348f, -0.1062571451f},
+        { 0.0857393910f, -0.1003879288f},
+        {-0.1385128868f, -0.0705758409f},
+        { 0.1555698727f, -0.6479951549f},
+        { 1.0773601675f,  0.0000000000f},
+        { 0.2515047363f,  1.0475926203f},
+        {-0.5937739316f,  0.3025429295f},
+        {-0.1009610161f, -0.1182101618f},
+        {-0.0775987390f,  0.1068055014f},
+        {-0.1213433119f, -0.0502620455f},
+        { 0.0023140483f, -0.0146103259f},
+        {-0.0412155371f,  0.0032437331f},
+        {-0.0045157276f, -0.0138979805f},
+        {-0.0142470087f,  0.0087305782f},
+        {-0.0058181901f, -0.0058181901f},
+        {-0.0065226701f,  0.0106440302f},
+        {-0.0106628561f, -0.0034645720f},
+        {-0.0003035921f,  0.0038575039f},
+    },
+    {
+        {-0.0003235976f, -0.0041116977f},       /* Filter 1 */
+        { 0.0034317849f, -0.0011150545f},
+        {-0.0059948336f, -0.0097826794f},
+        { 0.0086437458f, -0.0086437458f},
+        {-0.0074140419f, -0.0045433307f},
+        { 0.0050851588f, -0.0156505094f},
+        {-0.0154601145f, -0.0012167374f},
+        {-0.0064469783f, -0.0407046190f},
+        {-0.0156933045f,  0.0065003796f},
+        {-0.0783633460f, -0.1078578927f},
+        { 0.0839596331f, -0.0983041000f},
+        {-0.1466635902f, -0.0747288317f},
+        { 0.1581236518f, -0.6586324102f},
+        { 1.0822215889f,  0.0000000000f},
+        { 0.2503251863f,  1.0426794408f},
+        {-0.5839878512f,  0.2975566724f},
+        {-0.0950902426f, -0.1113363693f},
+        {-0.0791302548f,  0.1089134521f},
+        {-0.1194691818f, -0.0494857553f},
+        { 0.0019760247f, -0.0124761291f},
+        {-0.0413061980f,  0.0032508683f},
+        {-0.0042392071f, -0.0130469379f},
+        {-0.0144455612f,  0.0088522513f},
+        {-0.0054839934f, -0.0054839934f},
+        {-0.0066522258f,  0.0108554460f},
+        {-0.0104075179f, -0.0033816075f},
+        {-0.0003235976f,  0.0041116977f},
+    },
+    {
+        {-0.0003431146f, -0.0043596842f},       /* Filter 2 */
+        { 0.0031779221f, -0.0010325695f},
+        {-0.0061279979f, -0.0099999837f},
+        { 0.0084521727f, -0.0084521727f},
+        {-0.0078074148f, -0.0047843899f},
+        { 0.0050005298f, -0.0153900482f},
+        {-0.0163511406f, -0.0012868627f},
+        {-0.0064201364f, -0.0405351459f},
+        {-0.0177497724f,  0.0073521965f},
+        {-0.0794957450f, -0.1094165063f},
+        { 0.0820917217f, -0.0961170567f},
+        {-0.1549087286f, -0.0789299396f},
+        { 0.1606663689f, -0.6692235895f},
+        { 1.0868898157f,  0.0000000000f},
+        { 0.2491014054f,  1.0375820265f},
+        {-0.5741661901f,  0.2925522861f},
+        {-0.0892910248f, -0.1045463576f},
+        {-0.0805830641f,  0.1109130726f},
+        {-0.1175509420f, -0.0486911944f},
+        { 0.0016433282f, -0.0103755662f},
+        {-0.0413575411f,  0.0032549091f},
+        {-0.0039628985f, -0.0121965475f},
+        {-0.0146266493f,  0.0089632222f},
+        {-0.0051463192f, -0.0051463192f},
+        {-0.0067756751f,  0.0110568969f},
+        {-0.0101460989f, -0.0032966674f},
+        {-0.0003431146f,  0.0043596842f},
+    },
+    {
+        {-0.0003621305f, -0.0046013044f},       /* Filter 3 */
+        { 0.0029186307f, -0.0009483206f},
+        {-0.0062573914f, -0.0102111348f},
+        { 0.0082526365f, -0.0082526365f},
+        {-0.0081953754f, -0.0050221325f},
+        { 0.0049095725f, -0.0151101104f},
+        {-0.0172404079f, -0.0013568495f},
+        {-0.0063868556f, -0.0403250190f},
+        {-0.0198348595f,  0.0082158678f},
+        {-0.0805962556f, -0.1109312291f},
+        { 0.0801351139f, -0.0938261634f},
+        {-0.1632463544f, -0.0831781721f},
+        { 0.1631971552f, -0.6797650728f},
+        { 1.0913630919f,  0.0000000000f},
+        { 0.2478338529f,  1.0323022902f},
+        {-0.5643122679f,  0.2875314620f},
+        {-0.0835646644f, -0.0978416511f},
+        {-0.0819577515f,  0.1128051674f},
+        {-0.1155905906f, -0.0478791903f},
+        { 0.0013161074f, -0.0083095754f},
+        {-0.0413701808f,  0.0032559039f},
+        {-0.0036870475f, -0.0113475654f},
+        {-0.0147903020f,  0.0090635087f},
+        {-0.0048055043f, -0.0048055043f},
+        {-0.0068929555f,  0.0112482810f},
+        {-0.0098788669f, -0.0032098384f},
+        {-0.0003621305f,  0.0046013044f},
+    },
+    {
+        {-0.0003806334f, -0.0048364061f},       /* Filter 4 */
+        { 0.0026540877f, -0.0008623654f},
+        {-0.0063828750f, -0.0104159053f},
+        { 0.0080452535f, -0.0080452535f},
+        {-0.0085775184f, -0.0052563101f},
+        { 0.0048122983f, -0.0148107313f},
+        {-0.0181270820f, -0.0014266323f},
+        {-0.0063470532f, -0.0400737166f},
+        {-0.0219475497f,  0.0090909727f},
+        {-0.0816636012f, -0.1124003042f},
+        { 0.0780893017f, -0.0914308250f},
+        {-0.1716744668f, -0.0874725099f},
+        { 0.1657151424f, -0.6902532446f},
+        { 1.0956397332f,  0.0000000000f},
+        { 0.2465230038f,  1.0268422107f},
+        {-0.5544294025f,  0.2824958906f},
+        {-0.0779124236f, -0.0912237273f},
+        {-0.0832549311f,  0.1145905820f},
+        {-0.1135901216f, -0.0470505689f},
+        { 0.0009945051f, -0.0062790582f},
+        {-0.0413447525f,  0.0032539026f},
+        {-0.0034118961f, -0.0105007365f},
+        {-0.0149365628f,  0.0091531374f},
+        {-0.0044618854f, -0.0044618854f},
+        {-0.0070040103f,  0.0114295060f},
+        {-0.0096060925f, -0.0031212087f},
+        {-0.0003806334f,  0.0048364061f},
+    },
+    {
+        {-0.0003986119f, -0.0050648440f},       /* Filter 5 */
+        { 0.0023844759f, -0.0007747632f},
+        {-0.0065043116f, -0.0106140718f},
+        { 0.0078301476f, -0.0078301476f},
+        {-0.0089534403f, -0.0054866753f},
+        { 0.0047087245f, -0.0144919637f},
+        {-0.0190103194f, -0.0014961446f},
+        {-0.0063006503f, -0.0397807405f},
+        {-0.0240867927f,  0.0099770762f},
+        {-0.0826965057f, -0.1138219754f},
+        { 0.0759538132f, -0.0889304892f},
+        {-0.1801910135f, -0.0918119071f},
+        { 0.1682194641f, -0.7006844950f},
+        { 1.0997181284f,  0.0000000000f},
+        { 0.2451693490f,  1.0212038328f},
+        {-0.5445209082f,  0.2774472605f},
+        {-0.0723355236f, -0.0846940164f},
+        {-0.0844752467f,  0.1162702023f},
+        {-0.1115515226f, -0.0462061535f},
+        { 0.0006786580f, -0.0042848780f},
+        {-0.0412819110f,  0.0032489569f},
+        {-0.0031376826f, -0.0096567942f},
+        {-0.0150654901f,  0.0092321442f},
+        {-0.0041157984f, -0.0041157984f},
+        {-0.0071087889f,  0.0116004892f},
+        {-0.0093280490f, -0.0030308668f},
+        {-0.0003986119f,  0.0050648440f},
+    },
+    {
+        {-0.0004160550f, -0.0052864799f},       /* Filter 6 */
+        { 0.0021099840f, -0.0006855754f},
+        {-0.0066215668f, -0.0108054149f},
+        { 0.0076074506f, -0.0076074506f},
+        {-0.0093227386f, -0.0057129815f},
+        { 0.0045988736f, -0.0141538775f},
+        {-0.0198892682f, -0.0015653194f},
+        {-0.0062475719f, -0.0394456164f},
+        {-0.0262515049f,  0.0108737293f},
+        {-0.0836936943f, -0.1151944878f},
+        { 0.0737282126f, -0.0863246457f},
+        {-0.1887938905f, -0.0961952919f},
+        { 0.1707092554f, -0.7110552220f},
+        { 1.1035967397f,  0.0000000000f},
+        { 0.2437733949f,  1.0153892656f},
+        {-0.5345900940f,  0.2723872580f},
+        {-0.0668351454f, -0.0782539010f},
+        {-0.0856193708f,  0.1178449541f},
+        {-0.1094767749f, -0.0453467649f},
+        { 0.0003686970f, -0.0023278610f},
+        {-0.0411823301f,  0.0032411197f},
+        {-0.0028646414f, -0.0088164597f},
+        {-0.0151771562f,  0.0093005733f},
+        {-0.0037675783f, -0.0037675783f},
+        {-0.0072072465f,  0.0117611574f},
+        {-0.0090450120f, -0.0029389025f},
+        {-0.0004160550f,  0.0052864799f},
+    },
+    {
+        {-0.0004329524f, -0.0055011823f},       /* Filter 7 */
+        { 0.0018308065f, -0.0005948651f},
+        {-0.0067345088f, -0.0109897195f},
+        { 0.0073773020f, -0.0073773020f},
+        {-0.0096850130f, -0.0059349836f},
+        { 0.0044827743f, -0.0137965606f},
+        {-0.0207630684f, -0.0016340889f},
+        {-0.0061877467f, -0.0390678953f},
+        {-0.0284405684f,  0.0117804691f},
+        {-0.0846538939f, -0.1165160891f},
+        { 0.0714121011f, -0.0836128276f},
+        {-0.1974809435f, -0.1006215665f},
+        { 0.1731836536f, -0.7213618325f},
+        { 1.1072741035f,  0.0000000000f},
+        { 0.2423356631f,  1.0094006816f},
+        {-0.5246402627f,  0.2673175657f},
+        {-0.0614124285f, -0.0719047153f},
+        {-0.0866880040f,  0.1193158015f},
+        {-0.1073678519f, -0.0444732204f},
+        { 0.0000647469f, -0.0004087959f},
+        {-0.0410467015f,  0.0032304455f},
+        {-0.0025930028f, -0.0079804420f},
+        {-0.0152716480f,  0.0093584780f},
+        {-0.0034175587f, -0.0034175587f},
+        {-0.0072993441f,  0.0119114470f},
+        {-0.0087572594f, -0.0028454060f},
+        {-0.0004329524f,  0.0055011823f},
+    },
+    {
+        {-0.0004492944f, -0.0057088271f},       /* Filter 8 */
+        { 0.0015471436f, -0.0005026974f},
+        {-0.0068430082f, -0.0111667745f},
+        { 0.0071398493f, -0.0071398493f},
+        {-0.0100398656f, -0.0061524375f},
+        { 0.0043604608f, -0.0134201184f},
+        {-0.0216308523f, -0.0017023850f},
+        {-0.0061211077f, -0.0386471532f},
+        {-0.0306528326f,  0.0126968190f},
+        {-0.0855758340f, -0.1177850307f},
+        { 0.0690051173f, -0.0807946117f},
+        {-0.2062499680f, -0.1050896077f},
+        { 0.1756417989f, -0.7316007446f},
+        { 1.1107488316f,  0.0000000000f},
+        { 0.2408566902f,  1.0032403162f},
+        {-0.5146747091f,  0.2622398626f},
+        {-0.0560684714f, -0.0656477454f},
+        {-0.0876818748f,  0.1206837473f},
+        {-0.1052267179f, -0.0435863337f},
+        {-0.0002330732f,  0.0014715664f},
+        {-0.0408757346f,  0.0032169901f},
+        {-0.0023229930f, -0.0071494373f},
+        {-0.0153490660f,  0.0094059197f},
+        {-0.0030660718f, -0.0030660718f},
+        {-0.0073850485f,  0.0120513039f},
+        {-0.0084650709f, -0.0027504683f},
+        {-0.0004492944f,  0.0057088271f},
+    },
+    {
+        {-0.0004650718f, -0.0059092972f},       /* Filter 9 */
+        { 0.0012592008f, -0.0004091391f},
+        {-0.0069469389f, -0.0113363740f},
+        { 0.0068952472f, -0.0068952472f},
+        {-0.0103869007f, -0.0063651009f},
+        { 0.0042319732f, -0.0130246742f},
+        {-0.0224917457f, -0.0017701388f},
+        {-0.0060475918f, -0.0381829922f},
+        {-0.0328871136f,  0.0136222885f},
+        {-0.0864582472f, -0.1189995684f},
+        { 0.0665069376f, -0.0778696190f},
+        {-0.2150987105f, -0.1095982672f},
+        { 0.1780828343f, -0.7417683886f},
+        { 1.1140196110f,  0.0000000000f},
+        { 0.2393370276f,  0.9969104659f},
+        {-0.5046967186f,  0.2571558224f},
+        {-0.0508043306f, -0.0594842284f},
+        {-0.0886017384f,  0.1219498309f},
+        {-0.1030553278f, -0.0426869144f},
+        {-0.0005246505f,  0.0033125128f},
+        {-0.0406701557f,  0.0032008107f},
+        {-0.0020548339f, -0.0063241284f},
+        {-0.0154095242f,  0.0094429686f},
+        {-0.0027134480f, -0.0027134480f},
+        {-0.0074643325f,  0.0121806836f},
+        {-0.0081687281f, -0.0026541806f},
+        {-0.0004650718f,  0.0059092972f},
+    },
+    {
+        {-0.0004802758f, -0.0061024829f},       /* Filter 10 */
+        { 0.0009671895f, -0.0003142589f},
+        {-0.0070461774f, -0.0114983165f},
+        { 0.0066436583f, -0.0066436583f},
+        {-0.0107257260f, -0.0065727333f},
+        { 0.0040973574f, -0.0126103693f},
+        {-0.0233448674f, -0.0018372809f},
+        {-0.0059671403f, -0.0376750413f},
+        {-0.0351421949f,  0.0145563737f},
+        {-0.0872998705f, -0.1201579635f},
+        { 0.0639172763f, -0.0748375152f},
+        {-0.2240248692f, -0.1141463722f},
+        { 0.1805059061f, -0.7518612089f},
+        { 1.1170852055f,  0.0000000000f},
+        { 0.2377772412f,  0.9904134878f},
+        {-0.4947095655f,  0.2520671138f},
+        {-0.0456210210f, -0.0534153526f},
+        {-0.0894483767f,  0.1231151286f},
+        {-0.1008556255f, -0.0417757679f},
+        {-0.0008098779f,  0.0051133675f},
+        {-0.0404307068f,  0.0031819656f},
+        {-0.0017887430f, -0.0055051847f},
+        {-0.0154531504f,  0.0094697028f},
+        {-0.0023600156f, -0.0023600156f},
+        {-0.0075371745f,  0.0122995509f},
+        {-0.0078685137f, -0.0025566351f},
+        {-0.0004802758f,  0.0061024829f},
+    },
+    {
+        {-0.0004948985f, -0.0062882817f},       /* Filter 11 */
+        { 0.0006713257f, -0.0002181269f},
+        {-0.0071406035f, -0.0116524059f},
+        { 0.0063852527f, -0.0063852526f},
+        {-0.0110559525f, -0.0067750964f},
+        { 0.0039566651f, -0.0121773631f},
+        {-0.0241893313f, -0.0019037417f},
+        {-0.0058796987f, -0.0371229566f},
+        {-0.0374168281f,  0.0154985577f},
+        {-0.0880994453f, -0.1212584838f},
+        { 0.0612358868f, -0.0716980115f},
+        {-0.2330260947f, -0.1187327256f},
+        { 0.1829101645f, -0.7618756659f},
+        { 1.1199444556f,  0.0000000000f},
+        { 0.2361779109f,  0.9837517978f},
+        {-0.4847165122f,  0.2469753988f},
+        {-0.0405195152f, -0.0474422567f},
+        {-0.0902225974f,  0.1241807520f},
+        {-0.0986295432f, -0.0408536944f},
+        {-0.0010886543f,  0.0068734926f},
+        {-0.0401581456f,  0.0031605146f},
+        {-0.0015249332f, -0.0046932617f},
+        {-0.0154800853f,  0.0094862085f},
+        {-0.0020061005f, -0.0020061005f},
+        {-0.0076035587f,  0.0124078801f},
+        {-0.0075647115f, -0.0024579238f},
+        {-0.0004948985f,  0.0062882817f},
+    },
+    {
+        {-0.0005089323f, -0.0064665981f},       /* Filter 12 */
+        { 0.0003718310f, -0.0001208152f},
+        {-0.0072301003f, -0.0117984513f},
+        { 0.0061202077f, -0.0061202077f},
+        {-0.0113771948f, -0.0069719540f},
+        { 0.0038099540f, -0.0117258328f},
+        {-0.0250242456f, -0.0019694508f},
+        {-0.0057852169f, -0.0365264219f},
+        {-0.0397097323f,  0.0164483097f},
+        {-0.0888557186f, -0.1222994047f},
+        { 0.0584625613f, -0.0684508645f},
+        {-0.2420999907f, -0.1233561066f},
+        { 0.1852947639f, -0.7718082372f},
+        { 1.1225962793f,  0.0000000000f},
+        { 0.2345396308f,  0.9769278702f},
+        {-0.4747208072f,  0.2418823327f},
+        {-0.0355007435f, -0.0415660302f},
+        {-0.0909252334f,  0.1251478474f},
+        {-0.0963790005f, -0.0399214891f},
+        {-0.0013608847f,  0.0085922877f},
+        {-0.0398532442f,  0.0031365183f},
+        {-0.0012636128f, -0.0038890004f},
+        {-0.0154904827f,  0.0094925800f},
+        {-0.0016520262f, -0.0016520262f},
+        {-0.0076634750f,  0.0125056546f},
+        {-0.0072576065f, -0.0023581393f},
+        {-0.0005089323f,  0.0064665981f},
+    },
+    {
+        {-0.0005223703f, -0.0066373443f},       /* Filter 13 */
+        { 0.0000689315f, -0.0000223972f},
+        {-0.0073145539f, -0.0119362671f},
+        { 0.0058487082f, -0.0058487082f},
+        {-0.0116890717f, -0.0071630723f},
+        { 0.0036572876f, -0.0112559738f},
+        {-0.0258487141f, -0.0020343379f},
+        {-0.0056836493f, -0.0358851497f},
+        {-0.0420195954f,  0.0174050863f},
+        {-0.0895674434f, -0.1232790098f},
+        { 0.0555971318f, -0.0650958776f},
+        {-0.2512441154f, -0.1280152709f},
+        { 0.1876588631f, -0.7816554194f},
+        { 1.1250396727f,  0.0000000000f},
+        { 0.2328630086f,  0.9699442360f},
+        {-0.4647256838f,  0.2367895630f},
+        {-0.0305655940f, -0.0357877124f},
+        {-0.0915571420f,  0.1260175949f},
+        {-0.0941059032f, -0.0389799414f},
+        {-0.0016264798f,  0.0102691896f},
+        {-0.0395167881f,  0.0031100387f},
+        {-0.0010049855f, -0.0030930272f},
+        {-0.0154845091f,  0.0094889194f},
+        {-0.0012981133f, -0.0012981133f},
+        {-0.0077169192f,  0.0125928676f},
+        {-0.0069474841f, -0.0022573744f},
+        {-0.0005223703f,  0.0066373443f},
+    },
+    {
+        {-0.0005352062f, -0.0068004397f},       /* Filter 14 */
+        {-0.0002371416f,  0.0000770520f},
+        {-0.0073938544f, -0.0120656738f},
+        { 0.0055709463f, -0.0055709463f},
+        {-0.0119912063f, -0.0073482207f},
+        { 0.0034987353f, -0.0107680002f},
+        {-0.0266618369f, -0.0020983321f},
+        {-0.0055749551f, -0.0351988812f},
+        {-0.0443450744f,  0.0183683312f},
+        {-0.0902333798f, -0.1241955926f},
+        { 0.0526394697f, -0.0616329003f},
+        {-0.2604559819f, -0.1327089513f},
+        { 0.1900016262f, -0.7914137299f},
+        { 1.1272737104f,  0.0000000000f},
+        { 0.2311486652f,  0.9628034819f},
+        {-0.4547343588f,  0.2316987286f},
+        {-0.0257149117f, -0.0301082932f},
+        {-0.0921192046f,  0.1267912077f},
+        {-0.0918121426f, -0.0380298346f},
+        {-0.0018853566f,  0.0119036728f},
+        {-0.0391495767f,  0.0030811385f},
+        {-0.0007492498f, -0.0023059539f},
+        {-0.0154623431f,  0.0094753361f},
+        {-0.0009446795f, -0.0009446795f},
+        {-0.0077638924f,  0.0126695210f},
+        {-0.0066346301f, -0.0021557220f},
+        {-0.0005352062f,  0.0068004397f},
+    },
+    {
+        {-0.0005474342f, -0.0069558110f},       /* Filter 15 */
+        {-0.0005461525f,  0.0001774557f},
+        {-0.0074678951f, -0.0121864973f},
+        { 0.0052871211f, -0.0052871211f},
+        {-0.0122832268f, -0.0075271711f},
+        { 0.0033343726f, -0.0102621437f},
+        {-0.0274627107f, -0.0021613622f},
+        {-0.0054590979f, -0.0344673874f},
+        {-0.0466847952f,  0.0193374753f},
+        {-0.0908522954f, -0.1250474569f},
+        { 0.0495894870f, -0.0580618293f},
+        {-0.2697330596f, -0.1374358585f},
+        { 0.1923222223f, -0.8010797080f},
+        { 1.1292975460f,  0.0000000000f},
+        { 0.2293972347f,  0.9555082489f},
+        {-0.4447500311f,  0.2266114595f},
+        {-0.0209494991f, -0.0245287119f},
+        {-0.0926123259f,  0.1274699310f},
+        {-0.0894995944f, -0.0370719458f},
+        {-0.0021374375f,  0.0134952491f},
+        {-0.0387524213f,  0.0030498817f},
+        {-0.0004965997f, -0.0015283766f},
+        {-0.0154241758f,  0.0094519471f},
+        {-0.0005920390f, -0.0005920390f},
+        {-0.0078044017f,  0.0127356261f},
+        {-0.0063193305f, -0.0020532749f},
+        {-0.0005474342f,  0.0069558110f},
+    },
+    {
+        {-0.0005590491f, -0.0071033921f},       /* Filter 16 */
+        {-0.0008578611f,  0.0002787360f},
+        {-0.0075365733f, -0.0122985698f},
+        { 0.0049974389f, -0.0049974388f},
+        {-0.0125647661f, -0.0076996986f},
+        { 0.0031642806f, -0.0097386544f},
+        {-0.0282504297f, -0.0022233570f},
+        {-0.0053360461f, -0.0336904691f},
+        {-0.0490373539f,  0.0203119370f},
+        {-0.0914229663f, -0.1258329180f},
+        { 0.0464471360f, -0.0543826090f},
+        {-0.2790727745f, -0.1421946809f},
+        { 0.1946198263f, -0.8106499175f},
+        { 1.1311104123f,  0.0000000000f},
+        { 0.2276093640f,  0.9480612314f},
+        {-0.4347758804f,  0.2215293759f},
+        {-0.0162701156f, -0.0190498578f},
+        {-0.0930374331f,  0.1280550409f},
+        {-0.0871701184f, -0.0361070452f},
+        {-0.0023826511f,  0.0150434671f},
+        {-0.0383261449f,  0.0030163330f},
+        {-0.0002472237f, -0.0007608763f},
+        {-0.0153702098f,  0.0094188767f},
+        {-0.0002405024f, -0.0002405024f},
+        {-0.0078384594f,  0.0127912031f},
+        {-0.0060018711f, -0.0019501261f},
+        {-0.0005590491f,  0.0071033921f},
+    },
+    {
+        {-0.0005700463f, -0.0072431248f},       /* Filter 17 */
+        {-0.0011720231f,  0.0003808134f},
+        {-0.0075997900f, -0.0124017301f},
+        { 0.0047021127f, -0.0047021127f},
+        {-0.0128354632f, -0.0078655819f},
+        { 0.0029885467f, -0.0091978010f},
+        {-0.0290240862f, -0.0022842451f},
+        {-0.0052057731f, -0.0328679578f},
+        {-0.0514013169f,  0.0212911226f},
+        {-0.0919441775f, -0.1265503037f},
+        { 0.0432124100f, -0.0505952315f},
+        {-0.2884725105f, -0.1469840856f},
+        { 0.1968936193f, -0.8201209469f},
+        { 1.1327116219f,  0.0000000000f},
+        { 0.2257857123f,  0.9404651753f},
+        {-0.4248150656f,  0.2164540873f},
+        {-0.0116774779f, -0.0136725700f},
+        {-0.0933954755f,  0.1285478440f},
+        {-0.0848255565f, -0.0351358959f},
+        {-0.0026209319f,  0.0165479125f},
+        {-0.0378715811f,  0.0029805581f},
+        {-0.0000013054f, -0.0000040177f},
+        {-0.0153006596f,  0.0093762563f},
+        { 0.0001096232f,  0.0001096232f},
+        {-0.0078660833f,  0.0128362814f},
+        {-0.0056825374f, -0.0018463683f},
+        {-0.0005700463f,  0.0072431248f},
+    },
+    {
+        {-0.0005804218f, -0.0073749578f},       /* Filter 18 */
+        {-0.0014883899f,  0.0004836072f},
+        {-0.0076574502f, -0.0124958231f},
+        { 0.0044013628f, -0.0044013628f},
+        {-0.0130949624f, -0.0080246033f},
+        { 0.0028072639f, -0.0086398699f},
+        {-0.0297827710f, -0.0023439549f},
+        {-0.0050682571f, -0.0319997159f},
+        {-0.0537752213f,  0.0222744260f},
+        {-0.0924147241f, -0.1271979554f},
+        { 0.0398853435f, -0.0466997371f},
+        {-0.2979296109f, -0.1518027189f},
+        { 0.1991427888f, -0.8294894121f},
+        { 1.1341005677f,  0.0000000000f},
+        { 0.2239269510f,  0.9327228772f},
+        {-0.4148707237f,  0.2113871920f},
+        {-0.0071722592f, -0.0083976366f},
+        {-0.0936874236f,  0.1289496760f},
+        {-0.0824677330f, -0.0341592535f},
+        {-0.0028522199f,  0.0180082079f},
+        {-0.0373895741f,  0.0029426233f},
+        { 0.0002409767f,  0.0007416500f},
+        {-0.0152157506f,  0.0093242240f},
+        { 0.0004580348f,  0.0004580348f},
+        {-0.0078872970f,  0.0128708989f},
+        {-0.0053616143f, -0.0017420941f},
+        {-0.0005804218f,  0.0073749578f},
+    },
+    {
+        {-0.0005901721f, -0.0074988473f},       /* Filter 19 */
+        {-0.0018067093f,  0.0005870354f},
+        {-0.0077094631f, -0.0125807004f},
+        { 0.0040954155f, -0.0040954155f},
+        {-0.0133429149f, -0.0081765487f},
+        { 0.0026205314f, -0.0080651662f},
+        {-0.0305255746f, -0.0024024148f},
+        {-0.0049234813f, -0.0310856377f},
+        {-0.0561575756f,  0.0232612294f},
+        {-0.0928334114f, -0.1277742292f},
+        { 0.0364660122f, -0.0426962145f},
+        {-0.3074413786f, -0.1566492066f},
+        { 0.2013665292f, -0.8387519577f},
+        { 1.1352767227f,  0.0000000000f},
+        { 0.2220337633f,  0.9248371830f},
+        {-0.4049459681f,  0.2063302764f},
+        {-0.0027550900f, -0.0032257959f},
+        {-0.0939142683f,  0.1292619011f},
+        {-0.0800984531f, -0.0331778656f},
+        {-0.0030764613f,  0.0194240122f},
+        {-0.0368809773f,  0.0029025959f},
+        { 0.0004794497f,  0.0014755944f},
+        {-0.0151157193f,  0.0092629247f},
+        { 0.0008044337f,  0.0008044337f},
+        {-0.0079021290f,  0.0128951026f},
+        {-0.0050393858f, -0.0016373957f},
+        {-0.0005901721f,  0.0074988473f},
+    },
+    {
+        {-0.0005992944f, -0.0076147568f},       /* Filter 20 */
+        {-0.0021267251f,  0.0006910149f},
+        {-0.0077557420f, -0.0126562207f},
+        { 0.0037845040f, -0.0037845040f},
+        {-0.0135789777f, -0.0083212083f},
+        { 0.0024284540f, -0.0074740128f},
+        {-0.0312515874f, -0.0024595533f},
+        {-0.0047714341f, -0.0301256492f},
+        {-0.0585468603f,  0.0242509035f},
+        {-0.0931990565f, -0.1282774964f},
+        { 0.0329545338f, -0.0385848015f},
+        {-0.3170050775f, -0.1615221547f},
+        { 0.2035640423f, -0.8479052583f},
+        { 1.1362396407f,  0.0000000000f},
+        { 0.2201068440f,  0.9168109865f},
+        {-0.3950438879f,  0.2012849146f},
+        { 0.0015734425f,  0.0018422645f},
+        {-0.0940770209f,  0.1294859108f},
+        {-0.0777195022f, -0.0321924719f},
+        {-0.0032936077f,  0.0207950209f},
+        {-0.0363466528f,  0.0028605436f},
+        { 0.0007139459f,  0.0021972995f},
+        {-0.0150008130f,  0.0091925101f},
+        { 0.0011485255f,  0.0011485255f},
+        {-0.0079106134f,  0.0129089479f},
+        {-0.0047161348f, -0.0015323651f},
+        {-0.0005992944f,  0.0076147568f},
+    },
+    {
+        {-0.0006077863f, -0.0077226571f},       /* Filter 21 */
+        {-0.0024481778f,  0.0007954612f},
+        {-0.0077962045f, -0.0127222494f},
+        { 0.0034688681f, -0.0034688681f},
+        {-0.0138028157f, -0.0084583763f},
+        { 0.0022311426f, -0.0068667508f},
+        {-0.0319599006f, -0.0025152987f},
+        {-0.0046121088f, -0.0291197091f},
+        {-0.0609415283f,  0.0252428075f},
+        {-0.0935104881f, -0.1287061452f},
+        { 0.0293510677f, -0.0343656849f},
+        {-0.3266179339f, -0.1664201496f},
+        { 0.2057345372f, -0.8569460203f},
+        { 1.1369889562f,  0.0000000000f},
+        { 0.2181468989f,  0.9086472276f},
+        {-0.3851675459f,  0.1962526670f},
+        { 0.0058127944f,  0.0068059078f},
+        {-0.0941767115f,  0.1296231230f},
+        {-0.0753326453f, -0.0312038034f},
+        {-0.0035036167f,  0.0221209652f},
+        {-0.0357874706f,  0.0028165350f},
+        { 0.0009443030f,  0.0029062658f},
+        {-0.0148712891f,  0.0091131377f},
+        { 0.0014900206f,  0.0014900206f},
+        {-0.0079127895f,  0.0129124989f},
+        {-0.0043921429f, -0.0014270937f},
+        {-0.0006077863f,  0.0077226571f},
+    },
+    {
+        {-0.0006156462f, -0.0078225266f},       /* Filter 22 */
+        {-0.0027708045f,  0.0009002890f},
+        {-0.0078307725f, -0.0127786593f},
+        { 0.0031487534f, -0.0031487534f},
+        {-0.0140141002f, -0.0085878517f},
+        { 0.0020287139f, -0.0062437395f},
+        {-0.0326496069f, -0.0025695798f},
+        {-0.0044455042f, -0.0280678087f},
+        {-0.0633400059f,  0.0262362895f},
+        {-0.0937665479f, -0.1290585813f},
+        { 0.0256558155f, -0.0300391005f},
+        {-0.3362771370f, -0.1713417594f},
+        { 0.2078772313f, -0.8658709834f},
+        { 1.1375243848f,  0.0000000000f},
+        { 0.2161546447f,  0.9003488919f},
+        {-0.3753199780f,  0.1912350805f},
+        { 0.0099624646f,  0.0116645474f},
+        {-0.0942143887f,  0.1296749813f},
+        {-0.0729396259f, -0.0302125823f},
+        {-0.0037064513f,  0.0234016123f},
+        {-0.0352043080f,  0.0027706391f},
+        { 0.0011703644f,  0.0036020111f},
+        {-0.0147274152f,  0.0090249716f},
+        { 0.0018286340f,  0.0018286340f},
+        {-0.0079087015f,  0.0129058279f},
+        {-0.0040676902f, -0.0013216727f},
+        {-0.0006156462f,  0.0078225266f},
+    },
+    {
+        {-0.0006228729f, -0.0079143505f},       /* Filter 23 */
+        {-0.0030943393f,  0.0010054118f},
+        {-0.0078593727f, -0.0128253306f},
+        { 0.0028244120f, -0.0028244120f},
+        {-0.0142125109f, -0.0087094379f},
+        { 0.0018212906f, -0.0056053560f},
+        {-0.0333198014f, -0.0026223252f},
+        {-0.0042716241f, -0.0269699732f},
+        {-0.0657406925f,  0.0272306864f},
+        {-0.0939660909f, -0.1293332287f},
+        { 0.0218690212f, -0.0256053340f},
+        {-0.3459798404f, -0.1762855337f},
+        { 0.2099913501f, -0.8746769223f},
+        { 1.1378457233f,  0.0000000000f},
+        { 0.2141308087f,  0.8919190081f},
+        {-0.3655041913f,  0.1862336874f},
+        { 0.0140219952f,  0.0164176470f},
+        {-0.0941911192f,  0.1296429536f},
+        {-0.0705421655f, -0.0292195216f},
+        {-0.0039020802f,  0.0246367649f},
+        {-0.0345980484f,  0.0027229255f},
+        { 0.0013919788f,  0.0042840703f},
+        {-0.0145694683f,  0.0089281816f},
+        { 0.0021640858f,  0.0021640858f},
+        {-0.0078983989f,  0.0128890156f},
+        {-0.0037430549f, -0.0012161922f},
+        {-0.0006228729f,  0.0079143505f},
+    },
+    {
+        {-0.0006294658f, -0.0079981214f},       /* Filter 24 */
+        {-0.0034185133f,  0.0011107423f},
+        {-0.0078819362f, -0.0128621510f},
+        { 0.0024961016f, -0.0024961016f},
+        {-0.0143977349f, -0.0088229433f},
+        { 0.0016090008f, -0.0049519954f},
+        {-0.0339695814f, -0.0026734640f},
+        {-0.0040904779f, -0.0258262610f},
+        {-0.0681419627f,  0.0282253251f},
+        {-0.0941079866f, -0.1295285313f},
+        { 0.0179909715f, -0.0210647211f},
+        {-0.3557231633f, -0.1812500047f},
+        { 0.2120761281f, -0.8833606476f},
+        { 1.1379528497f,  0.0000000000f},
+        { 0.2120761281f,  0.8833606476f},
+        {-0.3557231633f,  0.1812500047f},
+        { 0.0179909715f,  0.0210647211f},
+        {-0.0941079866f,  0.1295285313f},
+        {-0.0681419627f, -0.0282253251f},
+        {-0.0040904779f,  0.0258262610f},
+        {-0.0339695814f,  0.0026734640f},
+        { 0.0016090008f,  0.0049519954f},
+        {-0.0143977349f,  0.0088229433f},
+        { 0.0024961016f,  0.0024961016f},
+        {-0.0078819362f,  0.0128621510f},
+        {-0.0034185133f, -0.0011107423f},
+        {-0.0006294658f,  0.0079981214f},
+    },
+    {
+        {-0.0006354249f, -0.0080738393f},       /* Filter 25 */
+        {-0.0037430549f,  0.0012161922f},
+        {-0.0078983989f, -0.0128890156f},
+        { 0.0021640858f, -0.0021640858f},
+        {-0.0145694683f, -0.0089281816f},
+        { 0.0013919788f, -0.0042840703f},
+        {-0.0345980484f, -0.0027229255f},
+        {-0.0039020802f, -0.0246367649f},
+        {-0.0705421655f,  0.0292195216f},
+        {-0.0941911192f, -0.1296429536f},
+        { 0.0140219952f, -0.0164176470f},
+        {-0.3655041913f, -0.1862336874f},
+        { 0.2141308087f, -0.8919190081f},
+        { 1.1378457233f,  0.0000000000f},
+        { 0.2099913501f,  0.8746769223f},
+        {-0.3459798404f,  0.1762855337f},
+        { 0.0218690212f,  0.0256053340f},
+        {-0.0939660909f,  0.1293332287f},
+        {-0.0657406925f, -0.0272306864f},
+        {-0.0042716241f,  0.0269699732f},
+        {-0.0333198014f,  0.0026223252f},
+        { 0.0018212906f,  0.0056053560f},
+        {-0.0142125109f,  0.0087094379f},
+        { 0.0028244120f,  0.0028244120f},
+        {-0.0078593727f,  0.0128253306f},
+        {-0.0030943393f, -0.0010054118f},
+        {-0.0006354249f,  0.0080738393f},
+    },
+    {
+        {-0.0006407508f, -0.0081415109f},       /* Filter 26 */
+        {-0.0040676902f,  0.0013216727f},
+        {-0.0079087015f, -0.0129058279f},
+        { 0.0018286340f, -0.0018286340f},
+        {-0.0147274152f, -0.0090249716f},
+        { 0.0011703644f, -0.0036020111f},
+        {-0.0352043080f, -0.0027706391f},
+        {-0.0037064513f, -0.0234016123f},
+        {-0.0729396259f,  0.0302125823f},
+        {-0.0942143887f, -0.1296749813f},
+        { 0.0099624646f, -0.0116645474f},
+        {-0.3753199780f, -0.1912350805f},
+        { 0.2161546447f, -0.9003488919f},
+        { 1.1375243848f,  0.0000000000f},
+        { 0.2078772313f,  0.8658709834f},
+        {-0.3362771370f,  0.1713417594f},
+        { 0.0256558155f,  0.0300391005f},
+        {-0.0937665479f,  0.1290585813f},
+        {-0.0633400059f, -0.0262362895f},
+        {-0.0044455042f,  0.0280678087f},
+        {-0.0326496069f,  0.0025695798f},
+        { 0.0020287139f,  0.0062437395f},
+        {-0.0140141002f,  0.0085878517f},
+        { 0.0031487534f,  0.0031487534f},
+        {-0.0078307725f,  0.0127786593f},
+        {-0.0027708045f, -0.0009002890f},
+        {-0.0006407508f,  0.0081415109f},
+    },
+    {
+        {-0.0006454445f, -0.0082011502f},       /* Filter 27 */
+        {-0.0043921429f,  0.0014270937f},
+        {-0.0079127895f, -0.0129124989f},
+        { 0.0014900206f, -0.0014900206f},
+        {-0.0148712891f, -0.0091131377f},
+        { 0.0009443030f, -0.0029062658f},
+        {-0.0357874706f, -0.0028165350f},
+        {-0.0035036167f, -0.0221209652f},
+        {-0.0753326453f,  0.0312038034f},
+        {-0.0941767115f, -0.1296231230f},
+        { 0.0058127944f, -0.0068059078f},
+        {-0.3851675459f, -0.1962526670f},
+        { 0.2181468989f, -0.9086472276f},
+        { 1.1369889562f,  0.0000000000f},
+        { 0.2057345372f,  0.8569460203f},
+        {-0.3266179339f,  0.1664201496f},
+        { 0.0293510677f,  0.0343656849f},
+        {-0.0935104881f,  0.1287061452f},
+        {-0.0609415283f, -0.0252428075f},
+        {-0.0046121088f,  0.0291197091f},
+        {-0.0319599006f,  0.0025152987f},
+        { 0.0022311426f,  0.0068667508f},
+        {-0.0138028157f,  0.0084583763f},
+        { 0.0034688681f,  0.0034688681f},
+        {-0.0077962045f,  0.0127222494f},
+        {-0.0024481778f, -0.0007954612f},
+        {-0.0006454445f,  0.0082011502f},
+    },
+    {
+        {-0.0006495077f, -0.0082527783f},       /* Filter 28 */
+        {-0.0047161348f,  0.0015323651f},
+        {-0.0079106134f, -0.0129089479f},
+        { 0.0011485255f, -0.0011485255f},
+        {-0.0150008130f, -0.0091925101f},
+        { 0.0007139459f, -0.0021972995f},
+        {-0.0363466528f, -0.0028605436f},
+        {-0.0032936077f, -0.0207950209f},
+        {-0.0777195022f,  0.0321924719f},
+        {-0.0940770209f, -0.1294859108f},
+        { 0.0015734425f, -0.0018422645f},
+        {-0.3950438879f, -0.2012849146f},
+        { 0.2201068440f, -0.9168109865f},
+        { 1.1362396407f,  0.0000000000f},
+        { 0.2035640423f,  0.8479052583f},
+        {-0.3170050775f,  0.1615221547f},
+        { 0.0329545338f,  0.0385848015f},
+        {-0.0931990565f,  0.1282774964f},
+        {-0.0585468603f, -0.0242509035f},
+        {-0.0047714341f,  0.0301256492f},
+        {-0.0312515874f,  0.0024595533f},
+        { 0.0024284540f,  0.0074740128f},
+        {-0.0135789777f,  0.0083212083f},
+        { 0.0037845040f,  0.0037845040f},
+        {-0.0077557420f,  0.0126562207f},
+        {-0.0021267251f, -0.0006910149f},
+        {-0.0006495077f,  0.0082527783f},
+    },
+    {
+        {-0.0006529426f, -0.0082964229f},       /* Filter 29 */
+        {-0.0050393858f,  0.0016373957f},
+        {-0.0079021290f, -0.0128951026f},
+        { 0.0008044337f, -0.0008044337f},
+        {-0.0151157193f, -0.0092629247f},
+        { 0.0004794497f, -0.0014755944f},
+        {-0.0368809773f, -0.0029025959f},
+        {-0.0030764613f, -0.0194240122f},
+        {-0.0800984531f,  0.0331778656f},
+        {-0.0939142683f, -0.1292619011f},
+        {-0.0027550900f,  0.0032257959f},
+        {-0.4049459681f, -0.2063302764f},
+        { 0.2220337633f, -0.9248371830f},
+        { 1.1352767227f,  0.0000000000f},
+        { 0.2013665292f,  0.8387519577f},
+        {-0.3074413786f,  0.1566492066f},
+        { 0.0364660122f,  0.0426962145f},
+        {-0.0928334114f,  0.1277742292f},
+        {-0.0561575756f, -0.0232612294f},
+        {-0.0049234813f,  0.0310856377f},
+        {-0.0305255746f,  0.0024024148f},
+        { 0.0026205314f,  0.0080651662f},
+        {-0.0133429149f,  0.0081765487f},
+        { 0.0040954155f,  0.0040954155f},
+        {-0.0077094631f,  0.0125807004f},
+        {-0.0018067093f, -0.0005870354f},
+        {-0.0006529426f,  0.0082964229f},
+    },
+    {
+        {-0.0006557520f, -0.0083321188f},       /* Filter 30 */
+        {-0.0053616143f,  0.0017420941f},
+        {-0.0078872970f, -0.0128708989f},
+        { 0.0004580348f, -0.0004580348f},
+        {-0.0152157506f, -0.0093242240f},
+        { 0.0002409767f, -0.0007416500f},
+        {-0.0373895741f, -0.0029426233f},
+        {-0.0028522199f, -0.0180082079f},
+        {-0.0824677330f,  0.0341592535f},
+        {-0.0936874236f, -0.1289496760f},
+        {-0.0071722592f,  0.0083976366f},
+        {-0.4148707237f, -0.2113871920f},
+        { 0.2239269510f, -0.9327228772f},
+        { 1.1341005677f,  0.0000000000f},
+        { 0.1991427888f,  0.8294894121f},
+        {-0.2979296109f,  0.1518027189f},
+        { 0.0398853435f,  0.0466997371f},
+        {-0.0924147241f,  0.1271979554f},
+        {-0.0537752213f, -0.0222744260f},
+        {-0.0050682571f,  0.0319997159f},
+        {-0.0297827710f,  0.0023439549f},
+        { 0.0028072639f,  0.0086398699f},
+        {-0.0130949624f,  0.0080246033f},
+        { 0.0044013628f,  0.0044013628f},
+        {-0.0076574502f,  0.0124958231f},
+        {-0.0014883899f, -0.0004836072f},
+        {-0.0006557520f,  0.0083321188f},
+    },
+    {
+        {-0.0006579390f, -0.0083599075f},       /* Filter 31 */
+        {-0.0056825374f,  0.0018463683f},
+        {-0.0078660833f, -0.0128362814f},
+        { 0.0001096232f, -0.0001096232f},
+        {-0.0153006596f, -0.0093762563f},
+        {-0.0000013054f,  0.0000040177f},
+        {-0.0378715811f, -0.0029805581f},
+        {-0.0026209319f, -0.0165479125f},
+        {-0.0848255565f,  0.0351358959f},
+        {-0.0933954755f, -0.1285478440f},
+        {-0.0116774779f,  0.0136725700f},
+        {-0.4248150656f, -0.2164540873f},
+        { 0.2257857123f, -0.9404651753f},
+        { 1.1327116219f,  0.0000000000f},
+        { 0.1968936193f,  0.8201209469f},
+        {-0.2884725105f,  0.1469840856f},
+        { 0.0432124100f,  0.0505952315f},
+        {-0.0919441775f,  0.1265503037f},
+        {-0.0514013169f, -0.0212911226f},
+        {-0.0052057731f,  0.0328679578f},
+        {-0.0290240862f,  0.0022842451f},
+        { 0.0029885467f,  0.0091978010f},
+        {-0.0128354632f,  0.0078655819f},
+        { 0.0047021127f,  0.0047021127f},
+        {-0.0075997900f,  0.0124017301f},
+        {-0.0011720231f, -0.0003808134f},
+        {-0.0006579390f,  0.0083599075f},
+    },
+    {
+        {-0.0006595075f, -0.0083798372f},       /* Filter 32 */
+        {-0.0060018711f,  0.0019501261f},
+        {-0.0078384594f, -0.0127912031f},
+        {-0.0002405024f,  0.0002405024f},
+        {-0.0153702098f, -0.0094188767f},
+        {-0.0002472237f,  0.0007608763f},
+        {-0.0383261449f, -0.0030163330f},
+        {-0.0023826511f, -0.0150434671f},
+        {-0.0871701184f,  0.0361070452f},
+        {-0.0930374331f, -0.1280550409f},
+        {-0.0162701156f,  0.0190498578f},
+        {-0.4347758804f, -0.2215293759f},
+        { 0.2276093640f, -0.9480612314f},
+        { 1.1311104123f,  0.0000000000f},
+        { 0.1946198263f,  0.8106499175f},
+        {-0.2790727745f,  0.1421946809f},
+        { 0.0464471360f,  0.0543826090f},
+        {-0.0914229663f,  0.1258329180f},
+        {-0.0490373539f, -0.0203119370f},
+        {-0.0053360461f,  0.0336904691f},
+        {-0.0282504297f,  0.0022233570f},
+        { 0.0031642806f,  0.0097386544f},
+        {-0.0125647661f,  0.0076996986f},
+        { 0.0049974389f,  0.0049974388f},
+        {-0.0075365733f,  0.0122985698f},
+        {-0.0008578611f, -0.0002787360f},
+        {-0.0006595075f,  0.0083798372f},
+    },
+    {
+        {-0.0006604618f, -0.0083919627f},       /* Filter 33 */
+        {-0.0063193305f,  0.0020532749f},
+        {-0.0078044017f, -0.0127356261f},
+        {-0.0005920390f,  0.0005920390f},
+        {-0.0154241758f, -0.0094519471f},
+        {-0.0004965997f,  0.0015283766f},
+        {-0.0387524213f, -0.0030498817f},
+        {-0.0021374375f, -0.0134952491f},
+        {-0.0894995944f,  0.0370719458f},
+        {-0.0926123259f, -0.1274699310f},
+        {-0.0209494991f,  0.0245287119f},
+        {-0.4447500311f, -0.2266114595f},
+        { 0.2293972347f, -0.9555082489f},
+        { 1.1292975460f,  0.0000000000f},
+        { 0.1923222223f,  0.8010797080f},
+        {-0.2697330596f,  0.1374358585f},
+        { 0.0495894870f,  0.0580618293f},
+        {-0.0908522954f,  0.1250474569f},
+        {-0.0466847952f, -0.0193374753f},
+        {-0.0054590979f,  0.0344673874f},
+        {-0.0274627107f,  0.0021613622f},
+        { 0.0033343726f,  0.0102621437f},
+        {-0.0122832268f,  0.0075271711f},
+        { 0.0052871211f,  0.0052871211f},
+        {-0.0074678951f,  0.0121864973f},
+        {-0.0005461525f, -0.0001774557f},
+        {-0.0006604618f,  0.0083919627f},
+    },
+    {
+        {-0.0006608067f, -0.0083963451f},       /* Filter 34 */
+        {-0.0066346301f,  0.0021557220f},
+        {-0.0077638924f, -0.0126695210f},
+        {-0.0009446795f,  0.0009446795f},
+        {-0.0154623431f, -0.0094753361f},
+        {-0.0007492498f,  0.0023059539f},
+        {-0.0391495767f, -0.0030811385f},
+        {-0.0018853566f, -0.0119036728f},
+        {-0.0918121426f,  0.0380298346f},
+        {-0.0921192046f, -0.1267912077f},
+        {-0.0257149117f,  0.0301082932f},
+        {-0.4547343588f, -0.2316987286f},
+        { 0.2311486652f, -0.9628034819f},
+        { 1.1272737104f,  0.0000000000f},
+        { 0.1900016262f,  0.7914137299f},
+        {-0.2604559819f,  0.1327089513f},
+        { 0.0526394697f,  0.0616329003f},
+        {-0.0902333798f,  0.1241955926f},
+        {-0.0443450744f, -0.0183683312f},
+        {-0.0055749551f,  0.0351988812f},
+        {-0.0266618369f,  0.0020983321f},
+        { 0.0034987353f,  0.0107680002f},
+        {-0.0119912063f,  0.0073482207f},
+        { 0.0055709463f,  0.0055709463f},
+        {-0.0073938544f,  0.0120656738f},
+        {-0.0002371416f, -0.0000770520f},
+        {-0.0006608067f,  0.0083963451f},
+    },
+    {
+        {-0.0006605475f, -0.0083930522f},       /* Filter 35 */
+        {-0.0069474841f,  0.0022573744f},
+        {-0.0077169192f, -0.0125928676f},
+        {-0.0012981133f,  0.0012981133f},
+        {-0.0154845091f, -0.0094889194f},
+        {-0.0010049855f,  0.0030930272f},
+        {-0.0395167881f, -0.0031100387f},
+        {-0.0016264798f, -0.0102691896f},
+        {-0.0941059032f,  0.0389799414f},
+        {-0.0915571420f, -0.1260175949f},
+        {-0.0305655940f,  0.0357877124f},
+        {-0.4647256838f, -0.2367895630f},
+        { 0.2328630086f, -0.9699442360f},
+        { 1.1250396727f,  0.0000000000f},
+        { 0.1876588631f,  0.7816554194f},
+        {-0.2512441154f,  0.1280152709f},
+        { 0.0555971318f,  0.0650958776f},
+        {-0.0895674434f,  0.1232790098f},
+        {-0.0420195954f, -0.0174050863f},
+        {-0.0056836493f,  0.0358851497f},
+        {-0.0258487141f,  0.0020343379f},
+        { 0.0036572876f,  0.0112559738f},
+        {-0.0116890717f,  0.0071630723f},
+        { 0.0058487082f,  0.0058487082f},
+        {-0.0073145539f,  0.0119362671f},
+        { 0.0000689315f,  0.0000223972f},
+        {-0.0006605475f,  0.0083930522f},
+    },
+    {
+        {-0.0006596901f, -0.0083821579f},       /* Filter 36 */
+        {-0.0072576065f,  0.0023581393f},
+        {-0.0076634750f, -0.0125056546f},
+        {-0.0016520262f,  0.0016520262f},
+        {-0.0154904827f, -0.0094925800f},
+        {-0.0012636128f,  0.0038890004f},
+        {-0.0398532442f, -0.0031365183f},
+        {-0.0013608847f, -0.0085922877f},
+        {-0.0963790005f,  0.0399214891f},
+        {-0.0909252334f, -0.1251478474f},
+        {-0.0355007435f,  0.0415660302f},
+        {-0.4747208072f, -0.2418823327f},
+        { 0.2345396308f, -0.9769278702f},
+        { 1.1225962793f,  0.0000000000f},
+        { 0.1852947639f,  0.7718082372f},
+        {-0.2420999907f,  0.1233561066f},
+        { 0.0584625613f,  0.0684508645f},
+        {-0.0888557186f,  0.1222994047f},
+        {-0.0397097323f, -0.0164483097f},
+        {-0.0057852169f,  0.0365264219f},
+        {-0.0250242456f,  0.0019694508f},
+        { 0.0038099540f,  0.0117258328f},
+        {-0.0113771948f,  0.0069719540f},
+        { 0.0061202077f,  0.0061202077f},
+        {-0.0072301003f,  0.0117984513f},
+        { 0.0003718310f,  0.0001208152f},
+        {-0.0006596901f,  0.0083821579f},
+    },
+    {
+        {-0.0006582408f, -0.0083637423f},       /* Filter 37 */
+        {-0.0075647115f,  0.0024579238f},
+        {-0.0076035587f, -0.0124078801f},
+        {-0.0020061005f,  0.0020061005f},
+        {-0.0154800853f, -0.0094862085f},
+        {-0.0015249332f,  0.0046932617f},
+        {-0.0401581456f, -0.0031605146f},
+        {-0.0010886543f, -0.0068734926f},
+        {-0.0986295432f,  0.0408536944f},
+        {-0.0902225974f, -0.1241807520f},
+        {-0.0405195152f,  0.0474422567f},
+        {-0.4847165122f, -0.2469753988f},
+        { 0.2361779109f, -0.9837517978f},
+        { 1.1199444556f,  0.0000000000f},
+        { 0.1829101645f,  0.7618756659f},
+        {-0.2330260947f,  0.1187327256f},
+        { 0.0612358868f,  0.0716980115f},
+        {-0.0880994453f,  0.1212584838f},
+        {-0.0374168281f, -0.0154985577f},
+        {-0.0058796987f,  0.0371229566f},
+        {-0.0241893313f,  0.0019037417f},
+        { 0.0039566651f,  0.0121773631f},
+        {-0.0110559525f,  0.0067750964f},
+        { 0.0063852527f,  0.0063852526f},
+        {-0.0071406035f,  0.0116524059f},
+        { 0.0006713257f,  0.0002181269f},
+        {-0.0006582408f,  0.0083637423f},
+    },
+    {
+        {-0.0006562063f, -0.0083378917f},       /* Filter 38 */
+        {-0.0078685137f,  0.0025566351f},
+        {-0.0075371745f, -0.0122995509f},
+        {-0.0023600156f,  0.0023600156f},
+        {-0.0154531504f, -0.0094697028f},
+        {-0.0017887430f,  0.0055051847f},
+        {-0.0404307068f, -0.0031819656f},
+        {-0.0008098779f, -0.0051133675f},
+        {-0.1008556255f,  0.0417757679f},
+        {-0.0894483767f, -0.1231151286f},
+        {-0.0456210210f,  0.0534153526f},
+        {-0.4947095655f, -0.2520671138f},
+        { 0.2377772412f, -0.9904134878f},
+        { 1.1170852055f,  0.0000000000f},
+        { 0.1805059061f,  0.7518612089f},
+        {-0.2240248692f,  0.1141463722f},
+        { 0.0639172763f,  0.0748375152f},
+        {-0.0872998705f,  0.1201579635f},
+        {-0.0351421949f, -0.0145563737f},
+        {-0.0059671403f,  0.0376750413f},
+        {-0.0233448674f,  0.0018372809f},
+        { 0.0040973574f,  0.0126103693f},
+        {-0.0107257260f,  0.0065727333f},
+        { 0.0066436583f,  0.0066436583f},
+        {-0.0070461774f,  0.0114983165f},
+        { 0.0009671895f,  0.0003142589f},
+        {-0.0006562063f,  0.0083378917f},
+    },
+    {
+        {-0.0006535939f, -0.0083046980f},       /* Filter 39 */
+        {-0.0081687281f,  0.0026541806f},
+        {-0.0074643325f, -0.0121806836f},
+        {-0.0027134480f,  0.0027134480f},
+        {-0.0154095242f, -0.0094429686f},
+        {-0.0020548339f,  0.0063241284f},
+        {-0.0406701557f, -0.0032008107f},
+        {-0.0005246505f, -0.0033125128f},
+        {-0.1030553278f,  0.0426869144f},
+        {-0.0886017384f, -0.1219498309f},
+        {-0.0508043306f,  0.0594842284f},
+        {-0.5046967186f, -0.2571558224f},
+        { 0.2393370276f, -0.9969104659f},
+        { 1.1140196110f,  0.0000000000f},
+        { 0.1780828343f,  0.7417683886f},
+        {-0.2150987105f,  0.1095982672f},
+        { 0.0665069376f,  0.0778696190f},
+        {-0.0864582472f,  0.1189995684f},
+        {-0.0328871136f, -0.0136222885f},
+        {-0.0060475918f,  0.0381829922f},
+        {-0.0224917457f,  0.0017701388f},
+        { 0.0042319732f,  0.0130246742f},
+        {-0.0103869007f,  0.0063651009f},
+        { 0.0068952472f,  0.0068952472f},
+        {-0.0069469389f,  0.0113363740f},
+        { 0.0012592008f,  0.0004091391f},
+        {-0.0006535939f,  0.0083046980f},
+    },
+    {
+        {-0.0006504113f, -0.0082642593f},       /* Filter 40 */
+        {-0.0084650709f,  0.0027504683f},
+        {-0.0073850485f, -0.0120513039f},
+        {-0.0030660718f,  0.0030660718f},
+        {-0.0153490660f, -0.0094059197f},
+        {-0.0023229930f,  0.0071494373f},
+        {-0.0408757346f, -0.0032169901f},
+        {-0.0002330732f, -0.0014715664f},
+        {-0.1052267179f,  0.0435863337f},
+        {-0.0876818748f, -0.1206837473f},
+        {-0.0560684714f,  0.0656477454f},
+        {-0.5146747091f, -0.2622398626f},
+        { 0.2408566902f, -1.0032403162f},
+        { 1.1107488316f,  0.0000000000f},
+        { 0.1756417989f,  0.7316007446f},
+        {-0.2062499680f,  0.1050896077f},
+        { 0.0690051173f,  0.0807946117f},
+        {-0.0855758340f,  0.1177850307f},
+        {-0.0306528326f, -0.0126968190f},
+        {-0.0061211077f,  0.0386471532f},
+        {-0.0216308523f,  0.0017023850f},
+        { 0.0043604608f,  0.0134201184f},
+        {-0.0100398656f,  0.0061524375f},
+        { 0.0071398493f,  0.0071398493f},
+        {-0.0068430082f,  0.0111667745f},
+        { 0.0015471436f,  0.0005026974f},
+        {-0.0006504113f,  0.0082642593f},
+    },
+    {
+        {-0.0006466667f, -0.0082166790f},       /* Filter 41 */
+        {-0.0087572594f,  0.0028454060f},
+        {-0.0072993441f, -0.0119114470f},
+        {-0.0034175587f,  0.0034175587f},
+        {-0.0152716480f, -0.0093584780f},
+        {-0.0025930028f,  0.0079804420f},
+        {-0.0410467015f, -0.0032304455f},
+        { 0.0000647469f,  0.0004087959f},
+        {-0.1073678519f,  0.0444732204f},
+        {-0.0866880040f, -0.1193158015f},
+        {-0.0614124285f,  0.0719047153f},
+        {-0.5246402627f, -0.2673175657f},
+        { 0.2423356631f, -1.0094006816f},
+        { 1.1072741035f,  0.0000000000f},
+        { 0.1731836536f,  0.7213618325f},
+        {-0.1974809435f,  0.1006215665f},
+        { 0.0714121011f,  0.0836128276f},
+        {-0.0846538939f,  0.1165160891f},
+        {-0.0284405684f, -0.0117804691f},
+        {-0.0061877467f,  0.0390678953f},
+        {-0.0207630684f,  0.0016340889f},
+        { 0.0044827743f,  0.0137965606f},
+        {-0.0096850130f,  0.0059349836f},
+        { 0.0073773020f,  0.0073773020f},
+        {-0.0067345088f,  0.0109897195f},
+        { 0.0018308065f,  0.0005948651f},
+        {-0.0006466667f,  0.0082166790f},
+    },
+    {
+        {-0.0006423686f, -0.0081620664f},       /* Filter 42 */
+        {-0.0090450120f,  0.0029389025f},
+        {-0.0072072465f, -0.0117611574f},
+        {-0.0037675783f,  0.0037675783f},
+        {-0.0151771562f, -0.0093005733f},
+        {-0.0028646414f,  0.0088164597f},
+        {-0.0411823301f, -0.0032411197f},
+        { 0.0003686970f,  0.0023278610f},
+        {-0.1094767749f,  0.0453467649f},
+        {-0.0856193708f, -0.1178449541f},
+        {-0.0668351454f,  0.0782539010f},
+        {-0.5345900940f, -0.2723872580f},
+        { 0.2437733949f, -1.0153892656f},
+        { 1.1035967397f,  0.0000000000f},
+        { 0.1707092554f,  0.7110552220f},
+        {-0.1887938905f,  0.0961952919f},
+        { 0.0737282126f,  0.0863246457f},
+        {-0.0836936943f,  0.1151944878f},
+        {-0.0262515049f, -0.0108737293f},
+        {-0.0062475719f,  0.0394456164f},
+        {-0.0198892682f,  0.0015653194f},
+        { 0.0045988736f,  0.0141538775f},
+        {-0.0093227386f,  0.0057129815f},
+        { 0.0076074506f,  0.0076074506f},
+        {-0.0066215668f,  0.0108054149f},
+        { 0.0021099840f,  0.0006855754f},
+        {-0.0006423686f,  0.0081620664f},
+    },
+    {
+        {-0.0006375260f, -0.0081005359f},       /* Filter 43 */
+        {-0.0093280490f,  0.0030308668f},
+        {-0.0071087889f, -0.0116004892f},
+        {-0.0041157984f,  0.0041157984f},
+        {-0.0150654901f, -0.0092321442f},
+        {-0.0031376826f,  0.0096567942f},
+        {-0.0412819110f, -0.0032489569f},
+        { 0.0006786580f,  0.0042848780f},
+        {-0.1115515226f,  0.0462061535f},
+        {-0.0844752467f, -0.1162702023f},
+        {-0.0723355236f,  0.0846940164f},
+        {-0.5445209082f, -0.2774472605f},
+        { 0.2451693490f, -1.0212038328f},
+        { 1.0997181284f,  0.0000000000f},
+        { 0.1682194641f,  0.7006844950f},
+        {-0.1801910135f,  0.0918119071f},
+        { 0.0759538132f,  0.0889304892f},
+        {-0.0826965057f,  0.1138219754f},
+        {-0.0240867927f, -0.0099770762f},
+        {-0.0063006503f,  0.0397807405f},
+        {-0.0190103194f,  0.0014961446f},
+        { 0.0047087245f,  0.0144919637f},
+        {-0.0089534403f,  0.0054866753f},
+        { 0.0078301476f,  0.0078301476f},
+        {-0.0065043116f,  0.0106140718f},
+        { 0.0023844759f,  0.0007747632f},
+        {-0.0006375260f,  0.0081005359f},
+    },
+    {
+        {-0.0006321484f, -0.0080322075f},       /* Filter 44 */
+        {-0.0096060925f,  0.0031212087f},
+        {-0.0070040103f, -0.0114295060f},
+        {-0.0044618854f,  0.0044618854f},
+        {-0.0149365628f, -0.0091531374f},
+        {-0.0034118961f,  0.0105007365f},
+        {-0.0413447525f, -0.0032539026f},
+        { 0.0009945051f,  0.0062790582f},
+        {-0.1135901216f,  0.0470505689f},
+        {-0.0832549311f, -0.1145905820f},
+        {-0.0779124236f,  0.0912237273f},
+        {-0.5544294025f, -0.2824958906f},
+        { 0.2465230038f, -1.0268422107f},
+        { 1.0956397332f,  0.0000000000f},
+        { 0.1657151424f,  0.6902532446f},
+        {-0.1716744668f,  0.0874725099f},
+        { 0.0780893017f,  0.0914308250f},
+        {-0.0816636012f,  0.1124003042f},
+        {-0.0219475497f, -0.0090909727f},
+        {-0.0063470532f,  0.0400737166f},
+        {-0.0181270820f,  0.0014266323f},
+        { 0.0048122983f,  0.0148107313f},
+        {-0.0085775184f,  0.0052563101f},
+        { 0.0080452535f,  0.0080452535f},
+        {-0.0063828750f,  0.0104159053f},
+        { 0.0026540877f,  0.0008623654f},
+        {-0.0006321484f,  0.0080322075f},
+    },
+    {
+        {-0.0006262457f, -0.0079572062f},       /* Filter 45 */
+        {-0.0098788669f,  0.0032098384f},
+        {-0.0068929555f, -0.0112482810f},
+        {-0.0048055043f,  0.0048055043f},
+        {-0.0147903020f, -0.0090635087f},
+        {-0.0036870475f,  0.0113475654f},
+        {-0.0413701808f, -0.0032559039f},
+        { 0.0013161074f,  0.0083095754f},
+        {-0.1155905906f,  0.0478791903f},
+        {-0.0819577515f, -0.1128051674f},
+        {-0.0835646644f,  0.0978416511f},
+        {-0.5643122679f, -0.2875314620f},
+        { 0.2478338529f, -1.0323022902f},
+        { 1.0913630919f,  0.0000000000f},
+        { 0.1631971552f,  0.6797650728f},
+        {-0.1632463544f,  0.0831781721f},
+        { 0.0801351139f,  0.0938261634f},
+        {-0.0805962556f,  0.1109312291f},
+        {-0.0198348595f, -0.0082158678f},
+        {-0.0063868556f,  0.0403250190f},
+        {-0.0172404079f,  0.0013568495f},
+        { 0.0049095725f,  0.0151101104f},
+        {-0.0081953754f,  0.0050221325f},
+        { 0.0082526365f,  0.0082526365f},
+        {-0.0062573914f,  0.0102111348f},
+        { 0.0029186307f,  0.0009483206f},
+        {-0.0006262457f,  0.0079572062f},
+    },
+    {
+        {-0.0006198280f, -0.0078756618f},       /* Filter 46 */
+        {-0.0101460989f,  0.0032966674f},
+        {-0.0067756751f, -0.0110568969f},
+        {-0.0051463192f,  0.0051463192f},
+        {-0.0146266493f, -0.0089632222f},
+        {-0.0039628985f,  0.0121965475f},
+        {-0.0413575411f, -0.0032549091f},
+        { 0.0016433282f,  0.0103755662f},
+        {-0.1175509420f,  0.0486911944f},
+        {-0.0805830641f, -0.1109130726f},
+        {-0.0892910248f,  0.1045463576f},
+        {-0.5741661901f, -0.2925522861f},
+        { 0.2491014054f, -1.0375820265f},
+        { 1.0868898157f,  0.0000000000f},
+        { 0.1606663689f,  0.6692235895f},
+        {-0.1549087286f,  0.0789299396f},
+        { 0.0820917217f,  0.0961170567f},
+        {-0.0794957450f,  0.1094165063f},
+        {-0.0177497724f, -0.0073521965f},
+        {-0.0064201364f,  0.0405351459f},
+        {-0.0163511406f,  0.0012868627f},
+        { 0.0050005298f,  0.0153900482f},
+        {-0.0078074148f,  0.0047843899f},
+        { 0.0084521727f,  0.0084521727f},
+        {-0.0061279979f,  0.0099999837f},
+        { 0.0031779221f,  0.0010325695f},
+        {-0.0006198280f,  0.0078756618f},
+    },
+    {
+        {-0.0006129060f, -0.0077877091f},       /* Filter 47 */
+        {-0.0104075179f,  0.0033816075f},
+        {-0.0066522258f, -0.0108554460f},
+        {-0.0054839934f,  0.0054839934f},
+        {-0.0144455612f, -0.0088522513f},
+        {-0.0042392071f,  0.0130469379f},
+        {-0.0413061980f, -0.0032508683f},
+        { 0.0019760247f,  0.0124761291f},
+        {-0.1194691818f,  0.0494857553f},
+        {-0.0791302548f, -0.1089134521f},
+        {-0.0950902426f,  0.1113363693f},
+        {-0.5839878512f, -0.2975566724f},
+        { 0.2503251863f, -1.0426794408f},
+        { 1.0822215889f,  0.0000000000f},
+        { 0.1581236518f,  0.6586324102f},
+        {-0.1466635902f,  0.0747288317f},
+        { 0.0839596331f,  0.0983041000f},
+        {-0.0783633460f,  0.1078578927f},
+        {-0.0156933045f, -0.0065003796f},
+        {-0.0064469783f,  0.0407046190f},
+        {-0.0154601145f,  0.0012167374f},
+        { 0.0050851588f,  0.0156505094f},
+        {-0.0074140419f,  0.0045433307f},
+        { 0.0086437458f,  0.0086437458f},
+        {-0.0059948336f,  0.0097826794f},
+        { 0.0034317849f,  0.0011150545f},
+        {-0.0006129060f,  0.0077877091f},
+    },
+};
+
+/* Coefficients for the band edge symbol timing synchroniser */
+#define SYNC_LOW_BAND_EDGE_COEFF_0       1.829281f    /* 2*alpha*cos(low_edge) */
+#define SYNC_LOW_BAND_EDGE_COEFF_1      -0.980100f    /* -alpha^2 */
+#define SYNC_HIGH_BAND_EDGE_COEFF_0     -1.285907f    /* 2*alpha*cos(high_edge) */
+#define SYNC_HIGH_BAND_EDGE_COEFF_1     -0.980100f    /* -alpha^2 */
+#define SYNC_CROSS_CORR_COEFF_A         -0.932131f    /* -alpha^2*sin(freq_diff) */
+#define SYNC_CROSS_CORR_COEFF_B          0.752802f    /* alpha*sin(high_edge) */
+#define SYNC_CROSS_CORR_COEFF_C         -0.378857f    /* -alpha*sin(low_edge) */
+
+float v29_rx_carrier_frequency(v29_rx_state_t *s)
+{
+    return dds_frequencyf(s->carrier_phase_rate);
+}
+/*- End of function --------------------------------------------------------*/
+
+float v29_rx_symbol_timing_correction(v29_rx_state_t *s)
+{
+    return (float) s->total_baud_timing_correction/((float) PULSESHAPER_COEFF_SETS*10.0f/3.0f);
+}
+/*- End of function --------------------------------------------------------*/
+
+void v29_rx_signal_cutoff(v29_rx_state_t *s, float cutoff)
+{
+    /* The 0.4 factor allows for the gain of the DC blocker */
+    s->carrier_on_power = (int32_t) (power_meter_level_dbm0(cutoff + 2.5f)*0.4f);
+    s->carrier_off_power = (int32_t) (power_meter_level_dbm0(cutoff - 2.5f)*0.4f);
+}
+/*- End of function --------------------------------------------------------*/
+
+float v29_rx_signal_power(v29_rx_state_t *s)
+{
+    return power_meter_dbm0(&s->power);
+}
+/*- End of function --------------------------------------------------------*/
+
+int v29_rx_equalizer_state(v29_rx_state_t *s, complexf_t **coeffs)
+{
+    *coeffs = s->eq_coeff;
+    return V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_save(v29_rx_state_t *s)
+{
+    cvec_copyf(s->eq_coeff_save, s->eq_coeff, V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_restore(v29_rx_state_t *s)
+{
+    cvec_copyf(s->eq_coeff, s->eq_coeff_save, V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
+    cvec_zerof(s->eq_buf, V29_EQUALIZER_MASK);
+
+    s->eq_put_step = PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
+    s->eq_step = 0;
+    s->eq_delta = EQUALIZER_DELTA/(V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void equalizer_reset(v29_rx_state_t *s)
+{
+    /* Start with an equalizer based on everything being perfect */
+    cvec_zerof(s->eq_coeff, V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
+    s->eq_coeff[V29_EQUALIZER_PRE_LEN] = complex_setf(3.0f, 0.0f);
+    cvec_zerof(s->eq_buf, V29_EQUALIZER_MASK);
+
+    s->eq_put_step = PULSESHAPER_COEFF_SETS*10/(3*2) - 1;
+    s->eq_step = 0;
+    s->eq_delta = EQUALIZER_DELTA/(V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complexf_t equalizer_get(v29_rx_state_t *s)
+{
+    int i;
+    int p;
+    complexf_t z;
+    complexf_t z1;
+
+    /* Get the next equalized value. */
+    z = complex_setf(0.0f, 0.0f);
+    p = s->eq_step - 1;
+    for (i = 0;  i < V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN;  i++)
+    {
+        p = (p - 1) & V29_EQUALIZER_MASK;
+        z1 = complex_mulf(&s->eq_coeff[i], &s->eq_buf[p]);
+        z = complex_addf(&z, &z1);
+    }
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void tune_equalizer(v29_rx_state_t *s, const complexf_t *z, const complexf_t *target)
+{
+    int i;
+    int p;
+    complexf_t ez;
+    complexf_t z1;
+
+    /* Find the x and y mismatch from the exact constellation position. */
+    ez = complex_subf(target, z);
+    ez.re *= s->eq_delta;
+    ez.im *= s->eq_delta;
+
+    p = s->eq_step - 1;
+    for (i = 0;  i < V29_EQUALIZER_PRE_LEN + 1 + V29_EQUALIZER_POST_LEN;  i++)
+    {
+        p = (p - 1) & V29_EQUALIZER_MASK;
+        z1 = complex_conjf(&s->eq_buf[p]);
+        z1 = complex_mulf(&ez, &z1);
+        s->eq_coeff[i] = complex_addf(&s->eq_coeff[i], &z1);
+        /* Leak a little to tame uncontrolled wandering */
+        s->eq_coeff[i].re *= 0.9999f;
+        s->eq_coeff[i].im *= 0.9999f;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int scrambled_training_bit(v29_rx_state_t *s)
+{
+    int bit;
+
+    /* Segment 3 of the training sequence - the scrambled CDCD part. */
+    /* Apply the 1 + x^-6 + x^-7 scrambler */
+    bit = s->training_scramble_reg & 1;
+    s->training_scramble_reg >>= 1;
+    if (bit ^ (s->training_scramble_reg & 1))
+        s->training_scramble_reg |= 0x40;
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int find_quadrant(const complexf_t *z)
+{
+    int b1;
+    int b2;
+
+    /* Split the space along the two diagonals. */
+    b1 = (z->im > z->re);
+    b2 = (z->im < -z->re);
+    return (b2 << 1) | (b1 ^ b2);
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void track_carrier(v29_rx_state_t *s, const complexf_t *z, const complexf_t *target)
+{
+    float error;
+
+    /* The initial coarse carrier frequency and phase estimation should have
+       got us in the right ballpark. Now we need to fine tune fairly quickly,
+       to get the receovered carrier more precisely on target. Then we need to
+       fine tune in a more damped way to keep us on target. The goal is to have
+       things running really well by the time the training is complete. 
+       We assume the frequency of the oscillators at the two ends drift only
+       very slowly. The PSTN has rather limited doppler problems. :-) Any
+       remaining FDM in the network should also drift slowly. */
+    /* For small errors the imaginary part of the difference between the actual and the target
+       positions is proportional to the phase error, for any particular target. However, the
+       different amplitudes of the various target positions scale things. This isn't all bad,
+       as the angular error for the larger amplitude constellation points is probably
+       a more reliable indicator, and we are weighting it as such. */
+    error = z->im*target->re - z->re*target->im;
+
+    /* Use a proportional-integral approach to tracking the carrier. The PI
+       parameters are coarser at first, until we get precisely on target. Then,
+       the filter will be damped more to keep us on target. */
+    s->carrier_phase_rate += (int32_t) (s->carrier_track_i*error);
+    s->carrier_phase += (int32_t) (s->carrier_track_p*error);
+    //span_log(&s->logging, SPAN_LOG_FLOW, "Im = %15.5f   f = %15.5f\n", error, dds_frequencyf(s->carrier_phase_rate));
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void put_bit(v29_rx_state_t *s, int bit)
+{
+    int out_bit;
+
+    bit &= 1;
+
+    /* Descramble the bit */
+    out_bit = (bit ^ (s->scramble_reg >> 17) ^ (s->scramble_reg >> 22)) & 1;
+    s->scramble_reg = (s->scramble_reg << 1) | bit;
+
+    /* We need to strip the last part of the training - the test period of all 1s -
+       before we let data go to the application. */
+    if (s->in_training == TRAINING_STAGE_NORMAL_OPERATION)
+    {
+        s->put_bit(s->user_data, out_bit);
+    }
+    else
+    {
+        //span_log(&s->logging, SPAN_LOG_FLOW, "bit %5d %d\n", s->training_cd, out_bit);
+        /* The bits during the final stage of training should be all ones. However,
+           buggy modems mean you cannot rely on this. Therefore we don't bother
+           testing for ones, but just rely on a constellation mismatch measurement. */
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void decode_baud(v29_rx_state_t *s, complexf_t *z)
+{
+    static const uint8_t phase_steps_9600[8] =
+    {
+        4, 0, 2, 6, 7, 3, 1, 5
+    };
+    static const uint8_t phase_steps_4800[4] =
+    {
+        0, 2, 3, 1
+    };
+    int nearest;
+    int raw_bits;
+    int i;
+    int re;
+    int im;
+
+    switch (s->bit_rate)
+    {
+    case 9600:
+    default:
+        re = (int) ((z->re + 5.0f)*2.0f);
+        if (re > 19)
+            re = 19;
+        else if (re < 0)
+            re = 0;
+        im = (int) ((z->im + 5.0f)*2.0f);
+        if (im > 19)
+            im = 19;
+        else if (im < 0)
+            im = 0;
+        nearest = space_map_9600[re][im];
+        /* Deal with the amplitude bit */
+        put_bit(s, nearest >> 3);
+        raw_bits = phase_steps_9600[(nearest - s->constellation_state) & 7];
+        for (i = 0;  i < 3;  i++)
+        {
+            put_bit(s, raw_bits);
+            raw_bits >>= 1;
+        }
+        break;
+    case 7200:
+        /* We can reuse the space map for 9600, but drop the top bit */
+        re = (int) ((z->re + 5.0f)*2.0f);
+        if (re > 19)
+            re = 19;
+        else if (re < 0)
+            re = 0;
+        im = (int) ((z->im + 5.0f)*2.0f);
+        if (im > 19)
+            im = 19;
+        else if (im < 0)
+            im = 0;
+        nearest = space_map_9600[re][im] & 7;
+        raw_bits = phase_steps_9600[(nearest - s->constellation_state) & 7];
+        for (i = 0;  i < 3;  i++)
+        {
+            put_bit(s, raw_bits);
+            raw_bits >>= 1;
+        }
+        break;
+    case 4800:
+        nearest = find_quadrant(z) << 1;
+        raw_bits = phase_steps_4800[((nearest - s->constellation_state) >> 1) & 3];
+        put_bit(s, raw_bits);
+        put_bit(s, raw_bits >> 1);
+        break;
+    }
+    track_carrier(s, z, &v29_constellation[nearest]);
+    if (--s->eq_skip <= 0)
+    {
+        /* Once we are in the data the equalization should not need updating.
+           However, the line characteristics may slowly drift. We, therefore,
+           tune up on the occassional sample, keeping the compute down. */
+        s->eq_skip = 10;
+        tune_equalizer(s, z, &v29_constellation[nearest]);
+    }
+    s->constellation_state = nearest;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void process_half_baud(v29_rx_state_t *s, complexf_t *sample)
+{
+    static const int cdcd_pos[6] =
+    {
+        0, 11,
+        0,  3,
+        0,  2
+    };
+    complexf_t z;
+    complexf_t zz;
+    const complexf_t *target;
+    float v;
+    float p;
+    int bit;
+    int i;
+    int j;
+    int32_t angle;
+    int32_t ang;
+
+    /* This routine processes every half a baud, as we put things into the equalizer at the T/2 rate.
+       This routine adapts the position of the half baud samples, which the caller takes. */
+
+    /* Add a sample to the equalizer's circular buffer, but don't calculate anything
+       at this time. */
+    s->eq_buf[s->eq_step] = *sample;
+    s->eq_step = (s->eq_step + 1) & V29_EQUALIZER_MASK;
+
+    /* On alternate insertions we have a whole baud, and must process it. */
+    if ((s->baud_half ^= 1))
+        return;
+
+    /* Symbol timing synchronisation */
+    /* Cross correlate */
+    v = s->symbol_sync_low[1]*s->symbol_sync_high[1]*SYNC_CROSS_CORR_COEFF_A
+      + s->symbol_sync_low[0]*s->symbol_sync_high[1]*SYNC_CROSS_CORR_COEFF_B
+      + s->symbol_sync_low[1]*s->symbol_sync_high[0]*SYNC_CROSS_CORR_COEFF_C;
+
+    /* Filter away any DC component  */
+    p = v - s->symbol_sync_dc_filter[1];
+    s->symbol_sync_dc_filter[1] = s->symbol_sync_dc_filter[0];
+    s->symbol_sync_dc_filter[0] = v;
+    /* A little integration will now filter away much of the noise */
+    s->baud_phase -= p;
+
+    i = 0;
+    if (s->baud_phase > 1000.0f)
+        i = 5;
+    else if (s->baud_phase < -1000.0f)
+        i = -5;
+    else if (s->baud_phase > 100.0f)
+        i = 1;
+    else if (s->baud_phase < -100.0f)
+        i = -1;
+
+    //printf("v = %10.5f %5d - %f %f %d %d\n", v, i, p, s->baud_phase, s->total_baud_timing_correction);
+
+    if (i)
+    {
+        s->eq_put_step += i;
+        s->total_baud_timing_correction += i;
+    }
+
+    z = equalizer_get(s);
+
+    switch (s->in_training)
+    {
+    case TRAINING_STAGE_NORMAL_OPERATION:
+        /* Normal operation. */
+        decode_baud(s, &z);
+        target = &v29_constellation[s->constellation_state];
+        break;
+    case TRAINING_STAGE_SYMBOL_ACQUISITION:
+        /* Allow time for symbol synchronisation to settle the symbol timing. */
+        target = &z;
+        if (++s->training_count >= 60)
+        {
+            /* Record the current phase angle */
+            s->in_training = TRAINING_STAGE_LOG_PHASE;
+            s->angles[0] =
+            s->start_angles[0] = arctan2(z.im, z.re);
+        }
+        break;
+    case TRAINING_STAGE_LOG_PHASE:
+        /* Record the current alternate phase angle */
+        target = &z;
+        s->angles[1] =
+        s->start_angles[1] = arctan2(z.im, z.re);
+        s->training_count = 1;
+        s->in_training = TRAINING_STAGE_WAIT_FOR_CDCD;
+        break;
+    case TRAINING_STAGE_WAIT_FOR_CDCD:
+        target = &z;
+        angle = arctan2(z.im, z.re);
+        /* Look for the initial ABAB sequence to display a phase reversal, which will
+           signal the start of the scrambled CDCD segment */
+        ang = angle - s->angles[(s->training_count - 1) & 0xF];
+        s->angles[(s->training_count + 1) & 0xF] = angle;
+        if ((ang > 0x20000000  ||  ang < -0x20000000)  &&  s->training_count >= 13)
+        {
+            /* We seem to have a phase reversal */
+            /* Slam the carrier frequency into line, based on the total phase drift over the last
+               section. Use the shift from the odd bits and the shift from the even bits to get
+               better jitter suppression. We need to scale here, or at the maximum specified
+               frequency deviation we could overflow, and get a silly answer. */
+            /* Step back a few symbols so we don't get ISI distorting things. */
+            i = (s->training_count - 8) & ~1;
+            /* Avoid the possibility of a divide by zero */
+            if (i)
+            {
+                j = i & 0xF;
+                ang = (s->angles[j] - s->start_angles[0])/i
+                    + (s->angles[j | 0x1] - s->start_angles[1])/i;
+                s->carrier_phase_rate += 3*(ang/20);
+            }
+            span_log(&s->logging, SPAN_LOG_FLOW, "Coarse carrier frequency %7.2f\n", dds_frequencyf(s->carrier_phase_rate));
+            /* Check if the carrier frequency is plausible */
+            if (s->carrier_phase_rate < dds_phase_ratef(CARRIER_NOMINAL_FREQ - 20.0f)
+                ||
+                s->carrier_phase_rate > dds_phase_ratef(CARRIER_NOMINAL_FREQ + 20.0f))
+            {
+               span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
+               /* Park this modem */
+               s->in_training = TRAINING_STAGE_PARKED;
+               s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+               break;
+            }
+            /* Make a step shift in the phase, to pull it into line. We need to rotate the equalizer
+               buffer, as well as the carrier phase, for this to play out nicely. */
+            p = angle*2.0f*3.14159f/(65536.0f*65536.0f);
+            zz = complex_setf(cosf(p), -sinf(p));
+            for (i = 0;  i <= V29_EQUALIZER_MASK;  i++)
+                s->eq_buf[i] = complex_mulf(&s->eq_buf[i], &zz);
+            s->carrier_phase += angle;
+            /* We have just seen the first bit of the scrambled sequence, so skip it. */
+            bit = scrambled_training_bit(s);
+            s->training_count = 1;
+            s->in_training = TRAINING_STAGE_TRAIN_ON_CDCD;
+            break;
+        }
+        if (++s->training_count > V29_TRAINING_SEG_2_LEN)
+        {
+            /* This is bogus. There are not this many bauds in this section
+               of a real training sequence. */
+            span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (sequence failed)\n");
+            /* Park this modem */
+            s->in_training = TRAINING_STAGE_PARKED;
+            s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+        }
+        break;
+    case TRAINING_STAGE_TRAIN_ON_CDCD:
+        /* Train on the scrambled CDCD section. */
+        bit = scrambled_training_bit(s);
+        //span_log(&s->logging, SPAN_LOG_FLOW, "%5d %15.5f, %15.5f     %15.5f, %15.5f\n", s->training_count, z.re, z.im, v29_constellation[cdcd_pos[s->training_cd + bit]].re, v29_constellation[cdcd_pos[s->training_cd + bit]].im);
+        s->constellation_state = cdcd_pos[s->training_cd + bit];
+        target = &v29_constellation[s->constellation_state];
+        track_carrier(s, &z, target);
+        tune_equalizer(s, &z, target);
+        if (++s->training_count >= V29_TRAINING_SEG_3_LEN - 48)
+        {
+            s->in_training = TRAINING_STAGE_TRAIN_ON_CDCD_AND_TEST;
+            s->training_error = 0.0f;
+            s->carrier_track_i = 200.0f;
+            s->carrier_track_p = 1000000.0f;
+        }
+        break;
+    case TRAINING_STAGE_TRAIN_ON_CDCD_AND_TEST:
+        /* Continue training on the scrambled CDCD section, but measure the quality of training too. */
+        bit = scrambled_training_bit(s);
+        //span_log(&s->logging, SPAN_LOG_FLOW, "%5d %15.5f, %15.5f     %15.5f, %15.5f\n", s->training_count, z.re, z.im, v29_constellation[cdcd_pos[s->training_cd + bit]].re, v29_constellation[cdcd_pos[s->training_cd + bit]].im);
+        s->constellation_state = cdcd_pos[s->training_cd + bit];
+        target = &v29_constellation[s->constellation_state];
+        track_carrier(s, &z, target);
+        tune_equalizer(s, &z, target);
+        /* Measure the training error */
+        zz = complex_subf(&z, target);
+        s->training_error += powerf(&zz);
+        if (++s->training_count >= V29_TRAINING_SEG_3_LEN)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "Constellation mismatch %f\n", s->training_error);
+            if (s->training_error < 100.0f)
+            {
+                s->training_count = 0;
+                s->training_cd = 0;
+                s->training_error = 0.0f;
+                s->constellation_state = 0;
+                s->in_training = TRAINING_STAGE_TEST_ONES;
+            }
+            else
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (convergence failed)\n");
+                /* Park this modem */
+                s->in_training = TRAINING_STAGE_PARKED;
+                s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+            }
+        }
+        break;
+    case TRAINING_STAGE_TEST_ONES:
+        /* We are in the test phase, where we check that we can receive reliably.
+           We should get a run of 1's, 48 symbols (192 bits at 9600bps) long. */
+        //span_log(&s->logging, SPAN_LOG_FLOW, "%5d %15.5f, %15.5f\n", s->training_count, z.re, z.im);
+        decode_baud(s, &z);
+        target = &v29_constellation[s->constellation_state];
+        /* Measure the training error */
+        zz = complex_subf(&z, target);
+        s->training_error += powerf(&zz);
+        if (++s->training_count >= V29_TRAINING_SEG_4_LEN)
+        {
+            if (s->training_error < 50.0f)
+            {
+                /* We are up and running */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Training succeeded (constellation mismatch %f)\n", s->training_error);
+                s->put_bit(s->user_data, PUTBIT_TRAINING_SUCCEEDED);
+                /* Apply some lag to the carrier off condition, to ensure the last few bits get pushed through
+                   the processing. */
+                s->carrier_present = 60;
+                s->in_training = TRAINING_STAGE_NORMAL_OPERATION;
+                equalizer_save(s);
+                s->carrier_phase_rate_save = s->carrier_phase_rate;
+                s->agc_scaling_save = s->agc_scaling;
+            }
+            else
+            {
+                /* Training has failed */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Training failed (constellation mismatch %f)\n", s->training_error);
+                /* Park this modem */
+                s->put_bit(s->user_data, PUTBIT_TRAINING_FAILED);
+                s->in_training = TRAINING_STAGE_PARKED;
+            }
+        }
+        break;
+    case TRAINING_STAGE_PARKED:
+    default:
+        /* We failed to train! */
+        /* Park here until the carrier drops. */
+        target = &z;
+        break;
+    }
+    if (s->qam_report)
+        s->qam_report(s->qam_user_data, &z, target, s->constellation_state);
+}
+/*- End of function --------------------------------------------------------*/
+
+int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
+{
+    int i;
+    int j;
+    int step;
+    complexf_t z;
+    complexf_t zz;
+    complexf_t sample;
+    int32_t power;
+    float v;
+
+    for (i = 0;  i < len;  i++)
+    {
+        s->rrc_filter[s->rrc_filter_step] =
+        s->rrc_filter[s->rrc_filter_step + V29_RX_FILTER_STEPS] = amp[i];
+        if (++s->rrc_filter_step >= V29_RX_FILTER_STEPS)
+            s->rrc_filter_step = 0;
+
+        /* There should be no DC in the signal, but sometimes there is.
+           We need to measure the power with the DC blocked, but not using
+           a slow to respond DC blocker. Use the most elementary HPF. */
+        power = power_meter_update(&(s->power), (amp[i] - s->last_sample) >> 1);
+        s->last_sample = amp[i];
+        if (s->carrier_present)
+        {
+            /* Look for power below turn-off threshold to turn the carrier off */
+            if (power < s->carrier_off_power)
+            {
+                if (--s->carrier_present <= 0)
+                {
+                    /* Count down a short delay, to ensure we push the last
+                       few bits through the filters before stopping. */
+                    v29_rx_restart(s, s->bit_rate, FALSE);
+                    s->put_bit(s->user_data, PUTBIT_CARRIER_DOWN);
+                    continue;
+                }
+            }
+        }
+        else
+        {
+            /* Look for power exceeding turn-on threshold to turn the carrier on */
+            if (power < s->carrier_on_power)
+                continue;
+            s->carrier_present = 1;
+            s->put_bit(s->user_data, PUTBIT_CARRIER_UP);
+        }
+        if (s->in_training != TRAINING_STAGE_PARKED)
+        {
+            /* Only spend effort processing this data if the modem is not
+               parked, after training failure. */
+            s->eq_put_step -= PULSESHAPER_COEFF_SETS;
+            step = -s->eq_put_step;
+            if (step > PULSESHAPER_COEFF_SETS - 1)
+                step = PULSESHAPER_COEFF_SETS - 1;
+            if (step < 0)
+                step += PULSESHAPER_COEFF_SETS;
+            zz.re = pulseshaper[step][0].re*s->rrc_filter[s->rrc_filter_step];
+            for (j = 1;  j < V29_RX_FILTER_STEPS;  j++)
+                zz.re += pulseshaper[step][j].re*s->rrc_filter[j + s->rrc_filter_step];
+            sample.re = zz.re*s->agc_scaling;
+
+            /* Symbol timing synchronisation band edge filters */
+            /* Low Nyquist band edge filter */
+            v = s->symbol_sync_low[0]*SYNC_LOW_BAND_EDGE_COEFF_0 + s->symbol_sync_low[1]*SYNC_LOW_BAND_EDGE_COEFF_1 + sample.re;
+            s->symbol_sync_low[1] = s->symbol_sync_low[0];
+            s->symbol_sync_low[0] = v;
+            /* High Nyquist band edge filter */
+            v = s->symbol_sync_high[0]*SYNC_HIGH_BAND_EDGE_COEFF_0 + s->symbol_sync_high[1]*SYNC_HIGH_BAND_EDGE_COEFF_1 + sample.re;
+            s->symbol_sync_high[1] = s->symbol_sync_high[0];
+            s->symbol_sync_high[0] = v;
+
+            z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
+
+            /* Put things into the equalization buffer at T/2 rate. The symbol synchronisation
+               will fiddle the step to align this with the symbols. */
+            if (s->eq_put_step <= 0)
+            {
+                if (s->in_training == TRAINING_STAGE_SYMBOL_ACQUISITION)
+                {
+                    /* Only AGC during the initial training */
+                    s->agc_scaling = (1.0f/PULSESHAPER_GAIN)*5.0f*0.72f/sqrtf(power);
+                }
+                /* Pulse shape while still at the carrier frequency, using a quadrature
+                   pair of filters. This results in a properly bandpass filtered complex
+                   signal, which can be brought directly to bandband by complex mixing.
+                   No further filtering, to remove mixer harmonics, is needed. */
+                step = -s->eq_put_step;
+                if (step > PULSESHAPER_COEFF_SETS - 1)
+                    step = PULSESHAPER_COEFF_SETS - 1;
+                zz.im = pulseshaper[step][0].im*s->rrc_filter[s->rrc_filter_step];
+                for (j = 1;  j < V29_RX_FILTER_STEPS;  j++)
+                    zz.im += pulseshaper[step][j].im*s->rrc_filter[j + s->rrc_filter_step];
+                sample.re = zz.re*s->agc_scaling;
+                sample.im = zz.im*s->agc_scaling;
+                s->eq_put_step += PULSESHAPER_COEFF_SETS*10/(3*2);
+                /* Shift to baseband - since this is done in a full complex form, the
+                   result is clean, and requires no further filtering, apart from the
+                   equalizer. */
+                zz.re = sample.re*z.re - sample.im*z.im;
+                zz.im = -sample.re*z.im - sample.im*z.re;
+                process_half_baud(s, &zz);
+            }
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v29_rx_set_put_bit(v29_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
+{
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v29_rx_restart(v29_rx_state_t *s, int rate, int old_train)
+{
+    switch (rate)
+    {
+    case 9600:
+        s->training_cd = 0;
+        break;
+    case 7200:
+        s->training_cd = 2;
+        break;
+    case 4800:
+        s->training_cd = 4;
+        break;
+    default:
+        return -1;
+    }
+    s->bit_rate = rate;
+
+    vec_zerof(s->rrc_filter, sizeof(s->rrc_filter)/sizeof(s->rrc_filter[0]));
+    s->rrc_filter_step = 0;
+
+    s->scramble_reg = 0;
+    s->training_scramble_reg = 0x2A;
+    s->in_training = TRAINING_STAGE_SYMBOL_ACQUISITION;
+    s->training_count = 0;
+    s->carrier_present = 0;
+    s->old_train = old_train;
+
+    s->carrier_phase = 0;
+    s->carrier_track_i = 8000.0f;
+    s->carrier_track_p = 8000000.0f;
+
+    power_meter_init(&(s->power), 4);
+
+    s->constellation_state = 0;
+
+    if (s->old_train)
+    {
+        s->carrier_phase_rate = s->carrier_phase_rate_save;
+        s->agc_scaling = s->agc_scaling_save;
+        equalizer_restore(s);
+    }
+    else
+    {
+        s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
+        s->agc_scaling = 0.0005f;
+        equalizer_reset(s);
+    }
+    s->eq_skip = 0;
+    s->last_sample = 0;
+
+    /* Initialise the working data for symbol timing synchronisation */
+    s->symbol_sync_low[0] = 0.0f;
+    s->symbol_sync_low[1] = 0.0f;
+    s->symbol_sync_high[0] = 0.0f;
+    s->symbol_sync_high[1] = 0.0f;
+    s->symbol_sync_dc_filter[0] = 0.0f;
+    s->symbol_sync_dc_filter[1] = 0.0f;
+    s->baud_phase = 0.0f;
+    s->baud_half = 0;
+
+    s->total_baud_timing_correction = 0;
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+v29_rx_state_t *v29_rx_init(v29_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data)
+{
+    if (s == NULL)
+    {
+        if ((s = (v29_rx_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+
+    memset(s, 0, sizeof(*s));
+    s->put_bit = put_bit;
+    s->user_data = user_data;
+    /* The V.29 spec says the thresholds should be -31dBm and -26dBm, but that makes little
+       sense. V.17 uses -48dBm and -43dBm, and there seems no good reason to cut off at a
+       higher level (though at 9600bps and 7200bps, TCM should put V.17 sensitivity several
+       dB ahead of V.29). */
+    /* The thresholds should be on at -26dBm0 and off at -31dBm0 */
+    v29_rx_signal_cutoff(s, -28.5f);
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "V.29");
+
+    v29_rx_restart(s, rate, FALSE);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v29_rx_release(v29_rx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v29_rx_set_qam_report_handler(v29_rx_state_t *s, qam_report_handler_t *handler, void *user_data)
+{
+    s->qam_report = handler;
+    s->qam_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v29tx.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,459 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v29tx.c - ITU V.29 modem transmit part
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v29tx.c,v 1.58 2006/11/28 16:59:57 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/complex.h"
+#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
+#include "spandsp/async.h"
+#include "spandsp/dds.h"
+#include "spandsp/power_meter.h"
+
+#include "spandsp/v29tx.h"
+
+#define CARRIER_NOMINAL_FREQ        1700.0f
+
+/* Segments of the training sequence */
+#define V29_TRAINING_SEG_TEP        0
+#define V29_TRAINING_SEG_1          (V29_TRAINING_SEG_TEP + 480)
+#define V29_TRAINING_SEG_2          (V29_TRAINING_SEG_1 + 48)
+#define V29_TRAINING_SEG_3          (V29_TRAINING_SEG_2 + 128)
+#define V29_TRAINING_SEG_4          (V29_TRAINING_SEG_3 + 384)
+#define V29_TRAINING_END            (V29_TRAINING_SEG_4 + 48)
+#define V29_TRAINING_SHUTDOWN_END   (V29_TRAINING_END + 32)
+
+/* Raised root cosine pulse shaping; Beta = 0.25; 4 symbols either
+   side of the centre. */
+/* Created with mkshape -r 0.05 0.25 91 -l and then split up */
+#define PULSESHAPER_GAIN            (9.9888356312f/10.0f)
+#define PULSESHAPER_COEFF_SETS      10
+
+static const float pulseshaper[PULSESHAPER_COEFF_SETS][V29_TX_FILTER_STEPS] =
+{
+    {
+        -0.0029426223f,         /* Filter 0 */
+        -0.0183060118f,
+         0.0653192857f,
+        -0.1703207714f,
+         0.6218069936f,
+         0.6218069936f,
+        -0.1703207714f,
+         0.0653192857f,
+        -0.0183060118f
+    },
+    {
+         0.0031876922f,         /* Filter 1 */
+        -0.0300884145f,
+         0.0832744718f,
+        -0.1974255221f,
+         0.7664229820f,
+         0.4670580725f,
+        -0.1291107519f,
+         0.0424189243f,
+        -0.0059810465f
+    },
+    {
+         0.0097229236f,         /* Filter 2 */
+        -0.0394811291f,
+         0.0931039664f,
+        -0.2043906784f,
+         0.8910868760f,
+         0.3122713836f,
+        -0.0802880559f,
+         0.0179050490f,
+         0.0052057308f
+    },
+    {
+         0.0156117223f,         /* Filter 3 */
+        -0.0447125347f,
+         0.0922040267f,
+        -0.1862939416f,
+         0.9870942864f,
+         0.1669790517f,
+        -0.0301581072f,
+        -0.0051358510f,
+         0.0139350286f
+    },
+    {
+         0.0197702545f,         /* Filter 4 */
+        -0.0443470335f,
+         0.0789538534f,
+        -0.1399184160f,
+         1.0476130256f,
+         0.0393903028f,
+         0.0157339854f,
+        -0.0241879599f,
+         0.0193774571f
+    },
+    {
+         0.0212455717f,         /* Filter 5 */
+        -0.0375307894f,
+         0.0530516472f,
+        -0.0642195521f,
+         1.0682849922f,
+        -0.0642195521f,
+         0.0530516472f,
+        -0.0375307894f,
+         0.0212455717f
+    },
+    {
+         0.0193774571f,         /* Filter 6 */
+        -0.0241879599f,
+         0.0157339854f,
+         0.0393903028f,
+         1.0476130256f,
+        -0.1399184160f,
+         0.0789538534f,
+        -0.0443470335f,
+         0.0197702545f
+    },
+    {
+         0.0139350286f,         /* Filter 7 */
+        -0.0051358510f,
+        -0.0301581072f,
+         0.1669790517f,
+         0.9870942864f,
+        -0.1862939416f,
+         0.0922040267f,
+        -0.0447125347f,
+         0.0156117223f
+    },
+    {
+         0.0052057308f,         /* Filter 8 */
+         0.0179050490f,
+        -0.0802880559f,
+         0.3122713836f,
+         0.8910868760f,
+        -0.2043906784f,
+         0.0931039664f,
+        -0.0394811291f,
+         0.0097229236f
+    },
+    {
+        -0.0059810465f,         /* Filter 9 */
+         0.0424189243f,
+        -0.1291107519f,
+         0.4670580725f,
+         0.7664229820f,
+        -0.1974255221f,
+         0.0832744718f,
+        -0.0300884145f,
+         0.0031876922f
+    },
+};
+
+static int fake_get_bit(void *user_data)
+{
+    return 1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int get_scrambled_bit(v29_tx_state_t *s)
+{
+    int bit;
+    int out_bit;
+
+    if ((bit = s->current_get_bit(s->user_data)) == PUTBIT_END_OF_DATA)
+    {
+        /* End of real data. Switch to the fake get_bit routine, until we
+           have shut down completely. */
+        s->current_get_bit = fake_get_bit;
+        s->in_training = TRUE;
+        bit = 1;
+    }
+    out_bit = (bit ^ (s->scramble_reg >> 17) ^ (s->scramble_reg >> 22)) & 1;
+    s->scramble_reg = (s->scramble_reg << 1) | out_bit;
+    return out_bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ complexf_t getbaud(v29_tx_state_t *s)
+{
+    static const int phase_steps_9600[8] =
+    {
+        1, 0, 2, 3, 6, 7, 5, 4
+    };
+    static const int phase_steps_4800[4] =
+    {
+        0, 2, 6, 4
+    };
+    static const complexf_t constellation[16] =
+    {
+        { 3.0,  0.0},   /*   0deg low  */
+        { 1.0,  1.0},   /*  45deg low  */
+        { 0.0,  3.0},   /*  90deg low  */
+        {-1.0,  1.0},   /* 135deg low  */
+        {-3.0,  0.0},   /* 180deg low  */
+        {-1.0, -1.0},   /* 225deg low  */
+        { 0.0, -3.0},   /* 270deg low  */
+        { 1.0, -1.0},   /* 315deg low  */
+        { 5.0,  0.0},   /*   0deg high */
+        { 3.0,  3.0},   /*  45deg high */
+        { 0.0,  5.0},   /*  90deg high */
+        {-3.0,  3.0},   /* 135deg high */
+        {-5.0,  0.0},   /* 180deg high */
+        {-3.0, -3.0},   /* 225deg high */
+        { 0.0, -5.0},   /* 270deg high */
+        { 3.0, -3.0}    /* 315deg high */
+    };
+    static const complexf_t abab[6] =
+    {
+        { 3.0, -3.0},   /* 315deg high 9600 */
+        {-3.0,  0.0},   /* 180deg low       */
+        { 1.0, -1.0},   /* 315deg low 7200  */
+        {-3.0,  0.0},   /* 180deg low       */
+        { 0.0, -3.0},   /* 270deg low 4800  */
+        {-3.0,  0.0}    /* 180deg low       */
+    };
+    static const complexf_t cdcd[6] =
+    {
+        { 3.0,  0.0},   /*   0deg low 9600  */
+        {-3.0,  3.0},   /* 135deg high      */
+        { 3.0,  0.0},   /*   0deg low 7200  */
+        {-1.0,  1.0},   /* 135deg low       */
+        { 3.0,  0.0},   /*   0deg low 4800  */
+        { 0.0,  3.0}    /*  90deg low       */
+    };
+    int bits;
+    int amp;
+    int bit;
+
+    if (s->in_training)
+    {
+        /* Send the training sequence */
+        if (++s->training_step <= V29_TRAINING_SEG_4)
+        {
+            if (s->training_step <= V29_TRAINING_SEG_3)
+            {
+                if (s->training_step <= V29_TRAINING_SEG_1)
+                {
+                    /* Optional segment: Unmodulated carrier (talker echo protection) */
+                    return constellation[0];
+                }
+                if (s->training_step <= V29_TRAINING_SEG_2)
+                {
+                    /* Segment 1: silence */
+                    return complex_setf(0.0f, 0.0f);
+                }
+                /* Segment 2: ABAB... */
+                return abab[(s->training_step & 1) + s->training_offset];
+            }
+            /* Segment 3: CDCD... */
+            /* Apply the 1 + x^-6 + x^-7 training scrambler */
+            bit = s->training_scramble_reg & 1;
+            s->training_scramble_reg >>= 1;
+            s->training_scramble_reg |= (((bit ^ s->training_scramble_reg) & 1) << 6);
+            return cdcd[bit + s->training_offset];
+        }
+        /* We should be in the block of test ones, or shutdown ones, if we get here. */
+        /* There is no graceful shutdown procedure defined for V.29. Just
+           send some ones, to ensure we get the real data bits through, even
+           with bad ISI. */
+        if (s->training_step == V29_TRAINING_END + 1)
+        {
+            /* Switch from the fake get_bit routine, to the user supplied real
+               one, and we are up and running. */
+            s->current_get_bit = s->get_bit;
+            s->in_training = FALSE;
+        }
+    }
+    /* 9600bps uses the full constellation.
+       7200bps uses only the first half of the full constellation.
+       4800bps uses the smaller constellation. */
+    amp = 0;
+    /* We only use an amplitude bit at 9600bps */
+    if (s->bit_rate == 9600  &&  get_scrambled_bit(s))
+        amp = 8;
+    /*endif*/
+    bits = get_scrambled_bit(s);
+    bits = (bits << 1) | get_scrambled_bit(s);
+    if (s->bit_rate == 4800)
+    {
+        bits = phase_steps_4800[bits];
+    }
+    else
+    {
+        bits = (bits << 1) | get_scrambled_bit(s);
+        bits = phase_steps_9600[bits];
+    }
+    s->constellation_state = (s->constellation_state + bits) & 7;
+    return constellation[amp | s->constellation_state];
+}
+/*- End of function --------------------------------------------------------*/
+
+int v29_tx(v29_tx_state_t *s, int16_t amp[], int len)
+{
+    complexf_t x;
+    complexf_t z;
+    int i;
+    int sample;
+
+    if (s->training_step >= V29_TRAINING_SHUTDOWN_END)
+    {
+        /* Once we have sent the shutdown symbols, we stop sending completely. */
+        return 0;
+    }
+    for (sample = 0;  sample < len;  sample++)
+    {
+        if ((s->baud_phase += 3) >= 10)
+        {
+            s->baud_phase -= 10;
+            s->rrc_filter[s->rrc_filter_step] =
+            s->rrc_filter[s->rrc_filter_step + V29_TX_FILTER_STEPS] = getbaud(s);
+            if (++s->rrc_filter_step >= V29_TX_FILTER_STEPS)
+                s->rrc_filter_step = 0;
+        }
+        /* Root raised cosine pulse shaping at baseband */
+        x.re = 0.0f;
+        x.im = 0.0f;
+        for (i = 0;  i < V29_TX_FILTER_STEPS;  i++)
+        {
+            x.re += pulseshaper[9 - s->baud_phase][i]*s->rrc_filter[i + s->rrc_filter_step].re;
+            x.im += pulseshaper[9 - s->baud_phase][i]*s->rrc_filter[i + s->rrc_filter_step].im;
+        }
+        /* Now create and modulate the carrier */
+        z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
+        /* Don't bother saturating. We should never clip. */
+        amp[sample] = (int16_t) lrintf((x.re*z.re - x.im*z.im)*s->gain);
+    }
+    return sample;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void set_working_gain(v29_tx_state_t *s)
+{
+    switch (s->bit_rate)
+    {
+    case 9600:
+        s->gain = 0.387f*s->base_gain;
+        break;
+    case 7200:
+        s->gain = 0.605f*s->base_gain;
+        break;
+    case 4800:
+        s->gain = 0.470f*s->base_gain;
+        break;
+    default:
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void v29_tx_power(v29_tx_state_t *s, float power)
+{
+    /* The constellation does not maintain constant average power as we change bit rates.
+       We need to scale the gain we get here by a bit rate specific scaling factor each
+       time we restart the modem. */
+    s->base_gain = powf(10.0f, (power - DBM0_MAX_POWER)/20.0f)*32768.0f/PULSESHAPER_GAIN;
+    set_working_gain(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+void v29_tx_set_get_bit(v29_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
+{
+    if (s->get_bit == s->current_get_bit)
+        s->current_get_bit = get_bit;
+    s->get_bit = get_bit;
+    s->user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v29_tx_restart(v29_tx_state_t *s, int rate, int tep)
+{
+    span_log(&s->logging, SPAN_LOG_FLOW, "Restarting V.29\n");
+    s->bit_rate = rate;
+    set_working_gain(s);
+    switch (s->bit_rate)
+    {
+    case 9600:
+        s->training_offset = 0;
+        break;
+    case 7200:
+        s->training_offset = 2;
+        break;
+    case 4800:
+        s->training_offset = 4;
+        break;
+    default:
+        return -1;
+    }
+    cvec_zerof(s->rrc_filter, sizeof(s->rrc_filter)/sizeof(s->rrc_filter[0]));
+    s->rrc_filter_step = 0;
+    s->scramble_reg = 0;
+    s->training_scramble_reg = 0x2A;
+    s->in_training = TRUE;
+    s->training_step = (tep)  ?  V29_TRAINING_SEG_TEP  :  V29_TRAINING_SEG_1;
+    s->carrier_phase = 0;
+    s->baud_phase = 0;
+    s->constellation_state = 0;
+    s->current_get_bit = fake_get_bit;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+v29_tx_state_t *v29_tx_init(v29_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data)
+{
+    if (s == NULL)
+    {
+        if ((s = (v29_tx_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+    s->get_bit = get_bit;
+    s->user_data = user_data;
+    s->carrier_phase_rate = dds_phase_ratef(CARRIER_NOMINAL_FREQ);
+    v29_tx_power(s, -14.0f);
+    v29_tx_restart(s, rate, tep);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v29_tx_release(v29_tx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v42.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1443 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v42.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v42.c,v 1.30 2006/12/01 18:00:48 steveu Exp $
+ */
+
+/* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#include <errno.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/async.h"
+#include "spandsp/hdlc.h"
+#include "spandsp/schedule.h"
+#include "spandsp/queue.h"
+#include "spandsp/v42.h"
+
+#if !defined(FALSE)
+#define FALSE   0
+#endif
+#if !defined(TRUE)
+#define TRUE    (!FALSE)
+#endif
+
+#define LAPM_FRAMETYPE_MASK         0x03
+
+#define LAPM_FRAMETYPE_I            0x00
+#define LAPM_FRAMETYPE_I_ALT        0x02
+#define LAPM_FRAMETYPE_S            0x01
+#define LAPM_FRAMETYPE_U            0x03
+
+/* Timer values */
+
+#define T_WAIT_MIN                  2000
+#define T_WAIT_MAX                  10000
+/* Detection phase timer */
+#define T_400                       750
+/* Acknowledgement timer - 1 second between SABME's */
+#define T_401                       1000
+/* Replay delay timer (optional) */
+#define T_402                       1000
+/* Inactivity timer (optional). No default - use 10 seconds with no packets */
+#define T_403                       10000
+/* Max retries */
+#define N_400                       3
+/* Max octets in an information field */
+#define N_401                       128
+
+#define LAPM_DLCI_DTE_TO_DTE        0
+#define LAPM_DLCI_LAYER2_MANAGEMENT 63
+
+static void t401_expired(span_sched_state_t *s, void *user_data);
+static void t403_expired(span_sched_state_t *s, void *user_data);
+
+void lapm_reset(lapm_state_t *s);
+void lapm_restart(lapm_state_t *s);
+
+static void lapm_link_down(lapm_state_t *s);
+
+static __inline__ void lapm_init_header(uint8_t *frame, int command)
+{
+    /* Data link connection identifier (0) */
+    /* Command/response (0 if answerer, 1 if originator) */
+    /* Extended address (1) */
+    frame[0] = (LAPM_DLCI_DTE_TO_DTE << 2) | ((command)  ?  0x02  :  0x00) | 0x01;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int lapm_tx_frame(lapm_state_t *s, uint8_t *frame, int len)
+{
+    if ((s->debug & LAPM_DEBUG_LAPM_DUMP))
+        lapm_dump(s, frame, len, s->debug & LAPM_DEBUG_LAPM_RAW, TRUE);
+    /*endif*/
+    hdlc_tx_frame(&s->hdlc_tx, frame, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void t400_expired(span_sched_state_t *ss, void *user_data)
+{
+    v42_state_t *s;
+    
+    /* Give up trying to detect a V.42 capable peer. */
+    s = (v42_state_t *) user_data;
+    s->t400_timer = -1;
+    s->lapm.state = LAPM_UNSUPPORTED;
+    if (s->lapm.status_callback)
+        s->lapm.status_callback(s->lapm.status_callback_user_data, s->lapm.state);
+    /*endif*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lapm_send_ua(lapm_state_t *s, int pfbit)
+{
+    uint8_t frame[3];
+
+    lapm_init_header(frame, !s->we_are_originator);
+    frame[1] = (uint8_t) (0x63 | (pfbit << 4));
+    frame[2] = 0;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Sending unnumbered acknowledgement\n");
+    lapm_tx_frame(s, frame, 3);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lapm_send_sabme(span_sched_state_t *ss, void *user_data)
+{
+    lapm_state_t *s;
+    uint8_t frame[3];
+
+    s = (lapm_state_t *) user_data;
+    if (s->t401_timer >= 0)
+    {
+fprintf(stderr, "Deleting T401 q [%p]\n", (void *) s);
+        span_schedule_del(&s->sched, s->t401_timer);
+        s->t401_timer = -1;
+    }
+    /*endif*/
+    if (++s->retransmissions > N_400)
+    {
+        /* 8.3.2.2 Too many retries */
+        s->state = LAPM_RELEASE;
+        if (s->status_callback)
+            s->status_callback(s->status_callback_user_data, s->state);
+        /*endif*/
+        return;
+    }
+    /*endif*/
+fprintf(stderr, "Setting T401 a [%p]\n", (void *) s);
+    s->t401_timer = span_schedule_event(&s->sched, T_401, lapm_send_sabme, s);
+    lapm_init_header(frame, s->we_are_originator);
+    frame[1] = 0x7F;
+    frame[2] = 0;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Sending SABME (set asynchronous balanced mode extended)\n");
+    lapm_tx_frame(s, frame, 3);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int lapm_ack_packet(lapm_state_t *s, int num)
+{
+    lapm_frame_queue_t *f;
+    lapm_frame_queue_t *prev;
+
+    for (prev = NULL, f = s->txqueue;  f;  prev = f, f = f->next)
+    {
+        if ((f->frame[1] >> 1) == num)
+        {
+            /* Cancel each packet, as necessary */
+            if (prev)
+                prev->next = f->next;
+            else
+                s->txqueue = f->next;
+            /*endif*/
+            span_log(&s->logging,
+                     SPAN_LOG_FLOW,
+                     "-- ACKing packet %d. New txqueue is %d (-1 means empty)\n",
+                     (f->frame[1] >> 1),
+                     (s->txqueue)  ?  (s->txqueue->frame[1] >> 1)  :  -1);
+            s->last_frame_peer_acknowledged = num;
+            free(f);
+            /* Reset retransmission count if we actually acked something */
+            s->retransmissions = 0;
+            return 1;
+        }
+        /*endif*/
+    }
+    /*endfor*/
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lapm_ack_rx(lapm_state_t *s, int ack)
+{
+    int i;
+    int cnt;
+
+    /* This might not be acking anything new */
+    if (s->last_frame_peer_acknowledged == ack)
+        return;
+    /*endif*/
+    /* It should be acking something that is actually outstanding */
+    if ((s->last_frame_peer_acknowledged < s->next_tx_frame  &&  (ack < s->last_frame_peer_acknowledged  ||  ack > s->next_tx_frame))
+        ||
+        (s->last_frame_peer_acknowledged > s->next_tx_frame  &&  (ack > s->last_frame_peer_acknowledged  ||  ack < s->next_tx_frame)))
+    {
+        /* ACK was outside our window --- ignore */
+        span_log(&s->logging, SPAN_LOG_FLOW, "ACK received outside window, ignoring\n");
+        return;
+    }
+    /*endif*/
+    
+    /* Cancel each packet, as necessary */
+    span_log(&s->logging,
+             SPAN_LOG_FLOW,
+             "-- ACKing all packets from %d to (but not including) %d\n",
+             s->last_frame_peer_acknowledged,
+             ack);
+    for (cnt = 0, i = s->last_frame_peer_acknowledged;  i != ack;  i = (i + 1) & 0x7F) 
+        cnt += lapm_ack_packet(s, i);
+    /*endfor*/
+    s->last_frame_peer_acknowledged = ack;
+    if (s->txqueue == NULL)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "-- Since there was nothing left, stopping timer T_401\n");
+        /* Something was ACK'd.  Stop timer T_401. */
+fprintf(stderr, "T401 a is %d [%p]\n", s->t401_timer, (void *) s);
+        if (s->t401_timer >= 0)
+        {
+fprintf(stderr, "Deleting T401 a [%p]\n", (void *) s);
+            span_schedule_del(&s->sched, s->t401_timer);
+            s->t401_timer = -1;
+        }
+        /*endif*/
+    }
+    /*endif*/
+    if (s->t403_timer >= 0)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "-- Stopping timer T_403, since we got an ACK\n");
+        if (s->t403_timer >= 0)
+        {
+fprintf(stderr, "Deleting T403 b\n");
+            span_schedule_del(&s->sched, s->t403_timer);
+            s->t403_timer = -1;
+        }
+        /*endif*/
+    }
+    /*endif*/
+    if (s->txqueue)
+    {
+        /* Something left to transmit. Start timer T_401 again if it is stopped */
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW,
+                 "-- Something left to transmit (%d). Restarting timer T_401\n",
+                 s->txqueue->frame[1] >> 1);
+        if (s->t401_timer < 0)
+        {
+fprintf(stderr, "Setting T401 b [%p]\n", (void *) s);
+            s->t401_timer = span_schedule_event(&s->sched, T_401, t401_expired, s);
+        }
+        /*endif*/
+    }
+    else
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "-- Nothing left, starting timer T_403\n");
+        /* Nothing to transmit. Start timer T_403. */
+fprintf(stderr, "Setting T403 c\n");
+        s->t403_timer = span_schedule_event(&s->sched, T_403, t403_expired, s);
+    }
+    /*endif*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lapm_reject(lapm_state_t *s)
+{
+    uint8_t frame[4];
+
+    lapm_init_header(frame, !s->we_are_originator);
+    frame[1] = (uint8_t) (0x00 | 0x08 | LAPM_FRAMETYPE_S);
+    /* Where to start retransmission */
+    frame[2] = (uint8_t) ((s->next_expected_frame << 1) | 0x01);
+    span_log(&s->logging, SPAN_LOG_FLOW, "Sending REJ (reject (%d)\n", s->next_expected_frame);
+    lapm_tx_frame(s, frame, 4);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lapm_rr(lapm_state_t *s, int pfbit)
+{
+    uint8_t frame[4];
+
+    lapm_init_header(frame, !s->we_are_originator);
+    frame[1] = (uint8_t) (0x00 | 0x00 | LAPM_FRAMETYPE_S);
+    frame[2] = (uint8_t) ((s->next_expected_frame << 1) | pfbit);
+    /* Note that we have already ACKed this */
+    s->last_frame_we_acknowledged = s->next_expected_frame;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Sending RR (receiver ready) (%d)\n", s->next_expected_frame);
+    lapm_tx_frame(s, frame, 4);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void t401_expired(span_sched_state_t *ss, void *user_data)
+{
+    lapm_state_t *s;
+    
+    s = (lapm_state_t *) user_data;
+fprintf(stderr, "Expiring T401 a [%p]\n", (void *) s);
+    s->t401_timer = -1;
+    if (s->txqueue)
+    {
+        /* Retransmit first packet in the queue, setting the poll bit */
+        span_log(&s->logging, SPAN_LOG_FLOW, "-- Timer T_401 expired, What to do...\n");
+        /* Update N(R), and set the poll bit */
+        s->txqueue->frame[2] = (uint8_t)((s->next_expected_frame << 1) | 0x01);
+        s->last_frame_we_acknowledged = s->next_expected_frame;
+        s->solicit_f_bit = TRUE;
+        if (++s->retransmissions <= N_400)
+        {
+            /* Reschedule timer T401 */
+            span_log(&s->logging, SPAN_LOG_FLOW, "-- Retransmitting %d bytes\n", s->txqueue->len);
+            lapm_tx_frame(s, s->txqueue->frame, s->txqueue->len);
+            span_log(&s->logging, SPAN_LOG_FLOW, "-- Scheduling retransmission (%d)\n", s->retransmissions);
+fprintf(stderr, "Setting T401 d [%p]\n", (void *) s);
+            s->t401_timer = span_schedule_event(&s->sched, T_401, t401_expired, s);
+        }
+        else
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "-- Timeout occured\n");
+            s->state = LAPM_RELEASE;
+            if (s->status_callback)
+                s->status_callback(s->status_callback_user_data, s->state);
+            lapm_link_down(s);
+            lapm_restart(s);
+        }
+        /*endif*/
+    }
+    else
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Timer T_401 expired. Nothing to send...\n");
+    }
+    /*endif*/
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *lapm_status_to_str(int status)
+{
+    switch (status)
+    {
+    case LAPM_DETECT:
+        return "LAPM_DETECT";
+    case LAPM_ESTABLISH:
+        return "LAPM_ESTABLISH";
+    case LAPM_DATA:
+        return "LAPM_DATA";
+    case LAPM_RELEASE:
+        return "LAPM_RELEASE";
+    case LAPM_SIGNAL:
+        return "LAPM_SIGNAL";
+    case LAPM_SETPARM:
+        return "LAPM_SETPARM";
+    case LAPM_TEST:
+        return "LAPM_TEST";
+    case LAPM_UNSUPPORTED:
+        return "LAPM_UNSUPPORTED";
+    }
+    /*endswitch*/
+    return "???";
+}
+/*- End of function --------------------------------------------------------*/
+
+int lapm_tx(lapm_state_t *s, const void *buf, int len)
+{
+    return queue_write(&s->tx_queue, buf, len);
+}
+/*- End of function --------------------------------------------------------*/
+
+int lapm_release(lapm_state_t *s)
+{
+    s->state = LAPM_RELEASE;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int lapm_loopback(lapm_state_t *s, int enable)
+{
+    s->state = LAPM_TEST;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int lapm_break(lapm_state_t *s, int enable)
+{
+    s->state = LAPM_SIGNAL;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int lapm_tx_iframe(lapm_state_t *s, const void *buf, int len, int cr)
+{
+    lapm_frame_queue_t *f;
+
+    if ((f = malloc(sizeof(lapm_frame_queue_t) + len + 4)) == NULL)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Out of memory\n");
+        return -1;
+    }
+    /*endif*/
+
+    if (s->peer_is_originator)
+        lapm_init_header(f->frame, cr);
+    else
+        lapm_init_header(f->frame, !cr);
+    /*endif*/
+    f->next = NULL;
+    f->len = len + 4;
+    f->frame[1] = (uint8_t) (s->next_tx_frame << 1);
+    f->frame[2] = (uint8_t) (s->next_expected_frame << 1);
+    memcpy(f->frame + 3, buf, len);
+    s->next_tx_frame = (s->next_tx_frame + 1) & 0x7F;
+    s->last_frame_we_acknowledged = s->next_expected_frame;
+    /* Clear poll bit */
+    f->frame[2] &= ~0x01;
+    if (s->tx_last)
+        s->tx_last->next = f;
+    else
+        s->txqueue = f;
+    /*endif*/
+    s->tx_last = f;
+    /* Immediately transmit unless we're in a recovery state */
+    if (s->retransmissions == 0)
+        lapm_tx_frame(s, f->frame, f->len);
+    /*endif*/
+    if (s->t403_timer >= 0)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Stopping T_403 timer\n");
+fprintf(stderr, "Deleting T403 c\n");
+        span_schedule_del(&s->sched, s->t403_timer);
+        s->t403_timer = -1;
+    }
+    /*endif*/
+    if (s->t401_timer < 0)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Starting timer T_401\n");
+        s->t401_timer = span_schedule_event(&s->sched, T_401, t401_expired, s);
+fprintf(stderr, "Setting T401 e %d [%p]\n", s->t401_timer, (void *) s);
+    }
+    else
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "Timer T_401 already running (%d)\n", s->t401_timer);
+    }
+    /*endif*/
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void t403_expired(span_sched_state_t *ss, void *user_data)
+{
+    lapm_state_t *s;
+
+    s = (lapm_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Timer T_403 expired. Sending RR and scheduling T_403 again\n");
+    s->t403_timer = -1;
+    s->retransmissions = 0;
+    /* Solicit an F-bit in the other end's RR */
+    s->solicit_f_bit = TRUE;
+    lapm_rr(s, 1);
+    /* Restart ourselves */
+fprintf(stderr, "Setting T403 f\n");
+    s->t401_timer = span_schedule_event(&s->sched, T_401, t401_expired, s);
+}
+/*- End of function --------------------------------------------------------*/
+
+void lapm_dump(lapm_state_t *s, const uint8_t *frame, int len, int showraw, int txrx)
+{
+    const char *type;
+    char direction_tag[2];
+    
+    direction_tag[0] = txrx  ?  '>'  :  '<';
+    direction_tag[1] = '\0';
+    if (showraw)
+        span_log_buf(&s->logging, SPAN_LOG_FLOW, direction_tag, frame, len);
+    /*endif*/
+
+    switch ((frame[1] & LAPM_FRAMETYPE_MASK))
+    {
+    case LAPM_FRAMETYPE_I:
+    case LAPM_FRAMETYPE_I_ALT:
+        span_log(&s->logging, SPAN_LOG_FLOW, "%c Information frame:\n", direction_tag[0]);
+        break;
+    case LAPM_FRAMETYPE_S:
+        span_log(&s->logging, SPAN_LOG_FLOW, "%c Supervisory frame:\n", direction_tag[0]);
+        break;
+    case LAPM_FRAMETYPE_U:
+        span_log(&s->logging, SPAN_LOG_FLOW, "%c Unnumbered frame:\n", direction_tag[0]);
+        break;
+    }
+    /*endswitch*/
+    
+    span_log(&s->logging,
+             SPAN_LOG_FLOW,
+             "%c DLCI: %2d  C/R: %d  EA: %d\n",
+             direction_tag[0],
+             (frame[0] >> 2),
+             (frame[0] & 0x02)  ?  1  :  0,
+             (frame[0] & 0x01),
+             direction_tag[0]);
+    switch ((frame[1] & LAPM_FRAMETYPE_MASK))
+    {
+    case LAPM_FRAMETYPE_I:
+    case LAPM_FRAMETYPE_I_ALT:
+        /* Information frame */
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW, 
+                 "%c N(S): %03d\n",
+                 direction_tag[0],
+                 (frame[1] >> 1));
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW, 
+                 "%c N(R): %03d   P: %d\n",
+                 direction_tag[0],
+                 (frame[2] >> 1),
+                 (frame[2] & 0x01));
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW, 
+                 "%c %d bytes of data\n",
+                 direction_tag[0],
+                 len - 4);
+        break;
+    case LAPM_FRAMETYPE_S:
+        /* Supervisory frame */
+        switch (frame[1] & 0x0C)
+        {
+        case 0x00:
+            type = "RR (receive ready)";
+            break;
+        case 0x04:
+            type = "RNR (receive not ready)";
+            break;
+        case 0x08:
+            type = "REJ (reject)";
+            break;
+        case 0x0C:
+            type = "SREJ (selective reject)";
+            break;
+        default:
+            type = "???";
+            break;
+        }
+        /*endswitch*/
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW,
+                 "%c S: %03d [ %s ]\n",
+                 direction_tag[0],
+                 frame[1],
+                 type);
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW,
+                 "%c N(R): %03d P/F: %d\n",
+                 direction_tag[0],
+                 frame[2] >> 1,
+                 frame[2] & 0x01);
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW,
+                 "%c %d bytes of data\n",
+                 direction_tag[0],
+                 len - 4);
+        break;
+    case LAPM_FRAMETYPE_U:
+        /* Unnumbered frame */
+        switch (frame[1] & 0xEC)
+        {
+        case 0x00:
+            type = "UI (unnumbered information)";
+            break;
+        case 0x0C:
+            type = "DM (disconnect mode)";
+            break;
+        case 0x40:
+            type = "DISC (disconnect)";
+            break;
+        case 0x60:
+            type = "UA (unnumbered acknowledgement)";
+            break;
+        case 0x6C:
+            type = "SABME (set asynchronous balanced mode extended)";
+            break;
+        case 0x84:
+            type = "FRMR (frame reject)";
+            break;
+        case 0xAC:
+            type = "XID (exchange identification)";
+            break;
+        case 0xE0:
+            type = "TEST (test)";
+            break;
+        default:
+            type = "???";
+            break;
+        }
+        /*endswitch*/
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW,
+                 "%c   M: %03d [ %s ] P/F: %d\n",
+                 direction_tag[0],
+                 frame[1],
+                 type,
+                 (frame[1] >> 4) & 1);
+        span_log(&s->logging,
+                 SPAN_LOG_FLOW,
+                 "%c %d bytes of data\n",
+                 direction_tag[0],
+                 len - 3);
+        break;
+    }
+    /*endswitch*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lapm_link_up(lapm_state_t *s)
+{
+    uint8_t buf[1024];
+    int len;
+
+    lapm_reset(s);
+    /* Go into connection established state */
+    s->state = LAPM_DATA;
+    if (s->status_callback)
+        s->status_callback(s->status_callback_user_data, s->state);
+    /*endif*/
+    if (!queue_empty(&(s->tx_queue)))
+    {
+        if ((len = queue_read(&(s->tx_queue), buf, s->n401)) > 0)
+            lapm_tx_iframe(s, buf, len, TRUE);
+        /*endif*/
+    }
+    /*endif*/
+    if (s->t401_timer >= 0)
+    {
+fprintf(stderr, "Deleting T401 x [%p]\n", (void *) s);
+        span_schedule_del(&s->sched, s->t401_timer);
+        s->t401_timer = -1;
+    }
+    /*endif*/
+    /* Start the T403 timer */
+fprintf(stderr, "Setting T403 g\n");
+    s->t403_timer = span_schedule_event(&s->sched, T_403, t403_expired, s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lapm_link_down(lapm_state_t *s)
+{
+    lapm_reset(s);
+
+    if (s->status_callback)
+        s->status_callback(s->status_callback_user_data, s->state);
+    /*endif*/
+}
+/*- End of function --------------------------------------------------------*/
+
+void lapm_reset(lapm_state_t *s)
+{
+    lapm_frame_queue_t *f;
+    lapm_frame_queue_t *p;
+
+    /* Having received a SABME, we need to reset our entire state */
+    s->next_tx_frame = 0;
+    s->last_frame_peer_acknowledged = 0;
+    s->next_expected_frame = 0;
+    s->last_frame_we_acknowledged = 0;
+    s->window_size_k = 15;
+    s->n401 = 128;
+    if (s->t401_timer >= 0)
+    {
+fprintf(stderr, "Deleting T401 d [%p]\n", (void *) s);
+        span_schedule_del(&s->sched, s->t401_timer);
+        s->t401_timer = -1;
+    }
+    /*endif*/
+    if (s->t403_timer >= 0)
+    {
+fprintf(stderr, "Deleting T403 e\n");
+        span_schedule_del(&s->sched, s->t403_timer);
+        s->t403_timer = -1;
+    }
+    /*endif*/
+    s->busy = FALSE;
+    s->solicit_f_bit = FALSE;
+    s->state = LAPM_RELEASE;
+    s->retransmissions = 0;
+    /* Discard anything waiting to go out */
+    for (f = s->txqueue;  f;  )
+    {
+        p = f;
+        f = f->next;
+        free(p);
+    }
+    /*endfor*/
+    s->txqueue = NULL;
+}
+/*- End of function --------------------------------------------------------*/
+
+void lapm_receive(void *user_data, int ok, const uint8_t *frame, int len)
+{
+    lapm_state_t *s;
+    lapm_frame_queue_t *f;
+    int sendnow;
+    int octet;
+    int s_field;
+    int m_field;
+
+fprintf(stderr, "LAPM receive %d %d\n", ok, len);
+    if (!ok  ||  len == 0)
+        return;
+    /*endif*/
+    s = (lapm_state_t *) user_data;
+    if (len < 0)
+    {
+        /* Special conditions */
+        switch (len)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            span_log(&s->logging, SPAN_LOG_DEBUG, "Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            span_log(&s->logging, SPAN_LOG_DEBUG, "Training succeeded\n");
+            break;
+        case PUTBIT_CARRIER_UP:
+            span_log(&s->logging, SPAN_LOG_DEBUG, "Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            span_log(&s->logging, SPAN_LOG_DEBUG, "Carrier down\n");
+            break;
+        case PUTBIT_FRAMING_OK:
+            span_log(&s->logging, SPAN_LOG_DEBUG, "Framing OK\n");
+            break;
+        case PUTBIT_ABORT:
+            span_log(&s->logging, SPAN_LOG_DEBUG, "Abort\n");
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_DEBUG, "Eh!\n");
+            break;
+        }
+        /*endswitch*/
+        return;
+    }
+    /*endif*/
+
+    if ((s->debug & LAPM_DEBUG_LAPM_DUMP))
+        lapm_dump(s, frame, len, s->debug & LAPM_DEBUG_LAPM_RAW, FALSE);
+    /*endif*/
+    octet = 0;
+    /* We do not expect extended addresses */
+    if ((frame[octet] & 0x01) == 0)
+        return;
+    /*endif*/
+    /* Check for DLCIs we do not recognise */
+    if ((frame[octet] >> 2) != LAPM_DLCI_DTE_TO_DTE)
+        return;
+    /*endif*/
+    octet++;
+    switch (frame[octet] & LAPM_FRAMETYPE_MASK)
+    {
+    case LAPM_FRAMETYPE_I:
+    case LAPM_FRAMETYPE_I_ALT:
+        if (s->state != LAPM_DATA)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "!! Got an I-frame while link state is %d\n", s->state);
+            break;
+        }
+        /*endif*/
+        /* Information frame */
+        if (len < 4)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "!! Received short I-frame (expected 4, got %d)\n", len);
+            break;
+        }
+        /*endif*/
+        /* Make sure this is a valid packet */
+        if ((frame[1] >> 1) == s->next_expected_frame)
+        {
+            /* Increment next expected I-frame */
+            s->next_expected_frame = (s->next_expected_frame + 1) & 0x7F;
+            /* Handle their ACK */
+            lapm_ack_rx(s, frame[2] >> 1);
+            if ((frame[2] & 0x01))
+            {
+                /* If the Poll/Final bit is set, send the RR immediately */
+                lapm_rr(s, 1);
+            }
+            /*endif*/
+            s->iframe_receive(s->iframe_receive_user_data, frame + 3, len - 4);
+            /* Send an RR if one wasn't sent already */
+            if (s->last_frame_we_acknowledged != s->next_expected_frame) 
+                lapm_rr(s, 0);
+            /*endif*/
+        }
+        else
+        {
+            if (((s->next_expected_frame - (frame[1] >> 1)) & 127) < s->window_size_k)
+            {
+                /* It's within our window -- send back an RR */
+                lapm_rr(s, 0);
+            }
+            else
+            {
+                lapm_reject(s);
+            }
+            /*endif*/
+        }
+        /*endif*/
+        break;
+    case LAPM_FRAMETYPE_S:
+        if (s->state != LAPM_DATA)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "!! Got S-frame while link down\n");
+            break;
+        }
+        /*endif*/
+        if (len < 4)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "!! Received short S-frame (expected 4, got %d)\n", len);
+            break;
+        }
+        /*endif*/
+        s_field = frame[octet] & 0xEC;
+        switch (s_field)
+        {
+        case 0x00:
+            /* RR (receive ready) */
+            s->busy = FALSE;
+            /* Acknowledge frames as necessary */
+            lapm_ack_rx(s, frame[2] >> 1);
+            if ((frame[2] & 0x01))
+            {
+                /* If P/F is one, respond with an RR with the P/F bit set */
+                if (s->solicit_f_bit)
+                {
+                    span_log(&s->logging, SPAN_LOG_FLOW, "-- Got RR response to our frame\n");
+                }
+                else
+                {
+                    span_log(&s->logging, SPAN_LOG_FLOW, "-- Unsolicited RR with P/F bit, responding\n");
+                    lapm_rr(s, 1);
+                }
+                /*endif*/
+                s->solicit_f_bit = FALSE;
+            }
+            /*endif*/
+            break;
+        case 0x04:
+            /* RNR (receive not ready) */
+            span_log(&s->logging, SPAN_LOG_FLOW, "-- Got receiver not ready\n");
+            s->busy = TRUE;
+            break;   
+        case 0x08:
+            /* REJ (reject) */
+            /* Just retransmit */
+            span_log(&s->logging, SPAN_LOG_FLOW, "-- Got reject requesting packet %d...  Retransmitting.\n", frame[2] >> 1);
+            if ((frame[2] & 0x01))
+            {
+                /* If it has the poll bit set, send an appropriate supervisory response */
+                lapm_rr(s, 1);
+            }
+            /*endif*/
+            sendnow = FALSE;
+            /* Resend the appropriate I-frame */
+            for (f = s->txqueue;  f;  f = f->next)
+            {
+                if (sendnow  ||  (f->frame[1] >> 1) == (frame[2] >> 1))
+                {
+                    /* Matches the request, or follows in our window */
+                    sendnow = TRUE;
+                    span_log(&s->logging,
+                             SPAN_LOG_FLOW,
+                             "!! Got reject for frame %d, retransmitting frame %d now, updating n_r!\n",
+                             frame[2] >> 1,
+                             f->frame[1] >> 1);
+                    f->frame[2] = (uint8_t) (s->next_expected_frame << 1);
+                    lapm_tx_frame(s, f->frame, f->len);
+                }
+                /*endif*/
+            }
+            /*endfor*/
+            if (!sendnow)
+            {
+                if (s->txqueue)
+                {
+                    /* This should never happen */
+                    if ((frame[2] & 0x01) == 0  ||  (frame[2] >> 1))
+                    {
+                        span_log(&s->logging,
+                                 SPAN_LOG_FLOW,
+                                 "!! Got reject for frame %d, but we only have others!\n",
+                                 frame[2] >> 1);
+                    }
+                    /*endif*/
+                }
+                else
+                {
+                    /* Hrm, we have nothing to send, but have been REJ'd.  Reset last_frame_peer_acknowledged, next_tx_frame, etc */
+                    span_log(&s->logging, SPAN_LOG_FLOW, "!! Got reject for frame %d, but we have nothing -- resetting!\n", frame[2] >> 1);
+                    s->last_frame_peer_acknowledged =
+                    s->next_tx_frame = frame[2] >> 1;
+                    /* Reset t401 timer if it was somehow going */
+                    if (s->t401_timer >= 0)
+                    {
+fprintf(stderr, "Deleting T401 f [%p]\n", (void *) s);
+                        span_schedule_del(&s->sched, s->t401_timer);
+                        s->t401_timer = -1;
+                    }
+                    /*endif*/
+                    /* Reset and restart t403 timer */
+                    if (s->t403_timer >= 0)
+                    {
+fprintf(stderr, "Deleting T403 g\n");
+                        span_schedule_del(&s->sched, s->t403_timer);
+                        s->t403_timer = -1;
+                    }
+                    /*endif*/
+fprintf(stderr, "Setting T403 h\n");
+                    s->t403_timer = span_schedule_event(&s->sched, T_403, t403_expired, s);
+                }
+                /*endif*/
+            }
+            /*endif*/
+            break;
+        case 0x0C:
+            /* SREJ (selective reject) */
+            break;
+        default:
+            span_log(&s->logging,
+                     SPAN_LOG_FLOW,
+                     "!! XXX Unknown Supervisory frame sd=0x%02x,pf=%02xnr=%02x vs=%02x, va=%02x XXX\n",
+                     s_field,
+                     frame[2] & 0x01,
+                     frame[2] >> 1,
+                     s->next_tx_frame,
+                     s->last_frame_peer_acknowledged);
+            break;
+        }
+        /*endswitch*/
+        break;
+    case LAPM_FRAMETYPE_U:
+        if (len < 3)
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW, "!! Received too short unnumbered frame\n");
+            break;
+        }
+        /*endif*/
+        m_field = frame[octet] & 0xEC;
+        switch (m_field)
+        {
+        case 0x00:
+            /* UI (unnumbered information) */
+            switch (frame[++octet] & 0x7F)
+            {
+            case 0x40:
+                /* BRK */
+                span_log(&s->logging, SPAN_LOG_FLOW, "BRK - option %d, length %d\n", (frame[octet] >> 5), frame[octet + 1]);
+                octet += 2;
+                break;
+            case 0x60:
+                /* BRKACK */
+                span_log(&s->logging, SPAN_LOG_FLOW, "BRKACK\n");
+                break;
+            default:
+                /* Unknown */
+                span_log(&s->logging, SPAN_LOG_FLOW, "Unknown UI type\n");
+                break;
+            }
+            /*endswitch*/
+            break;
+        case 0x0C:
+            /* DM (disconnect mode) */
+            if ((frame[octet] & 0x10))
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "-- Got Unconnected Mode from peer.\n");
+                /* Disconnected mode, try again */
+                lapm_link_down(s);
+                lapm_restart(s);
+            }
+            else
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "-- DM (disconnect mode) requesting SABME, starting.\n");
+                /* Requesting that we start */
+                lapm_restart(s);
+            }
+            /*endif*/
+            break;
+        case 0x40:
+            /* DISC (disconnect) */
+            span_log(&s->logging, SPAN_LOG_FLOW, "-- Got DISC (disconnect) from peer.\n");
+            /* Acknowledge */
+            lapm_send_ua(s, (frame[octet] & 0x10));
+            lapm_link_down(s);
+            break;
+        case 0x60:
+            /* UA (unnumbered acknowledgement) */
+            if (s->state == LAPM_ESTABLISH)
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "-- Got UA (unnumbered acknowledgement) from %s peer. Link up.\n", (frame[0] & 0x02)  ?  "xxx"  :  "yyy");
+                lapm_link_up(s);
+            }
+            else
+            {
+                span_log(&s->logging, SPAN_LOG_FLOW, "!! Got a UA (unnumbered acknowledgement) in state %d\n", s->state);
+            }
+            /*endif*/
+            break;
+        case 0x6C:
+            /* SABME (set asynchronous balanced mode extended) */
+            span_log(&s->logging, SPAN_LOG_FLOW, "-- Got SABME (set asynchronous balanced mode extended) from %s peer.\n", (frame[0] & 0x02)  ?  "yyy"  :  "xxx");
+            if ((frame[0] & 0x02))
+            {
+                s->peer_is_originator = TRUE;
+                if (s->we_are_originator)
+                {
+                    /* We can't both be originators */
+                    span_log(&s->logging, SPAN_LOG_FLOW, "We think we are the originator, but they think so too.");
+                    break;
+                }
+                /*endif*/
+            }
+            else
+            {
+                s->peer_is_originator = FALSE;
+                if (!s->we_are_originator)
+                {
+                    /* We can't both be answerers */
+                    span_log(&s->logging, SPAN_LOG_FLOW, "We think we are the answerer, but they think so too.\n");
+                    break;
+                }
+                /*endif*/
+            }
+            /*endif*/
+            /* Send unnumbered acknowledgement */
+            lapm_send_ua(s, (frame[octet] & 0x10));
+            lapm_link_up(s);
+            break;
+        case 0x84:
+            /* FRMR (frame reject) */
+            span_log(&s->logging, SPAN_LOG_FLOW, "!! FRMR (frame reject).\n");
+            break;
+        case 0xAC:
+            /* XID (exchange identification) */
+            span_log(&s->logging, SPAN_LOG_FLOW, "!! XID (exchange identification) frames not supported\n");
+            break;
+        case 0xE0:
+            /* TEST (test) */
+            span_log(&s->logging, SPAN_LOG_FLOW, "!! TEST (test) frames not supported\n");
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_FLOW, "!! Don't know what to do with M=%X u-frames\n", m_field);
+            break;
+        }
+        /*endswitch*/
+        break;
+    }
+    /*endswitch*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lapm_hdlc_underflow(void *user_data)
+{
+    lapm_state_t *s;
+    uint8_t buf[1024];
+    int len;
+
+    s = (lapm_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "HDLC underflow\n");
+    if (s->state == LAPM_DATA)
+    {
+        if (!queue_empty(&(s->tx_queue)))
+        {
+            if ((len = queue_read(&(s->tx_queue), buf, s->n401)) > 0)
+                lapm_tx_iframe(s, buf, len, TRUE);
+            /*endif*/
+        }
+        /*endif*/
+    }
+    /*endif*/
+}
+/*- End of function --------------------------------------------------------*/
+
+void lapm_restart(lapm_state_t *s)
+{
+#if 0
+    if (s->state != LAPM_RELEASE)
+    {
+        span_log(&s->logging, SPAN_LOG_FLOW, "!! lapm_restart: Not in 'Link Connection Released' state\n");
+        return;
+    }
+    /*endif*/
+#endif
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "LAPM");
+    hdlc_tx_init(&s->hdlc_tx, FALSE, 1, TRUE, lapm_hdlc_underflow, s);
+    hdlc_rx_init(&s->hdlc_rx, FALSE, FALSE, 1, lapm_receive, s);
+    /* TODO: This is a bodge! */
+fprintf(stderr, "LAPM restart T401 a [%p]\n", (void *) s);
+    s->t401_timer = -1;
+    s->t402_timer = -1;
+    s->t403_timer = -1;
+    lapm_reset(s);
+    /* TODO: Maybe we should implement T_WAIT? */
+    lapm_send_sabme(NULL, s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void lapm_init(lapm_state_t *s)
+{
+    lapm_restart(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void negotiation_rx_bit(v42_state_t *s, int new_bit)
+{
+    /* DC1 with even parity, 8-16 ones, DC1 with odd parity, 8-16 ones */
+    //uint8_t odp = "0100010001 11111111 0100010011 11111111";
+    /* V.42 OK E , 8-16 ones, C, 8-16 ones */
+    //uint8_t adp_v42 = "0101000101  11111111  0110000101  11111111";
+    /* V.42 disabled E, 8-16 ones, NULL, 8-16 ones */
+    //uint8_t adp_nov42 = "0101000101  11111111  0000000001  11111111";
+
+    /* There may be no negotiation, so we need to process this data through the
+       HDLC receiver as well */
+    if (new_bit < 0)
+    {
+        /* Special conditions */
+        switch (new_bit)
+        {
+        case PUTBIT_CARRIER_UP:
+            break;
+        case PUTBIT_CARRIER_DOWN:
+        case PUTBIT_TRAINING_SUCCEEDED:
+        case PUTBIT_TRAINING_FAILED:
+            break;
+        default:
+            span_log(&s->logging, SPAN_LOG_WARNING, "Unexpected special 'bit' code %d\n", new_bit);
+            break;
+        }
+        /*endswitch*/
+        return;
+    }
+    /*endif*/
+    new_bit &= 1;
+    s->rxstream = (s->rxstream << 1) | new_bit;
+    switch (s->rx_negotiation_step)
+    {
+    case 0:
+        /* Look for some ones */
+        if (new_bit)
+            break;
+        /*endif*/
+        s->rx_negotiation_step = 1;
+        s->rxbits = 0;
+        s->rxstream = ~1;
+        s->rxoks = 0;
+        break;
+    case 1:
+        /* Look for the first character */
+        if (++s->rxbits < 9)
+            break;
+        /*endif*/
+        s->rxstream &= 0x3FF;
+        if (s->caller  &&  s->rxstream == 0x145)
+        {
+            s->rx_negotiation_step++;
+        }
+        else if (!s->caller  &&  s->rxstream == 0x111)
+        {
+            s->rx_negotiation_step++;
+        }
+        else
+        {
+            s->rx_negotiation_step = 0;
+        }
+        /*endif*/
+        s->rxbits = 0;
+        s->rxstream = ~0;
+        break;
+    case 2:
+        /* Look for 8 to 16 ones */
+        s->rxbits++;
+        if (new_bit)
+            break;
+        /*endif*/
+        if (s->rxbits >= 8  &&  s->rxbits <= 16)
+            s->rx_negotiation_step++;
+        else
+            s->rx_negotiation_step = 0;
+        /*endif*/
+        s->rxbits = 0;
+        s->rxstream = ~1;
+        break;
+    case 3:
+        /* Look for the second character */
+        if (++s->rxbits < 9)
+            break;
+        /*endif*/
+        s->rxstream &= 0x3FF;
+        if (s->caller  &&  s->rxstream == 0x185)
+        {
+            s->rx_negotiation_step++;
+        }
+        else if (s->caller  &&  s->rxstream == 0x001)
+        {
+            s->rx_negotiation_step++;
+        }
+        else if (!s->caller  &&  s->rxstream == 0x113)
+        {
+            s->rx_negotiation_step++;
+        }
+        else
+        {
+            s->rx_negotiation_step = 0;
+        }
+        /*endif*/
+        s->rxbits = 0;
+        s->rxstream = ~0;
+        break;
+    case 4:
+        /* Look for 8 to 16 ones */
+        s->rxbits++;
+        if (new_bit)
+            break;
+        /*endif*/
+        if (s->rxbits >= 8  &&  s->rxbits <= 16)
+        {
+            if (++s->rxoks >= 2)
+            {
+                /* HIT */
+                s->rx_negotiation_step++;
+                if (s->caller)
+                {
+                    if (s->t400_timer >= 0)
+                    {
+fprintf(stderr, "Deleting T400 h\n");
+                        span_schedule_del(&s->lapm.sched, s->t400_timer);
+                        s->t400_timer = -1;
+                    }
+                    /*endif*/
+                    s->lapm.state = LAPM_ESTABLISH;
+                    if (s->lapm.status_callback)
+                        s->lapm.status_callback(s->lapm.status_callback_user_data, s->lapm.state);
+                    /*endif*/
+                }
+                else
+                {
+                    s->odp_seen = TRUE;
+                }
+                /*endif*/
+                break;
+            }
+            /*endif*/
+            s->rx_negotiation_step = 1;
+            s->rxbits = 0;
+            s->rxstream = ~1;
+        }
+        else
+        {
+            s->rx_negotiation_step = 0;
+            s->rxbits = 0;
+            s->rxstream = ~0;
+        }
+        /*endif*/
+        break;
+    case 5:
+        /* Parked */
+        break;
+    }
+    /*endswitch*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static int v42_support_negotiation_tx_bit(v42_state_t *s)
+{
+    int bit;
+
+    if (s->caller)
+    {
+        if (s->txbits <= 0)
+        {
+            s->txstream = 0x3FE22;
+            s->txbits = 36;
+        }
+        else if (s->txbits == 18)
+        {
+            s->txstream = 0x3FF22;
+        }
+        /*endif*/
+        bit = s->txstream & 1;
+        s->txstream >>= 1;
+        s->txbits--;
+    }
+    else
+    {
+        if (s->odp_seen  &&  s->txadps < 10)
+        {
+            if (s->txbits <= 0)
+            {
+                if (++s->txadps >= 10)
+                {
+                    if (s->t400_timer >= 0)
+                    {
+fprintf(stderr, "Deleting T400 i\n");
+                        span_schedule_del(&s->lapm.sched, s->t400_timer);
+                        s->t400_timer = -1;
+                    }
+                    /*endif*/
+                    s->lapm.state = LAPM_ESTABLISH;
+                    if (s->lapm.status_callback)
+                        s->lapm.status_callback(s->lapm.status_callback_user_data, s->lapm.state);
+                    /*endif*/
+                    s->txstream = 1;
+                }
+                else
+                {
+                    s->txstream = 0x3FE8A;
+                    s->txbits = 36;
+                }
+                /*endif*/
+            }
+            else if (s->txbits == 18)
+            {
+                s->txstream = 0x3FE86;
+            }
+            /*endif*/
+            bit = s->txstream & 1;
+            s->txstream >>= 1;
+            s->txbits--;
+        }
+        else
+        {
+            bit = 1;
+        }
+        /*endif*/
+    }
+    /*endif*/
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v42_rx_bit(void *user_data, int bit)
+{
+    v42_state_t *s;
+
+    s = (v42_state_t *) user_data;
+    if (s->lapm.state == LAPM_DETECT)
+        negotiation_rx_bit(s, bit);
+    else
+        hdlc_rx_put_bit(&s->lapm.hdlc_rx, bit);
+    /*endif*/
+}
+/*- End of function --------------------------------------------------------*/
+
+int v42_tx_bit(void *user_data)
+{
+    v42_state_t *s;
+    int bit;
+
+    s = (v42_state_t *) user_data;
+    if (s->lapm.state == LAPM_DETECT)
+        bit = v42_support_negotiation_tx_bit(s);
+    else
+        bit = hdlc_tx_get_bit(&s->lapm.hdlc_tx);
+    /*endif*/
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v42_set_status_callback(v42_state_t *s, v42_status_func_t callback, void *user_data)
+{
+    s->lapm.status_callback = callback;
+    s->lapm.status_callback_user_data = user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+void v42_restart(v42_state_t *s)
+{
+    span_schedule_init(&s->lapm.sched);
+
+    s->lapm.we_are_originator = s->caller;
+    lapm_restart(&s->lapm);
+    if (s->detect)
+    {
+        s->txstream = ~0;
+        s->txbits = 0;
+        s->rxstream = ~0;
+        s->rxbits = 0;
+        s->rxoks = 0;
+        s->txadps = 0;
+        s->rx_negotiation_step = 0;
+        s->odp_seen = FALSE;
+fprintf(stderr, "Setting T400 i\n");
+        s->t400_timer = span_schedule_event(&s->lapm.sched, T_400, t400_expired, s);
+        s->lapm.state = LAPM_DETECT;
+    }
+    else
+    {
+        s->lapm.state = LAPM_ESTABLISH;
+    }
+    /*endif*/
+}
+/*- End of function --------------------------------------------------------*/
+
+v42_state_t *v42_init(v42_state_t *s, int caller, int detect, v42_frame_handler_t frame_handler, void *user_data)
+{
+    if (frame_handler == NULL)
+        return NULL;
+    /*endif*/
+    memset(s, 0, sizeof(*s));
+    s->caller = caller;
+    s->detect = detect;
+    s->lapm.iframe_receive = frame_handler;
+    s->lapm.iframe_receive_user_data = user_data;
+    s->lapm.debug |= (LAPM_DEBUG_LAPM_RAW | LAPM_DEBUG_LAPM_DUMP | LAPM_DEBUG_LAPM_STATE);
+    if (queue_create(&(s->lapm.tx_queue), 16384, 0) < 0)
+        return NULL;
+    /*endif*/
+    span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
+    span_log_set_protocol(&s->logging, "V.42");
+    v42_restart(s);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v42_release(v42_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v42bis.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,693 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v42bis.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v42bis.c,v 1.29 2006/12/01 18:00:48 steveu Exp $
+ */
+
+/* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. 
+   Currently it performs the core compression and decompression functions OK.
+   However, a number of the bells and whistles in V.42bis are incomplete. */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/bit_operations.h"
+#include "spandsp/v42bis.h"
+
+/* Fixed parameters from the spec. */
+#define V42BIS_N3               8   /* Character size (bits) */
+#define V42BIS_N4               256 /* Number of characters in the alphabet */
+#define V42BIS_N5               (V42BIS_N4 + V42BIS_N6)  /* Index number of first dictionary entry used to store a string */
+#define V42BIS_N6               3   /* Number of control codewords */
+
+/* Control code words in compressed mode */
+enum
+{
+    V42BIS_ETM = 0,         /* Enter transparent mode */
+    V42BIS_FLUSH = 1,       /* Flush data */
+    V42BIS_STEPUP = 2       /* Step up codeword size */
+};
+
+/* Command codes in transparent mode */
+enum
+{
+    V42BIS_ECM = 0,         /* Enter compression mode */
+    V42BIS_EID = 1,         /* Escape character in data */
+    V42BIS_RESET = 2        /* Force reinitialisation */
+};
+
+static __inline__ void push_compressed_raw_octet(v42bis_compress_state_t *ss, int octet)
+{
+    ss->output_buf[ss->output_octet_count++] = (uint8_t) octet;
+    if (ss->output_octet_count >= ss->max_len)
+    {
+        ss->handler(ss->user_data, ss->output_buf, ss->output_octet_count);
+        ss->output_octet_count = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void push_compressed_code(v42bis_compress_state_t *ss, int code)
+{
+    ss->output_bit_buffer |= code << (32 - ss->v42bis_parm_c2 - ss->output_bit_count);
+    ss->output_bit_count += ss->v42bis_parm_c2;
+    while (ss->output_bit_count >= 8)
+    {
+        push_compressed_raw_octet(ss, ss->output_bit_buffer >> 24);
+        ss->output_bit_buffer <<= 8;
+        ss->output_bit_count -= 8;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ void push_compressed_octet(v42bis_compress_state_t *ss, int code)
+{
+    ss->output_bit_buffer |= code << (32 - 8 - ss->output_bit_count);
+    ss->output_bit_count += 8;
+    while (ss->output_bit_count >= 8)
+    {
+        push_compressed_raw_octet(ss, ss->output_bit_buffer >> 24);
+        ss->output_bit_buffer <<= 8;
+        ss->output_bit_count -= 8;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int v42bis_compress(v42bis_state_t *s, const uint8_t *buf, int len)
+{
+    int ptr;
+    int i;
+    uint32_t octet;
+    uint32_t code;
+    v42bis_compress_state_t *ss;
+
+    ss = &s->compress;
+    if ((s->v42bis_parm_p0 & 2) == 0)
+    {
+        /* Compression is off - just push the incoming data out */
+        for (i = 0;  i < len - ss->max_len;  i += ss->max_len)
+            ss->handler(ss->user_data, buf + i, ss->max_len);
+        if (i < len)
+            ss->handler(ss->user_data, buf + i, len - i);
+        return 0;
+    }
+    ptr = 0;
+    if (ss->first  &&  len > 0)
+    {
+        octet = buf[ptr++];
+        ss->string_code = octet + V42BIS_N6;
+        if (ss->transparent)
+            push_compressed_octet(ss, octet);
+        ss->first = FALSE;
+    }
+    while (ptr < len)
+    {
+        octet = buf[ptr++];
+        if ((ss->dict[ss->string_code].children[octet >> 5] & (1 << (octet & 0x1F))))
+        {
+            /* The leaf exists. Now find it in the table. */
+            /* TODO: This is a brute force scan for a match. We need something better. */
+            for (code = 0;  code < ss->v42bis_parm_c3;  code++)
+            {
+                if (ss->dict[code].parent_code == ss->string_code  &&  ss->dict[code].node_octet == octet)
+                    break;
+            }
+        }
+        else
+        {
+            /* The leaf does not exist. */
+            code = s->v42bis_parm_n2;
+        }
+        /* 6.3(b) If the string matches a dictionary entry, and the entry is not that entry
+                  created by the last invocation of the string matching procedure, then the
+                  next character shall be read and appended to the string and this step
+                  repeated. */
+        if (code < ss->v42bis_parm_c3  &&  code != ss->latest_code)
+        {
+            /* The string was found */
+            ss->string_code = code;
+            ss->string_length++;
+        }
+        else
+        {
+            /* The string is not in the table. */
+            if (!ss->transparent)
+            {
+                /* 7.4 Encoding - we now have the longest matchable string, and will need to output the code for it. */
+                while (ss->v42bis_parm_c1 >= ss->v42bis_parm_c3  &&  ss->v42bis_parm_c3 <= s->v42bis_parm_n2)
+                {
+                    /* We need to increase the codeword size */
+                    /* 7.4(a) */
+                    push_compressed_code(ss, V42BIS_STEPUP);
+                    /* 7.4(b) */
+                    ss->v42bis_parm_c2++;
+                    /* 7.4(c) */
+                    ss->v42bis_parm_c3 <<= 1;
+                    /* 7.4(d) this might need to be repeated, so we loop */
+                }
+                /* 7.5 Transfer - output the last state of the string */
+                push_compressed_code(ss, ss->string_code);
+            }
+            /* 7.6    Dictionary updating */
+            /* 6.4    Add the string to the dictionary */
+            /* 6.4(b) The string is not in the table. */
+            if (code != ss->latest_code  &&  ss->string_length < s->v42bis_parm_n7)
+            {
+                ss->latest_code = ss->v42bis_parm_c1;
+                /* 6.4(a) The length of the string is in range for adding to the dictionary */
+                /* If the last code was a leaf, it no longer is */
+                ss->dict[ss->string_code].leaves++;
+                ss->dict[ss->string_code].children[octet >> 5] |= (1 << (octet & 0x1F));
+                /* The new one is definitely a leaf */
+                ss->dict[ss->v42bis_parm_c1].parent_code = (uint16_t) ss->string_code;
+                ss->dict[ss->v42bis_parm_c1].leaves = 0;
+                ss->dict[ss->v42bis_parm_c1].node_octet = (uint8_t) octet;
+                /* 7.7    Node recovery */
+                /* 6.5    Recovering a dictionary entry to use next */
+                for (;;)
+                {
+                    /* 6.5(a) and (b) */
+                    if ((int) (++ss->v42bis_parm_c1) >= s->v42bis_parm_n2)
+                        ss->v42bis_parm_c1 = V42BIS_N5;
+                    /* 6.5(c) We need to reuse a leaf node */
+                    if (ss->dict[ss->v42bis_parm_c1].leaves)
+                        continue;
+                    if (ss->dict[ss->v42bis_parm_c1].parent_code == 0xFFFF)
+                        break;
+                    /* 6.5(d) Detach the leaf node from its parent, and re-use it */
+                    /* Possibly make the parent a leaf node again */
+                    ss->dict[ss->dict[ss->v42bis_parm_c1].parent_code].leaves--;
+                    ss->dict[ss->dict[ss->v42bis_parm_c1].parent_code].children[ss->dict[ss->v42bis_parm_c1].node_octet >> 5] &= ~(1 << (ss->dict[ss->v42bis_parm_c1].node_octet & 0x1F));
+                    ss->dict[ss->v42bis_parm_c1].parent_code = 0xFFFF;
+                    break;
+                }
+            }
+            else
+            {
+                ss->latest_code = 0xFFFFFFFF;
+            }
+            /* 7.8 Data compressibility test */
+            /* Filter on the balance of what went into the compressor, and what came out */
+            ss->compressibility_filter += ((((8*ss->string_length - ss->v42bis_parm_c2) << 20) - ss->compressibility_filter) >> 10);
+            if (ss->compression_mode == V42BIS_COMPRESSION_MODE_DYNAMIC)
+            {
+                /* Work out if it is appropriate to change between transparent and
+                   compressed mode. */
+                if (ss->transparent)
+                {
+                    if (ss->compressibility_filter > 0)
+                    {
+                        if (++ss->compressibility_persistence > 1000)
+                        {
+                            /* Schedule a switch to compressed mode */
+                            ss->change_transparency = -1;
+                            ss->compressibility_persistence = 0;
+                        }
+                    }
+                    else
+                    {
+                        ss->compressibility_persistence = 0;
+                    }
+                }
+                else
+                {
+                    if (ss->compressibility_filter < 0)
+                    {
+                        if (++ss->compressibility_persistence > 1000)
+                        {
+                            /* Schedule a switch to transparent mode */
+                            ss->change_transparency = 1;
+                            ss->compressibility_persistence = 0;
+                        }
+                    }
+                    else
+                    {
+                        ss->compressibility_persistence = 0;
+                    }
+                }
+            }
+            if (ss->change_transparency)
+            {
+                if (ss->change_transparency < 0)
+                {
+                    if (ss->transparent)
+                    {
+                        printf("Going compressed\n");
+                        /* 7.8.1 Transition to compressed mode */
+                        /* Switch out of transparent now, between codes. We need to send the octet which did not
+                        match, just before switching. */
+                        if (octet == ss->escape_code)
+                        {
+                            push_compressed_octet(ss, ss->escape_code++);
+                            push_compressed_octet(ss, V42BIS_EID);
+                        }
+                        else
+                        {
+                            push_compressed_octet(ss, octet);
+                        }
+                        push_compressed_octet(ss, ss->escape_code++);
+                        push_compressed_octet(ss, V42BIS_ECM);
+                        ss->transparent = FALSE;
+                    }
+                }
+                else
+                {
+                    if (!ss->transparent)
+                    {
+                        printf("Going transparent\n");
+                        /* 7.8.2 Transition to transparent mode */
+                        /* Switch into transparent now, between codes, and the unmatched octet should
+                           go out in transparent mode, just below */
+                        push_compressed_code(ss, V42BIS_ETM);
+                        ss->transparent = TRUE;
+                    }
+                }
+                ss->change_transparency = 0;
+            }
+            /* 7.8.3 Reset function - TODO */
+            ss->string_code = octet + V42BIS_N6;
+            ss->string_length = 1;
+        }
+        if (ss->transparent)
+        {
+            if (octet == ss->escape_code)
+            {
+                push_compressed_octet(ss, ss->escape_code++);
+                push_compressed_octet(ss, V42BIS_EID);
+            }
+            else
+            {
+                push_compressed_octet(ss, octet);
+            }
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v42bis_compress_flush(v42bis_state_t *s)
+{
+    v42bis_compress_state_t *ss;
+
+    ss = &s->compress;
+    if (!ss->transparent)
+    {
+        /* Output the last state of the string */
+        push_compressed_code(ss, ss->string_code);
+        /* TODO: We use a positive FLUSH at all times. It is really needed, if the
+           previous step resulted in no leftover bits. */
+        push_compressed_code(ss, V42BIS_FLUSH);
+    }
+    while (ss->output_bit_count > 0)
+    {
+        push_compressed_raw_octet(ss, ss->output_bit_buffer >> 24);
+        ss->output_bit_buffer <<= 8;
+        ss->output_bit_count -= 8;
+    }
+    /* Now push out anything remaining. */
+    if (ss->output_octet_count > 0)
+    {
+        ss->handler(ss->user_data, ss->output_buf, ss->output_octet_count);
+        ss->output_octet_count = 0;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if 0
+int v42bis_compress_dump(v42bis_state_t *s)
+{
+    int i;
+    
+    for (i = 0;  i < V42BIS_MAX_CODEWORDS;  i++)
+    {
+        if (s->compress.dict[i].parent_code != 0xFFFF)
+        {
+            printf("Entry %4x, prior %4x, leaves %d, octet %2x\n", i, s->compress.dict[i].parent_code, s->compress.dict[i].leaves, s->compress.dict[i].node_octet);
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+int v42bis_decompress(v42bis_state_t *s, const uint8_t *buf, int len)
+{
+    int ptr;
+    int i;
+    int this_length;
+    uint8_t *string;
+    uint32_t code;
+    uint32_t new_code;
+    int code_len;
+    v42bis_decompress_state_t *ss;
+    uint8_t decode_buf[V42BIS_MAX_STRING_SIZE];
+
+    ss = &s->decompress;
+    if ((s->v42bis_parm_p0 & 1) == 0)
+    {
+        /* Compression is off - just push the incoming data out */
+        for (i = 0;  i < len - ss->max_len;  i += ss->max_len)
+            ss->handler(ss->user_data, buf + i, ss->max_len);
+        if (i < len)
+            ss->handler(ss->user_data, buf + i, len - i);
+        return 0;
+    }
+    ptr = 0;
+    code_len = (ss->transparent)  ?  8  :  ss->v42bis_parm_c2;
+    for (;;)
+    {
+        /* Fill up the bit buffer. */
+        while (ss->input_bit_count < 32 - 8  &&  ptr < len)
+        {
+            ss->input_bit_count += 8;
+            ss->input_bit_buffer |= (uint32_t) buf[ptr++] << (32 - ss->input_bit_count);
+        }
+        if (ss->input_bit_count < code_len)
+            break;
+        new_code = ss->input_bit_buffer >> (32 - code_len);
+        ss->input_bit_count -= code_len;
+        ss->input_bit_buffer <<= code_len;
+        if (ss->transparent)
+        {
+            code = new_code;
+            if (ss->escaped)
+            {
+                ss->escaped = FALSE;
+                if (code == V42BIS_ECM)
+                {
+                    printf("Hit V42BIS_ECM\n");
+                    ss->transparent = FALSE;
+                    code_len = ss->v42bis_parm_c2;
+                }
+                else if (code == V42BIS_EID)
+                {
+                    printf("Hit V42BIS_EID\n");
+                    ss->output_buf[ss->output_octet_count++] = ss->escape_code - 1;
+                    if (ss->output_octet_count >= ss->max_len - s->v42bis_parm_n7)
+                    {
+                        ss->handler(ss->user_data, ss->output_buf, ss->output_octet_count);
+                        ss->output_octet_count = 0;
+                    }
+                }
+                else if (code == V42BIS_RESET)
+                {
+                    printf("Hit V42BIS_RESET\n");
+                }
+                else
+                {
+                    printf("Hit V42BIS_???? - %" PRIu32 "\n", code);
+                }
+            }
+            else if (code == ss->escape_code)
+            {
+                ss->escape_code++;
+                ss->escaped = TRUE;
+            }
+            else
+            {
+                ss->output_buf[ss->output_octet_count++] = (uint8_t) code;
+                if (ss->output_octet_count >= ss->max_len - s->v42bis_parm_n7)
+                {
+                    ss->handler(ss->user_data, ss->output_buf, ss->output_octet_count);
+                    ss->output_octet_count = 0;
+                }
+            }
+        }
+        else
+        {
+            if (new_code < V42BIS_N6)
+            {
+                /* We have a control code. */
+                switch (new_code)
+                {
+                case V42BIS_ETM:
+                    printf("Hit V42BIS_ETM\n");
+                    ss->transparent = TRUE;
+                    code_len = 8;
+                    break;
+                case V42BIS_FLUSH:
+                    printf("Hit V42BIS_FLUSH\n");
+                    v42bis_decompress_flush(s);
+                    break;
+                case V42BIS_STEPUP:
+                    /* We need to increase the codeword size */
+                    printf("Hit V42BIS_STEPUP\n");
+                    if (ss->v42bis_parm_c3 >= s->v42bis_parm_n2)
+                    {
+                        /* Invalid condition */
+                        return -1;
+                    }
+                    code_len = ++ss->v42bis_parm_c2;
+                    ss->v42bis_parm_c3 <<= 1;
+                    break;
+                }
+                continue;
+            }
+            if (ss->first)
+            {
+                ss->first = FALSE;
+                ss->octet = new_code - V42BIS_N6;
+                ss->output_buf[0] = (uint8_t) ss->octet;
+                ss->output_octet_count = 1;
+                if (ss->output_octet_count >= ss->max_len - s->v42bis_parm_n7)
+                {
+                    ss->handler(ss->user_data, ss->output_buf, ss->output_octet_count);
+                    ss->output_octet_count = 0;
+                }
+                ss->old_code = new_code;
+                continue;
+            }
+            /* Start at the end of the buffer, and decode backwards */
+            string = &decode_buf[V42BIS_MAX_STRING_SIZE - 1];
+            /* Check the received code is valid. It can't be too big, as we pulled only the expected number
+            of bits from the input stream. It could, however, be unknown. */
+            if (ss->dict[new_code].parent_code == 0xFFFF)
+                return -1;
+            /* Otherwise we do a straight decode of the new code. */
+            code = new_code;
+            /* Trace back through the octets which form the string, and output them. */
+            while (code >= V42BIS_N5)
+            {
+if (code > 4095) {printf("Code is 0x%" PRIu32 "\n", code); exit(2);}
+                *string-- = ss->dict[code].node_octet;
+                code = ss->dict[code].parent_code;
+            }
+            *string = (uint8_t) (code - V42BIS_N6);
+            ss->octet = code - V42BIS_N6;
+            /* Output the decoded string. */
+            this_length = V42BIS_MAX_STRING_SIZE - (int) (string - decode_buf);
+            memcpy(ss->output_buf + ss->output_octet_count, string, this_length);
+            ss->output_octet_count += this_length;
+            if (ss->output_octet_count >= ss->max_len - s->v42bis_parm_n7)
+            {
+                ss->handler(ss->user_data, ss->output_buf, ss->output_octet_count);
+                ss->output_octet_count = 0;
+            }
+            /* 6.4 Add the string to the dictionary */
+            if (ss->last_length < s->v42bis_parm_n7)
+            {
+                /* 6.4(a) The string does not exceed N7 in length */
+                if (ss->last_old_code != ss->old_code
+                    ||
+                    ss->last_extra_octet != *string)
+                {
+                    /* 6.4(b) The string is not in the table. */
+                    ss->dict[ss->old_code].leaves++;
+                    /* The new one is definitely a leaf */
+                    ss->dict[ss->v42bis_parm_c1].parent_code = (uint16_t) ss->old_code;
+                    ss->dict[ss->v42bis_parm_c1].leaves = 0;
+                    ss->dict[ss->v42bis_parm_c1].node_octet = (uint8_t) ss->octet;
+                    /* 6.5 Recovering a dictionary entry to use next */
+                    for (;;)
+                    {
+                        /* 6.5(a) and (b) */
+                        if (++ss->v42bis_parm_c1 >= s->v42bis_parm_n2)
+                            ss->v42bis_parm_c1 = V42BIS_N5;
+                        /* 6.5(c) We need to reuse a leaf node */
+                        if (ss->dict[ss->v42bis_parm_c1].leaves)
+                            continue;
+                        /* 6.5(d) This is a leaf node, so re-use it */
+                        /* Possibly make the parent a leaf node again */
+                        if (ss->dict[ss->v42bis_parm_c1].parent_code != 0xFFFF)
+                            ss->dict[ss->dict[ss->v42bis_parm_c1].parent_code].leaves--;
+                        ss->dict[ss->v42bis_parm_c1].parent_code = 0xFFFF;
+                        break;
+                    }
+                }
+            }
+            /* Record the addition to the dictionary, so we can check for repeat attempts
+               at the next code - see II.4.3 */
+            ss->last_old_code = ss->old_code;
+            ss->last_extra_octet = *string;
+
+            ss->old_code = new_code;
+            ss->last_length = this_length;
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v42bis_decompress_flush(v42bis_state_t *s)
+{
+    v42bis_decompress_state_t *ss;
+
+    ss = &s->decompress;
+    /* Push out anything remaining. */
+    if (ss->output_octet_count > 0)
+    {
+        ss->handler(ss->user_data, ss->output_buf, ss->output_octet_count);
+        ss->output_octet_count = 0;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if 0
+int v42bis_decompress_dump(v42bis_state_t *s)
+{
+    int i;
+    
+    for (i = 0;  i < V42BIS_MAX_CODEWORDS;  i++)
+    {
+        if (s->decompress.dict[i].parent_code != 0xFFFF)
+        {
+            printf("Entry %4x, prior %4x, leaves %d, octet %2x\n", i, s->decompress.dict[i].parent_code, s->decompress.dict[i].leaves, s->decompress.dict[i].node_octet);
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+void v42bis_compression_control(v42bis_state_t *s, int mode)
+{
+    s->compress.compression_mode = mode;
+    switch (mode)
+    {
+    case V42BIS_COMPRESSION_MODE_ALWAYS:
+        s->compress.change_transparency = -1;
+        break;
+    case V42BIS_COMPRESSION_MODE_NEVER:
+        s->compress.change_transparency = 1;
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+v42bis_state_t *v42bis_init(v42bis_state_t *s,
+                            int negotiated_p0,
+                            int negotiated_p1,
+                            int negotiated_p2,
+                            v42bis_frame_handler_t frame_handler,
+                            void *frame_user_data,
+                            int max_frame_len,
+                            v42bis_data_handler_t data_handler,
+                            void *data_user_data,
+                            int max_data_len)
+{
+    int i;
+
+    if (negotiated_p1 < 512  ||  negotiated_p1 > 65535)
+        return NULL;
+    if (negotiated_p2 < 6  ||  negotiated_p2 > V42BIS_MAX_STRING_SIZE)
+        return NULL;
+    if (s == NULL)
+    {
+        if ((s = (v42bis_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    memset(s, 0, sizeof(*s));
+
+    s->compress.handler = frame_handler;
+    s->compress.user_data = frame_user_data;
+    s->compress.max_len = (max_frame_len < 1024)  ?  max_frame_len  :  1024;
+
+    s->decompress.handler = data_handler;
+    s->decompress.user_data = data_user_data;
+    s->decompress.max_len = (max_data_len < 1024)  ?  max_data_len  :  1024;
+
+    s->v42bis_parm_p0 = negotiated_p0;  /* default is both ways off */
+
+    s->v42bis_parm_n1 = top_bit(negotiated_p1 - 1) + 1;
+    s->v42bis_parm_n2 = negotiated_p1;
+    s->v42bis_parm_n7 = negotiated_p2;
+
+    /* 6.5 */
+    s->compress.v42bis_parm_c1 =
+    s->decompress.v42bis_parm_c1 = V42BIS_N5;
+
+    s->compress.v42bis_parm_c2 =
+    s->decompress.v42bis_parm_c2 = V42BIS_N3 + 1;
+
+    s->compress.v42bis_parm_c3 =
+    s->decompress.v42bis_parm_c3 = 2*V42BIS_N4;
+
+    s->compress.first =
+    s->decompress.first = TRUE;
+    for (i = 0;  i < V42BIS_MAX_CODEWORDS;  i++)
+    {
+        s->compress.dict[i].parent_code =
+        s->decompress.dict[i].parent_code = 0xFFFF;
+        s->compress.dict[i].leaves =
+        s->decompress.dict[i].leaves = 0;
+    }
+    /* Point the root nodes for decompression to themselves. It doesn't matter much what
+       they are set to, as long as they are considered "known" codes. */
+    for (i = 0;  i < V42BIS_N5;  i++)
+        s->decompress.dict[i].parent_code = (uint16_t) i;
+    s->compress.string_code = 0xFFFFFFFF;
+    s->compress.latest_code = 0xFFFFFFFF;
+    
+    s->decompress.last_old_code = 0xFFFFFFFF;
+    s->decompress.last_extra_octet = -1;
+
+    s->compress.compression_mode = V42BIS_COMPRESSION_MODE_DYNAMIC;
+
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v42bis_release(v42bis_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/v8.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,880 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v8.c - V.8 modem negotiation processing.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v8.c,v 1.20 2006/11/30 15:41:47 steveu Exp $
+ */
+ 
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/queue.h"
+#include "spandsp/async.h"
+#include "spandsp/dds.h"
+#include "spandsp/tone_detect.h"
+#include "spandsp/tone_generate.h"
+#include "spandsp/super_tone_rx.h"
+#include "spandsp/modem_connect_tones.h"
+#include "spandsp/power_meter.h"
+#include "spandsp/fsk.h"
+#include "spandsp/v8.h"
+
+#define ms_to_samples(t)    (((t)*SAMPLE_RATE)/1000)
+
+enum
+{
+    V8_WAIT_1S,
+    V8_CI,
+    V8_CI_ON,
+    V8_CI_OFF,
+    V8_HEARD_ANSAM,
+    V8_CM_ON,
+    V8_CJ_ON,
+    V8_CM_WAIT,
+
+    V8_SIGC,
+    V8_WAIT_200MS,
+    V8_JM_ON,
+    V8_SIGA,
+
+    V8_PARKED
+} v8_states_e;
+
+enum
+{
+    V8_SYNC_UNKNOWN = 0,
+    V8_SYNC_CI,
+    V8_SYNC_CM_JM,
+    V8_SYNC_V92
+} v8_sync_types_e;
+
+const char *v8_call_function_to_str(int call_function)
+{
+    switch (call_function)
+    {
+    case V8_CALL_TBS:
+        return "TBS";
+    case V8_CALL_H324:
+        return "H.324 PSTN multimedia terminal";
+    case V8_CALL_V18:
+        return "V.18 textphone";
+    case V8_CALL_T101:
+        return "T.101 videotext";
+    case V8_CALL_T30_TX:
+        return "T.30 Tx FAX";
+    case V8_CALL_T30_RX:
+        return "T.30 Rx FAX";
+    case V8_CALL_V_SERIES:
+        return "V series modem data";
+    case V8_CALL_FUNCTION_EXTENSION:
+        return "Call function is in extention octet";
+    }
+    return "???";
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *v8_modulation_to_str(int modulation_scheme)
+{
+    switch (modulation_scheme)
+    {
+    case V8_MOD_V17:
+        return "V.17 half-duplex";
+    case V8_MOD_V21:
+        return "V.21 duplex";
+    case V8_MOD_V22:
+        return "V.22/V22.bis duplex";
+    case V8_MOD_V23HALF:
+        return "V.23 half-duplex";
+    case V8_MOD_V23:
+        return "V.23 duplex";
+    case V8_MOD_V26BIS:
+        return "V.23 duplex";
+    case V8_MOD_V26TER:
+        return "V.23 duplex";
+    case V8_MOD_V27TER:
+        return "V.23 duplex";
+    case V8_MOD_V29:
+        return "V.29 half-duplex";
+    case V8_MOD_V32:
+        return "V.32/V32.bis duplex";
+    case V8_MOD_V34HALF:
+        return "V.34 half-duplex";
+    case V8_MOD_V34:
+        return "V.34 duplex";
+    case V8_MOD_V90:
+        return "V.90 duplex";
+    case V8_MOD_V92:
+        return "V.92 duplex";
+    case V8_MOD_FAILED:
+        return "negotiation failed";
+    }
+    return "???";
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *v8_protocol_to_str(int protocol)
+{
+    switch (protocol)
+    {
+    case V8_PROTOCOL_NONE:
+        return "None";
+    case V8_PROTOCOL_LAPM_V42:
+        return "LAPM";
+    case V8_PROTOCOL_EXTENSION:
+        return "Extension";
+    }
+    return "Undefined";
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *v8_pstn_access_to_str(int pstn_access)
+{
+    return "???";
+}
+/*- End of function --------------------------------------------------------*/
+
+const char *v8_pcm_modem_availability_to_str(int pcm_modem_availability)
+{
+    return "???";
+}
+/*- End of function --------------------------------------------------------*/
+
+void v8_log_supported_modulations(v8_state_t *s, int modulation_schemes)
+{
+    const char *comma;
+    int i;
+    
+    comma = "";
+    span_log(&s->logging, SPAN_LOG_FLOW, "");
+    for (i = 0;  i < 32;  i++)
+    {
+        if ((modulation_schemes & (1 << i)))
+        {
+            span_log(&s->logging, SPAN_LOG_FLOW | SPAN_LOG_SUPPRESS_LABELLING, "%s%s", comma, v8_modulation_to_str(modulation_schemes & (1 << i)));
+            comma = ", ";
+        }
+    }
+    span_log(&s->logging, SPAN_LOG_FLOW | SPAN_LOG_SUPPRESS_LABELLING, " supported\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+static const uint8_t *process_call_function(v8_state_t *s, const uint8_t *p)
+{
+    int call_function;
+
+    call_function = (*p >> 5) & 0x07;
+    span_log(&s->logging, SPAN_LOG_FLOW, "%s\n", v8_call_function_to_str(call_function));
+    s->call_function = call_function;
+    return ++p;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const uint8_t *process_modulation_mode(v8_state_t *s, const uint8_t *p)
+{
+    int far_end_modulations;
+
+    /* Modulation mode octet */
+    far_end_modulations = 0;
+    if (*p & 0x80)
+        far_end_modulations |= V8_MOD_V34HALF;
+    if (*p & 0x40)
+        far_end_modulations |= V8_MOD_V34;
+    if (*p & 0x20)
+        far_end_modulations |= V8_MOD_V90;
+
+    if ((*++p & 0x38) == 0x10)
+    {
+        if (*p & 0x80)
+            far_end_modulations |= V8_MOD_V27TER;
+        if (*p & 0x40)
+            far_end_modulations |= V8_MOD_V29;
+        if (*p & 0x04)
+            far_end_modulations |= V8_MOD_V17;
+        if (*p & 0x02)
+            far_end_modulations |= V8_MOD_V22;
+        if (*p & 0x01)
+            far_end_modulations |= V8_MOD_V32;
+
+        if ((*++p & 0x38) == 0x10)
+        {
+            if (*p & 0x80)
+                far_end_modulations |= V8_MOD_V21;
+            if (*p & 0x40)
+                far_end_modulations |= V8_MOD_V23HALF;
+            if (*p & 0x04)
+                far_end_modulations |= V8_MOD_V23;
+            if (*p & 0x02)
+                far_end_modulations |= V8_MOD_V26BIS;
+            if (*p & 0x01)
+                far_end_modulations |= V8_MOD_V26TER;
+            /* Skip any future extensions we do not understand */
+            while  ((*++p & 0x38) == 0x10)
+                /* dummy loop */;
+        }
+    }
+    s->far_end_modulations = far_end_modulations;
+    v8_log_supported_modulations(s, s->far_end_modulations);
+    return ++p;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const uint8_t *process_protocols(v8_state_t *s, const uint8_t *p)
+{
+    int protocol;
+
+    protocol = (*p >> 5) & 0x07;
+    span_log(&s->logging, SPAN_LOG_FLOW, "%s\n", v8_protocol_to_str(protocol));
+    s->protocol = protocol;
+    return ++p;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const uint8_t *process_pstn_access(v8_state_t *s, const uint8_t *p)
+{
+    int pstn_access;
+
+    pstn_access = (*p >> 5) & 0x07;
+    if (pstn_access & V8_PSTN_ACCESS_DCE_ON_DIGTIAL)
+        span_log(&s->logging, SPAN_LOG_FLOW, "DCE on digital network connection\n");
+    else
+        span_log(&s->logging, SPAN_LOG_FLOW, "DCE on analogue network connection\n");
+    if (pstn_access & V8_PSTN_ACCESS_ANSWER_DCE_CELLULAR)
+        span_log(&s->logging, SPAN_LOG_FLOW, "Answer DCE on cellular connection\n");
+    if (pstn_access & V8_PSTN_ACCESS_CALL_DCE_CELLULAR)
+        span_log(&s->logging, SPAN_LOG_FLOW, "Call DCE on cellular connection\n");
+    return ++p;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const uint8_t *process_non_standard_facilities(v8_state_t *s, const uint8_t *p)
+{
+    ++p;
+    p += *p;
+    return p;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const uint8_t *process_pcm_modem_availability(v8_state_t *s, const uint8_t *p)
+{
+    int pcm_availability;
+
+    pcm_availability = (*p >> 5) & 0x07;
+    if (pcm_availability & V8_PSTN_PCM_MODEM_V91)
+        span_log(&s->logging, SPAN_LOG_FLOW, "V.91 available\n");
+    if (pcm_availability & V8_PSTN_PCM_MODEM_V90_V92_DIGITAL)
+        span_log(&s->logging, SPAN_LOG_FLOW, "V.90 or V.92 digital modem available\n");
+    if (pcm_availability & V8_PSTN_PCM_MODEM_V90_V92_ANALOGUE)
+        span_log(&s->logging, SPAN_LOG_FLOW, "V.90 or V.92 analogue modem available\n");
+    return ++p;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const uint8_t *process_t66(v8_state_t *s, const uint8_t *p)
+{
+    return ++p;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void ci_decode(v8_state_t *s)
+{
+    if ((s->rx_data[0] & 0x1F) == 0x01)
+        process_call_function(s, &s->rx_data[0]);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void cm_jm_decode(v8_state_t *s)
+{
+    const uint8_t *p;
+
+    if (s->got_cm_jm)
+        return;
+
+    /* We must receive two consecutive identical CM or JM sequences to accept it. */
+    if (s->cm_jm_count <= 0
+        ||
+        s->cm_jm_count != s->rx_data_ptr
+        ||
+        memcmp(s->cm_jm_data, s->rx_data, s->rx_data_ptr))
+    {
+        /* Save the current CM or JM sequence */
+        s->cm_jm_count = s->rx_data_ptr;
+        memcpy(s->cm_jm_data, s->rx_data, s->rx_data_ptr);
+        return;
+    }
+    /* We have a pair of matching CMs or JMs */
+    s->got_cm_jm = TRUE;
+
+    span_log(&s->logging, SPAN_LOG_FLOW, "Decoding\n");
+
+    /* Zero indicates the end */
+    s->cm_jm_data[s->cm_jm_count] = 0;
+
+    s->far_end_modulations = 0;
+    p = s->cm_jm_data;
+
+    while (*p)
+    {
+        switch (*p & 0x1F)
+        {
+        case 0x01:
+            p = process_call_function(s, p);
+            break;
+        case 0x05:
+            p = process_modulation_mode(s, p);
+            break;
+        case 0x0A:
+            p = process_protocols(s, p);
+            break;
+        case 0x0D:
+            p = process_pstn_access(s, p);
+            break;
+        case 0x0F:
+            p = process_non_standard_facilities(s, p);
+            break;
+        case 0x07:
+            p = process_pcm_modem_availability(s, p);
+            break;
+        case 0x0E:
+            p = process_t66(s, p);
+            break;
+        default:
+            p++;
+            break;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void put_bit(void *user_data, int bit)
+{
+    v8_state_t *s;
+    int new_preamble_type;
+    const char *tag;
+    uint8_t data;
+
+    s = user_data;
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_CARRIER_UP:
+        case PUTBIT_CARRIER_DOWN:
+        case PUTBIT_TRAINING_SUCCEEDED:
+        case PUTBIT_TRAINING_FAILED:
+            break;
+        default:
+            break;
+        }
+        return;
+    }
+    /* Wait until we sync. */
+    s->bit_stream = (s->bit_stream >> 1) | (bit << 19);
+    if (s->bit_stream == 0x803FF)
+        new_preamble_type = V8_SYNC_CI;
+    else if (s->bit_stream == 0xF03FF)
+        new_preamble_type = V8_SYNC_CM_JM;
+    else if (s->bit_stream == 0xAABFF)
+        new_preamble_type = V8_SYNC_V92;
+    else
+        new_preamble_type = V8_SYNC_UNKNOWN;
+    if (new_preamble_type)
+    {
+        /* Debug */
+        if (span_log_test(&s->logging, SPAN_LOG_FLOW))
+        {
+            if (s->preamble_type == V8_SYNC_CI)
+            {
+                tag = "CI: ";
+            }
+            else if (s->preamble_type == V8_SYNC_CM_JM)
+            {
+                if (s->caller)
+                    tag = "JM: ";
+                else
+                    tag = "CM: ";
+            }
+            else if (s->preamble_type == V8_SYNC_V92)
+            {
+                tag = "V92: ";
+            }
+            else
+            {
+                tag = "??: ";
+            }
+            span_log_buf(&s->logging, SPAN_LOG_FLOW, tag, s->rx_data, s->rx_data_ptr);
+        }
+        /* Decode previous sequence */
+        switch (s->preamble_type)
+        {
+        case V8_SYNC_CI:
+            ci_decode(s);
+            break;
+        case V8_SYNC_CM_JM:
+            cm_jm_decode(s);
+            break;
+        }
+        s->preamble_type = new_preamble_type;
+        s->bit_cnt = 0;
+        s->rx_data_ptr = 0;
+    }
+    
+    /* Parse octets with 1 bit start, 1 bit stop */
+    if (s->preamble_type)
+    {
+        s->bit_cnt++;
+        /* Start, stop? */
+        if ((s->bit_stream & 0x80400) == 0x80000  &&  s->bit_cnt >= 10)
+        {
+            /* Store the available data */
+            data = (uint8_t) ((s->bit_stream >> 11) & 0xFF);
+            /* CJ detection */
+            if (data == 0)
+            {
+                if (++s->zero_byte_count == 3)
+                    s->got_cj = TRUE;
+            }
+            else
+            {
+                s->zero_byte_count = 0;
+            }
+
+            if (s->rx_data_ptr < (int) (sizeof(s->rx_data) - 1))
+                s->rx_data[s->rx_data_ptr++] = data;
+            s->bit_cnt = 0;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void v8_decode_init(v8_state_t *s)
+{
+    if (s->caller)
+        fsk_rx_init(&s->v21rx, &preset_fsk_specs[FSK_V21CH2], FALSE, put_bit, s);
+    else
+        fsk_rx_init(&s->v21rx, &preset_fsk_specs[FSK_V21CH1], FALSE, put_bit, s);
+    s->preamble_type = 0;
+    s->bit_stream = 0;
+    s->cm_jm_count = 0;
+    s->got_cm_jm = FALSE;
+    s->got_cj = FALSE;
+    s->zero_byte_count = 0;
+    s->rx_data_ptr = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int get_bit(void *user_data)
+{
+    v8_state_t *s;
+    uint8_t bit;
+
+    s = user_data;
+    if (queue_read(&s->tx_queue, &bit, 1) <= 0)
+        bit = 1;
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void v8_put_byte(v8_state_t *s, int data)
+{
+    int i;
+    uint8_t bits[10];
+
+    /* Insert start & stop bits */
+    bits[0] = 0;
+    for (i = 1;  i < 9;  i++)
+    {
+        bits[i] = (uint8_t) (data & 1);
+        data >>= 1;
+    }
+    bits[9] = 1;
+    queue_write(&s->tx_queue, bits, 10);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void send_cm_jm(v8_state_t *s, int mod_mask)
+{
+    int val;
+    static const uint8_t preamble[20] =
+    {
+        /* 10 1's (0x3FF), then 10 bits of CM sync (0x00F) */
+        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1
+    };
+
+    /* Send a CM, or a JM as appropriate */
+    queue_write(&s->tx_queue, preamble, 20);
+    
+    /* Data call */
+    v8_put_byte(s, (V8_CALL_V_SERIES << 5) | 0x01);
+    
+    /* Supported modulations */
+    val = 0x05;
+    if (mod_mask & V8_MOD_V90)
+        val |= 0x20;
+    if (mod_mask & V8_MOD_V34)
+        val |= 0x40;
+    v8_put_byte(s, val);
+
+    val = 0x10;
+    if (mod_mask & V8_MOD_V32)
+        val |= 0x01;
+    if (mod_mask & V8_MOD_V22)
+        val |= 0x02;
+    if (mod_mask & V8_MOD_V17)
+        val |= 0x04;
+    if (mod_mask & V8_MOD_V29)
+        val |= 0x40;
+    if (mod_mask & V8_MOD_V27TER)
+        val |= 0x80;
+    v8_put_byte(s, val);
+
+    val = 0x10;
+    if (mod_mask & V8_MOD_V26TER)
+        val |= 0x01;
+    if (mod_mask & V8_MOD_V26BIS)
+        val |= 0x02;
+    if (mod_mask & V8_MOD_V23)
+        val |= 0x04;
+    if (mod_mask & V8_MOD_V23HALF)
+        val |= 0x40;
+    if (mod_mask & V8_MOD_V21)
+        val |= 0x80;
+    v8_put_byte(s, val);
+
+    v8_put_byte(s, (0 << 5) | 0x07);
+
+    v8_put_byte(s, (V8_PROTOCOL_LAPM_V42 << 5) | 0x0A);
+
+    /* No cellular right now */    
+    v8_put_byte(s, (0 << 5) | 0x0D);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int select_modulation(int mask)
+{
+    if (mask & V8_MOD_V90)
+        return V8_MOD_V90;
+    if (mask & V8_MOD_V34)
+        return V8_MOD_V34;
+    if (mask & V8_MOD_V32)
+        return V8_MOD_V32;
+    if (mask & V8_MOD_V23)
+        return V8_MOD_V23;
+    if (mask & V8_MOD_V21)
+        return V8_MOD_V21;
+    return V8_MOD_FAILED;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v8_tx(v8_state_t *s, int16_t *amp, int max_len)
+{
+    int len;
+
+    //span_log(&s->logging, SPAN_LOG_FLOW, "v8_tx state %d\n", s->state);
+    len = 0;
+    switch (s->state)
+    {
+    case V8_CI_ON:
+    case V8_CM_ON:
+    case V8_JM_ON:
+    case V8_CJ_ON:
+        len = fsk_tx(&s->v21tx, amp, max_len);
+        break;
+    case V8_CM_WAIT:
+        /* Send the ANSam tone */
+        len = modem_connect_tones_tx(&s->ec_dis_tx, amp, max_len);
+        break;
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v8_rx(v8_state_t *s, const int16_t *amp, int len)
+{
+    int i;
+    int residual_samples;
+    v8_result_t result;
+    static const uint8_t preamble[20] =
+    {
+        /* 10 1's (0x3FF), then 10 bits of CI sync (0x001) */
+        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
+    };
+
+    //span_log(&s->logging, SPAN_LOG_FLOW, "v8_rx state %d\n", s->state);
+    residual_samples = 0;
+    switch (s->state)
+    {
+    case V8_WAIT_1S:
+        /* Wait 1 second before sending the first CI packet */
+        if ((s->negotiation_timer -= len) > 0)
+            break;
+        s->state = V8_CI;
+        s->ci_count = 0;
+        modem_connect_tones_rx_init(&s->ec_dis_rx, MODEM_CONNECT_TONES_EC_DISABLE, NULL, NULL);
+        fsk_tx_init(&s->v21tx, &preset_fsk_specs[FSK_V21CH1], get_bit, s);
+        /* Fall through to the next state */
+    case V8_CI:
+        residual_samples = modem_connect_tones_rx(&s->ec_dis_rx, amp, len);
+        /* Send 4 CI packets in a burst (the spec says at least 3) */
+        for (i = 0;  i < 4;  i++)
+        {
+            /* 10 1's (0x3FF), then CI sync (0x001) */
+            queue_write(&s->tx_queue, preamble, 20);
+            v8_put_byte(s, (V8_CALL_V_SERIES << 5) | 0x01);
+        }
+        s->state = V8_CI_ON;
+        break;
+    case V8_CI_ON:
+        residual_samples = modem_connect_tones_rx(&s->ec_dis_rx, amp, len);
+        if (queue_empty(&s->tx_queue))
+        {
+            s->state = V8_CI_OFF;
+            s->ci_timer = ms_to_samples(500);
+        }
+        break;
+    case V8_CI_OFF:
+        residual_samples = modem_connect_tones_rx(&s->ec_dis_rx, amp, len);
+        /* Check if an ANSam tone has been detected */
+        if (modem_connect_tones_rx_get(&s->ec_dis_rx))
+        {
+            /* Set the Te interval. The spec. says 500ms is the minimum,
+               but gives reasons why 1 second is a better value. */
+            s->ci_timer = ms_to_samples(1000);
+            s->state = V8_HEARD_ANSAM;
+            break;
+        }
+        if ((s->ci_timer -= len) <= 0)
+        {
+            if (++s->ci_count >= 10)
+            {
+                /* The spec says we should give up now. */
+                s->state = V8_PARKED;
+                if (s->result_handler)
+                    s->result_handler(s->result_handler_user_data, NULL);
+            }
+            else
+            {
+                /* Try again */
+                s->state = V8_CI;
+            }
+        }
+        break;
+    case V8_HEARD_ANSAM:
+        /* We have heard the ANSam signal, but we still need to wait for the
+           end of the Te timeout period to comply with the spec. */
+        if ((s->ci_timer -= len) <= 0)
+        {
+            v8_decode_init(s);
+            s->state = V8_CM_ON;
+            s->negotiation_timer = ms_to_samples(5000);
+            send_cm_jm(s, s->available_modulations);
+        }
+        break;
+    case V8_CM_ON:
+        residual_samples = fsk_rx(&s->v21rx, amp, len);
+        if (s->got_cm_jm)
+        {
+            /* Now JM has been detected we send CJ and wait for 75 ms
+               before finishing the V.8 analysis. */
+            s->negotiated_modulation = select_modulation(s->far_end_modulations);
+
+            queue_flush(&s->tx_queue);
+            for (i = 0;  i < 9;  i++)
+                v8_put_byte(s, 0);
+            s->state = V8_CJ_ON;
+            break;
+        }
+        if ((s->negotiation_timer -= len) <= 0)
+        {
+            /* Timeout */
+            s->state = V8_PARKED;
+            if (s->result_handler)
+                s->result_handler(s->result_handler_user_data, NULL);
+        }
+        if (queue_empty(&s->tx_queue))
+        {
+            /* Send CM again */
+            send_cm_jm(s, s->available_modulations);
+        }
+        break;
+    case V8_CJ_ON:
+        residual_samples = fsk_rx(&s->v21rx, amp, len);
+        if (queue_empty(&s->tx_queue))
+        {
+            s->negotiation_timer = ms_to_samples(75);
+            s->state = V8_SIGC;
+        }
+        break;
+    case V8_SIGC:
+        if ((s->negotiation_timer -= len) <= 0)
+        {
+            /* The V.8 negotiation has succeeded. */
+            s->state = V8_PARKED;
+            if (s->result_handler)
+            {
+                result.call_function = s->call_function;
+                result.available_modulations = s->far_end_modulations;
+                result.negotiated_modulation = s->negotiated_modulation;
+                result.protocol = s->protocol;
+                result.pstn_access = s->pstn_access;
+                result.nsf_seen = s->nsf_seen;
+                result.pcm_modem_availability = s->pcm_modem_availability;
+                result.t66_seen = s->t66_seen;
+                s->result_handler(s->result_handler_user_data, &result);
+            }
+        }
+        break;
+    case V8_WAIT_200MS:
+        if ((s->negotiation_timer -= len) <= 0)
+        {
+            /* Send the ANSam tone */
+            modem_connect_tones_tx_init(&s->ec_dis_tx, MODEM_CONNECT_TONES_EC_DISABLE_MOD);
+                
+            v8_decode_init(s);
+            s->state = V8_CM_WAIT;
+            s->negotiation_timer = ms_to_samples(5000);
+        }
+        break;
+    case V8_CM_WAIT:
+        residual_samples = fsk_rx(&s->v21rx, amp, len);
+        if (s->got_cm_jm)
+        {
+            /* Stop sending ANSam and send JM instead */
+            fsk_tx_init(&s->v21tx, &preset_fsk_specs[FSK_V21CH2], get_bit, s);
+            /* Set the timeout for JM */
+            s->negotiation_timer = ms_to_samples(5000); 
+            s->state = V8_JM_ON;
+            s->common_modulations = s->available_modulations & s->far_end_modulations;
+            s->negotiated_modulation = select_modulation(s->common_modulations);
+            send_cm_jm(s, s->common_modulations);
+            break;
+        }
+        if ((s->negotiation_timer -= len) <= 0)
+        {
+            /* Timeout */
+            s->state = V8_PARKED;
+            if (s->result_handler)
+                s->result_handler(s->result_handler_user_data, NULL);
+        }
+        break;
+    case V8_JM_ON:
+        residual_samples = fsk_rx(&s->v21rx, amp, len);
+        if (s->got_cj)
+        {
+            /* Stop sending JM, and wait 75 ms */
+            s->negotiation_timer = ms_to_samples(75);
+            s->state = V8_SIGA;
+            break;
+        }
+        if ((s->negotiation_timer -= len) <= 0)
+        {
+            /* Timeout */
+            s->state = V8_PARKED;
+            if (s->result_handler)
+                s->result_handler(s->result_handler_user_data, NULL);
+            break;
+        }
+        if (queue_empty(&s->tx_queue))
+        {
+            /* Send JM */
+            send_cm_jm(s, s->common_modulations);
+        }
+        break;
+    case V8_SIGA:
+        if ((s->negotiation_timer -= len) <= 0)
+        {
+            /* The V.8 negotiation has succeeded. */
+            s->state = V8_PARKED;
+            if (s->result_handler)
+            {
+                result.call_function = s->call_function;
+                result.available_modulations = s->far_end_modulations;
+                result.negotiated_modulation = s->negotiated_modulation;
+                result.protocol = s->protocol;
+                result.pstn_access = s->pstn_access;
+                result.nsf_seen = s->nsf_seen;
+                result.pcm_modem_availability = s->pcm_modem_availability;
+                result.t66_seen = s->t66_seen;
+                s->result_handler(s->result_handler_user_data, &result);
+            }
+        }
+        break;
+    case V8_PARKED:
+        residual_samples = len;
+        break;
+    }
+    return residual_samples;
+}
+/*- End of function --------------------------------------------------------*/
+
+v8_state_t *v8_init(v8_state_t *s,
+                    int caller,
+                    int available_modulations,
+                    v8_result_handler_t *result_handler,
+                    void *user_data)
+{
+    memset(s, 0, sizeof(*s));
+    s->caller = caller;
+    s->available_modulations = available_modulations;
+    s->result_handler = result_handler;
+    s->result_handler_user_data = user_data;
+
+    s->ci_timer = 0;
+    if (s->caller)
+    {
+        s->state = V8_WAIT_1S;
+        s->negotiation_timer = ms_to_samples(1000);
+    }
+    else
+    {
+        s->state = V8_WAIT_200MS;
+        s->negotiation_timer = ms_to_samples(200);
+    }
+    if (queue_create(&s->tx_queue, 1024, 0))
+        return NULL;
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int v8_release(v8_state_t *s)
+{
+    return queue_delete(&s->tx_queue);
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/vector_float.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,317 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * vector_float.c - Floating vector arithmetic routines.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: vector_float.c,v 1.5 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/vector_float.h"
+
+void vec_copyf(float z[], const float x[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i];
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_copy(double z[], const double x[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i];
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_copyl(long double z[], const long double x[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i];
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+void vec_zerof(float z[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = 0.0f;
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_zero(double z[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = 0.0;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_zerol(long double z[], int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = 0.0;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+void vec_setf(float z[], float x, int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = x;
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_set(double z[], double x, int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = x;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_setl(long double z[], long double x, int n)
+{
+    int i;
+    
+    for (i = 0;  i < n;  i++)
+        z[i] = x;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+void vec_addf(float z[], const float x[], const float y[], int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i] + y[i];
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_add(double z[], const double x[], const double y[], int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i] + y[i];
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_addl(long double z[], const long double x[], const long double y[], int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i] + y[i];
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_scaled_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i]*x_scale + y[i]*y_scale;
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_scaled_add(double z[], const double x[], double x_scale, const double y[], double y_scale, int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i]*x_scale + y[i]*y_scale;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_scaled_addl(long double z[], const long double x[], long double x_scale, const long double y[], long double y_scale, int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i]*x_scale + y[i]*y_scale;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+void vec_subf(float z[], const float x[], const float y[], int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i] - y[i];
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_sub(double z[], const double x[], const double y[], int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i] - y[i];
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_subl(long double z[], const long double x[], const long double y[], int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i] - y[i];
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+void vec_scaled_subf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i]*x_scale - y[i]*y_scale;
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_scaled_sub(double z[], const double x[], double x_scale, const double y[], double y_scale, int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i]*x_scale - y[i]*y_scale;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_scaled_subl(long double z[], const long double x[], long double x_scale, const long double y[], long double y_scale, int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i]*x_scale - y[i]*y_scale;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+void vec_scalar_mulf(float z[], const float x[], float y, int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i]*y;
+}
+/*- End of function --------------------------------------------------------*/
+
+void vec_scalar_mul(double z[], const double x[], double y, int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i]*y;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+void vec_scalar_mull(long double z[], const long double x[], long double y, int n)
+{
+    int i;
+
+    for (i = 0;  i < n;  i++)
+        z[i] = x[i]*y;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+float vec_dot_prodf(const float x[], const float y[], int n)
+{
+    int i;
+    float z;
+
+    z = 0.0f;
+    for (i = 0;  i < n;  i++)
+        z += x[i]*y[i];
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+double vec_dot_prod(const double x[], const double y[], int n)
+{
+    int i;
+    double z;
+
+    z = 0.0;
+    for (i = 0;  i < n;  i++)
+        z += x[i]*y[i];
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LONG_DOUBLE)
+long double vec_dot_prodl(const long double x[], const long double y[], int n)
+{
+    int i;
+    long double z;
+
+    z = 0.0;
+    for (i = 0;  i < n;  i++)
+        z += x[i]*y[i];
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/src/vector_int.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,348 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * vector_int.c - Integer vector arithmetic
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: vector_int.c,v 1.5 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+
+#include "spandsp/telephony.h"
+#include "spandsp/logging.h"
+#include "spandsp/vector_int.h"
+
+int32_t vec_dot_prodi16(const int16_t x[], const int16_t y[], int n)
+{
+    int32_t z;
+
+#if defined(__GNUC__)  &&  defined(__i386__)
+    __asm__ __volatile__(
+        " emms;\n"
+        " pxor %%mm0,%%mm0;\n"
+        " leal -32(%%esi,%%eax,2),%%edx;\n"     /* edx = top - 32 */
+
+        " cmpl %%edx,%%esi;\n"
+        " ja 1f;\n"
+
+        /* Work in blocks of 16 int16_t's until we are near the end */
+        " .p2align 2;\n"
+        "2:\n"
+        " movq (%%edi),%%mm1;\n"
+        " movq (%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 8(%%edi),%%mm1;\n"
+        " movq 8(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 16(%%edi),%%mm1;\n"
+        " movq 16(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        " movq 24(%%edi),%%mm1;\n"
+        " movq 24(%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+
+        " addl $32,%%esi;\n"
+        " addl $32,%%edi;\n"
+        " cmpl %%edx,%%esi;\n"
+        " jbe 2b;\n"
+
+        " .p2align 2;\n"
+        "1:\n"
+        " addl $24,%%edx;\n"                  /* now edx = top - 8 */
+        " cmpl %%edx,%%esi;\n"
+        " ja 3f;\n"
+
+        /* Work in blocks of 4 int16_t's until we are near the end */
+        " .p2align 2;\n"
+        "4:\n"
+        " movq (%%edi),%%mm1;\n"
+        " movq (%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+
+        " addl $8,%%esi;\n"
+        " addl $8,%%edi;\n"
+        " cmpl %%edx,%%esi;"
+        " jbe 4b;\n"
+
+        " .p2align 2;\n"
+        "3:\n"
+        " addl $4,%%edx;\n"                  /* now edx = top - 4 */
+        " cmpl %%edx,%%esi;\n"
+        " ja 5f;\n"
+
+        /* Work in a block of 2 int16_t's */
+        " movd (%%edi),%%mm1;\n"
+        " movd (%%esi),%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+
+        " addl $4,%%esi;\n"
+        " addl $4,%%edi;\n"
+
+        " .p2align 2;\n"
+        "5:\n"
+        " addl $2,%%edx;\n"                  /* now edx = top - 2 */
+        " cmpl %%edx,%%esi;\n"
+        " ja 6f;\n"
+
+        /* Deal with the very last int16_t, when n is odd */
+        " movswl (%%edi),%%eax;\n"
+        " andl $65535,%%eax;\n"
+        " movd %%eax,%%mm1;\n"
+        " movswl (%%esi),%%eax;\n"
+        " andl $65535,%%eax;\n"
+        " movd %%eax,%%mm2;\n"
+        " pmaddwd %%mm2,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+
+        " .p2align 2;\n"
+        "6:\n"
+        /* Merge the pieces of the answer */
+        " movq %%mm0,%%mm1;\n"
+        " punpckhdq %%mm0,%%mm1;\n"
+        " paddd %%mm1,%%mm0;\n"
+        /* et voila, eax has the final result */
+        " movd %%mm0,%%eax;\n"
+
+        " emms;\n"
+        : "=a" (z)
+        : "S" (x), "D" (y), "a" (n)
+        : "cc"
+    );
+#else
+    int i;
+
+    z = 0;
+    for (i = 0;  i < n;  i++)
+        z += x[i]*y[i];
+#endif
+    return  z;
+}
+/*- End of function --------------------------------------------------------*/
+
+int32_t vec_min_maxi16(const int16_t x[], int n, int16_t out[])
+{
+#if defined(__GNUC__)  &&  defined(__i386__)
+    static const int32_t lower_bound = 0x80008000;
+    static const int32_t upper_bound = 0x7FFF7FFF;
+    int32_t max;
+
+    __asm__ __volatile__(
+        " emms;\n"
+        " pushl %%edx;\n"
+        " leal -8(%%esi,%%eax,2),%%edx;\n"
+
+        " cmpl %%edx,%%esi;\n"
+        " jbe 2f;\n"
+        " movd %[lower],%%mm0;\n"
+        " movd %[upper],%%mm1;\n"
+        " jmp 1f;\n"
+
+        " .p2align 2;\n"
+        "2:\n"
+        " movq (%%esi),%%mm0;\n"   /* mm0 will be max's */
+        " movq %%mm0,%%mm1;\n"     /* mm1 will be min's */
+        " addl $8,%%esi;\n"
+        " cmpl %%edx,%%esi;\n"
+        " ja 4f;\n"
+
+        " .p2align 2;\n"
+        "3:\n"
+        " movq (%%esi),%%mm2;\n"
+
+        " movq %%mm2,%%mm3;\n"
+        " pcmpgtw %%mm0,%%mm3;\n"  /* mm3 is bitmask for words where mm2 > mm0 */ 
+        " movq %%mm3,%%mm4;\n"
+        " pand %%mm2,%%mm3;\n"     /* mm3 is mm2 masked to new max's */
+        " pandn %%mm0,%%mm4;\n"    /* mm4 is mm0 masked to its max's */
+        " por %%mm3,%%mm4;\n"
+        " movq %%mm4,%%mm0;\n"     /* Now mm0 is updated max's */
+        
+        " movq %%mm1,%%mm3;\n"
+        " pcmpgtw %%mm2,%%mm3;\n"  /* mm3 is bitmask for words where mm2 < mm1 */ 
+        " pand %%mm3,%%mm2;\n"     /* mm2 is mm2 masked to new min's */
+        " pandn %%mm1,%%mm3;\n"    /* mm3 is mm1 masked to its min's */
+        " por %%mm3,%%mm2;\n"
+        " movq %%mm2,%%mm1;\n"     /* now mm1 is updated min's */
+
+        " addl $8,%%esi;\n"
+        " cmpl %%edx,%%esi;\n"
+        " jbe 3b;\n"
+
+        " .p2align 2;\n"
+        "4:\n"
+        /* Merge down the 4-word max/mins to lower 2 words */
+        " movq %%mm0,%%mm2;\n"
+        " psrlq $32,%%mm2;\n"
+        " movq %%mm2,%%mm3;\n"
+        " pcmpgtw %%mm0,%%mm3;\n"  /* mm3 is bitmask for words where mm2 > mm0 */ 
+        " pand %%mm3,%%mm2;\n"     /* mm2 is mm2 masked to new max's */
+        " pandn %%mm0,%%mm3;\n"    /* mm3 is mm0 masked to its max's */
+        " por %%mm3,%%mm2;\n"
+        " movq %%mm2,%%mm0;\n"     /* now mm0 is updated max's */
+
+        " movq %%mm1,%%mm2;\n"
+        " psrlq $32,%%mm2;\n"
+        " movq %%mm1,%%mm3;\n"
+        " pcmpgtw %%mm2,%%mm3;\n"  /* mm3 is bitmask for words where mm2 < mm1 */ 
+        " pand %%mm3,%%mm2;\n"     /* mm2 is mm2 masked to new min's */
+        " pandn %%mm1,%%mm3;\n"    /* mm3 is mm1 masked to its min's */
+        " por %%mm3,%%mm2;\n"
+        " movq %%mm2,%%mm1;\n"     /* now mm1 is updated min's */
+
+        " .p2align 2;\n"
+        "1:\n"
+        " addl $4,%%edx;\n"        /* now dx = top-4 */
+        " cmpl %%edx,%%esi;\n"
+        " ja 5f;\n"
+        /* Here, there are >= 2 words of input remaining */
+        " movd (%%esi),%%mm2;\n"
+
+        " movq %%mm2,%%mm3;\n"
+        " pcmpgtw %%mm0,%%mm3;\n"  /* mm3 is bitmask for words where mm2 > mm0 */ 
+        " movq %%mm3,%%mm4;\n"
+        " pand %%mm2,%%mm3;\n"     /* mm3 is mm2 masked to new max's */
+        " pandn %%mm0,%%mm4;\n"    /* mm4 is mm0 masked to its max's */
+        " por %%mm3,%%mm4;\n"
+        " movq %%mm4,%%mm0;\n"     /* now mm0 is updated max's */
+
+        " movq %%mm1,%%mm3;\n"
+        " pcmpgtw %%mm2,%%mm3;\n"  /* mm3 is bitmask for words where mm2 < mm1 */ 
+        " pand %%mm3,%%mm2;\n"     /* mm2 is mm2 masked to new min's */
+        " pandn %%mm1,%%mm3;\n"    /* mm3 is mm1 masked to its min's */
+        " por %%mm3,%%mm2;\n"
+        " movq %%mm2,%%mm1;\n"     /* now mm1 is updated min's */
+
+        " addl $4,%%esi;\n"
+
+        " .p2align 2;\n"
+        "5:\n"
+        /* Merge down the 2-word max/mins to 1 word */
+        " movq %%mm0,%%mm2;\n"
+        " psrlq $16,%%mm2;\n"
+        " movq %%mm2,%%mm3;\n"
+        " pcmpgtw %%mm0,%%mm3;\n"  /* mm3 is bitmask for words where mm2 > mm0 */ 
+        " pand %%mm3,%%mm2;\n"     /* mm2 is mm2 masked to new max's */
+        " pandn %%mm0,%%mm3;\n"    /* mm3 is mm0 masked to its max's */
+        " por %%mm3,%%mm2;\n"
+        " movd %%mm2,%%ecx;\n"     /* cx is max so far */
+
+        " movq %%mm1,%%mm2;\n"
+        " psrlq $16,%%mm2;\n"
+        " movq %%mm1,%%mm3;\n"
+        " pcmpgtw %%mm2,%%mm3;\n"  /* mm3 is bitmask for words where mm2 < mm1 */ 
+        " pand %%mm3,%%mm2;\n"     /* mm2 is mm2 masked to new min's */
+        " pandn %%mm1,%%mm3;\n"    /* mm3 is mm1 masked to its min's */
+        " por %%mm3,%%mm2;\n"
+        " movd %%mm2,%%eax;\n"     /* ax is min so far */
+        
+        " addl $2,%%edx;\n"        /* now dx = top-2 */
+        " cmpl %%edx,%%esi;\n"
+        " ja 6f;\n"
+
+        /* Here, there is one word of input left */
+        " cmpw (%%esi),%%cx;\n"
+        " jge 9f;\n"
+        " movw (%%esi),%%cx;\n"
+        " .p2align 2;\n"
+        "9:\n"
+        " cmpw (%%esi),%%ax;\n"
+        " jle 6f;\n"
+        " movw (%%esi),%%ax;\n"
+
+        " .p2align 2;\n"
+        "6:\n"
+        /* (finally!) cx is the max, ax the min */
+        " movswl %%cx,%%ecx;\n"
+        " movswl %%ax,%%eax;\n"
+
+        " popl %%edx;\n"            /* ptr to output max,min vals */
+        " andl %%edx,%%edx;\n"
+        " jz 7f;\n"
+        " movw %%cx,(%%edx);\n"    /* max */
+        " movw %%ax,2(%%edx);\n"   /* min */
+        " .p2align 2;\n"
+        "7:\n"
+        /* Now calculate max absolute value */
+        " negl %%eax;\n"
+        " cmpl %%ecx,%%eax;\n"
+        " jge 8f;\n"
+        " movl %%ecx,%%eax;\n"
+        " .p2align 2;\n"
+        "8:\n"
+        " emms;\n"
+        : "=a" (max)
+        : "S" (x), "a" (n), "d" (out), [lower] "m" (lower_bound), [upper] "m" (upper_bound)
+        : "ecx"
+    );
+    return  max;
+#else
+    int i;
+    int16_t min;
+    int16_t max;
+    int16_t temp;
+    int32_t z;
+    
+    max = INT16_MIN;
+    min = INT16_MAX;
+    for (i = 0;  i < n;  i++)
+    {
+        temp = x[i];
+        if (temp > max)
+            max = temp;
+        /*endif*/
+        if (temp < min)
+            min = temp;
+        /*endif*/
+    }
+    /*endfor*/
+    out[0] = max;
+    out[1] = min;
+    z = abs(min);
+    if (z > max)
+        return z;
+    return max;
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/adsi_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,323 @@
+adsi_tests.o adsi_tests.o: adsi_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/strings.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/assert.h /usr/include/audiofile.h /usr/include/aupvlist.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/strings.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/async_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,320 @@
+async_tests.o async_tests.o: async_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/at_interpreter_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,351 @@
+at_interpreter_tests.o at_interpreter_tests.o: at_interpreter_tests.c \
+  ../src/config.h /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
+  ../src/spandsp/telephony.h ../src/spandsp/logging.h \
+  ../src/spandsp/complex.h ../src/spandsp/bit_operations.h \
+  ../src/spandsp/bitstream.h ../src/spandsp/queue.h \
+  ../src/spandsp/schedule.h ../src/spandsp/g711.h ../src/spandsp/timing.h \
+  ../src/spandsp/vector_float.h ../src/spandsp/complex_vector_float.h \
+  ../src/spandsp/vector_int.h ../src/spandsp/arctan2.h \
+  ../src/spandsp/biquad.h ../src/spandsp/fir.h ../src/spandsp/awgn.h \
+  ../src/spandsp/bert.h ../src/spandsp/power_meter.h \
+  ../src/spandsp/complex_filters.h ../src/spandsp/dc_restore.h \
+  ../src/spandsp/dds.h ../src/spandsp/complex.h ../src/spandsp/echo.h \
+  ../src/spandsp/fir.h ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/stat.h:
+
+/usr/include/bits/stat.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/xopen_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/awgn_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,312 @@
+awgn_tests.o awgn_tests.o: awgn_tests.c ../src/config.h \
+  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/bell_mf_rx_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,323 @@
+bell_mf_rx_tests.o bell_mf_rx_tests.o: bell_mf_rx_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/bell_mf_tx_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,322 @@
+bell_mf_tx_tests.o bell_mf_tx_tests.o: bell_mf_tx_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/bert_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,320 @@
+bert_tests.o bert_tests.o: bert_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/bit_operations_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,325 @@
+bit_operations_tests.o bit_operations_tests.o: bit_operations_tests.c \
+  ../src/config.h /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/dc_restore_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,314 @@
+dc_restore_tests.o dc_restore_tests.o: dc_restore_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/memory.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/dds_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,325 @@
+dds_tests.o dds_tests.o: dds_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/memory.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/dtmf_rx_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,325 @@
+dtmf_rx_tests.o dtmf_rx_tests.o: dtmf_rx_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  test_utils.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+test_utils.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/dtmf_tx_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,322 @@
+dtmf_tx_tests.o dtmf_tx_tests.o: dtmf_tx_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/echo_monitor.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,3 @@
+echo_monitor.o echo_monitor.o: echo_monitor.cpp ../src/config.h
+
+../src/config.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/echo_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,347 @@
+echo_tests.o echo_tests.o: echo_tests.c ../src/config.h \
+  /usr/include/unistd.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/environments.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/typesizes.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/stdlib.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/strings.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/assert.h /usr/include/audiofile.h /usr/include/aupvlist.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
+  ../src/spandsp/telephony.h ../src/spandsp/logging.h \
+  ../src/spandsp/complex.h ../src/spandsp/bit_operations.h \
+  ../src/spandsp/bitstream.h ../src/spandsp/queue.h \
+  ../src/spandsp/schedule.h ../src/spandsp/g711.h ../src/spandsp/timing.h \
+  ../src/spandsp/vector_float.h ../src/spandsp/complex_vector_float.h \
+  ../src/spandsp/vector_int.h ../src/spandsp/arctan2.h \
+  ../src/spandsp/biquad.h ../src/spandsp/fir.h ../src/spandsp/awgn.h \
+  ../src/spandsp/bert.h ../src/spandsp/power_meter.h \
+  ../src/spandsp/complex_filters.h ../src/spandsp/dc_restore.h \
+  ../src/spandsp/dds.h ../src/spandsp/complex.h ../src/spandsp/echo.h \
+  ../src/spandsp/fir.h ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  ../src/spandsp/g168models.h
+
+../src/config.h:
+
+/usr/include/unistd.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/strings.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/xopen_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+../src/spandsp/g168models.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/fax_decode.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,320 @@
+fax_decode.o fax_decode.o: fax_decode.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/fax_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,320 @@
+fax_tests.o fax_tests.o: fax_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/fsk_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,325 @@
+fsk_tests.o fsk_tests.o: fsk_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  test_utils.h line_model.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+test_utils.h:
+
+line_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/g168_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,316 @@
+g168_tests.o g168_tests.o: g168_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  ../src/spandsp/g168models.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+../src/spandsp/g168models.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/g711_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,325 @@
+g711_tests.o g711_tests.o: g711_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/g722_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,336 @@
+g722_tests.o g722_tests.o: g722_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/memory.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/ctype.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/ctype.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/g726_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,336 @@
+g726_tests.o g726_tests.o: g726_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/memory.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/ctype.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/ctype.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/gsm0610_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,337 @@
+gsm0610_tests.o gsm0610_tests.o: gsm0610_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/ctype.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/ctype.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/hdlc_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,312 @@
+hdlc_tests.o hdlc_tests.o: hdlc_tests.c ../src/config.h \
+  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/ima_adpcm_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,322 @@
+ima_adpcm_tests.o ima_adpcm_tests.o: ima_adpcm_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/ip_network_model.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,336 @@
+ip_network_model.o ip_network_model.o: ip_network_model.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  ip_network_model.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+ip_network_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/line_model.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,342 @@
+line_model.o line_model.o: line_model.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  ../src/spandsp/g168models.h test_utils.h line_model.h line_models.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+../src/spandsp/g168models.h:
+
+test_utils.h:
+
+line_model.h:
+
+line_models.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/line_model_monitor.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,4 @@
+line_model_monitor.o line_model_monitor.o: line_model_monitor.cpp \
+  ../src/config.h
+
+../src/config.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/line_model_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,338 @@
+line_model_tests.o line_model_tests.o: line_model_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  test_utils.h line_model.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+test_utils.h:
+
+line_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/logging_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,313 @@
+logging_tests.o logging_tests.o: logging_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/memory.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/time.h \
+  /usr/include/bits/time.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h ../src/spandsp/t38_gateway.h \
+  ../src/spandsp/t38_terminal.h ../src/spandsp/t31.h ../src/spandsp/fax.h \
+  ../src/spandsp/adsi.h ../src/spandsp/oki_adpcm.h \
+  ../src/spandsp/ima_adpcm.h ../src/spandsp/g722.h ../src/spandsp/g726.h \
+  ../src/spandsp/lpc10.h ../src/spandsp/gsm0610.h ../src/spandsp/plc.h \
+  ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/time.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/lpc10_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,337 @@
+lpc10_tests.o lpc10_tests.o: lpc10_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/ctype.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/ctype.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/make_g168_css.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,338 @@
+make_g168_css.o make_g168_css.o: make_g168_css.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
+  /usr/include/getopt.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h /usr/include/fftw3.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  ../src/spandsp/g168models.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+/usr/include/fftw3.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+../src/spandsp/g168models.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/make_line_models.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,315 @@
+make_line_models.o make_line_models.o: make_line_models.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/string.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdlib.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/fftw3.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/fftw3.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/modem_connect_tones_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,322 @@
+modem_connect_tones_tests.o modem_connect_tones_tests.o:  \
+ modem_connect_tones_tests.c ../src/config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/modem_echo_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,326 @@
+modem_echo_tests.o modem_echo_tests.o: modem_echo_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h /usr/include/tgmath.h \
+  /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  ../src/spandsp/g168models.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+../src/spandsp/g168models.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/modem_monitor.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,3 @@
+modem_monitor.o modem_monitor.o: modem_monitor.cpp ../src/config.h
+
+../src/config.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/noise_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,317 @@
+noise_tests.o noise_tests.o: noise_tests.c ../src/config.h \
+  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/oki_adpcm_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,322 @@
+oki_adpcm_tests.o oki_adpcm_tests.o: oki_adpcm_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/playout_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,317 @@
+playout_tests.o playout_tests.o: playout_tests.c ../src/config.h \
+  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/plc_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,317 @@
+plc_tests.o plc_tests.o: plc_tests.c ../src/config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/power_meter_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,314 @@
+power_meter_tests.o power_meter_tests.o: power_meter_tests.c \
+  ../src/config.h /usr/include/stdlib.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/memory.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/r2_mf_rx_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,322 @@
+r2_mf_rx_tests.o r2_mf_rx_tests.o: r2_mf_rx_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/r2_mf_tx_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,322 @@
+r2_mf_tx_tests.o r2_mf_tx_tests.o: r2_mf_tx_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/schedule_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,312 @@
+schedule_tests.o schedule_tests.o: schedule_tests.c ../src/config.h \
+  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/sig_tone_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,319 @@
+sig_tone_tests.o sig_tone_tests.o: sig_tone_tests.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/memory.h /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/super_tone_rx_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,348 @@
+super_tone_rx_tests.o super_tone_rx_tests.o: super_tone_rx_tests.c \
+  ../src/config.h /usr/include/stdlib.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/strings.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/ctype.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/sys/socket.h /usr/include/sys/uio.h \
+  /usr/include/bits/uio.h /usr/include/bits/socket.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
+  /usr/include/asm/socket.h /usr/include/asm-i386/socket.h \
+  /usr/include/asm/sockios.h /usr/include/asm-i386/sockios.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  ../src/spandsp/telephony.h ../src/spandsp/logging.h \
+  ../src/spandsp/complex.h ../src/spandsp/bit_operations.h \
+  ../src/spandsp/bitstream.h ../src/spandsp/queue.h \
+  ../src/spandsp/schedule.h ../src/spandsp/g711.h ../src/spandsp/timing.h \
+  ../src/spandsp/vector_float.h ../src/spandsp/complex_vector_float.h \
+  ../src/spandsp/vector_int.h ../src/spandsp/arctan2.h \
+  ../src/spandsp/biquad.h ../src/spandsp/fir.h ../src/spandsp/awgn.h \
+  ../src/spandsp/bert.h ../src/spandsp/power_meter.h \
+  ../src/spandsp/complex_filters.h ../src/spandsp/dc_restore.h \
+  ../src/spandsp/dds.h ../src/spandsp/complex.h ../src/spandsp/echo.h \
+  ../src/spandsp/fir.h ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/strings.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/ctype.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/sys/socket.h:
+
+/usr/include/sys/uio.h:
+
+/usr/include/bits/uio.h:
+
+/usr/include/bits/socket.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/sockaddr.h:
+
+/usr/include/asm/socket.h:
+
+/usr/include/asm-i386/socket.h:
+
+/usr/include/asm/sockios.h:
+
+/usr/include/asm-i386/sockios.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/super_tone_tx_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,348 @@
+super_tone_tx_tests.o super_tone_tx_tests.o: super_tone_tx_tests.c \
+  ../src/config.h /usr/include/stdlib.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/strings.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/ctype.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/sys/socket.h /usr/include/sys/uio.h \
+  /usr/include/bits/uio.h /usr/include/bits/socket.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
+  /usr/include/asm/socket.h /usr/include/asm-i386/socket.h \
+  /usr/include/asm/sockios.h /usr/include/asm-i386/sockios.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  ../src/spandsp/telephony.h ../src/spandsp/logging.h \
+  ../src/spandsp/complex.h ../src/spandsp/bit_operations.h \
+  ../src/spandsp/bitstream.h ../src/spandsp/queue.h \
+  ../src/spandsp/schedule.h ../src/spandsp/g711.h ../src/spandsp/timing.h \
+  ../src/spandsp/vector_float.h ../src/spandsp/complex_vector_float.h \
+  ../src/spandsp/vector_int.h ../src/spandsp/arctan2.h \
+  ../src/spandsp/biquad.h ../src/spandsp/fir.h ../src/spandsp/awgn.h \
+  ../src/spandsp/bert.h ../src/spandsp/power_meter.h \
+  ../src/spandsp/complex_filters.h ../src/spandsp/dc_restore.h \
+  ../src/spandsp/dds.h ../src/spandsp/complex.h ../src/spandsp/echo.h \
+  ../src/spandsp/fir.h ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/strings.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/ctype.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/sys/socket.h:
+
+/usr/include/sys/uio.h:
+
+/usr/include/bits/uio.h:
+
+/usr/include/bits/socket.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/sockaddr.h:
+
+/usr/include/asm/socket.h:
+
+/usr/include/asm-i386/socket.h:
+
+/usr/include/asm/sockios.h:
+
+/usr/include/asm-i386/sockios.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t31_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,351 @@
+t31_tests.o t31_tests.o: t31_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
+  /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/sys/stat.h \
+  /usr/include/bits/stat.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
+  ../src/spandsp/telephony.h ../src/spandsp/logging.h \
+  ../src/spandsp/complex.h ../src/spandsp/bit_operations.h \
+  ../src/spandsp/bitstream.h ../src/spandsp/queue.h \
+  ../src/spandsp/schedule.h ../src/spandsp/g711.h ../src/spandsp/timing.h \
+  ../src/spandsp/vector_float.h ../src/spandsp/complex_vector_float.h \
+  ../src/spandsp/vector_int.h ../src/spandsp/arctan2.h \
+  ../src/spandsp/biquad.h ../src/spandsp/fir.h ../src/spandsp/awgn.h \
+  ../src/spandsp/bert.h ../src/spandsp/power_meter.h \
+  ../src/spandsp/complex_filters.h ../src/spandsp/dc_restore.h \
+  ../src/spandsp/dds.h ../src/spandsp/complex.h ../src/spandsp/echo.h \
+  ../src/spandsp/fir.h ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/stat.h:
+
+/usr/include/bits/stat.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/xopen_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t38_gateway_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,375 @@
+t38_gateway_tests.o t38_gateway_tests.o: t38_gateway_tests.c \
+  ../src/config.h /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-i386/errno.h /usr/include/sys/socket.h \
+  /usr/include/sys/uio.h /usr/include/bits/uio.h \
+  /usr/include/bits/socket.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
+  /usr/include/asm/socket.h /usr/include/asm-i386/socket.h \
+  /usr/include/asm/sockios.h /usr/include/asm-i386/sockios.h \
+  /usr/include/netinet/in.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/netinet/tcp.h \
+  /usr/include/arpa/inet.h /usr/include/sys/time.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h ../src/spandsp/telephony.h ../src/spandsp/logging.h \
+  ../src/spandsp/complex.h ../src/spandsp/bit_operations.h \
+  ../src/spandsp/bitstream.h ../src/spandsp/queue.h \
+  ../src/spandsp/schedule.h ../src/spandsp/g711.h ../src/spandsp/timing.h \
+  ../src/spandsp/vector_float.h ../src/spandsp/complex_vector_float.h \
+  ../src/spandsp/vector_int.h ../src/spandsp/arctan2.h \
+  ../src/spandsp/biquad.h ../src/spandsp/fir.h ../src/spandsp/awgn.h \
+  ../src/spandsp/bert.h ../src/spandsp/power_meter.h \
+  ../src/spandsp/complex_filters.h ../src/spandsp/dc_restore.h \
+  ../src/spandsp/dds.h ../src/spandsp/complex.h ../src/spandsp/echo.h \
+  ../src/spandsp/fir.h ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h ../src/spandsp/t38_gateway.h \
+  ../src/spandsp/t38_terminal.h ../src/spandsp/t31.h ../src/spandsp/fax.h \
+  ../src/spandsp/adsi.h ../src/spandsp/oki_adpcm.h \
+  ../src/spandsp/ima_adpcm.h ../src/spandsp/g722.h ../src/spandsp/g726.h \
+  ../src/spandsp/lpc10.h ../src/spandsp/gsm0610.h ../src/spandsp/plc.h \
+  ../src/spandsp/playout.h ip_network_model.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+/usr/include/sys/socket.h:
+
+/usr/include/sys/uio.h:
+
+/usr/include/bits/uio.h:
+
+/usr/include/bits/socket.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/sockaddr.h:
+
+/usr/include/asm/socket.h:
+
+/usr/include/asm-i386/socket.h:
+
+/usr/include/asm/sockios.h:
+
+/usr/include/asm-i386/sockios.h:
+
+/usr/include/netinet/in.h:
+
+/usr/include/bits/in.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/netinet/tcp.h:
+
+/usr/include/arpa/inet.h:
+
+/usr/include/sys/time.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+ip_network_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t38_gateway_to_terminal_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,376 @@
+t38_gateway_to_terminal_tests.o t38_gateway_to_terminal_tests.o:  \
+ t38_gateway_to_terminal_tests.c ../src/config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-i386/errno.h /usr/include/sys/socket.h \
+  /usr/include/sys/uio.h /usr/include/bits/uio.h \
+  /usr/include/bits/socket.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
+  /usr/include/asm/socket.h /usr/include/asm-i386/socket.h \
+  /usr/include/asm/sockios.h /usr/include/asm-i386/sockios.h \
+  /usr/include/netinet/in.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/netinet/tcp.h \
+  /usr/include/arpa/inet.h /usr/include/sys/time.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h ../src/spandsp/telephony.h ../src/spandsp/logging.h \
+  ../src/spandsp/complex.h ../src/spandsp/bit_operations.h \
+  ../src/spandsp/bitstream.h ../src/spandsp/queue.h \
+  ../src/spandsp/schedule.h ../src/spandsp/g711.h ../src/spandsp/timing.h \
+  ../src/spandsp/vector_float.h ../src/spandsp/complex_vector_float.h \
+  ../src/spandsp/vector_int.h ../src/spandsp/arctan2.h \
+  ../src/spandsp/biquad.h ../src/spandsp/fir.h ../src/spandsp/awgn.h \
+  ../src/spandsp/bert.h ../src/spandsp/power_meter.h \
+  ../src/spandsp/complex_filters.h ../src/spandsp/dc_restore.h \
+  ../src/spandsp/dds.h ../src/spandsp/complex.h ../src/spandsp/echo.h \
+  ../src/spandsp/fir.h ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h ../src/spandsp/t38_gateway.h \
+  ../src/spandsp/t38_terminal.h ../src/spandsp/t31.h ../src/spandsp/fax.h \
+  ../src/spandsp/adsi.h ../src/spandsp/oki_adpcm.h \
+  ../src/spandsp/ima_adpcm.h ../src/spandsp/g722.h ../src/spandsp/g726.h \
+  ../src/spandsp/lpc10.h ../src/spandsp/gsm0610.h ../src/spandsp/plc.h \
+  ../src/spandsp/playout.h ip_network_model.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+/usr/include/sys/socket.h:
+
+/usr/include/sys/uio.h:
+
+/usr/include/bits/uio.h:
+
+/usr/include/bits/socket.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/sockaddr.h:
+
+/usr/include/asm/socket.h:
+
+/usr/include/asm-i386/socket.h:
+
+/usr/include/asm/sockios.h:
+
+/usr/include/asm-i386/sockios.h:
+
+/usr/include/netinet/in.h:
+
+/usr/include/bits/in.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/netinet/tcp.h:
+
+/usr/include/arpa/inet.h:
+
+/usr/include/sys/time.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+ip_network_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t38_terminal_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,370 @@
+t38_terminal_tests.o t38_terminal_tests.o: t38_terminal_tests.c \
+  ../src/config.h /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-i386/errno.h /usr/include/sys/socket.h \
+  /usr/include/sys/uio.h /usr/include/bits/uio.h \
+  /usr/include/bits/socket.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
+  /usr/include/asm/socket.h /usr/include/asm-i386/socket.h \
+  /usr/include/asm/sockios.h /usr/include/asm-i386/sockios.h \
+  /usr/include/netinet/in.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/netinet/tcp.h \
+  /usr/include/arpa/inet.h /usr/include/sys/time.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h ../src/spandsp/telephony.h ../src/spandsp/logging.h \
+  ../src/spandsp/complex.h ../src/spandsp/bit_operations.h \
+  ../src/spandsp/bitstream.h ../src/spandsp/queue.h \
+  ../src/spandsp/schedule.h ../src/spandsp/g711.h ../src/spandsp/timing.h \
+  ../src/spandsp/vector_float.h ../src/spandsp/complex_vector_float.h \
+  ../src/spandsp/vector_int.h ../src/spandsp/arctan2.h \
+  ../src/spandsp/biquad.h ../src/spandsp/fir.h ../src/spandsp/awgn.h \
+  ../src/spandsp/bert.h ../src/spandsp/power_meter.h \
+  ../src/spandsp/complex_filters.h ../src/spandsp/dc_restore.h \
+  ../src/spandsp/dds.h ../src/spandsp/complex.h ../src/spandsp/echo.h \
+  ../src/spandsp/fir.h ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h ../src/spandsp/t38_gateway.h \
+  ../src/spandsp/t38_terminal.h ../src/spandsp/t31.h ../src/spandsp/fax.h \
+  ../src/spandsp/adsi.h ../src/spandsp/oki_adpcm.h \
+  ../src/spandsp/ima_adpcm.h ../src/spandsp/g722.h ../src/spandsp/g726.h \
+  ../src/spandsp/lpc10.h ../src/spandsp/gsm0610.h ../src/spandsp/plc.h \
+  ../src/spandsp/playout.h ip_network_model.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+/usr/include/sys/socket.h:
+
+/usr/include/sys/uio.h:
+
+/usr/include/bits/uio.h:
+
+/usr/include/bits/socket.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/sockaddr.h:
+
+/usr/include/asm/socket.h:
+
+/usr/include/asm-i386/socket.h:
+
+/usr/include/asm/sockios.h:
+
+/usr/include/asm-i386/sockios.h:
+
+/usr/include/netinet/in.h:
+
+/usr/include/bits/in.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/netinet/tcp.h:
+
+/usr/include/arpa/inet.h:
+
+/usr/include/sys/time.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+ip_network_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t38_terminal_to_gateway_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,376 @@
+t38_terminal_to_gateway_tests.o t38_terminal_to_gateway_tests.o:  \
+ t38_terminal_to_gateway_tests.c ../src/config.h /usr/include/inttypes.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-i386/errno.h /usr/include/sys/socket.h \
+  /usr/include/sys/uio.h /usr/include/bits/uio.h \
+  /usr/include/bits/socket.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
+  /usr/include/asm/socket.h /usr/include/asm-i386/socket.h \
+  /usr/include/asm/sockios.h /usr/include/asm-i386/sockios.h \
+  /usr/include/netinet/in.h /usr/include/bits/in.h \
+  /usr/include/bits/byteswap.h /usr/include/netinet/tcp.h \
+  /usr/include/arpa/inet.h /usr/include/sys/time.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h ../src/spandsp/telephony.h ../src/spandsp/logging.h \
+  ../src/spandsp/complex.h ../src/spandsp/bit_operations.h \
+  ../src/spandsp/bitstream.h ../src/spandsp/queue.h \
+  ../src/spandsp/schedule.h ../src/spandsp/g711.h ../src/spandsp/timing.h \
+  ../src/spandsp/vector_float.h ../src/spandsp/complex_vector_float.h \
+  ../src/spandsp/vector_int.h ../src/spandsp/arctan2.h \
+  ../src/spandsp/biquad.h ../src/spandsp/fir.h ../src/spandsp/awgn.h \
+  ../src/spandsp/bert.h ../src/spandsp/power_meter.h \
+  ../src/spandsp/complex_filters.h ../src/spandsp/dc_restore.h \
+  ../src/spandsp/dds.h ../src/spandsp/complex.h ../src/spandsp/echo.h \
+  ../src/spandsp/fir.h ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h ../src/spandsp/t38_gateway.h \
+  ../src/spandsp/t38_terminal.h ../src/spandsp/t31.h ../src/spandsp/fax.h \
+  ../src/spandsp/adsi.h ../src/spandsp/oki_adpcm.h \
+  ../src/spandsp/ima_adpcm.h ../src/spandsp/g722.h ../src/spandsp/g726.h \
+  ../src/spandsp/lpc10.h ../src/spandsp/gsm0610.h ../src/spandsp/plc.h \
+  ../src/spandsp/playout.h ip_network_model.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+/usr/include/sys/socket.h:
+
+/usr/include/sys/uio.h:
+
+/usr/include/bits/uio.h:
+
+/usr/include/bits/socket.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+/usr/include/bits/sockaddr.h:
+
+/usr/include/asm/socket.h:
+
+/usr/include/asm-i386/socket.h:
+
+/usr/include/asm/sockios.h:
+
+/usr/include/asm-i386/sockios.h:
+
+/usr/include/netinet/in.h:
+
+/usr/include/bits/in.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/netinet/tcp.h:
+
+/usr/include/arpa/inet.h:
+
+/usr/include/sys/time.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+ip_network_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/t4_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,320 @@
+t4_tests.o t4_tests.o: t4_tests.c ../src/config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/stdlib.h \
+  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/memory.h \
+  /usr/include/string.h /usr/include/bits/string.h \
+  /usr/include/bits/string2.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/memory.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/test_utils.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,325 @@
+test_utils.o test_utils.o: test_utils.c ../src/config.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  test_utils.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+test_utils.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/testadsi.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,167 @@
+testadsi.o testadsi.o: testadsi.c ../src/config.h /usr/include/fcntl.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/bits/fcntl.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdlib.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-i386/errno.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm-i386/ioctls.h /usr/include/asm/ioctl.h \
+  /usr/include/asm-i386/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/alloca.h \
+  /usr/include/inttypes.h /usr/include/stdint.h /usr/include/sys/signal.h \
+  /usr/include/signal.h /usr/include/bits/signum.h \
+  /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
+  /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
+  /usr/include/asm-i386/sigcontext.h /usr/include/bits/sigstack.h \
+  /usr/include/bits/sigthread.h /usr/include/sys/wait.h \
+  /usr/include/sys/resource.h /usr/include/bits/resource.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/sys/time.h
+
+../src/config.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+/usr/include/sys/ioctl.h:
+
+/usr/include/bits/ioctls.h:
+
+/usr/include/asm/ioctls.h:
+
+/usr/include/asm-i386/ioctls.h:
+
+/usr/include/asm/ioctl.h:
+
+/usr/include/asm-i386/ioctl.h:
+
+/usr/include/bits/ioctl-types.h:
+
+/usr/include/sys/ttydefaults.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/sys/signal.h:
+
+/usr/include/signal.h:
+
+/usr/include/bits/signum.h:
+
+/usr/include/bits/siginfo.h:
+
+/usr/include/bits/sigaction.h:
+
+/usr/include/bits/sigcontext.h:
+
+/usr/include/asm/sigcontext.h:
+
+/usr/include/asm-i386/sigcontext.h:
+
+/usr/include/bits/sigstack.h:
+
+/usr/include/bits/sigthread.h:
+
+/usr/include/sys/wait.h:
+
+/usr/include/sys/resource.h:
+
+/usr/include/bits/resource.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/sys/time.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/testfax.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,167 @@
+testfax.o testfax.o: testfax.c ../src/config.h /usr/include/fcntl.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/bits/fcntl.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdlib.h /usr/include/errno.h /usr/include/bits/errno.h \
+  /usr/include/linux/errno.h /usr/include/asm/errno.h \
+  /usr/include/asm-i386/errno.h /usr/include/sys/ioctl.h \
+  /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
+  /usr/include/asm-i386/ioctls.h /usr/include/asm/ioctl.h \
+  /usr/include/asm-i386/ioctl.h /usr/include/bits/ioctl-types.h \
+  /usr/include/sys/ttydefaults.h /usr/include/alloca.h \
+  /usr/include/inttypes.h /usr/include/stdint.h /usr/include/sys/signal.h \
+  /usr/include/signal.h /usr/include/bits/signum.h \
+  /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
+  /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
+  /usr/include/asm-i386/sigcontext.h /usr/include/bits/sigstack.h \
+  /usr/include/bits/sigthread.h /usr/include/sys/wait.h \
+  /usr/include/sys/resource.h /usr/include/bits/resource.h \
+  /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+  /usr/include/sys/time.h
+
+../src/config.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+/usr/include/sys/ioctl.h:
+
+/usr/include/bits/ioctls.h:
+
+/usr/include/asm/ioctls.h:
+
+/usr/include/asm-i386/ioctls.h:
+
+/usr/include/asm/ioctl.h:
+
+/usr/include/asm-i386/ioctl.h:
+
+/usr/include/bits/ioctl-types.h:
+
+/usr/include/sys/ttydefaults.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/sys/signal.h:
+
+/usr/include/signal.h:
+
+/usr/include/bits/signum.h:
+
+/usr/include/bits/siginfo.h:
+
+/usr/include/bits/sigaction.h:
+
+/usr/include/bits/sigcontext.h:
+
+/usr/include/asm/sigcontext.h:
+
+/usr/include/asm-i386/sigcontext.h:
+
+/usr/include/bits/sigstack.h:
+
+/usr/include/bits/sigthread.h:
+
+/usr/include/sys/wait.h:
+
+/usr/include/sys/resource.h:
+
+/usr/include/bits/resource.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/sys/time.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/time_scale_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,317 @@
+time_scale_tests.o time_scale_tests.o: time_scale_tests.c ../src/config.h \
+  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/tone_generate_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,322 @@
+tone_generate_tests.o tone_generate_tests.o: tone_generate_tests.c \
+  ../src/config.h /usr/include/stdlib.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/audiofile.h \
+  /usr/include/aupvlist.h /usr/include/tiffio.h /usr/include/tiff.h \
+  /usr/include/tiffconf.h /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v17_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,334 @@
+v17_tests.o v17_tests.o: v17_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v17rx.h ../src/spandsp/v17tx.h \
+  ../src/spandsp/v22bis.h ../src/spandsp/v27ter_rx.h \
+  ../src/spandsp/v27ter_tx.h ../src/spandsp/v8.h ../src/spandsp/v42.h \
+  ../src/spandsp/v42bis.h ../src/spandsp/t4.h ../src/spandsp/t30.h \
+  ../src/spandsp/t30_fcf.h ../src/spandsp/t35.h \
+  ../src/spandsp/at_interpreter.h ../src/spandsp/t38_core.h \
+  /usr/include/sys/time.h ../src/spandsp/t38_gateway.h \
+  ../src/spandsp/t38_terminal.h ../src/spandsp/t31.h ../src/spandsp/fax.h \
+  ../src/spandsp/adsi.h ../src/spandsp/oki_adpcm.h \
+  ../src/spandsp/ima_adpcm.h ../src/spandsp/g722.h ../src/spandsp/g726.h \
+  ../src/spandsp/lpc10.h ../src/spandsp/gsm0610.h ../src/spandsp/plc.h \
+  ../src/spandsp/playout.h test_utils.h line_model.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v17rx.h:
+
+../src/spandsp/v17tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+test_utils.h:
+
+line_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v22bis_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,330 @@
+v22bis_tests.o v22bis_tests.o: v22bis_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  test_utils.h line_model.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+test_utils.h:
+
+line_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v27ter_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,330 @@
+v27ter_tests.o v27ter_tests.o: v27ter_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  test_utils.h line_model.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+test_utils.h:
+
+line_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v29_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,330 @@
+v29_tests.o v29_tests.o: v29_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h \
+  test_utils.h line_model.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
+
+test_utils.h:
+
+line_model.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v42_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,315 @@
+v42_tests.o v42_tests.o: v42_tests.c ../src/config.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v42bis_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,344 @@
+v42bis_tests.o v42bis_tests.o: v42bis_tests.c ../src/config.h \
+  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/bits/types.h /usr/include/bits/wordsize.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/inttypes.h /usr/include/stdint.h \
+  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/errno.h \
+  /usr/include/bits/errno.h /usr/include/linux/errno.h \
+  /usr/include/asm/errno.h /usr/include/asm-i386/errno.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/ctype.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/tiffio.h /usr/include/tiff.h /usr/include/tiffconf.h \
+  /usr/include/tiffvers.h ../src/spandsp.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdio.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/getopt.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-i386/errno.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/ctype.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/v8_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,321 @@
+v8_tests.o v8_tests.o: v8_tests.c ../src/config.h /usr/include/stdlib.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
+  /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/sys/select.h /usr/include/bits/select.h \
+  /usr/include/bits/sigset.h /usr/include/bits/time.h \
+  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+  /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/inttypes.h \
+  /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/stdio.h \
+  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
+  /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/tgmath.h /usr/include/math.h \
+  /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \
+  /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \
+  /usr/include/bits/nan.h /usr/include/bits/mathdef.h \
+  /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
+  /usr/include/complex.h /usr/include/bits/cmathcalls.h \
+  /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/vector_float_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,325 @@
+vector_float_tests.o vector_float_tests.o: vector_float_tests.c \
+  ../src/config.h /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/.deps/vector_int_tests.Po	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,325 @@
+vector_int_tests.o vector_int_tests.o: vector_int_tests.c ../src/config.h \
+  /usr/include/inttypes.h /usr/include/features.h \
+  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/stdint.h \
+  /usr/include/bits/wchar.h /usr/include/bits/wordsize.h \
+  /usr/include/stdlib.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \
+  /usr/include/sys/types.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
+  /usr/include/bits/endian.h /usr/include/sys/select.h \
+  /usr/include/bits/select.h /usr/include/bits/sigset.h \
+  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
+  /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
+  /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h /usr/include/fcntl.h \
+  /usr/include/bits/fcntl.h /usr/include/string.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/tgmath.h /usr/include/math.h /usr/include/bits/huge_val.h \
+  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
+  /usr/include/bits/inf.h /usr/include/bits/nan.h \
+  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
+  /usr/include/bits/mathinline.h /usr/include/complex.h \
+  /usr/include/bits/cmathcalls.h /usr/include/assert.h \
+  /usr/include/audiofile.h /usr/include/aupvlist.h /usr/include/tiffio.h \
+  /usr/include/tiff.h /usr/include/tiffconf.h /usr/include/tiffvers.h \
+  ../src/spandsp.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \
+  /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \
+  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+  /usr/include/bits/posix2_lim.h ../src/spandsp/telephony.h \
+  ../src/spandsp/logging.h ../src/spandsp/complex.h \
+  ../src/spandsp/bit_operations.h ../src/spandsp/bitstream.h \
+  ../src/spandsp/queue.h ../src/spandsp/schedule.h ../src/spandsp/g711.h \
+  ../src/spandsp/timing.h ../src/spandsp/vector_float.h \
+  ../src/spandsp/complex_vector_float.h ../src/spandsp/vector_int.h \
+  ../src/spandsp/arctan2.h ../src/spandsp/biquad.h ../src/spandsp/fir.h \
+  ../src/spandsp/awgn.h ../src/spandsp/bert.h \
+  ../src/spandsp/power_meter.h ../src/spandsp/complex_filters.h \
+  ../src/spandsp/dc_restore.h ../src/spandsp/dds.h \
+  ../src/spandsp/complex.h ../src/spandsp/echo.h ../src/spandsp/fir.h \
+  ../src/spandsp/modem_echo.h ../src/spandsp/hdlc.h \
+  ../src/spandsp/async.h ../src/spandsp/noise.h \
+  ../src/spandsp/time_scale.h ../src/spandsp/tone_detect.h \
+  ../src/spandsp/tone_generate.h ../src/spandsp/dtmf.h \
+  ../src/spandsp/bell_r2_mf.h ../src/spandsp/super_tone_rx.h \
+  ../src/spandsp/super_tone_tx.h ../src/spandsp/modem_connect_tones.h \
+  ../src/spandsp/sig_tone.h ../src/spandsp/fsk.h \
+  ../src/spandsp/silence_gen.h ../src/spandsp/v29rx.h \
+  ../src/spandsp/v29tx.h ../src/spandsp/v22bis.h \
+  ../src/spandsp/v27ter_rx.h ../src/spandsp/v27ter_tx.h \
+  ../src/spandsp/v8.h ../src/spandsp/v42.h ../src/spandsp/v42bis.h \
+  ../src/spandsp/t4.h ../src/spandsp/t30.h ../src/spandsp/t30_fcf.h \
+  ../src/spandsp/t35.h ../src/spandsp/at_interpreter.h \
+  ../src/spandsp/t38_core.h /usr/include/sys/time.h \
+  ../src/spandsp/t38_gateway.h ../src/spandsp/t38_terminal.h \
+  ../src/spandsp/t31.h ../src/spandsp/fax.h ../src/spandsp/adsi.h \
+  ../src/spandsp/oki_adpcm.h ../src/spandsp/ima_adpcm.h \
+  ../src/spandsp/g722.h ../src/spandsp/g726.h ../src/spandsp/lpc10.h \
+  ../src/spandsp/gsm0610.h ../src/spandsp/plc.h ../src/spandsp/playout.h
+
+../src/config.h:
+
+/usr/include/inttypes.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/time.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/alloca.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/tgmath.h:
+
+/usr/include/math.h:
+
+/usr/include/bits/huge_val.h:
+
+/usr/include/bits/huge_valf.h:
+
+/usr/include/bits/huge_vall.h:
+
+/usr/include/bits/inf.h:
+
+/usr/include/bits/nan.h:
+
+/usr/include/bits/mathdef.h:
+
+/usr/include/bits/mathcalls.h:
+
+/usr/include/bits/mathinline.h:
+
+/usr/include/complex.h:
+
+/usr/include/bits/cmathcalls.h:
+
+/usr/include/assert.h:
+
+/usr/include/audiofile.h:
+
+/usr/include/aupvlist.h:
+
+/usr/include/tiffio.h:
+
+/usr/include/tiff.h:
+
+/usr/include/tiffconf.h:
+
+/usr/include/tiffvers.h:
+
+../src/spandsp.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:
+
+/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../src/spandsp/telephony.h:
+
+../src/spandsp/logging.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/bit_operations.h:
+
+../src/spandsp/bitstream.h:
+
+../src/spandsp/queue.h:
+
+../src/spandsp/schedule.h:
+
+../src/spandsp/g711.h:
+
+../src/spandsp/timing.h:
+
+../src/spandsp/vector_float.h:
+
+../src/spandsp/complex_vector_float.h:
+
+../src/spandsp/vector_int.h:
+
+../src/spandsp/arctan2.h:
+
+../src/spandsp/biquad.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/awgn.h:
+
+../src/spandsp/bert.h:
+
+../src/spandsp/power_meter.h:
+
+../src/spandsp/complex_filters.h:
+
+../src/spandsp/dc_restore.h:
+
+../src/spandsp/dds.h:
+
+../src/spandsp/complex.h:
+
+../src/spandsp/echo.h:
+
+../src/spandsp/fir.h:
+
+../src/spandsp/modem_echo.h:
+
+../src/spandsp/hdlc.h:
+
+../src/spandsp/async.h:
+
+../src/spandsp/noise.h:
+
+../src/spandsp/time_scale.h:
+
+../src/spandsp/tone_detect.h:
+
+../src/spandsp/tone_generate.h:
+
+../src/spandsp/dtmf.h:
+
+../src/spandsp/bell_r2_mf.h:
+
+../src/spandsp/super_tone_rx.h:
+
+../src/spandsp/super_tone_tx.h:
+
+../src/spandsp/modem_connect_tones.h:
+
+../src/spandsp/sig_tone.h:
+
+../src/spandsp/fsk.h:
+
+../src/spandsp/silence_gen.h:
+
+../src/spandsp/v29rx.h:
+
+../src/spandsp/v29tx.h:
+
+../src/spandsp/v22bis.h:
+
+../src/spandsp/v27ter_rx.h:
+
+../src/spandsp/v27ter_tx.h:
+
+../src/spandsp/v8.h:
+
+../src/spandsp/v42.h:
+
+../src/spandsp/v42bis.h:
+
+../src/spandsp/t4.h:
+
+../src/spandsp/t30.h:
+
+../src/spandsp/t30_fcf.h:
+
+../src/spandsp/t35.h:
+
+../src/spandsp/at_interpreter.h:
+
+../src/spandsp/t38_core.h:
+
+/usr/include/sys/time.h:
+
+../src/spandsp/t38_gateway.h:
+
+../src/spandsp/t38_terminal.h:
+
+../src/spandsp/t31.h:
+
+../src/spandsp/fax.h:
+
+../src/spandsp/adsi.h:
+
+../src/spandsp/oki_adpcm.h:
+
+../src/spandsp/ima_adpcm.h:
+
+../src/spandsp/g722.h:
+
+../src/spandsp/g726.h:
+
+../src/spandsp/lpc10.h:
+
+../src/spandsp/gsm0610.h:
+
+../src/spandsp/plc.h:
+
+../src/spandsp/playout.h:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/Makefile	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1178 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# tests/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+
+SOURCES = $(adsi_tests_SOURCES) $(async_tests_SOURCES) $(at_interpreter_tests_SOURCES) $(awgn_tests_SOURCES) $(bell_mf_rx_tests_SOURCES) $(bell_mf_tx_tests_SOURCES) $(bert_tests_SOURCES) $(bit_operations_tests_SOURCES) $(dc_restore_tests_SOURCES) $(dds_tests_SOURCES) $(dtmf_rx_tests_SOURCES) $(dtmf_tx_tests_SOURCES) $(echo_tests_SOURCES) $(fax_decode_SOURCES) $(fax_tests_SOURCES) $(fsk_tests_SOURCES) $(g168_tests_SOURCES) $(g711_tests_SOURCES) $(g722_tests_SOURCES) $(g726_tests_SOURCES) $(gsm0610_tests_SOURCES) $(hdlc_tests_SOURCES) $(ima_adpcm_tests_SOURCES) $(line_model_tests_SOURCES) $(logging_tests_SOURCES) $(lpc10_tests_SOURCES) $(make_g168_css_SOURCES) $(make_line_models_SOURCES) $(modem_connect_tones_tests_SOURCES) $(modem_echo_tests_SOURCES) $(noise_tests_SOURCES) $(oki_adpcm_tests_SOURCES) $(playout_tests_SOURCES) $(plc_tests_SOURCES) $(power_meter_tests_SOURCES) $(r2_mf_rx_tests_SOURCES) $(r2_mf_tx_tests_SOURCES) $(schedule_tests_SOURCES) $(sig_tone_tests_SOURCES) $(super_tone_rx_tests_SOURCES) $(super_tone_tx_tests_SOURCES) $(t31_tests_SOURCES) $(t38_gateway_tests_SOURCES) $(t38_gateway_to_terminal_tests_SOURCES) $(t38_terminal_tests_SOURCES) $(t38_terminal_to_gateway_tests_SOURCES) $(t4_tests_SOURCES) $(testadsi_SOURCES) $(testfax_SOURCES) $(time_scale_tests_SOURCES) $(tone_generate_tests_SOURCES) $(v17_tests_SOURCES) $(v22bis_tests_SOURCES) $(v27ter_tests_SOURCES) $(v29_tests_SOURCES) $(v42_tests_SOURCES) $(v42bis_tests_SOURCES) $(v8_tests_SOURCES) $(vector_float_tests_SOURCES) $(vector_int_tests_SOURCES)
+
+srcdir = .
+top_srcdir = ..
+
+pkgdatadir = $(datadir)/spandsp
+pkglibdir = $(libdir)/spandsp
+pkgincludedir = $(includedir)/spandsp
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+noinst_PROGRAMS = adsi_tests$(EXEEXT) async_tests$(EXEEXT) \
+	at_interpreter_tests$(EXEEXT) awgn_tests$(EXEEXT) \
+	bell_mf_rx_tests$(EXEEXT) bell_mf_tx_tests$(EXEEXT) \
+	bert_tests$(EXEEXT) bit_operations_tests$(EXEEXT) \
+	dc_restore_tests$(EXEEXT) dds_tests$(EXEEXT) \
+	dtmf_rx_tests$(EXEEXT) dtmf_tx_tests$(EXEEXT) \
+	echo_tests$(EXEEXT) fax_decode$(EXEEXT) fax_tests$(EXEEXT) \
+	fsk_tests$(EXEEXT) g168_tests$(EXEEXT) g711_tests$(EXEEXT) \
+	g722_tests$(EXEEXT) g726_tests$(EXEEXT) gsm0610_tests$(EXEEXT) \
+	hdlc_tests$(EXEEXT) ima_adpcm_tests$(EXEEXT) \
+	line_model_tests$(EXEEXT) logging_tests$(EXEEXT) \
+	lpc10_tests$(EXEEXT) make_g168_css$(EXEEXT) \
+	make_line_models$(EXEEXT) modem_echo_tests$(EXEEXT) \
+	modem_connect_tones_tests$(EXEEXT) noise_tests$(EXEEXT) \
+	oki_adpcm_tests$(EXEEXT) playout_tests$(EXEEXT) \
+	plc_tests$(EXEEXT) power_meter_tests$(EXEEXT) \
+	r2_mf_rx_tests$(EXEEXT) r2_mf_tx_tests$(EXEEXT) \
+	schedule_tests$(EXEEXT) sig_tone_tests$(EXEEXT) \
+	super_tone_rx_tests$(EXEEXT) super_tone_tx_tests$(EXEEXT) \
+	t4_tests$(EXEEXT) t31_tests$(EXEEXT) \
+	t38_gateway_tests$(EXEEXT) \
+	t38_gateway_to_terminal_tests$(EXEEXT) \
+	t38_terminal_tests$(EXEEXT) \
+	t38_terminal_to_gateway_tests$(EXEEXT) \
+	time_scale_tests$(EXEEXT) tone_generate_tests$(EXEEXT) \
+	v17_tests$(EXEEXT) v22bis_tests$(EXEEXT) v27ter_tests$(EXEEXT) \
+	v29_tests$(EXEEXT) v42_tests$(EXEEXT) v42bis_tests$(EXEEXT) \
+	v8_tests$(EXEEXT) vector_float_tests$(EXEEXT) \
+	vector_int_tests$(EXEEXT) testadsi$(EXEEXT) testfax$(EXEEXT)
+subdir = tests
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_adsi_tests_OBJECTS = adsi_tests.$(OBJEXT)
+adsi_tests_OBJECTS = $(am_adsi_tests_OBJECTS)
+adsi_tests_DEPENDENCIES =
+am_async_tests_OBJECTS = async_tests.$(OBJEXT)
+async_tests_OBJECTS = $(am_async_tests_OBJECTS)
+async_tests_DEPENDENCIES =
+am_at_interpreter_tests_OBJECTS = at_interpreter_tests.$(OBJEXT)
+at_interpreter_tests_OBJECTS = $(am_at_interpreter_tests_OBJECTS)
+at_interpreter_tests_DEPENDENCIES =
+am_awgn_tests_OBJECTS = awgn_tests.$(OBJEXT)
+awgn_tests_OBJECTS = $(am_awgn_tests_OBJECTS)
+awgn_tests_DEPENDENCIES =
+am_bell_mf_rx_tests_OBJECTS = bell_mf_rx_tests.$(OBJEXT)
+bell_mf_rx_tests_OBJECTS = $(am_bell_mf_rx_tests_OBJECTS)
+bell_mf_rx_tests_DEPENDENCIES =
+am_bell_mf_tx_tests_OBJECTS = bell_mf_tx_tests.$(OBJEXT)
+bell_mf_tx_tests_OBJECTS = $(am_bell_mf_tx_tests_OBJECTS)
+bell_mf_tx_tests_DEPENDENCIES =
+am_bert_tests_OBJECTS = bert_tests.$(OBJEXT)
+bert_tests_OBJECTS = $(am_bert_tests_OBJECTS)
+bert_tests_DEPENDENCIES =
+am_bit_operations_tests_OBJECTS = bit_operations_tests.$(OBJEXT)
+bit_operations_tests_OBJECTS = $(am_bit_operations_tests_OBJECTS)
+bit_operations_tests_DEPENDENCIES =
+am_dc_restore_tests_OBJECTS = dc_restore_tests.$(OBJEXT)
+dc_restore_tests_OBJECTS = $(am_dc_restore_tests_OBJECTS)
+dc_restore_tests_DEPENDENCIES =
+am_dds_tests_OBJECTS = dds_tests.$(OBJEXT)
+dds_tests_OBJECTS = $(am_dds_tests_OBJECTS)
+dds_tests_DEPENDENCIES =
+am_dtmf_rx_tests_OBJECTS = dtmf_rx_tests.$(OBJEXT) \
+	test_utils.$(OBJEXT)
+dtmf_rx_tests_OBJECTS = $(am_dtmf_rx_tests_OBJECTS)
+dtmf_rx_tests_DEPENDENCIES =
+am_dtmf_tx_tests_OBJECTS = dtmf_tx_tests.$(OBJEXT)
+dtmf_tx_tests_OBJECTS = $(am_dtmf_tx_tests_OBJECTS)
+dtmf_tx_tests_DEPENDENCIES =
+am_echo_tests_OBJECTS = echo_tests.$(OBJEXT) echo_monitor.$(OBJEXT)
+echo_tests_OBJECTS = $(am_echo_tests_OBJECTS)
+echo_tests_DEPENDENCIES =
+am_fax_decode_OBJECTS = fax_decode.$(OBJEXT)
+fax_decode_OBJECTS = $(am_fax_decode_OBJECTS)
+fax_decode_DEPENDENCIES =
+am_fax_tests_OBJECTS = fax_tests.$(OBJEXT)
+fax_tests_OBJECTS = $(am_fax_tests_OBJECTS)
+fax_tests_DEPENDENCIES =
+am_fsk_tests_OBJECTS = fsk_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT)
+fsk_tests_OBJECTS = $(am_fsk_tests_OBJECTS)
+fsk_tests_DEPENDENCIES =
+am_g168_tests_OBJECTS = g168_tests.$(OBJEXT)
+g168_tests_OBJECTS = $(am_g168_tests_OBJECTS)
+g168_tests_DEPENDENCIES =
+am_g711_tests_OBJECTS = g711_tests.$(OBJEXT)
+g711_tests_OBJECTS = $(am_g711_tests_OBJECTS)
+g711_tests_DEPENDENCIES =
+am_g722_tests_OBJECTS = g722_tests.$(OBJEXT)
+g722_tests_OBJECTS = $(am_g722_tests_OBJECTS)
+g722_tests_DEPENDENCIES =
+am_g726_tests_OBJECTS = g726_tests.$(OBJEXT)
+g726_tests_OBJECTS = $(am_g726_tests_OBJECTS)
+g726_tests_DEPENDENCIES =
+am_gsm0610_tests_OBJECTS = gsm0610_tests.$(OBJEXT)
+gsm0610_tests_OBJECTS = $(am_gsm0610_tests_OBJECTS)
+gsm0610_tests_DEPENDENCIES =
+am_hdlc_tests_OBJECTS = hdlc_tests.$(OBJEXT)
+hdlc_tests_OBJECTS = $(am_hdlc_tests_OBJECTS)
+hdlc_tests_DEPENDENCIES =
+am_ima_adpcm_tests_OBJECTS = ima_adpcm_tests.$(OBJEXT)
+ima_adpcm_tests_OBJECTS = $(am_ima_adpcm_tests_OBJECTS)
+ima_adpcm_tests_DEPENDENCIES =
+am_line_model_tests_OBJECTS = line_model_tests.$(OBJEXT) \
+	line_model.$(OBJEXT) test_utils.$(OBJEXT)
+line_model_tests_OBJECTS = $(am_line_model_tests_OBJECTS)
+line_model_tests_DEPENDENCIES =
+am_logging_tests_OBJECTS = logging_tests.$(OBJEXT)
+logging_tests_OBJECTS = $(am_logging_tests_OBJECTS)
+logging_tests_DEPENDENCIES =
+am_lpc10_tests_OBJECTS = lpc10_tests.$(OBJEXT)
+lpc10_tests_OBJECTS = $(am_lpc10_tests_OBJECTS)
+lpc10_tests_DEPENDENCIES =
+am_make_g168_css_OBJECTS = make_g168_css.$(OBJEXT)
+make_g168_css_OBJECTS = $(am_make_g168_css_OBJECTS)
+make_g168_css_DEPENDENCIES =
+am_make_line_models_OBJECTS = make_line_models.$(OBJEXT)
+make_line_models_OBJECTS = $(am_make_line_models_OBJECTS)
+make_line_models_DEPENDENCIES =
+am_modem_connect_tones_tests_OBJECTS =  \
+	modem_connect_tones_tests.$(OBJEXT)
+modem_connect_tones_tests_OBJECTS =  \
+	$(am_modem_connect_tones_tests_OBJECTS)
+modem_connect_tones_tests_DEPENDENCIES =
+am_modem_echo_tests_OBJECTS = modem_echo_tests.$(OBJEXT) \
+	echo_monitor.$(OBJEXT)
+modem_echo_tests_OBJECTS = $(am_modem_echo_tests_OBJECTS)
+modem_echo_tests_DEPENDENCIES =
+am_noise_tests_OBJECTS = noise_tests.$(OBJEXT)
+noise_tests_OBJECTS = $(am_noise_tests_OBJECTS)
+noise_tests_DEPENDENCIES =
+am_oki_adpcm_tests_OBJECTS = oki_adpcm_tests.$(OBJEXT)
+oki_adpcm_tests_OBJECTS = $(am_oki_adpcm_tests_OBJECTS)
+oki_adpcm_tests_DEPENDENCIES =
+am_playout_tests_OBJECTS = playout_tests.$(OBJEXT)
+playout_tests_OBJECTS = $(am_playout_tests_OBJECTS)
+playout_tests_DEPENDENCIES =
+am_plc_tests_OBJECTS = plc_tests.$(OBJEXT)
+plc_tests_OBJECTS = $(am_plc_tests_OBJECTS)
+plc_tests_DEPENDENCIES =
+am_power_meter_tests_OBJECTS = power_meter_tests.$(OBJEXT)
+power_meter_tests_OBJECTS = $(am_power_meter_tests_OBJECTS)
+power_meter_tests_DEPENDENCIES =
+am_r2_mf_rx_tests_OBJECTS = r2_mf_rx_tests.$(OBJEXT)
+r2_mf_rx_tests_OBJECTS = $(am_r2_mf_rx_tests_OBJECTS)
+r2_mf_rx_tests_DEPENDENCIES =
+am_r2_mf_tx_tests_OBJECTS = r2_mf_tx_tests.$(OBJEXT)
+r2_mf_tx_tests_OBJECTS = $(am_r2_mf_tx_tests_OBJECTS)
+r2_mf_tx_tests_DEPENDENCIES =
+am_schedule_tests_OBJECTS = schedule_tests.$(OBJEXT)
+schedule_tests_OBJECTS = $(am_schedule_tests_OBJECTS)
+schedule_tests_DEPENDENCIES =
+am_sig_tone_tests_OBJECTS = sig_tone_tests.$(OBJEXT)
+sig_tone_tests_OBJECTS = $(am_sig_tone_tests_OBJECTS)
+sig_tone_tests_DEPENDENCIES =
+am_super_tone_rx_tests_OBJECTS = super_tone_rx_tests.$(OBJEXT)
+super_tone_rx_tests_OBJECTS = $(am_super_tone_rx_tests_OBJECTS)
+super_tone_rx_tests_DEPENDENCIES =
+am_super_tone_tx_tests_OBJECTS = super_tone_tx_tests.$(OBJEXT)
+super_tone_tx_tests_OBJECTS = $(am_super_tone_tx_tests_OBJECTS)
+super_tone_tx_tests_DEPENDENCIES =
+am_t31_tests_OBJECTS = t31_tests.$(OBJEXT)
+t31_tests_OBJECTS = $(am_t31_tests_OBJECTS)
+t31_tests_DEPENDENCIES =
+am_t38_gateway_tests_OBJECTS = t38_gateway_tests.$(OBJEXT) \
+	ip_network_model.$(OBJEXT)
+t38_gateway_tests_OBJECTS = $(am_t38_gateway_tests_OBJECTS)
+t38_gateway_tests_DEPENDENCIES =
+am_t38_gateway_to_terminal_tests_OBJECTS =  \
+	t38_gateway_to_terminal_tests.$(OBJEXT) \
+	ip_network_model.$(OBJEXT)
+t38_gateway_to_terminal_tests_OBJECTS =  \
+	$(am_t38_gateway_to_terminal_tests_OBJECTS)
+t38_gateway_to_terminal_tests_DEPENDENCIES =
+am_t38_terminal_tests_OBJECTS = t38_terminal_tests.$(OBJEXT) \
+	ip_network_model.$(OBJEXT)
+t38_terminal_tests_OBJECTS = $(am_t38_terminal_tests_OBJECTS)
+t38_terminal_tests_DEPENDENCIES =
+am_t38_terminal_to_gateway_tests_OBJECTS =  \
+	t38_terminal_to_gateway_tests.$(OBJEXT) \
+	ip_network_model.$(OBJEXT)
+t38_terminal_to_gateway_tests_OBJECTS =  \
+	$(am_t38_terminal_to_gateway_tests_OBJECTS)
+t38_terminal_to_gateway_tests_DEPENDENCIES =
+am_t4_tests_OBJECTS = t4_tests.$(OBJEXT)
+t4_tests_OBJECTS = $(am_t4_tests_OBJECTS)
+t4_tests_DEPENDENCIES =
+am_testadsi_OBJECTS = testadsi.$(OBJEXT)
+testadsi_OBJECTS = $(am_testadsi_OBJECTS)
+testadsi_DEPENDENCIES =
+am_testfax_OBJECTS = testfax.$(OBJEXT)
+testfax_OBJECTS = $(am_testfax_OBJECTS)
+testfax_DEPENDENCIES =
+am_time_scale_tests_OBJECTS = time_scale_tests.$(OBJEXT)
+time_scale_tests_OBJECTS = $(am_time_scale_tests_OBJECTS)
+time_scale_tests_DEPENDENCIES =
+am_tone_generate_tests_OBJECTS = tone_generate_tests.$(OBJEXT)
+tone_generate_tests_OBJECTS = $(am_tone_generate_tests_OBJECTS)
+tone_generate_tests_DEPENDENCIES =
+am_v17_tests_OBJECTS = v17_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT) line_model_monitor.$(OBJEXT) \
+	modem_monitor.$(OBJEXT)
+v17_tests_OBJECTS = $(am_v17_tests_OBJECTS)
+v17_tests_DEPENDENCIES =
+am_v22bis_tests_OBJECTS = v22bis_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT) line_model_monitor.$(OBJEXT) \
+	modem_monitor.$(OBJEXT)
+v22bis_tests_OBJECTS = $(am_v22bis_tests_OBJECTS)
+v22bis_tests_DEPENDENCIES =
+am_v27ter_tests_OBJECTS = v27ter_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT) line_model_monitor.$(OBJEXT) \
+	modem_monitor.$(OBJEXT)
+v27ter_tests_OBJECTS = $(am_v27ter_tests_OBJECTS)
+v27ter_tests_DEPENDENCIES =
+am_v29_tests_OBJECTS = v29_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT) line_model_monitor.$(OBJEXT) \
+	modem_monitor.$(OBJEXT)
+v29_tests_OBJECTS = $(am_v29_tests_OBJECTS)
+v29_tests_DEPENDENCIES =
+am_v42_tests_OBJECTS = v42_tests.$(OBJEXT)
+v42_tests_OBJECTS = $(am_v42_tests_OBJECTS)
+v42_tests_DEPENDENCIES =
+am_v42bis_tests_OBJECTS = v42bis_tests.$(OBJEXT)
+v42bis_tests_OBJECTS = $(am_v42bis_tests_OBJECTS)
+v42bis_tests_DEPENDENCIES =
+am_v8_tests_OBJECTS = v8_tests.$(OBJEXT)
+v8_tests_OBJECTS = $(am_v8_tests_OBJECTS)
+v8_tests_DEPENDENCIES =
+am_vector_float_tests_OBJECTS = vector_float_tests.$(OBJEXT)
+vector_float_tests_OBJECTS = $(am_vector_float_tests_OBJECTS)
+vector_float_tests_DEPENDENCIES =
+am_vector_int_tests_OBJECTS = vector_int_tests.$(OBJEXT)
+vector_int_tests_OBJECTS = $(am_vector_int_tests_OBJECTS)
+vector_int_tests_DEPENDENCIES =
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(adsi_tests_SOURCES) $(async_tests_SOURCES) \
+	$(at_interpreter_tests_SOURCES) $(awgn_tests_SOURCES) \
+	$(bell_mf_rx_tests_SOURCES) $(bell_mf_tx_tests_SOURCES) \
+	$(bert_tests_SOURCES) $(bit_operations_tests_SOURCES) \
+	$(dc_restore_tests_SOURCES) $(dds_tests_SOURCES) \
+	$(dtmf_rx_tests_SOURCES) $(dtmf_tx_tests_SOURCES) \
+	$(echo_tests_SOURCES) $(fax_decode_SOURCES) \
+	$(fax_tests_SOURCES) $(fsk_tests_SOURCES) \
+	$(g168_tests_SOURCES) $(g711_tests_SOURCES) \
+	$(g722_tests_SOURCES) $(g726_tests_SOURCES) \
+	$(gsm0610_tests_SOURCES) $(hdlc_tests_SOURCES) \
+	$(ima_adpcm_tests_SOURCES) $(line_model_tests_SOURCES) \
+	$(logging_tests_SOURCES) $(lpc10_tests_SOURCES) \
+	$(make_g168_css_SOURCES) $(make_line_models_SOURCES) \
+	$(modem_connect_tones_tests_SOURCES) \
+	$(modem_echo_tests_SOURCES) $(noise_tests_SOURCES) \
+	$(oki_adpcm_tests_SOURCES) $(playout_tests_SOURCES) \
+	$(plc_tests_SOURCES) $(power_meter_tests_SOURCES) \
+	$(r2_mf_rx_tests_SOURCES) $(r2_mf_tx_tests_SOURCES) \
+	$(schedule_tests_SOURCES) $(sig_tone_tests_SOURCES) \
+	$(super_tone_rx_tests_SOURCES) $(super_tone_tx_tests_SOURCES) \
+	$(t31_tests_SOURCES) $(t38_gateway_tests_SOURCES) \
+	$(t38_gateway_to_terminal_tests_SOURCES) \
+	$(t38_terminal_tests_SOURCES) \
+	$(t38_terminal_to_gateway_tests_SOURCES) $(t4_tests_SOURCES) \
+	$(testadsi_SOURCES) $(testfax_SOURCES) \
+	$(time_scale_tests_SOURCES) $(tone_generate_tests_SOURCES) \
+	$(v17_tests_SOURCES) $(v22bis_tests_SOURCES) \
+	$(v27ter_tests_SOURCES) $(v29_tests_SOURCES) \
+	$(v42_tests_SOURCES) $(v42bis_tests_SOURCES) \
+	$(v8_tests_SOURCES) $(vector_float_tests_SOURCES) \
+	$(vector_int_tests_SOURCES)
+DIST_SOURCES = $(adsi_tests_SOURCES) $(async_tests_SOURCES) \
+	$(at_interpreter_tests_SOURCES) $(awgn_tests_SOURCES) \
+	$(bell_mf_rx_tests_SOURCES) $(bell_mf_tx_tests_SOURCES) \
+	$(bert_tests_SOURCES) $(bit_operations_tests_SOURCES) \
+	$(dc_restore_tests_SOURCES) $(dds_tests_SOURCES) \
+	$(dtmf_rx_tests_SOURCES) $(dtmf_tx_tests_SOURCES) \
+	$(echo_tests_SOURCES) $(fax_decode_SOURCES) \
+	$(fax_tests_SOURCES) $(fsk_tests_SOURCES) \
+	$(g168_tests_SOURCES) $(g711_tests_SOURCES) \
+	$(g722_tests_SOURCES) $(g726_tests_SOURCES) \
+	$(gsm0610_tests_SOURCES) $(hdlc_tests_SOURCES) \
+	$(ima_adpcm_tests_SOURCES) $(line_model_tests_SOURCES) \
+	$(logging_tests_SOURCES) $(lpc10_tests_SOURCES) \
+	$(make_g168_css_SOURCES) $(make_line_models_SOURCES) \
+	$(modem_connect_tones_tests_SOURCES) \
+	$(modem_echo_tests_SOURCES) $(noise_tests_SOURCES) \
+	$(oki_adpcm_tests_SOURCES) $(playout_tests_SOURCES) \
+	$(plc_tests_SOURCES) $(power_meter_tests_SOURCES) \
+	$(r2_mf_rx_tests_SOURCES) $(r2_mf_tx_tests_SOURCES) \
+	$(schedule_tests_SOURCES) $(sig_tone_tests_SOURCES) \
+	$(super_tone_rx_tests_SOURCES) $(super_tone_tx_tests_SOURCES) \
+	$(t31_tests_SOURCES) $(t38_gateway_tests_SOURCES) \
+	$(t38_gateway_to_terminal_tests_SOURCES) \
+	$(t38_terminal_tests_SOURCES) \
+	$(t38_terminal_to_gateway_tests_SOURCES) $(t4_tests_SOURCES) \
+	$(testadsi_SOURCES) $(testfax_SOURCES) \
+	$(time_scale_tests_SOURCES) $(tone_generate_tests_SOURCES) \
+	$(v17_tests_SOURCES) $(v22bis_tests_SOURCES) \
+	$(v27ter_tests_SOURCES) $(v29_tests_SOURCES) \
+	$(v42_tests_SOURCES) $(v42bis_tests_SOURCES) \
+	$(v8_tests_SOURCES) $(vector_float_tests_SOURCES) \
+	$(vector_int_tests_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(datadir)"
+nobase_dataDATA_INSTALL = $(install_sh_DATA)
+DATA = $(nobase_data_DATA)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoconf
+AUTOHEADER = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run autoheader
+AUTOMAKE = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run automake-1.9
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+COMP_VENDOR_CFLAGS = -O2 -g -std=gnu99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+COND_DOC_FALSE = 
+COND_DOC_TRUE = #
+COND_ITUTESTS_FALSE = 
+COND_ITUTESTS_TRUE = #
+COND_MMX_FALSE = 
+COND_MMX_TRUE = #
+COND_SSE_FALSE = 
+COND_SSE_TRUE = #
+COND_TESTS_FALSE = #
+COND_TESTS_TRUE = 
+CPP = gcc -E
+CPPFLAGS =  
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = grep -E
+EXEEXT = 
+F77 = 
+FFLAGS = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS = 
+LIBOBJS = 
+LIBS = -lm -ltiff  $(TESTLIBS)
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /xhome1/tmp/oslec/spandsp-0.0.3/config/missing --run makeinfo
+OBJEXT = o
+PACKAGE = spandsp
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = 
+PACKAGE_STRING = 
+PACKAGE_TARNAME = 
+PACKAGE_VERSION = 
+PATH_SEPARATOR = :
+RANLIB = ranlib
+SET_MAKE = 
+SHELL = /bin/sh
+SPANDSP_LT_AGE = 0
+SPANDSP_LT_CURRENT = 0
+SPANDSP_LT_REVISION = 2
+STRIP = strip
+TESTLIBS =  -L/usr/X11R6/lib -lXft -lXext -lX11 -laudiofile -lfftw3 -lpthread -ldl
+VERSION = 0.0.3
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+ac_ct_RANLIB = ranlib
+ac_ct_STRIP = strip
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /xhome1/tmp/oslec/spandsp-0.0.3/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+nobase_data_DATA = sound_c1_8k.wav sound_c3_8k.wav
+EXTRA_DIST = regression_tests.sh v42bis_tests.sh fax_tests.sh
+MAINTAINERCLEANFILES = Makefile.in
+INCLUDES = -I$(top_builddir)/src -DDATADIR="\"$(pkgdatadir)\""
+noinst_HEADERS = modem_monitor.h \
+                    echo_monitor.h \
+                    ip_network_model.h \
+                    line_model.h \
+                    line_model_monitor.h \
+                    test_utils.h
+
+adsi_tests_SOURCES = adsi_tests.c
+adsi_tests_LDADD = -L$(top_builddir)/src -lspandsp
+async_tests_SOURCES = async_tests.c
+async_tests_LDADD = -L$(top_builddir)/src -lspandsp
+at_interpreter_tests_SOURCES = at_interpreter_tests.c
+at_interpreter_tests_LDADD = -L$(top_builddir)/src -lspandsp
+awgn_tests_SOURCES = awgn_tests.c
+awgn_tests_LDADD = -L$(top_builddir)/src -lspandsp
+bell_mf_rx_tests_SOURCES = bell_mf_rx_tests.c
+bell_mf_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+bell_mf_tx_tests_SOURCES = bell_mf_tx_tests.c
+bell_mf_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+bert_tests_SOURCES = bert_tests.c
+bert_tests_LDADD = -L$(top_builddir)/src -lspandsp
+bit_operations_tests_SOURCES = bit_operations_tests.c
+bit_operations_tests_LDADD = -L$(top_builddir)/src -lspandsp
+dc_restore_tests_SOURCES = dc_restore_tests.c
+dc_restore_tests_LDADD = -L$(top_builddir)/src -lspandsp
+dds_tests_SOURCES = dds_tests.c
+dds_tests_LDADD = -L$(top_builddir)/src -lspandsp
+dtmf_rx_tests_SOURCES = dtmf_rx_tests.c test_utils.c
+dtmf_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+dtmf_tx_tests_SOURCES = dtmf_tx_tests.c
+dtmf_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+echo_tests_SOURCES = echo_tests.c echo_monitor.cpp
+echo_tests_LDADD = -L$(top_builddir)/src -lspandsp
+fax_decode_SOURCES = fax_decode.c
+fax_decode_LDADD = -L$(top_builddir)/src -lspandsp
+fax_tests_SOURCES = fax_tests.c
+fax_tests_LDADD = -L$(top_builddir)/src -lspandsp
+fsk_tests_SOURCES = fsk_tests.c line_model.c test_utils.c
+fsk_tests_LDADD = -L$(top_builddir)/src -lspandsp
+g168_tests_SOURCES = g168_tests.c
+g168_tests_LDADD = -L$(top_builddir)/src -lspandsp
+g711_tests_SOURCES = g711_tests.c
+g711_tests_LDADD = -L$(top_builddir)/src -lspandsp
+g722_tests_SOURCES = g722_tests.c
+g722_tests_LDADD = -L$(top_builddir)/src -lspandsp
+g726_tests_SOURCES = g726_tests.c
+g726_tests_LDADD = -L$(top_builddir)/src -lspandsp
+gsm0610_tests_SOURCES = gsm0610_tests.c
+gsm0610_tests_LDADD = -L$(top_builddir)/src -lspandsp
+hdlc_tests_SOURCES = hdlc_tests.c
+hdlc_tests_LDADD = -L$(top_builddir)/src -lspandsp
+ima_adpcm_tests_SOURCES = ima_adpcm_tests.c
+ima_adpcm_tests_LDADD = -L$(top_builddir)/src -lspandsp
+line_model_tests_SOURCES = line_model_tests.c line_model.c test_utils.c
+line_model_tests_LDADD = -L$(top_builddir)/src -lspandsp
+logging_tests_SOURCES = logging_tests.c
+logging_tests_LDADD = -L$(top_builddir)/src -lspandsp
+lpc10_tests_SOURCES = lpc10_tests.c
+lpc10_tests_LDADD = -L$(top_builddir)/src -lspandsp
+make_g168_css_SOURCES = make_g168_css.c
+make_g168_css_LDADD = -L$(top_builddir)/src -lspandsp
+make_line_models_SOURCES = make_line_models.c
+make_line_models_LDADD = -L$(top_builddir)/src -lspandsp
+modem_echo_tests_SOURCES = modem_echo_tests.c echo_monitor.cpp
+modem_echo_tests_LDADD = -L$(top_builddir)/src -lspandsp
+modem_connect_tones_tests_SOURCES = modem_connect_tones_tests.c
+modem_connect_tones_tests_LDADD = -L$(top_builddir)/src -lspandsp
+noise_tests_SOURCES = noise_tests.c
+noise_tests_LDADD = -L$(top_builddir)/src -lspandsp
+oki_adpcm_tests_SOURCES = oki_adpcm_tests.c
+oki_adpcm_tests_LDADD = -L$(top_builddir)/src -lspandsp
+playout_tests_SOURCES = playout_tests.c
+playout_tests_LDADD = -L$(top_builddir)/src -lspandsp
+plc_tests_SOURCES = plc_tests.c
+plc_tests_LDADD = -L$(top_builddir)/src -lspandsp
+power_meter_tests_SOURCES = power_meter_tests.c
+power_meter_tests_LDADD = -L$(top_builddir)/src -lspandsp
+r2_mf_rx_tests_SOURCES = r2_mf_rx_tests.c
+r2_mf_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+r2_mf_tx_tests_SOURCES = r2_mf_tx_tests.c
+r2_mf_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+schedule_tests_SOURCES = schedule_tests.c
+schedule_tests_LDADD = -L$(top_builddir)/src -lspandsp 
+sig_tone_tests_SOURCES = sig_tone_tests.c
+sig_tone_tests_LDADD = -L$(top_builddir)/src -lspandsp 
+super_tone_rx_tests_SOURCES = super_tone_rx_tests.c
+super_tone_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+super_tone_tx_tests_SOURCES = super_tone_tx_tests.c
+super_tone_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t4_tests_SOURCES = t4_tests.c
+t4_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t31_tests_SOURCES = t31_tests.c
+t31_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t38_gateway_tests_SOURCES = t38_gateway_tests.c ip_network_model.c
+t38_gateway_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t38_gateway_to_terminal_tests_SOURCES = t38_gateway_to_terminal_tests.c ip_network_model.c
+t38_gateway_to_terminal_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t38_terminal_tests_SOURCES = t38_terminal_tests.c ip_network_model.c
+t38_terminal_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t38_terminal_to_gateway_tests_SOURCES = t38_terminal_to_gateway_tests.c ip_network_model.c
+t38_terminal_to_gateway_tests_LDADD = -L$(top_builddir)/src -lspandsp
+time_scale_tests_SOURCES = time_scale_tests.c
+time_scale_tests_LDADD = -L$(top_builddir)/src -lspandsp
+tone_generate_tests_SOURCES = tone_generate_tests.c
+tone_generate_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v17_tests_SOURCES = v17_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v17_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v22bis_tests_SOURCES = v22bis_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v22bis_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v27ter_tests_SOURCES = v27ter_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v27ter_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v29_tests_SOURCES = v29_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v29_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v42_tests_SOURCES = v42_tests.c
+v42_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v42bis_tests_SOURCES = v42bis_tests.c
+v42bis_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v8_tests_SOURCES = v8_tests.c
+v8_tests_LDADD = -L$(top_builddir)/src -lspandsp
+vector_float_tests_SOURCES = vector_float_tests.c
+vector_float_tests_LDADD = -L$(top_builddir)/src -lspandsp
+vector_int_tests_SOURCES = vector_int_tests.c
+vector_int_tests_LDADD = -L$(top_builddir)/src -lspandsp
+testadsi_SOURCES = testadsi.c
+testadsi_LDADD = -L$(top_builddir)/src -lspandsp
+testfax_SOURCES = testfax.c
+testfax_LDADD = -L$(top_builddir)/src -lspandsp
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+adsi_tests$(EXEEXT): $(adsi_tests_OBJECTS) $(adsi_tests_DEPENDENCIES) 
+	@rm -f adsi_tests$(EXEEXT)
+	$(LINK) $(adsi_tests_LDFLAGS) $(adsi_tests_OBJECTS) $(adsi_tests_LDADD) $(LIBS)
+async_tests$(EXEEXT): $(async_tests_OBJECTS) $(async_tests_DEPENDENCIES) 
+	@rm -f async_tests$(EXEEXT)
+	$(LINK) $(async_tests_LDFLAGS) $(async_tests_OBJECTS) $(async_tests_LDADD) $(LIBS)
+at_interpreter_tests$(EXEEXT): $(at_interpreter_tests_OBJECTS) $(at_interpreter_tests_DEPENDENCIES) 
+	@rm -f at_interpreter_tests$(EXEEXT)
+	$(LINK) $(at_interpreter_tests_LDFLAGS) $(at_interpreter_tests_OBJECTS) $(at_interpreter_tests_LDADD) $(LIBS)
+awgn_tests$(EXEEXT): $(awgn_tests_OBJECTS) $(awgn_tests_DEPENDENCIES) 
+	@rm -f awgn_tests$(EXEEXT)
+	$(LINK) $(awgn_tests_LDFLAGS) $(awgn_tests_OBJECTS) $(awgn_tests_LDADD) $(LIBS)
+bell_mf_rx_tests$(EXEEXT): $(bell_mf_rx_tests_OBJECTS) $(bell_mf_rx_tests_DEPENDENCIES) 
+	@rm -f bell_mf_rx_tests$(EXEEXT)
+	$(LINK) $(bell_mf_rx_tests_LDFLAGS) $(bell_mf_rx_tests_OBJECTS) $(bell_mf_rx_tests_LDADD) $(LIBS)
+bell_mf_tx_tests$(EXEEXT): $(bell_mf_tx_tests_OBJECTS) $(bell_mf_tx_tests_DEPENDENCIES) 
+	@rm -f bell_mf_tx_tests$(EXEEXT)
+	$(LINK) $(bell_mf_tx_tests_LDFLAGS) $(bell_mf_tx_tests_OBJECTS) $(bell_mf_tx_tests_LDADD) $(LIBS)
+bert_tests$(EXEEXT): $(bert_tests_OBJECTS) $(bert_tests_DEPENDENCIES) 
+	@rm -f bert_tests$(EXEEXT)
+	$(LINK) $(bert_tests_LDFLAGS) $(bert_tests_OBJECTS) $(bert_tests_LDADD) $(LIBS)
+bit_operations_tests$(EXEEXT): $(bit_operations_tests_OBJECTS) $(bit_operations_tests_DEPENDENCIES) 
+	@rm -f bit_operations_tests$(EXEEXT)
+	$(LINK) $(bit_operations_tests_LDFLAGS) $(bit_operations_tests_OBJECTS) $(bit_operations_tests_LDADD) $(LIBS)
+dc_restore_tests$(EXEEXT): $(dc_restore_tests_OBJECTS) $(dc_restore_tests_DEPENDENCIES) 
+	@rm -f dc_restore_tests$(EXEEXT)
+	$(LINK) $(dc_restore_tests_LDFLAGS) $(dc_restore_tests_OBJECTS) $(dc_restore_tests_LDADD) $(LIBS)
+dds_tests$(EXEEXT): $(dds_tests_OBJECTS) $(dds_tests_DEPENDENCIES) 
+	@rm -f dds_tests$(EXEEXT)
+	$(LINK) $(dds_tests_LDFLAGS) $(dds_tests_OBJECTS) $(dds_tests_LDADD) $(LIBS)
+dtmf_rx_tests$(EXEEXT): $(dtmf_rx_tests_OBJECTS) $(dtmf_rx_tests_DEPENDENCIES) 
+	@rm -f dtmf_rx_tests$(EXEEXT)
+	$(LINK) $(dtmf_rx_tests_LDFLAGS) $(dtmf_rx_tests_OBJECTS) $(dtmf_rx_tests_LDADD) $(LIBS)
+dtmf_tx_tests$(EXEEXT): $(dtmf_tx_tests_OBJECTS) $(dtmf_tx_tests_DEPENDENCIES) 
+	@rm -f dtmf_tx_tests$(EXEEXT)
+	$(LINK) $(dtmf_tx_tests_LDFLAGS) $(dtmf_tx_tests_OBJECTS) $(dtmf_tx_tests_LDADD) $(LIBS)
+echo_tests$(EXEEXT): $(echo_tests_OBJECTS) $(echo_tests_DEPENDENCIES) 
+	@rm -f echo_tests$(EXEEXT)
+	$(CXXLINK) $(echo_tests_LDFLAGS) $(echo_tests_OBJECTS) $(echo_tests_LDADD) $(LIBS)
+fax_decode$(EXEEXT): $(fax_decode_OBJECTS) $(fax_decode_DEPENDENCIES) 
+	@rm -f fax_decode$(EXEEXT)
+	$(LINK) $(fax_decode_LDFLAGS) $(fax_decode_OBJECTS) $(fax_decode_LDADD) $(LIBS)
+fax_tests$(EXEEXT): $(fax_tests_OBJECTS) $(fax_tests_DEPENDENCIES) 
+	@rm -f fax_tests$(EXEEXT)
+	$(LINK) $(fax_tests_LDFLAGS) $(fax_tests_OBJECTS) $(fax_tests_LDADD) $(LIBS)
+fsk_tests$(EXEEXT): $(fsk_tests_OBJECTS) $(fsk_tests_DEPENDENCIES) 
+	@rm -f fsk_tests$(EXEEXT)
+	$(LINK) $(fsk_tests_LDFLAGS) $(fsk_tests_OBJECTS) $(fsk_tests_LDADD) $(LIBS)
+g168_tests$(EXEEXT): $(g168_tests_OBJECTS) $(g168_tests_DEPENDENCIES) 
+	@rm -f g168_tests$(EXEEXT)
+	$(LINK) $(g168_tests_LDFLAGS) $(g168_tests_OBJECTS) $(g168_tests_LDADD) $(LIBS)
+g711_tests$(EXEEXT): $(g711_tests_OBJECTS) $(g711_tests_DEPENDENCIES) 
+	@rm -f g711_tests$(EXEEXT)
+	$(LINK) $(g711_tests_LDFLAGS) $(g711_tests_OBJECTS) $(g711_tests_LDADD) $(LIBS)
+g722_tests$(EXEEXT): $(g722_tests_OBJECTS) $(g722_tests_DEPENDENCIES) 
+	@rm -f g722_tests$(EXEEXT)
+	$(LINK) $(g722_tests_LDFLAGS) $(g722_tests_OBJECTS) $(g722_tests_LDADD) $(LIBS)
+g726_tests$(EXEEXT): $(g726_tests_OBJECTS) $(g726_tests_DEPENDENCIES) 
+	@rm -f g726_tests$(EXEEXT)
+	$(LINK) $(g726_tests_LDFLAGS) $(g726_tests_OBJECTS) $(g726_tests_LDADD) $(LIBS)
+gsm0610_tests$(EXEEXT): $(gsm0610_tests_OBJECTS) $(gsm0610_tests_DEPENDENCIES) 
+	@rm -f gsm0610_tests$(EXEEXT)
+	$(LINK) $(gsm0610_tests_LDFLAGS) $(gsm0610_tests_OBJECTS) $(gsm0610_tests_LDADD) $(LIBS)
+hdlc_tests$(EXEEXT): $(hdlc_tests_OBJECTS) $(hdlc_tests_DEPENDENCIES) 
+	@rm -f hdlc_tests$(EXEEXT)
+	$(LINK) $(hdlc_tests_LDFLAGS) $(hdlc_tests_OBJECTS) $(hdlc_tests_LDADD) $(LIBS)
+ima_adpcm_tests$(EXEEXT): $(ima_adpcm_tests_OBJECTS) $(ima_adpcm_tests_DEPENDENCIES) 
+	@rm -f ima_adpcm_tests$(EXEEXT)
+	$(LINK) $(ima_adpcm_tests_LDFLAGS) $(ima_adpcm_tests_OBJECTS) $(ima_adpcm_tests_LDADD) $(LIBS)
+line_model_tests$(EXEEXT): $(line_model_tests_OBJECTS) $(line_model_tests_DEPENDENCIES) 
+	@rm -f line_model_tests$(EXEEXT)
+	$(LINK) $(line_model_tests_LDFLAGS) $(line_model_tests_OBJECTS) $(line_model_tests_LDADD) $(LIBS)
+logging_tests$(EXEEXT): $(logging_tests_OBJECTS) $(logging_tests_DEPENDENCIES) 
+	@rm -f logging_tests$(EXEEXT)
+	$(LINK) $(logging_tests_LDFLAGS) $(logging_tests_OBJECTS) $(logging_tests_LDADD) $(LIBS)
+lpc10_tests$(EXEEXT): $(lpc10_tests_OBJECTS) $(lpc10_tests_DEPENDENCIES) 
+	@rm -f lpc10_tests$(EXEEXT)
+	$(LINK) $(lpc10_tests_LDFLAGS) $(lpc10_tests_OBJECTS) $(lpc10_tests_LDADD) $(LIBS)
+make_g168_css$(EXEEXT): $(make_g168_css_OBJECTS) $(make_g168_css_DEPENDENCIES) 
+	@rm -f make_g168_css$(EXEEXT)
+	$(LINK) $(make_g168_css_LDFLAGS) $(make_g168_css_OBJECTS) $(make_g168_css_LDADD) $(LIBS)
+make_line_models$(EXEEXT): $(make_line_models_OBJECTS) $(make_line_models_DEPENDENCIES) 
+	@rm -f make_line_models$(EXEEXT)
+	$(LINK) $(make_line_models_LDFLAGS) $(make_line_models_OBJECTS) $(make_line_models_LDADD) $(LIBS)
+modem_connect_tones_tests$(EXEEXT): $(modem_connect_tones_tests_OBJECTS) $(modem_connect_tones_tests_DEPENDENCIES) 
+	@rm -f modem_connect_tones_tests$(EXEEXT)
+	$(LINK) $(modem_connect_tones_tests_LDFLAGS) $(modem_connect_tones_tests_OBJECTS) $(modem_connect_tones_tests_LDADD) $(LIBS)
+modem_echo_tests$(EXEEXT): $(modem_echo_tests_OBJECTS) $(modem_echo_tests_DEPENDENCIES) 
+	@rm -f modem_echo_tests$(EXEEXT)
+	$(CXXLINK) $(modem_echo_tests_LDFLAGS) $(modem_echo_tests_OBJECTS) $(modem_echo_tests_LDADD) $(LIBS)
+noise_tests$(EXEEXT): $(noise_tests_OBJECTS) $(noise_tests_DEPENDENCIES) 
+	@rm -f noise_tests$(EXEEXT)
+	$(LINK) $(noise_tests_LDFLAGS) $(noise_tests_OBJECTS) $(noise_tests_LDADD) $(LIBS)
+oki_adpcm_tests$(EXEEXT): $(oki_adpcm_tests_OBJECTS) $(oki_adpcm_tests_DEPENDENCIES) 
+	@rm -f oki_adpcm_tests$(EXEEXT)
+	$(LINK) $(oki_adpcm_tests_LDFLAGS) $(oki_adpcm_tests_OBJECTS) $(oki_adpcm_tests_LDADD) $(LIBS)
+playout_tests$(EXEEXT): $(playout_tests_OBJECTS) $(playout_tests_DEPENDENCIES) 
+	@rm -f playout_tests$(EXEEXT)
+	$(LINK) $(playout_tests_LDFLAGS) $(playout_tests_OBJECTS) $(playout_tests_LDADD) $(LIBS)
+plc_tests$(EXEEXT): $(plc_tests_OBJECTS) $(plc_tests_DEPENDENCIES) 
+	@rm -f plc_tests$(EXEEXT)
+	$(LINK) $(plc_tests_LDFLAGS) $(plc_tests_OBJECTS) $(plc_tests_LDADD) $(LIBS)
+power_meter_tests$(EXEEXT): $(power_meter_tests_OBJECTS) $(power_meter_tests_DEPENDENCIES) 
+	@rm -f power_meter_tests$(EXEEXT)
+	$(LINK) $(power_meter_tests_LDFLAGS) $(power_meter_tests_OBJECTS) $(power_meter_tests_LDADD) $(LIBS)
+r2_mf_rx_tests$(EXEEXT): $(r2_mf_rx_tests_OBJECTS) $(r2_mf_rx_tests_DEPENDENCIES) 
+	@rm -f r2_mf_rx_tests$(EXEEXT)
+	$(LINK) $(r2_mf_rx_tests_LDFLAGS) $(r2_mf_rx_tests_OBJECTS) $(r2_mf_rx_tests_LDADD) $(LIBS)
+r2_mf_tx_tests$(EXEEXT): $(r2_mf_tx_tests_OBJECTS) $(r2_mf_tx_tests_DEPENDENCIES) 
+	@rm -f r2_mf_tx_tests$(EXEEXT)
+	$(LINK) $(r2_mf_tx_tests_LDFLAGS) $(r2_mf_tx_tests_OBJECTS) $(r2_mf_tx_tests_LDADD) $(LIBS)
+schedule_tests$(EXEEXT): $(schedule_tests_OBJECTS) $(schedule_tests_DEPENDENCIES) 
+	@rm -f schedule_tests$(EXEEXT)
+	$(LINK) $(schedule_tests_LDFLAGS) $(schedule_tests_OBJECTS) $(schedule_tests_LDADD) $(LIBS)
+sig_tone_tests$(EXEEXT): $(sig_tone_tests_OBJECTS) $(sig_tone_tests_DEPENDENCIES) 
+	@rm -f sig_tone_tests$(EXEEXT)
+	$(LINK) $(sig_tone_tests_LDFLAGS) $(sig_tone_tests_OBJECTS) $(sig_tone_tests_LDADD) $(LIBS)
+super_tone_rx_tests$(EXEEXT): $(super_tone_rx_tests_OBJECTS) $(super_tone_rx_tests_DEPENDENCIES) 
+	@rm -f super_tone_rx_tests$(EXEEXT)
+	$(LINK) $(super_tone_rx_tests_LDFLAGS) $(super_tone_rx_tests_OBJECTS) $(super_tone_rx_tests_LDADD) $(LIBS)
+super_tone_tx_tests$(EXEEXT): $(super_tone_tx_tests_OBJECTS) $(super_tone_tx_tests_DEPENDENCIES) 
+	@rm -f super_tone_tx_tests$(EXEEXT)
+	$(LINK) $(super_tone_tx_tests_LDFLAGS) $(super_tone_tx_tests_OBJECTS) $(super_tone_tx_tests_LDADD) $(LIBS)
+t31_tests$(EXEEXT): $(t31_tests_OBJECTS) $(t31_tests_DEPENDENCIES) 
+	@rm -f t31_tests$(EXEEXT)
+	$(LINK) $(t31_tests_LDFLAGS) $(t31_tests_OBJECTS) $(t31_tests_LDADD) $(LIBS)
+t38_gateway_tests$(EXEEXT): $(t38_gateway_tests_OBJECTS) $(t38_gateway_tests_DEPENDENCIES) 
+	@rm -f t38_gateway_tests$(EXEEXT)
+	$(LINK) $(t38_gateway_tests_LDFLAGS) $(t38_gateway_tests_OBJECTS) $(t38_gateway_tests_LDADD) $(LIBS)
+t38_gateway_to_terminal_tests$(EXEEXT): $(t38_gateway_to_terminal_tests_OBJECTS) $(t38_gateway_to_terminal_tests_DEPENDENCIES) 
+	@rm -f t38_gateway_to_terminal_tests$(EXEEXT)
+	$(LINK) $(t38_gateway_to_terminal_tests_LDFLAGS) $(t38_gateway_to_terminal_tests_OBJECTS) $(t38_gateway_to_terminal_tests_LDADD) $(LIBS)
+t38_terminal_tests$(EXEEXT): $(t38_terminal_tests_OBJECTS) $(t38_terminal_tests_DEPENDENCIES) 
+	@rm -f t38_terminal_tests$(EXEEXT)
+	$(LINK) $(t38_terminal_tests_LDFLAGS) $(t38_terminal_tests_OBJECTS) $(t38_terminal_tests_LDADD) $(LIBS)
+t38_terminal_to_gateway_tests$(EXEEXT): $(t38_terminal_to_gateway_tests_OBJECTS) $(t38_terminal_to_gateway_tests_DEPENDENCIES) 
+	@rm -f t38_terminal_to_gateway_tests$(EXEEXT)
+	$(LINK) $(t38_terminal_to_gateway_tests_LDFLAGS) $(t38_terminal_to_gateway_tests_OBJECTS) $(t38_terminal_to_gateway_tests_LDADD) $(LIBS)
+t4_tests$(EXEEXT): $(t4_tests_OBJECTS) $(t4_tests_DEPENDENCIES) 
+	@rm -f t4_tests$(EXEEXT)
+	$(LINK) $(t4_tests_LDFLAGS) $(t4_tests_OBJECTS) $(t4_tests_LDADD) $(LIBS)
+testadsi$(EXEEXT): $(testadsi_OBJECTS) $(testadsi_DEPENDENCIES) 
+	@rm -f testadsi$(EXEEXT)
+	$(LINK) $(testadsi_LDFLAGS) $(testadsi_OBJECTS) $(testadsi_LDADD) $(LIBS)
+testfax$(EXEEXT): $(testfax_OBJECTS) $(testfax_DEPENDENCIES) 
+	@rm -f testfax$(EXEEXT)
+	$(LINK) $(testfax_LDFLAGS) $(testfax_OBJECTS) $(testfax_LDADD) $(LIBS)
+time_scale_tests$(EXEEXT): $(time_scale_tests_OBJECTS) $(time_scale_tests_DEPENDENCIES) 
+	@rm -f time_scale_tests$(EXEEXT)
+	$(LINK) $(time_scale_tests_LDFLAGS) $(time_scale_tests_OBJECTS) $(time_scale_tests_LDADD) $(LIBS)
+tone_generate_tests$(EXEEXT): $(tone_generate_tests_OBJECTS) $(tone_generate_tests_DEPENDENCIES) 
+	@rm -f tone_generate_tests$(EXEEXT)
+	$(LINK) $(tone_generate_tests_LDFLAGS) $(tone_generate_tests_OBJECTS) $(tone_generate_tests_LDADD) $(LIBS)
+v17_tests$(EXEEXT): $(v17_tests_OBJECTS) $(v17_tests_DEPENDENCIES) 
+	@rm -f v17_tests$(EXEEXT)
+	$(CXXLINK) $(v17_tests_LDFLAGS) $(v17_tests_OBJECTS) $(v17_tests_LDADD) $(LIBS)
+v22bis_tests$(EXEEXT): $(v22bis_tests_OBJECTS) $(v22bis_tests_DEPENDENCIES) 
+	@rm -f v22bis_tests$(EXEEXT)
+	$(CXXLINK) $(v22bis_tests_LDFLAGS) $(v22bis_tests_OBJECTS) $(v22bis_tests_LDADD) $(LIBS)
+v27ter_tests$(EXEEXT): $(v27ter_tests_OBJECTS) $(v27ter_tests_DEPENDENCIES) 
+	@rm -f v27ter_tests$(EXEEXT)
+	$(CXXLINK) $(v27ter_tests_LDFLAGS) $(v27ter_tests_OBJECTS) $(v27ter_tests_LDADD) $(LIBS)
+v29_tests$(EXEEXT): $(v29_tests_OBJECTS) $(v29_tests_DEPENDENCIES) 
+	@rm -f v29_tests$(EXEEXT)
+	$(CXXLINK) $(v29_tests_LDFLAGS) $(v29_tests_OBJECTS) $(v29_tests_LDADD) $(LIBS)
+v42_tests$(EXEEXT): $(v42_tests_OBJECTS) $(v42_tests_DEPENDENCIES) 
+	@rm -f v42_tests$(EXEEXT)
+	$(LINK) $(v42_tests_LDFLAGS) $(v42_tests_OBJECTS) $(v42_tests_LDADD) $(LIBS)
+v42bis_tests$(EXEEXT): $(v42bis_tests_OBJECTS) $(v42bis_tests_DEPENDENCIES) 
+	@rm -f v42bis_tests$(EXEEXT)
+	$(LINK) $(v42bis_tests_LDFLAGS) $(v42bis_tests_OBJECTS) $(v42bis_tests_LDADD) $(LIBS)
+v8_tests$(EXEEXT): $(v8_tests_OBJECTS) $(v8_tests_DEPENDENCIES) 
+	@rm -f v8_tests$(EXEEXT)
+	$(LINK) $(v8_tests_LDFLAGS) $(v8_tests_OBJECTS) $(v8_tests_LDADD) $(LIBS)
+vector_float_tests$(EXEEXT): $(vector_float_tests_OBJECTS) $(vector_float_tests_DEPENDENCIES) 
+	@rm -f vector_float_tests$(EXEEXT)
+	$(LINK) $(vector_float_tests_LDFLAGS) $(vector_float_tests_OBJECTS) $(vector_float_tests_LDADD) $(LIBS)
+vector_int_tests$(EXEEXT): $(vector_int_tests_OBJECTS) $(vector_int_tests_DEPENDENCIES) 
+	@rm -f vector_int_tests$(EXEEXT)
+	$(LINK) $(vector_int_tests_LDFLAGS) $(vector_int_tests_OBJECTS) $(vector_int_tests_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/adsi_tests.Po
+include ./$(DEPDIR)/async_tests.Po
+include ./$(DEPDIR)/at_interpreter_tests.Po
+include ./$(DEPDIR)/awgn_tests.Po
+include ./$(DEPDIR)/bell_mf_rx_tests.Po
+include ./$(DEPDIR)/bell_mf_tx_tests.Po
+include ./$(DEPDIR)/bert_tests.Po
+include ./$(DEPDIR)/bit_operations_tests.Po
+include ./$(DEPDIR)/dc_restore_tests.Po
+include ./$(DEPDIR)/dds_tests.Po
+include ./$(DEPDIR)/dtmf_rx_tests.Po
+include ./$(DEPDIR)/dtmf_tx_tests.Po
+include ./$(DEPDIR)/echo_monitor.Po
+include ./$(DEPDIR)/echo_tests.Po
+include ./$(DEPDIR)/fax_decode.Po
+include ./$(DEPDIR)/fax_tests.Po
+include ./$(DEPDIR)/fsk_tests.Po
+include ./$(DEPDIR)/g168_tests.Po
+include ./$(DEPDIR)/g711_tests.Po
+include ./$(DEPDIR)/g722_tests.Po
+include ./$(DEPDIR)/g726_tests.Po
+include ./$(DEPDIR)/gsm0610_tests.Po
+include ./$(DEPDIR)/hdlc_tests.Po
+include ./$(DEPDIR)/ima_adpcm_tests.Po
+include ./$(DEPDIR)/ip_network_model.Po
+include ./$(DEPDIR)/line_model.Po
+include ./$(DEPDIR)/line_model_monitor.Po
+include ./$(DEPDIR)/line_model_tests.Po
+include ./$(DEPDIR)/logging_tests.Po
+include ./$(DEPDIR)/lpc10_tests.Po
+include ./$(DEPDIR)/make_g168_css.Po
+include ./$(DEPDIR)/make_line_models.Po
+include ./$(DEPDIR)/modem_connect_tones_tests.Po
+include ./$(DEPDIR)/modem_echo_tests.Po
+include ./$(DEPDIR)/modem_monitor.Po
+include ./$(DEPDIR)/noise_tests.Po
+include ./$(DEPDIR)/oki_adpcm_tests.Po
+include ./$(DEPDIR)/playout_tests.Po
+include ./$(DEPDIR)/plc_tests.Po
+include ./$(DEPDIR)/power_meter_tests.Po
+include ./$(DEPDIR)/r2_mf_rx_tests.Po
+include ./$(DEPDIR)/r2_mf_tx_tests.Po
+include ./$(DEPDIR)/schedule_tests.Po
+include ./$(DEPDIR)/sig_tone_tests.Po
+include ./$(DEPDIR)/super_tone_rx_tests.Po
+include ./$(DEPDIR)/super_tone_tx_tests.Po
+include ./$(DEPDIR)/t31_tests.Po
+include ./$(DEPDIR)/t38_gateway_tests.Po
+include ./$(DEPDIR)/t38_gateway_to_terminal_tests.Po
+include ./$(DEPDIR)/t38_terminal_tests.Po
+include ./$(DEPDIR)/t38_terminal_to_gateway_tests.Po
+include ./$(DEPDIR)/t4_tests.Po
+include ./$(DEPDIR)/test_utils.Po
+include ./$(DEPDIR)/testadsi.Po
+include ./$(DEPDIR)/testfax.Po
+include ./$(DEPDIR)/time_scale_tests.Po
+include ./$(DEPDIR)/tone_generate_tests.Po
+include ./$(DEPDIR)/v17_tests.Po
+include ./$(DEPDIR)/v22bis_tests.Po
+include ./$(DEPDIR)/v27ter_tests.Po
+include ./$(DEPDIR)/v29_tests.Po
+include ./$(DEPDIR)/v42_tests.Po
+include ./$(DEPDIR)/v42bis_tests.Po
+include ./$(DEPDIR)/v8_tests.Po
+include ./$(DEPDIR)/vector_float_tests.Po
+include ./$(DEPDIR)/vector_int_tests.Po
+
+.c.o:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(LTCOMPILE) -c -o $@ $<
+
+.cpp.o:
+	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+#	source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_dataDATA: $(nobase_data_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \
+	  $(nobase_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+uninstall-nobase_dataDATA:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(datadir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_dataDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-nobase_dataDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-nobase_dataDATA install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-nobase_dataDATA
+
+
+# We need to run make_line_models, so it generates the line_models.h file
+# used by several of the test programs.
+
+line_model.$(OBJEXT): make_line_models$(EXEEXT) line_models.h
+
+line_models.h: make_line_models$(EXEEXT)
+	./make_line_models$(EXEEXT)
+
+# We need to create the CSS files for echo cancellation tests.
+
+sound_c1_8k.wav sound_c3_8k.wav: make_g168_css$(EXEEXT)
+	./make_g168_css$(EXEEXT)
+	sox sound_c1.wav -r8000 sound_c1_8k.wav
+	sox sound_c3.wav -r8000 sound_c3_8k.wav
+	rm sound_c1.wav sound_c3.wav
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/Makefile.am	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,292 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License version 2, as
+## published by the Free Software Foundation.
+##
+## 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+##
+## $Id: Makefile.am,v 1.77 2006/11/26 13:13:30 steveu Exp $
+
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+
+LIBS += $(TESTLIBS)
+
+nobase_data_DATA = sound_c1_8k.wav sound_c3_8k.wav
+
+EXTRA_DIST = regression_tests.sh v42bis_tests.sh fax_tests.sh
+ 
+MAINTAINERCLEANFILES = Makefile.in
+
+INCLUDES = -I$(top_builddir)/src -DDATADIR="\"$(pkgdatadir)\""
+
+noinst_PROGRAMS =   adsi_tests \
+                    async_tests \
+                    at_interpreter_tests \
+                    awgn_tests \
+                    bell_mf_rx_tests \
+                    bell_mf_tx_tests \
+                    bert_tests \
+                    bit_operations_tests \
+                    dc_restore_tests \
+                    dds_tests \
+                    dtmf_rx_tests \
+                    dtmf_tx_tests \
+                    echo_tests \
+                    fax_decode \
+                    fax_tests \
+                    fsk_tests \
+                    g168_tests \
+                    g711_tests \
+                    g722_tests \
+                    g726_tests \
+                    gsm0610_tests \
+                    hdlc_tests \
+                    ima_adpcm_tests \
+                    line_model_tests \
+                    logging_tests \
+                    lpc10_tests \
+                    make_g168_css \
+                    make_line_models \
+                    modem_echo_tests \
+                    modem_connect_tones_tests \
+                    noise_tests \
+                    oki_adpcm_tests \
+                    playout_tests \
+                    plc_tests \
+                    power_meter_tests \
+                    r2_mf_rx_tests \
+                    r2_mf_tx_tests \
+                    schedule_tests \
+                    sig_tone_tests \
+                    super_tone_rx_tests \
+                    super_tone_tx_tests \
+                    t4_tests \
+                    t31_tests \
+                    t38_gateway_tests \
+                    t38_gateway_to_terminal_tests \
+                    t38_terminal_tests \
+                    t38_terminal_to_gateway_tests \
+                    time_scale_tests \
+                    tone_generate_tests \
+                    v17_tests \
+                    v22bis_tests \
+                    v27ter_tests \
+                    v29_tests \
+                    v42_tests \
+                    v42bis_tests \
+                    v8_tests \
+                    vector_float_tests \
+                    vector_int_tests \
+                    testadsi \
+                    testfax
+
+noinst_HEADERS =    modem_monitor.h \
+                    echo_monitor.h \
+                    ip_network_model.h \
+                    line_model.h \
+                    line_model_monitor.h \
+                    test_utils.h
+
+adsi_tests_SOURCES = adsi_tests.c
+adsi_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+async_tests_SOURCES = async_tests.c
+async_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+at_interpreter_tests_SOURCES = at_interpreter_tests.c
+at_interpreter_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+awgn_tests_SOURCES = awgn_tests.c
+awgn_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+bell_mf_rx_tests_SOURCES = bell_mf_rx_tests.c
+bell_mf_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+bell_mf_tx_tests_SOURCES = bell_mf_tx_tests.c
+bell_mf_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+bert_tests_SOURCES = bert_tests.c
+bert_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+bit_operations_tests_SOURCES = bit_operations_tests.c
+bit_operations_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+dc_restore_tests_SOURCES = dc_restore_tests.c
+dc_restore_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+dds_tests_SOURCES = dds_tests.c
+dds_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+dtmf_rx_tests_SOURCES = dtmf_rx_tests.c test_utils.c
+dtmf_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+dtmf_tx_tests_SOURCES = dtmf_tx_tests.c
+dtmf_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+echo_tests_SOURCES = echo_tests.c echo_monitor.cpp
+echo_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+fax_decode_SOURCES = fax_decode.c
+fax_decode_LDADD = -L$(top_builddir)/src -lspandsp
+
+fax_tests_SOURCES = fax_tests.c
+fax_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+fsk_tests_SOURCES = fsk_tests.c line_model.c test_utils.c
+fsk_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+g168_tests_SOURCES = g168_tests.c
+g168_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+g711_tests_SOURCES = g711_tests.c
+g711_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+g722_tests_SOURCES = g722_tests.c
+g722_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+g726_tests_SOURCES = g726_tests.c
+g726_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+gsm0610_tests_SOURCES = gsm0610_tests.c
+gsm0610_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+hdlc_tests_SOURCES = hdlc_tests.c
+hdlc_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+ima_adpcm_tests_SOURCES = ima_adpcm_tests.c
+ima_adpcm_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+line_model_tests_SOURCES = line_model_tests.c line_model.c test_utils.c
+line_model_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+logging_tests_SOURCES = logging_tests.c
+logging_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+lpc10_tests_SOURCES = lpc10_tests.c
+lpc10_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+make_g168_css_SOURCES = make_g168_css.c
+make_g168_css_LDADD = -L$(top_builddir)/src -lspandsp
+
+make_line_models_SOURCES = make_line_models.c
+make_line_models_LDADD = -L$(top_builddir)/src -lspandsp
+
+modem_echo_tests_SOURCES = modem_echo_tests.c echo_monitor.cpp
+modem_echo_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+modem_connect_tones_tests_SOURCES = modem_connect_tones_tests.c
+modem_connect_tones_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+noise_tests_SOURCES = noise_tests.c
+noise_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+oki_adpcm_tests_SOURCES = oki_adpcm_tests.c
+oki_adpcm_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+playout_tests_SOURCES = playout_tests.c
+playout_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+plc_tests_SOURCES = plc_tests.c
+plc_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+power_meter_tests_SOURCES = power_meter_tests.c
+power_meter_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+r2_mf_rx_tests_SOURCES = r2_mf_rx_tests.c
+r2_mf_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+r2_mf_tx_tests_SOURCES = r2_mf_tx_tests.c
+r2_mf_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+schedule_tests_SOURCES = schedule_tests.c
+schedule_tests_LDADD = -L$(top_builddir)/src -lspandsp 
+
+sig_tone_tests_SOURCES = sig_tone_tests.c
+sig_tone_tests_LDADD = -L$(top_builddir)/src -lspandsp 
+
+super_tone_rx_tests_SOURCES = super_tone_rx_tests.c
+super_tone_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+super_tone_tx_tests_SOURCES = super_tone_tx_tests.c
+super_tone_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+t4_tests_SOURCES = t4_tests.c
+t4_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+t31_tests_SOURCES = t31_tests.c
+t31_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+t38_gateway_tests_SOURCES = t38_gateway_tests.c ip_network_model.c
+t38_gateway_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+t38_gateway_to_terminal_tests_SOURCES = t38_gateway_to_terminal_tests.c ip_network_model.c
+t38_gateway_to_terminal_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+t38_terminal_tests_SOURCES = t38_terminal_tests.c ip_network_model.c
+t38_terminal_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+t38_terminal_to_gateway_tests_SOURCES = t38_terminal_to_gateway_tests.c ip_network_model.c
+t38_terminal_to_gateway_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+time_scale_tests_SOURCES = time_scale_tests.c
+time_scale_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+tone_generate_tests_SOURCES = tone_generate_tests.c
+tone_generate_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+v17_tests_SOURCES = v17_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v17_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+v22bis_tests_SOURCES = v22bis_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v22bis_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+v27ter_tests_SOURCES = v27ter_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v27ter_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+v29_tests_SOURCES = v29_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v29_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+v42_tests_SOURCES = v42_tests.c
+v42_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+v42bis_tests_SOURCES = v42bis_tests.c
+v42bis_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+v8_tests_SOURCES = v8_tests.c
+v8_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+vector_float_tests_SOURCES = vector_float_tests.c
+vector_float_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+vector_int_tests_SOURCES = vector_int_tests.c
+vector_int_tests_LDADD = -L$(top_builddir)/src -lspandsp
+
+testadsi_SOURCES = testadsi.c
+testadsi_LDADD = -L$(top_builddir)/src -lspandsp
+
+testfax_SOURCES = testfax.c
+testfax_LDADD = -L$(top_builddir)/src -lspandsp
+
+# We need to run make_line_models, so it generates the line_models.h file
+# used by several of the test programs.
+
+line_model.$(OBJEXT): make_line_models$(EXEEXT) line_models.h
+
+line_models.h: make_line_models$(EXEEXT)
+	./make_line_models$(EXEEXT)
+    
+# We need to create the CSS files for echo cancellation tests.
+
+sound_c1_8k.wav sound_c3_8k.wav: make_g168_css$(EXEEXT)
+	./make_g168_css$(EXEEXT)
+	sox sound_c1.wav -r8000 sound_c1_8k.wav
+	sox sound_c3.wav -r8000 sound_c3_8k.wav
+	rm sound_c1.wav sound_c3.wav
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/Makefile.in	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1178 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+SOURCES = $(adsi_tests_SOURCES) $(async_tests_SOURCES) $(at_interpreter_tests_SOURCES) $(awgn_tests_SOURCES) $(bell_mf_rx_tests_SOURCES) $(bell_mf_tx_tests_SOURCES) $(bert_tests_SOURCES) $(bit_operations_tests_SOURCES) $(dc_restore_tests_SOURCES) $(dds_tests_SOURCES) $(dtmf_rx_tests_SOURCES) $(dtmf_tx_tests_SOURCES) $(echo_tests_SOURCES) $(fax_decode_SOURCES) $(fax_tests_SOURCES) $(fsk_tests_SOURCES) $(g168_tests_SOURCES) $(g711_tests_SOURCES) $(g722_tests_SOURCES) $(g726_tests_SOURCES) $(gsm0610_tests_SOURCES) $(hdlc_tests_SOURCES) $(ima_adpcm_tests_SOURCES) $(line_model_tests_SOURCES) $(logging_tests_SOURCES) $(lpc10_tests_SOURCES) $(make_g168_css_SOURCES) $(make_line_models_SOURCES) $(modem_connect_tones_tests_SOURCES) $(modem_echo_tests_SOURCES) $(noise_tests_SOURCES) $(oki_adpcm_tests_SOURCES) $(playout_tests_SOURCES) $(plc_tests_SOURCES) $(power_meter_tests_SOURCES) $(r2_mf_rx_tests_SOURCES) $(r2_mf_tx_tests_SOURCES) $(schedule_tests_SOURCES) $(sig_tone_tests_SOURCES) $(super_tone_rx_tests_SOURCES) $(super_tone_tx_tests_SOURCES) $(t31_tests_SOURCES) $(t38_gateway_tests_SOURCES) $(t38_gateway_to_terminal_tests_SOURCES) $(t38_terminal_tests_SOURCES) $(t38_terminal_to_gateway_tests_SOURCES) $(t4_tests_SOURCES) $(testadsi_SOURCES) $(testfax_SOURCES) $(time_scale_tests_SOURCES) $(tone_generate_tests_SOURCES) $(v17_tests_SOURCES) $(v22bis_tests_SOURCES) $(v27ter_tests_SOURCES) $(v29_tests_SOURCES) $(v42_tests_SOURCES) $(v42bis_tests_SOURCES) $(v8_tests_SOURCES) $(vector_float_tests_SOURCES) $(vector_int_tests_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = adsi_tests$(EXEEXT) async_tests$(EXEEXT) \
+	at_interpreter_tests$(EXEEXT) awgn_tests$(EXEEXT) \
+	bell_mf_rx_tests$(EXEEXT) bell_mf_tx_tests$(EXEEXT) \
+	bert_tests$(EXEEXT) bit_operations_tests$(EXEEXT) \
+	dc_restore_tests$(EXEEXT) dds_tests$(EXEEXT) \
+	dtmf_rx_tests$(EXEEXT) dtmf_tx_tests$(EXEEXT) \
+	echo_tests$(EXEEXT) fax_decode$(EXEEXT) fax_tests$(EXEEXT) \
+	fsk_tests$(EXEEXT) g168_tests$(EXEEXT) g711_tests$(EXEEXT) \
+	g722_tests$(EXEEXT) g726_tests$(EXEEXT) gsm0610_tests$(EXEEXT) \
+	hdlc_tests$(EXEEXT) ima_adpcm_tests$(EXEEXT) \
+	line_model_tests$(EXEEXT) logging_tests$(EXEEXT) \
+	lpc10_tests$(EXEEXT) make_g168_css$(EXEEXT) \
+	make_line_models$(EXEEXT) modem_echo_tests$(EXEEXT) \
+	modem_connect_tones_tests$(EXEEXT) noise_tests$(EXEEXT) \
+	oki_adpcm_tests$(EXEEXT) playout_tests$(EXEEXT) \
+	plc_tests$(EXEEXT) power_meter_tests$(EXEEXT) \
+	r2_mf_rx_tests$(EXEEXT) r2_mf_tx_tests$(EXEEXT) \
+	schedule_tests$(EXEEXT) sig_tone_tests$(EXEEXT) \
+	super_tone_rx_tests$(EXEEXT) super_tone_tx_tests$(EXEEXT) \
+	t4_tests$(EXEEXT) t31_tests$(EXEEXT) \
+	t38_gateway_tests$(EXEEXT) \
+	t38_gateway_to_terminal_tests$(EXEEXT) \
+	t38_terminal_tests$(EXEEXT) \
+	t38_terminal_to_gateway_tests$(EXEEXT) \
+	time_scale_tests$(EXEEXT) tone_generate_tests$(EXEEXT) \
+	v17_tests$(EXEEXT) v22bis_tests$(EXEEXT) v27ter_tests$(EXEEXT) \
+	v29_tests$(EXEEXT) v42_tests$(EXEEXT) v42bis_tests$(EXEEXT) \
+	v8_tests$(EXEEXT) vector_float_tests$(EXEEXT) \
+	vector_int_tests$(EXEEXT) testadsi$(EXEEXT) testfax$(EXEEXT)
+subdir = tests
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_adsi_tests_OBJECTS = adsi_tests.$(OBJEXT)
+adsi_tests_OBJECTS = $(am_adsi_tests_OBJECTS)
+adsi_tests_DEPENDENCIES =
+am_async_tests_OBJECTS = async_tests.$(OBJEXT)
+async_tests_OBJECTS = $(am_async_tests_OBJECTS)
+async_tests_DEPENDENCIES =
+am_at_interpreter_tests_OBJECTS = at_interpreter_tests.$(OBJEXT)
+at_interpreter_tests_OBJECTS = $(am_at_interpreter_tests_OBJECTS)
+at_interpreter_tests_DEPENDENCIES =
+am_awgn_tests_OBJECTS = awgn_tests.$(OBJEXT)
+awgn_tests_OBJECTS = $(am_awgn_tests_OBJECTS)
+awgn_tests_DEPENDENCIES =
+am_bell_mf_rx_tests_OBJECTS = bell_mf_rx_tests.$(OBJEXT)
+bell_mf_rx_tests_OBJECTS = $(am_bell_mf_rx_tests_OBJECTS)
+bell_mf_rx_tests_DEPENDENCIES =
+am_bell_mf_tx_tests_OBJECTS = bell_mf_tx_tests.$(OBJEXT)
+bell_mf_tx_tests_OBJECTS = $(am_bell_mf_tx_tests_OBJECTS)
+bell_mf_tx_tests_DEPENDENCIES =
+am_bert_tests_OBJECTS = bert_tests.$(OBJEXT)
+bert_tests_OBJECTS = $(am_bert_tests_OBJECTS)
+bert_tests_DEPENDENCIES =
+am_bit_operations_tests_OBJECTS = bit_operations_tests.$(OBJEXT)
+bit_operations_tests_OBJECTS = $(am_bit_operations_tests_OBJECTS)
+bit_operations_tests_DEPENDENCIES =
+am_dc_restore_tests_OBJECTS = dc_restore_tests.$(OBJEXT)
+dc_restore_tests_OBJECTS = $(am_dc_restore_tests_OBJECTS)
+dc_restore_tests_DEPENDENCIES =
+am_dds_tests_OBJECTS = dds_tests.$(OBJEXT)
+dds_tests_OBJECTS = $(am_dds_tests_OBJECTS)
+dds_tests_DEPENDENCIES =
+am_dtmf_rx_tests_OBJECTS = dtmf_rx_tests.$(OBJEXT) \
+	test_utils.$(OBJEXT)
+dtmf_rx_tests_OBJECTS = $(am_dtmf_rx_tests_OBJECTS)
+dtmf_rx_tests_DEPENDENCIES =
+am_dtmf_tx_tests_OBJECTS = dtmf_tx_tests.$(OBJEXT)
+dtmf_tx_tests_OBJECTS = $(am_dtmf_tx_tests_OBJECTS)
+dtmf_tx_tests_DEPENDENCIES =
+am_echo_tests_OBJECTS = echo_tests.$(OBJEXT) echo_monitor.$(OBJEXT)
+echo_tests_OBJECTS = $(am_echo_tests_OBJECTS)
+echo_tests_DEPENDENCIES =
+am_fax_decode_OBJECTS = fax_decode.$(OBJEXT)
+fax_decode_OBJECTS = $(am_fax_decode_OBJECTS)
+fax_decode_DEPENDENCIES =
+am_fax_tests_OBJECTS = fax_tests.$(OBJEXT)
+fax_tests_OBJECTS = $(am_fax_tests_OBJECTS)
+fax_tests_DEPENDENCIES =
+am_fsk_tests_OBJECTS = fsk_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT)
+fsk_tests_OBJECTS = $(am_fsk_tests_OBJECTS)
+fsk_tests_DEPENDENCIES =
+am_g168_tests_OBJECTS = g168_tests.$(OBJEXT)
+g168_tests_OBJECTS = $(am_g168_tests_OBJECTS)
+g168_tests_DEPENDENCIES =
+am_g711_tests_OBJECTS = g711_tests.$(OBJEXT)
+g711_tests_OBJECTS = $(am_g711_tests_OBJECTS)
+g711_tests_DEPENDENCIES =
+am_g722_tests_OBJECTS = g722_tests.$(OBJEXT)
+g722_tests_OBJECTS = $(am_g722_tests_OBJECTS)
+g722_tests_DEPENDENCIES =
+am_g726_tests_OBJECTS = g726_tests.$(OBJEXT)
+g726_tests_OBJECTS = $(am_g726_tests_OBJECTS)
+g726_tests_DEPENDENCIES =
+am_gsm0610_tests_OBJECTS = gsm0610_tests.$(OBJEXT)
+gsm0610_tests_OBJECTS = $(am_gsm0610_tests_OBJECTS)
+gsm0610_tests_DEPENDENCIES =
+am_hdlc_tests_OBJECTS = hdlc_tests.$(OBJEXT)
+hdlc_tests_OBJECTS = $(am_hdlc_tests_OBJECTS)
+hdlc_tests_DEPENDENCIES =
+am_ima_adpcm_tests_OBJECTS = ima_adpcm_tests.$(OBJEXT)
+ima_adpcm_tests_OBJECTS = $(am_ima_adpcm_tests_OBJECTS)
+ima_adpcm_tests_DEPENDENCIES =
+am_line_model_tests_OBJECTS = line_model_tests.$(OBJEXT) \
+	line_model.$(OBJEXT) test_utils.$(OBJEXT)
+line_model_tests_OBJECTS = $(am_line_model_tests_OBJECTS)
+line_model_tests_DEPENDENCIES =
+am_logging_tests_OBJECTS = logging_tests.$(OBJEXT)
+logging_tests_OBJECTS = $(am_logging_tests_OBJECTS)
+logging_tests_DEPENDENCIES =
+am_lpc10_tests_OBJECTS = lpc10_tests.$(OBJEXT)
+lpc10_tests_OBJECTS = $(am_lpc10_tests_OBJECTS)
+lpc10_tests_DEPENDENCIES =
+am_make_g168_css_OBJECTS = make_g168_css.$(OBJEXT)
+make_g168_css_OBJECTS = $(am_make_g168_css_OBJECTS)
+make_g168_css_DEPENDENCIES =
+am_make_line_models_OBJECTS = make_line_models.$(OBJEXT)
+make_line_models_OBJECTS = $(am_make_line_models_OBJECTS)
+make_line_models_DEPENDENCIES =
+am_modem_connect_tones_tests_OBJECTS =  \
+	modem_connect_tones_tests.$(OBJEXT)
+modem_connect_tones_tests_OBJECTS =  \
+	$(am_modem_connect_tones_tests_OBJECTS)
+modem_connect_tones_tests_DEPENDENCIES =
+am_modem_echo_tests_OBJECTS = modem_echo_tests.$(OBJEXT) \
+	echo_monitor.$(OBJEXT)
+modem_echo_tests_OBJECTS = $(am_modem_echo_tests_OBJECTS)
+modem_echo_tests_DEPENDENCIES =
+am_noise_tests_OBJECTS = noise_tests.$(OBJEXT)
+noise_tests_OBJECTS = $(am_noise_tests_OBJECTS)
+noise_tests_DEPENDENCIES =
+am_oki_adpcm_tests_OBJECTS = oki_adpcm_tests.$(OBJEXT)
+oki_adpcm_tests_OBJECTS = $(am_oki_adpcm_tests_OBJECTS)
+oki_adpcm_tests_DEPENDENCIES =
+am_playout_tests_OBJECTS = playout_tests.$(OBJEXT)
+playout_tests_OBJECTS = $(am_playout_tests_OBJECTS)
+playout_tests_DEPENDENCIES =
+am_plc_tests_OBJECTS = plc_tests.$(OBJEXT)
+plc_tests_OBJECTS = $(am_plc_tests_OBJECTS)
+plc_tests_DEPENDENCIES =
+am_power_meter_tests_OBJECTS = power_meter_tests.$(OBJEXT)
+power_meter_tests_OBJECTS = $(am_power_meter_tests_OBJECTS)
+power_meter_tests_DEPENDENCIES =
+am_r2_mf_rx_tests_OBJECTS = r2_mf_rx_tests.$(OBJEXT)
+r2_mf_rx_tests_OBJECTS = $(am_r2_mf_rx_tests_OBJECTS)
+r2_mf_rx_tests_DEPENDENCIES =
+am_r2_mf_tx_tests_OBJECTS = r2_mf_tx_tests.$(OBJEXT)
+r2_mf_tx_tests_OBJECTS = $(am_r2_mf_tx_tests_OBJECTS)
+r2_mf_tx_tests_DEPENDENCIES =
+am_schedule_tests_OBJECTS = schedule_tests.$(OBJEXT)
+schedule_tests_OBJECTS = $(am_schedule_tests_OBJECTS)
+schedule_tests_DEPENDENCIES =
+am_sig_tone_tests_OBJECTS = sig_tone_tests.$(OBJEXT)
+sig_tone_tests_OBJECTS = $(am_sig_tone_tests_OBJECTS)
+sig_tone_tests_DEPENDENCIES =
+am_super_tone_rx_tests_OBJECTS = super_tone_rx_tests.$(OBJEXT)
+super_tone_rx_tests_OBJECTS = $(am_super_tone_rx_tests_OBJECTS)
+super_tone_rx_tests_DEPENDENCIES =
+am_super_tone_tx_tests_OBJECTS = super_tone_tx_tests.$(OBJEXT)
+super_tone_tx_tests_OBJECTS = $(am_super_tone_tx_tests_OBJECTS)
+super_tone_tx_tests_DEPENDENCIES =
+am_t31_tests_OBJECTS = t31_tests.$(OBJEXT)
+t31_tests_OBJECTS = $(am_t31_tests_OBJECTS)
+t31_tests_DEPENDENCIES =
+am_t38_gateway_tests_OBJECTS = t38_gateway_tests.$(OBJEXT) \
+	ip_network_model.$(OBJEXT)
+t38_gateway_tests_OBJECTS = $(am_t38_gateway_tests_OBJECTS)
+t38_gateway_tests_DEPENDENCIES =
+am_t38_gateway_to_terminal_tests_OBJECTS =  \
+	t38_gateway_to_terminal_tests.$(OBJEXT) \
+	ip_network_model.$(OBJEXT)
+t38_gateway_to_terminal_tests_OBJECTS =  \
+	$(am_t38_gateway_to_terminal_tests_OBJECTS)
+t38_gateway_to_terminal_tests_DEPENDENCIES =
+am_t38_terminal_tests_OBJECTS = t38_terminal_tests.$(OBJEXT) \
+	ip_network_model.$(OBJEXT)
+t38_terminal_tests_OBJECTS = $(am_t38_terminal_tests_OBJECTS)
+t38_terminal_tests_DEPENDENCIES =
+am_t38_terminal_to_gateway_tests_OBJECTS =  \
+	t38_terminal_to_gateway_tests.$(OBJEXT) \
+	ip_network_model.$(OBJEXT)
+t38_terminal_to_gateway_tests_OBJECTS =  \
+	$(am_t38_terminal_to_gateway_tests_OBJECTS)
+t38_terminal_to_gateway_tests_DEPENDENCIES =
+am_t4_tests_OBJECTS = t4_tests.$(OBJEXT)
+t4_tests_OBJECTS = $(am_t4_tests_OBJECTS)
+t4_tests_DEPENDENCIES =
+am_testadsi_OBJECTS = testadsi.$(OBJEXT)
+testadsi_OBJECTS = $(am_testadsi_OBJECTS)
+testadsi_DEPENDENCIES =
+am_testfax_OBJECTS = testfax.$(OBJEXT)
+testfax_OBJECTS = $(am_testfax_OBJECTS)
+testfax_DEPENDENCIES =
+am_time_scale_tests_OBJECTS = time_scale_tests.$(OBJEXT)
+time_scale_tests_OBJECTS = $(am_time_scale_tests_OBJECTS)
+time_scale_tests_DEPENDENCIES =
+am_tone_generate_tests_OBJECTS = tone_generate_tests.$(OBJEXT)
+tone_generate_tests_OBJECTS = $(am_tone_generate_tests_OBJECTS)
+tone_generate_tests_DEPENDENCIES =
+am_v17_tests_OBJECTS = v17_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT) line_model_monitor.$(OBJEXT) \
+	modem_monitor.$(OBJEXT)
+v17_tests_OBJECTS = $(am_v17_tests_OBJECTS)
+v17_tests_DEPENDENCIES =
+am_v22bis_tests_OBJECTS = v22bis_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT) line_model_monitor.$(OBJEXT) \
+	modem_monitor.$(OBJEXT)
+v22bis_tests_OBJECTS = $(am_v22bis_tests_OBJECTS)
+v22bis_tests_DEPENDENCIES =
+am_v27ter_tests_OBJECTS = v27ter_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT) line_model_monitor.$(OBJEXT) \
+	modem_monitor.$(OBJEXT)
+v27ter_tests_OBJECTS = $(am_v27ter_tests_OBJECTS)
+v27ter_tests_DEPENDENCIES =
+am_v29_tests_OBJECTS = v29_tests.$(OBJEXT) line_model.$(OBJEXT) \
+	test_utils.$(OBJEXT) line_model_monitor.$(OBJEXT) \
+	modem_monitor.$(OBJEXT)
+v29_tests_OBJECTS = $(am_v29_tests_OBJECTS)
+v29_tests_DEPENDENCIES =
+am_v42_tests_OBJECTS = v42_tests.$(OBJEXT)
+v42_tests_OBJECTS = $(am_v42_tests_OBJECTS)
+v42_tests_DEPENDENCIES =
+am_v42bis_tests_OBJECTS = v42bis_tests.$(OBJEXT)
+v42bis_tests_OBJECTS = $(am_v42bis_tests_OBJECTS)
+v42bis_tests_DEPENDENCIES =
+am_v8_tests_OBJECTS = v8_tests.$(OBJEXT)
+v8_tests_OBJECTS = $(am_v8_tests_OBJECTS)
+v8_tests_DEPENDENCIES =
+am_vector_float_tests_OBJECTS = vector_float_tests.$(OBJEXT)
+vector_float_tests_OBJECTS = $(am_vector_float_tests_OBJECTS)
+vector_float_tests_DEPENDENCIES =
+am_vector_int_tests_OBJECTS = vector_int_tests.$(OBJEXT)
+vector_int_tests_OBJECTS = $(am_vector_int_tests_OBJECTS)
+vector_int_tests_DEPENDENCIES =
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(adsi_tests_SOURCES) $(async_tests_SOURCES) \
+	$(at_interpreter_tests_SOURCES) $(awgn_tests_SOURCES) \
+	$(bell_mf_rx_tests_SOURCES) $(bell_mf_tx_tests_SOURCES) \
+	$(bert_tests_SOURCES) $(bit_operations_tests_SOURCES) \
+	$(dc_restore_tests_SOURCES) $(dds_tests_SOURCES) \
+	$(dtmf_rx_tests_SOURCES) $(dtmf_tx_tests_SOURCES) \
+	$(echo_tests_SOURCES) $(fax_decode_SOURCES) \
+	$(fax_tests_SOURCES) $(fsk_tests_SOURCES) \
+	$(g168_tests_SOURCES) $(g711_tests_SOURCES) \
+	$(g722_tests_SOURCES) $(g726_tests_SOURCES) \
+	$(gsm0610_tests_SOURCES) $(hdlc_tests_SOURCES) \
+	$(ima_adpcm_tests_SOURCES) $(line_model_tests_SOURCES) \
+	$(logging_tests_SOURCES) $(lpc10_tests_SOURCES) \
+	$(make_g168_css_SOURCES) $(make_line_models_SOURCES) \
+	$(modem_connect_tones_tests_SOURCES) \
+	$(modem_echo_tests_SOURCES) $(noise_tests_SOURCES) \
+	$(oki_adpcm_tests_SOURCES) $(playout_tests_SOURCES) \
+	$(plc_tests_SOURCES) $(power_meter_tests_SOURCES) \
+	$(r2_mf_rx_tests_SOURCES) $(r2_mf_tx_tests_SOURCES) \
+	$(schedule_tests_SOURCES) $(sig_tone_tests_SOURCES) \
+	$(super_tone_rx_tests_SOURCES) $(super_tone_tx_tests_SOURCES) \
+	$(t31_tests_SOURCES) $(t38_gateway_tests_SOURCES) \
+	$(t38_gateway_to_terminal_tests_SOURCES) \
+	$(t38_terminal_tests_SOURCES) \
+	$(t38_terminal_to_gateway_tests_SOURCES) $(t4_tests_SOURCES) \
+	$(testadsi_SOURCES) $(testfax_SOURCES) \
+	$(time_scale_tests_SOURCES) $(tone_generate_tests_SOURCES) \
+	$(v17_tests_SOURCES) $(v22bis_tests_SOURCES) \
+	$(v27ter_tests_SOURCES) $(v29_tests_SOURCES) \
+	$(v42_tests_SOURCES) $(v42bis_tests_SOURCES) \
+	$(v8_tests_SOURCES) $(vector_float_tests_SOURCES) \
+	$(vector_int_tests_SOURCES)
+DIST_SOURCES = $(adsi_tests_SOURCES) $(async_tests_SOURCES) \
+	$(at_interpreter_tests_SOURCES) $(awgn_tests_SOURCES) \
+	$(bell_mf_rx_tests_SOURCES) $(bell_mf_tx_tests_SOURCES) \
+	$(bert_tests_SOURCES) $(bit_operations_tests_SOURCES) \
+	$(dc_restore_tests_SOURCES) $(dds_tests_SOURCES) \
+	$(dtmf_rx_tests_SOURCES) $(dtmf_tx_tests_SOURCES) \
+	$(echo_tests_SOURCES) $(fax_decode_SOURCES) \
+	$(fax_tests_SOURCES) $(fsk_tests_SOURCES) \
+	$(g168_tests_SOURCES) $(g711_tests_SOURCES) \
+	$(g722_tests_SOURCES) $(g726_tests_SOURCES) \
+	$(gsm0610_tests_SOURCES) $(hdlc_tests_SOURCES) \
+	$(ima_adpcm_tests_SOURCES) $(line_model_tests_SOURCES) \
+	$(logging_tests_SOURCES) $(lpc10_tests_SOURCES) \
+	$(make_g168_css_SOURCES) $(make_line_models_SOURCES) \
+	$(modem_connect_tones_tests_SOURCES) \
+	$(modem_echo_tests_SOURCES) $(noise_tests_SOURCES) \
+	$(oki_adpcm_tests_SOURCES) $(playout_tests_SOURCES) \
+	$(plc_tests_SOURCES) $(power_meter_tests_SOURCES) \
+	$(r2_mf_rx_tests_SOURCES) $(r2_mf_tx_tests_SOURCES) \
+	$(schedule_tests_SOURCES) $(sig_tone_tests_SOURCES) \
+	$(super_tone_rx_tests_SOURCES) $(super_tone_tx_tests_SOURCES) \
+	$(t31_tests_SOURCES) $(t38_gateway_tests_SOURCES) \
+	$(t38_gateway_to_terminal_tests_SOURCES) \
+	$(t38_terminal_tests_SOURCES) \
+	$(t38_terminal_to_gateway_tests_SOURCES) $(t4_tests_SOURCES) \
+	$(testadsi_SOURCES) $(testfax_SOURCES) \
+	$(time_scale_tests_SOURCES) $(tone_generate_tests_SOURCES) \
+	$(v17_tests_SOURCES) $(v22bis_tests_SOURCES) \
+	$(v27ter_tests_SOURCES) $(v29_tests_SOURCES) \
+	$(v42_tests_SOURCES) $(v42bis_tests_SOURCES) \
+	$(v8_tests_SOURCES) $(vector_float_tests_SOURCES) \
+	$(vector_int_tests_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(datadir)"
+nobase_dataDATA_INSTALL = $(install_sh_DATA)
+DATA = $(nobase_data_DATA)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMP_VENDOR_CFLAGS = @COMP_VENDOR_CFLAGS@
+COND_DOC_FALSE = @COND_DOC_FALSE@
+COND_DOC_TRUE = @COND_DOC_TRUE@
+COND_ITUTESTS_FALSE = @COND_ITUTESTS_FALSE@
+COND_ITUTESTS_TRUE = @COND_ITUTESTS_TRUE@
+COND_MMX_FALSE = @COND_MMX_FALSE@
+COND_MMX_TRUE = @COND_MMX_TRUE@
+COND_SSE_FALSE = @COND_SSE_FALSE@
+COND_SSE_TRUE = @COND_SSE_TRUE@
+COND_TESTS_FALSE = @COND_TESTS_FALSE@
+COND_TESTS_TRUE = @COND_TESTS_TRUE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@ $(TESTLIBS)
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPANDSP_LT_AGE = @SPANDSP_LT_AGE@
+SPANDSP_LT_CURRENT = @SPANDSP_LT_CURRENT@
+SPANDSP_LT_REVISION = @SPANDSP_LT_REVISION@
+STRIP = @STRIP@
+TESTLIBS = @TESTLIBS@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
+nobase_data_DATA = sound_c1_8k.wav sound_c3_8k.wav
+EXTRA_DIST = regression_tests.sh v42bis_tests.sh fax_tests.sh
+MAINTAINERCLEANFILES = Makefile.in
+INCLUDES = -I$(top_builddir)/src -DDATADIR="\"$(pkgdatadir)\""
+noinst_HEADERS = modem_monitor.h \
+                    echo_monitor.h \
+                    ip_network_model.h \
+                    line_model.h \
+                    line_model_monitor.h \
+                    test_utils.h
+
+adsi_tests_SOURCES = adsi_tests.c
+adsi_tests_LDADD = -L$(top_builddir)/src -lspandsp
+async_tests_SOURCES = async_tests.c
+async_tests_LDADD = -L$(top_builddir)/src -lspandsp
+at_interpreter_tests_SOURCES = at_interpreter_tests.c
+at_interpreter_tests_LDADD = -L$(top_builddir)/src -lspandsp
+awgn_tests_SOURCES = awgn_tests.c
+awgn_tests_LDADD = -L$(top_builddir)/src -lspandsp
+bell_mf_rx_tests_SOURCES = bell_mf_rx_tests.c
+bell_mf_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+bell_mf_tx_tests_SOURCES = bell_mf_tx_tests.c
+bell_mf_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+bert_tests_SOURCES = bert_tests.c
+bert_tests_LDADD = -L$(top_builddir)/src -lspandsp
+bit_operations_tests_SOURCES = bit_operations_tests.c
+bit_operations_tests_LDADD = -L$(top_builddir)/src -lspandsp
+dc_restore_tests_SOURCES = dc_restore_tests.c
+dc_restore_tests_LDADD = -L$(top_builddir)/src -lspandsp
+dds_tests_SOURCES = dds_tests.c
+dds_tests_LDADD = -L$(top_builddir)/src -lspandsp
+dtmf_rx_tests_SOURCES = dtmf_rx_tests.c test_utils.c
+dtmf_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+dtmf_tx_tests_SOURCES = dtmf_tx_tests.c
+dtmf_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+echo_tests_SOURCES = echo_tests.c echo_monitor.cpp
+echo_tests_LDADD = -L$(top_builddir)/src -lspandsp
+fax_decode_SOURCES = fax_decode.c
+fax_decode_LDADD = -L$(top_builddir)/src -lspandsp
+fax_tests_SOURCES = fax_tests.c
+fax_tests_LDADD = -L$(top_builddir)/src -lspandsp
+fsk_tests_SOURCES = fsk_tests.c line_model.c test_utils.c
+fsk_tests_LDADD = -L$(top_builddir)/src -lspandsp
+g168_tests_SOURCES = g168_tests.c
+g168_tests_LDADD = -L$(top_builddir)/src -lspandsp
+g711_tests_SOURCES = g711_tests.c
+g711_tests_LDADD = -L$(top_builddir)/src -lspandsp
+g722_tests_SOURCES = g722_tests.c
+g722_tests_LDADD = -L$(top_builddir)/src -lspandsp
+g726_tests_SOURCES = g726_tests.c
+g726_tests_LDADD = -L$(top_builddir)/src -lspandsp
+gsm0610_tests_SOURCES = gsm0610_tests.c
+gsm0610_tests_LDADD = -L$(top_builddir)/src -lspandsp
+hdlc_tests_SOURCES = hdlc_tests.c
+hdlc_tests_LDADD = -L$(top_builddir)/src -lspandsp
+ima_adpcm_tests_SOURCES = ima_adpcm_tests.c
+ima_adpcm_tests_LDADD = -L$(top_builddir)/src -lspandsp
+line_model_tests_SOURCES = line_model_tests.c line_model.c test_utils.c
+line_model_tests_LDADD = -L$(top_builddir)/src -lspandsp
+logging_tests_SOURCES = logging_tests.c
+logging_tests_LDADD = -L$(top_builddir)/src -lspandsp
+lpc10_tests_SOURCES = lpc10_tests.c
+lpc10_tests_LDADD = -L$(top_builddir)/src -lspandsp
+make_g168_css_SOURCES = make_g168_css.c
+make_g168_css_LDADD = -L$(top_builddir)/src -lspandsp
+make_line_models_SOURCES = make_line_models.c
+make_line_models_LDADD = -L$(top_builddir)/src -lspandsp
+modem_echo_tests_SOURCES = modem_echo_tests.c echo_monitor.cpp
+modem_echo_tests_LDADD = -L$(top_builddir)/src -lspandsp
+modem_connect_tones_tests_SOURCES = modem_connect_tones_tests.c
+modem_connect_tones_tests_LDADD = -L$(top_builddir)/src -lspandsp
+noise_tests_SOURCES = noise_tests.c
+noise_tests_LDADD = -L$(top_builddir)/src -lspandsp
+oki_adpcm_tests_SOURCES = oki_adpcm_tests.c
+oki_adpcm_tests_LDADD = -L$(top_builddir)/src -lspandsp
+playout_tests_SOURCES = playout_tests.c
+playout_tests_LDADD = -L$(top_builddir)/src -lspandsp
+plc_tests_SOURCES = plc_tests.c
+plc_tests_LDADD = -L$(top_builddir)/src -lspandsp
+power_meter_tests_SOURCES = power_meter_tests.c
+power_meter_tests_LDADD = -L$(top_builddir)/src -lspandsp
+r2_mf_rx_tests_SOURCES = r2_mf_rx_tests.c
+r2_mf_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+r2_mf_tx_tests_SOURCES = r2_mf_tx_tests.c
+r2_mf_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+schedule_tests_SOURCES = schedule_tests.c
+schedule_tests_LDADD = -L$(top_builddir)/src -lspandsp 
+sig_tone_tests_SOURCES = sig_tone_tests.c
+sig_tone_tests_LDADD = -L$(top_builddir)/src -lspandsp 
+super_tone_rx_tests_SOURCES = super_tone_rx_tests.c
+super_tone_rx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+super_tone_tx_tests_SOURCES = super_tone_tx_tests.c
+super_tone_tx_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t4_tests_SOURCES = t4_tests.c
+t4_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t31_tests_SOURCES = t31_tests.c
+t31_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t38_gateway_tests_SOURCES = t38_gateway_tests.c ip_network_model.c
+t38_gateway_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t38_gateway_to_terminal_tests_SOURCES = t38_gateway_to_terminal_tests.c ip_network_model.c
+t38_gateway_to_terminal_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t38_terminal_tests_SOURCES = t38_terminal_tests.c ip_network_model.c
+t38_terminal_tests_LDADD = -L$(top_builddir)/src -lspandsp
+t38_terminal_to_gateway_tests_SOURCES = t38_terminal_to_gateway_tests.c ip_network_model.c
+t38_terminal_to_gateway_tests_LDADD = -L$(top_builddir)/src -lspandsp
+time_scale_tests_SOURCES = time_scale_tests.c
+time_scale_tests_LDADD = -L$(top_builddir)/src -lspandsp
+tone_generate_tests_SOURCES = tone_generate_tests.c
+tone_generate_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v17_tests_SOURCES = v17_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v17_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v22bis_tests_SOURCES = v22bis_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v22bis_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v27ter_tests_SOURCES = v27ter_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v27ter_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v29_tests_SOURCES = v29_tests.c line_model.c test_utils.c line_model_monitor.cpp modem_monitor.cpp
+v29_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v42_tests_SOURCES = v42_tests.c
+v42_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v42bis_tests_SOURCES = v42bis_tests.c
+v42bis_tests_LDADD = -L$(top_builddir)/src -lspandsp
+v8_tests_SOURCES = v8_tests.c
+v8_tests_LDADD = -L$(top_builddir)/src -lspandsp
+vector_float_tests_SOURCES = vector_float_tests.c
+vector_float_tests_LDADD = -L$(top_builddir)/src -lspandsp
+vector_int_tests_SOURCES = vector_int_tests.c
+vector_int_tests_LDADD = -L$(top_builddir)/src -lspandsp
+testadsi_SOURCES = testadsi.c
+testadsi_LDADD = -L$(top_builddir)/src -lspandsp
+testfax_SOURCES = testfax.c
+testfax_LDADD = -L$(top_builddir)/src -lspandsp
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+adsi_tests$(EXEEXT): $(adsi_tests_OBJECTS) $(adsi_tests_DEPENDENCIES) 
+	@rm -f adsi_tests$(EXEEXT)
+	$(LINK) $(adsi_tests_LDFLAGS) $(adsi_tests_OBJECTS) $(adsi_tests_LDADD) $(LIBS)
+async_tests$(EXEEXT): $(async_tests_OBJECTS) $(async_tests_DEPENDENCIES) 
+	@rm -f async_tests$(EXEEXT)
+	$(LINK) $(async_tests_LDFLAGS) $(async_tests_OBJECTS) $(async_tests_LDADD) $(LIBS)
+at_interpreter_tests$(EXEEXT): $(at_interpreter_tests_OBJECTS) $(at_interpreter_tests_DEPENDENCIES) 
+	@rm -f at_interpreter_tests$(EXEEXT)
+	$(LINK) $(at_interpreter_tests_LDFLAGS) $(at_interpreter_tests_OBJECTS) $(at_interpreter_tests_LDADD) $(LIBS)
+awgn_tests$(EXEEXT): $(awgn_tests_OBJECTS) $(awgn_tests_DEPENDENCIES) 
+	@rm -f awgn_tests$(EXEEXT)
+	$(LINK) $(awgn_tests_LDFLAGS) $(awgn_tests_OBJECTS) $(awgn_tests_LDADD) $(LIBS)
+bell_mf_rx_tests$(EXEEXT): $(bell_mf_rx_tests_OBJECTS) $(bell_mf_rx_tests_DEPENDENCIES) 
+	@rm -f bell_mf_rx_tests$(EXEEXT)
+	$(LINK) $(bell_mf_rx_tests_LDFLAGS) $(bell_mf_rx_tests_OBJECTS) $(bell_mf_rx_tests_LDADD) $(LIBS)
+bell_mf_tx_tests$(EXEEXT): $(bell_mf_tx_tests_OBJECTS) $(bell_mf_tx_tests_DEPENDENCIES) 
+	@rm -f bell_mf_tx_tests$(EXEEXT)
+	$(LINK) $(bell_mf_tx_tests_LDFLAGS) $(bell_mf_tx_tests_OBJECTS) $(bell_mf_tx_tests_LDADD) $(LIBS)
+bert_tests$(EXEEXT): $(bert_tests_OBJECTS) $(bert_tests_DEPENDENCIES) 
+	@rm -f bert_tests$(EXEEXT)
+	$(LINK) $(bert_tests_LDFLAGS) $(bert_tests_OBJECTS) $(bert_tests_LDADD) $(LIBS)
+bit_operations_tests$(EXEEXT): $(bit_operations_tests_OBJECTS) $(bit_operations_tests_DEPENDENCIES) 
+	@rm -f bit_operations_tests$(EXEEXT)
+	$(LINK) $(bit_operations_tests_LDFLAGS) $(bit_operations_tests_OBJECTS) $(bit_operations_tests_LDADD) $(LIBS)
+dc_restore_tests$(EXEEXT): $(dc_restore_tests_OBJECTS) $(dc_restore_tests_DEPENDENCIES) 
+	@rm -f dc_restore_tests$(EXEEXT)
+	$(LINK) $(dc_restore_tests_LDFLAGS) $(dc_restore_tests_OBJECTS) $(dc_restore_tests_LDADD) $(LIBS)
+dds_tests$(EXEEXT): $(dds_tests_OBJECTS) $(dds_tests_DEPENDENCIES) 
+	@rm -f dds_tests$(EXEEXT)
+	$(LINK) $(dds_tests_LDFLAGS) $(dds_tests_OBJECTS) $(dds_tests_LDADD) $(LIBS)
+dtmf_rx_tests$(EXEEXT): $(dtmf_rx_tests_OBJECTS) $(dtmf_rx_tests_DEPENDENCIES) 
+	@rm -f dtmf_rx_tests$(EXEEXT)
+	$(LINK) $(dtmf_rx_tests_LDFLAGS) $(dtmf_rx_tests_OBJECTS) $(dtmf_rx_tests_LDADD) $(LIBS)
+dtmf_tx_tests$(EXEEXT): $(dtmf_tx_tests_OBJECTS) $(dtmf_tx_tests_DEPENDENCIES) 
+	@rm -f dtmf_tx_tests$(EXEEXT)
+	$(LINK) $(dtmf_tx_tests_LDFLAGS) $(dtmf_tx_tests_OBJECTS) $(dtmf_tx_tests_LDADD) $(LIBS)
+echo_tests$(EXEEXT): $(echo_tests_OBJECTS) $(echo_tests_DEPENDENCIES) 
+	@rm -f echo_tests$(EXEEXT)
+	$(CXXLINK) $(echo_tests_LDFLAGS) $(echo_tests_OBJECTS) $(echo_tests_LDADD) $(LIBS)
+fax_decode$(EXEEXT): $(fax_decode_OBJECTS) $(fax_decode_DEPENDENCIES) 
+	@rm -f fax_decode$(EXEEXT)
+	$(LINK) $(fax_decode_LDFLAGS) $(fax_decode_OBJECTS) $(fax_decode_LDADD) $(LIBS)
+fax_tests$(EXEEXT): $(fax_tests_OBJECTS) $(fax_tests_DEPENDENCIES) 
+	@rm -f fax_tests$(EXEEXT)
+	$(LINK) $(fax_tests_LDFLAGS) $(fax_tests_OBJECTS) $(fax_tests_LDADD) $(LIBS)
+fsk_tests$(EXEEXT): $(fsk_tests_OBJECTS) $(fsk_tests_DEPENDENCIES) 
+	@rm -f fsk_tests$(EXEEXT)
+	$(LINK) $(fsk_tests_LDFLAGS) $(fsk_tests_OBJECTS) $(fsk_tests_LDADD) $(LIBS)
+g168_tests$(EXEEXT): $(g168_tests_OBJECTS) $(g168_tests_DEPENDENCIES) 
+	@rm -f g168_tests$(EXEEXT)
+	$(LINK) $(g168_tests_LDFLAGS) $(g168_tests_OBJECTS) $(g168_tests_LDADD) $(LIBS)
+g711_tests$(EXEEXT): $(g711_tests_OBJECTS) $(g711_tests_DEPENDENCIES) 
+	@rm -f g711_tests$(EXEEXT)
+	$(LINK) $(g711_tests_LDFLAGS) $(g711_tests_OBJECTS) $(g711_tests_LDADD) $(LIBS)
+g722_tests$(EXEEXT): $(g722_tests_OBJECTS) $(g722_tests_DEPENDENCIES) 
+	@rm -f g722_tests$(EXEEXT)
+	$(LINK) $(g722_tests_LDFLAGS) $(g722_tests_OBJECTS) $(g722_tests_LDADD) $(LIBS)
+g726_tests$(EXEEXT): $(g726_tests_OBJECTS) $(g726_tests_DEPENDENCIES) 
+	@rm -f g726_tests$(EXEEXT)
+	$(LINK) $(g726_tests_LDFLAGS) $(g726_tests_OBJECTS) $(g726_tests_LDADD) $(LIBS)
+gsm0610_tests$(EXEEXT): $(gsm0610_tests_OBJECTS) $(gsm0610_tests_DEPENDENCIES) 
+	@rm -f gsm0610_tests$(EXEEXT)
+	$(LINK) $(gsm0610_tests_LDFLAGS) $(gsm0610_tests_OBJECTS) $(gsm0610_tests_LDADD) $(LIBS)
+hdlc_tests$(EXEEXT): $(hdlc_tests_OBJECTS) $(hdlc_tests_DEPENDENCIES) 
+	@rm -f hdlc_tests$(EXEEXT)
+	$(LINK) $(hdlc_tests_LDFLAGS) $(hdlc_tests_OBJECTS) $(hdlc_tests_LDADD) $(LIBS)
+ima_adpcm_tests$(EXEEXT): $(ima_adpcm_tests_OBJECTS) $(ima_adpcm_tests_DEPENDENCIES) 
+	@rm -f ima_adpcm_tests$(EXEEXT)
+	$(LINK) $(ima_adpcm_tests_LDFLAGS) $(ima_adpcm_tests_OBJECTS) $(ima_adpcm_tests_LDADD) $(LIBS)
+line_model_tests$(EXEEXT): $(line_model_tests_OBJECTS) $(line_model_tests_DEPENDENCIES) 
+	@rm -f line_model_tests$(EXEEXT)
+	$(LINK) $(line_model_tests_LDFLAGS) $(line_model_tests_OBJECTS) $(line_model_tests_LDADD) $(LIBS)
+logging_tests$(EXEEXT): $(logging_tests_OBJECTS) $(logging_tests_DEPENDENCIES) 
+	@rm -f logging_tests$(EXEEXT)
+	$(LINK) $(logging_tests_LDFLAGS) $(logging_tests_OBJECTS) $(logging_tests_LDADD) $(LIBS)
+lpc10_tests$(EXEEXT): $(lpc10_tests_OBJECTS) $(lpc10_tests_DEPENDENCIES) 
+	@rm -f lpc10_tests$(EXEEXT)
+	$(LINK) $(lpc10_tests_LDFLAGS) $(lpc10_tests_OBJECTS) $(lpc10_tests_LDADD) $(LIBS)
+make_g168_css$(EXEEXT): $(make_g168_css_OBJECTS) $(make_g168_css_DEPENDENCIES) 
+	@rm -f make_g168_css$(EXEEXT)
+	$(LINK) $(make_g168_css_LDFLAGS) $(make_g168_css_OBJECTS) $(make_g168_css_LDADD) $(LIBS)
+make_line_models$(EXEEXT): $(make_line_models_OBJECTS) $(make_line_models_DEPENDENCIES) 
+	@rm -f make_line_models$(EXEEXT)
+	$(LINK) $(make_line_models_LDFLAGS) $(make_line_models_OBJECTS) $(make_line_models_LDADD) $(LIBS)
+modem_connect_tones_tests$(EXEEXT): $(modem_connect_tones_tests_OBJECTS) $(modem_connect_tones_tests_DEPENDENCIES) 
+	@rm -f modem_connect_tones_tests$(EXEEXT)
+	$(LINK) $(modem_connect_tones_tests_LDFLAGS) $(modem_connect_tones_tests_OBJECTS) $(modem_connect_tones_tests_LDADD) $(LIBS)
+modem_echo_tests$(EXEEXT): $(modem_echo_tests_OBJECTS) $(modem_echo_tests_DEPENDENCIES) 
+	@rm -f modem_echo_tests$(EXEEXT)
+	$(CXXLINK) $(modem_echo_tests_LDFLAGS) $(modem_echo_tests_OBJECTS) $(modem_echo_tests_LDADD) $(LIBS)
+noise_tests$(EXEEXT): $(noise_tests_OBJECTS) $(noise_tests_DEPENDENCIES) 
+	@rm -f noise_tests$(EXEEXT)
+	$(LINK) $(noise_tests_LDFLAGS) $(noise_tests_OBJECTS) $(noise_tests_LDADD) $(LIBS)
+oki_adpcm_tests$(EXEEXT): $(oki_adpcm_tests_OBJECTS) $(oki_adpcm_tests_DEPENDENCIES) 
+	@rm -f oki_adpcm_tests$(EXEEXT)
+	$(LINK) $(oki_adpcm_tests_LDFLAGS) $(oki_adpcm_tests_OBJECTS) $(oki_adpcm_tests_LDADD) $(LIBS)
+playout_tests$(EXEEXT): $(playout_tests_OBJECTS) $(playout_tests_DEPENDENCIES) 
+	@rm -f playout_tests$(EXEEXT)
+	$(LINK) $(playout_tests_LDFLAGS) $(playout_tests_OBJECTS) $(playout_tests_LDADD) $(LIBS)
+plc_tests$(EXEEXT): $(plc_tests_OBJECTS) $(plc_tests_DEPENDENCIES) 
+	@rm -f plc_tests$(EXEEXT)
+	$(LINK) $(plc_tests_LDFLAGS) $(plc_tests_OBJECTS) $(plc_tests_LDADD) $(LIBS)
+power_meter_tests$(EXEEXT): $(power_meter_tests_OBJECTS) $(power_meter_tests_DEPENDENCIES) 
+	@rm -f power_meter_tests$(EXEEXT)
+	$(LINK) $(power_meter_tests_LDFLAGS) $(power_meter_tests_OBJECTS) $(power_meter_tests_LDADD) $(LIBS)
+r2_mf_rx_tests$(EXEEXT): $(r2_mf_rx_tests_OBJECTS) $(r2_mf_rx_tests_DEPENDENCIES) 
+	@rm -f r2_mf_rx_tests$(EXEEXT)
+	$(LINK) $(r2_mf_rx_tests_LDFLAGS) $(r2_mf_rx_tests_OBJECTS) $(r2_mf_rx_tests_LDADD) $(LIBS)
+r2_mf_tx_tests$(EXEEXT): $(r2_mf_tx_tests_OBJECTS) $(r2_mf_tx_tests_DEPENDENCIES) 
+	@rm -f r2_mf_tx_tests$(EXEEXT)
+	$(LINK) $(r2_mf_tx_tests_LDFLAGS) $(r2_mf_tx_tests_OBJECTS) $(r2_mf_tx_tests_LDADD) $(LIBS)
+schedule_tests$(EXEEXT): $(schedule_tests_OBJECTS) $(schedule_tests_DEPENDENCIES) 
+	@rm -f schedule_tests$(EXEEXT)
+	$(LINK) $(schedule_tests_LDFLAGS) $(schedule_tests_OBJECTS) $(schedule_tests_LDADD) $(LIBS)
+sig_tone_tests$(EXEEXT): $(sig_tone_tests_OBJECTS) $(sig_tone_tests_DEPENDENCIES) 
+	@rm -f sig_tone_tests$(EXEEXT)
+	$(LINK) $(sig_tone_tests_LDFLAGS) $(sig_tone_tests_OBJECTS) $(sig_tone_tests_LDADD) $(LIBS)
+super_tone_rx_tests$(EXEEXT): $(super_tone_rx_tests_OBJECTS) $(super_tone_rx_tests_DEPENDENCIES) 
+	@rm -f super_tone_rx_tests$(EXEEXT)
+	$(LINK) $(super_tone_rx_tests_LDFLAGS) $(super_tone_rx_tests_OBJECTS) $(super_tone_rx_tests_LDADD) $(LIBS)
+super_tone_tx_tests$(EXEEXT): $(super_tone_tx_tests_OBJECTS) $(super_tone_tx_tests_DEPENDENCIES) 
+	@rm -f super_tone_tx_tests$(EXEEXT)
+	$(LINK) $(super_tone_tx_tests_LDFLAGS) $(super_tone_tx_tests_OBJECTS) $(super_tone_tx_tests_LDADD) $(LIBS)
+t31_tests$(EXEEXT): $(t31_tests_OBJECTS) $(t31_tests_DEPENDENCIES) 
+	@rm -f t31_tests$(EXEEXT)
+	$(LINK) $(t31_tests_LDFLAGS) $(t31_tests_OBJECTS) $(t31_tests_LDADD) $(LIBS)
+t38_gateway_tests$(EXEEXT): $(t38_gateway_tests_OBJECTS) $(t38_gateway_tests_DEPENDENCIES) 
+	@rm -f t38_gateway_tests$(EXEEXT)
+	$(LINK) $(t38_gateway_tests_LDFLAGS) $(t38_gateway_tests_OBJECTS) $(t38_gateway_tests_LDADD) $(LIBS)
+t38_gateway_to_terminal_tests$(EXEEXT): $(t38_gateway_to_terminal_tests_OBJECTS) $(t38_gateway_to_terminal_tests_DEPENDENCIES) 
+	@rm -f t38_gateway_to_terminal_tests$(EXEEXT)
+	$(LINK) $(t38_gateway_to_terminal_tests_LDFLAGS) $(t38_gateway_to_terminal_tests_OBJECTS) $(t38_gateway_to_terminal_tests_LDADD) $(LIBS)
+t38_terminal_tests$(EXEEXT): $(t38_terminal_tests_OBJECTS) $(t38_terminal_tests_DEPENDENCIES) 
+	@rm -f t38_terminal_tests$(EXEEXT)
+	$(LINK) $(t38_terminal_tests_LDFLAGS) $(t38_terminal_tests_OBJECTS) $(t38_terminal_tests_LDADD) $(LIBS)
+t38_terminal_to_gateway_tests$(EXEEXT): $(t38_terminal_to_gateway_tests_OBJECTS) $(t38_terminal_to_gateway_tests_DEPENDENCIES) 
+	@rm -f t38_terminal_to_gateway_tests$(EXEEXT)
+	$(LINK) $(t38_terminal_to_gateway_tests_LDFLAGS) $(t38_terminal_to_gateway_tests_OBJECTS) $(t38_terminal_to_gateway_tests_LDADD) $(LIBS)
+t4_tests$(EXEEXT): $(t4_tests_OBJECTS) $(t4_tests_DEPENDENCIES) 
+	@rm -f t4_tests$(EXEEXT)
+	$(LINK) $(t4_tests_LDFLAGS) $(t4_tests_OBJECTS) $(t4_tests_LDADD) $(LIBS)
+testadsi$(EXEEXT): $(testadsi_OBJECTS) $(testadsi_DEPENDENCIES) 
+	@rm -f testadsi$(EXEEXT)
+	$(LINK) $(testadsi_LDFLAGS) $(testadsi_OBJECTS) $(testadsi_LDADD) $(LIBS)
+testfax$(EXEEXT): $(testfax_OBJECTS) $(testfax_DEPENDENCIES) 
+	@rm -f testfax$(EXEEXT)
+	$(LINK) $(testfax_LDFLAGS) $(testfax_OBJECTS) $(testfax_LDADD) $(LIBS)
+time_scale_tests$(EXEEXT): $(time_scale_tests_OBJECTS) $(time_scale_tests_DEPENDENCIES) 
+	@rm -f time_scale_tests$(EXEEXT)
+	$(LINK) $(time_scale_tests_LDFLAGS) $(time_scale_tests_OBJECTS) $(time_scale_tests_LDADD) $(LIBS)
+tone_generate_tests$(EXEEXT): $(tone_generate_tests_OBJECTS) $(tone_generate_tests_DEPENDENCIES) 
+	@rm -f tone_generate_tests$(EXEEXT)
+	$(LINK) $(tone_generate_tests_LDFLAGS) $(tone_generate_tests_OBJECTS) $(tone_generate_tests_LDADD) $(LIBS)
+v17_tests$(EXEEXT): $(v17_tests_OBJECTS) $(v17_tests_DEPENDENCIES) 
+	@rm -f v17_tests$(EXEEXT)
+	$(CXXLINK) $(v17_tests_LDFLAGS) $(v17_tests_OBJECTS) $(v17_tests_LDADD) $(LIBS)
+v22bis_tests$(EXEEXT): $(v22bis_tests_OBJECTS) $(v22bis_tests_DEPENDENCIES) 
+	@rm -f v22bis_tests$(EXEEXT)
+	$(CXXLINK) $(v22bis_tests_LDFLAGS) $(v22bis_tests_OBJECTS) $(v22bis_tests_LDADD) $(LIBS)
+v27ter_tests$(EXEEXT): $(v27ter_tests_OBJECTS) $(v27ter_tests_DEPENDENCIES) 
+	@rm -f v27ter_tests$(EXEEXT)
+	$(CXXLINK) $(v27ter_tests_LDFLAGS) $(v27ter_tests_OBJECTS) $(v27ter_tests_LDADD) $(LIBS)
+v29_tests$(EXEEXT): $(v29_tests_OBJECTS) $(v29_tests_DEPENDENCIES) 
+	@rm -f v29_tests$(EXEEXT)
+	$(CXXLINK) $(v29_tests_LDFLAGS) $(v29_tests_OBJECTS) $(v29_tests_LDADD) $(LIBS)
+v42_tests$(EXEEXT): $(v42_tests_OBJECTS) $(v42_tests_DEPENDENCIES) 
+	@rm -f v42_tests$(EXEEXT)
+	$(LINK) $(v42_tests_LDFLAGS) $(v42_tests_OBJECTS) $(v42_tests_LDADD) $(LIBS)
+v42bis_tests$(EXEEXT): $(v42bis_tests_OBJECTS) $(v42bis_tests_DEPENDENCIES) 
+	@rm -f v42bis_tests$(EXEEXT)
+	$(LINK) $(v42bis_tests_LDFLAGS) $(v42bis_tests_OBJECTS) $(v42bis_tests_LDADD) $(LIBS)
+v8_tests$(EXEEXT): $(v8_tests_OBJECTS) $(v8_tests_DEPENDENCIES) 
+	@rm -f v8_tests$(EXEEXT)
+	$(LINK) $(v8_tests_LDFLAGS) $(v8_tests_OBJECTS) $(v8_tests_LDADD) $(LIBS)
+vector_float_tests$(EXEEXT): $(vector_float_tests_OBJECTS) $(vector_float_tests_DEPENDENCIES) 
+	@rm -f vector_float_tests$(EXEEXT)
+	$(LINK) $(vector_float_tests_LDFLAGS) $(vector_float_tests_OBJECTS) $(vector_float_tests_LDADD) $(LIBS)
+vector_int_tests$(EXEEXT): $(vector_int_tests_OBJECTS) $(vector_int_tests_DEPENDENCIES) 
+	@rm -f vector_int_tests$(EXEEXT)
+	$(LINK) $(vector_int_tests_LDFLAGS) $(vector_int_tests_OBJECTS) $(vector_int_tests_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adsi_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/async_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at_interpreter_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awgn_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bell_mf_rx_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bell_mf_tx_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bert_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bit_operations_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dc_restore_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dds_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtmf_rx_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtmf_tx_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/echo_monitor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/echo_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax_decode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsk_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g168_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g711_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g722_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g726_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm0610_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdlc_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ima_adpcm_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_network_model.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/line_model.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/line_model_monitor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/line_model_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc10_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_g168_css.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_line_models.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modem_connect_tones_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modem_echo_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modem_monitor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/noise_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oki_adpcm_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playout_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plc_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power_meter_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/r2_mf_rx_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/r2_mf_tx_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/schedule_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig_tone_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/super_tone_rx_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/super_tone_tx_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t31_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t38_gateway_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t38_gateway_to_terminal_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t38_terminal_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t38_terminal_to_gateway_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t4_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_utils.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testadsi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testfax.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_scale_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tone_generate_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v17_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v22bis_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v27ter_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v29_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v42_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v42bis_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v8_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_float_tests.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector_int_tests.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_dataDATA: $(nobase_data_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \
+	  $(nobase_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+uninstall-nobase_dataDATA:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_data_DATA)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(datadir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(datadir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_dataDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-nobase_dataDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-nobase_dataDATA install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-nobase_dataDATA
+
+
+# We need to run make_line_models, so it generates the line_models.h file
+# used by several of the test programs.
+
+line_model.$(OBJEXT): make_line_models$(EXEEXT) line_models.h
+
+line_models.h: make_line_models$(EXEEXT)
+	./make_line_models$(EXEEXT)
+
+# We need to create the CSS files for echo cancellation tests.
+
+sound_c1_8k.wav sound_c3_8k.wav: make_g168_css$(EXEEXT)
+	./make_g168_css$(EXEEXT)
+	sox sound_c1.wav -r8000 sound_c1_8k.wav
+	sox sound_c3.wav -r8000 sound_c3_8k.wav
+	rm sound_c1.wav sound_c3.wav
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/adsi_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,711 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * adsi_tests.c - tests for analogue display service handling.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: adsi_tests.c,v 1.28 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \page adsi_tests_page ADSI tests
+\section adsi_tests_page_sec_1 What does it do?
+These tests exercise the ADSI module, for all supported standards. A transmit
+and a receive instance of the ADSI module are connected together. A quantity
+of messages is passed between these instances, and checked for accuracy at
+the receiver. Since the FSK modems used for this are exercised fully by other
+tests, these tests do not include line modelling.
+
+\section adsi_tests_page_sec_2 How does it work?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUT_FILE_NAME   "adsi.wav"
+
+#define BLOCK_LEN       160
+
+char *decode_test_file = NULL;
+
+int errors = 0;
+
+adsi_rx_state_t rx_adsi;
+adsi_tx_state_t tx_adsi;
+
+int current_standard = 0;
+int good_message_received;
+
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg);
+
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg)
+{
+    const char *t;
+    int len;
+    static int cycle = 0;
+
+    len = 0;
+    switch (current_standard)
+    {
+    case ADSI_STANDARD_CLASS:
+        if (cycle > 3)
+            cycle = 0;
+        switch (cycle)
+        {
+        case 0:
+            len = adsi_add_field(s, msg, -1, CLASS_MDMF_CALLERID, NULL, 0);
+            /* Date and time as MMDDHHMM */
+            len = adsi_add_field(s, msg, len, MCLASS_DATETIME, (uint8_t *) "10011750", 8);
+            len = adsi_add_field(s, msg, len, MCLASS_CALLER_NUMBER, (uint8_t *) "12345678", 8);
+            len = adsi_add_field(s, msg, len, MCLASS_DIALED_NUMBER, (uint8_t *) "87654321", 8);
+            len = adsi_add_field(s, msg, len, MCLASS_CALLER_NAME, (uint8_t *) "Chan Dai Man", 15);
+            break;
+        case 1:
+            len = adsi_add_field(s, msg, -1, CLASS_SDMF_MSG_WAITING, NULL, 0);
+            /* Active */
+            len = adsi_add_field(s, msg, len, 0, (uint8_t *) "\x42", 1);
+            len = adsi_add_field(s, msg, len, 0, (uint8_t *) "\x42", 1);
+            len = adsi_add_field(s, msg, len, 0, (uint8_t *) "\x42", 1);
+            break;
+        case 2:
+            len = adsi_add_field(s, msg, -1, CLASS_SDMF_MSG_WAITING, NULL, 0);
+            /* Inactive */
+            len = adsi_add_field(s, msg, len, 0, (uint8_t *) "\x6F", 1);
+            len = adsi_add_field(s, msg, len, 0, (uint8_t *) "\x6F", 1);
+            len = adsi_add_field(s, msg, len, 0, (uint8_t *) "\x6F", 1);
+            break;
+        case 3:
+            len = adsi_add_field(s, msg, -1, CLASS_SDMF_CALLERID, NULL, 0);
+            /* Date and time as MMDDHHMM */
+            len = adsi_add_field(s, msg, len, 0, (uint8_t *) "10011750", 8);
+            len = adsi_add_field(s, msg, len, 0, (uint8_t *) "6095551212", 10);
+            break;
+        }
+        break;
+    case ADSI_STANDARD_CLIP:
+        if (cycle > 4)
+            cycle = 0;
+        switch (cycle)
+        {
+        case 0:
+            len = adsi_add_field(s, msg, -1, CLIP_MDMF_CALLERID, NULL, 0);
+            len = adsi_add_field(s, msg, len, CLIP_CALLTYPE, (uint8_t *) "\x81", 1);
+            /* Date and time as MMDDHHMM */
+            len = adsi_add_field(s, msg, len, CLIP_DATETIME, (uint8_t *) "10011750", 8);
+            len = adsi_add_field(s, msg, len, CLIP_DIALED_NUMBER, (uint8_t *) "12345678", 8);
+            len = adsi_add_field(s, msg, len, CLIP_CALLER_NUMBER, (uint8_t *) "87654321", 8);
+            len = adsi_add_field(s, msg, len, CLIP_CALLER_NAME, (uint8_t *) "Chan Dai Man", 15);
+            break;
+        case 1:
+            len = adsi_add_field(s, msg, -1, CLIP_MDMF_MSG_WAITING, NULL, 0);
+            /* Inactive */
+            len = adsi_add_field(s, msg, len, CLIP_VISUAL_INDICATOR, (uint8_t *) "\x00", 1);
+            break;
+        case 2:
+            len = adsi_add_field(s, msg, -1, CLIP_MDMF_MSG_WAITING, NULL, 0);
+            /* Active */
+            len = adsi_add_field(s, msg, len, CLIP_VISUAL_INDICATOR, (uint8_t *) "\xFF", 1);
+            len = adsi_add_field(s, msg, len, CLIP_NUM_MSG, (uint8_t *) "\x05", 1);
+            break;
+        case 3:
+            len = adsi_add_field(s, msg, -1, CLIP_MDMF_SMS, NULL, 0);
+            /* Active */
+            len = adsi_add_field(s, msg, len, CLIP_DISPLAY_INFO, (uint8_t *) "\x00" "ABC", 4);
+            break;
+        case 4:
+            len = adsi_add_field(s, msg, -1, CLIP_MDMF_CALLERID, NULL, 0);
+            len = adsi_add_field(s, msg, len, CLIP_NUM_MSG, (uint8_t *) "\x03", 1);
+            break;
+        }
+        break;
+    case ADSI_STANDARD_ACLIP:
+        if (cycle > 0)
+            cycle = 0;
+        switch (cycle)
+        {
+        case 0:
+            len = adsi_add_field(s, msg, -1, ACLIP_MDMF_CALLERID, NULL, 0);
+            /* Date and time as MMDDHHMM */
+            len = adsi_add_field(s, msg, len, ACLIP_DATETIME, (uint8_t *) "10011750", 8);
+            len = adsi_add_field(s, msg, len, ACLIP_DIALED_NUMBER, (uint8_t *) "12345678", 8);
+            len = adsi_add_field(s, msg, len, ACLIP_CALLER_NUMBER, (uint8_t *) "87654321", 8);
+            len = adsi_add_field(s, msg, len, ACLIP_CALLER_NAME, (uint8_t *) "Chan Dai Man", 15);
+            break;
+        }
+        break;
+    case ADSI_STANDARD_JCLIP:
+        len = adsi_add_field(s, msg, -1, JCLIP_MDMF_CALLERID, NULL, 0);
+        len = adsi_add_field(s, msg, len, JCLIP_CALLER_NUMBER, (uint8_t *) "12345678", 8);
+        len = adsi_add_field(s, msg, len, JCLIP_CALLER_NUM_DES, (uint8_t *) "215", 3);
+        len = adsi_add_field(s, msg, len, JCLIP_DIALED_NUMBER, (uint8_t *) "87654321", 8);
+        len = adsi_add_field(s, msg, len, JCLIP_DIALED_NUM_DES, (uint8_t *) "215", 3);
+        break;
+    case ADSI_STANDARD_CLIP_DTMF:
+        len = adsi_add_field(s, msg, 0, CLIP_DTMF_CALLER_NUMBER, (uint8_t *) "12345678", 8);
+        break;
+    case ADSI_STANDARD_TDD:
+        t = "The quick Brown Fox Jumps Over The Lazy dog 0123456789!@#$%^&*()";
+        len = adsi_add_field(s, msg, -1, 0, (uint8_t *) t, strlen(t));
+        break;
+    }
+    cycle++;
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void put_adsi_msg(void *user_data, const uint8_t *msg, int len)
+{
+    int i;
+    int l;
+    uint8_t field_type;
+    const uint8_t *field_body;
+    int field_len;
+    int message_type;
+    uint8_t body[256];
+    
+    printf("Good message received (%d bytes)\n", len);
+    good_message_received = TRUE;
+    for (i = 0;  i < len;  i++)
+    {
+        printf("%02x ", msg[i]);
+        if ((i & 0xf) == 0xf)
+            printf("\n");
+    }
+    printf("\n");
+    l = -1;
+    message_type = -1;
+    printf("Message breakdown\n");
+    do
+    {
+        l = adsi_next_field(&rx_adsi, msg, len, l, &field_type, &field_body, &field_len);
+        if (l > 0)
+        {
+            if (field_body)
+            {
+                memcpy(body, field_body, field_len);
+                body[field_len] = '\0';
+                printf("Field type 0x%x, len %d, '%s' - ", field_type, field_len, body);
+                switch (current_standard)
+                {
+                case ADSI_STANDARD_CLASS:
+                    switch (message_type)
+                    {
+                    case CLASS_SDMF_CALLERID:
+                        break;
+                    case CLASS_MDMF_CALLERID:
+                        switch (field_type)
+                        {
+                        case MCLASS_DATETIME:
+                            printf("Date and time (MMDDHHMM)");
+                            break;
+                        case MCLASS_CALLER_NUMBER:
+                            printf("Caller's number");
+                            break;
+                        case MCLASS_DIALED_NUMBER:
+                            printf("Dialed number");
+                            break;
+                        case MCLASS_ABSENCE1:
+                            printf("Caller's number absent: 'O' or 'P'");
+                            break;
+                        case MCLASS_REDIRECT:
+                            printf("Call forward: universal ('0'), on busy ('1'), or on unanswered ('2')");
+                            break;
+                        case MCLASS_QUALIFIER:
+                            printf("Long distance: 'L'");
+                            break;
+                        case MCLASS_CALLER_NAME:
+                            printf("Caller's name");
+                            break;
+                        case MCLASS_ABSENCE2:
+                            printf("Caller's name absent: 'O' or 'P'");
+                            break;
+                        }
+                        break;
+                    case CLASS_SDMF_MSG_WAITING:
+                        break;
+                    case CLASS_MDMF_MSG_WAITING:
+                        switch (field_type)
+                        {
+                        case MCLASS_VISUAL_INDICATOR:
+                            printf("Message waiting/not waiting");
+                            break;
+                        }
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_CLIP:
+                    switch (message_type)
+                    {
+                    case CLIP_MDMF_CALLERID:
+                    case CLIP_MDMF_MSG_WAITING:
+                    case CLIP_MDMF_CHARGE_INFO:
+                    case CLIP_MDMF_SMS:
+                        switch (field_type)
+                        {
+                        case CLIP_DATETIME:
+                            printf("Date and time (MMDDHHMM)");
+                            break;
+                        case CLIP_CALLER_NUMBER:
+                            printf("Caller's number");
+                            break;
+                        case CLIP_DIALED_NUMBER:
+                            printf("Dialed number");
+                            break;
+                        case CLIP_ABSENCE1:
+                            printf("Caller's number absent");
+                            break;
+                        case CLIP_CALLER_NAME:
+                            printf("Caller's name");
+                            break;
+                        case CLIP_ABSENCE2:
+                            printf("Caller's name absent");
+                            break;
+                        case CLIP_VISUAL_INDICATOR:
+                            printf("Visual indicator");
+                            break;
+                        case CLIP_MESSAGE_ID:
+                            printf("Message ID");
+                            break;
+                        case CLIP_CALLTYPE:
+                            printf("Voice call, ring-back-when-free call, or msg waiting call");
+                            break;
+                        case CLIP_NUM_MSG:
+                            printf("Number of messages");
+                            break;
+#if 0
+                        case CLIP_REDIR_NUMBER:
+                            printf("Redirecting number");
+                            break;
+#endif
+                        case CLIP_CHARGE:
+                            printf("Charge");
+                            break;
+                        case CLIP_DURATION:
+                            printf("Duration of the call");
+                            break;
+                        case CLIP_ADD_CHARGE:
+                            printf("Additional charge");
+                            break;
+                        case CLIP_DISPLAY_INFO:
+                            printf("Display information");
+                            break;
+                        case CLIP_SERVICE_INFO:
+                            printf("Service information");
+                            break;
+                        }
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_ACLIP:
+                    switch (message_type)
+                    {
+                    case ACLIP_SDMF_CALLERID:
+                        break;
+                    case ACLIP_MDMF_CALLERID:
+                        switch (field_type)
+                        {
+                        case ACLIP_DATETIME:
+                            printf("Date and time (MMDDHHMM)");
+                            break;
+                        case ACLIP_CALLER_NUMBER:
+                            printf("Caller's number");
+                            break;
+                        case ACLIP_DIALED_NUMBER:
+                            printf("Dialed number");
+                            break;
+                        case ACLIP_ABSENCE1:
+                            printf("Caller's number absent: 'O' or 'P'");
+                            break;
+                        case ACLIP_REDIRECT:
+                            printf("Call forward: universal, on busy, or on unanswered");
+                            break;
+                        case ACLIP_QUALIFIER:
+                            printf("Long distance call: 'L'");
+                            break;
+                        case ACLIP_CALLER_NAME:
+                            printf("Caller's name");
+                            break;
+                        case ACLIP_ABSENCE2:
+                            printf("Caller's name absent: 'O' or 'P'");
+                            break;
+                        }
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_JCLIP:
+                    switch (message_type)
+                    {
+                    case JCLIP_MDMF_CALLERID:
+                        switch (field_type)
+                        {
+                        case JCLIP_CALLER_NUMBER:
+                            printf("Caller's number");
+                            break;
+                        case JCLIP_CALLER_NUM_DES:
+                            printf("Caller's number data extension signal");
+                            break;
+                        case JCLIP_DIALED_NUMBER:
+                            printf("Dialed number");
+                            break;
+                        case JCLIP_DIALED_NUM_DES:
+                            printf("Dialed number data extension signal");
+                            break;
+                        case JCLIP_ABSENCE:
+                            printf("Caller's number absent: 'C', 'O', 'P' or 'S'");
+                            break;
+                        }
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_CLIP_DTMF:
+                    switch (message_type)
+                    {
+                    case CLIP_DTMF_CALLER_NUMBER:
+                        printf("Caller's number");
+                        break;
+                    case CLIP_DTMF_ABSENCE1:
+                        printf("Caller's number absent: private (1), overseas (2) or not available (3)");
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_TDD:
+                    break;
+                }
+            }
+            else
+            {
+                printf("Message type 0x%x - ", field_type);
+                message_type = field_type;
+                switch (current_standard)
+                {
+                case ADSI_STANDARD_CLASS:
+                    switch (message_type)
+                    {
+                    case CLASS_SDMF_CALLERID:
+                        printf("Single data message caller ID");
+                        break;
+                    case CLASS_MDMF_CALLERID:
+                        printf("Multiple data message caller ID");
+                        break;
+                    case CLASS_SDMF_MSG_WAITING:
+                        printf("Single data message message waiting");
+                        break;
+                    case CLASS_MDMF_MSG_WAITING:
+                        printf("Multiple data message message waiting");
+                        break;
+                    default:
+                        printf("Unknown");
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_CLIP:
+                    switch (message_type)
+                    {
+                    case CLIP_MDMF_CALLERID:
+                        printf("Multiple data message caller ID");
+                        break;
+                    case CLIP_MDMF_MSG_WAITING:
+                        printf("Multiple data message message waiting");
+                        break;
+                    case CLIP_MDMF_CHARGE_INFO:
+                        printf("Multiple data message charge info");
+                        break;
+                    case CLIP_MDMF_SMS:
+                        printf("Multiple data message SMS");
+                        break;
+                    default:
+                        printf("Unknown");
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_ACLIP:
+                    switch (message_type)
+                    {
+                    case ACLIP_SDMF_CALLERID:
+                        printf("Single data message caller ID frame");
+                        break;
+                    case ACLIP_MDMF_CALLERID:
+                        printf("Multiple data message caller ID frame");
+                        break;
+                    default:
+                        printf("Unknown");
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_JCLIP:
+                    switch (message_type)
+                    {
+                    case JCLIP_MDMF_CALLERID:
+                        printf("Multiple data message caller ID frame");
+                        break;
+                    default:
+                        printf("Unknown");
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_CLIP_DTMF:
+                    switch (message_type)
+                    {
+                    case CLIP_DTMF_CALLER_NUMBER:
+                        printf("Caller's number");
+                        break;
+                    case CLIP_DTMF_ABSENCE1:
+                        printf("Caller's number absent");
+                        break;
+                    default:
+                        printf("Unknown");
+                        break;
+                    }
+                    break;
+                case ADSI_STANDARD_TDD:
+                    printf("Unknown");
+                    break;
+                }
+            }
+            printf("\n");
+        }
+    }
+    while (l > 0);
+    if (l < -1)
+    {
+        /* This message appears corrupt */
+        printf("Bad message contents\n");
+        exit(2);
+    }
+    printf("\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int16_t amp[BLOCK_LEN];
+    uint8_t adsi_msg[256 + 42];
+    int adsi_msg_len;
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int len;
+    int i;
+    int j;
+    int push;
+    int log_audio;
+
+    log_audio = FALSE;
+    decode_test_file = NULL;
+    current_standard = ADSI_STANDARD_CLASS;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-d") == 0)
+        {
+            i++;
+            decode_test_file = argv[i];
+            continue;
+        }
+        if (strcmp(argv[i], "-s") == 0)
+        {
+            i++;
+            if (strcasecmp("CLASS", argv[i]) == 0)
+                current_standard = ADSI_STANDARD_CLASS;
+            else if (strcasecmp("CLIP", argv[i]) == 0)
+                current_standard = ADSI_STANDARD_CLIP;
+            else if (strcasecmp("A-CLIP", argv[i]) == 0)
+                current_standard = ADSI_STANDARD_ACLIP;
+            else if (strcasecmp("J-CLIP", argv[i]) == 0)
+                current_standard = ADSI_STANDARD_JCLIP;
+            else if (strcasecmp("CLIP-DTMF", argv[i]) == 0)
+                current_standard = ADSI_STANDARD_CLIP_DTMF;
+            else if (strcasecmp("TDD", argv[i]) == 0)
+                current_standard = ADSI_STANDARD_TDD;
+            else
+                current_standard = atoi(argv[i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+    }
+    filesetup = AF_NULL_FILESETUP;
+    outhandle = AF_NULL_FILEHANDLE;
+    
+#if 0
+    /* This part tests internal static routines in the ADSI module. It can
+       only be run with a modified version of the ADSI module, which makes
+       the routines visible. */
+    /* Check the character encode/decode cycle */
+    current_standard = ADSI_STANDARD_TDD;
+    adsi_tx_init(&tx_adsi, ADSI_STANDARD_TDD);
+    adsi_rx_init(&rx_adsi, ADSI_STANDARD_TDD, put_adsi_msg, NULL);
+    s = "The quick Brown Fox Jumps Over The Lazy dog 0123456789!@#$%^&*()";
+    while ((ch = *s++))
+    {
+        xx = adsi_encode_baudot(&tx_adsi, ch);
+        if ((xx & 0x3E0))
+        {
+            yy = adsi_decode_baudot(&rx_adsi, (xx >> 5) & 0x1F);
+            if (yy)
+                printf("%c", yy);
+        }
+        yy = adsi_decode_baudot(&rx_adsi, xx & 0x1F);
+        if (yy)
+            printf("%c", yy);
+    }
+    printf("\n");
+#endif
+
+    if (decode_test_file)
+    {
+        /* We will decode the audio from a wave file. */
+        if ((inhandle = afOpenFile(decode_test_file, "r", NULL)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot open wave file '%s'\n", decode_test_file);
+            exit(2);
+        }
+
+        adsi_rx_init(&rx_adsi, current_standard, put_adsi_msg, NULL);
+        span_log_set_level(&rx_adsi.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
+        span_log_set_tag(&rx_adsi.logging, "ADSI");
+        for (;;)
+        {
+            len = afReadFrames(inhandle,
+                               AF_DEFAULT_TRACK,
+                               amp,
+                               BLOCK_LEN);
+            if (len == 0)
+                break;
+            adsi_rx(&rx_adsi, amp, len);
+        }
+        if (afCloseFile(inhandle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", decode_test_file);
+            exit(2);
+        }
+    }
+    else
+    {
+        if (log_audio)
+        {
+            if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+            {
+                fprintf(stderr, "    Failed to create file setup\n");
+                exit(2);
+            }
+            afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+            afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+            afInitFileFormat(filesetup, AF_FILE_WAVE);
+            afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+        
+            if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+            {
+                fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+                exit(2);
+            }
+        }
+        /* Go through all the standards */
+        /* This assumes standard 0 is NULL, and TDD is the last in the list */
+        for (j = 1;  j <= ADSI_STANDARD_TDD;  j++)
+        {
+            printf("Testing %s\n", adsi_standard_to_str(j));
+            current_standard = j;
+            adsi_tx_init(&tx_adsi, j);
+            adsi_rx_init(&rx_adsi, j, put_adsi_msg, NULL);
+
+            /* Fake an OK condition for the first message test */
+            good_message_received = TRUE;
+            push = 0;
+            for (i = 0;  i < 100000;  i++)
+            {
+                if (push == 0)
+                {
+                    if ((len = adsi_tx(&tx_adsi, amp, BLOCK_LEN)) == 0)
+                        push = 10;
+                }
+                else
+                {
+                    len = 0;
+                    /* Push a little silence through, to flush things out */
+                    if (--push == 0)
+                    {
+                        if (!good_message_received)
+                        {
+                            printf("No message received %s (%d)\n", adsi_standard_to_str(j), i);
+                            exit(2);
+                        }
+                        good_message_received = FALSE;
+                        adsi_msg_len = adsi_create_message(&tx_adsi, adsi_msg);
+                        adsi_msg_len = adsi_put_message(&tx_adsi, adsi_msg, adsi_msg_len);
+                    }
+                }
+                if (len < BLOCK_LEN)
+                {
+                    memset(&amp[len], 0, sizeof(int16_t)*(BLOCK_LEN - len));
+                    len = BLOCK_LEN;
+                }
+                if (log_audio)
+                {
+                    outframes = afWriteFrames(outhandle,
+                                              AF_DEFAULT_TRACK,
+                                              amp,
+                                              len);
+                    if (outframes != len)
+                    {
+                        fprintf(stderr, "    Error writing wave file\n");
+                        exit(2);
+                    }
+                }
+                adsi_rx(&rx_adsi, amp, len);
+            }
+        }
+        if (log_audio)
+        {
+            if (afCloseFile(outhandle) != 0)
+            {
+                fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+                exit(2);
+            }
+            afFreeFileSetup(filesetup);
+        }
+    }
+    
+    printf("Tests passed.\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/async_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,255 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * async_tests.c - Tests for asynchronous serial processing.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: async_tests.c,v 1.12 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page async_tests_page Asynchronous bit stream tests
+\section async_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+async_rx_state_t rx_async;
+async_tx_state_t tx_async;
+
+int full_len;
+uint8_t old_buf[1000];
+uint8_t new_buf[1000];
+
+volatile int tx_async_chars;
+volatile int rx_async_chars;
+volatile int rx_async_char_mask;
+
+int v14_test_async_tx_get_bit(void *user_data);
+
+int v14_test_async_tx_get_bit(void *user_data)
+{
+    async_tx_state_t *s;
+    int bit;
+    static int destuff = 0;
+    
+    /* Special routine to test V.14 rate adaption, by randomly skipping
+       stop bits. */
+    s = (async_tx_state_t *) user_data;
+    if (s->bitpos == 0)
+    {
+        /* Start bit */
+        bit = 0;
+        s->byte_in_progress = s->get_byte(s->user_data);
+        s->parity_bit = 0;
+        s->bitpos++;
+    }
+    else if (s->bitpos <= s->data_bits)
+    {
+        bit = s->byte_in_progress & 1;
+        s->byte_in_progress >>= 1;
+        s->parity_bit ^= bit;
+        s->bitpos++;
+        if (!s->parity  &&  s->bitpos == s->data_bits + 1)
+        {
+            /* Drop the stop bit on every fourth character for V.14 simulation*/
+            if ((++destuff & 3) == 0)
+                s->bitpos = 0;
+        }
+    }
+    else if (s->parity  &&  s->bitpos == s->data_bits + 1)
+    {
+        if (s->parity == ASYNC_PARITY_ODD)
+            s->parity_bit ^= 1;
+        bit = s->parity_bit;
+        s->bitpos++;
+        /* Drop the stop bit on every fourth character for V.14 simulation */
+        if ((++destuff & 3) == 0)
+            s->bitpos = 0;
+    }
+    else
+    {
+        /* Stop bit(s) */
+        bit = 1;
+        s->bitpos++;
+        if (s->bitpos > s->data_bits + s->stop_bits)
+            s->bitpos = 0;
+    }
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int test_get_async_byte(void *user_data)
+{
+    int byte;
+    
+    byte = tx_async_chars & 0xFF;
+    tx_async_chars++;
+    return byte;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void test_put_async_byte(void *user_data, int byte)
+{
+    if ((rx_async_chars & rx_async_char_mask) != byte)
+        printf("Received byte is 0x%X (expected 0x%X)\n", byte, rx_async_chars);
+    rx_async_chars++;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int bit;
+
+    printf("Test with async 8N1\n");
+    async_tx_init(&tx_async, 8, ASYNC_PARITY_NONE, 1, FALSE, test_get_async_byte, NULL);
+    async_rx_init(&rx_async, 8, ASYNC_PARITY_NONE, 1, FALSE, test_put_async_byte, NULL);
+    tx_async_chars = 0;
+    rx_async_chars = 0;
+    rx_async_char_mask = 0xFF;
+    while (rx_async_chars < 1000)
+    {
+        bit = async_tx_get_bit(&tx_async);
+        async_rx_put_bit(&rx_async, bit);
+    }
+    printf("Chars=%d/%d, PE=%d, FE=%d\n", tx_async_chars, rx_async_chars, rx_async.parity_errors, rx_async.framing_errors);
+    if (tx_async_chars != rx_async_chars
+        ||
+        rx_async.parity_errors
+        ||
+        rx_async.framing_errors)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+    
+    printf("Test with async 7E1\n");
+    async_tx_init(&tx_async, 7, ASYNC_PARITY_EVEN, 1, FALSE, test_get_async_byte, NULL);
+    async_rx_init(&rx_async, 7, ASYNC_PARITY_EVEN, 1, FALSE, test_put_async_byte, NULL);
+    tx_async_chars = 0;
+    rx_async_chars = 0;
+    rx_async_char_mask = 0x7F;
+    while (rx_async_chars < 1000)
+    {
+        bit = async_tx_get_bit(&tx_async);
+        async_rx_put_bit(&rx_async, bit);
+    }
+    printf("Chars=%d/%d, PE=%d, FE=%d\n", tx_async_chars, rx_async_chars, rx_async.parity_errors, rx_async.framing_errors);
+    if (tx_async_chars != rx_async_chars
+        ||
+        rx_async.parity_errors
+        ||
+        rx_async.framing_errors)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test with async 8O1\n");
+    async_tx_init(&tx_async, 8, ASYNC_PARITY_ODD, 1, FALSE, test_get_async_byte, NULL);
+    async_rx_init(&rx_async, 8, ASYNC_PARITY_ODD, 1, FALSE, test_put_async_byte, NULL);
+    tx_async_chars = 0;
+    rx_async_chars = 0;
+    rx_async_char_mask = 0xFF;
+    while (rx_async_chars < 1000)
+    {
+        bit = async_tx_get_bit(&tx_async);
+        async_rx_put_bit(&rx_async, bit);
+    }
+    printf("Chars=%d/%d, PE=%d, FE=%d\n", tx_async_chars, rx_async_chars, rx_async.parity_errors, rx_async.framing_errors);
+    if (tx_async_chars != rx_async_chars
+        ||
+        rx_async.parity_errors
+        ||
+        rx_async.framing_errors)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test with async 8O1 and V.14\n");
+    async_tx_init(&tx_async, 8, ASYNC_PARITY_ODD, 1, TRUE, test_get_async_byte, NULL);
+    async_rx_init(&rx_async, 8, ASYNC_PARITY_ODD, 1, TRUE, test_put_async_byte, NULL);
+    tx_async_chars = 0;
+    rx_async_chars = 0;
+    rx_async_char_mask = 0xFF;
+    while (rx_async_chars < 1000)
+    {
+        bit = v14_test_async_tx_get_bit(&tx_async);
+        async_rx_put_bit(&rx_async, bit);
+    }
+    printf("Chars=%d/%d, PE=%d, FE=%d\n", tx_async_chars, rx_async_chars, rx_async.parity_errors, rx_async.framing_errors);
+    if (tx_async_chars != rx_async_chars + 1
+        ||
+        rx_async.parity_errors
+        ||
+        rx_async.framing_errors)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test with async 5N2\n");
+    async_tx_init(&tx_async, 5, ASYNC_PARITY_NONE, 2, FALSE, test_get_async_byte, NULL);
+    async_rx_init(&rx_async, 5, ASYNC_PARITY_NONE, 2, FALSE, test_put_async_byte, NULL);
+    tx_async_chars = 0;
+    rx_async_chars = 0;
+    rx_async_char_mask = 0x1F;
+    while (rx_async_chars < 1000)
+    {
+        bit = async_tx_get_bit(&tx_async);
+        async_rx_put_bit(&rx_async, bit);
+    }
+    printf("Chars=%d/%d, PE=%d, FE=%d\n", tx_async_chars, rx_async_chars, rx_async.parity_errors, rx_async.framing_errors);
+    if (tx_async_chars != rx_async_chars
+        ||
+        rx_async.parity_errors
+        ||
+        rx_async.framing_errors)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/at_interpreter_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,573 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * at_interpreter_tests.c - Tests for the AT interpreter.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004, 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: at_interpreter_tests.c,v 1.9 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page at_interpreter_tests_page AT interpreter tests
+\section at_interpreter_tests_page_sec_1 What does it do?
+These tests exercise all the commands which should be understood by the AT interpreter.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define _GNU_SOURCE
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define DLE 0x10
+#define ETX 0x03
+#define SUB 0x1A
+
+#define MANUFACTURER            "www.soft-switch.org"
+
+struct command_response_s
+{
+    const char *command;
+    const char *response;
+};
+
+static const struct command_response_s general_test_seq[] =
+{
+    /* Try the various cases for "AT" */
+    {"atE1\r", "atE1\r\r\nOK\r\n"},
+    {"AtE1\r", "AtE1\r\r\nOK\r\n"},
+    {"aTE1\r", "aTE1\r\r\nOK\r\n"},
+    {"ATE1\r", "ATE1\r\r\nOK\r\n"},
+    {"ATE0\r", "ATE0\r\r\nOK\r\n"},
+
+    /* Try the various command formats */
+    {"ATS8?\r", "\r\n005\r\n\r\nOK\r\n"},
+    {"ATS8=1\r", "\r\nOK\r\n"},
+    {"ATS8.5?\r", "\r\n0\r\n\r\nOK\r\n"},
+    {"ATS8.5=1\r", "\r\nOK\r\n"},
+    {"ATS8.5?\r", "\r\n1\r\n\r\nOK\r\n"},
+    {"ATS8?\r", "\r\n033\r\n\r\nOK\r\n"},
+    {"AT+FCLASS=1\r", "\r\nOK\r\n"},
+    {"AT+FCLASS?\r", "\r\n1\r\n\r\nOK\r\n"},
+    {"AT+FCLASS=?\r", "\r\n0,1,1.0\r\n\r\nOK\r\n"},
+
+    /* Try all the commands */
+    {"AT&C\r", "\r\nOK\r\n"},                                       /* V.250 6.2.8 - Circuit 109 (received line signal detector), behaviour */ 
+    {"AT&D\r", "\r\nOK\r\n"},                                       /* V.250 6.2.9 - Circuit 108 (data terminal ready) behaviour */ 
+    {"AT&F\r", "\r\nOK\r\n"},                                       /* V.250 6.1.2 - Set to factory-defined configuration */ 
+    {"ATE0\r", "ATE0\r\r\nOK\r\n"},                                 /* Counteract the effects of the above */
+    {"AT+A8E=?\r", "\r\n+A8E:(0-6),(0-5),(00-FF)\r\n\r\nOK\r\n"},   /* V.251 5.1 - V.8 and V.8bis operation controls */
+    {"AT+A8M\r", "\r\nOK\r\n"},                                     /* V.251 5.2 - Send V.8 menu signals */
+    {"AT+A8T=?\r", "\r\n+A8T:(0-10)\r\n\r\nOK\r\n"},                /* V.251 5.3 - Send V.8bis signal and/or message(s) */
+    {"AT+ASTO=?\r", "\r\n+ASTO:\r\n\r\nOK\r\n"},                    /* V.250 6.3.15 - Store telephone number */ 
+    {"AT+CAAP=?\r", "\r\n+CAAP:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.25 - Automatic answer for eMLPP Service */
+    {"AT+CACM=?\r", "\r\n+CACM:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.25 - Accumulated call meter */
+    {"AT+CACSP=?\r", "\r\n+CACSP:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 11.1.7 - Voice Group or Voice Broadcast Call State Attribute Presentation */
+    {"AT+CAEMLPP=?\r", "\r\n+CAEMLPP:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 7.22 - eMLPP Priority Registration and Interrogation */
+    {"AT+CAHLD=?\r", "\r\n+CAHLD:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 11.1.3 - Leave an ongoing Voice Group or Voice Broadcast Call */
+    {"AT+CAJOIN=?\r", "\r\n+CAJOIN:\r\n\r\nOK\r\n"},                /* 3GPP TS 27.007 11.1.1 - Accept an incoming Voice Group or Voice Broadcast Call */
+    {"AT+CALA=?\r", "\r\n+CALA:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.16 - Alarm */
+    {"AT+CALCC=?\r", "\r\n+CALCC:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 11.1.6 - List current Voice Group and Voice Broadcast Calls */
+    {"AT+CALD=?\r", "\r\n+CALD:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.38 - Delete alar m */
+    {"AT+CALM=?\r", "\r\n+CALM:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.20 - Alert sound mode */
+    {"AT+CAMM=?\r", "\r\n+CAMM:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.26 - Accumulated call meter maximum */
+    {"AT+CANCHEV=?\r", "\r\n+CANCHEV:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 11.1.8 - NCH Support Indication */
+    {"AT+CAOC=?\r", "\r\n+CAOC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.16 - Advice of Charge */
+    {"AT+CAPD=?\r", "\r\n+CAPD:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.39 - Postpone or dismiss an alarm */
+    {"AT+CAPTT=?\r", "\r\n+CAPTT:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 11.1.4 - Talker Access for Voice Group Call */
+    {"AT+CAREJ=?\r", "\r\n+CAREJ:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 11.1.2 - Reject an incoming Voice Group or Voice Broadcast Call */
+    {"AT+CAULEV=?\r", "\r\n+CAULEV:\r\n\r\nOK\r\n"},                /* 3GPP TS 27.007 11.1.5 - Voice Group Call Uplink Status Presentation */
+    {"AT+CBC=?\r", "\r\n+CBC:\r\n\r\nOK\r\n"},                      /* 3GPP TS 27.007 8.4 - Battery charge */
+    {"AT+CBCS=?\r", "\r\n+CBCS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 11.3.2 - VBS subscriptions and GId status */
+    {"AT+CBST=?\r", "\r\n+CBST:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.7 - Select bearer service type */
+    {"AT+CCFC=?\r", "\r\n+CCFC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.11 - Call forwarding number and conditions */
+    {"AT+CCLK=?\r", "\r\n+CCLK:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.15 - Clock */
+    {"AT+CCUG=?\r", "\r\n+CCUG:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.10 - Closed user group */
+    {"AT+CCWA=?\r", "\r\n+CCWA:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.12 - Call waiting */
+    {"AT+CCWE=?\r", "\r\n+CCWE:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.28 - Call Meter maximum event */
+    {"AT+CDIP=?\r", "\r\n+CDIP:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.9 - Called line identification presentation */
+    {"AT+CDIS=?\r", "\r\n+CDIS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.8 - Display control */
+    {"AT+CEER=?\r", "\r\n+CEER:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.10 - Extended error report */
+    {"AT+CFCS=?\r", "\r\n+CFCS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.24 - Fast call setup conditions */
+    {"AT+CFUN=?\r", "\r\n+CFUN:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.2 - Set phone functionality */
+    {"AT+CGACT=?\r", "\r\n+CGACT:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 10.1.10 - PDP context activate or deactivate */
+    {"AT+CGANS=?\r", "\r\n+CGANS:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 10.1.16 - Manual response to a network request for PDP context activation */
+    {"AT+CGATT=?\r", "\r\n+CGATT:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 10.1.9 - PS attach or detach */
+    {"AT+CGAUTO=?\r", "\r\n+CGAUTO:\r\n\r\nOK\r\n"},                /* 3GPP TS 27.007 10.1.15 - Automatic response to a network request for PDP context activation */
+    {"AT+CGCLASS=?\r", "\r\n+CGCLASS:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 10.1.17 - GPRS mobile station class (GPRS only) */
+    {"AT+CGCLOSP=?\r", "\r\n+CGCLOSP:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 10.1.13 - Configure local octet stream PAD parameters (Obsolete) */
+    {"AT+CGCLPAD=?\r", "\r\n+CGCLPAD:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 10.1.12 - Configure local triple-X PAD parameters (GPRS only) (Obsolete) */
+    {"AT+CGCMOD=?\r", "\r\n+CGCMOD:\r\n\r\nOK\r\n"},                /* 3GPP TS 27.007 10.1.11 - PDP Context Modify */
+    {"AT+CGCS=?\r", "\r\n+CGCS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 11.3.1 - VGCS subscriptions and GId status */
+    {"AT+CGDATA=?\r", "\r\n+CGDATA:\r\n\r\nOK\r\n"},                /* 3GPP TS 27.007 10.1.12 - Enter data state */
+    {"AT+CGDCONT=?\r", "\r\n+CGDCONT:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 10.1.1 - Define PDP Context */
+    {"AT+CGDSCONT=?\r", "\r\n+CGDSCONT:\r\n\r\nOK\r\n"},            /* 3GPP TS 27.007 10.1.2 - Define Secondary PDP Context */
+    {"AT+CGEQMIN=?\r", "\r\n+CGEQMIN:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 10.1.7 - 3G Quality of Service Profile (Minimum acceptable) */
+    {"AT+CGEQNEG=?\r", "\r\n+CGEQNEG:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 10.1.8 - 3G Quality of Service Profile (Negotiated) */
+    {"AT+CGEQREQ=?\r", "\r\n+CGEQREQ:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 10.1.6 - 3G Quality of Service Profile (Requested) */
+    {"AT+CGEREP=?\r", "\r\n+CGEREP:\r\n\r\nOK\r\n"},                /* 3GPP TS 27.007 10.1.18 - Packet Domain event reporting */
+    {"AT+CGMI=?\r", "\r\n+CGMI:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 5.1 - Request manufacturer identification */
+    {"AT+CGMM=?\r", "\r\n+CGMM:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 5.2 - Request model identification */
+    {"AT+CGMR=?\r", "\r\n+CGMR:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 5.3 - Request revision identification */
+    {"AT+CGPADDR=?\r", "\r\n+CGPADDR:\r\n\r\nOK\r\n"},              /* 3GPP TS 27.007 10.1.14 - Show PDP address */
+    {"AT+CGQMIN=?\r", "\r\n+CGQMIN:\r\n\r\nOK\r\n"},                /* 3GPP TS 27.007 10.1.5 - Quality of Service Profile (Minimum acceptable) */
+    {"AT+CGQREQ=?\r", "\r\n+CGQREQ:\r\n\r\nOK\r\n"},                /* 3GPP TS 27.007 10.1.4 - Quality of Service Profile (Requested) */
+    {"AT+CGREG=?\r", "\r\n+CGREG:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 10.1.19 - GPRS network registration status */
+    {"AT+CGSMS=?\r", "\r\n+CGSMS:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 10.1.20 - Select service for MO SMS messages */
+    {"AT+CGSN=?\r", "\r\n+CGSN:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 5.4 - Request product serial number identification */
+    {"AT+CGTFT=?\r", "\r\n+CGTFT:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 10.1.3 - Traffic Flow Template */
+    {"AT+CHLD=?\r", "\r\n+CHLD:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.13 - Call related supplementary services */
+    {"AT+CHSA=?\r", "\r\n+CHSA:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.18 - HSCSD non-transparent asymmetry configuration */
+    {"AT+CHSC=?\r", "\r\n+CHSC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.15 - HSCSD current call parameters */
+    {"AT+CHSD=?\r", "\r\n+CHSD:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.12 - HSCSD device parameters */
+    {"AT+CHSN=?\r", "\r\n+CHSN:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.14 - HSCSD non-transparent call configuration */
+    {"AT+CHSR=?\r", "\r\n+CHSR:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.16 - HSCSD parameters report */
+    {"AT+CHST=?\r", "\r\n+CHST:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.13 - HSCSD transparent call configuration */
+    {"AT+CHSU=?\r", "\r\n+CHSU:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.17 - HSCSD automatic user initiated upgrading */
+    {"AT+CHUP=?\r", "\r\n+CHUP:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.5 - Hangup call */
+    {"AT+CIMI=?\r", "\r\n+CIMI:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 5.6 - Request international mobile subscriber identity */
+    {"AT+CIND=?\r", "\r\n+CIND:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.9 - Indicator control */
+    {"AT+CKPD=?\r", "\r\n+CKPD:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.7 - Keypad control */
+    {"AT+CLAC=?\r", "\r\n+CLAC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.37 - List all available AT commands */
+    {"AT+CLAE=?\r", "\r\n+CLAE:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.31 - Language Event */
+    {"AT+CLAN=?\r", "\r\n+CLAN:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.30 - Set Language */
+    {"AT+CLCC=?\r", "\r\n+CLCC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.18 - List current calls */
+    {"AT+CLCK=?\r", "\r\n+CLCK:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.4 - Facility lock */
+    {"AT+CLIP=?\r", "\r\n+CLIP:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.6 - Calling line identification presentation */
+    {"AT+CLIR=?\r", "\r\n+CLIR:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.7 - Calling line identification restriction */
+    {"AT+CLVL=?\r", "\r\n+CLVL:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.23 - Loudspeaker volume level */
+    {"AT+CMAR=?\r", "\r\n+CMAR:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.36 - Master Reset */
+    {"AT+CMEC=?\r", "\r\n+CMEC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.6 - Mobile Termination control mode */
+    {"AT+CMER=?\r", "\r\n+CMER:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.10 - Mobile Termination event reporting */
+    {"AT+CMOD=?\r", "\r\n+CMOD:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.4 - Call mode */
+    {"AT+CMUT=?\r", "\r\n+CMUT:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.24 - Mute control */
+    {"AT+CMUX=?\r", "\r\n+CMUX:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 5.7 - Multiplexing mode */
+    {"AT+CNUM=?\r", "\r\n+CNUM:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.1 - Subscriber number */
+    {"AT+COLP=?\r", "\r\n+COLP:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.8 - Connected line identification presentation */
+    {"AT+COPN=?\r", "\r\n+COPN:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.21 - Read operator names */
+    {"AT+COPS=?\r", "\r\n+COPS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.3 - PLMN selection */
+    {"AT+COTDI=?\r", "\r\n+COTDI:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 11.1.9 - Originator to Dispatcher Information */
+    {"AT+CPAS=?\r", "\r\n+CPAS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.1 - Phone activity status */
+    {"AT+CPBF=?\r", "\r\n+CPBF:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.13 - Find phonebook entries */
+    {"AT+CPBR=?\r", "\r\n+CPBR:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.12 - Read phonebook entries */
+    {"AT+CPBS=?\r", "\r\n+CPBS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.11 - Select phonebook memory storage */
+    {"AT+CPBW=?\r", "\r\n+CPBW:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.14 - Write phonebook entry */
+    {"AT+CPIN=?\r", "\r\n+CPIN:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.3 - Enter PIN */
+    {"AT+CPLS=?\r", "\r\n+CPLS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.20 - Selection of preferred PLMN list */
+    {"AT+CPOL=?\r", "\r\n+CPOL:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.19 - Preferred PLMN list */
+    {"AT+CPPS=?\r", "\r\n+CPPS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.23 - eMLPP subscriptions */
+    {"AT+CPROT=?\r", "\r\n+CPROT:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 8.42 - Enter protocol mode */
+    {"AT+CPUC=?\r", "\r\n+CPUC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.27 - Price per unit and currency table */
+    {"AT+CPWC=?\r", "\r\n+CPWC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.29 - Power class */
+    {"AT+CPWD=?\r", "\r\n+CPWD:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.5 - Change password */
+    {"AT+CR=?\r", "\r\n+CR:\r\n\r\nOK\r\n"},                        /* 3GPP TS 27.007 6.9 - Service reporting control */
+    {"AT+CRC=?\r", "\r\n+CRC:\r\n\r\nOK\r\n"},                      /* 3GPP TS 27.007 6.11 - Cellular result codes */
+    {"AT+CREG=?\r", "\r\n+CREG:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.2 - Network registration */
+    {"AT+CRLP=?\r", "\r\n+CRLP:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.8 - Radio link protocol */
+    {"AT+CRMC=?\r", "\r\n+CRMC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.34 - Ring Melody Control */
+    {"AT+CRMP=?\r", "\r\n+CRMP:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.35 - Ring Melody Playback */
+    {"AT+CRSL=?\r", "\r\n+CRSL:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.21 - Ringer sound level */
+    {"AT+CRSM=?\r", "\r\n+CRSM:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.18 - Restricted SIM access */
+    {"AT+CSCC=?\r", "\r\n+CSCC:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.19 - Secure control command */
+    {"AT+CSCS=?\r", "\r\n+CSCS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 5.5 - Select TE character set */
+    {"AT+CSDF=?\r", "\r\n+CSDF:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.22 - Settings date format */
+    {"AT+CSGT=?\r", "\r\n+CSGT:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.32 - Set Greeting Text */
+    {"AT+CSIL=?\r", "\r\n+CSIL:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.23 - Silence Command */
+    {"AT+CSIM=?\r", "\r\n+CSIM:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.17 - Generic SIM access */
+    {"AT+CSNS=?\r", "\r\n+CSNS:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.19 - Single numbering scheme */
+    {"AT+CSQ=?\r", "\r\n+CSQ:\r\n\r\nOK\r\n"},                      /* 3GPP TS 27.007 8.5 - Signal quality */
+    {"AT+CSSN=?\r", "\r\n+CSSN:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.17 - Supplementary service notifications */
+    {"AT+CSTA=?\r", "\r\n+CSTA:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.1 - Select type of address */
+    {"AT+CSTF=?\r", "\r\n+CSTF:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.24 - Settings time format */
+    {"AT+CSVM=?\r", "\r\n+CSVM:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.33 - Set Voice Mail Number */
+    {"AT+CTFR=?\r", "\r\n+CTFR:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.14 - Call deflection */
+    {"AT+CTZR=?\r", "\r\n+CTZR:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.41 - Time Zone Reporting */
+    {"AT+CTZU=?\r", "\r\n+CTZU:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.40 - Automatic Time Zone Update */
+    {"AT+CUSD=?\r", "\r\n+CUSD:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 7.15 - Unstructured supplementary service data */
+    {"AT+CUUS1=?\r", "\r\n+CUUS1:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 7.26 - User to User Signalling Service 1 */
+    {"AT+CV120=?\r", "\r\n+CV120:\r\n\r\nOK\r\n"},                  /* 3GPP TS 27.007 6.21 - V.120 rate adaption protocol */
+    {"AT+CVHU=?\r", "\r\n+CVHU:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 6.20 - Voice Hangup Control */
+    {"AT+CVIB=?\r", "\r\n+CVIB:\r\n\r\nOK\r\n"},                    /* 3GPP TS 27.007 8.22 - Vibrator mode */
+    {"AT+DR=?\r", "\r\n+DR:\r\n\r\nOK\r\n"},                        /* V.250 6.6.2 - Data compression reporting */ 
+    {"AT+DS=?\r", "\r\n+DS:\r\n\r\nOK\r\n"},                        /* V.250 6.6.1 - Data compression */ 
+    {"AT+EB=?\r", "\r\n+EB:\r\n\r\nOK\r\n"},                        /* V.250 6.5.2 - Break handling in error control operation */ 
+    {"AT+EFCS=?\r", "\r\n+EFCS:(0-2)\r\n\r\nOK\r\n"},               /* V.250 6.5.4 - 32-bit frame check sequence */ 
+    {"AT+EFCS?\r", "\r\n+EFCS:0\r\n\r\nOK\r\n"},
+    {"AT+EFRAM=?\r", "\r\n+EFRAM:(1-65535),(1-65535)\r\n\r\nOK\r\n"},     /* V.250 6.5.8 - Frame length */ 
+    {"AT+ER=?\r", "\r\n+ER:(0,1)\r\n\r\nOK\r\n"},                   /* V.250 6.5.5 - Error control reporting */ 
+    {"AT+ES\r", "\r\nOK\r\n"},                                      /* V.250 6.5.1 - Error control selection */ 
+    {"AT+ESR\r", "\r\nOK\r\n"},                                     /* V.250 6.5.3 - Selective repeat */ 
+    {"AT+ETBM=?\r", "\r\n+ETBM:(0-2),(0-2),(0-30)\r\n\r\nOK\r\n"},  /* T.31 8.5.1 - Adaptive reception control */ 
+    {"AT+ETBM?\r", "\r\n+ETBM:0,0\r\n\r\nOK\r\n"},
+    {"AT+EWIND=?\r", "\r\n+EWIND:(1-127),(1-127)\r\n\r\nOK\r\n"},   /* V.250 6.5.7 - Window size */ 
+    {"AT+EWIND?\r", "\r\n+EWIND:0,0\r\n\r\nOK\r\n"},
+    {"AT+FAR=?\r", "\r\n0,1\r\n\r\nOK\r\n"},                        /* T.31 8.5.1 - Adaptive reception control */ 
+    {"AT+FAR?\r", "\r\n0\r\n\r\nOK\r\n"},
+    {"AT+FCL=?\r", "\r\n(0-255)\r\n\r\nOK\r\n"},                    /* T.31 8.5.2 - Carrier loss timeout */ 
+    {"AT+FCLASS=?\r", "\r\n0,1,1.0\r\n\r\nOK\r\n"},                 /* T.31 8.2 - Capabilities identification and control */ 
+    {"AT+FCLASS?\r", "\r\n1\r\n\r\nOK\r\n"},
+    {"AT+FDD=?\r", "\r\n(0,1)\r\n\r\nOK\r\n"},                      /* T.31 8.5.3 - Double escape character replacement */ 
+    {"AT+FDD?\r", "\r\n0\r\n\r\nOK\r\n"},
+    {"AT+FIT=?\r", "\r\n+FIT:(0-255),(0-1)\r\n\r\nOK\r\n"},         /* T.31 8.5.4 - DTE inactivity timeout */ 
+    {"AT+FIT?\r", "\r\n+FIT:0,0\r\n\r\nOK\r\n"},
+    {"AT+FLO\r", "\r\nOK\r\n"},                                     /* T.31 says to implement something similar to +IFC */ 
+    {"AT+FMI?\r", "\r\n" MANUFACTURER "\r\n\r\nOK\r\n"},            /* T.31 says to duplicate +GMI */ 
+    {"AT+FMM?\r", "\r\n" PACKAGE "\r\n\r\nOK\r\n"},                 /* T.31 says to duplicate +GMM */ 
+    {"AT+FMR?\r", "\r\n" VERSION "\r\n\r\nOK\r\n"},                 /* T.31 says to duplicate +GMR */ 
+    {"AT+FPR=?\r", "\r\n115200\r\n\r\nOK\r\n"},                     /* T.31 says to implement something similar to +IPR */ 
+    {"AT+FPR?\r", "\r\n0\r\n\r\nOK\r\n"},
+    {"AT+FRH=?\r", "\r\n3\r\n\r\nOK\r\n"},                          /* T.31 8.3.6 - HDLC receive */ 
+    {"AT+FRH?\r", "\r\n-1\r\n\r\nOK\r\n"},
+#if defined(ENABLE_V17)
+    {"AT+FRM=?\r", "\r\n24,48,72,73,74,96,97,98,121,122,145,146\r\n\r\nOK\r\n"}, /* T.31 8.3.4 - Facsimile receive */ 
+#else
+    {"AT+FRM=?\r", "\r\n24,48,72,96\r\n\r\nOK\r\n"},                /* T.31 8.3.4 - Facsimile receive */ 
+#endif    
+    {"AT+FRM?\r", "\r\n-1\r\n\r\nOK\r\n"},
+    {"AT+FRS=?\r", "\r\n0-255\r\n\r\nOK\r\n"},                      /* T.31 8.3.2 - Receive silence */ 
+    {"AT+FRS?\r", "\r\n-1\r\n\r\nOK\r\n"},
+    {"AT+FTH=?\r", "\r\n3\r\n\r\nOK\r\n"},                          /* T.31 8.3.5 - HDLC transmit */ 
+    {"AT+FTH?\r", "\r\n-1\r\n\r\nOK\r\n"},
+#if defined(ENABLE_V17)
+    {"AT+FTM=?\r", "\r\n24,48,72,73,74,96,97,98,121,122,145,146\r\n\r\nOK\r\n"}, /* T.31 8.3.3 - Facsimile transmit */ 
+#else
+    {"AT+FTM=?\r", "\r\n24,48,72,96\r\n\r\nOK\r\n"},                /* T.31 8.3.3 - Facsimile transmit */ 
+#endif
+    {"AT+FTM?\r", "\r\n-1\r\n\r\nOK\r\n"},
+    {"AT+FTS=?\r", "\r\n0-255\r\n\r\nOK\r\n"},                      /* T.31 8.3.1 - Transmit silence */ 
+    {"AT+FTS?\r", "\r\n-1\r\n\r\nOK\r\n"},
+    {"AT+GCAP\r", "\r\nOK\r\n"},                                    /* V.250 6.1.9 - Request complete capabilities list */ 
+    {"AT+GCI=?\r", "\r\n+GCI:(00-FF)\r\n\r\nOK\r\n"},               /* V.250 6.1.10 - Country of installation, */ 
+    {"AT+GCI?\r", "\r\n+GCI:00\r\n\r\nOK\r\n"},
+    {"AT+GMI?\r", "\r\n" MANUFACTURER "\r\n\r\nOK\r\n"},            /* V.250 6.1.4 - Request manufacturer identification */ 
+    {"AT+GMM?\r", "\r\n" PACKAGE "\r\n\r\nOK\r\n"},                 /* V.250 6.1.5 - Request model identification */ 
+    {"AT+GMR?\r", "\r\n" VERSION "\r\n\r\nOK\r\n"},                 /* V.250 6.1.6 - Request revision identification */ 
+    {"AT+GOI\r", "\r\nOK\r\n"},                                     /* V.250 6.1.8 - Request global object identification */ 
+    {"AT+GSN?\r", "\r\n42\r\n\r\nOK\r\n"},                          /* V.250 6.1.7 - Request product serial number identification */ 
+    {"AT+ICF?\r", "\r\n+ICF:0,0\r\n\r\nOK\r\n"},                    /* V.250 6.2.11 - DTE-DCE character framing */ 
+    {"AT+ICLOK?\r", "\r\n+ICLOK:0\r\n\r\nOK\r\n"},                  /* V.250 6.2.14 - Select sync transmit clock source */ 
+    {"AT+IDSR?\r", "\r\n+IDSR:0\r\n\r\nOK\r\n"},                    /* V.250 6.2.16 - Select data set ready option */ 
+    {"AT+IFC\r", "\r\nOK\r\n"},                                     /* V.250 6.2.12 - DTE-DCE local flow control */ 
+    {"AT+ILRR\r", "\r\nOK\r\n"},                                    /* V.250 6.2.13 - DTE-DCE local rate reporting */ 
+    {"AT+ILSD=?\r", "\r\n+ILSD:(0,1)\r\n\r\nOK\r\n"},               /* V.250 6.2.15 - Select long space disconnect option */ 
+    {"AT+ILSD?\r", "\r\n+ILSD:0\r\n\r\nOK\r\n"},
+    {"AT+IPR=?\r", "\r\n+IPR:(115200),(115200)\r\n\r\nOK\r\n"},     /* V.250 6.2.10 - Fixed DTE rate */ 
+    {"AT+IPR?\r", "\r\n+IPR:0\r\n\r\nOK\r\n"},
+    {"AT+IRTS=?\r", "\r\n+IRTS:(0,1)\r\n\r\nOK\r\n"},               /* V.250 6.2.17 - Select synchronous mode RTS option */ 
+    {"AT+IRTS?\r", "\r\n+IRTS:0\r\n\r\nOK\r\n"},
+    {"AT+MA\r", "\r\nOK\r\n"},                                      /* V.250 6.4.2 - Modulation automode control */ 
+    {"AT+MR=?\r", "\r\n+MR:(0,1)\r\n\r\nOK\r\n"},                   /* V.250 6.4.3 - Modulation reporting control */ 
+    {"AT+MR?\r", "\r\n+MR:0\r\n\r\nOK\r\n"},
+    {"AT+MS\r", "\r\nOK\r\n"},                                      /* V.250 6.4.1 - Modulation selection */ 
+    {"AT+MSC=?\r", "\r\n+MSC:(0,1)\r\n\r\nOK\r\n"},                 /* V.250 6.4.8 - Seamless rate change enable */ 
+    {"AT+MSC?\r", "\r\n+MSC:0\r\n\r\nOK\r\n"},
+    {"AT+MV18AM\r", "\r\nOK\r\n"},                                  /* V.250 6.4.6 - V.18 answering message editing */ 
+    {"AT+MV18P=?\r", "\r\n+MV18P:(2-7)\r\n\r\nOK\r\n"},             /* V.250 6.4.7 - Order of probes */ 
+    {"AT+MV18P?\r", "\r\n+MV18P:0\r\n\r\nOK\r\n"},
+    {"AT+MV18R=?\r", "\r\n+MV18R:(0,1)\r\n\r\nOK\r\n"},             /* V.250 6.4.5 - V.18 reporting control */ 
+    {"AT+MV18R?\r", "\r\n+MV18R:0\r\n\r\nOK\r\n"},
+    {"AT+MV18S\r", "\r\nOK\r\n"},                                   /* V.250 6.4.4 - V.18 selection */ 
+    {"AT+TADR\r", "\r\nOK\r\n"},                                    /* V.250 6.7.2.9 - Local V.54 address */ 
+    {"AT+TAL=?\r", "\r\n+TAL:(0,1),(0,1)\r\n\r\nOK\r\n"},           /* V.250 6.7.2.15 - Local analogue loop */ 
+    {"AT+TAL?\r", "\r\n+TAL:0,0\r\n\r\nOK\r\n"},
+    {"AT+TALS=?\r", "\r\n+TALS:(0-3)\r\n\r\nOK\r\n"},               /* V.250 6.7.2.6 - Analogue loop status */ 
+    {"AT+TALS?\r", "\r\n+TALS:0\r\n\r\nOK\r\n"},
+    {"AT+TDLS=?\r", "\r\n+TDLS:(0-4)\r\n\r\nOK\r\n"},               /* V.250 6.7.2.7 - Local digital loop status */ 
+    {"AT+TDLS?\r", "\r\n+TDLS:0\r\n\r\nOK\r\n"},
+    {"AT+TE140=?\r", "\r\n+TE140:(0,1)\r\n\r\nOK\r\n"},             /* V.250 6.7.2.1 - Enable ckt 140 */ 
+    {"AT+TE140?\r", "\r\n+TE140:0\r\n\r\nOK\r\n"},
+    {"AT+TE141=?\r", "\r\n+TE141:(0,1)\r\n\r\nOK\r\n"},             /* V.250 6.7.2.2 - Enable ckt 141 */ 
+    {"AT+TE141?\r", "\r\n+TE141:0\r\n\r\nOK\r\n"},
+    {"AT+TEPAL=?\r", "\r\n+TEPAL:(0,1)\r\n\r\nOK\r\n"},             /* V.250 6.7.2.5 - Enable front panel analogue loop */ 
+    {"AT+TEPAL?\r", "\r\n+TEPAL:0\r\n\r\nOK\r\n"},
+    {"AT+TEPDL=?\r", "\r\n+TEPDL:(0,1)\r\n\r\nOK\r\n"},             /* V.250 6.7.2.4 - Enable front panel RDL */ 
+    {"AT+TEPDL?\r", "\r\n+TEPDL:0\r\n\r\nOK\r\n"},
+    {"AT+TERDL=?\r", "\r\n+TERDL:(0,1)\r\n\r\nOK\r\n"},             /* V.250 6.7.2.3 - Enable RDL from remote */ 
+    {"AT+TERDL?\r", "\r\n+TERDL:0\r\n\r\nOK\r\n"},
+    {"AT+TLDL=?\r", "\r\n+TLDL:(0,1)\r\n\r\nOK\r\n"},               /* V.250 6.7.2.13 - Local digital loop */ 
+    {"AT+TLDL?\r", "\r\n+TLDL:0\r\n\r\nOK\r\n"},
+    {"AT+TMODE=?\r", "\r\n+TMODE:(0,1)\r\n\r\nOK\r\n"},             /* V.250 6.7.2.10 - Set V.54 mode */ 
+    {"AT+TMODE?\r", "\r\n+TMODE:0\r\n\r\nOK\r\n"},
+    {"AT+TNUM\r", "\r\nOK\r\n"},                                    /* V.250 6.7.2.12 - Errored bit and block counts */ 
+    {"AT+TRDL=?\r", "\r\n+TRDL:(0,1)\r\n\r\nOK\r\n"},               /* V.250 6.7.2.14 - Request remote digital loop */ 
+    {"AT+TRDL?\r", "\r\n+TRDL:0\r\n\r\nOK\r\n"},
+    {"AT+TRDLS\r", "\r\nOK\r\n"},                                   /* V.250 6.7.2.8 - Remote digital loop status */ 
+    {"AT+TRES=?\r", "\r\n+TRES:(0-2)\r\n\r\nOK\r\n"},               /* V.250 6.7.2.17 - Self test result */ 
+    {"AT+TRES?\r", "\r\n+TRES:0\r\n\r\nOK\r\n"},
+    {"AT+TSELF=?\r", "\r\n+TSELF:(0,1)\r\n\r\nOK\r\n"},             /* V.250 6.7.2.16 - Self test */ 
+    {"AT+TSELF?\r", "\r\n+TSELF:0\r\n\r\nOK\r\n"},
+    {"AT+TTER=?\r", "\r\n+TTER:(0-65535),(0-65535)\r\n\r\nOK\r\n"}, /* V.250 6.7.2.11 - Test error rate */ 
+    {"AT+TTER?\r", "\r\n+TTER:0,0\r\n\r\nOK\r\n"},
+    {"AT+VBT\r", "\r\nOK\r\n"},                                     /* 3GPP TS 27.007 C.2.2 - Buffer threshold setting */
+    {"AT+VCID=?\r", "\r\n0,1\r\n\r\nOK\r\n"},                       /* 3GPP TS 27.007 C.2.3 - Calling number ID presentation */
+    {"AT+VCID?\r", "\r\n0\r\n\r\nOK\r\n"},
+    {"AT+VDR\r", "\r\nOK\r\n"},                                     /* V.253 10.3.1 - Distinctive ring (ring cadence reporting) */
+    {"AT+VDT\r", "\r\nOK\r\n"},                                     /* V.253 10.3.2 - Control tone cadence reporting */
+    {"AT+VDX\r", "\r\nOK\r\n"},                                     /* V.253 10.5.6 - Speakerphone duplex mode */
+    {"AT+VEM\r", "\r\nOK\r\n"},                                     /* V.253 10.5.7 - Deliver event reports */
+    {"AT+VGM\r", "\r\nOK\r\n"},                                     /* V.253 10.5.2 - Microphone gain */
+    {"AT+VGR\r", "\r\nOK\r\n"},                                     /* V.253 10.2.1 - Receive gain selection */
+    {"AT+VGS\r", "\r\nOK\r\n"},                                     /* V.253 10.5.3 - Speaker gain */
+    {"AT+VGT\r", "\r\nOK\r\n"},                                     /* V.253 10.2.2 - Volume selection */
+    {"AT+VIP\r", "\r\nOK\r\n"},                                     /* V.253 10.1.1 - Initialize voice parameters */
+    {"AT+VIT\r", "\r\nOK\r\n"},                                     /* V.253 10.2.3 - DTE/DCE inactivity timer */
+    {"AT+VLS\r", "\r\nOK\r\n"},                                     /* V.253 10.2.4 - Analogue source/destination selection */
+    {"AT+VPP\r", "\r\nOK\r\n"},                                     /* V.253 10.4.2 - Voice packet protocol */
+    {"AT+VRA\r", "\r\nOK\r\n"},                                     /* V.253 10.2.5 - Ringing tone goes away timer */
+    {"AT+VRID?\r", "\r\n0\r\n\r\nOK\r\n"},                          /* Extension - Find the originating and destination numbers */
+    {"AT+VRL\r", "\r\nOK\r\n"},                                     /* V.253 10.1.2 - Ring local phone */
+    {"AT+VRN\r", "\r\nOK\r\n"},                                     /* V.253 10.2.6 - Ringing tone never appeared timer */
+    {"AT+VRX\r", "\r\nOK\r\n"},                                     /* V.253 10.1.3 - Voice receive state */
+    {"AT+VSD\r", "\r\nOK\r\n"},                                     /* V.253 10.2.7 - Silence detection (QUIET and SILENCE) */
+    {"AT+VSID=12345\r", "\r\nOK\r\n"},                              /* Extension - Set the originating number */
+    {"AT+vsid?\r", "\r\n12345\r\n\r\nOK\r\n"},                      /* Extension - Set the originating number */
+    {"AT+VSM\r", "\r\nOK\r\n"},                                     /* V.253 10.2.8 - Compression method selection */
+    {"AT+VSP\r", "\r\nOK\r\n"},                                     /* V.253 10.5.1 - Voice speakerphone state */
+    {"AT+VTA\r", "\r\nOK\r\n"},                                     /* V.253 10.5.4 - Train acoustic echo-canceller */ 
+    {"AT+VTD\r", "\r\nOK\r\n"},                                     /* V.253 10.2.9 - Beep tone duration timer */
+    {"AT+VTH\r", "\r\nOK\r\n"},                                     /* V.253 10.5.5 - Train line echo-canceller */ 
+    {"AT+VTR\r", "\r\nOK\r\n"},                                     /* V.253 10.1.4 - Voice duplex state */
+    {"AT+VTS\r", "\r\nOK\r\n"},                                     /* V.253 10.1.5 - DTMF and tone generation in voice */
+    {"AT+VTX\r", "\r\nOK\r\n"},                                     /* V.253 10.1.6 - Transmit data state */
+    {"AT+WS46\r", "\r\nOK\r\n"},                                    /* 3GPP TS 27.007 5.9 - PCCA STD-101 [17] select wireless network */
+    {"ATA\r", "\r\nERROR\r\n"},                                     /* V.250 6.3.5 - Answer */ 
+    {"ATDT1234567890ABCDPSTW*#+,!@\r", ""},                         /* V.250 6.3.1 - Dial */ 
+    {"ATE1\r", "\r\nOK\r\n"},                                       /* V.250 6.2.4 - Command echo */ 
+    {"ATE0\r", "ATE0\r\r\nOK\r\n"},                                 /* V.250 6.2.4 - Command echo */ 
+    {"ATH\r", "\r\nOK\r\n"},                                        /* V.250 6.3.6 - Hook control */ 
+    {"ATI\r", "\r\n" PACKAGE "\r\n\r\nOK\r\n"},                     /* V.250 6.1.3 - Request identification information */ 
+    {"ATL\r", "\r\nOK\r\n"},                                        /* V.250 6.3.13 - Monitor speaker loudness */ 
+    {"ATM\r", "\r\nOK\r\n"},                                        /* V.250 6.3.14 - Monitor speaker mode */ 
+    {"ATO\r", "\r\nCONNECT\r\n\r\nOK\r\n"},                         /* V.250 6.3.7 - Return to online data state */ 
+    {"ATP\r", "\r\nOK\r\n"},                                        /* V.250 6.3.3 - Select pulse dialling (command) */ 
+    {"ATQ\r", "\r\nOK\r\n"},                                        /* V.250 6.2.5 - Result code suppression */ 
+    {"ATS0=?\r", "\r\n000\r\n\r\nOK\r\n"},                          /* V.250 6.3.8 - Automatic answer */ 
+    {"ATS0?\r", "\r\n000\r\n\r\nOK\r\n"},
+    {"ATS10=?\r", "\r\n000\r\n\r\nOK\r\n"},                         /* V.250 6.3.12 - Automatic disconnect delay */ 
+    {"ATS10?\r", "\r\n000\r\n\r\nOK\r\n"},
+    {"ATS3=?\r", "\r\n000\r\n\r\nOK\r\n"},                          /* V.250 6.2.1 - Command line termination character */ 
+    {"ATS3?\r", "\r\n013\r\n\r\nOK\r\n"},
+    {"ATS4=?\r", "\r\n000\r\n\r\nOK\r\n"},                          /* V.250 6.2.2 - Response formatting character */ 
+    {"ATS4?\r", "\r\n010\r\n\r\nOK\r\n"},
+    {"ATS5=?\r", "\r\n000\r\n\r\nOK\r\n"},                          /* V.250 6.2.3 - Command line editing character */ 
+    {"ATS5?\r", "\r\n008\r\n\r\nOK\r\n"},
+    {"ATS6=?\r", "\r\n000\r\n\r\nOK\r\n"},                          /* V.250 6.3.9 - Pause before blind dialling */ 
+    {"ATS6?\r", "\r\n001\r\n\r\nOK\r\n"},
+    {"ATS7=?\r", "\r\n000\r\n\r\nOK\r\n"},                          /* V.250 6.3.10 - Connection completion timeout */ 
+    {"ATS7?\r", "\r\n060\r\n\r\nOK\r\n"},
+    {"ATS8=?\r", "\r\n000\r\n\r\nOK\r\n"},                          /* V.250 6.3.11 - Comma dial modifier time */ 
+    {"ATS8?\r", "\r\n005\r\n\r\nOK\r\n"},
+    {"ATT\r", "\r\nOK\r\n"},                                        /* V.250 6.3.2 - Select tone dialling (command) */ 
+    {"ATV0\r", "0\r"},                                              /* V.250 6.2.6 - DCE response format */ 
+    {"ATV1\r", "\r\nOK\r\n"},
+    {"ATX4\r", "\r\nOK\r\n"},                                       /* V.250 6.2.7 - Result code selection and call progress monitoring control */ 
+    {"ATZ\r", "\r\nOK\r\n"},                                        /* V.250 6.1.1 - Reset to default configuration */
+    {"", ""}
+};
+
+char *decode_test_file = NULL;
+int countdown = 0;
+int command_response_test_step = -1;
+char response_buf[1000];
+int response_buf_ptr = 0;
+
+static int at_rx(at_state_t *s, const char *t, int len)
+{
+    at_interpreter(s, t, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int at_send(at_state_t *s, const char *t)
+{
+    printf("%s", t);
+    at_rx(s, t, strlen(t));
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int at_send_at(at_state_t *s, const char *t)
+{
+    uint8_t buf[500];
+
+    sprintf((char *) buf, "AT%s\r", t);
+    printf("%s", t);
+    at_rx(s, t, strlen(t));
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int at_expect(at_state_t *s, const char *t)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int at_send_hdlc(at_state_t *s, uint8_t *t, int len)
+{
+    uint8_t buf[100];
+    int i;
+    int j;
+
+    for (i = 0, j = 0;  i < len;  i++)
+    {
+        if (*t == DLE)
+            buf[j++] = DLE;
+        buf[j++] = *t++;
+    }
+    buf[j++] = DLE;
+    buf[j++] = ETX;
+    at_rx(s, (char *) buf, j);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int general_test(at_state_t *s)
+{
+    int i;
+    
+    for (i = 0;  general_test_seq[i].command[0];  i++)
+    {
+        response_buf_ptr = 0;
+        response_buf[0] = '\0';
+        command_response_test_step = i;
+        at_send(s, general_test_seq[i].command);    
+        if (strcmp(general_test_seq[command_response_test_step].response, response_buf) != 0)
+        {
+            printf("Incorrect response\n");
+            printf("Expected: '%s'\n", general_test_seq[command_response_test_step].response);
+            printf("Received: '%s'\n", response_buf);
+            return -1;
+        }
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int modem_call_control(at_state_t *s, void *user_data, int op, const char *num)
+{
+    switch (op)
+    {
+    case AT_MODEM_CONTROL_CALL:
+        printf("\nModem control - Dialing '%s'\n", num);
+        break;
+    case AT_MODEM_CONTROL_ANSWER:
+        printf("\nModem control - Answering\n");
+        /* Force an error response, so we get something well defined for the test. */
+        return -1;
+    case AT_MODEM_CONTROL_HANGUP:
+        printf("\nModem control - Hanging up\n");
+        break;
+    case AT_MODEM_CONTROL_OFFHOOK:
+        printf("\nModem control - Going off hook\n");
+        break;
+    case AT_MODEM_CONTROL_ONHOOK:
+        printf("\nModem control - Going on hook\n");
+        break;
+    case AT_MODEM_CONTROL_DTR:
+        printf("\nModem control - DTR %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_RTS:
+        printf("\nModem control - RTS %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_CTS:
+        printf("\nModem control - CTS %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_CAR:
+        printf("\nModem control - CAR %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_RNG:
+        printf("\nModem control - RNG %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_DSR:
+        printf("\nModem control - DSR %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_SETID:
+        printf("\nModem control - Set ID '%s'\n", num);
+        break;
+    case AT_MODEM_CONTROL_RESTART:
+        printf("\nModem control - Restart %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_DTE_TIMEOUT:
+        printf("\nModem control - Set DTE timeout %d\n", (int) (intptr_t) num);
+        break;
+    default:
+        printf("\nModem control - operation %d\n", op);
+        break;
+    }
+    /*endswitch*/
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int at_tx_handler(at_state_t *s, void *user_data, const uint8_t *buf, size_t len)
+{
+    int i;
+
+    for (i = 0;  i < len;  i++)
+    {
+        response_buf[response_buf_ptr++] = buf[i];
+        putchar(buf[i]);
+    }
+    response_buf[response_buf_ptr] = '\0';
+    
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    at_state_t at_state;
+    
+    if (at_init(&at_state, at_tx_handler, NULL, modem_call_control, NULL) == NULL)
+    {
+        fprintf(stderr, "Cannot start the AT interpreter\n");
+        exit(2);
+    }
+    if (general_test(&at_state))
+    {
+        printf("Tests failed.\n");
+        exit(2);
+    }
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/awgn_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,150 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * awgn_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: awgn_tests.c,v 1.12 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \page awgn_tests_page AWGN tests
+\section awgn_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#if !defined(M_PI)
+# define M_PI           3.14159265358979323846  /* pi */
+#endif
+
+#define OUT_FILE_NAME   "awgn.wav"
+
+/* Some simple sanity tests for the Gaussian noise generation routines */
+
+int main (int argc, char *argv[])
+{
+    int i;
+    int j;
+    int clip_high;
+    int clip_low;
+    int total_samples;
+    int idum = 1234567;
+    int16_t value;
+    double total;
+    double x;
+    double p;
+    double o;
+    double error;
+    int bins[65536];
+    awgn_state_t noise_source;
+
+    /* Generate noise at several RMS levels between -50dBm and 0dBm. Noise is
+       generated for a large number of samples (1,000,000), and the RMS value
+       of the noise is calculated along the way. If the resulting level is
+       close to the requested RMS level, at least the scaling of the noise
+       should be Ok. At high level some clipping may distort the result a
+       little. */
+    for (j = -50;  j <= 0;  j += 5)
+    {
+        clip_high = 0;
+        clip_low = 0;
+        total = 0.0;
+        awgn_init_dbm0(&noise_source, idum, (float) j);
+        total_samples = 1000000;
+        for (i = 0;  i < total_samples;  i++)
+        {
+            value = awgn(&noise_source);
+            if (value == 32767)
+                clip_high++;
+            else if (value == -32768)
+                clip_low++;
+            total += ((double) value)*((double) value);
+        }
+        error = 100.0*(1.0 - sqrt(total/total_samples)/noise_source.rms);
+        printf("RMS = %.3f (expected %d) %.2f%% error [clipped samples %d+%d]\n",
+               log10(sqrt(total/total_samples)/32768.0)*20.0 + DBM0_MAX_POWER,
+               j,
+               error,
+               clip_low,
+               clip_high);
+        /* We don't check the result at 0dBm0, as there will definitely be a lot of error due to clipping */
+        if (j < 0  &&  fabs(error) > 0.2)
+        {
+            printf("Test failed.\n");
+            exit(2);
+        }
+    }
+    /* Now look at the statistical spread of the results, by collecting data in
+       bins from a large number of samples. Use a fairly high noise level, but
+       low enough to avoid significant clipping. Use the Gaussian model to
+       predict the real probability, and present the results for graphing. */
+    memset(bins, 0, sizeof(bins));
+    clip_high = 0;
+    clip_low = 0;
+    awgn_init_dbm0(&noise_source, idum, -15);
+    total_samples = 10000000;
+    for (i = 0;  i < total_samples;  i++)
+    {
+        value = awgn(&noise_source);
+        if (value == 32767)
+            clip_high++;
+        else if (value == -32768)
+            clip_low++;
+        bins[value + 32768]++;
+    }
+    o = noise_source.rms;
+    for (i = 0;  i < 65536 - 10;  i++)
+    {
+        x = i - 32768;
+        /* Find the real probability for this bin */
+        p = (1.0/(o*sqrt(2.0*M_PI)))*exp(-(x*x)/(2.0*o*o));
+        /* Now do a little smoothing on the real data to get a reasonably
+           steady answer */
+        x = 0;
+        for (j = 0;  j < 10;  j++)
+            x += bins[i + j];
+        x /= 10.0;
+        x /= total_samples;
+        /* Now send it out for graphing. */
+        printf("%6d %.7f %.7f\n", i - 32768, x, p);
+    }
+    
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/bell_mf_rx_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,559 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bell_mf_tests.c - Test the Bell MF detector against the spec., whatever the
+ *                   spec. may be :)
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bell_mf_rx_tests.c,v 1.6 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page bell_mf_tests_page Bell MF tone generation and detection tests
+\section bell_mf_tests_page_sec_1 What does it do?
+These tests are fashioned after those on the CM7291 test tape from
+Mitel. Those tests are for DTMF, rather than Bell MF, but make a
+fair starting point for a set of meaningful tests of Bell MF.
+
+These tests include conversion to and from A-law. It is assumed the
+distortion this produces is comparable to u-law, so it should be
+a fair test of performance in a real PSTN channel.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+/* Basic Bell MF specs:
+ *
+ * Signal generation:
+ *   Tone on time = KP: 100+-7ms. All other signals: 68+-7ms
+ *   Tone off time (between digits) = 68+-7ms
+ *   Frequency tolerance +- 1.5%
+ *   Signal level -7+-1dBm per frequency
+ *
+ * Signal reception:
+ *   Frequency tolerance +- 1.5% +-10Hz
+ *   Signal level -14dBm to 0dBm
+ *   Perform a "two and only two tones present" test.
+ *   Twist <= 6dB accepted
+ *   Receiver sensitive to signals above -22dBm per frequency
+ *   Test for a minimum of 55ms if KP, or 30ms of other signals.
+ *   Signals to be recognised if the two tones arrive within 8ms of each other.
+ *   Invalid signals result in the return of the re-order tone.
+ */
+
+#define MF_DURATION                 (68*8)
+#define MF_PAUSE                    (68*8)
+#define MF_CYCLE                    (MF_DURATION + MF_PAUSE)
+
+typedef struct
+{
+    float       f1;         /* First freq */
+    float       f2;         /* Second freq */
+    int8_t      level1;     /* Level of the first freq (dB) */
+    int8_t      level2;     /* Level of the second freq (dB) */
+    uint8_t     on_time;    /* Tone on time (ms) */
+    uint8_t     off_time;   /* Minimum post tone silence (ms) */
+} mf_digit_tones_t;
+
+static const mf_digit_tones_t bell_mf_tones[] =
+{
+    { 700.0,  900.0, -7, -7,  68, 68},
+    { 700.0, 1100.0, -7, -7,  68, 68},
+    { 900.0, 1100.0, -7, -7,  68, 68},
+    { 700.0, 1300.0, -7, -7,  68, 68},
+    { 900.0, 1300.0, -7, -7,  68, 68},
+    {1100.0, 1300.0, -7, -7,  68, 68},
+    { 700.0, 1500.0, -7, -7,  68, 68},
+    { 900.0, 1500.0, -7, -7,  68, 68},
+    {1100.0, 1500.0, -7, -7,  68, 68},
+    {1300.0, 1500.0, -7, -7,  68, 68},
+    { 700.0, 1700.0, -7, -7,  68, 68}, /* ST''' - use 'C' */
+    { 900.0, 1700.0, -7, -7,  68, 68}, /* ST'   - use 'A' */
+    {1100.0, 1700.0, -7, -7, 100, 68}, /* KP    - use '*' */
+    {1300.0, 1700.0, -7, -7,  68, 68}, /* ST''  - use 'B' */
+    {1500.0, 1700.0, -7, -7,  68, 68}, /* ST    - use '#' */
+    {0.0, 0.0, 0, 0, 0, 0}
+};
+
+static tone_gen_descriptor_t my_mf_digit_tones[16];
+
+static char bell_mf_tone_codes[] = "1234567890CA*B#";
+
+int callback_ok;
+int callback_roll;
+
+static void my_mf_gen_init(float low_fudge,
+                           int low_level,
+                           float high_fudge,
+                           int high_level,
+                           int duration,
+                           int gap)
+{
+    int i;
+
+    /* The fiddle factor on the tone duration is to make KP consistently
+       50% longer than the other digits, as the digit durations are varied
+       for the tests. This is an approximation, as the real scaling should
+       be 100/68 */
+    for (i = 0;  i < 15;  i++)
+    {
+        make_tone_gen_descriptor(&my_mf_digit_tones[i],
+                                 bell_mf_tones[i].f1*(1.0 + low_fudge),
+                                 low_level,
+                                 bell_mf_tones[i].f2*(1.0 + high_fudge),
+                                 high_level,
+                                 (i == 12)  ?  3*duration/2  :  duration,
+                                 gap,
+                                 0,
+                                 0,
+                                 FALSE);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int my_mf_generate(int16_t amp[], const char *digits)
+{
+    int len;
+    char *cp;
+    tone_gen_state_t tone;
+
+    len = 0;
+    while (*digits)
+    {
+        if ((cp = strchr(bell_mf_tone_codes, *digits)))
+        {
+            tone_gen_init(&tone, &my_mf_digit_tones[cp - bell_mf_tone_codes]);
+            len += tone_gen(&tone, amp + len, 9999);
+        }
+        digits++;
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void codec_munge(int16_t amp[], int len)
+{
+    int i;
+    uint8_t alaw;
+    
+    for (i = 0;  i < len;  i++)
+    {
+        alaw = linear_to_alaw (amp[i]);
+        amp[i] = alaw_to_linear (alaw);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+#define ALL_POSSIBLE_DIGITS     "1234567890CA*B#"
+
+static void digit_delivery(void *data, const char *digits, int len)
+{
+    int i;
+    int seg;
+    const char *s = ALL_POSSIBLE_DIGITS;
+    const char *t;
+
+    if (data == (void *) 0x12345678)
+    {
+        callback_ok = TRUE;
+        t = s + callback_roll;
+        seg = 15 - callback_roll;
+        for (i = 0;  i < len;  i += seg, seg = 15)
+        {
+            if (i + seg > len)
+                seg = len - i;
+            if (memcmp(digits + i, t, seg))
+            {
+                callback_ok = FALSE;
+                printf("Fail at %d %d\n", i, seg);
+                break;
+            }
+            t = s;
+            callback_roll = (callback_roll + seg)%15;
+        }
+    }
+    else
+    {
+        callback_ok = FALSE;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int16_t amp[1000000];
+
+int main(int argc, char *argv[])
+{
+    int duration;
+    int i;
+    int j;
+    int len;
+    int sample;
+    const char *s;
+    char digit[2];
+    char buf[MAX_BELL_MF_DIGITS + 1];
+    int actual;
+    int nplus;
+    int nminus;
+    float rrb;
+    float rcfo;
+    time_t now;
+    bell_mf_rx_state_t mf_state;
+    awgn_state_t noise_source;
+
+    time(&now);
+    bell_mf_rx_init(&mf_state, NULL, NULL);
+
+    /* Test 1: Mitel's test 1 isn't really a test. Its a calibration step,
+       which has no meaning here. */
+    printf ("Test 1: Calibration\n");
+    printf ("    Passed\n");
+
+    /* Test 2: Decode check
+       This is a sanity check, that all digits are reliably detected
+       under ideal conditions.  Each possible digit is repeated 10 times,
+       with 68ms bursts. The level of each tone is about 6dB down from clip */
+    printf ("Test 2: Decode check\n");
+    my_mf_gen_init(0.0, -3, 0.0, -3, 68, 68);
+    s = ALL_POSSIBLE_DIGITS;
+    digit[1] = '\0';
+    while (*s)
+    {
+        digit[0] = *s++;
+        for (i = 0;  i < 10;  i++)
+        {
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+            actual = bell_mf_rx_get(&mf_state, buf, 128);
+            if (actual != 1  ||  buf[0] != digit[0])
+            {
+                printf ("    Sent     '%s'\n", digit);
+                printf ("    Received '%s' [%d]\n", buf, actual);
+                printf ("    Failed\n");
+                exit (2);
+            }
+        }
+    }
+    printf ("    Passed\n");
+
+    /* Test 3: Recognition bandwidth and channel centre frequency check.
+       Use all digits. Each digit types requires four tests to complete
+       the check. Each section contains 40 pulses of 68ms duration,
+       with an amplitude of -20dB from clip per frequency.
+
+       Four sections covering the tests for one tone (1 digit) are:
+       a. H frequency at 0% deviation from center, L frequency at +0.1%.
+          L frequency is then increments in +01.% steps up to +4%. The
+          number of tone bursts is noted and designated N+.
+       b. H frequency at 0% deviation, L frequency at -0.1%. L frequency
+          is then incremental in -0.1% steps, up to -4%. The number of
+          tone bursts is noted and designated N-.
+       c. The test in (a) is repeated with the L frequency at 0% and the
+          H frequency varied up to +4%.
+       d. The test in (b) is repeated with the L frequency and 0% and the
+          H frequency varied to -4%.
+
+       Receiver Recognition Bandwidth (RRB) is calculated as follows:
+            RRB% = (N+ + N-)/10
+       Receiver Center Frequency Offset (RCFO) is calculated as follows:
+            RCFO% = X + (N+ - N-)/20
+            
+       Note that this test doesn't test what it says it is testing at all,
+       and the results are quite inaccurate, if not a downright lie! However,
+       it follows the Mitel procedure, so how can it be bad? :)
+       
+       The spec calls for +-1.5% +-10Hz of bandwidth.
+    */
+    printf ("Test 3: Recognition bandwidth and channel centre frequency check\n");
+    s = ALL_POSSIBLE_DIGITS;
+    digit[1] = '\0';
+    j = 0;
+    while (*s)
+    {
+        digit[0] = *s++;
+        for (nplus = 0, i = 1;  i <= 60;  i++)
+        {
+            my_mf_gen_init((float) i/1000.0, -17, 0.0, -17, 68, 68);
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+            nplus += bell_mf_rx_get(&mf_state, buf, 128);
+        }
+        for (nminus = 0, i = -1;  i >= -60;  i--)
+        {
+            my_mf_gen_init((float) i/1000.0, -17, 0.0, -17, 68, 68);
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+            nminus += bell_mf_rx_get(&mf_state, buf, 128);
+        }
+        rrb = (float) (nplus + nminus)/10.0;
+        rcfo = (float) (nplus - nminus)/10.0;
+        printf ("    %c (low)  rrb = %5.2f%%, rcfo = %5.2f%%, max -ve = %5.2f, max +ve = %5.2f\n",
+                digit[0],
+                rrb,
+                rcfo,
+                (float) nminus/10.0,
+                (float) nplus/10.0);
+
+        if (rrb < 3.0 + rcfo + (2.0*100.0*10.0/bell_mf_tones[j].f1)  ||  rrb >= 15.0 + rcfo)
+        {
+            printf ("    Failed\n");
+            exit (2);
+        }
+
+        for (nplus = 0, i = 1;  i <= 60;  i++)
+        {
+            my_mf_gen_init(0.0, -17, (float) i/1000.0, -17, 68, 68);
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+            nplus += bell_mf_rx_get(&mf_state, buf, 128);
+        }
+        for (nminus = 0, i = -1;  i >= -60;  i--)
+        {
+            my_mf_gen_init(0.0, -17, (float) i/1000.0, -17, 68, 68);
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+            nminus += bell_mf_rx_get(&mf_state, buf, 128);
+        }
+        rrb = (float) (nplus + nminus)/10.0;
+        rcfo = (float) (nplus - nminus)/10.0;
+        printf ("    %c (high) rrb = %5.2f%%, rcfo = %5.2f%%, max -ve = %5.2f, max +ve = %5.2f\n",
+                digit[0],
+                rrb,
+                rcfo,
+                (float) nminus/10.0,
+                (float) nplus/10.0);
+        if (rrb < 3.0 + rcfo + (2.0*100.0*10.0/bell_mf_tones[j].f2)  ||  rrb >= 15.0 + rcfo)
+        {
+            printf ("    Failed\n");
+            exit (2);
+        }
+        j++;
+    }
+    printf ("    Passed\n");
+
+    /* Test 4: Acceptable amplitude ratio (twist).
+       Twist all digits in both directions, and check the maximum twist
+       we can accept. The way this is done is styled after the Mitel DTMF
+       test, and has good and bad points. */
+
+    printf ("Test 4: Acceptable amplitude ratio (twist)\n");
+    s = ALL_POSSIBLE_DIGITS;
+    digit[1] = '\0';
+    while (*s)
+    {
+        digit[0] = *s++;
+        for (nplus = 0, i = -50;  i >= -250;  i--)
+        {
+            my_mf_gen_init(0.0, -5, 0.0, i/10, 68, 68);
+
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+            nplus += bell_mf_rx_get(&mf_state, buf, 128);
+        }
+        printf("    %c normal twist  = %.2fdB\n", digit[0], (float) nplus/10.0);
+        if (nplus < 60)
+        {
+            printf("    Failed\n");
+            exit(2);
+        }
+        for (nminus = 0, i = -50;  i >= -250;  i--)
+        {
+            my_mf_gen_init(0.0, i/10, 0.0, -5, 68, 68);
+
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+            nminus += bell_mf_rx_get(&mf_state, buf, 128);
+        }
+        printf("    %c reverse twist = %.2fdB\n", digit[0], (float) nminus/10.0);
+        if (nminus < 60)
+        {
+            printf("    Failed\n");
+            exit(2);
+        }
+    }
+    printf("    Passed\n");
+
+    /* Test 5: Dynamic range
+       This test sends all possible digits, with gradually increasing 
+       amplitude. We determine the span over which we achieve reliable
+       detection. The spec says we should detect between -14dBm and 0dBm,
+       but the tones clip above -3dBm, so this cannot really work. */
+       
+    printf("Test 5: Dynamic range\n");
+    for (nplus = nminus = -1000, i = -50;  i <= 3;  i++)
+    {
+        my_mf_gen_init(0.0, i, 0.0, i, 68, 68);
+        for (j = 0;  j < 100;  j++)
+        {
+            len = my_mf_generate(amp, ALL_POSSIBLE_DIGITS);
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+            if (bell_mf_rx_get(&mf_state, buf, 128) != 15)
+                break;
+            if (strcmp(buf, ALL_POSSIBLE_DIGITS) != 0)
+                break;
+        }
+        if (j == 100)
+        {
+            if (nplus == -1000)
+                nplus = i;
+        }
+        else
+        {
+            if (nplus != -1000  &&  nminus == -1000)
+                nminus = i;
+        }
+    }
+    printf("    Dynamic range = %ddB to %ddB\n", nplus, nminus - 1);
+    if (nplus > -22  ||  nminus <= -3)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+    printf("    Passed\n");
+
+    /* Test 6: Guard time
+       This test sends all possible digits, with a gradually reducing 
+       duration. The spec defines a narrow range of tone duration
+       times we can expect, so as long as we detect reliably at the
+       specified minimum we should be OK. However, the spec also says
+       we should detect on a minimum of 55ms of KP, or 30ms of other
+       digits. */
+
+    printf("Test 6: Guard time\n");
+    for (i = 30;  i < 62;  i++)
+    {
+        my_mf_gen_init(0.0, -5, 0.0, -3, i, 68);
+        for (j = 0;  j < 500;  j++)
+        {
+            len = my_mf_generate(amp, ALL_POSSIBLE_DIGITS);
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+
+            if (bell_mf_rx_get(&mf_state, buf, 128) != 15)
+                break;
+            if (strcmp(buf, ALL_POSSIBLE_DIGITS) != 0)
+                break;
+        }
+        if (j == 500)
+            break;
+    }
+    printf("    Guard time = %dms\n", i);
+    if (i > 61)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+    printf("    Passed\n");
+
+    /* Test 7: Acceptable signal to noise ratio
+       We send all possible digits at -6dBm from clip, mixed with AWGN.
+       We gradually reduce the noise until we get clean detection. */
+
+    printf("Test 7: Acceptable signal to noise ratio\n");
+    my_mf_gen_init(0.0, -3, 0.0, -3, 68, 68);
+    for (i = -10;  i > -50;  i--)
+    {
+        awgn_init_dbm0(&noise_source, 1234567, (float) i);
+        for (j = 0;  j < 500;  j++)
+        {
+            len = my_mf_generate(amp, ALL_POSSIBLE_DIGITS);
+            for (sample = 0;  sample < len;  sample++)
+                amp[sample] = saturate(amp[sample] + awgn(&noise_source));
+            codec_munge(amp, len);
+            bell_mf_rx(&mf_state, amp, len);
+
+            if (bell_mf_rx_get(&mf_state, buf, 128) != 15)
+                break;
+            if (strcmp(buf, ALL_POSSIBLE_DIGITS) != 0)
+                break;
+        }
+        if (j == 500)
+            break;
+    }
+    printf("    Acceptable S/N ratio is %ddB\n", -3 - i);
+    if (-3 - i > 26)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+    printf("    Passed\n");
+
+    /* The remainder of the Mitel tape is the talk-off test. This is
+       meaningless for Bell MF. However the decoder's tolerance of
+       out of band noise is significant. */
+    /* TODO: add a OOB tolerance test. */
+
+    /* Test the callback mode for delivering detected digits */
+
+    printf("Test: Callback digit delivery mode.\n");
+    callback_ok = FALSE;
+    callback_roll = 0;
+    bell_mf_rx_init(&mf_state, digit_delivery, (void *) 0x12345678);
+    my_mf_gen_init(0.0, -10, 0.0, -10, 68, 68);
+    for (i = 1;  i < 10;  i++)
+    {
+        len = 0;
+        for (j = 0;  j < i;  j++)
+            len += my_mf_generate(amp + len, ALL_POSSIBLE_DIGITS);
+        bell_mf_rx(&mf_state, amp, len);
+        if (!callback_ok)
+            break;
+    }
+    if (!callback_ok)
+    {
+        printf("    Failed\n");
+     	exit (2);
+    }
+    printf("    Passed\n");
+
+    duration = time (NULL) - now;
+    printf ("Tests passed in %ds\n", duration);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/bell_mf_tx_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,232 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bell_mf_tx_tests.c - Test the Bell MF generator.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bell_mf_tx_tests.c,v 1.4 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page bell_mf_tx_tests_page Bell MF generation tests
+\section bell_mf_tx_tests_page_sec_1 What does it do?
+???.
+
+\section bell_mf_tx_tests_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUTPUT_FILE_NAME    "bell_mf.wav"
+
+int main(int argc, char *argv[])
+{
+    bell_mf_tx_state_t gen;
+    int16_t amp[16384];
+    int len;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int add_digits;
+
+    filesetup = afNewFileSetup();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, 8000.0);
+    //afInitCompression(filesetup, AF_DEFAULT_TRACK, AF_COMPRESSION_G711_ALAW);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup);
+    if (outhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+
+    bell_mf_tx_init(&gen);
+    len = bell_mf_tx(&gen, amp, 16384);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    if (bell_mf_tx_put(&gen, "123"))
+        printf("Ooops\n");
+    len = bell_mf_tx(&gen, amp, 16384);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    if (bell_mf_tx_put(&gen, "456"))
+        printf("Ooops\n");
+    len = bell_mf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    if (bell_mf_tx_put(&gen, "789"))
+        printf("Ooops\n");
+    len = bell_mf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    if (bell_mf_tx_put(&gen, "*#"))
+        printf("Ooops\n");
+    len = bell_mf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    add_digits = 1;
+    do
+    {
+        len = bell_mf_tx(&gen, amp, 160);
+        printf("Generated %d samples\n", len);
+        if (len > 0)
+        {
+            outframes = afWriteFrames(outhandle,
+                                      AF_DEFAULT_TRACK,
+                                      amp,
+                                      len);
+        }
+        if (add_digits)
+        {
+            if (bell_mf_tx_put(&gen, "1234567890"))
+            {
+                printf("Digit buffer full\n");
+                add_digits = 0;
+            }
+        }
+    }
+    while (len > 0);
+
+    bell_mf_tx_init(&gen);
+    len = bell_mf_tx(&gen, amp, 16384);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    if (bell_mf_tx_put(&gen, "123"))
+        printf("Ooops\n");
+    len = bell_mf_tx(&gen, amp, 16384);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    if (bell_mf_tx_put(&gen, "456"))
+        printf("Ooops\n");
+    len = bell_mf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    if (bell_mf_tx_put(&gen, "789"))
+        printf("Ooops\n");
+    len = bell_mf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    if (bell_mf_tx_put(&gen, "0*#"))
+        printf("Ooops\n");
+    len = bell_mf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    if (bell_mf_tx_put(&gen, "ABC"))
+        printf("Ooops\n");
+    len = bell_mf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              len);
+    add_digits = 1;
+    do
+    {
+        len = bell_mf_tx(&gen, amp, 160);
+        printf("Generated %d samples\n", len);
+        if (len > 0)
+        {
+            outframes = afWriteFrames(outhandle,
+                                      AF_DEFAULT_TRACK,
+                                      amp,
+                                      len);
+        }
+        if (add_digits)
+        {
+            if (bell_mf_tx_put(&gen, "1234567890"))
+            {
+                printf("Digit buffer full\n");
+                add_digits = 0;
+            }
+        }
+    }
+    while (len > 0);
+
+    if (afCloseFile(outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit (2);
+    }
+    afFreeFileSetup(filesetup);
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/bert_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,491 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bert_tests.c - Tests for the BER tester.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bert_tests.c,v 1.18 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page bert_tests_page BERT tests
+\section bert_tests_page_sec_1 What does it do?
+These tests exercise each of the BERT standards supported by the BERT module.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+/* Use a local random generator, so the results are consistent across platforms */
+static int my_rand(void)
+{
+    static int rndnum = 1234567;
+
+    return (rndnum = 1664525U*rndnum + 1013904223U);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void reporter(void *user_data, int reason, bert_results_t *results)
+{
+    int channel;
+
+    channel = (int) (intptr_t) user_data;
+    switch (reason)
+    {
+    case BERT_REPORT_SYNCED:
+        printf("BERT report synced\n");
+        break;
+    case BERT_REPORT_UNSYNCED:
+        printf("BERT report unsync'ed\n");
+        break;
+    case BERT_REPORT_REGULAR:
+        printf("BERT report regular - %d bits, %d bad bits, %d resyncs\r", results->total_bits, results->bad_bits, results->resyncs);
+        break;
+    case BERT_REPORT_GT_10_2:
+        printf("BERT report > 1 in 10^2\n");
+        break;
+    case BERT_REPORT_LT_10_2:
+        printf("BERT report < 1 in 10^2\n");
+        break;
+    case BERT_REPORT_LT_10_3:
+        printf("BERT report < 1 in 10^3\n");
+        break;
+    case BERT_REPORT_LT_10_4:
+        printf("BERT report < 1 in 10^4\n");
+        break;
+    case BERT_REPORT_LT_10_5:
+        printf("BERT report < 1 in 10^5\n");
+        break;
+    case BERT_REPORT_LT_10_6:
+        printf("BERT report < 1 in 10^6\n");
+        break;
+    case BERT_REPORT_LT_10_7:
+        printf("BERT report < 1 in 10^7\n");
+        break;
+    default:
+        printf("BERT report reason %d\n", reason);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int8_t test[0x800000];
+
+int main(int argc, char *argv[])
+{
+    bert_state_t tx_bert;
+    bert_state_t rx_bert;
+    bert_state_t bert;
+    bert_results_t bert_results;
+    int i;
+    int bit;
+    int zeros;
+    int max_zeros;
+    int failed;
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_ZEROS, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_ZEROS, 300, 20);
+    for (i = 0;  i < 511*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        bert_put_bit(&rx_bert, bit);        
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("Zeros:     Bad bits %d/%d\n", bert_results.bad_bits, bert_results.total_bits);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 950)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_ONES, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_ONES, 300, 20);
+    for (i = 0;  i < 511*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        bert_put_bit(&rx_bert, bit);        
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("Ones:      Bad bits %d/%d\n", bert_results.bad_bits, bert_results.total_bits);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 950)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_1_TO_7, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_1_TO_7, 300, 20);
+    for (i = 0;  i < 511*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        bert_put_bit(&rx_bert, bit);
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("1 to 7:    Bad bits %d/%d\n", bert_results.bad_bits, bert_results.total_bits);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 950)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_1_TO_3, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_1_TO_3, 300, 20);
+    for (i = 0;  i < 511*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        bert_put_bit(&rx_bert, bit);        
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("1 to 3:    Bad bits %d/%d\n", bert_results.bad_bits, bert_results.total_bits);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 950)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_1_TO_1, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_1_TO_1, 300, 20);
+    for (i = 0;  i < 511*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        bert_put_bit(&rx_bert, bit);
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("1 to 1:    Bad bits %d/%d\n", bert_results.bad_bits, bert_results.total_bits);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 950)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_3_TO_1, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_3_TO_1, 300, 20);
+    for (i = 0;  i < 511*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        bert_put_bit(&rx_bert, bit);
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("3 to 1:    Bad bits %d/%d\n", bert_results.bad_bits, bert_results.total_bits);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 950)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+    
+    bert_init(&tx_bert, 0, BERT_PATTERN_7_TO_1, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_7_TO_1, 300, 20);
+    for (i = 0;  i < 511*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        bert_put_bit(&rx_bert, bit);
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("7 to 1:    Bad bits %d/%d\n", bert_results.bad_bits, bert_results.total_bits);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 950)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_ITU_O153_9, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_ITU_O153_9, 300, 20);
+    for (i = 0;  i < 0x200;  i++)
+        test[i] = 0;
+    max_zeros = 0;
+    zeros = 0;
+    for (i = 0;  i < 511*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        if (bit)
+        {
+            if (zeros > max_zeros)
+                max_zeros = zeros;
+            zeros = 0;
+        }
+        else
+        {
+            zeros++;
+        }
+        bert_put_bit(&rx_bert, bit);        
+        test[tx_bert.tx_reg]++;
+    }
+    failed = FALSE;
+    if (test[0] != 0)
+    {
+        printf("XXX %d %d\n", 0, test[0]);
+        failed = TRUE;
+    }
+    for (i = 1;  i < 0x200;  i++)
+    {
+        if (test[i] != 2)
+        {
+            printf("XXX %d %d\n", i, test[i]);
+            failed = TRUE;
+        }
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("O.153(9):  Bad bits %d/%d, max zeros %d\n", bert_results.bad_bits, bert_results.total_bits, max_zeros);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 986  ||  failed)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_ITU_O152_11, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_ITU_O152_11, 300, 20);
+    for (i = 0;  i < 0x800;  i++)
+        test[i] = 0;
+    max_zeros = 0;
+    zeros = 0;
+    for (i = 0;  i < 2047*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        if (bit)
+        {
+            if (zeros > max_zeros)
+                max_zeros = zeros;
+            zeros = 0;
+        }
+        else
+        {
+            zeros++;
+        }
+        bert_put_bit(&rx_bert, bit);        
+        test[tx_bert.tx_reg]++;
+    }
+    failed = FALSE;
+    if (test[0] != 0)
+    {
+        printf("XXX %d %d\n", 0, test[0]);
+        failed = TRUE;
+    }
+    for (i = 1;  i < 0x800;  i++)
+    {
+        if (test[i] != 2)
+        {
+            printf("XXX %d %d\n", i, test[i]);
+            failed = TRUE;
+        }
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("O.152(11): Bad bits %d/%d, max zeros %d\n", bert_results.bad_bits, bert_results.total_bits, max_zeros);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 4052  ||  failed)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_ITU_O151_15, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_ITU_O151_15, 300, 20);
+    for (i = 0;  i < 0x8000;  i++)
+        test[i] = 0;
+    max_zeros = 0;
+    zeros = 0;
+    for (i = 0;  i < 32767*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        if (bit)
+        {
+            if (zeros > max_zeros)
+                max_zeros = zeros;
+            zeros = 0;
+        }
+        else
+        {
+            zeros++;
+        }
+        bert_put_bit(&rx_bert, bit);        
+        test[tx_bert.tx_reg]++;
+    }
+    failed = FALSE;
+    if (test[0] != 0)
+    {
+        printf("XXX %d %d\n", 0, test[0]);
+        failed = TRUE;
+    }
+    for (i = 1;  i < 0x8000;  i++)
+    {
+        if (test[i] != 2)
+        {
+            printf("XXX %d %d\n", i, test[i]);
+            failed = TRUE;
+        }
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("O.151(15): Bad bits %d/%d, max zeros %d\n", bert_results.bad_bits, bert_results.total_bits, max_zeros);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 65480  ||  failed)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_ITU_O151_20, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_ITU_O151_20, 300, 20);
+    for (i = 0;  i < 0x100000;  i++)
+        test[i] = 0;    
+    max_zeros = 0;
+    zeros = 0;
+    for (i = 0;  i < 1048575*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        if (bit)
+        {
+            if (zeros > max_zeros)
+                max_zeros = zeros;
+            zeros = 0;
+        }
+        else
+        {
+            zeros++;
+        }
+        bert_put_bit(&rx_bert, bit);        
+        test[tx_bert.tx_reg]++;
+    }
+    failed = FALSE;
+    if (test[0] != 0)
+    {
+        printf("XXX %d %d\n", 0, test[0]);
+        failed = TRUE;
+    }
+    for (i = 1;  i < 0x100000;  i++)
+    {
+        if (test[i] != 2)
+            printf("XXX %d %d\n", i, test[i]);
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("O.151(20): Bad bits %d/%d, max zeros %d\n", bert_results.bad_bits, bert_results.total_bits, max_zeros);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 2097066  ||  failed)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_ITU_O151_23, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_ITU_O151_23, 300, 20);
+    for (i = 0;  i < 0x800000;  i++)
+        test[i] = 0;    
+    max_zeros = 0;
+    zeros = 0;
+    for (i = 0;  i < 8388607*2;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        if (bit)
+        {
+            if (zeros > max_zeros)
+                max_zeros = zeros;
+            zeros = 0;
+        }
+        else
+        {
+            zeros++;
+        }
+        bert_put_bit(&rx_bert, bit);        
+        test[tx_bert.tx_reg]++;
+    }
+    failed = FALSE;
+    if (test[0] != 0)
+    {
+        printf("XXX %d %d\n", 0, test[0]);
+        failed = TRUE;
+    }
+    for (i = 1;  i < 0x800000;  i++)
+    {
+        if (test[i] != 2)
+            printf("XXX %d %d\n", i, test[i]);
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("O.151(23): Bad bits %d/%d, max zeros %d\n", bert_results.bad_bits, bert_results.total_bits, max_zeros);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 16777136  ||  failed)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    bert_init(&tx_bert, 0, BERT_PATTERN_QBF, 300, 20);
+    bert_init(&rx_bert, 0, BERT_PATTERN_QBF, 300, 20);
+    for (i = 0;  i < 100000;  i++)
+    {
+        bit = bert_get_bit(&tx_bert);
+        bert_put_bit(&rx_bert, bit);        
+    }
+    bert_result(&rx_bert, &bert_results);
+    printf("QBF:       Bad bits %d/%d\n", bert_results.bad_bits, bert_results.total_bits);
+    if (bert_results.bad_bits  ||  bert_results.total_bits != 100000)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    /* Test the mechanism for categorising the error rate into <10^x bands */
+    /* TODO: The result of this test is not checked automatically */
+    bert_init(&bert, 15000000, BERT_PATTERN_ITU_O152_11, 300, 20);
+    bert_set_report(&bert, 100000, reporter, (intptr_t) 0);
+    for (;;)
+    {
+        if ((bit = bert_get_bit(&bert)) == PUTBIT_END_OF_DATA)
+        {
+            bert_result(&bert, &bert_results);
+            printf("Rate test: %d bits, %d bad bits, %d resyncs\n", bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
+            if (bert_results.total_bits != 15000000 - 42
+                ||
+                bert_results.bad_bits != 58
+                ||
+                bert_results.resyncs != 0)
+            {
+                printf("Tests failed\n");
+                exit(2);
+            }
+            break;
+            //bert_init(&bert, 15000000, BERT_PATTERN_ITU_O152_11, 300, 20);
+            //bert_set_report(&bert, 100000, reporter, (intptr_t) 0);
+            //continue;
+        }
+        if ((my_rand() & 0x3FFFF) == 0)
+            bit ^= 1;
+        //if ((my_rand() & 0xFFF) == 0)
+        //    bert_put_bit(&bert, bit);
+        bert_put_bit(&bert, bit);
+    }
+    
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/bit_operations_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,290 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * bit_operations_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: bit_operations_tests.c,v 1.8 2006/11/24 12:34:55 steveu Exp $
+ */
+
+/*! \page bit_operations_tests_page Bit operations tests
+\section bit_operations_tests_page_sec_1 What does it do?
+These tests check the operation of efficient bit manipulation routines, by comparing
+their operation with very dumb brute force versions of the same functionality.
+
+\section bit_operations_tests_page_sec_2 How is it used?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+static __inline__ int top_bit_dumb(unsigned int data)
+{
+    int i;
+    
+    if (data == 0)
+        return -1;
+    for (i = 31;  i >= 0;  i--)
+    {
+        if ((data & (1 << i)))
+            return i;
+    }
+    return -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int bottom_bit_dumb(unsigned int data)
+{
+    int i;
+    
+    if (data == 0)
+        return -1;
+    for (i = 0;  i < 32;  i++)
+    {
+        if ((data & (1 << i)))
+            return i;
+    }
+    return -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ uint8_t bit_reverse8_dumb(uint8_t data)
+{
+    int i;
+    int result;
+    
+    result = 0;
+    for (i = 0;  i < 8;  i++)
+    {
+        result = (result << 1) | (data & 1); 
+        data >>= 1;
+    }
+    return result;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ uint32_t bit_reverse_4bytes_dumb(uint32_t data)
+{
+    int i;
+    uint32_t result;
+    
+    result = 0;
+    for (i = 0;  i < 8;  i++)
+    {
+        result = (result << 1) | (data & 0x01010101); 
+        data >>= 1;
+    }
+    return result;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ uint16_t bit_reverse16_dumb(uint16_t data)
+{
+    int i;
+    uint16_t result;
+    
+    result = 0;
+    for (i = 0;  i < 16;  i++)
+    {
+        result = (result << 1) | (data & 1); 
+        data >>= 1;
+    }
+    return result;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ uint32_t bit_reverse32_dumb(uint32_t data)
+{
+    int i;
+    uint32_t result;
+    
+    result = 0;
+    for (i = 0;  i < 32;  i++)
+    {
+        result = (result << 1) | (data & 1); 
+        data >>= 1;
+    }
+    return result;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int parity8_dumb(uint8_t x)
+{
+    uint8_t y;
+    int i;
+
+    for (y = 0, i = 0;  i < 8;  i++)
+    {
+        y ^= (x & 1);
+        x >>= 1;
+    }
+    return y;
+}
+/*- End of function --------------------------------------------------------*/
+
+static __inline__ int one_bits32_dumb(uint32_t x)
+{
+    int i;
+    int bits;
+    
+    bits = 0;
+    for (i = 0;  i < 32;  i++)
+    {
+        if (x & 1)
+            bits++;
+        x >>= 1;
+    }
+    return bits;
+}
+/*- End of function --------------------------------------------------------*/
+    
+int main(int argc, char *argv[])
+{
+    int i;
+    uint32_t x;
+    uint8_t ax;
+    uint8_t bx;
+    uint16_t ax16;
+    uint16_t bx16;
+    uint32_t ax32;
+    uint32_t bx32;
+
+    for (i = 0, x = 0;  i < 100000;  i++)
+    {
+        ax = top_bit_dumb(x);
+        bx = top_bit(x);
+        if (ax != bx)
+        {
+            printf("Test failed: top bit mismatch 0x%" PRIx32 " -> %u %u\n", x, ax, bx);
+            exit(2);
+        }
+        ax = bottom_bit_dumb(x);
+        bx = bottom_bit(x);
+        if (ax != bx)
+        {
+            printf("Test failed: bottom bit mismatch 0x%" PRIx32 " -> %u %u\n", x, ax, bx);
+            exit(2);
+        }
+        x = rand();
+    }
+    for (i = 0;  i < 256;  i++)
+    {
+        ax = bit_reverse8_dumb(i);
+        bx = bit_reverse8(i);
+        if (ax != bx)
+        {
+            printf("Test failed: bit reverse 8 - %02x %02x %02x\n", i, ax, bx);
+            exit(2);
+        }
+    }
+    for (i = 0;  i < 256;  i++)
+    {
+        x = i | (i << 8) | (i << 16) | (i << 24);
+        ax32 = bit_reverse_4bytes_dumb(x);
+        bx32 = bit_reverse_4bytes(x);
+        if (ax32 != bx32)
+        {
+            printf("Test failed: bit reverse 4 bytes - %" PRIx32 " %" PRIx32 " %" PRIx32 "\n", x, ax32, bx32);
+            exit(2);
+        }
+    }
+    for (i = 0;  i < 65536;  i++)
+    {
+        ax16 = bit_reverse16_dumb(i);
+        bx16 = bit_reverse16(i);
+        if (ax16 != bx16)
+        {
+            printf("Test failed: bit reverse 16 - %x %x %x\n", i, ax16, bx16);
+            exit(2);
+        }
+    }
+    for (i = 0;  i < 0x7FFFFF00;  i += 127)
+    {
+        ax32 = bit_reverse32_dumb(i);
+        bx32 = bit_reverse32(i);
+        if (ax32 != bx32)
+        {
+            printf("Test failed: bit reverse 32 - %d %" PRIx32 " %" PRIx32 "\n", i, ax32, bx32);
+            exit(2);
+        }
+    }
+
+    for (i = 0;  i < 256;  i++)
+    {
+        ax = parity8(i);
+        bx = parity8_dumb(i);
+        if (ax != bx)
+        {
+            printf("Test failed: parity 8 - %x %x %x\n", i, ax, bx);
+            exit(2);
+        }
+    }
+
+    for (i = -1;  i < 32;  i++)
+    {
+        ax32 = most_significant_one32(1 << i);
+        if (ax32 != (1 << i))
+        {
+            printf("Test failed: most significant one 32 - %x %" PRIx32 " %x\n", i, ax32, (1 << i));
+            exit(2);
+        }
+        ax32 = least_significant_one32(1 << i);
+        if (ax32 != (1 << i))
+        {
+            printf("Test failed: least significant one 32 - %x %" PRIx32 " %x\n", i, ax32, (1 << i));
+            exit(2);
+        }
+    }
+
+    for (i = 0x80000000;  i < 0x800FFFFF;  i++)
+    {
+        ax = one_bits32_dumb(i);
+        bx = one_bits32(i);
+        if (ax != bx)
+        {
+            printf("Test failed: one bits - %d, %x %x\n", i, ax, bx);
+            exit(2);
+        }
+    }
+
+    printf("Tests passed.\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/dc_restore_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,102 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * dc_restore_tests.c - Tests for the dc_restore functions.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: dc_restore_tests.c,v 1.18 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \page dc_restore_tests_page DC restoration tests
+\section dc_restore_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <time.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+    
+int main (int argc, char *argv[])
+{
+    awgn_state_t noise_source;
+    dc_restore_state_t dc_state;
+    int i;
+    int idum = 1234567;
+    int16_t dirty;
+    int16_t clean;
+    int estimate;
+    int min;
+    int max;
+    int dc_offset;
+
+    dc_offset = 5000;
+    awgn_init_dbm0(&noise_source, idum, -10.0);
+    dc_restore_init(&dc_state);
+    for (i = 0;  i < 100000;  i++)
+    {
+        dirty = awgn(&noise_source) + dc_offset;
+        clean = dc_restore(&dc_state, dirty);
+        if ((i % 1000) == 0)
+        {
+            printf("Sample %6d: %d (expect %d)\n",
+                   i,
+                   dc_restore_estimate(&dc_state),
+                   dc_offset);
+        }
+    }
+    /* We should have settled by now. Look at the variation we get */
+    min = 99999;
+    max = -99999;
+    for (i = 0;  i < 100000;  i++)
+    {
+        dirty = awgn(&noise_source) + dc_offset;
+        clean = dc_restore(&dc_state, dirty);
+        estimate = dc_restore_estimate(&dc_state);
+        if (estimate < min)
+            min = estimate;
+        if (estimate > max)
+            max = estimate;
+    }
+    printf("Spread of DC estimate for an offset of %d was %d to %d\n", dc_offset, min, max);
+    if (min < dc_offset - 50  ||  max > dc_offset + 50)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+    printf("Test passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/dds_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,257 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * dds_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: dds_tests.c,v 1.17 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page dds_tests_page Direct digital synthesis tests
+\section dds_tests_page_sec_1 What does it do?
+???.
+
+\section dds_tests_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUTPUT_FILE_NAME            "dds.wav"
+#define OUTPUT_FILE_NAME_COMPLEX    "complex_dds.wav"
+
+#define SAMPLES_PER_CHUNK           8000
+
+int main(int argc, char *argv[])
+{
+    int i;
+    uint32_t phase;
+    int32_t phase_inc;
+    int outframes;
+    complexf_t camp;
+    int16_t buf[2*SAMPLES_PER_CHUNK];
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    power_meter_t meter;
+    power_meter_t meter_i;
+    power_meter_t meter_q;
+
+    power_meter_init(&meter, 10);
+
+    printf("Non-complex DDS tests.\n");
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    if ((outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+
+    phase = 0;
+
+    printf("Test with 123.456789Hz.\n");
+    phase_inc = dds_phase_rate(123.456789);
+    for (i = 0;  i < SAMPLES_PER_CHUNK;  i++)
+    {
+        buf[i] = alaw_to_linear(linear_to_alaw(dds(&phase, phase_inc)));
+        power_meter_update(&meter, buf[i]);
+    }
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              buf,
+                              SAMPLES_PER_CHUNK);
+    if (outframes != SAMPLES_PER_CHUNK)
+    {
+        fprintf(stderr, "    Error writing wave file\n");
+        exit(2);
+    }
+    printf("Level is %fdBOv\n", power_meter_dbov(&meter));
+    if (fabs(power_meter_dbov(&meter) + 3.02) > 0.05)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test with 12.3456789Hz.\n");
+    phase_inc = dds_phase_rate(12.3456789);
+    for (i = 0;  i < SAMPLES_PER_CHUNK;  i++)
+    {
+        buf[i] = alaw_to_linear(linear_to_alaw(dds(&phase, phase_inc)));
+        power_meter_update(&meter, buf[i]);
+    }
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              buf,
+                              SAMPLES_PER_CHUNK);
+    if (outframes != SAMPLES_PER_CHUNK)
+    {
+        fprintf(stderr, "    Error writing wave file\n");
+        exit(2);
+    }
+    printf("Level is %fdBOv\n", power_meter_dbov(&meter));
+    /* Use a wider tolerance for this very low frequency - the power meter will ripple */
+    if (fabs(power_meter_dbov(&meter) + 3.02) > 0.2)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test with 2345.6789Hz.\n");
+    phase_inc = dds_phase_rate(2345.6789);
+    for (i = 0;  i < SAMPLES_PER_CHUNK;  i++)
+    {
+        buf[i] = alaw_to_linear(linear_to_alaw(dds(&phase, phase_inc)));
+        power_meter_update(&meter, buf[i]);
+    }
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              buf,
+                              SAMPLES_PER_CHUNK);
+    if (outframes != SAMPLES_PER_CHUNK)
+    {
+        fprintf(stderr, "    Error writing wave file\n");
+        exit(2);
+    }
+    printf("Level is %fdBOv\n", power_meter_dbov(&meter));
+    if (fabs(power_meter_dbov(&meter) + 3.02) > 0.05)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test with 3456.789Hz.\n");
+    phase_inc = dds_phase_rate(3456.789);
+    for (i = 0;  i < SAMPLES_PER_CHUNK;  i++)
+    {
+        buf[i] = alaw_to_linear(linear_to_alaw(dds(&phase, phase_inc)));
+        power_meter_update(&meter, buf[i]);
+    }
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              buf,
+                              SAMPLES_PER_CHUNK);
+    if (outframes != SAMPLES_PER_CHUNK)
+    {
+        fprintf(stderr, "    Error writing wave file\n");
+        exit(2);
+    }
+    printf("Level is %fdBOv\n", power_meter_dbov(&meter));
+    if (fabs(power_meter_dbov(&meter) + 3.02) > 0.05)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    if (afCloseFile(outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+
+    printf("Complex DDS tests,\n");
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+
+    if ((outhandle = afOpenFile(OUTPUT_FILE_NAME_COMPLEX, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_FILE_NAME_COMPLEX);
+        exit(2);
+    }
+
+    power_meter_init(&meter_i, 7);
+    power_meter_init(&meter_q, 7);
+
+    phase = 0;
+    phase_inc = dds_phase_ratef(123.456789);
+    for (i = 0;  i < SAMPLES_PER_CHUNK;  i++)
+    {
+        camp = dds_complexf(&phase, phase_inc);
+        buf[2*i] = camp.re*10000.0;
+        buf[2*i + 1] = camp.im*10000.0;
+        power_meter_update(&meter_i, buf[2*i]);
+        power_meter_update(&meter_q, buf[2*i]);
+    }
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              buf,
+                              SAMPLES_PER_CHUNK);
+    if (outframes != SAMPLES_PER_CHUNK)
+    {
+        fprintf(stderr, "    Error writing wave file\n");
+        exit(2);
+    }
+    printf("Level is %fdBOv/%fdBOv\n", power_meter_dbov(&meter_i), power_meter_dbov(&meter_q));
+    if (fabs(power_meter_dbov(&meter_i) + 13.42) > 0.05
+        ||
+        fabs(power_meter_dbov(&meter_q) + 13.42) > 0.05)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    if (afCloseFile(outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME_COMPLEX);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/dtmf_rx_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,894 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * dtmf_rx_tests.c - Test the DTMF detector against the spec., whatever the spec.
+ *                   may be :)
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: dtmf_rx_tests.c,v 1.23 2006/11/19 14:07:26 steveu Exp $
+ */
+
+/*
+ * These tests include conversion to and from A-law. I assume the
+ * distortion this produces is comparable to u-law, so it should be
+ * a fair test.
+ *
+ * These tests mirror those on the CM7291 test tape from Mitel.
+ * Many of these tests are highly questionable, but they are a
+ * well accepted industry standard.
+ *
+ * However standard these tests might be, Mitel appears to have stopped
+ * selling copies of their tape.
+ *
+ * For the talk-off test the Bellcore tapes may be used. However, they are
+ * copyright material, so the test data files produced from the Bellcore
+ * tapes cannot be distributed as a part of this package.
+ *
+ */
+
+/*! \page dtmf_rx_tests_page DTMF receiver tests
+\section dtmf_rx_tests_page_sec_1 What does it do?
+
+The DTMF detection test suite performs similar tests to the Mitel test tape,
+traditionally used for testing DTMF receivers. Mitel seem to have discontinued
+this product, but all it not lost. 
+
+The first side of the Mitel tape consists of a number of tone and tone+noise
+based tests. The test suite synthesizes equivalent test data. Being digitally
+generated, this data is rather more predictable than the test data on the nasty
+old stretchy cassette tapes which Mitel sold. 
+
+The second side of the Mitel tape contains fragments of real speech from real
+phone calls captured from the North American telephone network. These are
+considered troublesome for DTMF detectors. A good detector is expected to
+achieve a reasonably low number of false detections on this data. Fresh clean
+copies of this seem to be unobtainable. However, Bellcore produce a much more
+aggressive set of three cassette tapes. All six side (about 30 minutes each) are
+filled with much tougher fragments of real speech from the North American
+telephone network. If you can do well in this test, nobody cares about your
+results against the Mitel test tape. 
+
+A fresh set of tapes was purchased for these tests, and digitised, producing 6
+wave files of 16 bit signed PCM data, sampled at 8kHz. They were transcribed
+using a speed adjustable cassette player. The test tone at the start of the
+tapes is pretty accurate, and the new tapes should not have had much opportunity
+to stretch. It is believed these transcriptions are about as good as the source
+material permits. 
+
+PLEASE NOTE
+
+These transcriptions may be freely used by anyone who has a legitimate copy of
+the original tapes. However, if you don't have a legitimate copy of those tapes,
+you also have no right to use this data. The original tapes are the copyright
+material of BellCore, and they charge over US$200 for a set. I doubt they sell
+enough copies to consider this much of a business. However, it is their data,
+and it is their right to do as they wish with it. Currently I see no indication
+they wish to give it away for free. 
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#include "test_utils.h"
+
+/* Basic DTMF specs:
+ *
+ * Minimum tone on = 40ms
+ * Minimum tone off = 50ms
+ * Maximum digit rate = 10 per second
+ * Normal twist <= 8dB accepted
+ * Reverse twist <= 4dB accepted
+ * S/N >= 15dB will detect OK
+ * Attenuation <= 26dB will detect OK
+ * Frequency tolerance +- 1.5% will detect, +-3.5% will reject
+ */
+
+#define DTMF_DURATION               380
+#define DTMF_PAUSE                  400
+#define DTMF_CYCLE                  (DTMF_DURATION + DTMF_PAUSE)
+
+#define ALL_POSSIBLE_DIGITS         "123A456B789C*0#D"
+
+#define MITEL_DIR                   "../itutests/mitel/"
+#define BELLCORE_DIR                "../itutests/bellcore/"
+
+const char *bellcore_files[] =
+{
+    MITEL_DIR    "mitel-cm7291-talkoff.wav",
+    BELLCORE_DIR "tr-tsy-00763-1.wav",
+    BELLCORE_DIR "tr-tsy-00763-2.wav",
+    BELLCORE_DIR "tr-tsy-00763-3.wav",
+    BELLCORE_DIR "tr-tsy-00763-4.wav",
+    BELLCORE_DIR "tr-tsy-00763-5.wav",
+    BELLCORE_DIR "tr-tsy-00763-6.wav",
+    ""
+};
+
+static tone_gen_descriptor_t my_dtmf_digit_tones[16];
+
+float dtmf_row[] =
+{
+     697.0f,  770.0f,  852.0f,  941.0f
+};
+float dtmf_col[] =
+{
+    1209.0f, 1336.0f, 1477.0f, 1633.0f
+};
+
+char dtmf_positions[] = "123A" "456B" "789C" "*0#D";
+
+int callback_hit;
+int callback_ok;
+int callback_roll;
+int step;
+
+int use_dialtone_filter = FALSE;
+
+char *decode_test_file = NULL;
+
+static int16_t amp[1000000];
+static int16_t amp2[1000000];
+
+codec_munge_state_t *munge = NULL;
+
+static void my_dtmf_gen_init(float low_fudge,
+                             int low_level,
+                             float high_fudge,
+                             int high_level,
+                             int duration,
+                             int gap)
+{
+    int row;
+    int col;
+
+    for (row = 0;  row < 4;  row++)
+    {
+        for (col = 0;  col < 4;  col++)
+        {
+            make_tone_gen_descriptor(&my_dtmf_digit_tones[row*4 + col],
+                                     dtmf_row[row]*(1.0f + low_fudge),
+                                     low_level,
+                                     dtmf_col[col]*(1.0f + high_fudge),
+                                     high_level,
+                                     duration,
+                                     gap,
+                                     0,
+                                     0,
+                                     FALSE);
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int my_dtmf_generate(int16_t amp[], const char *digits)
+{
+    int len;
+    char *cp;
+    tone_gen_state_t tone;
+
+    len = 0;
+    while (*digits)
+    {
+        cp = strchr(dtmf_positions, *digits);
+        if (cp)
+        {
+            tone_gen_init(&tone, &my_dtmf_digit_tones[cp - dtmf_positions]);
+            len += tone_gen(&tone, amp + len, 1000);
+        }
+        digits++;
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void digit_delivery(void *data, const char *digits, int len)
+{
+    int i;
+    int seg;
+    const char *s = ALL_POSSIBLE_DIGITS;
+    const char *t;
+
+    callback_hit = TRUE;
+    if (data == (void *) 0x12345678)
+    {
+        t = s + callback_roll;
+        seg = 16 - callback_roll;
+        for (i = 0;  i < len;  i += seg, seg = 16)
+        {
+            if (i + seg > len)
+                seg = len - i;
+            if (memcmp(digits + i, t, seg))
+            {
+                callback_ok = FALSE;
+                printf("Fail at %d %d\n", i, seg);
+                break;
+            }
+            t = s;
+            callback_roll = (callback_roll + seg)%16;
+        }
+    }
+    else
+    {
+        callback_ok = FALSE;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void digit_status(void *data, int signal)
+{
+    const char *s = ALL_POSSIBLE_DIGITS;
+    int len;
+    static int last_step = 0;
+    static int first = TRUE;
+
+    callback_hit = TRUE;
+    len = step - last_step;
+    if (data == (void *) 0x12345678)
+    {
+        if (len < 320  ||  len > 480)
+        {
+            if (first)
+            {
+                /* At the beginning the apparent duration is expected to be wrong */
+                first = FALSE;
+            }
+            else
+            {
+                printf("Failed for signal %s length %d at %d\n", (callback_roll & 1)  ?  "on"  :  "off", len, step);
+                callback_ok = FALSE;
+            }
+        }
+        if (callback_roll & 1)
+        {
+            if (signal != 0)
+            {
+                printf("Failed for signal 0x%X instead of 0\n", signal);
+                callback_ok = FALSE;
+            }
+        }
+        else
+        {
+            if (signal != s[callback_roll >> 1])
+            {
+                printf("Failed for signal 0x%X instead of 0x%X\n", signal, s[callback_roll >> 1]);
+                callback_ok = FALSE;
+            }
+        }
+        if (++callback_roll >= 32)
+            callback_roll = 0;
+    }
+    else
+    {
+        callback_ok = FALSE;
+    }
+    last_step = step;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void mitel_cm7291_side_1_tests(void)
+{
+    int i;
+    int j;
+    int len;
+    int sample;
+    const char *s;
+    char digit[2];
+    char buf[128 + 1];
+    int actual;
+    int nplus;
+    int nminus;
+    float rrb;
+    float rcfo;
+    dtmf_rx_state_t dtmf_state;
+    awgn_state_t noise_source;
+
+    dtmf_rx_init(&dtmf_state, NULL, NULL);
+    if (use_dialtone_filter)
+        dtmf_rx_parms(&dtmf_state, TRUE, -1, -1);
+
+    /* Test 1: Mitel's test 1 isn't really a test. Its a calibration step,
+       which has no meaning here. */
+    printf("Test 1: Calibration\n");
+    printf("    Passed\n");
+
+    /* Test 2: Decode check
+       This is a sanity check, that all digits are reliably detected
+       under ideal conditions.  Each possible digit repeated 10 times,
+       with 50ms bursts. The level of each tone is about 6dB down from clip.
+       6dB down actually causes trouble with G.726, so we use 7dB down. */
+    printf("Test 2: Decode check\n");
+    my_dtmf_gen_init(0.0f, -4, 0.0f, -4, 50, 50);
+    s = ALL_POSSIBLE_DIGITS;
+    digit[1] = '\0';
+    while (*s)
+    {
+        digit[0] = *s++;
+        for (i = 0;  i < 10;  i++)
+        {
+            len = my_dtmf_generate(amp, digit);
+            codec_munge(munge, amp, len);
+            dtmf_rx(&dtmf_state, amp, len);
+
+            actual = dtmf_rx_get(&dtmf_state, buf, 128);
+
+            if (actual != 1  ||  buf[0] != digit[0])
+            {
+                printf("    Sent     '%s'\n", digit);
+                printf("    Received '%s'\n", buf);
+                printf("    Failed\n");
+                exit(2);
+            }
+        }
+    }
+    printf("    Passed\n");
+
+    /* Test 3: Recognition bandwidth and channel centre frequency check.
+       Use only the diagonal pairs of tones (digits 1, 5, 9 and D). Each
+       tone pair requires four test to complete the check, making 16
+       sections overall. Each section contains 40 pulses of
+       50ms duration, with an amplitude of -20dB from clip per
+       frequency.
+
+       Four sections covering the tests for one tone (1 digit) are:
+       a. H frequency at 0% deviation from center, L frequency at +0.1%.
+          L frequency is then increments in +01.% steps up to +4%. The
+          number of tone bursts is noted and designated N+.
+       b. H frequency at 0% deviation, L frequency at -0.1%. L frequency
+          is then incremental in -0.1% steps, up to -4%. The number of
+          tone bursts is noted and designated N-.
+       c. The test in (a) is repeated with the L frequency at 0% and the
+          H frequency varied up to +4%.
+       d. The test in (b) is repeated with the L frequency and 0% and the
+          H frequency varied to -4%.
+
+       Receiver Recognition Bandwidth (RRB) is calculated as follows:
+            RRB% = (N+ + N-)/10
+       Receiver Center Frequency Offset (RCFO) is calculated as follows:
+            RCFO% = X + (N+ - N-)/20
+
+       Note that this test doesn't test what it says it is testing at all,
+       and the results are quite inaccurate, if not a downright lie! However,
+       it follows the Mitel procedure, so how can it be bad? :)
+    */
+    printf("Test 3: Recognition bandwidth and channel centre frequency check\n");
+    s = "159D";
+    digit[1] = '\0';
+    while (*s)
+    {
+        digit[0] = *s++;
+        for (nplus = 0, i = 1;  i <= 60;  i++)
+        {
+            my_dtmf_gen_init((float) i/1000.0f, -17, 0.0f, -17, 50, 50);
+            len = my_dtmf_generate(amp, digit);
+            codec_munge(munge, amp, len);
+            dtmf_rx(&dtmf_state, amp, len);
+            nplus += dtmf_rx_get(&dtmf_state, buf, 128);
+        }
+        for (nminus = 0, i = -1;  i >= -60;  i--)
+        {
+            my_dtmf_gen_init((float) i/1000.0f, -17, 0.0f, -17, 50, 50);
+            len = my_dtmf_generate(amp, digit);
+            codec_munge(munge, amp, len);
+            dtmf_rx(&dtmf_state, amp, len);
+            nminus += dtmf_rx_get(&dtmf_state, buf, 128);
+        }
+        rrb = (float) (nplus + nminus)/10.0f;
+        rcfo = (float) (nplus - nminus)/10.0f;
+        printf("    %c (low)  rrb = %5.2f%%, rcfo = %5.2f%%, max -ve = %5.2f, max +ve = %5.2f\n",
+               digit[0],
+               rrb,
+               rcfo,
+               (float) nminus/10.0f,
+               (float) nplus/10.0f);
+        if (rrb < 3.0f + rcfo  ||  rrb >= 15.0f + rcfo)
+        {
+            printf("    Failed\n");
+            exit(2);
+        }
+
+        for (nplus = 0, i = 1;  i <= 60;  i++)
+        {
+            my_dtmf_gen_init(0.0f, -17, (float) i/1000.0f, -17, 50, 50);
+            len = my_dtmf_generate(amp, digit);
+            codec_munge(munge, amp, len);
+            dtmf_rx(&dtmf_state, amp, len);
+            nplus += dtmf_rx_get(&dtmf_state, buf, 128);
+        }
+        for (nminus = 0, i = -1;  i >= -60;  i--)
+        {
+            my_dtmf_gen_init(0.0f, -17, (float) i/1000.0f, -17, 50, 50);
+            len = my_dtmf_generate(amp, digit);
+            codec_munge(munge, amp, len);
+            dtmf_rx(&dtmf_state, amp, len);
+            nminus += dtmf_rx_get(&dtmf_state, buf, 128);
+        }
+        rrb = (float) (nplus + nminus)/10.0f;
+        rcfo = (float) (nplus - nminus)/10.0f;
+        printf("    %c (high) rrb = %5.2f%%, rcfo = %5.2f%%, max -ve = %5.2f, max +ve = %5.2f\n",
+               digit[0],
+               rrb,
+               rcfo,
+               (float) nminus/10.0f,
+               (float) nplus/10.0f);
+        if (rrb < 3.0f + rcfo  ||  rrb >= 15.0f + rcfo)
+        {
+            printf("    Failed\n");
+            exit(2);
+        }
+    }
+    printf("    Passed\n");
+
+    /* Test 4: Acceptable amplitude ratio (twist).
+       Use only the diagonal pairs of tones (digits 1, 5, 9 and D). 
+       There are eight sections to the test. Each section contains 200
+       pulses with a 50ms duration for each pulse. Initially the amplitude
+       of both tones is 6dB down from clip. The two sections to test one
+       tone pair are:
+
+       a. Standard Twist: H tone amplitude is maintained at -6dB from clip,
+          L tone amplitude is attenuated gradually until the amplitude ratio
+          L/H is -20dB. Note the number of responses from the receiver.
+       b. Reverse Twist: L tone amplitude is maintained at -6dB from clip,
+          H tone amplitude is attenuated gradually until the amplitude ratio
+          is 20dB. Note the number of responses from the receiver.
+
+       All tone bursts are of 50ms duration.
+
+       The Acceptable Amplitude Ratio in dB is equal to the number of
+       responses registered in (a) or (b), divided by 10.
+       
+       TODO: This is supposed to work in 1/10dB steps, but here I used 1dB
+             steps, as the current tone generator has its amplitude set in
+             1dB steps.
+    */
+    printf("Test 4: Acceptable amplitude ratio (twist)\n");
+    s = "159D";
+    digit[1] = '\0';
+    while (*s)
+    {
+        digit[0] = *s++;
+        for (nplus = 0, i = -30;  i >= -230;  i--)
+        {
+            my_dtmf_gen_init(0.0f, -3, 0.0f, i/10, 50, 50);
+
+            len = my_dtmf_generate(amp, digit);
+            codec_munge(munge, amp, len);
+            dtmf_rx(&dtmf_state, amp, len);
+            nplus += dtmf_rx_get(&dtmf_state, buf, 128);
+        }
+        printf("    %c normal twist  = %.2fdB\n", digit[0], (float) nplus/10.0);
+        if (nplus < 80)
+        {
+            printf("    Failed\n");
+            exit(2);
+        }
+        for (nminus = 0, i = -30;  i >= -230;  i--)
+        {
+            my_dtmf_gen_init(0.0f, i/10, 0.0f, -3, 50, 50);
+
+            len = my_dtmf_generate(amp, digit);
+            codec_munge(munge, amp, len);
+            dtmf_rx(&dtmf_state, amp, len);
+            nminus += dtmf_rx_get(&dtmf_state, buf, 128);
+        }
+        printf("    %c reverse twist = %.2fdB\n", digit[0], (float) nminus/10.0);
+        if (nminus < 40)
+        {
+            printf("    Failed\n");
+            exit(2);
+        }
+    }
+    printf("    Passed\n");
+
+    /* Test 5: Dynamic range
+       This test utilizes tone pair L1 H1 (digit 1). Thirty-five tone pair
+       pulses are transmitted, with both frequencies stating at -6dB from
+       clip. The amplitude of each is gradually attenuated by -35dB at a
+       rate of 1dB per pulse. The Dynamic Range in dB is equal to the
+       number of responses from the receiver during the test.
+       
+       Well not really, but that is the Mitel test. Lets sweep a bit further,
+       and see what the real range is */
+    printf("Test 5: Dynamic range\n");
+    for (nplus = 0, i = +3;  i >= -50;  i--)
+    {
+        my_dtmf_gen_init(0.0f, i, 0.0f, i, 50, 50);
+
+        len = my_dtmf_generate(amp, "1");
+        codec_munge(munge, amp, len);
+        dtmf_rx(&dtmf_state, amp, len);
+        nplus += dtmf_rx_get(&dtmf_state, buf, 128);
+    }
+    printf("    Dynamic range = %ddB\n", nplus);
+    printf("    Passed\n");
+
+    /* Test 6: Guard time
+       This test utilizes tone pair L1 H1 (digit 1). Four hundred pulses
+       are transmitted at an amplitude of -6dB from clip per frequency.
+       Pulse duration starts at 49ms and is gradually reduced to 10ms.
+       Guard time in ms is equal to (500 - number of responses)/10.
+       
+       That is the Mitel test, and we will follow it. Its totally bogus,
+       though. Just what the heck is a pass or fail here? */
+
+    printf("Test 6: Guard time\n");
+    for (nplus = 0, i = 490;  i >= 100;  i--)
+    {
+        my_dtmf_gen_init(0.0f, -3, 0.0f, -3, i/10, 50);
+
+        len = my_dtmf_generate(amp, "1");
+        codec_munge(munge, amp, len);
+        dtmf_rx(&dtmf_state, amp, len);
+        nplus += dtmf_rx_get(&dtmf_state, buf, 128);
+    }
+    printf("    Guard time = %dms\n", (500 - nplus)/10);
+    printf("    Passed\n");
+
+    /* Test 7: Acceptable signal to noise ratio
+       This test utilizes tone pair L1 H1, transmitted on a noise background.
+       The test consists of three sections in which the tone pair is
+       transmitted 1000 times at an amplitude -6dB from clip per frequency,
+       but with a different white noise level for each section. The first
+       level is -24dBV, the second -18dBV and the third -12dBV.. The
+       acceptable signal to noise ratio is the lowest ratio of signal
+       to noise in the test where the receiver responds to all 1000 pulses.
+       
+       Well, that is the Mitel test, but it doesn't tell you what the
+       decoder can really do. Lets do a more comprehensive test */
+
+    printf("Test 7: Acceptable signal to noise ratio\n");
+    my_dtmf_gen_init(0.0f, -4, 0.0f, -4, 50, 50);
+
+    for (j = -13;  j > -50;  j--)
+    {
+        awgn_init_dbm0(&noise_source, 1234567, (float) j);
+        for (i = 0;  i < 1000;  i++)
+        {
+            len = my_dtmf_generate(amp, "1");
+
+            // TODO: Clip
+            for (sample = 0;  sample < len;  sample++)
+                amp[sample] = saturate(amp[sample] + awgn(&noise_source));
+            
+            codec_munge(munge, amp, len);
+            dtmf_rx(&dtmf_state, amp, len);
+
+            if (dtmf_rx_get(&dtmf_state, buf, 128) != 1)
+                break;
+        }
+        if (i == 1000)
+            break;
+    }
+    printf("    Acceptable S/N ratio is %ddB\n", -4 - j);
+    if (-4 - j > 26)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+    printf("    Passed\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+static void mitel_cm7291_side_2_and_bellcore_tests(void)
+{
+    int i;
+    int j;
+    int len;
+    int hits;
+    int hit_types[256];
+    char buf[128 + 1];
+    AFfilehandle inhandle;
+    int frames;
+    float x;
+    dtmf_rx_state_t dtmf_state;
+
+    dtmf_rx_init(&dtmf_state, NULL, NULL);
+    if (use_dialtone_filter)
+        dtmf_rx_parms(&dtmf_state, TRUE, -1, -1);
+
+    /* The remainder of the Mitel tape is the talk-off test */
+    /* Here we use the Bellcore test tapes (much tougher), in six
+       wave files - 1 from each side of the original 3 cassette tapes */
+    /* Bellcore say you should get no more than 470 false detections with
+       a good receiver. Dialogic claim 20. Of course, we can do better than
+       that, eh? */
+    printf("Test 8: Talk-off test\n");
+    memset(hit_types, '\0', sizeof(hit_types));
+    for (j = 0;  bellcore_files[j][0];  j++)
+    {
+        if ((inhandle = afOpenFile(bellcore_files[j], "r", 0)) == AF_NULL_FILEHANDLE)
+        {
+            printf("    Cannot open speech file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+        {
+            printf("    Unexpected frame size in speech file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+        {
+            printf("    Unexpected sample rate in speech file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+        {
+            printf("    Unexpected number of channels in speech file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        hits = 0;
+        while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, amp, SAMPLE_RATE)))
+        {
+            dtmf_rx(&dtmf_state, amp, frames);
+            len = dtmf_rx_get(&dtmf_state, buf, 128);
+            if (len > 0)
+            {
+                for (i = 0;  i < len;  i++)
+                    hit_types[(int) buf[i]]++;
+                hits += len;
+            }
+        }
+        if (afCloseFile(inhandle) != 0)
+        {
+            printf("    Cannot close speech file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        printf("    File %d gave %d false hits.\n", j + 1, hits);
+    }
+    for (i = 0, j = 0;  i < 256;  i++)
+    {
+        if (hit_types[i])
+        {
+            printf("    Digit %c had %d false hits\n", i, hit_types[i]);
+            j += hit_types[i];
+        }
+    }
+    printf("    %d hits in total\n", j);
+    if (j > 470)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+    printf("    Passed\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+static void dial_tone_tolerance_tests(void)
+{
+    int i;
+    int j;
+    int len;
+    int sample;
+    char buf[128 + 1];
+    dtmf_rx_state_t dtmf_state;
+    tone_gen_descriptor_t dial_tone_desc;
+    tone_gen_state_t dial_tone;
+
+    dtmf_rx_init(&dtmf_state, NULL, NULL);
+    if (use_dialtone_filter)
+        dtmf_rx_parms(&dtmf_state, TRUE, -1, -1);
+
+    /* Test dial tone tolerance */
+    printf("Test: Dial tone tolerance.\n");
+    my_dtmf_gen_init(0.0f, -15, 0.0f, -15, 50, 50);
+
+    for (j = -30;  j < -3;  j++)
+    {
+        make_tone_gen_descriptor(&dial_tone_desc, 350, j, 440, j, 1, 0, 0, 0, TRUE);
+        tone_gen_init(&dial_tone, &dial_tone_desc);
+        for (i = 0;  i < 10;  i++)
+        {
+            len = my_dtmf_generate(amp, ALL_POSSIBLE_DIGITS);
+            tone_gen(&dial_tone, amp2, len);
+
+            for (sample = 0;  sample < len;  sample++)
+                amp[sample] = saturate(amp[sample] + amp2[sample]);
+            codec_munge(munge, amp, len);
+            dtmf_rx(&dtmf_state, amp, len);
+
+            if (dtmf_rx_get(&dtmf_state, buf, 128) != strlen(ALL_POSSIBLE_DIGITS))
+                break;
+        }
+        if (i != 10)
+            break;
+    }
+    printf("    Acceptable signal to dial tone ratio is %ddB\n", -15 - j);
+    if ((use_dialtone_filter  &&  (-15 - j) > -12)
+        ||
+        (!use_dialtone_filter  &&  (-15 - j) > 10)) 
+    {
+        printf("    Failed\n");
+        exit(2); 
+    }
+    printf("    Passed\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+static void callback_function_tests(void)
+{
+    int i;
+    int j;
+    int len;
+    int sample;
+    dtmf_rx_state_t dtmf_state;
+
+    /* Test the callback mode for delivering detected digits */
+    printf("Test: Callback digit delivery mode.\n");
+    callback_hit = FALSE;
+    callback_ok = TRUE;
+    callback_roll = 0;
+    dtmf_rx_init(&dtmf_state, digit_delivery, (void *) 0x12345678);
+    if (use_dialtone_filter)
+        dtmf_rx_parms(&dtmf_state, TRUE, -1, -1);
+    my_dtmf_gen_init(0.0f, -10, 0.0f, -10, 50, 50);
+    for (i = 1;  i < 10;  i++)
+    {
+        len = 0;
+        for (j = 0;  j < i;  j++)
+            len += my_dtmf_generate(amp + len, ALL_POSSIBLE_DIGITS);
+        dtmf_rx(&dtmf_state, amp, len);
+        if (!callback_hit  ||  !callback_ok)
+            break;
+    }
+    if (!callback_hit  ||  !callback_ok)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+    printf("    Passed\n");
+
+    /* Test the realtime callback mode for reporting detected digits */
+    printf("Test: Realtime callback digit delivery mode.\n");
+    callback_hit = FALSE;
+    callback_ok = TRUE;
+    callback_roll = 0;
+    dtmf_rx_init(&dtmf_state, NULL, NULL);
+    dtmf_rx_set_realtime_callback(&dtmf_state, digit_status, (void *) 0x12345678);
+    if (use_dialtone_filter)
+        dtmf_rx_parms(&dtmf_state, TRUE, -1, -1);
+    my_dtmf_gen_init(0.0f, -10, 0.0f, -10, 50, 50);
+    step = 0;
+    for (i = 1;  i < 10;  i++)
+    {
+        len = 0;
+        for (j = 0;  j < i;  j++)
+            len += my_dtmf_generate(amp + len, ALL_POSSIBLE_DIGITS);
+        for (sample = 0, j = 160;  sample < len;  sample += 160, j = ((len - sample) >= 160)  ?  160  :  (len - sample))
+        {
+            dtmf_rx(&dtmf_state, &amp[sample], j);
+            if (!callback_ok)
+                break;
+            step += j;
+        }
+        if (!callback_hit  ||  !callback_ok)
+            break;
+    }
+    if (!callback_hit  ||  !callback_ok)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void decode_test(const char *test_file)
+{
+    int16_t amp[160];
+    AFfilehandle inhandle;
+    dtmf_rx_state_t dtmf_state;
+    char buf[128 + 1];
+    int actual;
+    int samples;
+    int total;
+
+    dtmf_rx_init(&dtmf_state, NULL, NULL);
+    if (use_dialtone_filter)
+        dtmf_rx_parms(&dtmf_state, TRUE, -1, -1);
+
+    /* We will decode the audio from a wave file. */
+    
+    if ((inhandle = afOpenFile(decode_test_file, "r", NULL)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", decode_test_file);
+        exit(2);
+    }
+    
+    total = 0;
+    while ((samples = afReadFrames(inhandle, AF_DEFAULT_TRACK, amp, 160)) > 0)
+    {
+        codec_munge(munge, amp, samples);
+        dtmf_rx(&dtmf_state, amp, samples);
+        if ((actual = dtmf_rx_get(&dtmf_state, buf, 128)) > 0)
+            printf("Received '%s'\n", buf);
+        total += actual;
+    }
+    printf("%d digits received\n", total);
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int duration;
+    int i;
+    time_t now;
+    int channel_codec;
+
+    use_dialtone_filter = FALSE;
+    channel_codec = MUNGE_CODEC_NONE;
+    decode_test_file = NULL;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-c") == 0)
+        {
+            channel_codec = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-d") == 0)
+        {
+            decode_test_file = argv[++i];
+            continue;
+        }
+        if (strcmp(argv[i], "-f") == 0)
+        {
+            use_dialtone_filter = TRUE;
+            continue;
+        }
+    }
+    munge = codec_munge_init(channel_codec);
+
+    if (decode_test_file)
+    {
+        decode_test(decode_test_file);
+    }
+    else
+    {
+        time(&now);
+        mitel_cm7291_side_1_tests();
+        mitel_cm7291_side_2_and_bellcore_tests();
+        dial_tone_tolerance_tests();
+        callback_function_tests();
+        printf("    Passed\n");
+        duration = time(NULL) - now;
+        printf("Tests passed in %ds\n", duration);
+    }
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/dtmf_tx_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,191 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * dtmf_tx_tests.c - Test the DTMF generator.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: dtmf_tx_tests.c,v 1.11 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page dtmf_tx_tests_page DTMF generation tests
+\section dtmf_tx_tests_page_sec_1 What does it do?
+???.
+
+\section dtmf_tx_tests_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUTPUT_FILE_NAME    "dtmf.wav"
+
+int main(int argc, char *argv[])
+{
+    dtmf_tx_state_t gen;
+    int16_t amp[16384];
+    int len;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int add_digits;
+
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, 8000.0);
+    //afInitCompression(filesetup, AF_DEFAULT_TRACK, AF_COMPRESSION_G711_ALAW);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    if ((outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+
+    dtmf_tx_init(&gen);
+    len = dtmf_tx(&gen, amp, 16384);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    if (dtmf_tx_put(&gen, "123"))
+        printf("Ooops\n");
+    len = dtmf_tx(&gen, amp, 16384);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    if (dtmf_tx_put(&gen, "456"))
+        printf("Ooops\n");
+    len = dtmf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    if (dtmf_tx_put(&gen, "789"))
+        printf("Ooops\n");
+    len = dtmf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    if (dtmf_tx_put(&gen, "*#"))
+        printf("Ooops\n");
+    len = dtmf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    add_digits = 1;
+    do
+    {
+        len = dtmf_tx(&gen, amp, 160);
+        printf("Generated %d samples\n", len);
+        if (len > 0)
+        {
+            outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+        }
+        if (add_digits)
+        {
+            if (dtmf_tx_put(&gen, "1234567890"))
+            {
+                printf("Digit buffer full\n");
+                add_digits = 0;
+            }
+        }
+    }
+    while (len > 0);
+
+    dtmf_tx_init(&gen);
+    len = dtmf_tx(&gen, amp, 16384);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    if (dtmf_tx_put(&gen, "123"))
+        printf("Ooops\n");
+    len = dtmf_tx(&gen, amp, 16384);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    if (dtmf_tx_put(&gen, "456"))
+        printf("Ooops\n");
+    len = dtmf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    if (dtmf_tx_put(&gen, "789"))
+        printf("Ooops\n");
+    len = dtmf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    if (dtmf_tx_put(&gen, "0*#"))
+        printf("Ooops\n");
+    len = dtmf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    if (dtmf_tx_put(&gen, "ABCD"))
+        printf("Ooops\n");
+    len = dtmf_tx(&gen, amp, 160);
+    printf("Generated %d samples\n", len);
+    outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+    add_digits = 1;
+    do
+    {
+        len = dtmf_tx(&gen, amp, 160);
+        printf("Generated %d samples\n", len);
+        if (len > 0)
+        {
+            outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, len);
+        }
+        if (add_digits)
+        {
+            if (dtmf_tx_put(&gen, "1234567890"))
+            {
+                printf("Digit buffer full\n");
+                add_digits = 0;
+            }
+        }
+    }
+    while (len > 0);
+
+    if (afCloseFile(outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit (2);
+    }
+    afFreeFileSetup(filesetup);
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/echo_dump.m	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,60 @@
+% echo_dump.m
+% David Rowe 23 Dec 2006
+%
+% Plots echo can dump file values
+
+load dump.txt
+load level.txt
+st = 1;
+en = length(dump);
+%st=8000*0+1; en=8000*2;
+tx = dump(st:en,1);
+rx = dump(st:en,2);
+ec = dump(st:en,4);
+Ltx = dump(st:en,5);
+Lrx = dump(st:en,6);
+Lec = dump(st:en,7);
+dtd = -9900 + 800*dump(st:en,8);
+adapt = -9900 + 800*dump(st:en,9);
+Lbgec = dump(st:en,10);
+
+figure(1);
+plot(tx,"r;tx;", rx,"g;rx;", ec,"b;ec;", dtd,"g;dtd;");
+%plot(tx,"r;tx;", rx,"g;rx;", dtd,"w;dtd;");
+axis([0 en-st -1E4 1E4]);
+
+%__gnuplot_set__ terminal png size 450,338
+%__gnuplot_set__ output "~/Desktop/fxo_oslec.png"
+%__gnuplot_set__ terminal png size 800,600
+%__gnuplot_set__ output "~/Desktop/fxo_oslec_large.png"
+%replot;
+
+LtxdB = 20*log10(Ltx+1);
+LrxdB = 20*log10(Lrx+1);
+LecdB = 20*log10(Lec+1);
+LbgecdB = 20*log10(Lbgec+1);
+
+figure(2);
+plot(LtxdB,"r;LtxdB;", LrxdB,"g;LrxdB;", LtxdB-LrxdB,"w;LtxdB-LrxdB;", LtxdB-LecdB,"b;LtxdB-LecdB;", 80+5*dump(st:en,9), "w;adapt;", LtxdB-LbgecdB,"c;LtxdB-LbgecdB;", 90+5*dump(st:en,8), "r;dtd;");
+axis([0 en-st 0 100]);
+grid;
+
+%__gnuplot_set__ terminal png size 800,600
+%__gnuplot_set__ output "~/Desktop/levels.png"
+%replot;
+
+figure(3);
+LRin = level(st:en,1);
+LSin = level(st:en,2);
+LSout = level(st:en,3);
+LSgen = level(st:en,4);
+axis([0 en-st -100 0]);
+plot(LRin,"r;LRindB;", LSin,"g;LSindB;", LSout,"w;LSoutdB;", LSgen,"b;LSgendB;");
+
+figure(4)
+plot(dump(st:en,11), "r;Pstates;")
+axis
+figure(5)
+plot(dump(st:en,12), "g;factor;")
+figure(6)
+plot(dump(st:en,13), "g;shift;")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/echo_monitor.cpp	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,450 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * echo_monitor.cpp - Display echo canceller status, using the FLTK toolkit.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: echo_monitor.cpp,v 1.10 2006/10/24 13:22:02 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(HAVE_FL_FL_H)  &&  defined(HAVE_FL_FL_CARTESIAN_H)
+
+#include <inttypes.h>
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/select.h>
+#if defined(HAVE_FFTW3_H)
+#include <fftw3.h>
+#else
+#include <fftw.h>
+#endif
+
+#include <FL/Fl.H>
+#include <FL/Fl_Overlay_Window.H>
+#include <FL/Fl_Light_Button.H>
+#include <Fl/Fl_Cartesian.H>
+#include <Fl/Fl_Audio_Meter.H>
+#include <FL/fl_draw.H>
+
+#include "../src/spandsp/complex.h"
+//#include "spandsp.h"
+#include "echo_monitor.h"
+
+Fl_Double_Window *w;
+
+Fl_Audio_Meter *audio_meter;
+
+Fl_Group *c_spec;
+Fl_Group *c_right;
+Fl_Group *c_can;
+Fl_Group *c_line_model;
+
+Ca_Canvas *canvas_spec;
+Ca_X_Axis *spec_freq;
+Ca_Y_Axis *spec_amp;
+Ca_Line *spec_re = NULL;
+double spec_re_plot[2*512];
+
+Ca_Canvas *canvas_can;
+Ca_X_Axis *can_x;
+Ca_Y_Axis *can_y;
+Ca_Line *can_re = NULL;
+double can_re_plot[512];
+
+Ca_Canvas *canvas_line_model;
+Ca_X_Axis *line_model_x;
+Ca_Y_Axis *line_model_y;
+Ca_Line *line_model_re = NULL;
+double line_model_re_plot[512];
+
+static int skip = 0;
+
+int in_ptr;
+#if defined(HAVE_FFTW3_H)
+double in[1024][2];
+double out[1024][2];
+#else
+fftw_complex in[1024];
+fftw_complex out[1024];
+#endif
+fftw_plan p;
+
+int echo_can_monitor_can_update(const int16_t *coeffs, int len)
+{
+    int i;
+    float min;
+    float max;
+
+    if (can_re)
+        delete can_re;
+
+    canvas_can->current(canvas_can);
+    i = 0;
+    min = coeffs[i];
+    max = coeffs[i];
+    for (i = 0;  i < len;  i++)
+    {
+        can_re_plot[2*i] = i;
+        can_re_plot[2*i + 1] = coeffs[i];
+        if (min > coeffs[i])
+            min = coeffs[i];
+        if (max < coeffs[i])
+            max = coeffs[i];
+    }
+    can_y->maximum((max == min)  ?  max + 0.2  :  max);
+    can_y->minimum(min);
+    can_re = new Ca_Line(len, can_re_plot, 0, 0, FL_BLUE, CA_NO_POINT);
+    if (++skip >= 100)
+    {
+        skip = 0;
+        Fl::check();
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int echo_can_monitor_line_model_update(const int32_t *coeffs, int len)
+{
+    int i;
+    float min;
+    float max;
+
+    if (line_model_re)
+        delete line_model_re;
+
+    canvas_line_model->current(canvas_line_model);
+    i = 0;
+    min = coeffs[i];
+    max = coeffs[i];
+    for (i = 0;  i < len;  i++)
+    {
+        line_model_re_plot[2*i] = i;
+        line_model_re_plot[2*i + 1] = coeffs[i];
+        if (min > coeffs[i])
+            min = coeffs[i];
+        if (max < coeffs[i])
+            max = coeffs[i];
+    }
+    line_model_y->maximum((max == min)  ?  max + 0.2  :  max);
+    line_model_y->minimum(min);
+    line_model_re = new Ca_Line(len, line_model_re_plot, 0, 0, FL_BLUE, CA_NO_POINT);
+    if (++skip >= 100)
+    {
+        skip = 0;
+        Fl::check();
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int echo_can_monitor_line_spectrum_update(const int16_t amp[], int len)
+{
+    int i;
+    int x;
+
+    for (i = 0;  i < len;  i++)
+        audio_meter->sample(amp[i]/32768.0);
+
+    if (in_ptr + len < 512)
+    {
+        /* Just add this fragment to the buffer. */
+        for (i = 0;  i < len;  i++)
+#if defined(HAVE_FFTW3_H)
+            in[in_ptr + i][0] = amp[i];
+#else
+            in[in_ptr + i].re = amp[i];
+#endif
+        in_ptr += len;
+        return 0;
+    }
+    if (len >= 512)
+    {
+        /* We have enough for a whole block. Use the last 512 samples
+           we have. */
+        x = len - 512;
+        for (i = 0;  i < 512;  i++)
+#if defined(HAVE_FFTW3_H)
+            in[i][0] = amp[x + i];
+#else
+            in[i].re = amp[x + i];
+#endif
+    }
+    else
+    {
+        /* We want the last 512 samples. */
+        x = 512 - len;
+        for (i = 0;  i < x;  i++)
+#if defined(HAVE_FFTW3_H)
+            in[i][0] = in[in_ptr - x + i][0];
+#else
+            in[i].re = in[in_ptr - x + i].re;
+#endif
+        for (i = x;  i < 512;  i++)
+#if defined(HAVE_FFTW3_H)
+            in[i][0] = amp[i - x];
+#else
+            in[i].re = amp[i - x];
+#endif
+    }
+    in_ptr = 0;
+#if defined(HAVE_FFTW3_H)    
+    fftw_execute(p);
+#else
+    fftw_one(p, in, out);
+#endif
+    if (spec_re)
+        delete spec_re;
+    canvas_spec->current(canvas_spec);
+    for (i = 0;  i < 512;  i++)
+    {
+        spec_re_plot[2*i] = i*4000.0/512.0;
+#if defined(HAVE_FFTW3_H)    
+        spec_re_plot[2*i + 1] = 20.0*log10(sqrt(out[i][0]*out[i][0] + out[i][1]*out[i][1])/(256.0*32768)) + 3.14;
+#else
+        spec_re_plot[2*i + 1] = 20.0*log10(sqrt(out[i].re*out[i].re + out[i].im*out[i].im)/(256.0*32768)) + 3.14;
+#endif
+    }
+    spec_re = new Ca_Line(512, spec_re_plot, 0, 0, FL_BLUE, CA_NO_POINT);
+    Fl::check();
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int start_echo_can_monitor(int len)
+{
+    char buf[132 + 1];
+    float x;
+    float y;
+    int i;
+
+    w = new Fl_Double_Window(850, 400, "Echo canceller monitor");
+
+    c_spec = new Fl_Group(0, 0, 380, 400);
+    c_spec->box(FL_DOWN_BOX);
+    c_spec->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
+
+    canvas_spec = new Ca_Canvas(60, 30, 300, 300, "Spectrum");
+    canvas_spec->box(FL_PLASTIC_DOWN_BOX);
+    canvas_spec->color(7);
+    canvas_spec->align(FL_ALIGN_TOP);
+    canvas_spec->border(15);
+
+    spec_freq = new Ca_X_Axis(65, 330, 290, 30, "Freq (Hz)");
+    spec_freq->align(FL_ALIGN_BOTTOM);
+    spec_freq->minimum(0);
+    spec_freq->maximum(4000);
+    spec_freq->label_format("%g");
+    spec_freq->minor_grid_color(fl_gray_ramp(20));
+    spec_freq->major_grid_color(fl_gray_ramp(15));
+    spec_freq->label_grid_color(fl_gray_ramp(10));
+    spec_freq->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    spec_freq->minor_grid_style(FL_DOT);
+    spec_freq->major_step(5);
+    spec_freq->label_step(1);
+    spec_freq->axis_color(FL_BLACK);
+    spec_freq->axis_align(CA_BOTTOM | CA_LINE);
+
+    spec_amp = new Ca_Y_Axis(20, 35, 40, 290, "Amp (dBmO)");
+    spec_amp->align(FL_ALIGN_LEFT);
+    spec_amp->minimum(-80.0);
+    spec_amp->maximum(10.0);
+    spec_amp->minor_grid_color(fl_gray_ramp(20));
+    spec_amp->major_grid_color(fl_gray_ramp(15));
+    spec_amp->label_grid_color(fl_gray_ramp(10));
+    //spec_amp->grid_visible(CA_MINOR_TICK | CA_MAJOR_TICK | CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    spec_amp->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    spec_amp->minor_grid_style(FL_DOT);
+    spec_amp->major_step(5);
+    spec_amp->label_step(1);
+    spec_amp->axis_color(FL_BLACK);
+
+    spec_amp->current();
+
+    c_spec->end();
+
+    c_right = new Fl_Group(440, 0, 465, 405);
+
+    c_can = new Fl_Group(380, 0, 415, 200);
+    c_can->box(FL_DOWN_BOX);
+    c_can->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
+    c_can->current();
+
+    canvas_can = new Ca_Canvas(460, 35, 300, 100, "Canceller coefficients");
+    canvas_can->box(FL_PLASTIC_DOWN_BOX);
+    canvas_can->color(7);
+    canvas_can->align(FL_ALIGN_TOP);
+    Fl_Group::current()->resizable(canvas_can);
+    canvas_can->border(15);
+
+    can_x = new Ca_X_Axis(465, 135, 290, 30, "Tap");
+    can_x->align(FL_ALIGN_BOTTOM);
+    can_x->minimum(0.0);
+    can_x->maximum((float) len);
+    can_x->label_format("%g");
+    can_x->minor_grid_color(fl_gray_ramp(20));
+    can_x->major_grid_color(fl_gray_ramp(15));
+    can_x->label_grid_color(fl_gray_ramp(10));
+    can_x->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    can_x->minor_grid_style(FL_DOT);
+    can_x->major_step(5);
+    can_x->label_step(1);
+    can_x->axis_align(CA_BOTTOM | CA_LINE);
+    can_x->axis_color(FL_BLACK);
+    can_x->current();
+
+    can_y = new Ca_Y_Axis(420, 40, 40, 90, "Amp");
+    can_y->align(FL_ALIGN_LEFT);
+    can_y->minimum(-0.1);
+    can_y->maximum(0.1);
+    can_y->minor_grid_color(fl_gray_ramp(20));
+    can_y->major_grid_color(fl_gray_ramp(15));
+    can_y->label_grid_color(fl_gray_ramp(10));
+    can_y->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    can_y->minor_grid_style(FL_DOT);
+    can_y->major_step(5);
+    can_y->label_step(1);
+    can_y->axis_color(FL_BLACK);
+    can_y->current();
+
+    c_can->end();
+
+    c_line_model = new Fl_Group(380, 200, 415, 200);
+    c_line_model->box(FL_DOWN_BOX);
+    c_line_model->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
+    c_line_model->current();
+
+    canvas_line_model = new Ca_Canvas(460, 235, 300, 100, "Line impulse response model");
+    canvas_line_model->box(FL_PLASTIC_DOWN_BOX);
+    canvas_line_model->color(7);
+    canvas_line_model->align(FL_ALIGN_TOP);
+    Fl_Group::current()->resizable(canvas_line_model);
+    canvas_line_model->border(15);
+
+    line_model_x = new Ca_X_Axis(465, 335, 290, 30, "Tap");
+    line_model_x->align(FL_ALIGN_BOTTOM);
+    line_model_x->minimum(0.0);
+    line_model_x->maximum((float) len);
+    line_model_x->label_format("%g");
+    line_model_x->minor_grid_color(fl_gray_ramp(20));
+    line_model_x->major_grid_color(fl_gray_ramp(15));
+    line_model_x->label_grid_color(fl_gray_ramp(10));
+    line_model_x->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    line_model_x->minor_grid_style(FL_DOT);
+    line_model_x->major_step(5);
+    line_model_x->label_step(1);
+    line_model_x->axis_align(CA_BOTTOM | CA_LINE);
+    line_model_x->axis_color(FL_BLACK);
+    line_model_x->current();
+
+    line_model_y = new Ca_Y_Axis(420, 240, 40, 90, "Amp");
+    line_model_y->align(FL_ALIGN_LEFT);
+    line_model_y->minimum(-0.1);
+    line_model_y->maximum(0.1);
+    line_model_y->minor_grid_color(fl_gray_ramp(20));
+    line_model_y->major_grid_color(fl_gray_ramp(15));
+    line_model_y->label_grid_color(fl_gray_ramp(10));
+    line_model_y->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    line_model_y->minor_grid_style(FL_DOT);
+    line_model_y->major_step(5);
+    line_model_y->label_step(1);
+    line_model_y->axis_color(FL_BLACK);
+    line_model_y->current();
+
+    c_line_model->end();
+
+    audio_meter = new Fl_Audio_Meter(810, 40, 10, 250, "");
+    audio_meter->box(FL_PLASTIC_UP_BOX);
+    audio_meter->type(FL_VERT_AUDIO_METER);
+
+    c_right->end();
+
+    Fl_Group::current()->resizable(c_right);
+    w->end();
+    w->show();
+
+#if defined(HAVE_FFTW3_H)    
+    p = fftw_plan_dft_1d(1024, in, out, FFTW_BACKWARD, FFTW_ESTIMATE);
+    for (i = 0;  i < 1024;  i++)
+    {
+        in[i][0] = 0.0;
+        in[i][1] = 0.0;
+    }
+#else
+    p = fftw_create_plan(1024, FFTW_BACKWARD, FFTW_ESTIMATE);
+    for (i = 0;  i < 1024;  i++)
+    {
+        in[i].re = 0.0;
+        in[i].im = 0.0;
+    }
+#endif
+    in_ptr = 0;
+
+    Fl::check();
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void echo_can_monitor_wait_to_end(void) 
+{
+    fd_set rfds;
+    int res;
+    struct timeval tv;
+
+    fprintf(stderr, "Processing complete.  Press the <enter> key to end\n");
+    do
+    {
+        usleep(100000);
+        Fl::check();
+        FD_ZERO(&rfds);
+        FD_SET(0, &rfds);
+        tv.tv_usec = 100000;
+        tv.tv_sec = 0;
+        res = select(1, &rfds, NULL, NULL, &tv);
+    }
+    while (res <= 0);
+}
+/*- End of function --------------------------------------------------------*/
+
+void echo_can_monitor_update_display(void) 
+{
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/echo_monitor.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,61 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * echo_monitor.h - Display echo canceller status, using the FLTK toolkit.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: echo_monitor.h,v 1.7 2006/10/24 13:22:02 steveu Exp $
+ */
+
+/*! \page echo_monitor_page Echo canceller performance monitoring
+\section echo_monitor_page_sec_1 What does it do?
+This code controls a GUI window, which provides monitoring of the internal status
+of a time domain echo canceller. It shows, graphically:
+
+    - the spectrum of the received signal.
+    - the line model in use (when a known line model is being used).
+    - the adapted coefficients of the canceller.
+
+\section echo_monitor_page_sec_2 How does it work?
+This code uses the FLTK cross platform GUI toolkit. It works on X11 and Windows platforms.
+In addition to the basic FLTK toolkit, fltk_cartesian is also required.
+*/
+
+#if !defined(_ECHO_MONITOR_H_)
+#define _ECHO_MONITOR_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    int start_echo_can_monitor(int len);
+    int echo_can_monitor_can_update(const int16_t *coeffs, int len);
+    int echo_can_monitor_line_model_update(const int32_t *coeffs, int len);
+    int echo_can_monitor_line_spectrum_update(const int16_t amp[], int len);
+    void echo_can_monitor_wait_to_end(void);
+    void echo_can_monitor_update_display(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/echo_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1566 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * echo_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * Based on a bit from here, a bit from there, eye of toad,
+ * ear of bat, etc - plus, of course, my own 2 cents.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: echo_tests.c,v 1.27 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page echo_can_tests_page Line echo cancellation for voice tests
+
+\section echo_can_tests_page_sec_1 What does it do?
+The echo cancellation tests test the echo cancellor against the G.168 spec. Not
+all the tests in G.168 are fully implemented at this time.
+
+\section echo_can_tests_page_sec_2 How does it work?
+
+\section echo_can_tests_page_sec_2 How do I use it?
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(HAVE_FL_FL_H)  &&  defined(HAVE_FL_FL_CARTESIAN_H)  &&  defined(HAVE_FL_FL_AUDIO_METER_H)
+#define ENABLE_GUI
+#endif
+
+#define _GNU_SOURCE
+
+#include <unistd.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#define GEN_CONST
+#include <math.h>
+
+#include "spandsp.h"
+#include "spandsp/g168models.h"
+#if defined(ENABLE_GUI)
+#include "echo_monitor.h"
+#endif
+
+#define TEST_EC_TAPS            256
+
+#if !defined(NULL)
+#define NULL (void *) 0
+#endif
+
+typedef struct
+{
+    const char *name;
+    int max;
+    int cur;
+    AFfilehandle handle;
+    int16_t signal[SAMPLE_RATE];
+} signal_source_t;
+
+typedef struct
+{
+    int type;
+    fir_float_state_t *fir;
+    float history[35*8];
+    int pos;
+    float factor; 
+    float power;
+} level_measurement_device_t;
+
+signal_source_t local_css;
+signal_source_t far_css;
+
+fir32_state_t line_model;
+float model_ki, erl;
+
+AFfilehandle residuehandle;
+int16_t residue_sound[SAMPLE_RATE];
+int residue_cur = 0;
+int munge;
+
+FILE *fdump;
+
+float clip(float x);
+float clip(float x) {
+    if (x > 32767.0) x = 32767.0;
+    if (x < -32767.0) x = -32767.0;
+
+    return x;
+}
+/*- End of function --------------------------------------------------------*/
+
+static inline void put_residue(int16_t amp)
+{
+    int outframes;
+
+    residue_sound[residue_cur++] = amp;
+    if (residue_cur >= SAMPLE_RATE)    {
+        outframes = afWriteFrames(residuehandle,
+                                  AF_DEFAULT_TRACK,
+                                  residue_sound,
+                                  residue_cur);
+        if (outframes != residue_cur)
+        {
+            fprintf(stderr, "    Error writing residue sound\n");
+            exit(2);
+        }
+        residue_cur = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void signal_load(signal_source_t *sig, const char *name)
+{
+    float x;
+
+    sig->name = name;
+    if ((sig->handle = afOpenFile(sig->name, "r", 0)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", sig->name);
+        exit(2);
+    }
+    if ((x = afGetFrameSize(sig->handle, AF_DEFAULT_TRACK, 1)) != 2.0)
+    {
+        fprintf(stderr, "    Unexpected frame size in wave file '%s'\n", sig->name);
+        exit(2);
+    }
+    if ((x = afGetRate(sig->handle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+    {
+        printf("    Unexpected sample rate in wave file '%s'\n", sig->name);
+        exit(2);
+    }
+    if ((x = afGetChannels(sig->handle, AF_DEFAULT_TRACK)) != 1.0)
+    {
+        printf("    Unexpected number of channels in wave file '%s'\n", sig->name);
+        exit(2);
+    }
+    sig->max = afReadFrames(sig->handle, AF_DEFAULT_TRACK, sig->signal, SAMPLE_RATE);
+    if (sig->max < 0)
+    {
+        fprintf(stderr, "    Error reading sound file '%s'\n", sig->name);
+        exit(2);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static AFfilehandle af_file_open_for_read(const char *name)
+{
+    float x;
+    AFfilehandle handle;
+
+    if ((handle = afOpenFile(name, "r", 0)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", name);
+        exit(2);
+    }
+    if ((x = afGetFrameSize(handle, AF_DEFAULT_TRACK, 1)) != 2.0)
+    {
+        fprintf(stderr, "    Unexpected frame size in wave file '%s'\n", name);
+        exit(2);
+    }
+    if ((x = afGetRate(handle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+    {
+        printf("    Unexpected sample rate in wave file '%s'\n", name);
+        exit(2);
+    }
+    if ((x = afGetChannels(handle, AF_DEFAULT_TRACK)) != 1.0)
+    {
+        printf("    Unexpected number of channels in wave file '%s'\n", name);
+        exit(2);
+    }
+
+    return handle;
+}
+/*- End of function --------------------------------------------------------*/
+
+static AFfilehandle af_file_open_for_write(const char *name)
+{
+    AFfilesetup  setup;
+    AFfilehandle handle;
+
+    setup = afNewFileSetup();
+    if (setup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    %s: Failed to create file setup\n", name);
+        exit(2);
+    }
+    afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(setup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(setup, AF_FILE_WAVE);
+    afInitChannels(setup, AF_DEFAULT_TRACK, 1);
+    handle = afOpenFile(name, "w", setup);
+
+    if (handle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open result file\n");
+        exit(2);
+    }
+    afFreeFileSetup(setup);
+
+    return handle;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void signal_restart(signal_source_t *sig)
+{
+    sig->cur = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int16_t signal_amp(signal_source_t *sig)
+{
+    int16_t tx;
+
+    tx = sig->signal[sig->cur++];
+    if (sig->cur >= sig->max)
+        sig->cur = 0;
+    return tx;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* note mu-law used, alaw has big DC Offsets that causes probs with G168
+   tests, due to alaw idle values being passed thru when NLP opens for
+   very low level signals.  Probably need a DC blocking filter in e/c
+*/
+static inline int16_t codec_munge(int16_t amp)
+{
+    return ulaw_to_linear(linear_to_ulaw(amp));
+}
+/*- End of function --------------------------------------------------------*/
+
+static int channel_model_create(int model)
+{
+    static const int32_t *line_models[] =
+    {
+        line_model_d2_coeffs,
+        line_model_d3_coeffs,
+        line_model_d4_coeffs,
+        line_model_d5_coeffs,
+        line_model_d6_coeffs,
+        line_model_d7_coeffs,
+        line_model_d8_coeffs,
+        line_model_d9_coeffs
+    };
+
+    static int line_model_sizes[] =
+    {
+        sizeof(line_model_d2_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d3_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d4_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d5_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d6_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d7_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d8_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d9_coeffs)/sizeof(int32_t)
+    };
+
+    static float ki[] = 
+    {
+	1.39E-5, 1.44E-5, 1.52E-5, 1.77E-5, 9.33E-6, 1.51E-5, 2.33E-5, 1.33E-5
+    };
+
+    if (model < 1  ||  model > (int) (sizeof(line_model_sizes)/sizeof(line_model_sizes[0])))
+        return -1;
+    fir32_create(&line_model, line_models[model-1], line_model_sizes[model-1]);
+
+    model_ki = ki[model-1];
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int16_t channel_model(int16_t *new_local, int16_t *new_far, int16_t local, int16_t far)
+{
+    int16_t echo;
+    int16_t rx;
+
+    /* Channel modelling is merely simulating the effects of A-law or u-law distortion
+       and using one of the echo models from G.168. Simulating the codec is very important,
+       as this is usually the limiting factor in how much echo reduction is achieved. */
+
+    /* The local tx signal will usually have gone through an A-law munging before
+       it reached the line's analogue area, where the echo occurs. */
+    if (munge == TRUE)
+	local = codec_munge(local);
+    /* Now we need to model the echo. We only model a single analogue segment, as per
+       the G.168 spec. However, there will generally be near end and far end analogue/echoey
+       segments in the real world, unless an end is purely digital. */
+    echo = fir32(&line_model, local*erl*(32768.0*model_ki));
+    /* The far end signal will have been through an A-law munging, although
+       this should not affect things. */
+    if (munge == TRUE)
+	rx = clip(echo + codec_munge(far));
+    else
+	rx = clip(echo + far);
+	
+    /* This mixed echo and far end signal will have been through an A-law munging
+       when it came back into the digital network. */
+    if (munge == TRUE)
+	rx = codec_munge(rx);
+    if (new_far)
+        *new_far = rx;
+    if (new_local)
+        *new_local = local;
+    return  rx;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* 
+   250Hz HP filter, designed using this excellent site:
+ 
+   http://www-users.cs.york.ac.uk/~fisher/mkfilter/
+
+   Included as preliminary test to see if this sort of filter will help
+   hum removal from low cost X100P type cards.  Unfortunately I couldn't
+   get thios to work well in fixed point, so had to leave it out of 
+   treh core echo canceller.
+*/
+
+#define NZEROS 4
+#define NPOLES 4
+
+#define FIXED
+#ifdef FIXED
+#define GAIN   1.293080949e+00
+#define QCONST32(x,bits) ((int)((x)*(1<<(bits))))
+
+static int hp_filter(int xv[], int yv[], int x)
+{
+    xv[0] = xv[1]; xv[1] = xv[2]; xv[2] = xv[3]; xv[3] = xv[4]; 
+    xv[4] = x * (int)((1<<5)/GAIN);
+    yv[0] = yv[1]; yv[1] = yv[2]; yv[2] = yv[3]; yv[3] = yv[4]; 
+    yv[4] =   (xv[0] + xv[4]) - 4 * (xv[1] + xv[3]) + 6 * xv[2];
+    yv[4] +=  (QCONST32(-0.5980652616f, 10) * yv[0]) >> 10;
+    yv[4] +=  (QCONST32( 2.6988843913f, 10) * yv[1]) >> 10;
+    yv[4] +=  (QCONST32(-4.5892912321f, 10) * yv[2]) >> 10;
+    yv[4] +=  (QCONST32( 3.4873077415f, 10) * yv[3]) >> 10;
+
+    return yv[4] >> 5;     
+}
+
+#else
+#define GAIN   1.293080949e+00
+
+static float hp_filter(float xv[], float yv[], float x)
+{
+    xv[0] = xv[1]; xv[1] = xv[2]; xv[2] = xv[3]; xv[3] = xv[4]; 
+    xv[4] = x / GAIN;
+    yv[0] = yv[1]; yv[1] = yv[2]; yv[2] = yv[3]; yv[3] = yv[4]; 
+    yv[4] =   (xv[0] + xv[4]) - 4 * (xv[1] + xv[3]) + 6 * xv[2]
+	+ ( -0.5980652616 * yv[0]) + (  2.6988843913 * yv[1])
+	+ ( -4.5892912321 * yv[2]) + (  3.4873077415 * yv[3]);
+    return yv[4];     
+}
+#endif
+
+static level_measurement_device_t *level_measurement_device_create(int type)
+{
+    level_measurement_device_t *dev;
+    int i;
+
+    dev = (level_measurement_device_t *) malloc(sizeof(level_measurement_device_t));
+    dev->fir = (fir_float_state_t *) malloc(sizeof(fir_float_state_t));
+    fir_float_create(dev->fir,
+                     level_measurement_bp_coeffs,
+                     sizeof(level_measurement_bp_coeffs)/sizeof(float));
+    for (i = 0;  i < 35*8;  i++)
+        dev->history[i] = 0.0;
+    dev->pos = 0;
+    dev->factor = exp(-1.0/((float) SAMPLE_RATE*0.035));
+    dev->power = 0;
+    dev->type = type;
+    return  dev;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void level_measurement_device_reset(level_measurement_device_t *dev)
+{
+    int i;
+
+    for (i = 0;  i < 35*8;  i++)
+        dev->history[i] = 0.0;
+    dev->pos = 0;
+    dev->power = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int level_measurement_device_release(level_measurement_device_t *s)
+{
+    fir_float_free(s->fir);
+    free(s->fir);
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static float level_measurement_device(level_measurement_device_t *dev, int16_t amp)
+{
+    float signal;
+
+    signal = fir_float(dev->fir, amp);
+    signal *= signal;
+    if (dev->type == 0)
+    {
+        dev->power = dev->power*dev->factor + signal*(1.0 - dev->factor);
+        signal = sqrt(dev->power);
+    }
+    else
+    {
+        dev->power -= dev->history[dev->pos];
+        dev->power += signal;
+        dev->history[dev->pos++] = signal;
+        signal = sqrt(dev->power/(35.8*8.0));
+    }
+    if (signal > 0.0) 
+	return DBM0_MAX_POWER + 20.0*log10(signal/32767.0);
+    else
+	return -1000.0;
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Globals used for performing tests */
+
+echo_can_state_t *ctx;
+awgn_state_t      sgen_noise_source;
+awgn_state_t      rin_noise_source;
+
+level_measurement_device_t *Rin_power_meter;
+level_measurement_device_t *Sgen_power_meter;
+level_measurement_device_t *Sin_power_meter;
+level_measurement_device_t *Sout_power_meter;
+
+float LRin, maxLRin;
+float LSgen, maxLSgen;
+float LSin, maxLSin;
+float LSout, maxLSout;
+float Lres, maxLres;
+float test_clock;
+float maxHoth;
+
+float Rin_level, Sgen_level;
+FILE *flevel;
+int Rin_type, Sgen_type;
+int failed;
+int verbose, quiet;
+float threshold;
+int model_number;
+char test_name[80];
+
+tone_gen_state_t rin_tone_state;
+tone_gen_state_t sgen_tone_state;
+
+/*
+   Test callback functions are called one for every processed sample
+   during run_test().  They are user supplied, and return TRUE if the
+   test is passing or FALSE if a combination of variables mean that
+   the test has failed (for example Lres exceeding some threshold).
+
+   Different test callback functions are required for each G168 test.
+*/
+int (*test_callback)(void);
+
+/* macros to convert units for run_test */
+
+#define MSEC  (SAMPLE_RATE/1000)
+#define SEC   SAMPLE_RATE
+
+/* Sgen signal generator types */
+
+#define NONE 0
+#define CSS  1
+#define HOTH 2
+#define TONE 3
+
+/* Experimentally generated constants to normalise levels to dBm0 */
+
+#define HOTH_SCALE 2.40
+#define CSS_SCALE  5.60
+
+static void reset_all(void) {
+    echo_can_flush(ctx);
+    maxLRin = maxLSgen = maxLSin = maxLSout = maxLres = -100.0;
+    signal_restart(&local_css);
+    signal_restart(&far_css);
+    test_callback = NULL;
+    Rin_type = CSS;
+    Sgen_type = NONE;
+    failed = FALSE;
+    test_clock = 0.0;
+}
+
+static void reset_meter_peaks(void) {
+    maxLRin = maxLSgen = maxLSin = maxLSout = maxLres = -100.0;
+}
+
+static void install_test_callback(int (*f)(void)) {
+    test_callback = f;
+}
+
+/* note: maybe we should use absolute levels rather than gain?  Need to
+   normalise levels from various signal types to do this */
+
+static void set_Sgen(int source_type, float gain) {
+    Sgen_type = source_type;
+    Sgen_level = pow(10.0, gain/20.0);
+}
+
+static void set_Rin(int source_type, float gain) {
+    Rin_type = source_type;
+    Rin_level = pow(10.0, gain/20.0);
+}
+
+static void mute_Rin(void) {
+    Rin_type = NONE;
+}
+
+static void unmute_Rin(void) {
+    Rin_type = CSS;
+}
+
+static void update_levels(int16_t rin, int16_t sin, int16_t sout, int16_t sgen)
+{
+    LRin = level_measurement_device(Rin_power_meter, rin);
+    LSin = level_measurement_device(Sin_power_meter, sin);
+    LSout = level_measurement_device(Sout_power_meter, sout);
+    LSgen = level_measurement_device(Sgen_power_meter, sgen);
+    if (LRin > maxLRin) maxLRin = LRin;
+    if (LSin > maxLSin) maxLSin = LSin;
+    if (LSout > maxLSout) maxLSout = LSout;
+    if (LSgen > maxLSgen) maxLSgen = LSgen;
+}
+
+static void write_log_files(int16_t rout, int16_t sin)
+{
+    fprintf(flevel, "%f\t%f\t%f\t%f\n",LRin, LSin, LSout, LSgen);
+    fprintf(fdump, "%d %d %d", ctx->tx, ctx->rx, ctx->clean);
+    fprintf(fdump, " %d %d %d %d %d %d %d %d %d %d\n", ctx->clean_nlp, ctx->Ltx, 
+	    ctx->Lrx, ctx->Lclean, 
+	    (ctx->nonupdate_dwell > 0), ctx->adapt,  ctx->Lclean_bg, ctx->Pstates, 
+	    ctx->Lbgn_upper, ctx->Lbgn);
+}
+
+static void run_test(float time, float units) {
+    int     i;
+    int     samples;
+    int16_t rout, rin=0, sin;
+    int16_t sgen=0, sout;
+    float   rin_hoth_noise = 0;	
+    float   sgen_hoth_noise = 0;	
+
+    samples = time * units;
+
+    for (i = 0;  i < samples;  i++) {
+
+	switch(Rin_type) {
+	case NONE:
+	    rin = 0;
+	    break;
+	case CSS:
+	    rin = clip(Rin_level*signal_amp(&local_css)*CSS_SCALE);
+	    break;
+	case HOTH:
+	    rin_hoth_noise = rin_hoth_noise*0.625 + awgn(&rin_noise_source)*0.375;
+	    rin = clip(Rin_level*rin_hoth_noise*HOTH_SCALE); 
+	    break;
+	case TONE:
+            tone_gen(&rin_tone_state, &rin, 1);
+	    break;
+	}
+
+	switch(Sgen_type) {
+	case NONE:
+	    sgen = 0;
+	    break;
+	case CSS:
+	    sgen = clip(Sgen_level*signal_amp(&far_css)*CSS_SCALE);
+	    break;
+	case HOTH:
+	    sgen_hoth_noise = sgen_hoth_noise*0.625 + awgn(&sgen_noise_source)*0.375;
+	    sgen = clip(Sgen_level*sgen_hoth_noise*HOTH_SCALE); 
+	    break;
+	case TONE:
+            tone_gen(&sgen_tone_state, &sgen, 1);
+	    break;
+	}
+
+        rout = echo_can_hpf_tx(ctx, rin);
+	channel_model(&rout, &sin, rin, sgen);
+	sout = echo_can_update(ctx, rout, sin);
+	update_levels(rin, sin, sout, sgen);
+	write_log_files(rout, sin);
+	
+	/* now test for fail condition */
+	if (test_callback != NULL) {
+	    if ( (failed == FALSE) && (test_callback() == FALSE)) {
+		/* test has failed */
+		failed = TRUE;
+	    }
+	}
+	    
+	/* stop clock on fail - points to time of failure in test */
+
+	if (failed == FALSE)
+	    test_clock += (float)1/SAMPLE_RATE;
+    }
+}
+
+static void print_title(const char *title) {
+    if (quiet == FALSE) 
+	printf(title);
+}
+
+static void print_results(void) {
+
+    if (quiet == FALSE) 
+	printf("test  model  ERL   time     Max Rin  Max Sin  Max Sgen  Max Sout  Result\n");
+    printf("%-4s  %-1d      %-5.1f%6.2fs%9.2f%9.2f%10.2f%10.2f   ", 
+	   test_name, model_number, 20.0*log10(erl), 
+	   test_clock, maxLRin, maxLSin, maxLSgen, maxLSout);
+    if (failed == TRUE)
+	printf("FAIL\n");
+    else
+	printf("PASS\n");
+}
+
+static int test_2a(void) {
+    if (LSout > -65.0) 
+	return FALSE;
+    else
+	return TRUE;
+}
+
+static int test_2c(void) {
+    if (LSout > maxHoth) 
+	return FALSE;
+    else
+	return TRUE;
+}
+
+static int test_3a(void) {
+    if (LSout > maxLSgen) 
+	return FALSE;
+    else
+	return TRUE;
+}
+
+static int test_3b(void) {
+    if (LSout > threshold) 
+	return FALSE;
+    else
+	return TRUE;
+}
+
+static int test_3c_t2(void) {
+    if (LSout > maxLSgen) 
+	return FALSE;
+    else
+	return TRUE;
+}
+
+static int test_3c_t4t5(void) {
+    if (LSout > (maxLSgen+6.0)) 
+	return FALSE;
+    else
+	return TRUE;
+}
+
+static int test_9(void) {
+    if (fabs(LSout - LSgen) > 2.0) 
+	return FALSE;
+    else
+	return TRUE;
+}
+
+#define N_TESTS 9
+static const char *supported_tests[] = {"ut1", "2aa", "2ca", "3a", "3ba", 
+					"3bb", "3c", "6", "9"};
+
+static int is_test_supported(char *test) {
+    int i;
+    for(i=0; i<N_TESTS; i++) {
+	if (!strcasecmp(test, supported_tests[i]))
+	    return TRUE;
+    }
+
+    return FALSE;
+}
+
+/* dump estimate echo response */
+static void dump_h(void) {
+    int i;
+    FILE *f = fopen("h.txt","wt");
+    for(i=0; i<TEST_EC_TAPS; i++) {
+	fprintf(f, "%f\n", (float)ctx->fir_taps16[0][i]/(1<<15));
+    }
+    fclose(f);
+}
+       
+int main(int argc, char *argv[])
+{
+    //awgn_state_t local_noise_source;
+    int i;
+    //int j;
+    //int k;
+    //tone_gen_descriptor_t tone_desc;
+    //tone_gen_state_t tone_state;
+    //int16_t local_sound[40000];
+    //int local_max;
+    //int local_cur;
+    int far_cur;
+    int result_cur;
+    AFfilehandle txfile, rxfile, ecfile;
+    time_t now;
+    int tone_burst_step;
+    float X_level, Sgen_leveldB;
+#ifdef FIXED
+    int xvrx[NZEROS+1], yvrx[NPOLES+1];
+    int xvtx[NZEROS+1], yvtx[NPOLES+1];
+#else
+    float xvrx[NZEROS+1], yvrx[NPOLES+1];
+    float xvtx[NZEROS+1], yvtx[NPOLES+1];
+#endif
+
+    int file_mode;
+    float tmp;
+    int   cng;
+    int   hpf;
+
+    /* default config ------------------------------------------------*/
+
+    model_number = 1;
+    erl = pow(10.0, -10.0/20.0);
+    verbose = quiet = FALSE;
+    file_mode = FALSE;
+    Rin_level = pow(10.0, -15.0/20.0);
+    Sgen_leveldB = -15.0;
+    Sgen_level = pow(10.0, Sgen_leveldB/20.0);
+    X_level = pow(10.0, 6.0/20.0);
+    tone_burst_step = 0;
+    txfile = rxfile = ecfile = NULL;
+    munge = TRUE;
+    cng = FALSE;
+    hpf = TRUE;
+    for(i=0; i<NPOLES+1; i++) {
+      xvtx[i] = yvtx[i] = xvrx[i] = yvrx[i] = 0.0;
+    }
+    
+    /* Check which tests we should run ----------------------------------------*/
+
+    if (argc < 2) {
+        fprintf(stderr, "Usage: echo [2aa] [2ca] [3a] [3ba] [3bb] [3c] [6] [9]\n"
+		        "[-m ChannelModelNumber]\n"
+		        "[-erl ERL_in_dB\n"
+		        "[-file RinInputFile.wav SinInputFile.wav SoutOutputFile.wav\n"
+		        "[-r RinLeveldBm0] [-s SgenLeveldBm0] [-x XLeveldB]\n"
+		        "[-nomunge]\n"
+		        "[-cng]\n"
+		        "[-nohpf] Disable DC block HPF (-file mode)\n");
+
+	exit(1);
+    }
+
+    for (i = 1;  i < argc;  i++)
+    {
+	if (is_test_supported(argv[i])) {
+	}
+	else if (strcmp(argv[i], "-m") == 0)
+        {
+            if (++i < argc)
+                model_number = atoi(argv[i]);
+        }
+        else if (strcmp(argv[i], "-r") == 0)
+        {
+            if (++i < argc)
+                Rin_level = pow(10.0, atof(argv[i])/20.0);
+        }
+        else if (strcmp(argv[i], "-s") == 0)
+        {
+            if (++i < argc) {
+                Sgen_leveldB = atof(argv[i]);
+                Sgen_level = pow(10.0, Sgen_leveldB/20.0);
+	    }
+        }
+        else if (strcmp(argv[i], "-x") == 0)
+        {
+            if (++i < argc)
+                X_level = pow(10.0, atof(argv[i])/20.0);
+        }
+        else if (strcmp(argv[i], "-erl") == 0)
+        {
+            if (++i < argc) {
+                erl = atof(argv[i]);
+		if (erl < 0.0) {
+		    printf("ERL must be >= 0.0 dB\n");
+		    exit(1);
+		}
+		erl = pow(10.0, -erl/20.0);
+	    }
+        }
+        else if (strcmp(argv[i], "-v") == 0)
+        {
+            verbose = TRUE;
+        }
+        else if (strcmp(argv[i], "-q") == 0)
+        {
+            quiet = TRUE;
+        }
+        else if (strcmp(argv[i], "-file") == 0)
+        {
+	    file_mode = TRUE;
+	    if (argc < (i+3)) {
+		printf("not enough arguments for --file\n");
+		exit(2);
+	    }
+	    txfile = af_file_open_for_read(argv[i+1]);	    
+ 	    rxfile = af_file_open_for_read(argv[i+2]);	    
+ 	    ecfile = af_file_open_for_write(argv[i+3]);
+	    i += 3;
+        }
+        else if (strcmp(argv[i], "-nomunge") == 0)
+        {
+            munge = FALSE;
+        }
+        else if (strcmp(argv[i], "-cng") == 0)
+        {
+            cng = TRUE;
+        }
+        else if (strcmp(argv[i], "-nohpf") == 0)
+        {
+            hpf = FALSE;
+        }
+        else
+        {
+            fprintf(stderr, "Unknown test/option '%s' specified\n", argv[i]);
+            exit(2);
+        }
+    }
+
+    /* initialise a bunch of modules we need ------------------------------*/
+
+    time(&now);
+
+    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    awgn_init_dbm0(&rin_noise_source, 7162534, 0.0f);
+    awgn_init_dbm0(&sgen_noise_source, 7162534, 0.0f);
+    Rin_power_meter = level_measurement_device_create(0);
+    Sgen_power_meter = level_measurement_device_create(0);
+    Sin_power_meter = level_measurement_device_create(0);
+    Sout_power_meter = level_measurement_device_create(0);
+    if (channel_model_create(model_number))
+    {
+        fprintf(stderr, "    Failed to create line model\n");
+        exit(2);
+    }
+
+    far_cur = 0;
+    result_cur = 0;
+
+    if (verbose == TRUE) {
+	printf("ERL (linear)......: %6.2f (%5.2f)\n"
+	       "Rin level (linear).: %6.2f (%5.2f)\n"
+	       "Sgen level (linear): %6.2f (%5.2f)\n",
+	       20.0*log10(erl), erl, 
+	       20.0*log10(Rin_level), Rin_level,
+	       20.0*log10(Sgen_level), Sgen_level);
+    }
+
+    fdump = fopen("dump.txt","wt");
+    assert(fdump != NULL);
+    flevel = fopen("level.txt","wt");
+    assert(flevel != NULL);
+
+    if (file_mode == TRUE) {
+	/* process wave files instead of running tests, useful for
+	   testing real world signals */
+	int ntx, nrx, nec;
+	int16_t rin, rout, sin, sout;
+	int mode;
+
+	mode =  ECHO_CAN_USE_ADAPTION | ECHO_CAN_USE_NLP;
+	if (cng) 
+	    mode |= ECHO_CAN_USE_CNG;
+	else
+	    mode |= ECHO_CAN_USE_CLIP;
+	if (hpf) {
+	    mode |= ECHO_CAN_USE_TX_HPF;
+	    mode |= ECHO_CAN_USE_RX_HPF;
+	}
+	echo_can_adaption_mode(ctx, mode);
+	do {
+	    ntx = afReadFrames(txfile, AF_DEFAULT_TRACK, &rin, 1);
+	    if (ntx < 0) {	   
+		fprintf(stderr, "    Error reading tx sound file\n");
+		exit(2);
+	    }
+	    nrx = afReadFrames(rxfile, AF_DEFAULT_TRACK, &sin, 1);
+	    if (nrx < 0) {	   
+		fprintf(stderr, "    Error reading rx sound file\n");
+		exit(2);
+	    }
+
+	    rout = echo_can_hpf_tx(ctx, rin);
+	    sout = echo_can_update(ctx, rout, sin);
+
+	    nec = afWriteFrames(ecfile, AF_DEFAULT_TRACK, &sout, 1);
+	    if (nec != 1) {
+		fprintf(stderr, "    Error writing ec sound file\n");
+		exit(2);
+	    }
+
+	    update_levels(rin, sin, sout, 0);
+	    write_log_files(rin, sin);
+	    
+	} while (ntx && nrx);
+
+	dump_h();
+
+	afCloseFile(txfile);
+	afCloseFile(rxfile);
+	afCloseFile(ecfile);	
+	exit(0);
+    }
+
+    signal_load(&local_css, "sound_c1_8k.wav");
+    signal_load(&far_css, "sound_c3_8k.wav");
+
+    strcpy(test_name, argv[1]);
+
+    /* basic unit test used in e/c dvelopment */
+
+    if (!strcasecmp(argv[1], "ut1")) {
+	int16_t rin, sin, rout, sout, sgen;
+
+	print_title("Performing Unit Test 1 - DC inputs\n");
+	reset_all();
+	echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+
+	rout = rin = 2000;
+	sin = 1000;
+	sgen = 0;
+	for(i=0; i<10; i++) {
+	    rout = 2000+2*i;
+	    sout = echo_can_update(ctx, rout, sin);
+	    update_levels(rin, sin, sout, sgen);
+	    write_log_files(rout, sin);
+	}
+	dump_h();
+    }
+
+    /* Test 1 - Steady state residual and returned echo level test */
+    /* This functionality has been merged with test 2 in newer versions of G.168,
+       so test 1 no longer exists. */
+
+    /* Test 2 - Convergence and steady state residual and returned echo level test */
+
+    /*
+      NOTE: This test is only partially implemented, only the conidtion after
+      1s is tested and I am still not sure if LSout == Lres in the part
+      of the test after 1s.  
+    */
+
+    if (!strcasecmp(argv[1], "2aa")) {
+
+	print_title("Performing test 2A(a) - Convergence with NLP enabled\n");
+	reset_all();
+	echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION | ECHO_CAN_USE_NLP);
+
+	/* initial zero input as reqd by G168 */
+
+	mute_Rin();
+	run_test(200, MSEC);
+	unmute_Rin();
+
+	/* Now test convergence */
+
+	run_test(1, SEC);
+	reset_meter_peaks();
+	install_test_callback(test_2a);
+	run_test(10, SEC);
+	
+	print_results();
+    }
+
+#ifdef OTHER_TESTS
+    if ((test_list & PERFORM_TEST_2B))
+    {
+        printf("Performing test 2B - Re-convergence with NLP disabled\n");
+
+        /* Test 2B - Re-convergence with NLP disabled */
+
+        echo_can_flush(ctx);
+        echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+
+        /* Converge a canceller */
+
+        signal_restart(&local_css);
+        for (i = 0;  i < 800*2;  i++)
+        {
+            clean = echo_can_update(ctx, 0, 0);
+            put_residue(clean);
+        }
+
+        for (i = 0;  i < SAMPLE_RATE*5;  i++)
+        {
+            tx = signal_amp(&local_css);
+            channel_model(&tx, &rx, tx, 0);
+            clean = echo_can_update(ctx, tx, rx);
+            put_residue(clean);
+#if defined(ENABLE_GUI)
+            if (use_gui)
+                echo_can_monitor_can_update(ctx->fir_taps16[ctx->tap_set], TEST_EC_TAPS);
+#endif
+        }
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            echo_can_monitor_can_update(ctx->fir_taps16[ctx->tap_set], TEST_EC_TAPS);
+#endif
+    }
+#endif
+
+    if (!strcasecmp(argv[1], "2ca")) {
+	float SgenLeveldB;
+
+	print_title("Performing test 2C(a) - Convergence with background noise present\n");
+	reset_all();
+	echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION | ECHO_CAN_USE_NLP);
+
+	/* Converge canceller with background noise */
+
+	mute_Rin();
+	run_test(200, MSEC);
+	unmute_Rin();
+
+	SgenLeveldB = 20.0*log10(Rin_level) - 15.0;
+	if (SgenLeveldB > -30.0) SgenLeveldB = -30.0;
+	set_Sgen(HOTH, SgenLeveldB);
+	run_test(1, SEC);
+	maxHoth = maxLSgen;
+
+	/* After 1 second freeze adaption, switch off noise. */
+
+	mute_Rin();
+	run_test(150, MSEC);
+
+	echo_can_adaption_mode(ctx, ECHO_CAN_USE_NLP);
+	run_test(1, SEC);
+
+	unmute_Rin();
+	set_Sgen(NONE, 0.0);
+	run_test(500, MSEC);
+
+	/* now measure the echo */
+
+	reset_meter_peaks();
+	maxLSgen = maxHoth; /* keep this peak for print out but reset the rest */
+	install_test_callback(test_2c);
+	set_Sgen(NONE, 0.0);
+	run_test(5, SEC);
+
+	print_results();
+    }
+
+    /* Test 3 - Performance under double talk conditions */
+
+    if (!strcasecmp(argv[1], "3a")) {
+	print_title("Performing test 3A - Double talk test with low cancelled-end levels\n");
+	reset_all();
+
+	echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+	set_Sgen(CSS, -15.0 + 20.0*log10(Rin_level));
+	run_test(5, SEC);
+	tmp = maxLSgen;
+
+	/* now freeze adaption */
+
+	echo_can_adaption_mode(ctx, 0);
+	set_Sgen(NONE, 0.0);
+	run_test(500, MSEC);
+
+	/* Now measure the echo */
+
+	reset_meter_peaks();
+	maxLSgen = tmp;
+	install_test_callback(test_3a);
+	run_test(5, SEC);
+
+	print_results();
+    }
+
+    if (!strcasecmp(argv[1], "3ba")) {
+	float fig11;
+
+	print_title("Performing test 3B(a) - Double talk stability test with high cancelled-end levels\n");
+	reset_all();
+
+	echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+	run_test(5, SEC);
+		
+	/* Apply double talk */
+
+	set_Sgen(CSS, 20.0*log10(Sgen_level));
+	run_test(5, SEC);
+	tmp = maxLSgen;
+
+	/* freeze adaption and measure echo */
+
+	mute_Rin();
+	run_test(150, MSEC);
+
+	echo_can_adaption_mode(ctx, 0);
+	run_test(1, SEC);
+
+	unmute_Rin();
+	set_Sgen(NONE, 0.0);
+	run_test(500, MSEC);
+
+	/* Now measure the echo */
+
+	fig11 = (25.0/30.0)*maxLRin - 30.0; /* pass/fail based on clean level @ tx peak */
+	threshold = fig11 + 10.0;
+	reset_meter_peaks();
+	maxLSgen = tmp;
+	install_test_callback(test_3b);
+	run_test(5, SEC);
+
+	print_results();
+    }
+
+    if (!strcasecmp(argv[1], "3bb")) {
+	float fig11;
+
+	print_title("Performing test 3B(b) - Double talk stability test with low cancelled-end levels\n");
+	reset_all();
+
+	echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+	run_test(5, SEC);
+
+	/* Apply double talk */
+
+	set_Sgen(CSS,  20.0*log10(Rin_level) - 20.0*log10(X_level));
+	run_test(5, SEC);
+	tmp = maxLSgen;
+
+	/* freeze adaption and measure echo */
+
+	mute_Rin();
+	run_test(150, MSEC);
+
+	echo_can_adaption_mode(ctx, 0);
+	run_test(1, SEC);
+
+	unmute_Rin();
+	set_Sgen(NONE, 0.0);
+	run_test(500, MSEC);
+
+	/* Now measure the echo */
+
+	fig11 = (25.0/30.0)*maxLRin - 30.0; /* pass/fail based on clean level @ tx peak */
+	threshold = fig11 + 3.0;
+	reset_meter_peaks();
+	maxLSgen = tmp;
+	install_test_callback(test_3b);
+	run_test(5, SEC);
+
+	print_results();
+    }
+
+    if (!strcasecmp(argv[1], "3c")) {
+	print_title("Performing test 3C - Double talk test under simulated conversation\n");
+	reset_all();
+
+	/* t1 (5.6s) - double talk */
+
+	echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION | ECHO_CAN_USE_NLP);
+	set_Sgen(CSS,  Sgen_leveldB);
+	run_test(5600, MSEC);
+
+	/* t2 (1.4s) - to pass Sout <= Sgen */
+
+	set_Sgen(NONE, 0.0);
+	install_test_callback(test_3c_t2);
+	run_test(1400, MSEC);
+
+	/* t3 - (5s) - single talk to converge e/c */
+
+	run_test(5000, MSEC);
+
+	/* t4 - (5.6s) - double talk again */
+
+	install_test_callback(test_3c_t4t5);
+	set_Sgen(CSS,  Sgen_leveldB);
+	run_test(5600, MSEC);
+
+	/* t5 - (5.6s) - near end single talk  */
+
+	mute_Rin();
+	run_test(5600, MSEC);
+
+	print_results();
+    }
+
+#ifdef OTHER_TESTS
+    if ((test_list & PERFORM_TEST_4))
+    {
+        printf("Performing test 4 - Leak rate test\n");
+        /* Test 4 - Leak rate test */
+        echo_can_flush(ctx);
+        echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+        /* Converge a canceller */
+        signal_restart(&local_css);
+        for (i = 0;  i < SAMPLE_RATE*5;  i++)
+        {
+            tx = signal_amp(&local_css);
+            channel_model(&tx, &rx, tx, 0);
+            clean = echo_can_update(ctx, tx, rx);
+            put_residue(clean);
+        }
+        /* Put 2 minutes of silence through it */
+        for (i = 0;  i < SAMPLE_RATE*120;  i++)
+        {
+            clean = echo_can_update(ctx, 0, 0);
+            put_residue(clean);
+        }
+        /* Now freeze it, and check if it is still well adapted. */
+        echo_can_adaption_mode(ctx, 0);
+        for (i = 0;  i < SAMPLE_RATE*5;  i++)
+        {
+            tx = signal_amp(&local_css);
+            channel_model(&tx, &rx, tx, 0);
+            clean = echo_can_update(ctx, tx, rx);
+            put_residue(clean);
+        }
+        echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            echo_can_monitor_can_update(ctx->fir_taps16[ctx->tap_set], TEST_EC_TAPS);
+#endif
+    }
+
+    if ((test_list & PERFORM_TEST_5))
+    {
+        printf("Performing test 5 - Infinite return loss convergence test\n");
+        /* Test 5 - Infinite return loss convergence test */
+        echo_can_flush(ctx);
+        echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+        /* Converge the canceller */
+        signal_restart(&local_css);
+        for (i = 0;  i < SAMPLE_RATE*5;  i++)
+        {
+            tx = signal_amp(&local_css);
+            channel_model(&tx, &rx, tx, 0);
+            clean = echo_can_update(ctx, tx, rx);
+            put_residue(clean);
+        }
+        /* Now stop echoing, and see we don't do anything unpleasant as the
+           echo path is open looped. */
+        for (i = 0;  i < SAMPLE_RATE*5;  i++)
+        {
+            tx = signal_amp(&local_css);
+            rx = 0;
+            tx = codec_munge(tx);
+            clean = echo_can_update(ctx, tx, rx);
+            put_residue(clean);
+        }
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            echo_can_monitor_can_update(ctx->fir_taps16[ctx->tap_set], TEST_EC_TAPS);
+#endif
+    }
+
+#endif
+
+    if (!strcasecmp(argv[1], "6"))
+    {
+	int   k;
+	float fig11;
+
+        printf("Performing test 6 - Non-divergence on narrow-band signals\n");
+
+	reset_all();
+	echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+	run_test(5, SEC);
+
+        /* Now put 5s bursts of a list of tones through the converged canceller, and check
+           that nothing unpleasant happens. */
+
+        for (k = 0;  tones_6_4_2_7[k][0];  k++)
+        {
+	    tone_gen_descriptor_t tone_desc;
+	    
+	    /* 5 secs of each tone */
+
+	    echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+	    set_Rin(TONE, 20.0*log10(Rin_level)); /* level actually set by next func */
+            make_tone_gen_descriptor(&tone_desc,
+                                     tones_6_4_2_7[k][0],
+                                     -11,
+                                     tones_6_4_2_7[k][1],
+                                     -9,
+                                     1,
+                                     0,
+                                     0,
+                                     0,
+                                     1);
+            tone_gen_init(&rin_tone_state, &tone_desc);
+	    run_test(5, SEC);
+	}
+
+	/* disable adaption, back to speech */
+
+	echo_can_adaption_mode(ctx, 0);
+	set_Rin(CSS, 20.0*log10(Rin_level)); 
+	run_test(1, SEC);
+
+	/* now test convergence as per test 2 fig 11 */
+
+	fig11 = (25.0/30.0)*maxLRin - 30.0; /* pass/fail based on clean level @ tx peak */
+	threshold = fig11 + 10.0;
+	reset_meter_peaks();
+	install_test_callback(test_3b);
+	run_test(5, SEC);	
+
+	print_results();
+    }
+
+#ifdef OTHER_TESTS
+
+    if ((test_list & PERFORM_TEST_7))
+    {
+        printf("Performing test 7 - Stability\n");
+        /* Test 7 - Stability */
+        /* Put tones through an unconverged canceller, and check nothing unpleasant
+           happens. */
+        echo_can_flush(ctx);
+        echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
+        make_tone_gen_descriptor(&tone_desc,
+                                 tones_6_4_2_7[0][0],
+                                 -11,
+                                 tones_6_4_2_7[0][1],
+                                 -9,
+                                 1,
+                                 0,
+                                 0,
+                                 0,
+                                 1);
+        tone_gen_init(&tone_state, &tone_desc);
+        j = 0;
+        for (i = 0;  i < 120;  i++)
+        {
+            local_max = tone_gen(&tone_state, local_sound, SAMPLE_RATE);
+            for (j = 0;  j < SAMPLE_RATE;  j++)
+            {
+                tx = local_sound[j];
+                channel_model(&tx, &rx, tx, 0);
+                clean = echo_can_update(ctx, tx, rx);
+                put_residue(clean);
+            }
+#if defined(ENABLE_GUI)
+            if (use_gui)
+            {
+                echo_can_monitor_can_update(ctx->fir_taps16[ctx->tap_set], TEST_EC_TAPS);
+                echo_can_monitor_update_display();
+                usleep(100000);
+            }
+#endif
+        }
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            echo_can_monitor_can_update(ctx->fir_taps16[ctx->tap_set], TEST_EC_TAPS);
+#endif
+    }
+
+    if ((test_list & PERFORM_TEST_8))
+    {
+        printf("Performing test 8 - Non-convergence on No 5, 6, and 7 in-band signalling\n");
+        /* Test 8 - Non-convergence on No 5, 6, and 7 in-band signalling */
+        fprintf(stderr, "Test 8 not yet implemented\n");
+    }
+#endif
+
+    if (!strcasecmp(argv[1], "9"))
+    {
+        printf("Performing test 9 - Comfort noise test\n");
+
+        echo_can_flush(ctx);
+        echo_can_adaption_mode(ctx,   ECHO_CAN_USE_ADAPTION 
+			            | ECHO_CAN_USE_NLP 
+			            | ECHO_CAN_USE_CNG);
+
+        /* Test 9 Part 1 - matching */
+
+	set_Sgen(HOTH, -45.0);
+	mute_Rin();
+	run_test(5, SEC); /* should be 30s but I wanted to speed up sim */
+	set_Rin(HOTH, -10.0);
+	run_test(2, SEC); 
+
+	reset_meter_peaks();
+	install_test_callback(test_9);
+	run_test(700, MSEC); 
+
+        /* Test 9 Part 2 - adjustment down */
+
+	install_test_callback(NULL);
+	set_Sgen(HOTH, -55.0);
+	mute_Rin();
+	run_test(5, SEC); /* should be 10s but I wanted to speed up sim */
+	set_Rin(HOTH, -10.0);
+	run_test(2, SEC); 
+
+	reset_meter_peaks();
+	install_test_callback(test_9);
+	run_test(700, MSEC); 
+
+        /* Test 9 Part 3 - adjustment up */
+
+	install_test_callback(NULL);
+	set_Sgen(HOTH, -45.0);
+	mute_Rin();
+	run_test(5, SEC); /* should be 10s but I wanted to speed up sim */
+	set_Rin(HOTH, -10.0);
+	run_test(2, SEC); 
+
+	reset_meter_peaks();
+	install_test_callback(test_9);
+	run_test(700, MSEC); 
+
+ 	print_results();
+    }
+
+#ifdef OTHER_TESTS
+    /* Test 10 - FAX test during call establishment phase */
+    if ((test_list & PERFORM_TEST_10A))
+    {
+        printf("Performing test 10A - Canceller operation on the calling station side\n");
+        /* Test 10A - Canceller operation on the calling station side */
+        fprintf(stderr, "Test 10A not yet implemented\n");
+    }
+
+    if ((test_list & PERFORM_TEST_10B))
+    {
+        printf("Performing test 10B - Canceller operation on the called station side\n");
+        /* Test 10B - Canceller operation on the called station side */
+        fprintf(stderr, "Test 10B not yet implemented\n");
+    }
+
+    if ((test_list & PERFORM_TEST_10C))
+    {
+        printf("Performing test 10C - Canceller operation on the calling station side during page\n"
+               "transmission and page breaks (for further study)\n");
+        /* Test 10C - Canceller operation on the calling station side during page
+                      transmission and page breaks (for further study) */
+        fprintf(stderr, "Test 10C not yet implemented\n");
+    }
+
+    if ((test_list & PERFORM_TEST_11))
+    {
+        printf("Performing test 11 - Tandem echo canceller test (for further study)\n");
+        /* Test 11 - Tandem echo canceller test (for further study) */
+        fprintf(stderr, "Test 11 not yet implemented\n");
+    }
+
+    if ((test_list & PERFORM_TEST_12))
+    {
+        printf("Performing test 12 - Residual acoustic echo test (for further study)\n");
+        /* Test 12 - Residual acoustic echo test (for further study) */
+        fprintf(stderr, "Test 12 not yet implemented\n");
+    }
+
+    if ((test_list & PERFORM_TEST_13))
+    {
+        printf("Performing test 13 - Performance with ITU-T low-bit rate coders in echo path (Optional, under study)\n");
+        /* Test 13 - Performance with ITU-T low-bit rate coders in echo path
+                     (Optional, under study) */
+        fprintf(stderr, "Test 13 not yet implemented\n");
+    }
+
+    if ((test_list & PERFORM_TEST_14))
+    {
+        printf("Performing test 14 - Performance with V-series low-speed data modems\n");
+        /* Test 14 - Performance with V-series low-speed data modems */
+        fprintf(stderr, "Test 14 not yet implemented\n");
+    }
+
+    if ((test_list & PERFORM_TEST_15))
+    {
+        printf("Performing test 15 - PCM offset test (Optional)\n");
+        /* Test 15 - PCM offset test (Optional) */
+        fprintf(stderr, "Test 15 not yet implemented\n");
+    }
+
+    echo_can_free(ctx);
+
+    signal_free(&local_css);
+    signal_free(&far_css);
+
+    if (afCloseFile(resulthandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close speech file '%s'\n", "result_sound.wav");
+        exit(2);
+    }
+    if (afCloseFile(residuehandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close speech file '%s'\n", "residue_sound.wav");
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    afFreeFileSetup(filesetup2);
+
+#if defined(XYZZY)
+    for (j = 0;  j < ctx->taps;  j++)
+    {
+        for (i = 0;  i < coeff_index;  i++)
+            fprintf(stderr, "%d ", coeffs[i][j]);
+        fprintf(stderr, "\n");
+    }
+#endif
+#endif
+    if (verbose == TRUE)
+	printf("Run time %lds\n", time(NULL) - now);
+    
+#if defined(ENABLE_GUI)
+    if (use_gui)
+        echo_can_monitor_wait_to_end();
+#endif
+
+
+    fclose(fdump);
+    fclose(flevel);
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/fax_decode.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,346 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fax_decode.c - a simple FAX audio decoder
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: fax_decode.c,v 1.22 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page fax_decode_page FAX decoder
+\section fax_decode_page_sec_1 What does it do?
+???.
+
+\section fax_decode_tests_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define SAMPLES_PER_CHUNK   160
+
+int decode_test = FALSE;
+
+int rx_bits = 0;
+
+t30_state_t t30_dummy;
+t4_state_t t4_state;
+int t4_up = FALSE;
+
+static void print_frame(const char *io, const uint8_t *fr, int frlen)
+{
+    int i;
+    int type;
+    const char *country;
+    const char *vendor;
+    const char *model;
+    
+    fprintf(stderr, "%s %s:", io, t30_frametype(fr[2]));
+    for (i = 2;  i < frlen;  i++)
+        fprintf(stderr, " %02x", fr[i]);
+    fprintf(stderr, "\n");
+    type = fr[2] & 0xFE;
+    if (type == T30_DIS  ||  type == T30_DTC  ||  type == T30_DCS)
+        t30_decode_dis_dtc_dcs(&t30_dummy, fr, frlen);
+    if (type == T30_NSF)
+    {
+        if (t35_decode(&fr[3], frlen - 3, &country, &vendor, &model))
+        {
+            if (country)
+                printf("The remote was made in '%s'\n", country);
+            if (vendor)
+                printf("The remote was made by '%s'\n", vendor);
+            if (model)
+                printf("The remote is a '%s'\n", model);
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void hdlc_accept(void *user_data, int ok, const uint8_t *msg, int len)
+{
+    if (len < 0)
+    {
+        /* Special conditions */
+        switch (len)
+        {
+        case PUTBIT_CARRIER_UP:
+            fprintf(stderr, "Slow carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            fprintf(stderr, "Slow carrier down\n");
+            break;
+        case PUTBIT_FRAMING_OK:
+        case PUTBIT_ABORT:
+            /* Just ignore these */
+            break;
+        default:
+            fprintf(stderr, "Unexpected HDLC special length - %d!\n", len);
+            break;
+        }
+        return;
+    }
+    
+    if (msg[0] != 0xFF  ||  !(msg[1] == 0x03  ||  msg[1] == 0x13))
+    {
+        fprintf(stderr, "Bad frame header - %02x %02x", msg[0], msg[1]);
+        return;
+    }
+    print_frame("HDLC: ", msg, len);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void t4_begin(void)
+{
+    t4_rx_set_rx_encoding(&t4_state, T4_COMPRESSION_ITU_T4_2D);
+    t4_rx_set_x_resolution(&t4_state, T4_X_RESOLUTION_R8);
+    t4_rx_set_y_resolution(&t4_state, T4_Y_RESOLUTION_STANDARD);
+    t4_rx_set_image_width(&t4_state, 1728);
+
+    t4_rx_start_page(&t4_state);
+    t4_up = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void t4_end(void)
+{
+    t4_stats_t stats;
+
+    if (!t4_up)
+        return;
+    t4_rx_end_page(&t4_state);
+    t4_get_transfer_statistics(&t4_state, &stats);
+    printf("Pages = %d\n", stats.pages_transferred);
+    printf("Image size = %dx%d\n", stats.width, stats.length);
+    printf("Image resolution = %dx%d\n", stats.x_resolution, stats.y_resolution);
+    printf("Bad rows = %d\n", stats.bad_rows);
+    printf("Longest bad row run = %d\n", stats.longest_bad_row_run);
+    t4_up = FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(ENABLE_V17)
+static void v17_put_bit(void *user_data, int bit)
+{
+    int end_of_page;
+    
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            //printf("V.17 Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            printf("V.17 Training succeeded\n");
+            t4_begin();
+            break;
+        case PUTBIT_CARRIER_UP:
+            //printf("V.17 Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            //printf("V.17 Carrier down\n");
+            t4_end();
+            break;
+        default:
+            printf("V.17 Eh!\n");
+            break;
+        }
+        return;
+    }
+
+    end_of_page = t4_rx_putbit(&t4_state, bit);
+    if (end_of_page)
+    {
+        t4_end();
+        printf("End of page detected\n");
+    }
+    //printf("V.17 Rx bit %d - %d\n", rx_bits++, bit);
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static void v29_put_bit(void *user_data, int bit)
+{
+    int end_of_page;
+    
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            //printf("V.29 Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            printf("V.29 Training succeeded\n");
+            t4_begin();
+            break;
+        case PUTBIT_CARRIER_UP:
+            //printf("V.29 Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            //printf("V.29 Carrier down\n");
+            t4_end();
+            break;
+        default:
+            printf("V.29 Eh!\n");
+            break;
+        }
+        return;
+    }
+
+    end_of_page = t4_rx_put_bit(&t4_state, bit);
+    if (end_of_page)
+    {
+        t4_end();
+        printf("End of page detected\n");
+    }
+    //printf("V.29 Rx bit %d - %d\n", rx_bits++, bit);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void v27ter_put_bit(void *user_data, int bit)
+{
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            //printf("V.27ter Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            printf("V.27ter Training succeeded\n");
+            t4_begin();
+            break;
+        case PUTBIT_CARRIER_UP:
+            //printf("V.27ter Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            //printf("V.27ter Carrier down\n");
+            break;
+        default:
+            printf("V.27ter Eh!\n");
+            break;
+        }
+        return;
+    }
+
+    printf("V.27ter Rx bit %d - %d\n", rx_bits++, bit);
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    hdlc_rx_state_t hdlcrx;
+    fsk_rx_state_t fsk;
+#if defined(ENABLE_V17)
+    v17_rx_state_t v17;
+#endif
+    v29_rx_state_t v29;
+    v27ter_rx_state_t v27ter;
+    int16_t amp[SAMPLES_PER_CHUNK];
+    AFfilehandle inhandle;
+    int len;
+    const char *filename;
+    
+    filename = "fax_samp.wav";
+
+    if (argc > 1)
+        filename = argv[1];
+
+    inhandle = afOpenFile(filename, "r", NULL);
+    if (inhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", filename);
+        exit(2);
+    }
+    memset(&t30_dummy, 0, sizeof(t30_dummy));
+    span_log_init(&t30_dummy.logging, SPAN_LOG_FLOW, NULL);
+    span_log_set_protocol(&t30_dummy.logging, "T.30");
+
+    hdlc_rx_init(&hdlcrx, FALSE, FALSE, 1, hdlc_accept, NULL);
+    fsk_rx_init(&fsk, &preset_fsk_specs[FSK_V21CH2], TRUE, (put_bit_func_t) hdlc_rx_put_bit, &hdlcrx);
+#if defined(ENABLE_V17)
+    v17_rx_init(&v17, 14400, v17_put_bit, NULL);
+#endif
+    v29_rx_init(&v29, 9600, v29_put_bit, NULL);
+    v27ter_rx_init(&v27ter, 4800, v27ter_put_bit, NULL);
+    fsk_rx_signal_cutoff(&fsk, -45.0);
+#if defined(ENABLE_V17)
+    v17_rx_signal_cutoff(&v17, -45.0);
+#endif
+    v29_rx_signal_cutoff(&v29, -45.0);
+    v27ter_rx_signal_cutoff(&v27ter, -40.0);
+
+    //span_log_init(&v29.logging, SPAN_LOG_FLOW, NULL);
+    //span_log_set_protocol(&v29.logging, "V.29");
+    //span_log_set_level(&v29.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW);
+
+    if (t4_rx_init(&t4_state, "fax_decode.tif", T4_COMPRESSION_ITU_T4_2D))
+    {
+        printf("Failed to init\n");
+        exit(0);
+    }
+        
+    for (;;)
+    {
+        len = afReadFrames(inhandle, AF_DEFAULT_TRACK, amp, SAMPLES_PER_CHUNK);
+        if (len < SAMPLES_PER_CHUNK)
+            break;
+        fsk_rx(&fsk, amp, len);
+#if defined(ENABLE_V17)
+        v17_rx(&v17, amp, len);
+#endif
+        v29_rx(&v29, amp, len);
+        v27ter_rx(&v27ter, amp, len);
+    }
+    t4_rx_end(&t4_state);
+
+    if (afCloseFile(inhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", filename);
+        exit(2);
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/fax_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,434 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fax_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: fax_tests.c,v 1.60 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page fax_tests_page FAX tests
+\section fax_tests_page_sec_1 What does it do?
+\section fax_tests_page_sec_2 How does it work?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define SAMPLES_PER_CHUNK       160
+
+#define INPUT_TIFF_FILE_NAME    "../itutests/fax/itutests.tif"
+
+#define OUTPUT_FILE_NAME_WAVE   "fax_tests.wav"
+
+#define FAX_MACHINES            2
+
+struct machine_s
+{
+    int chan;
+    int16_t amp[SAMPLES_PER_CHUNK];
+    int len;
+    fax_state_t fax;
+    int done;
+    int succeeded;
+    char tag[50];
+    int error_delay;
+} machines[FAX_MACHINES];
+
+int test_local_interrupt = FALSE;
+
+static void phase_b_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    
+    i = (intptr_t) user_data;
+    printf("%d: Phase B handler on channel %d - (0x%X) %s\n", i, i, result, t30_frametype(result));
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_d_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+
+    i = (intptr_t) user_data;
+    printf("%d: Phase D handler on channel %d - (0x%X) %s\n", i, i, result, t30_frametype(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("%d: Phase D: bit rate %d\n", i, t.bit_rate);
+    printf("%d: Phase D: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%d: Phase D: pages transferred %d\n", i, t.pages_transferred);
+    printf("%d: Phase D: image size %d x %d\n", i, t.width, t.length);
+    printf("%d: Phase D: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%d: Phase D: bad rows %d\n", i, t.bad_rows);
+    printf("%d: Phase D: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%d: Phase D: compression type %d\n", i, t.encoding);
+    printf("%d: Phase D: image size %d\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%d: Phase D: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%d: Phase D: remote ident '%s'\n", i, ident);
+    
+    if (test_local_interrupt)
+    {
+        if (i == 0)
+        {
+            printf("%d: Initiating interrupt request\n", i);
+            t30_local_interrupt_request(s, TRUE);
+        }
+        else
+        {
+            switch (result)
+            {
+            case T30_PIP:
+            case T30_PRI_MPS:
+            case T30_PRI_EOM:
+            case T30_PRI_EOP:
+                printf("%d: Accepting interrupt request\n", i);
+                t30_local_interrupt_request(s, TRUE);
+                break;
+            case T30_PIN:
+                break;
+            }
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_e_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    const char *u;
+    char ident[21];
+    
+    i = (intptr_t) user_data;
+    printf("%d: Phase E handler on channel %d - (%d) %s\n", i, i, result, t30_completion_code_to_str(result));    
+    t30_get_transfer_statistics(s, &t);
+    printf("%d: Phase E: bit rate %d\n", i, t.bit_rate);
+    printf("%d: Phase E: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%d: Phase E: pages transferred %d\n", i, t.pages_transferred);
+    printf("%d: Phase E: image size %d x %d\n", i, t.width, t.length);
+    printf("%d: Phase E: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%d: Phase E: bad rows %d\n", i, t.bad_rows);
+    printf("%d: Phase E: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%d: Phase E: coding method %s\n", i, t4_encoding_to_str(t.encoding));
+    printf("%d: Phase E: image size %d bytes\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%d: Phase E: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%d: Phase E: remote ident '%s'\n", i, ident);
+    if ((u = t30_get_far_country(s)))
+        printf("%d: Phase E: Remote was made in '%s'\n", i, u);
+    if ((u = t30_get_far_vendor(s)))
+        printf("%d: Phase E: Remote was made by '%s'\n", i, u);
+    if ((u = t30_get_far_model(s)))
+        printf("%d: Phase E: Remote is model '%s'\n", i, u);
+    machines[i].succeeded = (result == T30_ERR_OK)  &&  (t.pages_transferred == 12);
+    machines[i].done = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int document_handler(t30_state_t *s, void *user_data, int event)
+{
+    int i;
+    
+    i = (intptr_t) user_data;
+    printf("%d: Document handler on channel %d - event %d\n", i, i, event);
+    return FALSE;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    AFfilesetup filesetup;
+    AFfilehandle wave_handle;
+    AFfilehandle input_wave_handle;
+    int i;
+    int j;
+    int k;
+    struct machine_s *mc;
+    int outframes;
+    char buf[128 + 1];
+    int16_t silence[SAMPLES_PER_CHUNK];
+    int16_t out_amp[2*SAMPLES_PER_CHUNK];
+    int alldone;
+    const char *input_tiff_file_name;
+    const char *input_audio_file_name;
+    int log_audio;
+    int use_ecm;
+    int use_tep;
+    int use_line_hits;
+    int polled_mode;
+    char *page_header_info;
+
+    log_audio = FALSE;
+    input_tiff_file_name = INPUT_TIFF_FILE_NAME;
+    input_audio_file_name = NULL;
+    use_ecm = FALSE;
+    use_line_hits = FALSE;
+    use_tep = FALSE;
+    polled_mode = FALSE;
+    page_header_info = NULL;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-e") == 0)
+        {
+            use_ecm = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-h") == 0)
+        {
+            use_line_hits = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-H") == 0)
+        {
+            page_header_info = argv[++i];
+            continue;
+        }
+        if (strcmp(argv[i], "-i") == 0)
+        {
+            input_tiff_file_name = argv[++i];
+            continue;
+        }
+        if (strcmp(argv[i], "-I") == 0)
+        {
+            input_audio_file_name = argv[++i];
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-p") == 0)
+        {
+            polled_mode = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-t") == 0)
+        {
+            use_tep = TRUE;
+            continue;
+        }
+    }
+
+    input_wave_handle = AF_NULL_FILEHANDLE;
+    if (input_audio_file_name)
+    {
+        if ((input_wave_handle = afOpenFile(input_audio_file_name, "r", NULL)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot open wave file '%s'\n", input_audio_file_name);
+            exit(2);
+        }
+    }
+
+    filesetup = AF_NULL_FILESETUP;
+    wave_handle = AF_NULL_FILEHANDLE;
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+
+        if ((wave_handle = afOpenFile(OUTPUT_FILE_NAME_WAVE, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_FILE_NAME_WAVE);
+            exit(2);
+        }
+    }
+
+    memset(silence, 0, sizeof(silence));
+    for (j = 0;  j < FAX_MACHINES;  j++)
+    {
+        machines[j].chan = j;
+        mc = &machines[j];
+
+        i = mc->chan + 1;
+        sprintf(buf, "%d%d%d%d%d%d%d%d", i, i, i, i, i, i, i, i);
+        fax_init(&mc->fax, (mc->chan & 1)  ?  FALSE  :  TRUE);
+        fax_set_tep_mode(&mc->fax, use_tep);
+        t30_set_local_ident(&mc->fax.t30_state, buf);
+        t30_set_header_info(&mc->fax.t30_state, page_header_info);
+        t30_set_local_nsf(&mc->fax.t30_state, (const uint8_t *) "\x50\x00\x00\x00Spandsp\x00", 12);
+        t30_set_ecm_capability(&mc->fax.t30_state, use_ecm);
+        t30_set_supported_image_sizes(&mc->fax.t30_state, T30_SUPPORT_US_LETTER_LENGTH | T30_SUPPORT_US_LEGAL_LENGTH | T30_SUPPORT_UNLIMITED_LENGTH
+                                                        | T30_SUPPORT_215MM_WIDTH | T30_SUPPORT_255MM_WIDTH | T30_SUPPORT_303MM_WIDTH);
+        t30_set_supported_resolutions(&mc->fax.t30_state, T30_SUPPORT_STANDARD_RESOLUTION | T30_SUPPORT_FINE_RESOLUTION | T30_SUPPORT_SUPERFINE_RESOLUTION
+                                                        | T30_SUPPORT_R8_RESOLUTION | T30_SUPPORT_R16_RESOLUTION);
+        if (use_ecm)
+            t30_set_supported_compressions(&mc->fax.t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION);
+        if ((mc->chan & 1))
+        {
+            if (polled_mode)
+            {
+                t30_set_tx_file(&mc->fax.t30_state, input_tiff_file_name, -1, -1);
+            }
+            else
+            {
+                sprintf(buf, "fax_tests_%d.tif", (mc->chan + 1)/2);
+                t30_set_rx_file(&mc->fax.t30_state, buf, -1);
+            }
+        }
+        else
+        {
+            if (polled_mode)
+            {
+                sprintf(buf, "fax_tests_%d.tif", (mc->chan + 1)/2);
+                t30_set_rx_file(&mc->fax.t30_state, buf, -1);
+            }
+            else
+            {
+                t30_set_tx_file(&mc->fax.t30_state, input_tiff_file_name, -1, -1);
+            }
+        }
+        t30_set_phase_b_handler(&mc->fax.t30_state, phase_b_handler, (void *) (intptr_t) mc->chan);
+        t30_set_phase_d_handler(&mc->fax.t30_state, phase_d_handler, (void *) (intptr_t) mc->chan);
+        t30_set_phase_e_handler(&mc->fax.t30_state, phase_e_handler, (void *) (intptr_t) mc->chan);
+        t30_set_document_handler(&mc->fax.t30_state, document_handler, (void *) (intptr_t) mc->chan);
+        sprintf(mc->tag, "FAX-%d", j + 1);
+        span_log_set_level(&mc->fax.t30_state.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME | SPAN_LOG_FLOW);
+        span_log_set_tag(&mc->fax.t30_state.logging, mc->tag);
+        span_log_set_level(&mc->fax.v29rx.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME | SPAN_LOG_FLOW);
+        span_log_set_tag(&mc->fax.v29rx.logging, mc->tag);
+        span_log_set_level(&mc->fax.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME | SPAN_LOG_FLOW);
+        span_log_set_tag(&mc->fax.logging, mc->tag);
+        memset(mc->amp, 0, sizeof(mc->amp));
+        mc->done = FALSE;
+    }
+    for (;;)
+    {
+        alldone = TRUE;
+        for (j = 0;  j < FAX_MACHINES;  j++)
+        {
+            mc = &machines[j];
+
+            if ((j & 1) == 0  &&  input_audio_file_name)
+            {
+                mc->len = afReadFrames(input_wave_handle, AF_DEFAULT_TRACK, mc->amp, SAMPLES_PER_CHUNK);
+                if (mc->len == 0)
+                    break;
+            }
+            else
+            {
+                mc->len = fax_tx(&mc->fax, mc->amp, SAMPLES_PER_CHUNK);
+            }
+            /* The receive side always expects a full block of samples, but the
+               transmit side may not be sending any when it doesn't need to. We
+               may need to pad with some silence. */
+            if (mc->len < SAMPLES_PER_CHUNK)
+            {
+                memset(mc->amp + mc->len, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - mc->len));
+                mc->len = SAMPLES_PER_CHUNK;
+            }
+
+            span_log_bump_samples(&mc->fax.t30_state.logging, mc->len);
+            span_log_bump_samples(&mc->fax.v29rx.logging, mc->len);
+            span_log_bump_samples(&mc->fax.logging, mc->len);
+
+            if (log_audio)
+            {
+                for (k = 0;  k < mc->len;  k++)
+                    out_amp[2*k + j] = mc->amp[k];
+            }
+            if (machines[j ^ 1].len < SAMPLES_PER_CHUNK)
+                memset(machines[j ^ 1].amp + machines[j ^ 1].len, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - machines[j ^ 1].len));
+            if (use_line_hits)
+            {
+                /* TODO: This applied very crude line hits. improve it */
+                if (mc->fax.t30_state.state == 22)
+                {
+                    if (++mc->error_delay == 100)
+                    {
+                        fprintf(stderr, "HIT %d!\n", j);
+                        mc->error_delay = 0;
+                        for (k = 0;  k < 5;  k++)
+                            mc->amp[k] = 0;
+                    }
+                }    
+            }
+            if (fax_rx(&mc->fax, machines[j ^ 1].amp, SAMPLES_PER_CHUNK))
+                break;
+            if (!mc->done)
+                alldone = FALSE;
+        }
+
+        if (log_audio)
+        {
+            outframes = afWriteFrames(wave_handle, AF_DEFAULT_TRACK, out_amp, SAMPLES_PER_CHUNK);
+            if (outframes != SAMPLES_PER_CHUNK)
+                break;
+        }
+
+        if (alldone  ||  j < FAX_MACHINES)
+            break;
+    }
+    for (j = 0;  j < FAX_MACHINES;  j++)
+    {
+        mc = &machines[j];
+        fax_release(&mc->fax);
+    }
+    if (log_audio)
+    {
+        if (afCloseFile(wave_handle))
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME_WAVE);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    if (input_audio_file_name)
+    {
+        if (afCloseFile(input_wave_handle))
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", input_audio_file_name);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/fax_tests.sh	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,155 @@
+#!/bin/bash
+#
+# spandsp fax tests
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2, as
+# published by the Free Software Foundation.
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# $Id: fax_tests.sh,v 1.2 2006/10/24 13:49:53 steveu Exp $
+#
+
+run_fax_test()
+{
+    rm -f fax_tests_1.tif
+    echo -i ${FILE} ${OPTS}
+    ./fax_tests -i ${FILE} ${OPTS} >xyzzy 2>xyzzy2
+    RETVAL=$?
+    if [ $RETVAL != 0 ]
+    then
+        echo fax_tests failed!
+        exit $RETVAL
+    fi
+    # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+    # option means the normal differences in tags will be ignored.
+    tiffcmp -t ${FILE} fax_tests_1.tif >/dev/null
+    RETVAL=$?
+    if [ $RETVAL != 0 ]
+    then
+        echo fax_tests failed!
+        exit $RETVAL
+    fi
+    rm -f fax_tests_1.tif
+    echo tested ${FILE}
+}
+
+OPTS="-e"
+
+FILE="../itutests/fax/R8_385_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_385_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_77_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_77_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_154_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_154_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_385_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_385_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_77_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_77_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_154_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_154_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_385_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_385_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_77_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_77_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_154_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_154_A3.tif"
+run_fax_test
+
+OPTS=""
+
+FILE="../itutests/fax/R8_385_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_385_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_77_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_77_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_154_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_154_A4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_385_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_385_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_77_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_77_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_154_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_154_B4.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_385_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_385_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_77_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_77_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R8_154_A3.tif"
+run_fax_test
+
+FILE="../itutests/fax/R16_154_A3.tif"
+run_fax_test
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/fsk_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,448 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fsk_tests.c - Tests for the low speed FSK modem code (V.21, V.23, etc.).
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: fsk_tests.c,v 1.30 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page fsk_tests_page FSK modem tests
+\section fsk_tests_page_sec_1 What does it do?
+These tests allow either:
+
+ - An FSK transmit modem to feed an FSK receive modem, of the same type,
+   through a telephone line model. BER testing is then used to evaluate
+   performance under various line conditions. This is effective for testing
+   the basic performance of the receive modem. It is also the only test mode
+   provided for evaluating the transmit modem.
+
+ - An FSK receive modem is used to decode FSK audio, stored in a wave file.
+   This is good way to evaluate performance with audio recorded from other
+   models of modem, and with real world problematic telephone lines.
+
+\section fsk_tests_page_sec_2 How does it work?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+#include "test_utils.h"
+#include "line_model.h"
+
+#define BLOCK_LEN           160
+
+#define OUTPUT_FILE_NAME    "fsk.wav"
+
+char *decode_test_file = NULL;
+both_ways_line_model_state_t *model;
+int rx_bits = 0;
+
+static void put_bit(void *user_data, int bit)
+{
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            printf("Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            printf("Training succeeded\n");
+            break;
+        case PUTBIT_CARRIER_UP:
+            printf("Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            printf("Carrier down\n");
+            break;
+        default:
+            printf("Eh!\n");
+            break;
+        }
+        return;
+    }
+
+    printf("Rx bit %d - %d\n", rx_bits++, bit);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void reporter(void *user_data, int reason, bert_results_t *results)
+{
+    int channel;
+
+    channel = (int) (intptr_t) user_data;
+    switch (reason)
+    {
+    case BERT_REPORT_SYNCED:
+        printf("%d: BERT report synced\n", channel);
+        break;
+    case BERT_REPORT_UNSYNCED:
+        printf("%d: BERT report unsync'ed\n", channel);
+        break;
+    case BERT_REPORT_REGULAR:
+        printf("%d: BERT report regular - %d bits, %d bad bits, %d resyncs\n", channel, results->total_bits, results->bad_bits, results->resyncs);
+        break;
+    case BERT_REPORT_GT_10_2:
+        printf("%d: BERT report > 1 in 10^2\n", channel);
+        break;
+    case BERT_REPORT_LT_10_2:
+        printf("%d: BERT report < 1 in 10^2\n", channel);
+        break;
+    case BERT_REPORT_LT_10_3:
+        printf("%d: BERT report < 1 in 10^3\n", channel);
+        break;
+    case BERT_REPORT_LT_10_4:
+        printf("%d: BERT report < 1 in 10^4\n", channel);
+        break;
+    case BERT_REPORT_LT_10_5:
+        printf("%d: BERT report < 1 in 10^5\n", channel);
+        break;
+    case BERT_REPORT_LT_10_6:
+        printf("%d: BERT report < 1 in 10^6\n", channel);
+        break;
+    case BERT_REPORT_LT_10_7:
+        printf("%d: BERT report < 1 in 10^7\n", channel);
+        break;
+    default:
+        printf("%d: BERT report reason %d\n", channel, reason);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    fsk_tx_state_t caller_tx;
+    fsk_rx_state_t caller_rx;
+    fsk_tx_state_t answerer_tx;
+    fsk_rx_state_t answerer_rx;
+    bert_state_t caller_bert;
+    bert_state_t answerer_bert;
+    bert_results_t bert_results;
+    power_meter_t caller_meter;
+    power_meter_t answerer_meter;
+    int16_t caller_amp[BLOCK_LEN];
+    int16_t answerer_amp[BLOCK_LEN];
+    int16_t caller_model_amp[BLOCK_LEN];
+    int16_t answerer_model_amp[BLOCK_LEN];
+    int16_t out_amp[2*BLOCK_LEN];
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;    
+    int i;
+    int samples;
+    int test_bps;
+    int noise_level;
+    int noise_sweep;
+    int bits_per_test;
+    int line_model_no;
+    int modem_under_test_1;
+    int modem_under_test_2;
+    int log_audio;
+    int channel_codec;
+
+    channel_codec = MUNGE_CODEC_NONE;
+    line_model_no = 0;
+    decode_test_file = NULL;
+    noise_sweep = FALSE;
+    modem_under_test_1 = FSK_V21CH1;
+    modem_under_test_2 = FSK_V21CH2;
+    log_audio = FALSE;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-c") == 0)
+        {
+            channel_codec = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-d") == 0)
+        {
+            i++;
+            decode_test_file = argv[i];
+            continue;
+        }
+        if (strcmp(argv[i], "-m") == 0)
+        {
+            i++;
+            line_model_no = atoi(argv[i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-s") == 0)
+        {
+            i++;
+            modem_under_test_1 = atoi(argv[i]);
+            i++;
+            modem_under_test_2 = atoi(argv[i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-n") == 0)
+        {
+            noise_sweep = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+    }
+
+    filesetup = AF_NULL_FILESETUP;
+    outhandle = AF_NULL_FILEHANDLE;
+
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+    }
+    noise_level = -200;
+    bits_per_test = 0;
+    inhandle = NULL;
+    if (decode_test_file)
+    {
+        if ((inhandle = afOpenFile(decode_test_file, "r", NULL)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot open wave file '%s'\n", decode_test_file);
+            exit(2);
+        }
+        fsk_rx_init(&caller_rx, &preset_fsk_specs[modem_under_test_1], TRUE, put_bit, NULL);
+        test_bps = preset_fsk_specs[modem_under_test_1].baud_rate;
+    }
+    else
+    {
+        printf("Test with BERT\n");
+        if (modem_under_test_1 >= 0)
+        {
+            fsk_tx_init(&caller_tx, &preset_fsk_specs[modem_under_test_1], (get_bit_func_t) bert_get_bit, &caller_bert);
+            fsk_rx_init(&answerer_rx, &preset_fsk_specs[modem_under_test_1], TRUE, (put_bit_func_t) bert_put_bit, &answerer_bert);
+        }
+        if (modem_under_test_2 >= 0)
+        {
+            fsk_tx_init(&answerer_tx, &preset_fsk_specs[modem_under_test_2], (get_bit_func_t) bert_get_bit, &answerer_bert);
+            fsk_rx_init(&caller_rx, &preset_fsk_specs[modem_under_test_2], TRUE, (put_bit_func_t) bert_put_bit, &caller_bert);
+        }
+        test_bps = preset_fsk_specs[modem_under_test_1].baud_rate;
+
+        bits_per_test = 500000;
+        noise_level = -24;
+
+        bert_init(&caller_bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+        bert_set_report(&caller_bert, 100000, reporter, (void *) (intptr_t) 1);
+        bert_init(&answerer_bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+        bert_set_report(&answerer_bert, 100000, reporter, (void *) (intptr_t) 2);
+        if ((model = both_ways_line_model_init(line_model_no, (float) noise_level, line_model_no, noise_level, channel_codec)) == NULL)
+        {
+            fprintf(stderr, "    Failed to create line model\n");
+            exit(2);
+        }
+    }
+    if (log_audio)
+    {
+        if ((outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_FILE_NAME);
+            exit(2);
+        }
+    }
+
+    if (modem_under_test_1 >= 0)
+        printf("Modem channel 1 is '%s'\n", preset_fsk_specs[modem_under_test_1].name);
+    if (modem_under_test_2 >= 0)
+        printf("Modem channel 2 is '%s'\n", preset_fsk_specs[modem_under_test_2].name);
+    memset(caller_amp, 0, sizeof(*caller_amp));
+    memset(answerer_amp, 0, sizeof(*answerer_amp));
+    memset(caller_model_amp, 0, sizeof(*caller_model_amp));
+    memset(answerer_model_amp, 0, sizeof(*answerer_model_amp));
+    power_meter_init(&caller_meter, 7);
+    power_meter_init(&answerer_meter, 7);
+    for (;;)
+    {
+        if (decode_test_file)
+        {
+            samples = afReadFrames(inhandle,
+                                   AF_DEFAULT_TRACK,
+                                   caller_model_amp,
+                                   BLOCK_LEN);
+            if (samples < BLOCK_LEN)
+                break;
+            for (i = 0;  i < samples;  i++)
+                power_meter_update(&caller_meter, caller_model_amp[i]);
+        }
+        else
+        {
+            samples = fsk_tx(&caller_tx, caller_amp, BLOCK_LEN);
+            for (i = 0;  i < samples;  i++)
+                power_meter_update(&caller_meter, caller_amp[i]);
+            samples = fsk_tx(&answerer_tx, answerer_amp, BLOCK_LEN);
+            for (i = 0;  i < samples;  i++)
+                power_meter_update(&answerer_meter, answerer_amp[i]);
+            both_ways_line_model(model,
+                                 caller_model_amp,
+                                 caller_amp,
+                                 answerer_model_amp,
+                                 answerer_amp,
+                                 samples);
+        }
+        //printf("Powers %10.5fdBm0 %10.5fdBm0\n", power_meter_dbm0(&caller_meter), power_meter_dbm0(&answerer_meter));
+
+        fsk_rx(&answerer_rx, caller_model_amp, samples);
+        for (i = 0;  i < samples;  i++)
+            out_amp[2*i] = caller_model_amp[i];
+        for (  ;  i < BLOCK_LEN;  i++)
+            out_amp[2*i] = 0;
+
+        fsk_rx(&caller_rx, answerer_model_amp, samples);
+        for (i = 0;  i < samples;  i++)
+            out_amp[2*i + 1] = answerer_model_amp[i];
+        for (  ;  i < BLOCK_LEN;  i++)
+            out_amp[2*i + 1] = 0;
+        
+        if (log_audio)
+        {
+            outframes = afWriteFrames(outhandle,
+                                      AF_DEFAULT_TRACK,
+                                      out_amp,
+                                      BLOCK_LEN);
+            if (outframes != BLOCK_LEN)
+            {
+                fprintf(stderr, "    Error writing wave file\n");
+                exit(2);
+            }
+        }
+
+        if (samples < BLOCK_LEN)
+        {
+            bert_result(&caller_bert, &bert_results);
+            fprintf(stderr, "%ddB AWGN, %d bits, %d bad bits, %d resyncs\n", noise_level, bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
+            if (!noise_sweep)
+            {
+                if (bert_results.total_bits != bits_per_test - 43
+                    ||
+                    bert_results.bad_bits != 0
+                    ||
+                    bert_results.resyncs != 0)
+                {
+                    printf("Tests failed.\n");
+                    exit(2);
+                }
+            }
+            bert_result(&answerer_bert, &bert_results);
+            fprintf(stderr, "%ddB AWGN, %d bits, %d bad bits, %d resyncs\n", noise_level, bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
+            if (!noise_sweep)
+            {
+                if (bert_results.total_bits != bits_per_test - 43
+                    ||
+                    bert_results.bad_bits != 0
+                    ||
+                    bert_results.resyncs != 0)
+                {
+                    printf("Tests failed.\n");
+                    exit(2);
+                }
+                break;
+            }
+
+            /* Put a little silence between the chunks in the file. */
+            memset(out_amp, 0, sizeof(out_amp));
+            if (log_audio)
+            {
+                for (i = 0;  i < 200;  i++)
+                {
+                    outframes = afWriteFrames(outhandle,
+                                              AF_DEFAULT_TRACK,
+                                              out_amp,
+                                              BLOCK_LEN);
+                }
+            }
+            if (modem_under_test_1 >= 0)
+            {
+                fsk_tx_init(&caller_tx, &preset_fsk_specs[modem_under_test_1], (get_bit_func_t) bert_get_bit, &caller_bert);
+                fsk_rx_init(&answerer_rx, &preset_fsk_specs[modem_under_test_1], TRUE, (put_bit_func_t) bert_put_bit, &answerer_bert);
+            }
+            if (modem_under_test_2 >= 0)
+            {
+                fsk_tx_init(&answerer_tx, &preset_fsk_specs[modem_under_test_2], (get_bit_func_t) bert_get_bit, &answerer_bert);
+                fsk_rx_init(&caller_rx, &preset_fsk_specs[modem_under_test_2], TRUE, (put_bit_func_t) bert_put_bit, &caller_bert);
+            }
+            noise_level++;
+            if ((model = both_ways_line_model_init(line_model_no, (float) noise_level, line_model_no, noise_level, channel_codec)) == NULL)
+            {
+                fprintf(stderr, "    Failed to create line model\n");
+                exit(2);
+            }
+            bert_init(&caller_bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+            bert_set_report(&caller_bert, 100000, reporter, (void *) (intptr_t) 1);
+            bert_init(&answerer_bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+            bert_set_report(&answerer_bert, 100000, reporter, (void *) (intptr_t) 2);
+        }
+    }
+
+    if (log_audio)
+    {
+        if (afCloseFile(outhandle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    if (decode_test_file)
+    {
+        if (afCloseFile(inhandle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", decode_test_file);
+            exit(2);
+        }
+    }
+    else
+    {
+        printf("Tests passed.\n");
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/g168_quick.sh	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,15 @@
+#!/bin/sh
+# g168_tests_quick.sh
+#
+# Script to run a quick G168 test.  We run all tests that
+# have been implemented so far at the default levels, ERL,
+# and models.
+#
+# David Rowe 22 Jan 2007
+
+./echo_tests 2aa 
+./echo_tests 2ca -q
+./echo_tests 3a  -q
+./echo_tests 3ba -q 
+./echo_tests 3bb -q
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/g168_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,149 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g168tests.c - Tests of the "test equipment" (filters, etc.) specified
+ *               in G.168. This code is only for checking out the tools,
+ *               not for testing an echo cancellor.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: g168_tests.c,v 1.10 2006/11/23 15:48:09 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#include "spandsp.h"
+#include "spandsp/g168models.h"
+
+#define FALSE 0
+#define TRUE (!FALSE)
+
+int main (int argc, char *argv[])
+{
+    int f;
+    int i;
+    int16_t amp[8000];
+    int signal;
+    int power[10];
+    tone_gen_descriptor_t tone_desc;
+    tone_gen_state_t tone_state;
+    fir32_state_t line_model_d2;
+    fir32_state_t line_model_d3;
+    fir32_state_t line_model_d4;
+    fir32_state_t line_model_d5;
+    fir32_state_t line_model_d6;
+    fir32_state_t line_model_d7;
+    fir32_state_t line_model_d8;
+    fir_float_state_t level_measurement_bp;
+
+    fir32_create(&line_model_d2,
+                 line_model_d2_coeffs,
+                 sizeof(line_model_d2_coeffs)/sizeof(int32_t));
+    fir32_create(&line_model_d3,
+                 line_model_d3_coeffs,
+                 sizeof(line_model_d3_coeffs)/sizeof(int32_t));
+    fir32_create(&line_model_d4,
+                 line_model_d4_coeffs,
+                 sizeof(line_model_d4_coeffs)/sizeof(int32_t));
+    fir32_create(&line_model_d5,
+                 line_model_d5_coeffs,
+                 sizeof(line_model_d5_coeffs)/sizeof(int32_t));
+    fir32_create(&line_model_d6,
+                 line_model_d6_coeffs,
+                 sizeof(line_model_d6_coeffs)/sizeof(int32_t));
+    fir32_create(&line_model_d7,
+                 line_model_d7_coeffs,
+                 sizeof(line_model_d7_coeffs)/sizeof(int32_t));
+    fir32_create(&line_model_d8,
+                 line_model_d8_coeffs,
+                 sizeof(line_model_d8_coeffs)/sizeof(int32_t));
+    fir_float_create(&level_measurement_bp,
+                     level_measurement_bp_coeffs,
+                     sizeof(level_measurement_bp_coeffs)/sizeof(float));
+
+    for (f = 10;  f < 4000;  f++)
+    {
+         make_tone_gen_descriptor(&tone_desc,
+                                  f,
+                                  -10,
+                                  0,
+                                  0,
+                                  1,
+                                  0,
+                                  0,
+                                  0,
+                                  TRUE);
+        tone_gen_init(&tone_state, &tone_desc);
+        tone_gen(&tone_state, amp, 8000);
+        memset(power, '\0', sizeof (power));
+        for (i = 0;  i < 800;  i++)
+        {
+            signal = fir32(&line_model_d2, amp[i]);
+            power[0] += ((abs(signal) - power[0]) >> 5);
+            signal = fir32(&line_model_d3, amp[i]);
+            power[1] += ((abs(signal) - power[1]) >> 5);
+            signal = fir32(&line_model_d4, amp[i]);
+            power[2] += ((abs(signal) - power[2]) >> 5);
+            signal = fir32(&line_model_d5, amp[i]);
+            power[3] += ((abs(signal) - power[3]) >> 5);
+            signal = fir32(&line_model_d6, amp[i]);
+            power[4] += ((abs(signal) - power[4]) >> 5);
+            signal = fir32(&line_model_d7, amp[i]);
+            power[5] += ((abs(signal) - power[5]) >> 5);
+            signal = fir32(&line_model_d8, amp[i]);
+            power[6] += ((abs(signal) - power[6]) >> 5);
+            signal = fir_float(&level_measurement_bp, amp[i]);
+            power[7] += ((abs(signal) - power[7]) >> 5);
+        }
+        printf("%d %d %d %d %d %d %d %d %d\n",
+               f,
+               power[0],
+               power[1],
+               power[2],
+               power[3],
+               power[4],
+               power[5],
+               power[6],
+               power[7]);
+    }
+    
+    for (i = 0;  i < (int) (sizeof(css_c1)/sizeof(css_c1[0]));  i++)
+        printf("%d\n", css_c1[i]);
+    printf("\n");
+    for (i = 0;  i < (int) (sizeof(css_c1)/sizeof(css_c3[0]));  i++)
+        printf("%d\n", css_c3[i]);
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/g168_tests.sh	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,76 @@
+#!/bin/sh
+# g168_tests.sh
+#
+# Script to run G168 tests.  As the tests are implemented and
+# the echo can develops the idea is to fill this script out
+# will all the tests required to test the echo can against G168.
+#
+# Created David Rowe 17 Jan 2007
+
+echo "Test 2A(a) ---------------------------------------------"
+echo
+echo "Different models"
+echo
+./echo_tests 2aa -m 1
+./echo_tests 2aa -m 2 -q 
+./echo_tests 2aa -m 3 -q
+./echo_tests 2aa -m 4 -q
+./echo_tests 2aa -m 5 -q
+./echo_tests 2aa -m 6 -q
+./echo_tests 2aa -m 7 -q
+echo
+echo "Different ERLs"
+echo
+./echo_tests 2aa -erl 30
+./echo_tests 2aa -erl 18 -q 
+./echo_tests 2aa -erl 12 -q 
+./echo_tests 2aa -erl 10 -q 
+./echo_tests 2aa -erl  8 -q 
+./echo_tests 2aa -erl  6 -q 
+echo
+echo "Different Rin levels"
+echo
+./echo_tests 2aa -m 1 -r -30
+./echo_tests 2aa -m 1 -r -24 -q
+./echo_tests 2aa -m 1 -r -18 -q
+./echo_tests 2aa -m 1 -r -12 -q
+./echo_tests 2aa -m 1 -r -6  -q
+./echo_tests 2aa -m 1 -r  0  -q
+echo
+echo "Test 3B(a) ---------------------------------------------"
+echo
+echo "Range of Rin and Sgen values"
+echo
+./echo_tests 3ba -m 1 -r -30 -s -30    
+./echo_tests 3ba -m 1 -r -30 -s -18 -q
+./echo_tests 3ba -m 1 -r -30 -s -6  -q
+./echo_tests 3ba -m 1 -r -18 -s -18 -q
+./echo_tests 3ba -m 1 -r -18 -s -6  -q
+./echo_tests 3ba -m 1 -r -6  -s -6  -q   
+echo
+echo "Test 3B(b) ---------------------------------------------"
+echo
+echo "Range of Rin and x values"
+echo
+./echo_tests 3bb -m 1 -r -30 -x 6    
+./echo_tests 3bb -m 1 -r -30 -x 12 -q 
+./echo_tests 3bb -m 1 -r -30 -x 18 -q 
+./echo_tests 3bb -m 1 -r -30 -x 24 -q 
+./echo_tests 3bb -m 1 -r -30 -x 30 -q 
+echo
+./echo_tests 3bb -m 1 -r -18 -x 6     
+./echo_tests 3bb -m 1 -r -18 -x 12 -q
+./echo_tests 3bb -m 1 -r -18 -x 18 -q
+./echo_tests 3bb -m 1 -r -18 -x 24 -q
+./echo_tests 3bb -m 1 -r -18 -x 30 -q
+echo
+./echo_tests 3bb -m 1 -r -6  -x 6    
+./echo_tests 3bb -m 1 -r -6  -x 12 -q
+./echo_tests 3bb -m 1 -r -6  -x 18 -q
+./echo_tests 3bb -m 1 -r -6  -x 24 -q
+./echo_tests 3bb -m 1 -r -6  -x 30 -q
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/g711_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,267 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g711_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: g711_tests.c,v 1.4 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page g711_tests_page A-law and u-law conversion tests
+\section g711_tests_page_sec_1 What does it do?
+
+\section g711_tests_page_sec_2 How is it used?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUT_FILE_NAME   "g711.wav"
+
+int16_t amp[65536];
+
+const uint8_t alaw_1khz_sine[] = {0x34, 0x21, 0x21, 0x34, 0xB4, 0xA1, 0xA1, 0xB4};
+const uint8_t ulaw_1khz_sine[] = {0x1E, 0x0B, 0x0B, 0x1E, 0x9E, 0x8B, 0x8B, 0x9E};
+
+int main(int argc, char *argv[])
+{
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    power_meter_t power_meter;
+    int outframes;
+    int i;
+    int block;
+    int pre;
+    int post;
+    int alaw_failures;
+    int ulaw_failures;
+    float worst_alaw;
+    float worst_ulaw;
+    float tmp;
+    
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+
+    printf("Conversion accuracy tests.\n");
+    alaw_failures = 0;
+    ulaw_failures = 0;
+    worst_alaw = 0.0;
+    worst_ulaw = 0.0;
+    for (block = 0;  block < 1;  block++)
+    {
+        for (i = 0;  i < 65536;  i++)
+        {
+            pre = i - 32768;
+            post = alaw_to_linear(linear_to_alaw(pre));
+            if (abs(pre) > 140)
+            {
+                tmp = (float) abs(post - pre)/(float) abs(pre);
+                if (tmp > 0.10)
+                {
+                    printf("A-law: Excessive error at %d (%d)\n", pre, post);
+                    alaw_failures++;
+                }
+                if (tmp > worst_alaw)
+                    worst_alaw = tmp;
+            }
+            else
+            {
+                /* Small values need different handling for sensible measurement */
+                if (abs(post - pre) > 15)
+                {
+                    printf("A-law: Excessive error at %d (%d)\n", pre, post);
+                    alaw_failures++;
+                }
+            }
+            amp[i] = post;
+        }
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  65536);
+        if (outframes != 65536)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+        for (i = 0;  i < 65536;  i++)
+        {
+            pre = i - 32768;
+            post = ulaw_to_linear(linear_to_ulaw(pre));
+            if (abs(pre) > 40)
+            {
+                tmp = (float) abs(post - pre)/(float) abs(pre);
+                if (tmp > 0.10)
+                {
+                    printf("u-law: Excessive error at %d (%d)\n", pre, post);
+                    ulaw_failures++;
+                }
+                if (tmp > worst_ulaw)
+                    worst_ulaw = tmp;
+            }
+            else
+            {
+                /* Small values need different handling for sensible measurement */
+                if (abs(post - pre) > 4)
+                {
+                    printf("u-law: Excessive error at %d (%d)\n", pre, post);
+                    ulaw_failures++;
+                }
+            }
+            amp[i] = post;
+        }
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  65536);
+        if (outframes != 65536)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+    printf("Worst A-law error (ignoring small values) %f%%\n", worst_alaw*100.0);
+    printf("Worst u-law error (ignoring small values) %f%%\n", worst_ulaw*100.0);
+    if (alaw_failures  ||  ulaw_failures)
+    {
+        printf("%d A-law values with excessive error\n", alaw_failures);
+        printf("%d u-law values with excessive error\n", ulaw_failures);
+        printf("Tests failed\n");
+        exit(2);
+    }
+    
+    printf("Reference power level tests.\n");
+    power_meter_init(&power_meter, 7);
+
+    for (i = 0;  i < 8000;  i++)
+    {
+        amp[i] = ulaw_to_linear(ulaw_1khz_sine[i & 7]);
+        power_meter_update(&power_meter, amp[i]);
+    }
+    printf("Reference u-law 1kHz tone is %fdBm0\n", power_meter_dbm0(&power_meter));
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              8000);
+    if (outframes != 8000)
+    {
+        fprintf(stderr, "    Error writing wave file\n");
+        exit(2);
+    }
+    if (0.1f < fabs(power_meter_dbm0(&power_meter)))
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    for (i = 0;  i < 8000;  i++)
+    {
+        amp[i] = alaw_to_linear(alaw_1khz_sine[i & 7]);
+        power_meter_update(&power_meter, amp[i]);
+    }
+    printf("Reference A-law 1kHz tone is %fdBm0\n", power_meter_dbm0(&power_meter));
+    outframes = afWriteFrames(outhandle,
+                              AF_DEFAULT_TRACK,
+                              amp,
+                              8000);
+    if (outframes != 8000)
+    {
+        fprintf(stderr, "    Error writing wave file\n");
+        exit(2);
+    }
+    if (0.1f < fabs(power_meter_dbm0(&power_meter)))
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    /* Check the transcoding functions. */
+    printf("Testing transcoding A-law -> u-law -> A-law\n");
+    for (i = 0;  i < 256;  i++)
+    {
+        if (alaw_to_ulaw(ulaw_to_alaw(i)) != i)
+        {
+            if (abs(alaw_to_ulaw(ulaw_to_alaw(i)) - i) > 1)
+            {
+                printf("u-law -> A-law -> u-law gave %d -> %d\n", i, alaw_to_ulaw(ulaw_to_alaw(i)));
+                printf("Test failed\n");
+                exit(2);
+            }
+        }
+    }
+
+    printf("Testing transcoding u-law -> A-law -> u-law\n");
+    for (i = 0;  i < 256;  i++)
+    {
+        if (ulaw_to_alaw(alaw_to_ulaw(i)) != i)
+        {
+            if (abs(alaw_to_ulaw(ulaw_to_alaw(i)) - i) > 1)
+            {
+                printf("A-law -> u-law -> A-law gave %d -> %d\n", i, ulaw_to_alaw(alaw_to_ulaw(i)));
+                printf("Test failed\n");
+                exit(2);
+            }
+        }
+    }
+    
+    if (afCloseFile(outhandle))
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+
+    printf("Tests passed.\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/g722_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,530 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g722_tests.c - Test G.722 encode and decode.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: g722_tests.c,v 1.17 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page g722_tests_page G.722 tests
+\section g722_tests_page_sec_1 What does it do?
+This modules implements two sets of tests:
+    - The tests defined in the G.722 specification, using the test data files supplied
+      with the specification.
+    - A generally audio quality test, consisting of compressing and decompressing a speeech
+      file for audible comparison.
+
+The speech file should be recorded at 16 bits/sample, 16000 samples/second, and named
+"pre_g722.wav".
+
+The ITU tests use the codec in a special mode, in which the QMFs, which split and recombine the
+sub-bands, are disabled. This means they do not test 100% of the codec. This is the reason for
+including the additional listening test.
+
+\section g722_tests_page_sec_2 How is it used?
+To perform the tests in the G.722 specification you need to obtain the test data files from the
+specification. These are copyright material, and so cannot be distributed with spandsp.
+
+The files, containing test vectors, which are supplied with the G.722 specification, should be
+copied to itutests/g722. The ITU tests can then be run by executing g722_tests without
+any parameters.
+
+To perform a general audio quality test, g722_tests should be run with a parameter specifying
+the required bit rate for compression. The valid parameters are "-48", "-56", and "-64".
+The file ../localtests/short_wb_voice.wav will be compressed to the specified bit rate, decompressed,
+and the resulting audio stored in post_g722.wav.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <memory.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <audiofile.h>
+#include <ctype.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define G722_SAMPLE_RATE    16000
+
+#define BLOCK_LEN           320
+
+#define MAX_TEST_VECTOR_LEN 40000
+
+#define TESTDATA_DIR        "../itutests/g722/"
+
+#define EIGHTK_IN_FILE_NAME "../localtests/short_nb_voice.wav"
+#define IN_FILE_NAME        "../localtests/short_wb_voice.wav"
+#define OUT_FILE_NAME       "post_g722.wav"
+
+#if 0
+static const char *itu_test_files[] =
+{
+    TESTDATA_DIR "T1C1.XMT",        /* 69973 bytes */
+    TESTDATA_DIR "T1C2.XMT",        /* 3605 bytes */
+    TESTDATA_DIR "T1D3.COD",        /* 69973 bytes */
+
+    TESTDATA_DIR "T2R1.COD",        /* 69973 bytes */
+    TESTDATA_DIR "T2R2.COD",        /* 3605 bytes */
+
+    TESTDATA_DIR "T3L1.RC1",        /* 69973 bytes */
+    TESTDATA_DIR "T3L1.RC2",        /* 69973 bytes */
+    TESTDATA_DIR "T3L1.RC3",        /* 69973 bytes */
+    TESTDATA_DIR "T3H1.RC0",        /* 69973 bytes */
+    TESTDATA_DIR "T3L2.RC1",        /* 3605 bytes */
+    TESTDATA_DIR "T3L2.RC2",        /* 3605 bytes */
+    TESTDATA_DIR "T3L2.RC3",        /* 3605 bytes */
+    TESTDATA_DIR "T3H2.RC0",        /* 3605 bytes */
+    TESTDATA_DIR "T3L3.RC1",        /* 69973 bytes */
+    TESTDATA_DIR "T3L3.RC2",        /* 69973 bytes */
+    TESTDATA_DIR "T3L3.RC3",        /* 69973 bytes */
+    TESTDATA_DIR "T3H3.RC0"         /* 69973 bytes */
+};
+#endif
+
+static const char *encode_test_files[] =
+{
+    TESTDATA_DIR "T1C1.XMT",    TESTDATA_DIR "T2R1.COD",
+    TESTDATA_DIR "T1C2.XMT",    TESTDATA_DIR "T2R2.COD",
+    NULL
+};
+
+static const char *decode_test_files[] =
+{
+    TESTDATA_DIR "T2R1.COD",
+    TESTDATA_DIR "T3L1.RC1",
+    TESTDATA_DIR "T3L1.RC2",
+    TESTDATA_DIR "T3L1.RC3",
+    TESTDATA_DIR "T3H1.RC0",
+
+    TESTDATA_DIR "T2R2.COD",
+    TESTDATA_DIR "T3L2.RC1",
+    TESTDATA_DIR "T3L2.RC2",
+    TESTDATA_DIR "T3L2.RC3",
+    TESTDATA_DIR "T3H2.RC0",
+
+    TESTDATA_DIR "T1D3.COD",
+    TESTDATA_DIR "T3L3.RC1",
+    TESTDATA_DIR "T3L3.RC2",
+    TESTDATA_DIR "T3L3.RC3",
+    TESTDATA_DIR "T3H3.RC0",
+    
+    NULL
+};
+
+int16_t itu_data[MAX_TEST_VECTOR_LEN];
+uint16_t itu_ref[MAX_TEST_VECTOR_LEN];
+uint16_t itu_ref_upper[MAX_TEST_VECTOR_LEN];
+uint8_t compressed[MAX_TEST_VECTOR_LEN];
+int16_t decompressed[MAX_TEST_VECTOR_LEN];
+
+static int hex_get(char *s)
+{
+    int i;
+    int value;
+    int x;
+
+    for (value = i = 0;  i < 4;  i++)
+    {
+        x = *s++ - 0x30;
+        if (x > 9)
+            x -= 0x07;
+        if (x > 15)
+            x -= 0x20;
+        if (x < 0  ||  x > 15)
+            return -1;
+        value <<= 4;
+        value |= x;
+    }
+    return value;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int get_vector(FILE *file, uint16_t vec[])
+{
+    char buf[132 + 1];
+    char *s;
+    int i;
+    int value;
+
+    while (fgets(buf, 133, file))
+    {
+        if (buf[0] == '/'  &&  buf[1] == '*')
+            continue;
+        s = buf;
+        i = 0;
+        while ((value = hex_get(s)) >= 0)
+        {
+            vec[i++] = value;
+            s += 4;
+        }
+        return i;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int get_test_vector(const char *file, uint16_t buf[], int max_len)
+{
+    int octets;
+    int i;
+    FILE *infile;
+    
+    if ((infile = fopen(file, "r")) == NULL)
+    {
+        fprintf(stderr, "    Failed to open '%s'\n", file);
+        exit(2);
+    }
+    octets = 0;  
+    while ((i = get_vector(infile, buf + octets)) > 0)
+        octets += i;
+    fclose(infile);
+    return octets;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    g722_encode_state_t enc_state;
+    g722_decode_state_t dec_state;
+    int len;
+    int len_comp;
+    int len_comp_upper;
+    int len_data;
+    int len2;
+    int len3;
+    int i;
+    int j;
+    int k;
+    int file;
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int samples;
+    int mode;
+    int itutests;
+    int bit_rate;
+    int eight_k_in;
+    int eight_k_out;
+    float x;
+    int16_t indata[BLOCK_LEN];
+    int16_t outdata[BLOCK_LEN];
+    uint8_t adpcmdata[BLOCK_LEN];
+
+    i = 1;
+    bit_rate = 64000;
+    eight_k_in = FALSE;
+    eight_k_out = FALSE;
+    itutests = TRUE;
+    while (argc > i)
+    {
+        if (strcmp(argv[i], "-48") == 0)
+        {
+            bit_rate = 48000;
+            itutests = FALSE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-56") == 0)
+        {
+            bit_rate = 56000;
+            itutests = FALSE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-64") == 0)
+        {
+            bit_rate = 64000;
+            itutests = FALSE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-8k8k") == 0)
+        {
+            eight_k_in = TRUE;
+            eight_k_out = TRUE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-8k16k") == 0)
+        {
+            eight_k_in = TRUE;
+            eight_k_out = FALSE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-16k8k") == 0)
+        {
+            eight_k_in = FALSE;
+            eight_k_out = TRUE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-16k16k") == 0)
+        {
+            eight_k_in = FALSE;
+            eight_k_out = FALSE;
+            i++;
+        }
+        else
+        {
+            fprintf(stderr, "Unknown parameter %s specified.\n", argv[i]);
+            exit(2);
+        }
+    }
+
+    if (itutests)
+    {
+        /* ITU G.722 encode tests, using configuration 1. The QMF is bypassed */
+        for (file = 0;  encode_test_files[file];  file += 2)
+        {
+            printf("Testing %s -> %s\n", encode_test_files[file], encode_test_files[file + 1]);
+    
+            /* Get the input data */
+            len_data = get_test_vector(encode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
+
+            /* Get the reference output data */
+            len_comp = get_test_vector(encode_test_files[file + 1], itu_ref, MAX_TEST_VECTOR_LEN);
+
+            /* Process the input data */
+            /* Skip the reset stuff at each end of the data */
+            for (i = 0;  i < len_data;  i++)
+            {
+                if ((itu_data[i] & 1) == 0)
+                    break;
+            }
+            for (j = i;  j < len_data;  j++)
+            {
+                if ((itu_data[j] & 1))
+                    break;
+            }
+            len = j - i;
+            g722_encode_init(&enc_state, 64000, FALSE);
+            enc_state.itu_test_mode = TRUE;
+            len2 = g722_encode(&enc_state, compressed, itu_data + i, len);
+
+            /* Check the result against the ITU's reference output data */
+            j = 0;
+            for (k = 0;  k < len2;  k++)
+            {
+                if ((compressed[k] & 0xFF) != ((itu_ref[k + i] >> 8) & 0xFF))
+                {
+                    printf(">>> %6d %4x %4x\n", k, compressed[k] & 0xFF, itu_ref[k + i] & 0xFFFF);
+                    j++;
+                }
+            }
+            printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
+            if (j)
+            {
+                printf("Test failed\n");
+                exit(2);
+            }
+            printf("Test passed\n");
+        }
+
+        /* ITU G.722 decode tests, using configuration 2. The QMF is bypassed */
+        /* Run each of the tests for each of the modes - 48kbps, 56kbps and 64kbps. */
+        for (mode = 1;  mode <= 3;  mode++)
+        {
+            for (file = 0;  decode_test_files[file];  file += 5)
+            {
+                printf("Testing mode %d, %s -> %s + %s\n",
+                       mode,
+                       decode_test_files[file],
+                       decode_test_files[file + mode],
+                       decode_test_files[file + 4]);
+
+                /* Get the input data */
+                len_data = get_test_vector(decode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
+        
+                /* Get the lower reference output data */
+                len_comp = get_test_vector(decode_test_files[file + mode], itu_ref, MAX_TEST_VECTOR_LEN);
+        
+                /* Get the upper reference output data */
+                len_comp_upper = get_test_vector(decode_test_files[file + 4], itu_ref_upper, MAX_TEST_VECTOR_LEN);
+    
+                /* Process the input data */
+                /* Skip the reset stuff at each end of the data */
+                for (i = 0;  i < len_data;  i++)
+                {
+                    if ((itu_data[i] & 1) == 0)
+                        break;
+                }
+                for (j = i;  j < len_data;  j++)
+                {
+                    if ((itu_data[j] & 1))
+                        break;
+                }
+                len = j - i;
+                for (k = 0;  k < len;  k++)
+                    compressed[k] = itu_data[k + i] >> ((mode == 3)  ?  10  :  (mode == 2)  ?  9  :  8);
+        
+                g722_decode_init(&dec_state, (mode == 3)  ?  48000  :  (mode == 2)  ?  56000  :  64000, FALSE);
+                dec_state.itu_test_mode = TRUE;
+                len2 = g722_decode(&dec_state, decompressed, compressed, len);
+        
+                /* Check the result against the ITU's reference output data */
+                j = 0;
+                for (k = 0;  k < len2;  k += 2)
+                {
+                    if ((decompressed[k] & 0xFFFF) != (itu_ref[(k >> 1) + i] & 0xFFFF)
+                        ||
+                        (decompressed[k + 1] & 0xFFFF) != (itu_ref_upper[(k >> 1) + i] & 0xFFFF))
+                    {
+                        printf(">>> %6d %4x %4x %4x %4x\n", k >> 1, decompressed[k] & 0xFFFF, decompressed[k + 1] & 0xFFFF, itu_ref[(k >> 1) + i] & 0xFFFF, itu_ref_upper[(k >> 1) + i] & 0xFFFF);
+                        j++;
+                    }
+                }
+                printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
+                if (j)
+                {
+                    printf("Test failed\n");
+                    exit(2);
+                }
+                printf("Test passed\n");
+            }
+        }
+
+        printf("Tests passed.\n");
+    }
+    else
+    {
+        if (eight_k_in)
+        {
+            if ((inhandle = afOpenFile(EIGHTK_IN_FILE_NAME, "r", NULL)) == AF_NULL_FILEHANDLE)
+            {
+                fprintf(stderr, "    Cannot open wave file '%s'\n", EIGHTK_IN_FILE_NAME);
+                exit(2);
+            }
+            if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+            {
+                printf("    Unexpected frame size in wave file '%s'\n", EIGHTK_IN_FILE_NAME);
+                exit(2);
+            }
+            if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+            {
+                printf("    Unexpected sample rate %f in wave file '%s'\n", x, EIGHTK_IN_FILE_NAME);
+                exit(2);
+            }
+            if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+            {
+                printf("    Unexpected number of channels in wave file '%s'\n", EIGHTK_IN_FILE_NAME);
+                exit(2);
+            }
+        }
+        else
+        {
+            if ((inhandle = afOpenFile(IN_FILE_NAME, "r", NULL)) == AF_NULL_FILEHANDLE)
+            {
+                fprintf(stderr, "    Cannot open wave file '%s'\n", IN_FILE_NAME);
+                exit(2);
+            }
+            if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+            {
+                printf("    Unexpected frame size in wave file '%s'\n", IN_FILE_NAME);
+                exit(2);
+            }
+            if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) G722_SAMPLE_RATE)
+            {
+                printf("    Unexpected sample rate %f in wave file '%s'\n", x, IN_FILE_NAME);
+                exit(2);
+            }
+            if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+            {
+                printf("    Unexpected number of channels in wave file '%s'\n", IN_FILE_NAME);
+                exit(2);
+            }
+        }
+        
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        if (eight_k_out)
+            afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        else
+            afInitRate(filesetup, AF_DEFAULT_TRACK, (float) G722_SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+        if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+        if (eight_k_in)
+            g722_encode_init(&enc_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
+        else
+            g722_encode_init(&enc_state, bit_rate, G722_PACKED);
+        if (eight_k_out)
+            g722_decode_init(&dec_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
+        else
+            g722_decode_init(&dec_state, bit_rate, G722_PACKED);
+        for (;;)
+        {
+            samples = afReadFrames(inhandle,
+                                   AF_DEFAULT_TRACK,
+                                   indata,
+                                   BLOCK_LEN);
+            if (samples <= 0)
+                break;
+            len2 = g722_encode(&enc_state, adpcmdata, indata, samples);
+            len3 = g722_decode(&dec_state, outdata, adpcmdata, len2);
+            outframes = afWriteFrames(outhandle,
+                                      AF_DEFAULT_TRACK,
+                                      outdata,
+                                      len3);
+            if (outframes != len3)
+            {
+                fprintf(stderr, "    Error writing wave file\n");
+                exit(2);
+            }
+        }
+        if (afCloseFile(inhandle))
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if (afCloseFile(outhandle))
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+
+        printf("'%s' transcoded to '%s' at %dbps.\n", IN_FILE_NAME, OUT_FILE_NAME, bit_rate);
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/g726_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1343 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * g726_tests.c - Test G.726 encode and decode.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: g726_tests.c,v 1.16 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page g726_tests_page G.726 tests
+\section g726_tests_page_sec_1 What does it do?
+Two sets of tests are performed:
+    - The tests defined in the G.726 specification, using the test data files supplied with
+      the specification.
+    - A generally audio quality test, consisting of compressing and decompressing a speeech
+      file for audible comparison.
+
+The speech file should be recorded at 16 bits/sample, 8000 samples/second, and named
+"pre_g726.wav".
+
+\section g726_tests_page_sec_2 How is it used?
+To perform the tests in the G.726 specification you need to obtain the test data files from the
+specification. These are copyright material, and so cannot be distributed with spandsp.
+
+The files, containing test vectors, which are supplied with the G.726 specification, should be
+copied to itutests/g726 so the files are arranged in the same directory heirarchy in which they
+are supplied. That is, you should have file names like
+
+    - itutests/g726/DISK1/INPUT/NRM.M
+    - itutests/g726/DISK1/INPUT/OVR.M
+    - itutests/g726/DISK2/INPUT/NRM.A
+    - itutests/g726/DISK2/INPUT/OVR.A
+
+in your spandsp source tree. The ITU tests can then be run by executing g726_tests without
+any parameters.
+
+To perform a general audio quality test, g726_tests should be run with a parameter specifying
+the required bit rate for compression. The valid parameters are "-16", "-24", "-32", and "-40".
+The test file ../localtests/short_nb_voice.wav will be compressed to the specified bit rate,
+decompressed, and the resulting audio stored in post_g726.wav.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <memory.h>
+#include <stdlib.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <audiofile.h>
+#include <ctype.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define BLOCK_LEN           320
+#define MAX_TEST_VECTOR_LEN 40000
+
+#define IN_FILE_NAME    "../localtests/short_nb_voice.wav"
+#define OUT_FILE_NAME   "post_g726.wav"
+
+#define TESTDATA_DIR    "../itutests/g726/"
+
+int16_t outdata[MAX_TEST_VECTOR_LEN];
+uint8_t adpcmdata[MAX_TEST_VECTOR_LEN];
+
+int16_t itudata[MAX_TEST_VECTOR_LEN];
+uint8_t itu_ref[MAX_TEST_VECTOR_LEN];
+uint8_t unpacked[MAX_TEST_VECTOR_LEN];
+uint8_t xlaw[MAX_TEST_VECTOR_LEN];
+
+/*
+Table 4 - V Reset and homing sequences for u-law
+            Normal                              I-input     Overload
+Algorithm   Input   Intermediate    Output      Input       Output      Input   Intermediate    Output
+            (PCM)   (ADPCM)         (PCM)       (ADPCM)     (PCM)       (PCM)   (ADPCM)         (PCM)
+
+16F         NRM.M   RN16FM.I        RN16FM.O    I16         RI16FM.O    OVR.M   RV16FM.I        RV16FM.O
+                    HN16FM.I        HN16FM.O                HI16FM.O            HV16FM.I        HV16FM.O
+
+24F         NRM.M   RN24FM.I        RN24FM.O    I24         RI24FM.O    OVR.M   RV24FM.I        RV24FM.O
+                    HN24FM.I        HN24FM.O                HI24FM.O            HV24FM.I        HV24FM.O
+
+32F         NRM.M   RN32FM.I        RN32FM.O    I32         RI32FM.O    OVR.M   RV32FM.I        RV32FM.O
+                    HN32FM.I        HN32FM.O                HI32FM.O            HV32FM.I        HV32FM.O
+
+40F         NRM.M   RN40FM.I        RN40FM.O    I40         RI40FM.O    OVR.M   RV40FM.I        RV40FM.O
+                    HN40FM.I        HN40FM.O                HI40FM.O            HV40FM.I        HV40FM.O
+
+
+Table 5 - V Reset and homing sequences for A-law
+            Normal                              I-input     Overload
+Algorithm   Input   Intermediate    Output      Input       Output      Input   Intermediate    Output
+            (PCM)   (ADPCM)         (PCM)       (ADPCM)     (PCM)       (PCM)   (ADPCM)         (PCM)
+16F         NRM.A   RN16FA.I        RN16FA.O    I16         RI16FA.O    OVR.A   RV16FA.I        RV16FA.O
+                    HN16FA.I        HN16FA.O                HI16FA.O            HV16FA.I        HV16FA.O
+
+24F         NRM.A   RN24FA.I        RN24FA.O    I24         RI24FA.O    OVR.A   RV24FA.I        RV24FA.O
+                    HN24FA.I        HN24FA.O                HI24FA.O            HV24FA.I        HV24FA.O
+
+32F         NRM.A   RN32FA.I        RN32FA.O    I32         RI32FA.O    OVR.A   RV32FA.I        RV32FA.O
+                    HN32FA.I        HN32FA.O                HI32FA.O            HV32FA.I        HV32FA.O
+
+40F         NRM.A   RN40FA.I        RN40FA.O    I40         RI40FA.O    OVR.A   RV40FA.I        RV40FA.O
+                    HN40FA.I        HN40FA.O                HI40FA.O            HV40FA.I        HV40FA.O
+
+Table 6 ¡V Reset and homing cross sequences for u-law -> A-law
+            Normal                              Overload
+Algorithm   Input   Intermediate    Output      Input   Intermediate    Output
+            (PCM)   (ADPCM)         (PCM)       (PCM)   (ADPCM)         (PCM)
+16F         NRM.M   RN16FM.I        RN16FC.O    OVR.M   RV16FM.I        RV16FC.O
+                    HN16FM.I        HN16FC.O            HV16FM.I        HV16FC.O
+
+24F         NRM.M   RN24FM.I        RN24FC.O    OVR.M   RV24FM.I        RV24FC.O
+                    HN24FM.I        HN24FC.O            HV24FM.I        HV24FC.O
+
+32F         NRM.M   RN32FM.I        RN32FC.O    OVR.M   RV32FM.I        RV32FC.O
+                    HN32FM.I        HN32FC.O            HV32FM.I        HV32FC.O
+
+40F         NRM.M   RN40FM.I        RN40FC.O    OVR.M   RV40FM.I        RV40FC.O
+                    HN40FM.I        HN40FC.O            HV40FM.I        HV40FC.O
+
+Table 7 ¡V Reset and homing cross sequences for A-law -> u-law
+            Normal                              Overload
+Algorithm   Input   Intermediate    Output      Input   Intermediate    Output
+            (PCM)   (ADPCM)         (PCM)       (PCM)   (ADPCM)         (PCM)
+16F         NRM.A   RN16FA.I        RN16FX.O    OVR.A   RV16FA.I        RV16FX.O
+                    HN16FA.I        HN16FX.O            HV16FA.I        HV16FX.O
+
+24F         NRM.A   RN24FA.I        RN24FX.O    OVR.A   RV24FA.I        RV24FX.O
+                    HN24FA.I        HN24FX.O            HV24FA.I        HV24FX.O
+
+32F         NRM.A   RN32FA.I        RN32FX.O    OVR.A   RV32FA.I        RV32FX.O
+                    HN32FA.I        HN32FX.O            HV32FA.I        HV32FX.O
+
+40F         NRM.A   RN40FA.I        RN40FX.O    OVR.A   RV40FA.I        RV40FX.O
+                    HN40FA.I        HN40FX.O            HV40FA.I        HV40FX.O
+*/
+
+#define	G726_ENCODING_NONE          9999
+
+typedef struct
+{
+    const char *conditioning_pcm_file;
+    const char *pcm_file;
+    const char *conditioning_adpcm_file;
+    const char *adpcm_file;
+    const char *output_file;
+    int rate;
+    int compression_law;
+    int decompression_law;
+} test_set_t;
+
+static test_set_t itu_test_sets[] =
+{
+    /* u-law to u-law tests */
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/16/RN16FM.I",
+        TESTDATA_DIR "DISK1/RESET/16/RN16FM.O",
+        16000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        "",
+        "",
+        TESTDATA_DIR "DISK1/INPUT/I16",
+        TESTDATA_DIR "DISK1/RESET/16/RI16FM.O",
+        16000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/16/RV16FM.I",
+        TESTDATA_DIR "DISK1/RESET/16/RV16FM.O",
+        16000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/24/RN24FM.I",
+        TESTDATA_DIR "DISK1/RESET/24/RN24FM.O",
+        24000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        "",
+        "",
+        TESTDATA_DIR "DISK1/INPUT/I24",
+        TESTDATA_DIR "DISK1/RESET/24/RI24FM.O",
+        24000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/24/RV24FM.I",
+        TESTDATA_DIR "DISK1/RESET/24/RV24FM.O",
+        24000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/32/RN32FM.I",
+        TESTDATA_DIR "DISK1/RESET/32/RN32FM.O",
+        32000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        "",
+        "",
+        TESTDATA_DIR "DISK1/INPUT/I32",
+        TESTDATA_DIR "DISK1/RESET/32/RI32FM.O",
+        32000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/32/RV32FM.I",
+        TESTDATA_DIR "DISK1/RESET/32/RV32FM.O",
+        32000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/40/RN40FM.I",
+        TESTDATA_DIR "DISK1/RESET/40/RN40FM.O",
+        40000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        "",
+        "",
+        TESTDATA_DIR "DISK1/INPUT/I40",
+        TESTDATA_DIR "DISK1/RESET/40/RI40FM.O",
+        40000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/40/RV40FM.I",
+        TESTDATA_DIR "DISK1/RESET/40/RV40FM.O",
+        40000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    /* A-law to A-law tests */
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/16/RN16FA.I",
+        TESTDATA_DIR "DISK2/RESET/16/RN16FA.O",
+        16000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        "",
+        "",
+        TESTDATA_DIR "DISK2/INPUT/I16",
+        TESTDATA_DIR "DISK2/RESET/16/RI16FA.O",
+        16000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/16/RV16FA.I",
+        TESTDATA_DIR "DISK2/RESET/16/RV16FA.O",
+        16000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/24/RN24FA.I",
+        TESTDATA_DIR "DISK2/RESET/24/RN24FA.O",
+        24000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        "",
+        "",
+        TESTDATA_DIR "DISK2/INPUT/I24",
+        TESTDATA_DIR "DISK2/RESET/24/RI24FA.O",
+        24000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/24/RV24FA.I",
+        TESTDATA_DIR "DISK2/RESET/24/RV24FA.O",
+        24000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/32/RN32FA.I",
+        TESTDATA_DIR "DISK2/RESET/32/RN32FA.O",
+        32000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        "",
+        "",
+        TESTDATA_DIR "DISK2/INPUT/I32",
+        TESTDATA_DIR "DISK2/RESET/32/RI32FA.O",
+        32000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/32/RV32FA.I",
+        TESTDATA_DIR "DISK2/RESET/32/RV32FA.O",
+        32000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/40/RN40FA.I",
+        TESTDATA_DIR "DISK2/RESET/40/RN40FA.O",
+        40000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        "",
+        "",
+        TESTDATA_DIR "DISK2/INPUT/I40",
+        TESTDATA_DIR "DISK2/RESET/40/RI40FA.O",
+        40000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/40/RV40FA.I",
+        TESTDATA_DIR "DISK2/RESET/40/RV40FA.O",
+        40000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    /* u-law to A-law tests */
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/16/RN16FM.I",
+        TESTDATA_DIR "DISK1/RESET/16/RN16FC.O",
+        16000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/16/RV16FM.I",
+        TESTDATA_DIR "DISK1/RESET/16/RV16FC.O",
+        16000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/24/RN24FM.I",
+        TESTDATA_DIR "DISK1/RESET/24/RN24FC.O",
+        24000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/24/RV24FM.I",
+        TESTDATA_DIR "DISK1/RESET/24/RV24FC.O",
+        24000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/32/RN32FM.I",
+        TESTDATA_DIR "DISK1/RESET/32/RN32FC.O",
+        32000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/32/RV32FM.I",
+        TESTDATA_DIR "DISK1/RESET/32/RV32FC.O",
+        32000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/40/RN40FM.I",
+        TESTDATA_DIR "DISK1/RESET/40/RN40FC.O",
+        40000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        "",
+        TESTDATA_DIR "DISK1/RESET/40/RV40FM.I",
+        TESTDATA_DIR "DISK1/RESET/40/RV40FC.O",
+        40000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    /* A-law to u-law tests */
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/16/RN16FA.I",
+        TESTDATA_DIR "DISK2/RESET/16/RN16FX.O",
+        16000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/16/RV16FA.I",
+        TESTDATA_DIR "DISK2/RESET/16/RV16FX.O",
+        16000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/24/RN24FA.I",
+        TESTDATA_DIR "DISK2/RESET/24/RN24FX.O",
+        24000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/24/RV24FA.I",
+        TESTDATA_DIR "DISK2/RESET/24/RV24FX.O",
+        24000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/32/RN32FA.I",
+        TESTDATA_DIR "DISK2/RESET/32/RN32FX.O",
+        32000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/32/RV32FA.I",
+        TESTDATA_DIR "DISK2/RESET/32/RV32FX.O",
+        32000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/40/RN40FA.I",
+        TESTDATA_DIR "DISK2/RESET/40/RN40FX.O",
+        40000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        "",
+        TESTDATA_DIR "DISK2/RESET/40/RV40FA.I",
+        TESTDATA_DIR "DISK2/RESET/40/RV40FX.O",
+        40000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    /* u-law to u-law tests */
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        TESTDATA_DIR "DISK1/HOMING/16/I_INI_16.M",
+        TESTDATA_DIR "DISK1/HOMING/16/HN16FM.I",
+        TESTDATA_DIR "DISK1/HOMING/16/HN16FM.O",
+        16000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        "",
+        TESTDATA_DIR "DISK1/HOMING/16/I_INI_16.M",
+        TESTDATA_DIR "DISK1/INPUT/I16",
+        TESTDATA_DIR "DISK1/HOMING/16/HI16FM.O",
+        16000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        TESTDATA_DIR "DISK1/HOMING/16/I_INI_16.M",
+        TESTDATA_DIR "DISK1/HOMING/16/HV16FM.I",
+        TESTDATA_DIR "DISK1/HOMING/16/HV16FM.O",
+        16000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        TESTDATA_DIR "DISK1/HOMING/24/I_INI_24.M",
+        TESTDATA_DIR "DISK1/HOMING/24/HN24FM.I",
+        TESTDATA_DIR "DISK1/HOMING/24/HN24FM.O",
+        24000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        "",
+        TESTDATA_DIR "DISK1/HOMING/24/I_INI_24.M",
+        TESTDATA_DIR "DISK1/INPUT/I24",
+        TESTDATA_DIR "DISK1/HOMING/24/HI24FM.O",
+        24000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        TESTDATA_DIR "DISK1/HOMING/24/I_INI_24.M",
+        TESTDATA_DIR "DISK1/HOMING/24/HV24FM.I",
+        TESTDATA_DIR "DISK1/HOMING/24/HV24FM.O",
+        24000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        TESTDATA_DIR "DISK1/HOMING/32/I_INI_32.M",
+        TESTDATA_DIR "DISK1/HOMING/32/HN32FM.I",
+        TESTDATA_DIR "DISK1/HOMING/32/HN32FM.O",
+        32000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        "",
+        TESTDATA_DIR "DISK1/HOMING/32/I_INI_32.M",
+        TESTDATA_DIR "DISK1/INPUT/I32",
+        TESTDATA_DIR "DISK1/HOMING/32/HI32FM.O",
+        32000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        TESTDATA_DIR "DISK1/HOMING/32/I_INI_32.M",
+        TESTDATA_DIR "DISK1/HOMING/32/HV32FM.I",
+        TESTDATA_DIR "DISK1/HOMING/32/HV32FM.O",
+        32000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        TESTDATA_DIR "DISK1/HOMING/40/I_INI_40.M",
+        TESTDATA_DIR "DISK1/HOMING/40/HN40FM.I",
+        TESTDATA_DIR "DISK1/HOMING/40/HN40FM.O",
+        40000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        "",
+        "",
+        TESTDATA_DIR "DISK1/HOMING/40/I_INI_40.M",
+        TESTDATA_DIR "DISK1/INPUT/I40",
+        TESTDATA_DIR "DISK1/HOMING/40/HI40FM.O",
+        40000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        TESTDATA_DIR "DISK1/HOMING/40/I_INI_40.M",
+        TESTDATA_DIR "DISK1/HOMING/40/HV40FM.I",
+        TESTDATA_DIR "DISK1/HOMING/40/HV40FM.O",
+        40000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ULAW
+    },
+    /* A-law to A-law tests */
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        TESTDATA_DIR "DISK2/HOMING/16/I_INI_16.A",
+        TESTDATA_DIR "DISK2/HOMING/16/HN16FA.I",
+        TESTDATA_DIR "DISK2/HOMING/16/HN16FA.O",
+        16000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        "",
+        TESTDATA_DIR "DISK2/HOMING/16/I_INI_16.A",
+        TESTDATA_DIR "DISK2/INPUT/I16",
+        TESTDATA_DIR "DISK2/HOMING/16/HI16FA.O",
+        16000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        TESTDATA_DIR "DISK2/HOMING/16/I_INI_16.A",
+        TESTDATA_DIR "DISK2/HOMING/16/HV16FA.I",
+        TESTDATA_DIR "DISK2/HOMING/16/HV16FA.O",
+        16000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        TESTDATA_DIR "DISK2/HOMING/24/I_INI_24.A",
+        TESTDATA_DIR "DISK2/HOMING/24/HN24FA.I",
+        TESTDATA_DIR "DISK2/HOMING/24/HN24FA.O",
+        24000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        "",
+        TESTDATA_DIR "DISK2/HOMING/24/I_INI_24.A",
+        TESTDATA_DIR "DISK2/INPUT/I24",
+        TESTDATA_DIR "DISK2/HOMING/24/HI24FA.O",
+        24000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        TESTDATA_DIR "DISK2/HOMING/24/I_INI_24.A",
+        TESTDATA_DIR "DISK2/HOMING/24/HV24FA.I",
+        TESTDATA_DIR "DISK2/HOMING/24/HV24FA.O",
+        24000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        TESTDATA_DIR "DISK2/HOMING/32/I_INI_32.A",
+        TESTDATA_DIR "DISK2/HOMING/32/HN32FA.I",
+        TESTDATA_DIR "DISK2/HOMING/32/HN32FA.O",
+        32000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        "",
+        TESTDATA_DIR "DISK2/HOMING/32/I_INI_32.A",
+        TESTDATA_DIR "DISK2/INPUT/I32",
+        TESTDATA_DIR "DISK2/HOMING/32/HI32FA.O",
+        32000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        TESTDATA_DIR "DISK2/HOMING/32/I_INI_32.A",
+        TESTDATA_DIR "DISK2/HOMING/32/HV32FA.I",
+        TESTDATA_DIR "DISK2/HOMING/32/HV32FA.O",
+        32000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        TESTDATA_DIR "DISK2/HOMING/40/I_INI_40.A",
+        TESTDATA_DIR "DISK2/HOMING/40/HN40FA.I",
+        TESTDATA_DIR "DISK2/HOMING/40/HN40FA.O",
+        40000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        "",
+        "",
+        TESTDATA_DIR "DISK2/HOMING/40/I_INI_40.A",
+        TESTDATA_DIR "DISK2/INPUT/I40",
+        TESTDATA_DIR "DISK2/HOMING/40/HI40FA.O",
+        40000,
+        G726_ENCODING_NONE,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        TESTDATA_DIR "DISK2/HOMING/40/I_INI_40.A",
+        TESTDATA_DIR "DISK2/HOMING/40/HV40FA.I",
+        TESTDATA_DIR "DISK2/HOMING/40/HV40FA.O",
+        40000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ALAW
+    },
+    /* u-law to A-law tests */
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        TESTDATA_DIR "DISK2/HOMING/16/I_INI_16.A",
+        TESTDATA_DIR "DISK1/HOMING/16/HN16FM.I",
+        TESTDATA_DIR "DISK1/HOMING/16/HN16FC.O",
+        16000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        TESTDATA_DIR "DISK2/HOMING/16/I_INI_16.A",
+        TESTDATA_DIR "DISK1/HOMING/16/HV16FM.I",
+        TESTDATA_DIR "DISK1/HOMING/16/HV16FC.O",
+        16000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        TESTDATA_DIR "DISK2/HOMING/24/I_INI_24.A",
+        TESTDATA_DIR "DISK1/HOMING/24/HN24FM.I",
+        TESTDATA_DIR "DISK1/HOMING/24/HN24FC.O",
+        24000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        TESTDATA_DIR "DISK2/HOMING/24/I_INI_24.A",
+        TESTDATA_DIR "DISK1/HOMING/24/HV24FM.I",
+        TESTDATA_DIR "DISK1/HOMING/24/HV24FC.O",
+        24000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        TESTDATA_DIR "DISK2/HOMING/32/I_INI_32.A",
+        TESTDATA_DIR "DISK1/HOMING/32/HN32FM.I",
+        TESTDATA_DIR "DISK1/HOMING/32/HN32FC.O",
+        32000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        TESTDATA_DIR "DISK2/HOMING/32/I_INI_32.A",
+        TESTDATA_DIR "DISK1/HOMING/32/HV32FM.I",
+        TESTDATA_DIR "DISK1/HOMING/32/HV32FC.O",
+        32000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/NRM.M",
+        TESTDATA_DIR "DISK2/HOMING/40/I_INI_40.A",
+        TESTDATA_DIR "DISK1/HOMING/40/HN40FM.I",
+        TESTDATA_DIR "DISK1/HOMING/40/HN40FC.O",
+        40000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    {
+        TESTDATA_DIR "DISK1/PCM_INIT.M",
+        TESTDATA_DIR "DISK1/INPUT/OVR.M",
+        TESTDATA_DIR "DISK2/HOMING/40/I_INI_40.A",
+        TESTDATA_DIR "DISK1/HOMING/40/HV40FM.I",
+        TESTDATA_DIR "DISK1/HOMING/40/HV40FC.O",
+        40000,
+        G726_ENCODING_ULAW,
+        G726_ENCODING_ALAW
+    },
+    /* A-law to u-law tests */
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        TESTDATA_DIR "DISK1/HOMING/16/I_INI_16.M",
+        TESTDATA_DIR "DISK2/HOMING/16/HN16FA.I",
+        TESTDATA_DIR "DISK2/HOMING/16/HN16FX.O",
+        16000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        TESTDATA_DIR "DISK1/HOMING/16/I_INI_16.M",
+        TESTDATA_DIR "DISK2/HOMING/16/HV16FA.I",
+        TESTDATA_DIR "DISK2/HOMING/16/HV16FX.O",
+        16000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        TESTDATA_DIR "DISK1/HOMING/24/I_INI_24.M",
+        TESTDATA_DIR "DISK2/HOMING/24/HN24FA.I",
+        TESTDATA_DIR "DISK2/HOMING/24/HN24FX.O",
+        24000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        TESTDATA_DIR "DISK1/HOMING/24/I_INI_24.M",
+        TESTDATA_DIR "DISK2/HOMING/24/HV24FA.I",
+        TESTDATA_DIR "DISK2/HOMING/24/HV24FX.O",
+        24000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        TESTDATA_DIR "DISK1/HOMING/32/I_INI_32.M",
+        TESTDATA_DIR "DISK2/HOMING/32/HN32FA.I",
+        TESTDATA_DIR "DISK2/HOMING/32/HN32FX.O",
+        32000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        TESTDATA_DIR "DISK1/HOMING/32/I_INI_32.M",
+        TESTDATA_DIR "DISK2/HOMING/32/HV32FA.I",
+        TESTDATA_DIR "DISK2/HOMING/32/HV32FX.O",
+        32000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/NRM.A",
+        TESTDATA_DIR "DISK1/HOMING/40/I_INI_40.M",
+        TESTDATA_DIR "DISK2/HOMING/40/HN40FA.I",
+        TESTDATA_DIR "DISK2/HOMING/40/HN40FX.O",
+        40000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        TESTDATA_DIR "DISK2/PCM_INIT.A",
+        TESTDATA_DIR "DISK2/INPUT/OVR.A",
+        TESTDATA_DIR "DISK1/HOMING/40/I_INI_40.M",
+        TESTDATA_DIR "DISK2/HOMING/40/HV40FA.I",
+        TESTDATA_DIR "DISK2/HOMING/40/HV40FX.O",
+        40000,
+        G726_ENCODING_ALAW,
+        G726_ENCODING_ULAW
+    },
+    {
+        NULL,
+        NULL,
+        NULL,
+        NULL,
+        NULL,
+        0,
+        0,
+        0
+    }
+};
+
+static int hex_get(char *s)
+{
+    int i;
+    int value;
+    int x;
+
+    for (value = i = 0;  i < 2;  i++)
+    {
+        x = *s++ - 0x30;
+        if (x > 9)
+            x -= 0x07;
+        if (x > 15)
+            x -= 0x20;
+        if (x < 0  ||  x > 15)
+            return -1;
+        value <<= 4;
+        value |= x;
+    }
+    return value;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int get_vector(FILE *file, uint8_t vec[])
+{
+    char buf[132 + 1];
+    char *s;
+    int i;
+    int value;
+
+    while (fgets(buf, 133, file))
+    {
+        s = buf;
+        i = 0;
+        while ((value = hex_get(s)) >= 0)
+        {
+            vec[i++] = value;
+            s += 2;
+        }
+        return i;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int get_test_vector(const char *file, uint8_t buf[], int max_len)
+{
+    int octets;
+    int i;
+    int sum;
+    FILE *infile;
+    
+    if ((infile = fopen(file, "r")) == NULL)
+    {
+        fprintf(stderr, "    Failed to open '%s'\n", file);
+        exit(2);
+    }
+    octets = 0;  
+    while ((i = get_vector(infile, buf + octets)) > 0)
+        octets += i;
+    fclose(infile);
+    /* The last octet is a sumcheck, so the real data octets are one less than
+       the total we have */
+    octets--;
+    /* Test the checksum */
+    for (sum = i = 0;  i < octets;  i++)
+        sum += buf[i];
+    if (sum%255 != (int) buf[i])
+    {
+        fprintf(stderr, "    Sumcheck failed in '%s' - %x %x\n", file, sum%255, buf[i]);
+        exit(2);
+    }
+    return octets;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    g726_state_t enc_state;
+    g726_state_t dec_state;
+    int len2;
+    int len3;
+    int i;
+    int test;
+    int bits_per_code;
+    int itutests;
+    int bit_rate;
+    int bad_samples;
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int16_t amp[1024];
+    int frames;
+    int outframes;
+    int conditioning_samples;
+    int samples;
+    int conditioning_adpcm;
+    int adpcm;
+    int packing;
+    float x;
+
+    i = 1;
+    bit_rate = 32000;
+    itutests = TRUE;
+    packing = G726_PACKING_NONE;
+    while (argc > i)
+    {
+        if (strcmp(argv[i], "-16") == 0)
+        {
+            bit_rate = 16000;
+            itutests = FALSE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-24") == 0)
+        {
+            bit_rate = 24000;
+            itutests = FALSE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-32") == 0)
+        {
+            bit_rate = 32000;
+            itutests = FALSE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-40") == 0)
+        {
+            bit_rate = 40000;
+            itutests = FALSE;
+            i++;
+        }
+        else if (strcmp(argv[i], "-l") == 0)
+        {
+            packing = G726_PACKING_LEFT;
+            i++;
+        }
+        else if (strcmp(argv[i], "-r") == 0)
+        {
+            packing = G726_PACKING_RIGHT;
+            i++;
+        }
+        else
+        {
+            fprintf(stderr, "Unknown parameter %s specified.\n", argv[i]);
+            exit(2);
+        }
+    }
+
+    len2 = 0;
+    conditioning_samples = 0;
+    if (itutests)
+    {
+        for (test = 0;  itu_test_sets[test].rate;  test++)
+        {
+            printf("Test %2d: '%s' + '%s'\n"
+                   "      -> '%s' + '%s'\n"
+                   "      -> '%s' [%d, %d, %d]\n",
+                   test,
+                   itu_test_sets[test].conditioning_pcm_file,
+                   itu_test_sets[test].pcm_file,
+                   itu_test_sets[test].conditioning_adpcm_file,
+                   itu_test_sets[test].adpcm_file,
+                   itu_test_sets[test].output_file,
+                   itu_test_sets[test].rate,
+                   itu_test_sets[test].compression_law,
+                   itu_test_sets[test].decompression_law);
+            switch (itu_test_sets[test].rate)
+            {
+            case 16000:
+                bits_per_code = 2;
+                break;
+            case 24000:
+                bits_per_code = 3;
+                break;
+            case 32000:
+            default:
+                bits_per_code = 4;
+                break;
+            case 40000:
+                bits_per_code = 5;
+                break;
+            }
+            if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
+            {
+                /* Test the encode side */
+                g726_init(&enc_state, itu_test_sets[test].rate, itu_test_sets[test].compression_law, G726_PACKING_NONE);
+                if (itu_test_sets[test].conditioning_pcm_file[0])
+                {
+                    conditioning_samples = get_test_vector(itu_test_sets[test].conditioning_pcm_file, xlaw, MAX_TEST_VECTOR_LEN);
+                    printf("Test %d: Homing %d samples at %dbps\n", test, conditioning_samples, itu_test_sets[test].rate);
+                }
+                else
+                {
+                    conditioning_samples = 0;
+                }
+                samples = get_test_vector(itu_test_sets[test].pcm_file, xlaw + conditioning_samples, MAX_TEST_VECTOR_LEN);
+                memcpy(itudata, xlaw, samples + conditioning_samples);
+                printf("Test %d: Compressing %d samples at %dbps\n", test, samples, itu_test_sets[test].rate);
+                len2 = g726_encode(&enc_state, adpcmdata, itudata, conditioning_samples + samples);
+            }
+            /* Test the decode side */
+            g726_init(&dec_state, itu_test_sets[test].rate, itu_test_sets[test].decompression_law, G726_PACKING_NONE);
+            if (itu_test_sets[test].conditioning_adpcm_file[0])
+            {
+                conditioning_adpcm = get_test_vector(itu_test_sets[test].conditioning_adpcm_file, unpacked, MAX_TEST_VECTOR_LEN);
+                printf("Test %d: Homing %d octets at %dbps\n", test, conditioning_adpcm, itu_test_sets[test].rate);
+            }
+            else
+            {
+                conditioning_adpcm = 0;
+            }
+            adpcm = get_test_vector(itu_test_sets[test].adpcm_file, unpacked + conditioning_adpcm, MAX_TEST_VECTOR_LEN);
+            if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
+            {
+                /* Test our compressed version against the reference compressed version */
+                printf("Test %d: Compressed data check - %d/%d octets\n", test, conditioning_adpcm + adpcm, len2);
+                if (conditioning_adpcm + adpcm == len2)
+                {
+                    for (bad_samples = 0, i = conditioning_samples;  i < len2;  i++)
+                    {
+                        if (adpcmdata[i] != unpacked[i])
+                        {
+                            bad_samples++;
+                            printf("Test %d: Compressed mismatch %d %x %x\n", test, i, adpcmdata[i], unpacked[i]);
+                        }
+                    }
+                    if (bad_samples > 0)
+                    {
+                        printf("Test failed\n");
+                        exit(2);
+                    }
+                    printf("Test passed\n");
+                }
+                else
+                {
+                    printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, conditioning_adpcm + adpcm, len2);
+                    exit(2);
+                }
+            }
+            
+            len3 = g726_decode(&dec_state, outdata, unpacked, conditioning_adpcm + adpcm);
+
+            /* Get the output reference data */
+            samples = get_test_vector(itu_test_sets[test].output_file, xlaw, MAX_TEST_VECTOR_LEN);
+            memcpy(itu_ref, xlaw, samples);
+            /* Test our decompressed version against the reference decompressed version */
+            printf("Test %d: Decompressed data check - %d/%d samples\n", test, samples, len3 - conditioning_adpcm);
+            if (samples == len3 - conditioning_adpcm)
+            {
+                for (bad_samples = 0, i = 0;  i < len3;  i++)
+                {
+                    if (itu_ref[i] != ((uint8_t *) outdata)[i + conditioning_adpcm])
+                    {
+                        bad_samples++;
+                        printf("Test %d: Decompressed mismatch %d %x %x\n", test, i, itu_ref[i], ((uint8_t *) outdata)[i + conditioning_adpcm]);
+                    }
+                }
+                if (bad_samples > 0)
+                {
+                    printf("Test failed\n");
+                    exit(2);
+                }
+                printf("Test passed\n");
+            }
+            else
+            {
+                printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, samples, len3 - conditioning_adpcm);
+                exit(2);
+            }
+        }
+
+        printf("Tests passed.\n");
+    }
+    else
+    {
+        if ((inhandle = afOpenFile(IN_FILE_NAME, "r", 0)) == AF_NULL_FILEHANDLE)
+        {
+            printf("    Cannot open wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+        {
+            printf("    Unexpected frame size in wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+        {
+            printf("    Unexpected sample rate in wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+        {
+            printf("    Unexpected number of channels in wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+        outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup);
+        if (outhandle == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+
+        printf("ADPCM packing is %d\n", packing);
+        g726_init(&enc_state, bit_rate, G726_ENCODING_LINEAR, packing);
+        g726_init(&dec_state, bit_rate, G726_ENCODING_LINEAR, packing);
+            
+        while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, amp, 159)))
+        {
+            adpcm = g726_encode(&enc_state, adpcmdata, amp, frames);
+            frames = g726_decode(&dec_state, amp, adpcmdata, adpcm);
+            outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, amp, frames);
+        }
+        if (afCloseFile(inhandle) != 0)
+        {
+            printf("    Cannot close wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if (afCloseFile(outhandle) != 0)
+        {
+            printf("    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+        printf("'%s' transcoded to '%s' at %dbps.\n", IN_FILE_NAME, OUT_FILE_NAME, bit_rate);
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/gsm0610_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,587 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * gsm0610_tests.c - Test the GSM 06.10 FR codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: gsm0610_tests.c,v 1.6 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page gsm0610_tests_page GSM 06.10 full rate codec tests
+\section gsm0610_tests_page_sec_1 What does it do?
+Two sets of tests are performed:
+    - The tests defined in the GSM 06.10 specification, using the test data files supplied with
+      the specification.
+    - A generally audio quality test, consisting of compressing and decompressing a speeech
+      file for audible comparison.
+
+The speech file should be recorded at 16 bits/sample, 8000 samples/second, and named
+"pre_gsm0610.wav".
+
+\section gsm0610_tests_page_sec_2 How is it used?
+To perform the tests in the GSM 06.10 specification you need to obtain the test data files from the
+specification. These are copyright material, and so cannot be distributed with spandsp. They can,
+however, be freely downloaded from the ETSI web site.
+
+The files, containing test vectors, which are supplied with the GSM 06.10 specification, should be
+copied to etsitests/gsm0610/unpacked so the files are arranged in the following directories.
+
+./fr_A:
+    Seq01-A.cod Seq01-A.inp Seq01-A.out
+    Seq02-A.cod Seq02-A.inp Seq02-A.out
+    Seq03-A.cod Seq03-A.inp Seq03-A.out
+    Seq04-A.cod Seq04-A.inp Seq04-A.out
+    Seq05-A.out
+
+./fr_L:
+    Seq01.cod   Seq01.inp   Seq01.out
+    Seq02.cod   Seq02.inp   Seq02.out
+    Seq03.cod   Seq03.inp   Seq03.out
+    Seq04.cod   Seq04.inp   Seq04.out
+    Seq05.cod   Seq05.out
+
+./fr_U:
+    Seq01-U.cod Seq01-U.inp Seq01-U.out
+    Seq02-U.cod Seq02-U.inp Seq02-U.out
+    Seq03-U.cod Seq03-U.inp Seq03-U.out
+    Seq04-U.cod Seq04-U.inp Seq04-U.out
+    Seq05-U.out
+
+./fr_homing_A:
+    Homing01_A.out
+    Seq01H_A.cod    Seq01H_A.inp    Seq01H_A.out
+    Seq02H_A.cod    Seq02H_A.inp    Seq02H_A.out
+    Seq03H_A.cod    Seq03H_A.inp    Seq03H_A.out
+    Seq04H_A.cod    Seq04H_A.inp    Seq04H_A.out
+    Seq05H_A.out
+    Seq06H_A.cod    Seq06H_A.inp
+
+./fr_homing_L:
+    Homing01.cod    Homing01.out
+    Seq01h.cod      Seq01h.inp      Seq01h.out
+    Seq02h.cod      Seq02h.inp      Seq02h.out
+    Seq03h.cod      Seq03h.inp      Seq03h.out
+    Seq04h.cod      Seq04h.inp      Seq04h.out
+    Seq05h.cod      Seq05h.out
+    Seq06h.cod      Seq06h.inp
+
+./fr_homing_U:
+    Homing01_U.out
+    Seq01H_U.cod    Seq01H_U.inp    Seq01H_U.out
+    Seq02H_U.cod    Seq02H_U.inp    Seq02H_U.out
+    Seq03H_U.cod    Seq03H_U.inp    Seq03H_U.out
+    Seq04H_U.cod    Seq04H_U.inp    Seq04H_U.out
+    Seq05H_U.out
+    Seq06H_U.cod    Seq06H_U.inp
+
+./fr_sync_A:
+    Seqsync_A.inp
+    Sync000_A.cod   --to--          Sync159_A.cod
+    
+./fr_sync_L:
+    Bitsync.inp
+    Seqsync.inp
+    Sync000.cod     --to--          Sync159.cod
+
+./fr_sync_U:
+    Seqsync_U.inp
+    Sync000_U.cod   --to--          Sync159_U.cod
+
+This is different from the directory structure in which they are supplied. Also, the files names are a little
+different. The supplied names are messy, and inconsistent across the sets. The names required by these tests
+just clean up these inconsistencies. Note that you will need a Windows machine to unpack some of the supplied
+files.
+
+To perform a general audio quality test, gsm0610_tests should be run. The file ../localtests/short_nb_voice.wav
+will be compressed to GSM 06.10 data, decompressed, and the resulting audio stored in post_gsm0610.wav.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define BLOCK_LEN       160
+
+#define TEST_DIR "../etsitests/gsm0610/unpacked/fr_"
+
+#define IN_FILE_NAME    "../localtests/short_nb_voice.wav"
+#define OUT_FILE_NAME   "post_gsm0610.wav"
+
+#define HIST_LEN        1000
+
+uint8_t law_in_vector[1000000];
+int16_t in_vector[1000000];
+uint16_t code_vector_buf[1000000];
+uint8_t code_vector[1000000];
+uint8_t ref_code_vector[1000000];
+uint8_t decoder_code_vector[1000000];
+uint8_t law_out_vector[1000000];
+int16_t out_vector[1000000];
+int16_t ref_out_vector[1000000];
+uint8_t ref_law_out_vector[1000000];
+int vector_len;
+
+static int get_test_vector(int full, int disk, const char *name)
+{
+    char buf[500];
+    int in;
+    int len;
+    int i;
+    
+    if (full)
+    {
+        sprintf(buf, "%s%c/%s.inp", TEST_DIR, 'L', name);
+        if ((in = open(buf, O_RDONLY)) < 0)
+        {
+            fprintf(stderr, "Cannot open %s\n", buf);
+            exit(2);
+        }
+        len = read(in, in_vector, 1000000);
+        close(in);
+        len /= sizeof(int16_t);
+        vector_len = len;
+    }
+
+    sprintf(buf, "%s%c/%s.out", TEST_DIR, 'L', name);
+    if ((in = open(buf, O_RDONLY)) < 0)
+    {
+        fprintf(stderr, "Cannot open %s\n", buf);
+        exit(2);
+    }
+    len = read(in, ref_out_vector, 1000000);
+    close(in);
+    len /= sizeof(int16_t);
+    if (full)
+    {
+        if (len != vector_len)
+        {
+            fprintf(stderr, "Input and reference vector lengths do not match - %d %d\n", vector_len, len);
+            exit(2);
+        }
+    }
+    else
+    {
+        vector_len = len;
+    }
+    
+    sprintf(buf, "%s%c/%s.cod", TEST_DIR, 'L', name);
+    if ((in = open(buf, O_RDONLY)) < 0)
+    {
+        fprintf(stderr, "Cannot open %s\n", buf);
+        exit(2);
+    }
+    len = read(in, code_vector_buf, 1000000);
+    close(in);
+    len /= sizeof(int16_t);
+    for (i = 0;  i < len;  i++)
+    {
+        ref_code_vector[i] = code_vector_buf[i];
+        decoder_code_vector[i] = code_vector_buf[i];
+    }
+    if (len*BLOCK_LEN != vector_len*76)
+    {
+        fprintf(stderr, "Input and code vector lengths do not match - %d %d\n", vector_len, len);
+        exit(2);
+    }
+
+    return len;
+}
+
+static int get_law_test_vector(int full, int law, const char *name)
+{
+    char buf[500];
+    int in;
+    int len;
+    int i;
+    int law_uc;
+    
+    law_uc = toupper(law);
+    
+    if (full)
+    {
+        sprintf(buf, "%s%c/%s-%c.inp", TEST_DIR, law_uc, name, law_uc);
+        if ((in = open(buf, O_RDONLY)) < 0)
+        {
+            fprintf(stderr, "Cannot open %s\n", buf);
+            exit(2);
+        }
+        len = read(in, law_in_vector, 1000000);
+        close(in);
+        vector_len = len;
+
+        sprintf(buf, "%s%c/%s-%c.cod", TEST_DIR, law_uc, name, law_uc);
+        if ((in = open(buf, O_RDONLY)) < 0)
+        {
+            fprintf(stderr, "Cannot open %s\n", buf);
+            exit(2);
+        }
+        len = read(in, code_vector_buf, 1000000);
+        close(in);
+        len /= sizeof(int16_t);
+        for (i = 0;  i < len;  i++)
+            ref_code_vector[i] = code_vector_buf[i];
+        if (len*BLOCK_LEN != vector_len*76)
+        {
+            fprintf(stderr, "Input and code vector lengths do not match - %d %d\n", vector_len, len);
+            exit(2);
+        }
+    }
+
+    sprintf(buf, "%s%c/%s-%c.out", TEST_DIR, law_uc, name, law_uc);
+    if ((in = open(buf, O_RDONLY)) < 0)
+    {
+        fprintf(stderr, "Cannot open %s\n", buf);
+        exit(2);
+    }
+    len = read(in, ref_law_out_vector, 1000000);
+    close(in);
+    if (full)
+    {
+        if (len != vector_len)
+        {
+            fprintf(stderr, "Input and reference vector lengths do not match - %d %d\n", vector_len, len);
+            exit(2);
+        }
+    }
+    else
+    {
+        vector_len = len;
+    }
+
+    sprintf(buf, "%s%c/%s.cod", TEST_DIR, 'L', name);
+    if ((in = open(buf, O_RDONLY)) < 0)
+    {
+        fprintf(stderr, "Cannot open %s\n", buf);
+        exit(2);
+    }
+    len = read(in, code_vector_buf, 1000000);
+    close(in);
+    len /= sizeof(int16_t);
+    for (i = 0;  i < len;  i++)
+        decoder_code_vector[i] = code_vector_buf[i];
+    
+    return len;
+}
+
+static int perform_linear_test(int full, int disk, const char *name)
+{
+    gsm0610_state_t *gsm0610_enc_state;
+    gsm0610_state_t *gsm0610_dec_state;
+    int i;
+    int xxx;
+    int mismatches;
+
+    printf("Performing linear test '%s' from disk %d\n", name, disk);
+
+    get_test_vector(full, disk, name);
+
+    if (full)
+    {
+        if ((gsm0610_enc_state = gsm0610_init(NULL, GSM0610_PACKING_NONE)) == NULL)
+        {
+            fprintf(stderr, "    Cannot create encoder\n");
+            exit(2);
+        }
+        xxx = gsm0610_encode(gsm0610_enc_state, code_vector, in_vector, vector_len/BLOCK_LEN);
+
+        printf("Check code vector of length %d\n", xxx);
+        for (i = 0, mismatches = 0;  i < xxx;  i++)
+        {
+            if (code_vector[i] != ref_code_vector[i])
+            {
+                printf("%8d/%3d: %6d %6d\n", i/76, i%76, code_vector[i], ref_code_vector[i]);
+                mismatches++;
+            }
+        }
+        gsm0610_release(gsm0610_enc_state);
+        if (mismatches)
+        {
+            printf("Test failed: %d of %d samples mismatch\n", mismatches, xxx);
+            exit(2);
+        }
+        printf("Test passed\n");
+    }
+
+    if ((gsm0610_dec_state = gsm0610_init(NULL, GSM0610_PACKING_NONE)) == NULL)
+    {
+        fprintf(stderr, "    Cannot create decoder\n");
+        exit(2);
+    }
+    xxx = gsm0610_decode(gsm0610_dec_state, out_vector, decoder_code_vector, vector_len/BLOCK_LEN);
+    printf("Check output vector of length %d\n", vector_len);
+    for (i = 0, mismatches = 0;  i < vector_len;  i++)
+    {
+        if (out_vector[i] != ref_out_vector[i])
+        {
+            printf("%8d: %6d %6d\n", i, out_vector[i], ref_out_vector[i]);
+            mismatches++;
+        }
+    }
+    if (mismatches)
+    {
+        printf("Test failed: %d of %d samples mismatch\n", mismatches, vector_len);
+        exit(2);
+    }
+    gsm0610_release(gsm0610_dec_state);
+    printf("Test passed\n");
+    return 0;
+}
+
+static int perform_law_test(int full, int law, const char *name)
+{
+    gsm0610_state_t *gsm0610_enc_state;
+    gsm0610_state_t *gsm0610_dec_state;
+    int i;
+    int xxx;
+    int mismatches;
+
+    if (law == 'a')
+        printf("Performing A-law test '%s'\n", name);
+    else
+        printf("Performing u-law test '%s'\n", name);
+        
+    get_law_test_vector(full, law, name);
+
+    if (full)
+    {
+        if ((gsm0610_enc_state = gsm0610_init(NULL, GSM0610_PACKING_NONE)) == NULL)
+        {
+            fprintf(stderr, "    Cannot create encoder\n");
+            exit(2);
+        }
+        if (law == 'a')
+        {
+            for (i = 0;  i < vector_len;  i++)
+                in_vector[i] = alaw_to_linear(law_in_vector[i]);
+        }
+        else
+        {
+            for (i = 0;  i < vector_len;  i++)
+                in_vector[i] = ulaw_to_linear(law_in_vector[i]);
+        }
+        xxx = gsm0610_encode(gsm0610_enc_state, code_vector, in_vector, vector_len/BLOCK_LEN);
+
+        printf("Check code vector of length %d\n", xxx);
+        for (i = 0, mismatches = 0;  i < xxx;  i++)
+        {
+            if (code_vector[i] != ref_code_vector[i])
+            {
+                printf("%8d/%3d: %6d %6d %6d\n", i/76, i%76, code_vector[i], ref_code_vector[i], decoder_code_vector[i]);
+                mismatches++;
+            }
+        }
+        if (mismatches)
+        {
+            printf("Test failed: %d of %d samples mismatch\n", mismatches, xxx);
+            exit(2);
+        }
+        printf("Test passed\n");
+        gsm0610_release(gsm0610_enc_state);
+    }
+
+    if ((gsm0610_dec_state = gsm0610_init(NULL, GSM0610_PACKING_NONE)) == NULL)
+    {
+        fprintf(stderr, "    Cannot create decoder\n");
+        exit(2);
+    }
+    xxx = gsm0610_decode(gsm0610_dec_state, out_vector, decoder_code_vector, vector_len/BLOCK_LEN);
+    if (law == 'a')
+    {
+        for (i = 0;  i < vector_len;  i++)
+            law_out_vector[i] = linear_to_alaw(out_vector[i]);
+    }
+    else
+    {
+        for (i = 0;  i < vector_len;  i++)
+            law_out_vector[i] = linear_to_ulaw(out_vector[i]);
+    }
+    printf("Check output vector of length %d\n", vector_len);
+    for (i = 0, mismatches = 0;  i < vector_len;  i++)
+    {
+        if (law_out_vector[i] != ref_law_out_vector[i])
+        {
+            printf("%8d: %6d %6d\n", i, law_out_vector[i], ref_law_out_vector[i]);
+            mismatches++;
+        }
+    }
+    if (mismatches)
+    {
+        printf("Test failed: %d of %d samples mismatch\n", mismatches, vector_len);
+        exit(2);
+    }
+    gsm0610_release(gsm0610_dec_state);
+    printf("Test passed\n");
+    return 0;
+}
+
+int main(int argc, char *argv[])
+{
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int frames;
+    int outframes;
+    float x;
+    int16_t pre_amp[HIST_LEN];
+    int16_t post_amp[HIST_LEN];
+    uint8_t gsm0610_data[HIST_LEN];
+    gsm0610_state_t *gsm0610_enc_state;
+    gsm0610_state_t *gsm0610_dec_state;
+    int etsitests;
+    int packing;
+    int i;
+
+    etsitests = TRUE;
+    packing = GSM0610_PACKING_NONE;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            etsitests = FALSE;
+            continue;
+        }
+        if (strcmp(argv[i], "-p") == 0)
+        {
+            packing = atoi(argv[++i]);
+            continue;
+        }
+        fprintf(stderr, "Unknown parameter %s specified.\n", argv[i]);
+        exit(2);
+    }
+
+    if (etsitests)
+    {
+        perform_linear_test(TRUE, 1, "Seq01");
+        perform_linear_test(TRUE, 1, "Seq02");
+        perform_linear_test(TRUE, 1, "Seq03");
+        perform_linear_test(TRUE, 1, "Seq04");
+        perform_linear_test(FALSE, 1, "Seq05");
+        perform_law_test(TRUE, 'a', "Seq01");
+        perform_law_test(TRUE, 'a', "Seq02");
+        perform_law_test(TRUE, 'a', "Seq03");
+        perform_law_test(TRUE, 'a', "Seq04");
+        perform_law_test(FALSE, 'a', "Seq05");
+        perform_law_test(TRUE, 'u', "Seq01");
+        perform_law_test(TRUE, 'u', "Seq02");
+        perform_law_test(TRUE, 'u', "Seq03");
+        perform_law_test(TRUE, 'u', "Seq04");
+        perform_law_test(FALSE, 'u', "Seq05");
+
+        printf("Tests passed.\n");
+    }
+    else
+    {
+        if ((inhandle = afOpenFile(IN_FILE_NAME, "r", 0)) == AF_NULL_FILEHANDLE)
+        {
+            printf("    Cannot open wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+        {
+            printf("    Unexpected frame size in wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+        {
+            printf("    Unexpected sample rate in wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+        {
+            printf("    Unexpected number of channels in wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+    
+        outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup);
+        if (outhandle == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+    
+        if ((gsm0610_enc_state = gsm0610_init(NULL, packing)) == NULL)
+        {
+            fprintf(stderr, "    Cannot create encoder\n");
+            exit(2);
+        }
+            
+        if ((gsm0610_dec_state = gsm0610_init(NULL, packing)) == NULL)
+        {
+            fprintf(stderr, "    Cannot create decoder\n");
+            exit(2);
+        }
+
+        while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, pre_amp, 2*BLOCK_LEN)))
+        {
+            gsm0610_encode(gsm0610_enc_state, gsm0610_data, pre_amp, (packing == GSM0610_PACKING_WAV49)  ?  1  :  2);
+            gsm0610_decode(gsm0610_dec_state, post_amp, gsm0610_data, (packing == GSM0610_PACKING_WAV49)  ?  1  :  2);
+            outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, frames);
+        }
+    
+        if (afCloseFile(inhandle) != 0)
+        {
+            printf("    Cannot close wave file '%s'\n", IN_FILE_NAME);
+            exit(2);
+        }
+        if (afCloseFile(outhandle) != 0)
+        {
+            printf("    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+        gsm0610_release(gsm0610_enc_state);
+        gsm0610_release(gsm0610_dec_state);
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/hdlc_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,414 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * hdlc_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: hdlc_tests.c,v 1.30 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page hdlc_tests_page HDLC tests
+\section hdlc_tests_page_sec_1 What does it do?
+The HDLC tests exercise the HDLC module, and verifies correct operation
+using both 16 and 32 bit CRCs.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+int ref_len;
+uint8_t buf[1000];
+
+int frame_handled;
+int frame_len_errors;
+int frame_data_errors;
+int underflow_reported;
+
+hdlc_rx_state_t rx;
+hdlc_tx_state_t tx;
+
+int frames_sent;
+int bytes_sent;
+uint64_t start;
+uint64_t end;
+
+/* Use a local random generator, so the results are consistent across platforms. We have hard coded
+   correct results for a message sequence generated by this particular PRNG. */
+static int my_rand(void)
+{
+    static int rndnum = 1234567;
+
+    return (rndnum = 1664525U*rndnum + 1013904223U) >> 8;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int cook_up_msg(uint8_t *buf)
+{
+    int i;
+    int len;
+
+    /* Use medium length messages, with some randomised length variation. */
+    /* TODO: this doesn't exercise extremely short or long messages. */
+    len = (my_rand() & 0x3F) + 100;
+    for (i = 0;  i < len;  i++)
+        buf[i] = my_rand();
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void frame_handler(void *user_data, int ok, const uint8_t *pkt, int len)
+{
+    if (len < 0)
+    {
+        /* Special conditions */
+        switch (len)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            printf("Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            printf("Training succeeded\n");
+            break;
+        case PUTBIT_CARRIER_UP:
+            printf("Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            printf("Carrier down\n");
+            break;
+        case PUTBIT_FRAMING_OK:
+            //printf("Framing OK\n");
+            break;
+        case PUTBIT_ABORT:
+            printf("Abort\n");
+            break;
+        default:
+            printf("Eh!\n");
+            break;
+        }
+        return;
+    }
+    if (len != ref_len)
+    {
+        printf("Len error - %d %d\n", len, ref_len);
+        frame_len_errors++;
+        return;
+    }
+    if (memcmp(pkt, buf, len))
+    {
+        printf("Frame data error\n");
+        frame_data_errors++;
+        return;
+    }
+    frame_handled = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void underflow_handler(void *user_data)
+{
+    //printf("Underflow reported\n");
+    underflow_reported = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void check_result(void)
+{
+    hdlc_rx_stats_t rx_stats;
+
+    hdlc_rx_get_stats(&rx, &rx_stats);
+    printf("%lu bytes\n", rx_stats.bytes);
+    printf("%lu good frames\n", rx_stats.good_frames);
+    printf("%lu CRC errors\n", rx_stats.crc_errors);
+    printf("%lu length errors\n", rx_stats.length_errors);
+    printf("%lu aborts\n", rx_stats.aborts);
+    printf("%d frame length errors\n", frame_len_errors);
+    printf("%d frame data errors\n", frame_data_errors);
+    printf("Test duration %" PRIu64 " ticks\n", end - start);
+    if (rx_stats.bytes != bytes_sent
+        ||
+        rx_stats.good_frames != frames_sent
+        ||
+        rx_stats.crc_errors != 0
+        ||
+        rx_stats.length_errors != 0
+        ||
+        rx_stats.aborts != 0
+        ||
+        frame_len_errors != 0
+        ||
+        frame_data_errors != 0)
+    {
+        printf("Tests failed.\n");
+        exit(2);
+    }
+    printf("Test passed.\n\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int i;
+    int j;
+    int len;
+    int nextbyte;
+    int progress;
+    int progress_delay;
+
+    printf("HDLC module tests\n");
+
+    /* Try a few random messages through the CRC logic. */
+    printf("Testing the CRC-16 routines\n");
+    for (i = 0;  i < 100;  i++)
+    {
+        ref_len = cook_up_msg(buf);
+        len = crc_itu16_append(buf, ref_len);
+        if (!crc_itu16_check(buf, len))
+        {
+            printf("CRC-16 failure\n");
+            exit(2);
+        }
+    }
+    printf("Test passed.\n\n");
+    
+    printf("Testing the CRC-32 routines\n");
+    for (i = 0;  i < 100;  i++)
+    {
+        ref_len = cook_up_msg(buf);
+        len = crc_itu32_append(buf, ref_len);
+        if (!crc_itu32_check(buf, len))
+        {
+            printf("CRC-32 failure\n");
+            exit(2);
+        }
+    }
+    printf("Test passed.\n\n");
+
+    /* Now try sending HDLC messages with CRC-16 */
+    printf("Testing with CRC-16 (byte by byte)\n");
+    frame_len_errors = 0;
+    frame_data_errors = 0;
+    hdlc_tx_init(&tx, FALSE, 1, FALSE, underflow_handler, NULL);
+    hdlc_rx_init(&rx, FALSE, FALSE, 5, frame_handler, NULL);
+    underflow_reported = FALSE;
+
+    start = rdtscll();
+    hdlc_tx_preamble(&tx, 40);
+    /* Push an initial message so we should NOT get an underflow after the preamble. */
+    ref_len = cook_up_msg(buf);
+    hdlc_tx_frame(&tx, buf, ref_len);
+    frame_handled = FALSE;
+    frames_sent = 0;
+    bytes_sent = 0;
+    for (i = 0;  i < 1000000;  i++)
+    {
+        nextbyte = hdlc_tx_get_byte(&tx);
+        hdlc_rx_put_byte(&rx, nextbyte);
+        if (underflow_reported)
+        {
+            underflow_reported = FALSE;
+            nextbyte = hdlc_tx_get_byte(&tx);
+            hdlc_rx_put_byte(&rx, nextbyte);
+            frames_sent++;
+            bytes_sent += ref_len;
+            if (!frame_handled)
+            {
+                printf("Frame not received.\n");
+                printf("Tests failed.\n");
+                exit(2);
+            }
+            ref_len = cook_up_msg(buf);
+            hdlc_tx_frame(&tx, buf, ref_len);
+            frame_handled = FALSE;
+        }
+    }
+    end = rdtscll();
+    check_result();
+
+    /* Now try sending HDLC messages with CRC-16 bit by bit */
+    printf("Testing with CRC-16 (bit by bit)\n");
+    frame_len_errors = 0;
+    frame_data_errors = 0;
+    hdlc_tx_init(&tx, FALSE, 2, FALSE, underflow_handler, NULL);
+    hdlc_rx_init(&rx, FALSE, FALSE, 5, frame_handler, NULL);
+    underflow_reported = FALSE;
+
+    start = rdtscll();
+    hdlc_tx_preamble(&tx, 40);
+    /* Don't push an initial message so we should get an underflow after the preamble. */
+    /* Lie for the first message, as there isn't really one */
+    frame_handled = TRUE;
+    frames_sent = 0;
+    bytes_sent = 0;
+    ref_len = 0;
+    for (i = 0;  i < 8*1000000;  i++)
+    {
+        nextbyte = hdlc_tx_get_bit(&tx);
+        hdlc_rx_put_bit(&rx, nextbyte);
+        if (underflow_reported)
+        {
+            underflow_reported = FALSE;
+            for (j = 0;  j < 20;  j++)
+            {
+                nextbyte = hdlc_tx_get_bit(&tx);
+                hdlc_rx_put_bit(&rx, nextbyte);
+            }
+            if (ref_len)
+            {
+                frames_sent++;
+                bytes_sent += ref_len;
+            }
+            if (!frame_handled)
+            {
+                printf("Frame not received.\n");
+                printf("Tests failed.\n");
+                exit(2);
+            }
+            ref_len = cook_up_msg(buf);
+            hdlc_tx_frame(&tx, buf, ref_len);
+            frame_handled = FALSE;
+        }
+    }
+    end = rdtscll();
+    check_result();
+
+    /* Now try sending HDLC messages with CRC-32 */
+    printf("Testing with CRC-32 (byte by byte)\n");
+    frame_len_errors = 0;
+    frame_data_errors = 0;
+    hdlc_tx_init(&tx, TRUE, 1, FALSE, underflow_handler, NULL);
+    hdlc_rx_init(&rx, TRUE, FALSE, 1, frame_handler, NULL);
+    underflow_reported = FALSE;
+
+    start = rdtscll();
+    hdlc_tx_preamble(&tx, 40);
+    /* Don't push an initial message so we should get an underflow after the preamble. */
+    /* Lie for the first message, as there isn't really one */
+    frame_handled = TRUE;
+    frames_sent = 0;
+    bytes_sent = 0;
+    ref_len = 0;
+    for (i = 0;  i < 1000000;  i++)
+    {
+        nextbyte = hdlc_tx_get_byte(&tx);
+        hdlc_rx_put_byte(&rx, nextbyte);
+        if (underflow_reported)
+        {
+            underflow_reported = FALSE;
+            nextbyte = hdlc_tx_get_byte(&tx);
+            hdlc_rx_put_byte(&rx, nextbyte);
+            if (ref_len)
+            {
+                frames_sent++;
+                bytes_sent += ref_len;
+            }
+            if (!frame_handled)
+            {
+                printf("Frame not received.\n");
+                printf("Tests failed.\n");
+                exit(2);
+            }
+            ref_len = cook_up_msg(buf);
+            hdlc_tx_frame(&tx, buf, ref_len);
+            frame_handled = FALSE;
+        }
+    }
+    end = rdtscll();
+    check_result();
+
+    /* Now try progressive mode with CRC-16 */
+    printf("Testing progressive mode with CRC-16 (byte by byte)\n");
+    frame_len_errors = 0;
+    frame_data_errors = 0;
+    hdlc_tx_init(&tx, TRUE, 1, TRUE, underflow_handler, NULL);
+    hdlc_rx_init(&rx, TRUE, FALSE, 1, frame_handler, NULL);
+    underflow_reported = FALSE;
+
+    start = rdtscll();
+    hdlc_tx_preamble(&tx, 40);
+    /* Don't push an initial message so we should get an underflow after the preamble. */
+    /* Lie for the first message, as there isn't really one */
+    frame_handled = TRUE;
+    progress = 9999;
+    progress_delay = 9999;
+    frames_sent = 0;
+    bytes_sent = 0;
+    ref_len = 0;
+    for (i = 0;  i < 1000000;  i++)
+    {
+        nextbyte = hdlc_tx_get_byte(&tx);
+        hdlc_rx_put_byte(&rx, nextbyte);
+        if (underflow_reported)
+        {
+            underflow_reported = FALSE;
+            nextbyte = hdlc_tx_get_byte(&tx);
+            hdlc_rx_put_byte(&rx, nextbyte);
+            if (ref_len)
+            {
+                frames_sent++;
+                bytes_sent += ref_len;
+            }
+            if (!frame_handled)
+            {
+                printf("Frame not received.\n");
+                printf("Tests failed.\n");
+                exit(2);
+            }
+            ref_len = cook_up_msg(buf);
+            hdlc_tx_frame(&tx, buf, 10);
+            progress = 10;
+            progress_delay = 8;
+            frame_handled = FALSE;
+        }
+        if (progress < ref_len  &&  progress_delay-- <= 0)
+        {
+            if (hdlc_tx_frame(&tx, buf + progress, (progress + 10 <= ref_len)  ?  10  :  ref_len - progress) < 0)
+            {
+                printf("Failed to add progressively\n");
+                exit(2);
+            }
+            progress += 10;
+            progress_delay = 8;
+        }
+    }
+    end = rdtscll();
+    check_result();
+
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/ima_adpcm_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,214 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * ima_adpcm_tests.c - Test the IMA/DVI/Intel ADPCM encode and decode
+ *                     software.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: ima_adpcm_tests.c,v 1.22 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page ima_adpcm_tests_page IMA ADPCM tests
+\section ima_adpcm_tests_page_sec_1 What does it do?
+To perform a general audio quality test, ima_adpcm_tests should be run. The test file
+../localtests/short_nb_voice.wav will be compressed to the specified bit rate,
+decompressed, and the resulting audio stored in post_ima_adpcm.wav. A simple SNR test
+is automatically performed. Listening tests may be used for a more detailed evaluation
+of the degradation in quality caused by the compression.
+
+\section ima_adpcm_tests_page_sec_2 How is it used?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define IN_FILE_NAME    "../localtests/short_nb_voice.wav"
+#define OUT_FILE_NAME   "post_ima_adpcm.wav"
+
+#define HIST_LEN        1000
+
+int main(int argc, char *argv[])
+{
+    int i;
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int frames;
+    int dec_frames;
+    int outframes;
+    int ima_bytes;
+    float x;
+    double pre_energy;
+    double post_energy;
+    double diff_energy;
+    int16_t pre_amp[HIST_LEN];
+    int16_t post_amp[HIST_LEN];
+    uint8_t ima_data[HIST_LEN];
+    int16_t history[HIST_LEN];
+    int hist_in;
+    int hist_out;
+    ima_adpcm_state_t *ima_enc_state;
+    ima_adpcm_state_t *ima_dec_state;
+    int xx;
+    int vbr;
+    const char *in_file_name;
+
+    vbr = FALSE;
+    in_file_name = IN_FILE_NAME;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-v") == 0)
+        {
+            vbr = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-i") == 0)
+        {
+            in_file_name = argv[++i];
+            continue;
+        }
+        fprintf(stderr, "Unknown parameter %s specified.\n", argv[i]);
+        exit(2);
+    }
+
+    if ((inhandle = afOpenFile(in_file_name, "r", 0)) == AF_NULL_FILEHANDLE)
+    {
+        printf("    Cannot open wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+    if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+    {
+        printf("    Unexpected frame size in wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+    if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+    {
+        printf("    Unexpected sample rate in wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+    if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+    {
+        printf("    Unexpected number of channels in wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+    if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+
+    if ((ima_enc_state = ima_adpcm_init(NULL, (vbr)  ?  IMA_ADPCM_VDVI  :  IMA_ADPCM_DVI4)) == NULL)
+    {
+        fprintf(stderr, "    Cannot create encoder\n");
+        exit(2);
+    }
+        
+    if ((ima_dec_state = ima_adpcm_init(NULL, (vbr)  ?  IMA_ADPCM_VDVI  :  IMA_ADPCM_DVI4)) == NULL)
+    {
+        fprintf(stderr, "    Cannot create decoder\n");
+        exit(2);
+    }
+
+    hist_in = 0;
+    hist_out = 0;
+    pre_energy = 0.0;
+    post_energy = 0.0;
+    diff_energy = 0.0;
+    while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, pre_amp, 159)))
+    {
+        ima_bytes = ima_adpcm_encode(ima_enc_state, ima_data, pre_amp, frames);
+        dec_frames = ima_adpcm_decode(ima_dec_state, post_amp, ima_data, ima_bytes);
+        for (i = 0;  i < frames;  i++)
+        {
+            history[hist_in++] = pre_amp[i];
+            if (hist_in >= HIST_LEN)
+                hist_in = 0;
+            pre_energy += (double) pre_amp[i] * (double) pre_amp[i];
+        }
+        for (i = 0;  i < dec_frames;  i++)
+        {
+            post_energy += (double) post_amp[i] * (double) post_amp[i];
+            xx = post_amp[i] - history[hist_out++];
+            if (hist_out >= HIST_LEN)
+                hist_out = 0;
+            diff_energy += (double) xx * (double) xx;
+        }
+        outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, dec_frames);
+    }
+    if (afCloseFile(inhandle) != 0)
+    {
+        printf("    Cannot close wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+    if (afCloseFile(outhandle) != 0)
+    {
+        printf("    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    ima_adpcm_release(ima_enc_state);
+    ima_adpcm_release(ima_dec_state);
+
+    printf("Output energy is %f%% of input energy.\n", 100.0*post_energy/pre_energy);
+    printf("Residual energy is %f%% of the total.\n", 100.0*diff_energy/post_energy);
+    if (fabs(1.0 - post_energy/pre_energy) > 0.05
+        ||
+        fabs(diff_energy/post_energy) > 0.03)
+    {
+        printf("Tests failed.\n");
+        exit(2);
+    }
+    
+    printf("Tests passed.\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/ip_network_model.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,149 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * ip_network_model.c - Model an IP networks latency, jitter and loss.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: ip_network_model.c,v 1.4 2006/11/19 14:07:27 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <string.h>
+#include <time.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#define GEN_CONST
+#include <math.h>
+#endif
+
+#include "spandsp.h"
+
+#include "ip_network_model.h"
+
+#if !defined(NULL)
+#define NULL (void *) 0
+#endif
+
+void ip_network_model_send(ip_network_model_state_t *s,
+                            int seq_no,
+                            int count,
+                            const uint8_t *buf,
+                            int len)
+{
+    int delay[2];
+    int i;
+
+    for (i = 0;  i < count;  i++)
+    {
+        if (rand()%1000000 >= s->packet_loss)
+        {
+            delay[0] = s->current_samples + s->bulk_delay + (rand()%s->jitter);
+            delay[1] = seq_no;
+            queue_write_msg(&s->packet_queue, (uint8_t *) delay, sizeof(delay));
+            queue_write_msg(&s->packet_queue, buf, len);
+        }
+        else
+        {
+            fprintf(stderr, "Dropping packet - seq %d\n", seq_no);
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int ip_network_model_get(ip_network_model_state_t *s,
+                          int time_step,
+                          uint8_t *msg,
+                          int max_len,
+                          int *seq_no)
+{
+    int len;
+
+    s->current_samples += time_step;
+
+    if (s->delay[0] < 0)
+    {
+        /* Wait for a new packet */
+        if (queue_empty(&s->packet_queue))
+            return -1;
+        len = queue_read_msg(&s->packet_queue, (uint8_t *) s->delay, sizeof(s->delay));
+        if (len != sizeof(s->delay))
+            return -1;
+    }
+    *seq_no = s->delay[1];
+    /* Wait for the appropriate time */
+    if (s->delay[0] > s->current_samples)
+        return -1;
+    /* Wait for a message */
+    if (queue_empty(&s->packet_queue))
+        return -1;
+    s->delay[0] = -1;
+    s->delay[1] = -1;
+    len = queue_read_msg(&s->packet_queue, msg, max_len);
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+ip_network_model_state_t *ip_network_model_init(int bulk_delay,
+                                                int jitter,
+                                                int loss)
+{
+    ip_network_model_state_t *s;
+
+    if ((s = (ip_network_model_state_t *) malloc(sizeof(*s))) == NULL)
+        return NULL;
+    memset(s, 0, sizeof(*s));
+
+    s->bulk_delay = bulk_delay;
+    s->jitter = jitter;
+    s->packet_loss = loss;
+
+    s->delay[0] = -1;
+    s->delay[1] = -1;
+    
+    if (queue_create(&s->packet_queue, 32768, QUEUE_WRITE_ATOMIC | QUEUE_READ_ATOMIC) < 0)
+    {
+        free(s);
+        return NULL;
+    }
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int ip_network_model_release(ip_network_model_state_t *s)
+{
+    queue_delete(&s->packet_queue);
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/ip_network_model.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,87 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * ip_network_model.h - Model an IP networks latency, jitter and loss.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: ip_network_model.h,v 1.4 2006/10/24 13:45:29 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page ip_network_model_page IP network path model
+\section ip_network_model_page_sec_1 What does it do?
+The IP network modelling module provides simple modelling of latency, jitter
+and packet loss for a IP network media streaming path.
+
+Right now this is extremely crude. It needs to be extended to better represent
+the behaviour of UDP packets for RTP, UDPTL, and other streaming purposes.
+*/
+
+#if !defined(_IP_NETWORK_MODEL_H_)
+#define _IP_NETWORK_MODEL_H_
+
+/*!
+    IP network model descriptor. This holds the complete state of
+    an IP network path model.
+*/
+typedef struct
+{
+    /*! The bulk delay of the path, in samples */
+    int bulk_delay;
+    /*! Jitter */
+    int jitter;
+    /*! Packet loss, in parts per million */
+    int packet_loss;
+
+    queue_t packet_queue;
+    int current_samples;
+    int delay[2];
+} ip_network_model_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void ip_network_model_send(ip_network_model_state_t *s,
+                            int seq_no,
+                            int count,
+                            const uint8_t *buf,
+                            int len);
+
+int ip_network_model_get(ip_network_model_state_t *s,
+                         int time_step,
+                         uint8_t *msg,
+                         int max_len,
+                         int *seq_no);
+
+ip_network_model_state_t *ip_network_model_init(int bulk_delay,
+                                                int jitter,
+                                                int loss);
+
+int ip_network_model_release(ip_network_model_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/line_model.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,512 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * line_model.c - Model a telephone line.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: line_model.c,v 1.21 2006/11/19 14:07:27 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <string.h>
+#include <time.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#define GEN_CONST
+#include <math.h>
+#endif
+
+#include "spandsp.h"
+#include "spandsp/g168models.h"
+
+#include "test_utils.h"
+#include "line_model.h"
+#include "line_models.h"
+
+#if !defined(NULL)
+#define NULL (void *) 0
+#endif
+
+float null_line_model[] =
+{
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        0.0,
+        1.0
+};
+
+static float *models[] =
+{
+    null_line_model,        /* 0 */
+    proakis_line_model,
+    ad_1_edd_1_model,
+    ad_1_edd_2_model,
+    ad_1_edd_3_model,
+    ad_5_edd_1_model,       /* 5 */
+    ad_5_edd_2_model,
+    ad_5_edd_3_model,
+    ad_6_edd_1_model,
+    ad_6_edd_2_model,
+    ad_6_edd_3_model,       /* 10 */
+    ad_7_edd_1_model,
+    ad_7_edd_2_model,
+    ad_7_edd_3_model,
+    ad_8_edd_1_model,
+    ad_8_edd_2_model,       /* 15 */
+    ad_8_edd_3_model,
+    ad_9_edd_1_model,
+    ad_9_edd_2_model,
+    ad_9_edd_3_model
+};
+
+static float calc_near_line_filter(one_way_line_model_state_t *s, float v)
+{
+    float sum;
+    int j;
+    int p;
+
+    /* Add the sample in the filter buffer */
+    p = s->near_buf_ptr;
+    s->near_buf[p] = v;
+    if (++p == s->near_filter_len)
+        p = 0;
+    s->near_buf_ptr = p;
+    
+    /* Apply the filter */
+    sum = 0;
+    for (j = 0;  j < s->near_filter_len;  j++)
+    {
+        sum += s->near_filter[j]*s->near_buf[p];
+        if (++p >= s->near_filter_len)
+            p = 0;
+    }
+    
+    /* Add noise */
+    sum += awgn(&s->near_noise);
+    
+    return sum;
+}
+/*- End of function --------------------------------------------------------*/
+
+static float calc_far_line_filter(one_way_line_model_state_t *s, float v)
+{
+    float sum;
+    int j;
+    int p;
+
+    /* Add the sample in the filter buffer */
+    p = s->far_buf_ptr;
+    s->far_buf[p] = v;
+    if (++p == s->far_filter_len)
+        p = 0;
+    s->far_buf_ptr = p;
+    
+    /* Apply the filter */
+    sum = 0;
+    for (j = 0;  j < s->far_filter_len;  j++)
+    {
+        sum += s->far_filter[j]*s->far_buf[p];
+        if (++p >= s->far_filter_len)
+            p = 0;
+    }
+    
+    /* Add noise */
+    sum += awgn(&s->far_noise);
+
+    return sum;
+}
+/*- End of function --------------------------------------------------------*/
+
+void one_way_line_model(one_way_line_model_state_t *s, 
+                        int16_t *output,
+                        const int16_t *input,
+                        int samples)
+{
+    int i;
+    float in;
+    float out;
+    float out1;
+    int16_t amp[1];
+
+    /* The path being modelled is:
+        terminal
+          | < hybrid
+          |
+          | < noise and filtering
+          |
+          | < hybrid
+         CO
+          |
+          | < A-law distortion + bulk delay
+          |
+         CO
+          | < hybrid
+          |
+          | < noise and filtering
+          |
+          | < hybrid
+        terminal
+     */
+    for (i = 0;  i < samples;  i++)
+    {
+        in = input[i];
+
+        /* Near end analogue section */
+        
+        /* Line model filters & noise */
+        out = calc_near_line_filter(s, in);
+    
+        /* Long distance digital section */
+
+        amp[0] = out;
+        codec_munge(s->munge, amp, 1);
+        out = amp[0];
+        /* Introduce the bulk delay of the long distance link. */
+        out1 = s->bulk_delay_buf[s->bulk_delay_ptr];
+        s->bulk_delay_buf[s->bulk_delay_ptr] = out;
+        out = out1;
+        if (++s->bulk_delay_ptr >= s->bulk_delay)
+            s->bulk_delay_ptr = 0;
+
+        /* Far end analogue section */
+        
+        /* Line model filters & noise */
+        out = calc_far_line_filter(s, out);
+    
+        output[i] = out;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+void both_ways_line_model(both_ways_line_model_state_t *s, 
+                          int16_t *output1,
+                          const int16_t *input1,
+                          int16_t *output2,
+                          const int16_t *input2,
+                          int samples)
+{
+    int i;
+    float in1;
+    float in2;
+    float out1;
+    float out2;
+    float tmp1;
+    float tmp2;
+    int16_t amp[1];
+
+    /* The path being modelled is:
+        terminal
+          | < hybrid echo
+          |
+          | < noise and filtering
+          |
+          | < hybrid echo
+         CO
+          |
+          | < A-law distortion + bulk delay
+          |
+         CO
+          | < hybrid echo
+          |
+          | < noise and filtering
+          |
+          | < hybrid echo
+        terminal
+     */
+    for (i = 0;  i < samples;  i++)
+    {
+        in1 = input1[i];
+        in2 = input2[i];
+
+        /* Near end analogue sections */
+        /* Echo from each terminal's CO hybrid */
+        tmp1 = in1 + s->fout2*s->line1.near_co_hybrid_echo;
+        tmp2 = in2 + s->fout1*s->line2.near_co_hybrid_echo;
+
+        /* Line model filters & noise */
+        s->fout1 = calc_near_line_filter(&s->line1, tmp1);
+        s->fout2 = calc_near_line_filter(&s->line2, tmp2);
+
+        /* Long distance digital section */
+
+        /* Introduce distortion due to A-law or u-law munging. */
+        amp[0] = s->fout1;
+        codec_munge(s->line1.munge, amp, 1);
+        s->fout1 = amp[0];
+
+        amp[0] = s->fout2;
+        codec_munge(s->line2.munge, amp, 1);
+        s->fout2 = amp[0];
+
+        /* Introduce the bulk delay of the long distance digital link. */
+        out1 = s->line1.bulk_delay_buf[s->line1.bulk_delay_ptr];
+        s->line1.bulk_delay_buf[s->line1.bulk_delay_ptr] = s->fout1;
+        s->fout1 = out1;
+        if (++s->line1.bulk_delay_ptr >= s->line1.bulk_delay)
+            s->line1.bulk_delay_ptr = 0;
+
+        out2 = s->line2.bulk_delay_buf[s->line2.bulk_delay_ptr];
+        s->line2.bulk_delay_buf[s->line2.bulk_delay_ptr] = s->fout2;
+        s->fout2 = out2;
+        if (++s->line2.bulk_delay_ptr >= s->line2.bulk_delay)
+            s->line2.bulk_delay_ptr = 0;
+
+        /* Far end analogue sections */
+
+        /* Echo from each terminal's own hybrid */
+        out1 += in2*s->line1.far_cpe_hybrid_echo;
+        out2 += in1*s->line2.far_cpe_hybrid_echo;
+
+        /* Line model filters & noise */
+        out1 = calc_far_line_filter(&s->line1, out1);
+        out2 = calc_far_line_filter(&s->line2, out2);
+
+        output1[i] = fsaturate(out1);
+        output2[i] = fsaturate(out2);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+one_way_line_model_state_t *one_way_line_model_init(int model, float noise, int codec)
+{
+    one_way_line_model_state_t *s;
+
+    if ((s = (one_way_line_model_state_t *) malloc(sizeof(*s))) == NULL)
+        return NULL;
+    memset(s, 0, sizeof(*s));
+
+    s->bulk_delay = 8;
+    s->bulk_delay_ptr = 0;
+
+    s->munge = codec_munge_init(codec);
+
+    s->near_filter = models[model];
+    s->near_filter_len = 129;
+
+    s->far_filter = models[model];
+    s->far_filter_len = 129;
+
+    awgn_init_dbm0(&s->near_noise, 1234567, noise);
+    awgn_init_dbm0(&s->far_noise, 1234567, noise);
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int one_way_line_model_release(one_way_line_model_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+both_ways_line_model_state_t *both_ways_line_model_init(int model1,
+                                                        float noise1,
+                                                        int model2,
+                                                        float noise2,
+                                                        int codec)
+{
+    float echo_level;
+    both_ways_line_model_state_t *s;
+
+    if ((s = (both_ways_line_model_state_t *) malloc(sizeof(*s))) == NULL)
+        return NULL;
+    memset(s, 0, sizeof(*s));
+
+    s->line1.munge = codec_munge_init(codec);
+    s->line2.munge = codec_munge_init(codec);
+
+    s->line1.bulk_delay = 8;
+    s->line2.bulk_delay = 8;
+
+    s->line1.bulk_delay_ptr = 0;
+    s->line2.bulk_delay_ptr = 0;
+
+    s->line1.near_filter = models[model1];
+    s->line1.near_filter_len = 129;
+    s->line2.near_filter = models[model2];
+    s->line2.near_filter_len = 129;
+
+    s->line1.far_filter = models[model1];
+    s->line1.far_filter_len = 129;
+    s->line2.far_filter = models[model2];
+    s->line2.far_filter_len = 129;
+
+    awgn_init_dbm0(&s->line1.near_noise, 1234567, noise1);
+    awgn_init_dbm0(&s->line2.near_noise, 7654321, noise2);
+
+    awgn_init_dbm0(&s->line1.far_noise, 1234567, noise1);
+    awgn_init_dbm0(&s->line2.far_noise, 7654321, noise2);
+
+    /* Echos */
+    echo_level = -15; /* in dB */
+    s->line1.near_co_hybrid_echo = pow(10, echo_level/20.0);
+    s->line2.near_co_hybrid_echo = pow(10, echo_level/20.0);
+    s->line1.near_cpe_hybrid_echo = pow(10, echo_level/20.0);
+    s->line2.near_cpe_hybrid_echo = pow(10, echo_level/20.0);
+    
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+int both_ways_line_model_release(both_ways_line_model_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/line_model.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,154 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * line_model.h - Model a telephone line.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: line_model.h,v 1.12 2006/10/24 13:45:29 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page line_model_page Telephone line model
+\section line_model_page_sec_1 What does it do?
+The telephone line modelling module provides simple modelling of one way and two
+way telephone lines.
+
+The path being modelled is:
+
+    -    terminal
+    -      | < hybrid echo (2-way models)
+    -      |
+    -      | < noise and filtering
+    -      |
+    -      | < hybrid echo (2-way models)
+    -     CO
+    -      |
+    -      | < A-law distortion + bulk delay
+    -      |
+    -     CO
+    -      | < hybrid echo (2-way models)
+    -      |
+    -      | < noise and filtering
+    -      |
+    -      | < hybrid echo (2-way models)
+    -    terminal
+*/
+
+#if !defined(_LINE_MODEL_H_)
+#define _LINE_MODEL_H_
+
+#define LINE_FILTER_SIZE 129
+
+/*!
+    One way line model descriptor. This holds the complete state of
+    a line model with transmission in only one direction.
+*/
+typedef struct
+{
+    codec_munge_state_t *munge;
+
+    /*! The coefficients for the near end analogue section simulation filter */
+    float *near_filter;
+    /*! The number of coefficients for the near end analogue section simulation filter */
+    int near_filter_len;
+    /*! Last transmitted samples (ring buffer, used by the line filter) */
+    float near_buf[LINE_FILTER_SIZE];
+    /*! Pointer of the last transmitted sample in buf */
+    int near_buf_ptr;
+    /*! The noise source for local analogue section of the line */
+    awgn_state_t near_noise;
+
+    /*! The bulk delay of the path, in samples */
+    int bulk_delay;
+    /*! A pointer to the current write position in the bulk delay store. */
+    int bulk_delay_ptr;
+    /*! The data store for simulating the bulk delay */
+    int16_t bulk_delay_buf[8000];
+
+    /*! The coefficients for the far end analogue section simulation filter */
+    float *far_filter;
+    /*! The number of coefficients for the far end analogue section simulation filter */
+    int far_filter_len;
+    /*! Last transmitted samples (ring buffer, used by the line filter) */
+    float far_buf[LINE_FILTER_SIZE];
+    /*! Pointer of the last transmitted sample in buf */
+    int far_buf_ptr;
+    /*! The noise source for distant analogue section of the line */
+    awgn_state_t far_noise;
+
+    /*! The scaling factor for the local CPE hybrid echo */
+    float near_cpe_hybrid_echo;
+    /*! The scaling factor for the local CO hybrid echo */
+    float near_co_hybrid_echo;
+
+    /*! The scaling factor for the far CPE hybrid echo */
+    float far_cpe_hybrid_echo;
+    /*! The scaling factor for the far CO hybrid echo */
+    float far_co_hybrid_echo;
+} one_way_line_model_state_t;
+
+/*!
+    Two way line model descriptor. This holds the complete state of
+    a line model with transmission in both directions.
+*/
+typedef struct
+{
+    one_way_line_model_state_t line1;
+    one_way_line_model_state_t line2;
+    float fout1;
+    float fout2; 
+} both_ways_line_model_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void both_ways_line_model(both_ways_line_model_state_t *s, 
+                          int16_t *output1,
+                          const int16_t *input1,
+                          int16_t *output2,
+                          const int16_t *input2,
+                          int samples);
+
+both_ways_line_model_state_t *both_ways_line_model_init(int model1,
+                                                        float noise1,
+                                                        int model2,
+                                                        float noise2,
+                                                        int codec);
+
+int both_ways_line_model_release(both_ways_line_model_state_t *s);
+
+void one_way_line_model(one_way_line_model_state_t *s, 
+                        int16_t *output,
+                        const int16_t *input,
+                        int samples);
+
+one_way_line_model_state_t *one_way_line_model_init(int model, float noise, int codec);
+
+int one_way_line_model_release(one_way_line_model_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/line_model_monitor.cpp	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,450 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * line_model_monitor.cpp - Model activity in a telephone line model, using the FLTK toolkit.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: line_model_monitor.cpp,v 1.2 2006/10/24 13:22:03 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(HAVE_FL_FL_H)  &&  defined(HAVE_FL_FL_CARTESIAN_H)
+
+#include <inttypes.h>
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/select.h>
+#if defined(HAVE_FFTW3_H)
+#include <fftw3.h>
+#else
+#include <fftw.h>
+#endif
+
+#include <FL/Fl.H>
+#include <FL/Fl_Overlay_Window.H>
+#include <FL/Fl_Light_Button.H>
+#include <Fl/Fl_Cartesian.H>
+#include <Fl/Fl_Audio_Meter.H>
+#include <FL/fl_draw.H>
+
+#include "../src/spandsp/complex.h"
+//#include "spandsp.h"
+#include "line_model_monitor.h"
+
+Fl_Double_Window *w;
+
+Fl_Audio_Meter *audio_meter;
+
+Fl_Group *c_spec;
+Fl_Group *c_right;
+Fl_Group *c_can;
+Fl_Group *c_line_model;
+
+Ca_Canvas *canvas_spec;
+Ca_X_Axis *spec_freq;
+Ca_Y_Axis *spec_amp;
+Ca_Line *spec_re = NULL;
+double spec_re_plot[2*512];
+
+Ca_Canvas *canvas_can;
+Ca_X_Axis *can_x;
+Ca_Y_Axis *can_y;
+Ca_Line *can_re = NULL;
+double can_re_plot[512];
+
+Ca_Canvas *canvas_line_model;
+Ca_X_Axis *line_model_x;
+Ca_Y_Axis *line_model_y;
+Ca_Line *line_model_re = NULL;
+double line_model_re_plot[512];
+
+static int skip = 0;
+
+int in_ptr;
+#if defined(HAVE_FFTW3_H)
+double in[1024][2];
+double out[1024][2];
+#else
+fftw_complex in[1024];
+fftw_complex out[1024];
+#endif
+fftw_plan p;
+
+int line_model_monitor_can_update(const float *coeffs, int len)
+{
+    int i;
+    float min;
+    float max;
+
+    if (can_re)
+        delete can_re;
+
+    canvas_can->current(canvas_can);
+    i = 0;
+    min = coeffs[i];
+    max = coeffs[i];
+    for (i = 0;  i < len;  i++)
+    {
+        can_re_plot[2*i] = i;
+        can_re_plot[2*i + 1] = coeffs[i];
+        if (min > coeffs[i])
+            min = coeffs[i];
+        if (max < coeffs[i])
+            max = coeffs[i];
+    }
+    can_y->maximum((max == min)  ?  max + 0.2  :  max);
+    can_y->minimum(min);
+    can_re = new Ca_Line(len, can_re_plot, 0, 0, FL_BLUE, CA_NO_POINT);
+    if (++skip >= 100)
+    {
+        skip = 0;
+        Fl::check();
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int line_model_monitor_line_model_update(const float *coeffs, int len)
+{
+    int i;
+    float min;
+    float max;
+
+    if (line_model_re)
+        delete line_model_re;
+
+    canvas_line_model->current(canvas_line_model);
+    i = 0;
+    min = coeffs[i];
+    max = coeffs[i];
+    for (i = 0;  i < len;  i++)
+    {
+        line_model_re_plot[2*i] = i;
+        line_model_re_plot[2*i + 1] = coeffs[i];
+        if (min > coeffs[i])
+            min = coeffs[i];
+        if (max < coeffs[i])
+            max = coeffs[i];
+    }
+    line_model_y->maximum((max == min)  ?  max + 0.2  :  max);
+    line_model_y->minimum(min);
+    line_model_re = new Ca_Line(len, line_model_re_plot, 0, 0, FL_BLUE, CA_NO_POINT);
+    if (++skip >= 100)
+    {
+        skip = 0;
+        Fl::check();
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int line_model_monitor_line_spectrum_update(const int16_t amp[], int len)
+{
+    int i;
+    int x;
+
+    for (i = 0;  i < len;  i++)
+        audio_meter->sample(amp[i]/32768.0);
+
+    if (in_ptr + len < 512)
+    {
+        /* Just add this fragment to the buffer. */
+        for (i = 0;  i < len;  i++)
+#if defined(HAVE_FFTW3_H)
+            in[in_ptr + i][0] = amp[i];
+#else
+            in[in_ptr + i].re = amp[i];
+#endif
+        in_ptr += len;
+        return 0;
+    }
+    if (len >= 512)
+    {
+        /* We have enough for a whole block. Use the last 512 samples
+           we have. */
+        x = len - 512;
+        for (i = 0;  i < 512;  i++)
+#if defined(HAVE_FFTW3_H)
+            in[i][0] = amp[x + i];
+#else
+            in[i].re = amp[x + i];
+#endif
+    }
+    else
+    {
+        /* We want the last 512 samples. */
+        x = 512 - len;
+        for (i = 0;  i < x;  i++)
+#if defined(HAVE_FFTW3_H)
+            in[i][0] = in[in_ptr - x + i][0];
+#else
+            in[i].re = in[in_ptr - x + i].re;
+#endif
+        for (i = x;  i < 512;  i++)
+#if defined(HAVE_FFTW3_H)
+            in[i][0] = amp[i - x];
+#else
+            in[i].re = amp[i - x];
+#endif
+    }
+    in_ptr = 0;
+#if defined(HAVE_FFTW3_H)    
+    fftw_execute(p);
+#else
+    fftw_one(p, in, out);
+#endif
+    if (spec_re)
+        delete spec_re;
+    canvas_spec->current(canvas_spec);
+    for (i = 0;  i < 512;  i++)
+    {
+        spec_re_plot[2*i] = i*4000.0/512.0;
+#if defined(HAVE_FFTW3_H)    
+        spec_re_plot[2*i + 1] = 20.0*log10(sqrt(out[i][0]*out[i][0] + out[i][1]*out[i][1])/(256.0*32768)) + 3.14;
+#else
+        spec_re_plot[2*i + 1] = 20.0*log10(sqrt(out[i].re*out[i].re + out[i].im*out[i].im)/(256.0*32768)) + 3.14;
+#endif
+    }
+    spec_re = new Ca_Line(512, spec_re_plot, 0, 0, FL_BLUE, CA_NO_POINT);
+    Fl::check();
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int start_line_model_monitor(int len)
+{
+    char buf[132 + 1];
+    float x;
+    float y;
+    int i;
+
+    w = new Fl_Double_Window(850, 400, "Telephone line model monitor");
+
+    c_spec = new Fl_Group(0, 0, 380, 400);
+    c_spec->box(FL_DOWN_BOX);
+    c_spec->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
+
+    canvas_spec = new Ca_Canvas(60, 30, 300, 300, "Spectrum");
+    canvas_spec->box(FL_PLASTIC_DOWN_BOX);
+    canvas_spec->color(7);
+    canvas_spec->align(FL_ALIGN_TOP);
+    canvas_spec->border(15);
+
+    spec_freq = new Ca_X_Axis(65, 330, 290, 30, "Freq (Hz)");
+    spec_freq->align(FL_ALIGN_BOTTOM);
+    spec_freq->minimum(0);
+    spec_freq->maximum(4000);
+    spec_freq->label_format("%g");
+    spec_freq->minor_grid_color(fl_gray_ramp(20));
+    spec_freq->major_grid_color(fl_gray_ramp(15));
+    spec_freq->label_grid_color(fl_gray_ramp(10));
+    spec_freq->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    spec_freq->minor_grid_style(FL_DOT);
+    spec_freq->major_step(5);
+    spec_freq->label_step(1);
+    spec_freq->axis_color(FL_BLACK);
+    spec_freq->axis_align(CA_BOTTOM | CA_LINE);
+
+    spec_amp = new Ca_Y_Axis(20, 35, 40, 290, "Amp (dBmO)");
+    spec_amp->align(FL_ALIGN_LEFT);
+    spec_amp->minimum(-80.0);
+    spec_amp->maximum(10.0);
+    spec_amp->minor_grid_color(fl_gray_ramp(20));
+    spec_amp->major_grid_color(fl_gray_ramp(15));
+    spec_amp->label_grid_color(fl_gray_ramp(10));
+    //spec_amp->grid_visible(CA_MINOR_TICK | CA_MAJOR_TICK | CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    spec_amp->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    spec_amp->minor_grid_style(FL_DOT);
+    spec_amp->major_step(5);
+    spec_amp->label_step(1);
+    spec_amp->axis_color(FL_BLACK);
+
+    spec_amp->current();
+
+    c_spec->end();
+
+    c_right = new Fl_Group(440, 0, 465, 405);
+
+    c_can = new Fl_Group(380, 0, 415, 200);
+    c_can->box(FL_DOWN_BOX);
+    c_can->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
+    c_can->current();
+
+    canvas_can = new Ca_Canvas(460, 35, 300, 100, "??? coefficients");
+    canvas_can->box(FL_PLASTIC_DOWN_BOX);
+    canvas_can->color(7);
+    canvas_can->align(FL_ALIGN_TOP);
+    Fl_Group::current()->resizable(canvas_can);
+    canvas_can->border(15);
+
+    can_x = new Ca_X_Axis(465, 135, 290, 30, "Tap");
+    can_x->align(FL_ALIGN_BOTTOM);
+    can_x->minimum(0.0);
+    can_x->maximum((float) len);
+    can_x->label_format("%g");
+    can_x->minor_grid_color(fl_gray_ramp(20));
+    can_x->major_grid_color(fl_gray_ramp(15));
+    can_x->label_grid_color(fl_gray_ramp(10));
+    can_x->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    can_x->minor_grid_style(FL_DOT);
+    can_x->major_step(5);
+    can_x->label_step(1);
+    can_x->axis_align(CA_BOTTOM | CA_LINE);
+    can_x->axis_color(FL_BLACK);
+    can_x->current();
+
+    can_y = new Ca_Y_Axis(420, 40, 40, 90, "Amp");
+    can_y->align(FL_ALIGN_LEFT);
+    can_y->minimum(-0.1);
+    can_y->maximum(0.1);
+    can_y->minor_grid_color(fl_gray_ramp(20));
+    can_y->major_grid_color(fl_gray_ramp(15));
+    can_y->label_grid_color(fl_gray_ramp(10));
+    can_y->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    can_y->minor_grid_style(FL_DOT);
+    can_y->major_step(5);
+    can_y->label_step(1);
+    can_y->axis_color(FL_BLACK);
+    can_y->current();
+
+    c_can->end();
+
+    c_line_model = new Fl_Group(380, 200, 415, 200);
+    c_line_model->box(FL_DOWN_BOX);
+    c_line_model->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
+    c_line_model->current();
+
+    canvas_line_model = new Ca_Canvas(460, 235, 300, 100, "Line impulse response model");
+    canvas_line_model->box(FL_PLASTIC_DOWN_BOX);
+    canvas_line_model->color(7);
+    canvas_line_model->align(FL_ALIGN_TOP);
+    Fl_Group::current()->resizable(canvas_line_model);
+    canvas_line_model->border(15);
+
+    line_model_x = new Ca_X_Axis(465, 335, 290, 30, "Tap");
+    line_model_x->align(FL_ALIGN_BOTTOM);
+    line_model_x->minimum(0.0);
+    line_model_x->maximum((float) len);
+    line_model_x->label_format("%g");
+    line_model_x->minor_grid_color(fl_gray_ramp(20));
+    line_model_x->major_grid_color(fl_gray_ramp(15));
+    line_model_x->label_grid_color(fl_gray_ramp(10));
+    line_model_x->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    line_model_x->minor_grid_style(FL_DOT);
+    line_model_x->major_step(5);
+    line_model_x->label_step(1);
+    line_model_x->axis_align(CA_BOTTOM | CA_LINE);
+    line_model_x->axis_color(FL_BLACK);
+    line_model_x->current();
+
+    line_model_y = new Ca_Y_Axis(420, 240, 40, 90, "Amp");
+    line_model_y->align(FL_ALIGN_LEFT);
+    line_model_y->minimum(-0.1);
+    line_model_y->maximum(0.1);
+    line_model_y->minor_grid_color(fl_gray_ramp(20));
+    line_model_y->major_grid_color(fl_gray_ramp(15));
+    line_model_y->label_grid_color(fl_gray_ramp(10));
+    line_model_y->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    line_model_y->minor_grid_style(FL_DOT);
+    line_model_y->major_step(5);
+    line_model_y->label_step(1);
+    line_model_y->axis_color(FL_BLACK);
+    line_model_y->current();
+
+    c_line_model->end();
+
+    audio_meter = new Fl_Audio_Meter(810, 40, 10, 250, "");
+    audio_meter->box(FL_PLASTIC_UP_BOX);
+    audio_meter->type(FL_VERT_AUDIO_METER);
+
+    c_right->end();
+
+    Fl_Group::current()->resizable(c_right);
+    w->end();
+    w->show();
+
+#if defined(HAVE_FFTW3_H)    
+    p = fftw_plan_dft_1d(1024, in, out, FFTW_BACKWARD, FFTW_ESTIMATE);
+    for (i = 0;  i < 1024;  i++)
+    {
+        in[i][0] = 0.0;
+        in[i][1] = 0.0;
+    }
+#else
+    p = fftw_create_plan(1024, FFTW_BACKWARD, FFTW_ESTIMATE);
+    for (i = 0;  i < 1024;  i++)
+    {
+        in[i].re = 0.0;
+        in[i].im = 0.0;
+    }
+#endif
+    in_ptr = 0;
+
+    Fl::check();
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void line_model_monitor_wait_to_end(void) 
+{
+    fd_set rfds;
+    int res;
+    struct timeval tv;
+
+    fprintf(stderr, "Processing complete.  Press the <enter> key to end\n");
+    do
+    {
+        usleep(100000);
+        Fl::check();
+        FD_ZERO(&rfds);
+        FD_SET(0, &rfds);
+        tv.tv_usec = 100000;
+        tv.tv_sec = 0;
+        res = select(1, &rfds, NULL, NULL, &tv);
+    }
+    while (res <= 0);
+}
+/*- End of function --------------------------------------------------------*/
+
+void line_model_monitor_update_display(void) 
+{
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+    Fl::check();
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/line_model_monitor.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,61 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * line_model_monitor.h - Model activity in a telephone line model, using the FLTK toolkit.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: line_model_monitor.h,v 1.2 2006/10/24 13:22:03 steveu Exp $
+ */
+
+/*! \page line_model_monitor_page Telephone line model monitoring
+\section line_model_monitor_page_sec_1 What does it do?
+This code controls a GUI window, which provides monitoring of the internal status
+of a telephone line modem. It shows, graphically:
+
+    - the spectrum of the received signal.
+    - the line model in use (when a known line model is being used).
+    - the adapted coefficients of the canceller.
+
+\section line_model_monitor_page_sec_2 How does it work?
+This code uses the FLTK cross platform GUI toolkit. It works on X11 and Windows platforms.
+In addition to the basic FLTK toolkit, fltk_cartesian is also required.
+*/
+
+#if !defined(_LINE_MODEL_MONITOR_H_)
+#define _LINE_MODEL_MONITOR_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    int start_line_model_monitor(int len);
+    int line_model_monitor_can_update(const float *coeffs, int len);
+    int line_model_monitor_line_model_update(const float *coeffs, int len);
+    int line_model_monitor_line_spectrum_update(const int16_t amp[], int len);
+    void line_model_monitor_wait_to_end(void);
+    void line_model_monitor_update_display(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/line_model_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,303 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * line_model_tests.c - Tests for the telephone line model.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: line_model_tests.c,v 1.15 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page line_model_tests_page Telephony line model tests
+\section line_model_tests_page_sec_1 What does it do?
+???.
+
+\section line_model_tests_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <string.h>
+#include <time.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#define GEN_CONST
+#include <math.h>
+#endif
+
+#include "spandsp.h"
+#include "test_utils.h"
+#include "line_model.h"
+
+#if !defined(NULL)
+#define NULL (void *) 0
+#endif
+
+#define BLOCK_LEN       160
+
+#define IN_FILE_NAME1   "line_model_test_in1.wav"
+#define IN_FILE_NAME2   "line_model_test_in2.wav"
+#define OUT_FILE_NAME1  "line_model_one_way_test_out.wav"
+#define OUT_FILE_NAME   "line_model_test_out.wav"
+
+static void test_one_way_model(int line_model_no, int speech_test)
+{
+    one_way_line_model_state_t *model;
+    int16_t input1[BLOCK_LEN];
+    int16_t output1[BLOCK_LEN];
+    int16_t amp[2*BLOCK_LEN];
+    AFfilehandle inhandle1;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int samples;
+    int i;
+    int j;
+    awgn_state_t noise1;
+    
+    if ((model = one_way_line_model_init(line_model_no, -50, MUNGE_CODEC_ALAW)) == NULL)
+    {
+        fprintf(stderr, "    Failed to create line model\n");
+        exit(2);
+    }
+    
+    awgn_init_dbm0(&noise1, 1234567, -10.0f);
+
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    if ((inhandle1 = afOpenFile(IN_FILE_NAME1, "r", NULL)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", IN_FILE_NAME1);
+        exit(2);
+    }
+    if ((outhandle = afOpenFile(OUT_FILE_NAME1, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME1);
+        exit(2);
+    }
+    for (i = 0;  i < 10000;  i++)
+    {
+        if (speech_test)
+        {
+            samples = afReadFrames(inhandle1,
+                                   AF_DEFAULT_TRACK,
+                                   input1,
+                                   BLOCK_LEN);
+            if (samples == 0)
+                break;
+        }
+        else
+        {
+            for (j = 0;  j < BLOCK_LEN;  j++)
+                input1[j] = awgn(&noise1);
+            samples = BLOCK_LEN;
+        }
+        for (j = 0;  j < samples;  j++)
+        {
+            one_way_line_model(model, 
+                               &output1[j],
+                               &input1[j],
+                               1);
+            amp[j] = output1[j];
+        }
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  samples);
+        if (outframes != samples)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+    if (afCloseFile(inhandle1))
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", IN_FILE_NAME1);
+        exit(2);
+    }
+    if (afCloseFile(outhandle))
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME1);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    one_way_line_model_release(model);
+}
+
+static void test_both_ways_model(int line_model_no, int speech_test)
+{
+    both_ways_line_model_state_t *model;
+    int16_t input1[BLOCK_LEN];
+    int16_t input2[BLOCK_LEN];
+    int16_t output1[BLOCK_LEN];
+    int16_t output2[BLOCK_LEN];
+    int16_t amp[2*BLOCK_LEN];
+    AFfilehandle inhandle1;
+    AFfilehandle inhandle2;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int samples;
+    int i;
+    int j;
+    awgn_state_t noise1;
+    awgn_state_t noise2;
+    
+    if ((model = both_ways_line_model_init(line_model_no, -50, line_model_no + 1, -35, MUNGE_CODEC_ALAW)) == NULL)
+    {
+        fprintf(stderr, "    Failed to create line model\n");
+        exit(2);
+    }
+    
+    awgn_init_dbm0(&noise1, 1234567, -10.0f);
+    awgn_init_dbm0(&noise2, 1234567, -10.0f);
+
+    filesetup = afNewFileSetup();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+
+    inhandle1 = afOpenFile(IN_FILE_NAME1, "r", NULL);
+    if (inhandle1 == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", IN_FILE_NAME1);
+        exit(2);
+    }
+    inhandle2 = afOpenFile(IN_FILE_NAME2, "r", NULL);
+    if (inhandle2 == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", IN_FILE_NAME2);
+        exit(2);
+    }
+    outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup);
+    if (outhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    for (i = 0;  i < 10000;  i++)
+    {
+        if (speech_test)
+        {
+            samples = afReadFrames(inhandle1,
+                                   AF_DEFAULT_TRACK,
+                                   input1,
+                                   BLOCK_LEN);
+            if (samples == 0)
+                break;
+            samples = afReadFrames(inhandle2,
+                                   AF_DEFAULT_TRACK,
+                                   input2,
+                                   samples);
+            if (samples == 0)
+                break;
+        }
+        else
+        {
+            for (j = 0;  j < BLOCK_LEN;  j++)
+            {
+                input1[j] = awgn(&noise1);
+                input2[j] = awgn(&noise2);
+            }
+            samples = BLOCK_LEN;
+        }
+        for (j = 0;  j < samples;  j++)
+        {
+            both_ways_line_model(model, 
+                                 &output1[j],
+                                 &input1[j],
+                                 &output2[j],
+                                 &input2[j],
+                                 1);
+            amp[2*j] = output1[j];
+            amp[2*j + 1] = output2[j];
+        }
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  samples);
+        if (outframes != samples)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+    if (afCloseFile(inhandle1))
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", IN_FILE_NAME1);
+        exit(2);
+    }
+    if (afCloseFile(inhandle2))
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", IN_FILE_NAME2);
+        exit(2);
+    }
+    if (afCloseFile(outhandle))
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    both_ways_line_model_release(model);
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int line_model_no;
+    int speech_test;
+
+    line_model_no = 5;
+    speech_test = TRUE;
+    if (argc > 1)
+        line_model_no = atoi(argv[1]);
+    if (argc > 2)
+        speech_test = FALSE;
+    test_one_way_model(line_model_no, speech_test);
+    test_both_ways_model(line_model_no, speech_test);
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/line_models.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,2547 @@
+/* Medium range telephone line response
+   (from p 537, Digital Communication, John G. Proakis */
+float proakis_line_model[] =
+{
+       -0.00705,
+       -0.01284,
+        0.02405,
+       -0.03508,
+        0.02300,
+       -0.00213,
+       -0.02267,
+        0.03844,
+       -0.04396,
+        0.02747,
+       -0.00482,
+       -0.02891,
+        0.04508,
+       -0.05778,
+        0.02944,
+       -0.00216,
+       -0.04426,
+        0.05613,
+       -0.04741,
+        0.01100,
+        0.01974,
+       -0.03484,
+        0.03041,
+       -0.01802,
+        0.00396,
+        0.00722,
+       -0.01257,
+        0.01008,
+       -0.02129,
+        0.01189,
+        0.01110,
+       -0.00902,
+        0.03677,
+        0.01409,
+       -0.00788,
+        0.05309,
+       -0.00181,
+       -0.01205,
+        0.08416,
+       -0.03636,
+        0.00585,
+        0.11289,
+       -0.07174,
+        0.03292,
+        0.11542,
+       -0.07318,
+        0.07066,
+        0.09208,
+       -0.10969,
+        0.06412,
+        0.08354,
+       -0.13792,
+        0.01457,
+        0.06182,
+       -0.16818,
+       -0.08512,
+        0.08340,
+       -0.06454,
+       -0.18027,
+        0.06049,
+        0.14184,
+       -0.21158,
+       -0.20997,
+        0.24397,
+        0.25474,
+       -0.17512,
+       -0.35967,
+       -0.14378,
+        0.22572,
+        0.39887,
+        0.27289,
+        0.08537,
+       -0.06342,
+       -0.13880,
+       -0.13814,
+       -0.12693,
+       -0.07984,
+       -0.03153,
+       -0.01270,
+        0.01027,
+        0.02795,
+        0.03463,
+        0.02899,
+        0.02522,
+        0.03612,
+        0.03571,
+        0.01030,
+       -0.00522,
+       -0.01149,
+       -0.01945,
+       -0.01500,
+       -0.01652,
+       -0.01913,
+       -0.01351,
+       -0.00751,
+       -0.00003,
+        0.00452,
+        0.01441,
+        0.01373,
+        0.00663,
+        0.01078,
+        0.00571,
+       -0.00343,
+       -0.00153,
+       -0.00356,
+       -0.00765,
+       -0.00665,
+       -0.01182,
+       -0.00916,
+        0.00097,
+        0.00202,
+        0.00876,
+        0.00897,
+        0.00554,
+        0.00579,
+       -0.00074,
+       -0.00163,
+       -0.00239,
+       -0.00503,
+       -0.00366,
+       -0.00358,
+       -0.00183,
+       -0.00137,
+       -0.00084,
+        0.00213,
+        0.00460,
+        0.00228,
+        0.00181,
+        0.00195,
+};
+
+/* V.56bis AD-1, EDD1 */
+float ad_1_edd_1_model[] =
+{
+        0.04482,
+       -0.05976,
+        0.05925,
+       -0.03128,
+       -0.01271,
+        0.04535,
+       -0.05181,
+        0.03347,
+        0.00197,
+       -0.03055,
+        0.03475,
+       -0.03072,
+        0.00110,
+        0.02413,
+       -0.04405,
+        0.03859,
+       -0.01576,
+       -0.03592,
+        0.05708,
+       -0.06376,
+        0.01430,
+        0.02774,
+       -0.05800,
+        0.04281,
+       -0.03688,
+       -0.01247,
+        0.02447,
+       -0.04317,
+        0.03490,
+        0.01078,
+       -0.05078,
+        0.04304,
+       -0.01251,
+       -0.03629,
+        0.08531,
+       -0.02963,
+       -0.01687,
+        0.09114,
+       -0.08658,
+        0.06435,
+        0.02228,
+       -0.03730,
+        0.10279,
+       -0.08188,
+        0.05383,
+        0.01141,
+       -0.03236,
+       -0.02176,
+        0.11879,
+       -0.09229,
+        0.01957,
+        0.11088,
+       -0.21019,
+        0.09577,
+       -0.00051,
+       -0.08253,
+       -0.02967,
+        0.10759,
+       -0.22623,
+       -0.00271,
+        0.26620,
+       -0.16222,
+       -0.18842,
+        0.09633,
+        0.19962,
+       -0.25771,
+       -0.38113,
+       -0.11341,
+        0.27012,
+        0.37307,
+        0.24665,
+        0.16448,
+        0.01117,
+       -0.05027,
+       -0.02675,
+        0.00018,
+       -0.03914,
+       -0.08277,
+       -0.05620,
+       -0.08162,
+       -0.07112,
+       -0.01226,
+       -0.02247,
+       -0.03531,
+       -0.02537,
+        0.02406,
+        0.01289,
+        0.02278,
+        0.03278,
+        0.00123,
+        0.00058,
+        0.00246,
+        0.01181,
+        0.00896,
+        0.01532,
+        0.01220,
+       -0.00661,
+        0.00295,
+       -0.00397,
+       -0.00285,
+       -0.00293,
+        0.00966,
+        0.00446,
+       -0.01462,
+       -0.00029,
+       -0.00947,
+       -0.00316,
+        0.00729,
+        0.00544,
+        0.00676,
+       -0.00708,
+       -0.00098,
+       -0.00087,
+        0.00248,
+        0.00826,
+        0.00230,
+        0.00045,
+       -0.00222,
+        0.00059,
+       -0.00403,
+        0.00250,
+        0.00019,
+       -0.00346,
+       -0.00075,
+       -0.00502,
+       -0.00122,
+       -0.00308,
+       -0.00191,
+        0.00120,
+};
+
+/* V.56bis AD-1, EDD2 */
+float ad_1_edd_2_model[] =
+{
+        0.04732,
+       -0.04724,
+        0.03866,
+        0.02182,
+       -0.04232,
+        0.07190,
+       -0.02283,
+       -0.00824,
+        0.06738,
+       -0.05754,
+        0.03313,
+        0.02536,
+       -0.06435,
+        0.05437,
+       -0.02632,
+       -0.04625,
+        0.04333,
+       -0.05486,
+       -0.02783,
+        0.02214,
+       -0.06130,
+       -0.01324,
+        0.02032,
+       -0.06481,
+        0.00157,
+        0.03406,
+       -0.07386,
+        0.03431,
+        0.04433,
+       -0.08752,
+        0.09704,
+        0.01345,
+       -0.06564,
+        0.12077,
+        0.00268,
+       -0.04505,
+        0.11707,
+       -0.00441,
+       -0.02899,
+        0.07442,
+        0.02795,
+       -0.05670,
+        0.04352,
+        0.08568,
+       -0.18814,
+        0.15929,
+       -0.05581,
+       -0.08987,
+        0.04517,
+       -0.01030,
+       -0.04908,
+       -0.15124,
+        0.23640,
+       -0.18565,
+       -0.10843,
+        0.08784,
+        0.05851,
+       -0.12323,
+       -0.12339,
+        0.24836,
+        0.01865,
+       -0.18041,
+       -0.03995,
+        0.22783,
+        0.18847,
+       -0.13937,
+       -0.29103,
+       -0.10640,
+        0.15334,
+        0.34399,
+        0.25483,
+        0.08044,
+       -0.03240,
+       -0.12069,
+       -0.13349,
+       -0.16170,
+       -0.13070,
+       -0.08604,
+       -0.05577,
+       -0.00714,
+        0.01519,
+        0.03134,
+        0.05397,
+        0.06067,
+        0.07535,
+        0.05555,
+        0.04772,
+        0.03399,
+        0.01174,
+        0.00814,
+       -0.01522,
+       -0.02233,
+       -0.02344,
+       -0.03617,
+       -0.02593,
+       -0.03410,
+       -0.02532,
+       -0.01638,
+       -0.02249,
+       -0.00614,
+       -0.00099,
+        0.00474,
+        0.01194,
+        0.00899,
+        0.01744,
+        0.01391,
+        0.01533,
+        0.01437,
+        0.01046,
+        0.01305,
+        0.00487,
+        0.00471,
+        0.00191,
+       -0.00313,
+        0.00183,
+       -0.00725,
+       -0.00593,
+       -0.00335,
+       -0.01083,
+       -0.00398,
+       -0.00664,
+       -0.00422,
+       -0.00335,
+       -0.00424,
+        0.00080,
+       -0.00325,
+        0.00121,
+        0.00246,
+       -0.00079,
+};
+
+/* V.56bis AD-1, EDD3 */
+float ad_1_edd_3_model[] =
+{
+       -0.02087,
+        0.08830,
+       -0.00143,
+        0.00449,
+        0.09159,
+       -0.00660,
+        0.01052,
+        0.06539,
+        0.02152,
+       -0.04182,
+        0.02942,
+        0.00228,
+       -0.06501,
+        0.01169,
+       -0.04119,
+       -0.06119,
+        0.00553,
+       -0.07525,
+       -0.04903,
+       -0.01805,
+       -0.03666,
+       -0.03022,
+       -0.02328,
+        0.03239,
+       -0.10797,
+        0.14478,
+       -0.01214,
+       -0.01839,
+        0.06843,
+        0.06363,
+        0.08119,
+       -0.07770,
+        0.18216,
+       -0.09578,
+        0.08604,
+        0.01018,
+       -0.04951,
+       -0.01911,
+        0.02260,
+        0.03172,
+       -0.19208,
+        0.08096,
+       -0.04139,
+       -0.10698,
+        0.00700,
+        0.02377,
+       -0.10843,
+       -0.03594,
+        0.15248,
+       -0.02055,
+       -0.03900,
+        0.20737,
+        0.09715,
+       -0.12437,
+        0.00808,
+        0.17811,
+       -0.00951,
+       -0.18458,
+        0.02890,
+        0.10228,
+       -0.08793,
+       -0.20843,
+       -0.03874,
+        0.11792,
+       -0.04827,
+       -0.19580,
+       -0.06122,
+        0.17114,
+        0.18915,
+        0.02797,
+       -0.04222,
+        0.01672,
+        0.16505,
+        0.16989,
+       -0.04063,
+       -0.20328,
+       -0.19531,
+       -0.06260,
+        0.03589,
+        0.03110,
+       -0.05266,
+       -0.10030,
+        0.02869,
+        0.18419,
+        0.21568,
+        0.12446,
+       -0.01278,
+       -0.12373,
+       -0.21498,
+       -0.18620,
+       -0.02492,
+        0.12880,
+        0.15351,
+        0.07356,
+        0.01361,
+       -0.04919,
+       -0.09703,
+       -0.06718,
+       -0.00720,
+        0.05247,
+        0.06003,
+        0.03479,
+       -0.01251,
+       -0.04003,
+       -0.00859,
+        0.00401,
+       -0.00648,
+       -0.01224,
+        0.00466,
+        0.03222,
+        0.02093,
+       -0.00249,
+       -0.01269,
+       -0.01112,
+       -0.01164,
+       -0.02005,
+       -0.00586,
+       -0.00017,
+        0.01215,
+        0.01940,
+        0.00289,
+        0.00497,
+        0.00891,
+        0.00978,
+       -0.00370,
+       -0.01642,
+       -0.01625,
+       -0.01360,
+        0.00503,
+};
+
+/* V.56bis AD-5, EDD1 */
+float ad_5_edd_1_model[] =
+{
+        0.03727,
+       -0.04444,
+        0.04801,
+       -0.02304,
+       -0.01106,
+        0.03902,
+       -0.04178,
+        0.02668,
+        0.00327,
+       -0.02751,
+        0.02712,
+       -0.02769,
+       -0.00121,
+        0.01652,
+       -0.03886,
+        0.02948,
+       -0.01827,
+       -0.03269,
+        0.04317,
+       -0.05666,
+        0.00751,
+        0.02232,
+       -0.05078,
+        0.03072,
+       -0.03222,
+       -0.01384,
+        0.01886,
+       -0.03601,
+        0.03280,
+        0.01035,
+       -0.04305,
+        0.04039,
+       -0.00987,
+       -0.02601,
+        0.08141,
+       -0.02204,
+       -0.00557,
+        0.07945,
+       -0.06319,
+        0.05599,
+        0.02696,
+       -0.02120,
+        0.08871,
+       -0.06245,
+        0.04270,
+        0.01784,
+       -0.04275,
+       -0.01052,
+        0.09908,
+       -0.08563,
+        0.01936,
+        0.08620,
+       -0.19191,
+        0.06851,
+        0.00791,
+       -0.09592,
+       -0.02162,
+        0.08806,
+       -0.22093,
+       -0.00132,
+        0.25400,
+       -0.14769,
+       -0.20326,
+        0.10936,
+        0.19213,
+       -0.26003,
+       -0.40251,
+       -0.11454,
+        0.28430,
+        0.39479,
+        0.27449,
+        0.17248,
+        0.01941,
+       -0.05200,
+       -0.02573,
+        0.00126,
+       -0.03968,
+       -0.08197,
+       -0.06058,
+       -0.08468,
+       -0.07407,
+       -0.01598,
+       -0.02186,
+       -0.03913,
+       -0.02618,
+        0.02108,
+        0.01286,
+        0.02165,
+        0.02891,
+       -0.00017,
+       -0.00492,
+       -0.00043,
+        0.00735,
+        0.00635,
+        0.01389,
+        0.01038,
+       -0.00553,
+        0.00194,
+       -0.00200,
+       -0.00192,
+       -0.00005,
+        0.01301,
+        0.00612,
+       -0.01089,
+       -0.00038,
+       -0.00690,
+       -0.00181,
+        0.00872,
+        0.00816,
+        0.00680,
+       -0.00532,
+       -0.00132,
+       -0.00019,
+        0.00295,
+        0.00818,
+        0.00279,
+       -0.00034,
+       -0.00212,
+       -0.00059,
+       -0.00403,
+        0.00142,
+       -0.00036,
+       -0.00382,
+       -0.00222,
+       -0.00553,
+       -0.00279,
+       -0.00399,
+       -0.00282,
+        0.00017,
+};
+
+/* V.56bis AD-5, EDD2 */
+float ad_5_edd_2_model[] =
+{
+        0.04363,
+       -0.03598,
+        0.03769,
+        0.02140,
+       -0.03104,
+        0.06396,
+       -0.01682,
+       -0.00436,
+        0.05754,
+       -0.04829,
+        0.02677,
+        0.01931,
+       -0.05854,
+        0.04167,
+       -0.02786,
+       -0.04691,
+        0.03104,
+       -0.05473,
+       -0.03237,
+        0.01253,
+       -0.06079,
+       -0.01749,
+        0.01377,
+       -0.06382,
+        0.00100,
+        0.02725,
+       -0.06716,
+        0.03556,
+        0.03809,
+       -0.07095,
+        0.09179,
+        0.01870,
+       -0.05203,
+        0.11772,
+        0.01173,
+       -0.03397,
+        0.11368,
+        0.00888,
+       -0.02759,
+        0.08079,
+        0.02815,
+       -0.05355,
+        0.05377,
+        0.06510,
+       -0.16053,
+        0.12818,
+       -0.04041,
+       -0.10187,
+        0.03484,
+       -0.00183,
+       -0.07862,
+       -0.12572,
+        0.20017,
+       -0.16666,
+       -0.12702,
+        0.08793,
+        0.06419,
+       -0.14059,
+       -0.10852,
+        0.23396,
+        0.02913,
+       -0.18978,
+       -0.03829,
+        0.23943,
+        0.19316,
+       -0.14369,
+       -0.30347,
+       -0.11490,
+        0.16842,
+        0.36341,
+        0.27798,
+        0.09311,
+       -0.03405,
+       -0.12217,
+       -0.14483,
+       -0.16773,
+       -0.13833,
+       -0.08986,
+       -0.05640,
+       -0.00919,
+        0.01593,
+        0.03286,
+        0.05591,
+        0.06421,
+        0.07691,
+        0.05812,
+        0.04845,
+        0.03251,
+        0.01108,
+        0.00442,
+       -0.01745,
+       -0.02551,
+       -0.02789,
+       -0.03797,
+       -0.02966,
+       -0.03460,
+       -0.02556,
+       -0.01711,
+       -0.02071,
+       -0.00641,
+        0.00088,
+        0.00604,
+        0.01255,
+        0.01045,
+        0.01724,
+        0.01483,
+        0.01565,
+        0.01478,
+        0.01155,
+        0.01319,
+        0.00629,
+        0.00545,
+        0.00256,
+       -0.00166,
+        0.00187,
+       -0.00628,
+       -0.00539,
+       -0.00343,
+       -0.00979,
+       -0.00475,
+       -0.00624,
+       -0.00460,
+       -0.00382,
+       -0.00432,
+       -0.00042,
+       -0.00366,
+        0.00032,
+        0.00144,
+       -0.00104,
+};
+
+/* V.56bis AD-5, EDD3 */
+float ad_5_edd_3_model[] =
+{
+       -0.00789,
+        0.08582,
+        0.00920,
+        0.01169,
+        0.09059,
+        0.00315,
+        0.01105,
+        0.06927,
+        0.02012,
+       -0.03839,
+        0.02548,
+       -0.00197,
+       -0.06305,
+        0.00187,
+       -0.04463,
+       -0.06236,
+       -0.00722,
+       -0.07395,
+       -0.05913,
+       -0.02113,
+       -0.04056,
+       -0.03802,
+       -0.01705,
+        0.01191,
+       -0.08672,
+        0.12186,
+        0.00328,
+       -0.02458,
+        0.06762,
+        0.07654,
+        0.06535,
+       -0.04722,
+        0.15409,
+       -0.06356,
+        0.07088,
+        0.02170,
+       -0.04615,
+       -0.02177,
+        0.03941,
+        0.01367,
+       -0.16697,
+        0.06319,
+       -0.03046,
+       -0.10935,
+        0.00460,
+        0.02312,
+       -0.11378,
+       -0.03226,
+        0.14324,
+       -0.01834,
+       -0.03557,
+        0.20379,
+        0.09900,
+       -0.12435,
+        0.00743,
+        0.17848,
+       -0.01297,
+       -0.18136,
+        0.02280,
+        0.10341,
+       -0.09202,
+       -0.21329,
+       -0.03934,
+        0.11357,
+       -0.04800,
+       -0.20016,
+       -0.06067,
+        0.17546,
+        0.19447,
+        0.03393,
+       -0.04348,
+        0.02128,
+        0.17088,
+        0.17392,
+       -0.04049,
+       -0.21265,
+       -0.20232,
+       -0.06607,
+        0.03741,
+        0.03240,
+       -0.05486,
+       -0.09976,
+        0.03054,
+        0.19264,
+        0.22716,
+        0.13177,
+       -0.01145,
+       -0.13293,
+       -0.22679,
+       -0.19600,
+       -0.02792,
+        0.13376,
+        0.15953,
+        0.07966,
+        0.01309,
+       -0.05311,
+       -0.10101,
+       -0.07152,
+       -0.00582,
+        0.05480,
+        0.06417,
+        0.03623,
+       -0.01428,
+       -0.04136,
+       -0.01158,
+        0.00347,
+       -0.00732,
+       -0.01324,
+        0.00535,
+        0.03272,
+        0.02264,
+       -0.00182,
+       -0.01262,
+       -0.01094,
+       -0.01283,
+       -0.01946,
+       -0.00670,
+        0.00088,
+        0.01347,
+        0.01978,
+        0.00483,
+        0.00525,
+        0.01026,
+        0.01012,
+       -0.00389,
+       -0.01680,
+       -0.01783,
+       -0.01386,
+        0.00455,
+};
+
+/* V.56bis AD-6, EDD1 */
+float ad_6_edd_1_model[] =
+{
+        0.03000,
+       -0.03318,
+        0.03817,
+       -0.01757,
+       -0.01030,
+        0.03342,
+       -0.03441,
+        0.02128,
+        0.00436,
+       -0.02476,
+        0.02196,
+       -0.02434,
+       -0.00118,
+        0.01240,
+       -0.03348,
+        0.02531,
+       -0.01877,
+       -0.02810,
+        0.03433,
+       -0.05015,
+        0.00425,
+        0.01846,
+       -0.04334,
+        0.02141,
+       -0.02692,
+       -0.01517,
+        0.01525,
+       -0.03158,
+        0.03074,
+        0.00907,
+       -0.03952,
+        0.03707,
+       -0.00998,
+       -0.02083,
+        0.07641,
+       -0.01890,
+        0.00049,
+        0.07016,
+       -0.04982,
+        0.04918,
+        0.02604,
+       -0.00810,
+        0.07051,
+       -0.04290,
+        0.02854,
+        0.02834,
+       -0.05238,
+        0.00349,
+        0.08746,
+       -0.08015,
+        0.02787,
+        0.06512,
+       -0.16698,
+        0.04161,
+        0.02621,
+       -0.11607,
+       -0.00719,
+        0.06634,
+       -0.21057,
+       -0.00296,
+        0.24598,
+       -0.13619,
+       -0.21698,
+        0.12060,
+        0.18275,
+       -0.25754,
+       -0.42080,
+       -0.11198,
+        0.29078,
+        0.40915,
+        0.29243,
+        0.17747,
+        0.02335,
+       -0.05329,
+       -0.02581,
+        0.00001,
+       -0.04290,
+       -0.08228,
+       -0.06560,
+       -0.08736,
+       -0.07578,
+       -0.01918,
+       -0.02201,
+       -0.04409,
+       -0.02604,
+        0.01807,
+        0.01425,
+        0.02134,
+        0.02879,
+        0.00072,
+       -0.00622,
+        0.00126,
+        0.00832,
+        0.00779,
+        0.01512,
+        0.01123,
+       -0.00380,
+        0.00046,
+       -0.00134,
+       -0.00323,
+        0.00020,
+        0.01302,
+        0.00571,
+       -0.01000,
+       -0.00166,
+       -0.00612,
+       -0.00198,
+        0.00868,
+        0.00936,
+        0.00616,
+       -0.00466,
+       -0.00197,
+        0.00013,
+        0.00322,
+        0.00803,
+        0.00337,
+       -0.00060,
+       -0.00144,
+       -0.00120,
+       -0.00366,
+        0.00093,
+       -0.00053,
+       -0.00391,
+       -0.00290,
+       -0.00531,
+       -0.00339,
+       -0.00391,
+       -0.00285,
+        0.00003,
+};
+
+/* V.56bis AD-6, EDD2 */
+float ad_6_edd_2_model[] =
+{
+        0.03953,
+       -0.02944,
+        0.03552,
+        0.02006,
+       -0.02369,
+        0.05762,
+       -0.01259,
+       -0.00135,
+        0.05136,
+       -0.04099,
+        0.02372,
+        0.01674,
+       -0.05206,
+        0.03411,
+       -0.02566,
+       -0.04570,
+        0.02446,
+       -0.05186,
+       -0.03502,
+        0.00803,
+       -0.05969,
+       -0.01901,
+        0.00922,
+       -0.06184,
+        0.00053,
+        0.02263,
+       -0.06309,
+        0.03580,
+        0.03195,
+       -0.05985,
+        0.08499,
+        0.02029,
+       -0.04364,
+        0.11234,
+        0.01572,
+       -0.02809,
+        0.11097,
+        0.01369,
+       -0.02474,
+        0.08016,
+        0.03157,
+       -0.05869,
+        0.06738,
+        0.04299,
+       -0.13404,
+        0.10235,
+       -0.02443,
+       -0.10690,
+        0.02564,
+        0.01336,
+       -0.10674,
+       -0.09557,
+        0.16409,
+       -0.14026,
+       -0.14955,
+        0.09446,
+        0.06282,
+       -0.15022,
+       -0.09737,
+        0.22501,
+        0.04005,
+       -0.19693,
+       -0.03303,
+        0.24539,
+        0.19779,
+       -0.14750,
+       -0.30917,
+       -0.12305,
+        0.17860,
+        0.37409,
+        0.29167,
+        0.09816,
+       -0.03678,
+       -0.12493,
+       -0.15456,
+       -0.17421,
+       -0.14549,
+       -0.09494,
+       -0.05843,
+       -0.01031,
+        0.01727,
+        0.03552,
+        0.05665,
+        0.06831,
+        0.07797,
+        0.06172,
+        0.05007,
+        0.03446,
+        0.01277,
+        0.00370,
+       -0.01689,
+       -0.02548,
+       -0.02944,
+       -0.03815,
+       -0.03213,
+       -0.03530,
+       -0.02738,
+       -0.01934,
+       -0.02216,
+       -0.00850,
+        0.00031,
+        0.00631,
+        0.01235,
+        0.01209,
+        0.01782,
+        0.01657,
+        0.01668,
+        0.01587,
+        0.01300,
+        0.01348,
+        0.00718,
+        0.00574,
+        0.00261,
+       -0.00114,
+        0.00113,
+       -0.00611,
+       -0.00555,
+       -0.00413,
+       -0.00960,
+       -0.00585,
+       -0.00641,
+       -0.00525,
+       -0.00438,
+       -0.00424,
+       -0.00111,
+       -0.00331,
+        0.00028,
+        0.00150,
+       -0.00059,
+};
+
+/* V.56bis AD-6, EDD3 */
+float ad_6_edd_3_model[] =
+{
+       -0.00149,
+        0.08209,
+        0.01384,
+        0.01622,
+        0.08742,
+        0.00956,
+        0.01078,
+        0.07169,
+        0.01911,
+       -0.03530,
+        0.02358,
+       -0.00454,
+       -0.05969,
+       -0.00469,
+       -0.04524,
+       -0.06237,
+       -0.01394,
+       -0.07373,
+       -0.06252,
+       -0.02551,
+       -0.03846,
+       -0.04671,
+       -0.00666,
+       -0.00608,
+       -0.06587,
+        0.10500,
+        0.01537,
+       -0.02447,
+        0.06386,
+        0.09382,
+        0.04438,
+       -0.01356,
+        0.12210,
+       -0.03135,
+        0.04874,
+        0.03624,
+       -0.05172,
+       -0.02478,
+        0.04867,
+       -0.00423,
+       -0.14925,
+        0.04300,
+       -0.01981,
+       -0.11766,
+        0.00568,
+        0.02034,
+       -0.11359,
+       -0.02983,
+        0.14051,
+       -0.01454,
+       -0.03023,
+        0.20276,
+        0.10279,
+       -0.12381,
+        0.00761,
+        0.17886,
+       -0.01549,
+       -0.17864,
+        0.01879,
+        0.10476,
+       -0.09546,
+       -0.21454,
+       -0.03968,
+        0.11031,
+       -0.04958,
+       -0.20307,
+       -0.06206,
+        0.17767,
+        0.19771,
+        0.03836,
+       -0.04480,
+        0.02409,
+        0.17547,
+        0.17719,
+       -0.03916,
+       -0.21814,
+       -0.20660,
+       -0.06913,
+        0.03669,
+        0.03251,
+       -0.05729,
+       -0.09980,
+        0.03106,
+        0.19815,
+        0.23384,
+        0.13478,
+       -0.01110,
+       -0.13898,
+       -0.23338,
+       -0.20115,
+       -0.02825,
+        0.13774,
+        0.16369,
+        0.08422,
+        0.01364,
+       -0.05496,
+       -0.10328,
+       -0.07557,
+       -0.00642,
+        0.05467,
+        0.06642,
+        0.03739,
+       -0.01455,
+       -0.04092,
+       -0.01251,
+        0.00383,
+       -0.00754,
+       -0.01344,
+        0.00631,
+        0.03285,
+        0.02345,
+       -0.00185,
+       -0.01322,
+       -0.01168,
+       -0.01409,
+       -0.01892,
+       -0.00728,
+        0.00155,
+        0.01427,
+        0.01972,
+        0.00568,
+        0.00475,
+        0.01077,
+        0.00995,
+       -0.00410,
+       -0.01693,
+       -0.01850,
+       -0.01366,
+        0.00458,
+};
+
+/* V.56bis AD-7, EDD1 */
+float ad_7_edd_1_model[] =
+{
+        0.02669,
+       -0.02820,
+        0.03384,
+       -0.01539,
+       -0.00955,
+        0.03049,
+       -0.03090,
+        0.01889,
+        0.00444,
+       -0.02300,
+        0.01958,
+       -0.02269,
+       -0.00141,
+        0.01047,
+       -0.03043,
+        0.02268,
+       -0.01897,
+       -0.02583,
+        0.03053,
+       -0.04682,
+        0.00259,
+        0.01696,
+       -0.04034,
+        0.01715,
+       -0.02443,
+       -0.01541,
+        0.01287,
+       -0.02832,
+        0.02874,
+        0.00833,
+       -0.03693,
+        0.03496,
+       -0.01055,
+       -0.01767,
+        0.07354,
+       -0.01579,
+        0.00163,
+        0.06419,
+       -0.04177,
+        0.04443,
+        0.02700,
+       -0.00293,
+        0.06520,
+       -0.03794,
+        0.02680,
+        0.02818,
+       -0.05440,
+        0.00772,
+        0.08226,
+       -0.07472,
+        0.02933,
+        0.05802,
+       -0.15929,
+        0.03541,
+        0.02713,
+       -0.11832,
+       -0.00552,
+        0.05941,
+       -0.20977,
+       -0.00324,
+        0.24320,
+       -0.12926,
+       -0.22100,
+        0.12358,
+        0.18216,
+       -0.25941,
+       -0.42601,
+       -0.11160,
+        0.29434,
+        0.41247,
+        0.29898,
+        0.17862,
+        0.02563,
+       -0.05483,
+       -0.02799,
+       -0.00031,
+       -0.04359,
+       -0.08136,
+       -0.06574,
+       -0.08631,
+       -0.07644,
+       -0.02102,
+       -0.02278,
+       -0.04557,
+       -0.02630,
+        0.01649,
+        0.01390,
+        0.02057,
+        0.02765,
+        0.00203,
+       -0.00535,
+        0.00173,
+        0.00795,
+        0.00861,
+        0.01585,
+        0.01087,
+       -0.00361,
+        0.00061,
+       -0.00041,
+       -0.00349,
+        0.00035,
+        0.01300,
+        0.00505,
+       -0.00966,
+       -0.00204,
+       -0.00580,
+       -0.00204,
+        0.00876,
+        0.00967,
+        0.00572,
+       -0.00429,
+       -0.00221,
+       -0.00006,
+        0.00331,
+        0.00833,
+        0.00376,
+       -0.00090,
+       -0.00154,
+       -0.00134,
+       -0.00354,
+        0.00077,
+       -0.00042,
+       -0.00369,
+       -0.00317,
+       -0.00522,
+       -0.00367,
+       -0.00408,
+       -0.00288,
+        0.00004,
+};
+
+/* V.56bis AD-7, EDD2 */
+float ad_7_edd_2_model[] =
+{
+        0.03717,
+       -0.02572,
+        0.03386,
+        0.01953,
+       -0.02001,
+        0.05397,
+       -0.01005,
+       -0.00021,
+        0.04752,
+       -0.03625,
+        0.02187,
+        0.01486,
+       -0.04801,
+        0.03029,
+       -0.02515,
+       -0.04410,
+        0.02045,
+       -0.05035,
+       -0.03493,
+        0.00521,
+       -0.05838,
+       -0.01970,
+        0.00648,
+       -0.06006,
+        0.00021,
+        0.01929,
+       -0.05912,
+        0.03491,
+        0.02845,
+       -0.05409,
+        0.08253,
+        0.01931,
+       -0.03918,
+        0.10931,
+        0.01831,
+       -0.02480,
+        0.10756,
+        0.01700,
+       -0.02508,
+        0.08121,
+        0.03052,
+       -0.05623,
+        0.06850,
+        0.03776,
+       -0.12471,
+        0.09225,
+       -0.01990,
+       -0.10967,
+        0.02421,
+        0.01772,
+       -0.11431,
+       -0.08785,
+        0.15465,
+       -0.13457,
+       -0.15481,
+        0.09436,
+        0.06547,
+       -0.15693,
+       -0.09355,
+        0.22101,
+        0.04480,
+       -0.19669,
+       -0.03202,
+        0.25018,
+        0.19772,
+       -0.14861,
+       -0.31262,
+       -0.12483,
+        0.18112,
+        0.37639,
+        0.29590,
+        0.10111,
+       -0.03736,
+       -0.12643,
+       -0.15855,
+       -0.17654,
+       -0.14765,
+       -0.09582,
+       -0.05670,
+       -0.00975,
+        0.01755,
+        0.03548,
+        0.05636,
+        0.06851,
+        0.07780,
+        0.06281,
+        0.05013,
+        0.03360,
+        0.01348,
+        0.00476,
+       -0.01566,
+       -0.02537,
+       -0.02953,
+       -0.03764,
+       -0.03327,
+       -0.03608,
+       -0.02832,
+       -0.02030,
+       -0.02191,
+       -0.00882,
+        0.00005,
+        0.00587,
+        0.01199,
+        0.01243,
+        0.01776,
+        0.01714,
+        0.01727,
+        0.01621,
+        0.01341,
+        0.01369,
+        0.00777,
+        0.00564,
+        0.00248,
+       -0.00063,
+        0.00116,
+       -0.00587,
+       -0.00577,
+       -0.00452,
+       -0.00961,
+       -0.00628,
+       -0.00640,
+       -0.00540,
+       -0.00453,
+       -0.00413,
+       -0.00138,
+       -0.00334,
+        0.00011,
+        0.00137,
+       -0.00037,
+};
+
+/* V.56bis AD-7, EDD3 */
+float ad_7_edd_3_model[] =
+{
+        0.00161,
+        0.07950,
+        0.01637,
+        0.01767,
+        0.08574,
+        0.01237,
+        0.01067,
+        0.07152,
+        0.01956,
+       -0.03424,
+        0.02241,
+       -0.00560,
+       -0.05788,
+       -0.00768,
+       -0.04517,
+       -0.06184,
+       -0.01770,
+       -0.07205,
+       -0.06503,
+       -0.02510,
+       -0.04020,
+       -0.04723,
+       -0.00445,
+       -0.01079,
+       -0.05986,
+        0.09916,
+        0.02075,
+       -0.02641,
+        0.06416,
+        0.09771,
+        0.04041,
+       -0.00602,
+        0.11399,
+       -0.02252,
+        0.04434,
+        0.03743,
+       -0.05163,
+       -0.02665,
+        0.05209,
+       -0.01059,
+       -0.14282,
+        0.03750,
+       -0.01827,
+       -0.11730,
+        0.00428,
+        0.02071,
+       -0.11569,
+       -0.02712,
+        0.13910,
+       -0.01318,
+       -0.02911,
+        0.20182,
+        0.10444,
+       -0.12439,
+        0.00741,
+        0.17856,
+       -0.01618,
+       -0.17792,
+        0.01767,
+        0.10595,
+       -0.09593,
+       -0.21559,
+       -0.03912,
+        0.11033,
+       -0.04852,
+       -0.20384,
+       -0.06271,
+        0.17690,
+        0.19647,
+        0.03844,
+       -0.04482,
+        0.02615,
+        0.17611,
+        0.17685,
+       -0.03806,
+       -0.21821,
+       -0.20649,
+       -0.06925,
+        0.03670,
+        0.03177,
+       -0.05866,
+       -0.09940,
+        0.03117,
+        0.19915,
+        0.23557,
+        0.13555,
+       -0.01160,
+       -0.14132,
+       -0.23488,
+       -0.20243,
+       -0.02878,
+        0.13930,
+        0.16627,
+        0.08715,
+        0.01390,
+       -0.05662,
+       -0.10564,
+       -0.07785,
+       -0.00651,
+        0.05510,
+        0.06753,
+        0.03844,
+       -0.01394,
+       -0.04064,
+       -0.01347,
+        0.00357,
+       -0.00760,
+       -0.01369,
+        0.00657,
+        0.03287,
+        0.02359,
+       -0.00203,
+       -0.01294,
+       -0.01106,
+       -0.01423,
+       -0.01916,
+       -0.00811,
+        0.00143,
+        0.01435,
+        0.01972,
+        0.00648,
+        0.00498,
+        0.01100,
+        0.00974,
+       -0.00446,
+       -0.01718,
+       -0.01897,
+       -0.01343,
+        0.00483,
+};
+
+/* V.56bis AD-8, EDD1 */
+float ad_8_edd_1_model[] =
+{
+        0.03609,
+       -0.04908,
+        0.04802,
+       -0.02590,
+       -0.01264,
+        0.04023,
+       -0.04432,
+        0.02857,
+        0.00379,
+       -0.02755,
+        0.03043,
+       -0.02744,
+        0.00241,
+        0.02035,
+       -0.03736,
+        0.03569,
+       -0.01549,
+       -0.02868,
+        0.04988,
+       -0.05448,
+        0.01335,
+        0.02855,
+       -0.04824,
+        0.03704,
+       -0.02907,
+       -0.01115,
+        0.02294,
+       -0.03632,
+        0.03533,
+        0.00961,
+       -0.04780,
+        0.03891,
+       -0.01417,
+       -0.03543,
+        0.08064,
+       -0.03376,
+       -0.01301,
+        0.07285,
+       -0.07678,
+        0.04912,
+        0.01780,
+       -0.03079,
+        0.08096,
+       -0.06835,
+        0.03351,
+        0.02065,
+       -0.05301,
+       -0.00888,
+        0.10504,
+       -0.08834,
+        0.02652,
+        0.09628,
+       -0.18797,
+        0.07884,
+        0.03130,
+       -0.08963,
+       -0.00166,
+        0.10456,
+       -0.21346,
+        0.01892,
+        0.28289,
+       -0.13871,
+       -0.20165,
+        0.13755,
+        0.21423,
+       -0.26178,
+       -0.43510,
+       -0.14268,
+        0.26242,
+        0.37078,
+        0.23549,
+        0.12641,
+       -0.02174,
+       -0.08273,
+       -0.03872,
+       -0.00043,
+       -0.03102,
+       -0.06872,
+       -0.04054,
+       -0.06311,
+       -0.05041,
+        0.00754,
+       -0.00285,
+       -0.02496,
+       -0.01424,
+        0.03001,
+        0.01744,
+        0.02333,
+        0.02825,
+       -0.00348,
+       -0.00943,
+       -0.00420,
+        0.00423,
+        0.00357,
+        0.01071,
+        0.00768,
+       -0.00841,
+       -0.00018,
+       -0.00411,
+       -0.00401,
+       -0.00136,
+        0.01274,
+        0.00541,
+       -0.01211,
+       -0.00099,
+       -0.00795,
+       -0.00295,
+        0.00812,
+        0.00714,
+        0.00513,
+       -0.00732,
+       -0.00304,
+       -0.00142,
+        0.00182,
+        0.00770,
+        0.00243,
+       -0.00065,
+       -0.00188,
+       -0.00020,
+       -0.00318,
+        0.00261,
+        0.00110,
+       -0.00258,
+       -0.00048,
+       -0.00391,
+       -0.00108,
+       -0.00241,
+       -0.00145,
+        0.00161,
+};
+
+/* V.56bis AD-8, EDD2 */
+float ad_8_edd_2_model[] =
+{
+        0.03948,
+       -0.04537,
+        0.03236,
+        0.01539,
+       -0.04026,
+        0.06115,
+       -0.02386,
+       -0.00988,
+        0.05777,
+       -0.05332,
+        0.02807,
+        0.02294,
+       -0.05792,
+        0.05084,
+       -0.02047,
+       -0.03988,
+        0.04615,
+       -0.04474,
+       -0.02061,
+        0.02853,
+       -0.05030,
+       -0.00570,
+        0.02730,
+       -0.05791,
+        0.00855,
+        0.03456,
+       -0.07001,
+        0.03732,
+        0.03532,
+       -0.08273,
+        0.08512,
+        0.00835,
+       -0.07261,
+        0.10961,
+       -0.00783,
+       -0.05246,
+        0.10178,
+       -0.00800,
+       -0.04444,
+        0.07039,
+        0.02239,
+       -0.06990,
+        0.05744,
+        0.06266,
+       -0.16118,
+        0.13707,
+       -0.02955,
+       -0.09310,
+        0.05100,
+        0.01829,
+       -0.06865,
+       -0.10695,
+        0.22222,
+       -0.15137,
+       -0.11997,
+        0.11096,
+        0.07508,
+       -0.14141,
+       -0.10744,
+        0.24518,
+        0.03115,
+       -0.21261,
+       -0.04781,
+        0.23971,
+        0.19859,
+       -0.16600,
+       -0.34027,
+       -0.14846,
+        0.14965,
+        0.35417,
+        0.26286,
+        0.07745,
+       -0.04127,
+       -0.11562,
+       -0.12685,
+       -0.14181,
+       -0.11042,
+       -0.06214,
+       -0.03405,
+        0.00766,
+        0.02281,
+        0.03034,
+        0.04581,
+        0.04986,
+        0.06100,
+        0.04057,
+        0.03206,
+        0.01872,
+        0.00143,
+       -0.00049,
+       -0.01821,
+       -0.02133,
+       -0.01917,
+       -0.02734,
+       -0.01731,
+       -0.02243,
+       -0.01352,
+       -0.00701,
+       -0.01344,
+       -0.00113,
+        0.00371,
+        0.00615,
+        0.01051,
+        0.00628,
+        0.01170,
+        0.00830,
+        0.00877,
+        0.00786,
+        0.00467,
+        0.00708,
+        0.00096,
+        0.00164,
+        0.00000,
+       -0.00305,
+        0.00201,
+       -0.00542,
+       -0.00344,
+       -0.00107,
+       -0.00717,
+       -0.00191,
+       -0.00330,
+       -0.00212,
+       -0.00144,
+       -0.00249,
+        0.00124,
+       -0.00265,
+        0.00104,
+        0.00190,
+       -0.00128,
+};
+
+/* V.56bis AD-8, EDD3 */
+float ad_8_edd_3_model[] =
+{
+       -0.02785,
+        0.07032,
+       -0.01175,
+       -0.00877,
+        0.07548,
+       -0.01465,
+       -0.00453,
+        0.06191,
+        0.01317,
+       -0.04240,
+        0.02882,
+        0.00693,
+       -0.05469,
+        0.02098,
+       -0.02756,
+       -0.04081,
+        0.01799,
+       -0.05260,
+       -0.03654,
+       -0.00091,
+       -0.01930,
+       -0.02891,
+       -0.00250,
+        0.01236,
+       -0.08771,
+        0.11850,
+       -0.00663,
+       -0.04314,
+        0.04957,
+        0.06214,
+        0.04078,
+       -0.06552,
+        0.13590,
+       -0.07712,
+        0.05807,
+        0.02025,
+       -0.05238,
+       -0.02092,
+        0.05160,
+        0.02302,
+       -0.15786,
+        0.07646,
+       -0.01045,
+       -0.10346,
+        0.02039,
+        0.03037,
+       -0.11413,
+       -0.03553,
+        0.14184,
+       -0.03144,
+       -0.05413,
+        0.19832,
+        0.08457,
+       -0.14475,
+       -0.00222,
+        0.18423,
+       -0.01372,
+       -0.18286,
+        0.03808,
+        0.12764,
+       -0.07739,
+       -0.20418,
+       -0.02084,
+        0.13917,
+       -0.03818,
+       -0.21058,
+       -0.07171,
+        0.17427,
+        0.19079,
+        0.01321,
+       -0.07253,
+        0.00064,
+        0.16873,
+        0.18089,
+       -0.03840,
+       -0.21428,
+       -0.19805,
+       -0.05117,
+        0.05689,
+        0.04425,
+       -0.05832,
+       -0.11445,
+        0.01825,
+        0.18790,
+        0.22521,
+        0.12895,
+       -0.01469,
+       -0.13428,
+       -0.22800,
+       -0.19553,
+       -0.02198,
+        0.14411,
+        0.16744,
+        0.08123,
+        0.01200,
+       -0.05498,
+       -0.10356,
+       -0.07305,
+       -0.00468,
+        0.05824,
+        0.06726,
+        0.03635,
+       -0.01694,
+       -0.04457,
+       -0.01190,
+        0.00453,
+       -0.00726,
+       -0.01395,
+        0.00481,
+        0.03358,
+        0.02288,
+       -0.00251,
+       -0.01354,
+       -0.01048,
+       -0.01156,
+       -0.01840,
+       -0.00608,
+        0.00068,
+        0.01287,
+        0.01877,
+        0.00246,
+        0.00286,
+        0.00898,
+        0.00966,
+       -0.00414,
+       -0.01748,
+       -0.01820,
+       -0.01414,
+        0.00503,
+};
+
+/* V.56bis AD-9, EDD1 */
+float ad_9_edd_1_model[] =
+{
+        0.02380,
+       -0.03432,
+        0.03276,
+       -0.01924,
+       -0.01155,
+        0.03131,
+       -0.03292,
+        0.02113,
+        0.00544,
+       -0.02193,
+        0.02308,
+       -0.02080,
+        0.00301,
+        0.01568,
+       -0.02615,
+        0.02977,
+       -0.01324,
+       -0.01913,
+        0.03917,
+       -0.04132,
+        0.01217,
+        0.02525,
+       -0.03355,
+        0.02617,
+       -0.01930,
+       -0.00997,
+        0.01767,
+       -0.02674,
+        0.03247,
+        0.00767,
+       -0.04135,
+        0.03057,
+       -0.01777,
+       -0.02790,
+        0.06698,
+       -0.03064,
+       -0.01235,
+        0.05186,
+       -0.06405,
+        0.03297,
+        0.01038,
+       -0.01863,
+        0.05325,
+       -0.04818,
+        0.01458,
+        0.02598,
+       -0.06413,
+        0.00364,
+        0.08844,
+       -0.07677,
+        0.03606,
+        0.06917,
+       -0.14835,
+        0.05354,
+        0.06093,
+       -0.09478,
+        0.02846,
+        0.08226,
+       -0.19051,
+        0.03306,
+        0.28763,
+       -0.11872,
+       -0.21020,
+        0.17126,
+        0.23123,
+       -0.25980,
+       -0.48468,
+       -0.16864,
+        0.25842,
+        0.37367,
+        0.22706,
+        0.09324,
+       -0.05391,
+       -0.10944,
+       -0.04912,
+        0.00345,
+       -0.02442,
+       -0.05422,
+       -0.03112,
+       -0.04807,
+       -0.03447,
+        0.02050,
+        0.01156,
+       -0.01974,
+       -0.00587,
+        0.03277,
+        0.02360,
+        0.02327,
+        0.02517,
+       -0.00632,
+       -0.01539,
+       -0.00838,
+       -0.00031,
+        0.00137,
+        0.00946,
+        0.00486,
+       -0.00866,
+       -0.00303,
+       -0.00365,
+       -0.00556,
+       -0.00028,
+        0.01300,
+        0.00511,
+       -0.01063,
+       -0.00304,
+       -0.00738,
+       -0.00348,
+        0.00785,
+        0.00857,
+        0.00399,
+       -0.00717,
+       -0.00496,
+       -0.00207,
+        0.00195,
+        0.00747,
+        0.00288,
+       -0.00159,
+       -0.00187,
+       -0.00099,
+       -0.00235,
+        0.00264,
+        0.00177,
+       -0.00134,
+       -0.00033,
+       -0.00252,
+       -0.00085,
+       -0.00153,
+       -0.00075,
+        0.00207,
+};
+
+/* V.56bis AD-9, EDD2 */
+float ad_9_edd_2_model[] =
+{
+        0.02850,
+       -0.03901,
+        0.02392,
+        0.00842,
+       -0.03316,
+        0.04635,
+       -0.02093,
+       -0.00891,
+        0.04456,
+       -0.04286,
+        0.02252,
+        0.01852,
+       -0.04507,
+        0.04276,
+       -0.01322,
+       -0.03007,
+        0.04264,
+       -0.03160,
+       -0.01413,
+        0.03086,
+       -0.03859,
+        0.00099,
+        0.02796,
+       -0.04722,
+        0.01252,
+        0.03084,
+       -0.06061,
+        0.03500,
+        0.02474,
+       -0.07058,
+        0.06907,
+        0.00096,
+       -0.06855,
+        0.08794,
+       -0.01043,
+       -0.05670,
+        0.08370,
+       -0.01260,
+       -0.04997,
+        0.05930,
+        0.01770,
+       -0.07584,
+        0.06759,
+        0.03587,
+       -0.12332,
+        0.10773,
+       -0.00633,
+       -0.08885,
+        0.05092,
+        0.04436,
+       -0.09258,
+       -0.05470,
+        0.18996,
+       -0.10861,
+       -0.13402,
+        0.13177,
+        0.08353,
+       -0.15288,
+       -0.09325,
+        0.23998,
+        0.04092,
+       -0.23668,
+       -0.05757,
+        0.25801,
+        0.21255,
+       -0.18487,
+       -0.38292,
+       -0.18766,
+        0.14974,
+        0.36044,
+        0.27123,
+        0.07005,
+       -0.05351,
+       -0.11455,
+       -0.12077,
+       -0.12520,
+       -0.09171,
+       -0.04326,
+       -0.01526,
+        0.01854,
+        0.02786,
+        0.02852,
+        0.03629,
+        0.04141,
+        0.04788,
+        0.03185,
+        0.02041,
+        0.00859,
+       -0.00545,
+       -0.00565,
+       -0.01877,
+       -0.01953,
+       -0.01605,
+       -0.01897,
+       -0.01102,
+       -0.01270,
+       -0.00578,
+       -0.00055,
+       -0.00712,
+        0.00209,
+        0.00571,
+        0.00643,
+        0.00797,
+        0.00439,
+        0.00724,
+        0.00473,
+        0.00396,
+        0.00316,
+        0.00125,
+        0.00327,
+       -0.00116,
+       -0.00074,
+       -0.00168,
+       -0.00264,
+        0.00167,
+       -0.00395,
+       -0.00236,
+       -0.00002,
+       -0.00468,
+       -0.00081,
+       -0.00113,
+       -0.00050,
+       -0.00016,
+       -0.00064,
+        0.00142,
+       -0.00158,
+        0.00102,
+        0.00159,
+       -0.00115,
+};
+
+/* V.56bis AD-9, EDD3 */
+float ad_9_edd_3_model[] =
+{
+       -0.03069,
+        0.05066,
+       -0.01866,
+       -0.01613,
+        0.05724,
+       -0.01832,
+       -0.01478,
+        0.05593,
+        0.00776,
+       -0.04067,
+        0.02724,
+        0.00807,
+       -0.03984,
+        0.02138,
+       -0.01278,
+       -0.02466,
+        0.02533,
+       -0.03453,
+       -0.02439,
+        0.00919,
+       -0.00495,
+       -0.02558,
+        0.01326,
+       -0.00652,
+       -0.06275,
+        0.09272,
+       -0.00157,
+       -0.05526,
+        0.02953,
+        0.06825,
+        0.00180,
+       -0.04140,
+        0.08068,
+       -0.04447,
+        0.02612,
+        0.02974,
+       -0.05989,
+       -0.01807,
+        0.06869,
+        0.01050,
+       -0.12367,
+        0.06355,
+        0.01224,
+       -0.09534,
+        0.02988,
+        0.03081,
+       -0.11236,
+       -0.03280,
+        0.12918,
+       -0.03945,
+       -0.05694,
+        0.18321,
+        0.07656,
+       -0.15804,
+       -0.00899,
+        0.18416,
+       -0.01423,
+       -0.17814,
+        0.04248,
+        0.14726,
+       -0.06940,
+       -0.20031,
+       -0.00607,
+        0.15693,
+       -0.03071,
+       -0.22125,
+       -0.08145,
+        0.17733,
+        0.19183,
+        0.00142,
+       -0.10179,
+       -0.01428,
+        0.17173,
+        0.19033,
+       -0.03382,
+       -0.22191,
+       -0.19917,
+       -0.03875,
+        0.07786,
+        0.05680,
+       -0.06574,
+       -0.12886,
+        0.00477,
+        0.18721,
+        0.23222,
+        0.13253,
+       -0.01494,
+       -0.14263,
+       -0.23579,
+       -0.20004,
+       -0.01743,
+        0.15626,
+        0.17764,
+        0.08721,
+        0.00911,
+       -0.06134,
+       -0.10898,
+       -0.07790,
+       -0.00169,
+        0.06330,
+        0.07329,
+        0.03702,
+       -0.02138,
+       -0.04797,
+       -0.01500,
+        0.00523,
+       -0.00706,
+       -0.01471,
+        0.00640,
+        0.03475,
+        0.02451,
+       -0.00331,
+       -0.01417,
+       -0.00996,
+       -0.01143,
+       -0.01718,
+       -0.00707,
+        0.00141,
+        0.01348,
+        0.01737,
+        0.00180,
+        0.00063,
+        0.00886,
+        0.00976,
+       -0.00406,
+       -0.01771,
+       -0.01966,
+       -0.01407,
+        0.00503,
+};
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/logging_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,239 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * logging_tests.c - Tests for the logging functions.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: logging_tests.c,v 1.9 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page logging_tests_page Logging tests
+\section logging_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define _POSIX_SOURCE
+#define _POSIX_C_SOURCE 200112L
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <time.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+static int tests_failed = FALSE;
+
+static int msg_step = 0;
+static int msg2_step = 0;
+static int error_step = 0;
+static int msg_done = FALSE;
+static int msg2_done = FALSE;
+static int error_done = FALSE;
+
+static void message_handler(int level, const char *text)
+{
+    const char *ref[] =
+    {
+        "TAG Log with tag 1 2 3\n",
+        "Log with protocol 1 2 3\n",
+        "FLOW NewTag Log with new tag 1 2 3\n",
+        "FLOW Protocol NewTag Log with protocol 1 2 3\n",
+        "FLOW Protocol NewTag Buf 00 01 02 03 04 05 06 07 08 09\n",
+        "FLOW Protocol NewTag Buf 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff 00 01 02 03 04 05 06 07 08 09\n",
+        "00:00:00.000 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        "00:00:00.020 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        "00:00:00.040 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        "00:00:00.060 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        "00:00:00.080 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        "00:00:00.100 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        "00:00:00.120 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        "00:00:00.140 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        "00:00:00.160 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        "00:00:00.180 FLOW Protocol NewTag Time tagged log 1 2 3\n",
+        ""
+    };
+
+    if (strcmp(ref[msg_step], text))
+    {
+        printf(">>>: %s", ref[msg_step]);
+        tests_failed = TRUE;
+    }
+    if (ref[++msg_step][0] == '\0')
+        msg_done = TRUE;
+    printf("MSG: %s", text);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void message_handler2(int level, const char *text)
+{
+    /* TODO: This doesn't check if the date/time field makes sense */
+    if (strcmp(" FLOW Protocol NewTag Date/time tagged log 1 2 3\n", text + 23))
+    {
+        printf(">>>: %s", text + 23);
+        tests_failed = TRUE;
+    }
+    if (++msg2_step == 10)
+        msg2_done = TRUE;
+    printf("MSG: %s", text);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void error_handler(const char *text)
+{
+    const char *ref[] =
+    {
+        "ERROR Log with severity log 1 2 3\n",
+        ""
+    };
+    
+    if (strcmp(ref[error_step], text))
+    {
+        printf(">>>: %s", ref[error_step]);
+        tests_failed = TRUE;
+    }
+    if (ref[++error_step][0] == '\0')
+        error_done = TRUE;
+    printf("ERR: %s", text);
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    logging_state_t log;
+    int i;
+    uint8_t buf[1000];
+    struct timespec delay;
+
+    /* Set up a logger */
+    if (span_log_init(&log, 123, "TAG"))
+    {
+        fprintf(stderr, "Failed to initialise log.\n");
+        exit(2);
+    }
+    /* Try it */
+    span_log_set_level(&log, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW);
+    if (span_log(&log, SPAN_LOG_FLOW, "Logging to fprintf, as simple as %d %d %d\n", 1, 2, 3))
+        fprintf(stderr, "Logged.\n");
+    else
+        fprintf(stderr, "Not logged.\n");
+
+    /* Now set a custom log handler */
+    span_log_set_message_handler(&log, &message_handler);
+    span_log_set_error_handler(&log, &error_handler);
+    span_log_set_sample_rate(&log, 44100);
+
+    /* Try the different logging elements */
+    span_log_set_level(&log, SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW);
+    if (span_log(&log, SPAN_LOG_FLOW, "Log with tag %d %d %d\n", 1, 2, 3))
+        fprintf(stderr, "Logged.\n");
+    else
+        fprintf(stderr, "Not logged.\n");
+    span_log_set_level(&log, SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
+    if (span_log(&log, SPAN_LOG_FLOW, "Log with protocol %d %d %d\n", 1, 2, 3))
+        fprintf(stderr, "Logged.\n");
+    else
+        fprintf(stderr, "Not logged.\n");
+    span_log_set_level(&log, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_FLOW);
+    if (span_log(&log, SPAN_LOG_ERROR, "Log with severity log %d %d %d\n", 1, 2, 3))
+        fprintf(stderr, "Logged.\n");
+    else
+        fprintf(stderr, "Not logged.\n");
+
+    span_log_set_level(&log, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW);
+    span_log_set_tag(&log, "NewTag");
+    if (span_log(&log, SPAN_LOG_FLOW, "Log with new tag %d %d %d\n", 1, 2, 3))
+        fprintf(stderr, "Logged.\n");
+    else
+        fprintf(stderr, "Not logged.\n");
+
+    span_log_set_protocol(&log, "Protocol");
+    if (span_log(&log, SPAN_LOG_FLOW, "Log with protocol %d %d %d\n", 1, 2, 3))
+        fprintf(stderr, "Logged.\n");
+    else
+        fprintf(stderr, "Not logged.\n");
+    
+    /* Test logging of buffer contents */
+    for (i = 0;  i < 1000;  i++)
+        buf[i] = i;
+    if (span_log_buf(&log, SPAN_LOG_FLOW, "Buf", buf, 10))
+        fprintf(stderr, "Logged.\n");
+    else
+        fprintf(stderr, "Not logged.\n");
+    if (span_log_buf(&log, SPAN_LOG_FLOW, "Buf", buf, 1000))
+        fprintf(stderr, "Logged.\n");
+    else
+        fprintf(stderr, "Not logged.\n");
+
+    /* Test the correct severities will be logged */
+    for (i = 0;  i < 10;  i++)
+    {
+        if (!span_log_test(&log, i))
+        {
+            if (i != 6)
+                tests_failed = TRUE;
+            break;
+        }
+    }
+    
+    /* Check timestamping by samples */
+    span_log_set_level(&log, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW | SPAN_LOG_SHOW_SAMPLE_TIME);
+    for (i = 0;  i < 10;  i++)
+    {
+        span_log(&log, SPAN_LOG_FLOW, "Time tagged log %d %d %d\n", 1, 2, 3);
+        span_log_bump_samples(&log, 441*2);
+    }
+
+    /* Check timestamping by current date and time */
+    span_log_set_message_handler(&log, &message_handler2);
+    span_log_set_level(&log, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW | SPAN_LOG_SHOW_DATE);
+    for (i = 0;  i < 10;  i++)
+    {
+        span_log(&log, SPAN_LOG_FLOW, "Date/time tagged log %d %d %d\n", 1, 2, 3);
+        delay.tv_sec = 0;
+        delay.tv_nsec = 20000000;
+        nanosleep(&delay, NULL);
+    }
+    if (tests_failed  ||  !msg_done  ||  !error_done)
+    {
+        printf("Tests failed - %d %d %d.\n", tests_failed, msg_done, error_done);
+        return 2;
+    }
+    
+    span_log_set_message_handler(&log, &message_handler);
+
+    printf("Tests passed.\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/lpc10_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,316 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * lpc10_tests.c - Test the LPC10 low bit rate speech codec.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: lpc10_tests.c,v 1.10 2006/11/20 13:58:57 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page lpc10_tests_page LPC10 codec tests
+\section lpc10_tests_page_sec_1 What does it do?
+
+\section lpc10_tests_page_sec_2 How is it used?
+To perform a general audio quality test, lpc10 should be run. The file ../localtests/short_nb_voice.wav
+will be compressed to LPC10 data, decompressed, and the resulting audio stored in post_lpc10.wav.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define BLOCK_LEN       180
+
+#define BLOCKS_PER_READ 1
+
+#define IN_FILE_NAME            "../localtests/dam9.wav"
+#define REF_FILE_NAME           "../localtests/dam9_lpc55.wav"
+#define COMPRESS_FILE_NAME      "lpc10_out.lpc10"
+#define DECOMPRESS_FILE_NAME    "lpc10_in.lpc10"
+#define OUT_FILE_NAME           "post_lpc10.wav"
+
+int main(int argc, char *argv[])
+{
+    AFfilehandle inhandle;
+    AFfilehandle refhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int frames;
+    int outframes;
+    float x;
+    double pre_energy;
+    double post_energy;
+    double ref_energy;
+    double diff_energy;
+    int16_t pre_amp[BLOCKS_PER_READ*BLOCK_LEN];
+    int16_t post_amp[BLOCKS_PER_READ*BLOCK_LEN];
+    int16_t ref_amp[BLOCKS_PER_READ*BLOCK_LEN];
+    int16_t log_amp[BLOCKS_PER_READ*BLOCK_LEN*3];
+    uint8_t lpc10_data[BLOCKS_PER_READ*7];
+    double xx;
+    lpc10_encode_state_t *lpc10_enc_state;
+    lpc10_decode_state_t *lpc10_dec_state;
+    int i;
+    int block_no;
+    int log_error;
+    int compress;
+    int decompress;
+    const char *in_file_name;
+    int compress_file;
+    int decompress_file;
+    int len;
+
+    compress = FALSE;
+    decompress = FALSE;
+    log_error = TRUE;
+    in_file_name = IN_FILE_NAME;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-c") == 0)
+        {
+            compress = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-d") == 0)
+        {
+            decompress = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-i") == 0)
+        {
+            in_file_name = argv[++i];
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_error = FALSE;
+            continue;
+        }
+    }
+
+    compress_file = -1;
+    decompress_file = -1;
+    inhandle = AF_NULL_FILEHANDLE;
+    refhandle = AF_NULL_FILEHANDLE;
+    outhandle = AF_NULL_FILEHANDLE;
+    if (!decompress)
+    {
+        if ((inhandle = afOpenFile(in_file_name, "r", 0)) == AF_NULL_FILEHANDLE)
+        {
+            printf("    Cannot open wave file '%s'\n", in_file_name);
+            exit(2);
+        }
+        if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+        {
+            printf("    Unexpected frame size in wave file '%s'\n", in_file_name);
+            exit(2);
+        }
+        if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+        {
+            printf("    Unexpected sample rate in wave file '%s'\n", in_file_name);
+            exit(2);
+        }
+        if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+        {
+            printf("    Unexpected number of channels in wave file '%s'\n", in_file_name);
+            exit(2);
+        }
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+
+        if ((refhandle = afOpenFile(REF_FILE_NAME, "r", 0)) == AF_NULL_FILEHANDLE)
+        {
+            printf("    Cannot open wave file '%s'\n", REF_FILE_NAME);
+            exit(2);
+        }
+        if ((x = afGetFrameSize(refhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+        {
+            printf("    Unexpected frame size in wave file '%s'\n", REF_FILE_NAME);
+            exit(2);
+        }
+        if ((x = afGetRate(refhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+        {
+            printf("    Unexpected sample rate in wave file '%s'\n", REF_FILE_NAME);
+            exit(2);
+        }
+        if ((x = afGetChannels(refhandle, AF_DEFAULT_TRACK)) != 1.0)
+        {
+            printf("    Unexpected number of channels in wave file '%s'\n", REF_FILE_NAME);
+            exit(2);
+        }
+    }
+    else
+    {
+        if ((decompress_file = open(DECOMPRESS_FILE_NAME, O_RDONLY)) < 0)
+        {
+            fprintf(stderr, "    Cannot open decompressed data file '%s'\n", DECOMPRESS_FILE_NAME);
+            exit(2);
+        }
+    }
+
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    
+    if ((lpc10_enc_state = lpc10_encode_init(NULL, TRUE)) == NULL)
+    {
+        fprintf(stderr, "    Cannot create encoder\n");
+        exit(2);
+    }
+            
+    if ((lpc10_dec_state = lpc10_decode_init(NULL, TRUE)) == NULL)
+    {
+        fprintf(stderr, "    Cannot create decoder\n");
+        exit(2);
+    }
+
+    if (compress)
+    {
+        if ((compress_file = open(COMPRESS_FILE_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
+        {
+            fprintf(stderr, "    Cannot create compressed data file '%s'\n", COMPRESS_FILE_NAME);
+            exit(2);
+        }
+    }
+
+    pre_energy = 0.0;
+    post_energy = 0.0;
+    ref_energy = 0.0;
+    diff_energy = 0.0;
+
+    if (decompress)
+    {
+        while ((len = read(decompress_file, lpc10_data, BLOCKS_PER_READ*7)) > 0)
+        {
+            lpc10_decode(lpc10_dec_state, post_amp, lpc10_data, len/7);
+            outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, BLOCK_LEN*len/7);
+        }
+    }
+    else
+    {
+        block_no = 0;
+        while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, pre_amp, BLOCKS_PER_READ*BLOCK_LEN)) == BLOCKS_PER_READ*BLOCK_LEN
+                &&
+                (frames = afReadFrames(refhandle, AF_DEFAULT_TRACK, ref_amp, BLOCKS_PER_READ*BLOCK_LEN)) == BLOCKS_PER_READ*BLOCK_LEN)
+        {
+            lpc10_encode(lpc10_enc_state, lpc10_data, pre_amp, BLOCKS_PER_READ);
+            if (compress)
+                write(compress_file, lpc10_data, BLOCKS_PER_READ*7);
+            lpc10_decode(lpc10_dec_state, post_amp, lpc10_data, BLOCKS_PER_READ);
+            for (i = 0;  i < BLOCK_LEN;  i++)
+            {
+                pre_energy += (double) pre_amp[i]*(double) pre_amp[i];
+                post_energy += (double) post_amp[i]*(double) post_amp[i];
+                ref_energy += (double) ref_amp[i]*(double) ref_amp[i];
+                /* The reference file has some odd clipping, so eliminate this from the
+                   energy measurement. */
+                if (ref_amp[i] == 32767  ||  ref_amp[i] == -32768)
+                    xx = 0.0;
+                else
+                    xx = post_amp[i] - ref_amp[i];
+                diff_energy += (double) xx*(double) xx;
+                log_amp[i] = xx;
+            }
+            block_no++;
+            if (log_error)
+                outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, log_amp, frames);
+            else
+                outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, frames);
+        }
+        if (afCloseFile(inhandle) != 0)
+        {
+            printf("    Cannot close wave file '%s'\n", in_file_name);
+            exit(2);
+        }
+        if (afCloseFile(refhandle) != 0)
+        {
+            printf("    Cannot close wave file '%s'\n", REF_FILE_NAME);
+            exit(2);
+        }
+    }
+    
+    if (afCloseFile(outhandle) != 0)
+    {
+        printf("    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    if (compress)
+        close(compress_file);
+    if (decompress)
+        close(decompress_file);
+    lpc10_encode_release(lpc10_enc_state);
+    lpc10_decode_release(lpc10_dec_state);
+
+    if (!decompress)
+    {
+        printf("Output energy is %f%% of input energy.\n", 100.0*post_energy/pre_energy);
+        printf("Difference energy is %f%% of the total.\n", 100.0*diff_energy/ref_energy);
+        if (fabs(1.0 - post_energy/pre_energy) > 0.05
+            ||
+            fabs(diff_energy/post_energy) > 0.03)
+        {
+            printf("Tests failed.\n");
+            exit(2);
+        }
+        printf("Tests passed.\n");
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/make_g168_css.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,387 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * makecss.c - Create the composite source signal (CSS) for G.168 testing.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: make_g168_css.c,v 1.9 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page makecss_page CSS construction for G.168 testing
+\section makecss_page_sec_1 What does it do?
+???.
+
+\section makecss_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <string.h>
+#include <time.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+#if defined(HAVE_FFTW3_H)
+#include <fftw3.h>
+#else
+#include <fftw.h>
+#endif
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#define GEN_CONST
+#include <math.h>
+#endif
+
+#include "spandsp.h"
+#include "spandsp/g168models.h"
+
+#if !defined(NULL)
+#define NULL (void *) 0
+#endif
+
+#define FAST_SAMPLE_RATE    44100.0
+
+static double scaling(double f, double start, double end, double start_gain, double end_gain)
+{
+    double scale;
+
+    scale = start_gain + (f - start)*(end_gain - start_gain)/(end - start);
+    return scale;
+}
+
+int main(int argc, char *argv[])
+{
+#if defined(HAVE_FFTW3_H)
+    double in[8192][2];
+    double out[8192][2];
+#else
+    fftw_complex in[8192];
+    fftw_complex out[8192];
+#endif
+    fftw_plan p;
+    int16_t voiced_sound[8192];
+    int16_t noise_sound[8192];
+    int16_t silence_sound[8192];
+    int i;
+    int j;
+    int outframes;
+    int voiced_length;
+    float f;
+    double peak;
+    double ms;
+    double scale;
+    AFfilehandle filehandle;
+    AFfilesetup filesetup;
+    awgn_state_t noise_source;
+
+    filesetup = afNewFileSetup();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, FAST_SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+    filehandle = afOpenFile("sound_c1.wav", "w", filesetup);
+    if (filehandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open result file\n");
+        exit(2);
+    }
+
+    for (i = 0;  i < (int)(sizeof(css_c1)/sizeof(css_c1[0]));  i++)
+        voiced_sound[i] = css_c1[i];
+    voiced_length = i;
+
+    ms = 0;
+    peak = 0;
+    for (i = 0;  i < voiced_length;  i++)
+    {
+        if (abs(voiced_sound[i]) > peak)
+            peak = abs(voiced_sound[i]);
+        ms += voiced_sound[i]*voiced_sound[i];
+    }
+    ms = 20.0*log10(sqrt(ms/voiced_length)/32767.0) + DBM0_MAX_POWER;
+    printf("Voiced level = %.2fdB\n", ms);
+
+#if defined(HAVE_FFTW3_H)    
+    p = fftw_plan_dft_1d(8192, in, out, FFTW_BACKWARD, FFTW_ESTIMATE);
+#else
+    p = fftw_create_plan(8192, FFTW_BACKWARD, FFTW_ESTIMATE);
+#endif
+    for (i = 0;  i < 8192;  i++)
+    {
+#if defined(HAVE_FFTW3_H)
+        in[i][0] = 0.0;
+        in[i][1] = 0.0;
+#else
+        in[i].re = 0.0;
+        in[i].im = 0.0;
+#endif
+    }
+    for (i = 1;  i <= 3715;  i++)
+    {
+        f = FAST_SAMPLE_RATE*i/8192.0;
+
+#if 1
+        if (f < 50.0)
+            scale = -60.0;
+        else if (f < 100.0)
+            scale = scaling(f, 50.0, 100.0, -25.8, -12.8);
+        else if (f < 200.0)
+            scale = scaling(f, 100.0, 200.0, -12.8, 17.4);
+        else if (f < 215.0)
+            scale = scaling(f, 200.0, 215.0, 17.4, 17.8);
+        else if (f < 500.0)
+            scale = scaling(f, 215.0, 500.0, 17.8, 12.2);
+        else if (f < 1000.0)
+            scale = scaling(f, 500.0, 1000.0, 12.2, 7.2);
+        else if (f < 2850.0)
+            scale = scaling(f, 1000.0, 2850.0, 7.2, 0.0);
+        else if (f < 3600.0)
+            scale = scaling(f, 2850.0, 3600.0, 0.0, -2.0);
+        else if (f < 3660.0)
+            scale = scaling(f, 3600.0, 3660.0, -2.0, -20.0);
+        else if (f < 3680.0)
+            scale = scaling(f, 3600.0, 3680.0, -20.0, -30.0);
+        else
+            scale = -60.0;
+#else
+        scale = 0.0;
+#endif
+#if defined(HAVE_FFTW3_H)    
+        in[i][0] = 0.0;
+        in[i][1] = (rand() & 0x1)  ?  1.0  :  -1.0;
+        in[i][1] *= pow(10.0, scale/20.0);
+        in[i][1] *= 35.0; //305360
+        //printf("%10d %15.5f %15.5f\n", i, in[i].re, in[i].im);
+        in[8192 - i][0] = 0.0;
+        in[8192 - i][1] = -in[i][1];
+        //printf("%10d %15.5f %15.5f\n", i, in[i][0], in[i][1]);
+#else
+        in[i].re = 0.0;
+        in[i].im = (rand() & 0x1)  ?  1.0  :  -1.0;
+        in[i].im *= pow(10.0, scale/20.0);
+        in[i].im *= 35.0; //305360
+        in[8192 - i].re = 0.0;
+        in[8192 - i].im = -in[i].im;
+        //printf("%10d %15.5f %15.5f\n", i, in[i].re, in[i].im);
+#endif
+    }
+#if defined(HAVE_FFTW3_H)    
+    fftw_execute(p);
+#else
+    fftw_one(p, in, out);
+#endif
+    for (i = 0;  i < 8192;  i++)
+    {
+        //printf("%10d %15.5f %15.5f\n", i, out[i].re, out[i].im);
+#if defined(HAVE_FFTW3_H)    
+        noise_sound[i] = out[i][0];
+#else
+        noise_sound[i] = out[i].re;
+#endif
+    }
+
+    peak = 0;
+    ms = 0;
+    for (i = 0;  i < 8192;  i++)
+    {
+        if (abs(noise_sound[i]) > peak)
+            peak = abs(noise_sound[i]);
+        ms += noise_sound[i]*noise_sound[i];
+    }
+    printf("Noise level = %.2fdB\n", 20.0*log10(sqrt(ms/8192.0)/32767.0) + DBM0_MAX_POWER);
+    printf("Crest factor = %.2fdB\n", 20.0*log10(peak/sqrt(ms/8192.0)));
+    
+    for (i = 0;  i < 8192;  i++)
+        silence_sound[i] = 0.0;
+
+    for (j = 0;  j < 16;  j++)
+    {
+        outframes = afWriteFrames(filehandle,
+                                  AF_DEFAULT_TRACK,
+                                  voiced_sound,
+                                  voiced_length);
+    }
+    printf("%d samples of voice\n", 16*voiced_length);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              noise_sound,
+                              8192);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              noise_sound,
+                              8820 - 8192);
+    printf("%d samples of noise\n", 8820);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              silence_sound,
+                              4471);
+    printf("%d samples of silence\n", 4471);
+
+    for (j = 0;  j < voiced_length;  j++)
+        voiced_sound[j] = -voiced_sound[j];
+    for (j = 0;  j < 8192;  j++)
+        noise_sound[j] = -noise_sound[j];
+
+    for (j = 0;  j < 16;  j++)
+    {
+        outframes = afWriteFrames(filehandle,
+                                  AF_DEFAULT_TRACK,
+                                  voiced_sound,
+                                  voiced_length);
+    }
+    printf("%d samples of voice\n", 16*voiced_length);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              noise_sound,
+                              8192);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              noise_sound,
+                              8820 - 8192);
+    printf("%d samples of noise\n", 8820);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              silence_sound,
+                              4471);
+    printf("%d samples of silence\n", 4471);
+
+    if (afCloseFile(filehandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close speech file '%s'\n", "sound_c1.wav");
+        exit(2);
+    }
+
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, FAST_SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+    filehandle = afOpenFile("sound_c3.wav", "w", filesetup);
+    if (filehandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open result file\n");
+        exit(2);
+    }
+
+    for (i = 0;  i < (int) (sizeof(css_c3)/sizeof(css_c3[0]));  i++)
+        voiced_sound[i] = css_c3[i];
+    voiced_length = i;
+
+    ms = 0;
+    for (i = 0;  i < voiced_length;  i++)
+    {
+        if (abs(voiced_sound[i]) > peak)
+            peak = abs(voiced_sound[i]);
+        ms += voiced_sound[i]*voiced_sound[i];
+    }
+    ms = 20.0*log10(sqrt(ms/voiced_length)/32767.0) + DBM0_MAX_POWER;
+    printf("Voiced level = %.2fdB\n", ms);
+
+    awgn_init_dbm0(&noise_source, 7162534, ms);
+    for (i = 0;  i < 8192;  i++)
+        noise_sound[i] = awgn(&noise_source);
+    peak = 0;
+    ms = 0;
+    for (i = 0;  i < 8192;  i++)
+    {
+        if (abs(noise_sound[i]) > peak)
+            peak = abs(noise_sound[i]);
+        ms += noise_sound[i]*noise_sound[i];
+    }
+    printf("Noise level = %.2fdB\n", 20.0*log10(sqrt(ms/8192.0)/32767.0) + DBM0_MAX_POWER);
+    printf("Crest factor = %.2fdB\n", 20.0*log10(peak/sqrt(ms/8192.0)));
+
+    for (j = 0;  j < 14;  j++)
+    {
+        outframes = afWriteFrames(filehandle,
+                                  AF_DEFAULT_TRACK,
+                                  voiced_sound,
+                                  voiced_length);
+    }
+    printf("%d samples of voice\n", 14*i);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              noise_sound,
+                              8192);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              noise_sound,
+                              8820 - 8192);
+    printf("%d samples of noise\n", 8820);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              silence_sound,
+                              5614);
+    printf("%d samples of silence\n", 5614);
+
+    for (j = 0;  j < voiced_length;  j++)
+        voiced_sound[j] = -voiced_sound[j];
+    for (j = 0;  j < 8192;  j++)
+        noise_sound[j] = -noise_sound[j];
+
+    for (j = 0;  j < 14;  j++)
+    {
+        outframes = afWriteFrames(filehandle,
+                                  AF_DEFAULT_TRACK,
+                                  voiced_sound,
+                                  voiced_length);
+    }
+    printf("%d samples of voice\n", 14*i);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              noise_sound,
+                              8192);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              noise_sound,
+                              8820 - 8192);
+    printf("%d samples of noise\n", 8820);
+    outframes = afWriteFrames(filehandle,
+                              AF_DEFAULT_TRACK,
+                              silence_sound,
+                              5614);
+    printf("%d samples of silence\n", 5614);
+
+    if (afCloseFile(filehandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close speech file '%s'\n", "sound_c3.wav");
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+
+    fftw_destroy_plan(p);
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/make_line_models.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,1041 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * make_line_models.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: make_line_models.c,v 1.19 2006/11/23 15:48:09 steveu Exp $
+ */
+
+/*! \page make_line_models_page Telephony line model construction
+\section make_line_models_page_sec_1 What does it do?
+???.
+
+\section make_line_models_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(HAVE_FFTW3_H)
+#include <fftw3.h>
+#else
+#include <fftw.h>
+#endif
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#if !defined(M_PI)
+# define M_PI           3.14159265358979323846  /* pi */
+#endif
+
+#define SAMPLE_RATE         8000
+
+#define LINE_FILTER_SIZE    129
+#define FFT_SIZE            1024
+
+/* Tabulated medium range telephone line response
+   (from p 537, Digital Communication, John G. Proakis */
+/*
+    amp 1.0 -> 2.15, freq = 3000 Hz -> 3.2, by 0.2 increments 
+    delay = 4 ms -> 2.2
+ */
+
+struct
+{
+    int frequency;
+    float amp;
+    float delay;
+} proakis[] =
+{
+    {   0, 0.00,  4.80},
+    { 200, 0.90,  3.50},
+    { 400, 1.40,  2.20},
+    { 600, 1.80,  0.90},
+    { 800, 2.00,  0.50},
+    {1000, 2.10,  0.25},
+    {1200, 2.30,  0.10},
+    {1400, 2.30,  0.05},
+    {1600, 2.20,  0.00},
+    {1800, 2.10,  0.00},
+    {2000, 2.00,  0.00},
+    {2200, 1.85,  0.05},
+    {2400, 1.75,  0.10},
+    {2600, 1.55,  0.20},
+    {2800, 1.30,  0.40},
+    {3000, 1.10,  0.50},
+    {3200, 0.80,  0.90},
+    {3400, 0.55,  1.20},
+    {3600, 0.25,  2.20},
+    {3800, 0.05,  3.20},
+    {4000, 0.05,  4.20},
+    {4200, 0.05,  5.20}
+};
+
+#define CPE_TO_CO_ATTENUATION       0       /* In dB */
+#define CPE_TO_CO_DELAY             1       /* In us */
+#define CPE_TO_CO_IMPEDANCE         2       /* In ohms */
+#define CPE_TO_CO_PHASE             3       /* In degrees */
+#define CO_TO_CPE_IMPEDANCE         4       /* In ohms */
+#define CO_TO_CPE_PHASE             5       /* In degrees */
+#define CO_TO_CPE_ATTENUATION       6       /* In dB */
+#define CO_TO_CPE_DELAY             7       /* In us */
+
+/* Terms used, for V.56bis:
+    AD = attenuation distortion
+    EDD = envelope delay distortion */
+
+/* V.56bis EIA LL-1, non-loaded loop */
+
+struct
+{
+    int freq;
+    float ad[8];
+} eia_ll1[] =
+{
+    { 200,    {0.0,    0.4,    767,     -1.4,    767,     -1.4,    0.0,    0.4}},
+    { 300,    {0.0,    0.7,    766,     -2.0,    766,     -2.0,    0.0,    0.7}},
+    { 400,    {0.0,    0.5,    763,     -2.8,    763,     -2.8,    0.0,    0.5}},
+    { 500,    {0.0,    0.6,    765,     -3.4,    765,     -3.4,    0.0,    0.6}},
+    { 600,    {0.0,    0.2,    764,     -4.1,    764,     -4.1,    0.0,    0.2}},
+    { 700,    {0.0,    0.4,    764,     -4.7,    764,     -4.7,    0.0,    0.4}},
+    { 800,    {0.0,    0.4,    762,     -5.4,    762,     -5.4,    0.0,    0.4}},
+    { 900,    {0.0,    0.2,    762,     -6.0,    762,     -6.0,    0.0,    0.2}},
+    {1000,    {1.2,    0.5,    761,     -6.7,    761,     -6.7,    1.2,    0.5}},
+    {1100,    {0.0,    0.6,    759,     -7.4,    759,     -7.4,    0.0,    0.6}},
+    {1200,    {0.0,    0.4,    757,     -8.1,    757,     -8.1,    0.0,    0.4}},
+    {1300,    {0.0,    0.1,    757,     -8.6,    757,     -8.6,    0.0,    0.1}},
+    {1400,    {0.0,    0.3,    755,     -9.3,    755,     -9.3,    0.0,    0.3}},
+    {1500,    {0.0,    0.4,    753,    -10.0,    753,    -10.0,    0.0,    0.4}},
+    {1600,    {0.0,    0.3,    751,    -10.7,    751,    -10.7,    0.0,    0.3}},
+    {1700,    {0.0,    0.1,    748,    -11.3,    748,    -11.3,    0.0,    0.1}},
+    {1800,    {0.0,   11.0,    748,    -11.9,    748,    -11.9,    0.0,   11.0}},
+    {1900,    {0.1,    0.1,    745,    -12.5,    745,    -12.5,    0.1,    0.1}},
+    {2000,    {0.1,    0.3,    743,    -13.9,    743,    -13.9,    0.1,    0.3}},
+    {2100,    {0.1,    0.3,    740,    -13.9,    740,    -13.9,    0.1,    0.3}},
+    {2200,    {0.1,    0.3,    737,    -14.5,    737,    -14.5,    0.1,    0.3}},
+    {2300,    {0.1,    0.3,    734,    -15.2,    734,    -15.2,    0.1,    0.3}},
+    {2400,    {0.1,    0.2,    731,    -15.8,    731,    -15.8,    0.1,    0.2}},
+    {2500,    {0.1,    0.0,    728,    -16.4,    728,    -16.4,    0.1,    0.0}},
+    {2600,    {0.1,    0.0,    729,    -16.8,    729,    -16.8,    0.1,    0.0}},
+    {2700,    {0.2,    0.1,    726,    -17.4,    726,    -17.4,    0.2,    0.1}},
+    {2800,    {0.2,    0.2,    722,    -18.0,    722,    -18.0,    0.2,    0.2}},
+    {2900,    {0.2,    0.3,    719,    -18.6,    719,    -18.6,    0.2,    0.3}},
+    {3000,    {0.2,    0.4,    715,    -19.3,    715,    -19.3,    0.2,    0.4}},
+    {3100,    {0.2,    0.4,    712,    -19.9,    712,    -19.9,    0.2,    0.4}},
+    {3200,    {0.2,    0.5,    708,    -20.5,    708,    -20.5,    0.2,    0.5}},
+    {3300,    {0.2,    0.5,    704,    -21.1,    704,    -21.1,    0.2,    0.5}},
+    {3400,    {0.2,    0.5,    700,    -21.7,    700,    -21.7,    0.2,    0.5}},
+    {3500,    {0.2,    0.5,    696,    -22.3,    696,    -22.3,    0.2,    0.5}},
+    {3600,    {0.2,    0.4,    692,    -22.9,    692,    -22.9,    0.2,    0.4}},
+    {3700,    {0.2,    0.3,    688,    -23.5,    688,    -23.5,    0.2,    0.3}},
+    {3800,    {0.2,    0.2,    684,    -24.1,    684,    -24.1,    0.2,    0.2}},
+    {3900,    {0.2,    0.1,    680,    -24.7,    680,    -24.7,    0.2,    0.1}},
+    {4000,    {0.2,   -0.1,    676,    -25.2,    676,    -25.2,    0.2,   -0.1}}
+};
+
+/* V.56bis EIA LL-2, non-loaded loop */
+
+struct
+{
+    int freq;
+    float ad[8];
+} eia_ll2[] =
+{
+    { 200,   {-0.2,    6.6,   1086,     -4.9,   1085,     -5.6,   -0.2,    6.6}},
+    { 300,   {-0.2,    7.7,   1079,     -7.3,   1077,     -8.3,   -0.2,    7.7}},
+    { 400,   {-0.2,    6.7,   1062,     -9.9,   1058,    -11.2,   -0.2,    6.7}},
+    { 500,   {-0.2,    7.1,   1059,    -12.0,   1053,    -13.6,   -0.2,    7.1}},
+    { 600,   {-0.1,    5.2,   1041,    -14.4,   1034,    -16.3,   -0.1,    5.2}},
+    { 700,   {-0.1,    5.8,   1030,    -16.5,   1020,    -18.6,   -0.1,    5.8}},
+    { 800,   {-0.1,    5.4,   1010,    -18.7,    998,    -21.0,   -0.1,    5.4}},
+    { 900,   { 0.0,    4.5,    997,    -20.5,    982,    -23.1,    0.0,    4.5}},
+    {1000,   { 3.2,    5.1,    976,    -22.5,    959,    -25.3,    3.2,    5.1}},
+    {1100,   { 0.1,    5.0,    954,    -24.5,    934,    -27.4,    0.1,    5.0}},
+    {1200,   { 0.1,    4.0,    931,    -26.2,    909,    -29.4,    0.1,    4.0}},
+    {1300,   { 0.2,    2.7,    918,    -27.6,    894,    -30.9,    0.2,    2.7}},
+    {1400,   { 0.2,    2.8,    897,    -29.2,    871,    -32.6,    0.2,    2.8}},
+    {1500,   { 0.3,    2.6,    874,    -30.7,    847,    -34.3,    0.3,    2.6}},
+    {1600,   { 0.3,    2.0,    852,    -32.1,    823,    -35.8,    0.3,    2.0}},
+    {1700,   { 0.4,    0.9,    831,    -33.4,    800,    -37.2,    0.4,    0.9}},
+    {1800,   { 0.5,   40.8,    816,    -34.4,    783,    -38.4,    0.5,   40.8}},
+    {1900,   { 0.6,    0.0,    796,    -35.6,    762,    -39.6,    0.6,    0.0}},
+    {2000,   { 0.6,   -0.2,    776,    -36.6,    741,    -40.7,    0.6,   -0.2}},
+    {2100,   { 0.7,   -0.6,    756,    -37.6,    720,    -41.8,    0.7,   -0.6}},
+    {2200,   { 0.8,   -1.1,    737,    -38.6,    700,    -42.9,    0.8,   -1.1}},
+    {2300,   { 0.9,   -1.8,    719,    -39.4,    681,    -43.8,    0.9,   -1.8}},
+    {2400,   { 1.0,   -2.6,    701,    -40.2,    663,    -44.7,    1.0,   -2.6}},
+    {2500,   { 1.0,   -3.7,    684,    -41.0,    646,    -45.5,    1.0,   -3.7}},
+    {2600,   { 1.1,   -4.1,    678,    -41.3,    639,    -45.9,    1.1,   -4.1}},
+    {2700,   { 1.2,   -4.3,    663,    -42.0,    623,    -46.6,    1.2,   -4.3}},
+    {2800,   { 1.3,   -4.5,    647,    -42.6,    607,    -47.3,    1.3,   -4.5}},
+    {2900,   { 1.4,   -4.8,    632,    -43.1,    591,    -47.9,    1.4,   -4.8}},
+    {3000,   { 1.5,   -5.2,    617,    -43.6,    576,    -48.4,    1.5,   -5.2}},
+    {3100,   { 1.6,   -5.6,    603,    -44.1,    562,    -49.0,    1.6,   -5.6}},
+    {3200,   { 1.7,   -6.0,    589,    -44.5,    548,    -49.5,    1.7,   -6.0}},
+    {3300,   { 1.8,   -6.5,    576,    -44.9,    535,    -49.9,    1.8,   -6.5}},
+    {3400,   { 1.9,   -7.1,    563,    -45.3,    522,    -50.3,    1.9,   -7.1}},
+    {3500,   { 2.0,   -7.7,    551,    -45.6,    509,    -50.7,    2.0,   -7.7}},
+    {3600,   { 2.1,   -8.4,    539,    -45.9,    498,    -51.0,    2.1,   -8.4}},
+    {3700,   { 2.2,   -9.1,    528,    -46.2,    486,    -51.3,    2.2,   -9.1}},
+    {3800,   { 2.3,   -9.9,    518,    -46.4,    476,    -51.6,    2.3,   -9.9}},
+    {3900,   { 2.4,  -10.6,    507,    -46.6,    466,    -51.9,    2.4,  -10.6}},
+    {4000,   { 2.5,  -11.5,    498,    -46.8,    456,    -52.1,    2.5,  -11.5}}
+};
+
+/* V.56bis EIA LL-3, non-loaded loop */
+
+struct
+{
+    int freq;
+    float ad[8];
+} eia_ll3[] =
+{
+    { 200,   {-0.3,   10.5,   1176,     -5.9,   1173,     -7.4,   -0.3,   10.5}},
+    { 300,   {-0.3,   11.5,   1165,     -8.8,   1159,    -11.0,   -0.3,   11.5}},
+    { 400,   {-0.3,   10.6,   1140,    -11.8,   1130,    -14.7,   -0.3,   10.6}},
+    { 500,   {-0.3,   11.0,   1133,    -14.3,   1117,    -17.8,   -0.3,   11.0}},
+    { 600,   {-0.2,    8.5,   1108,    -17.1,   1086,    -21.2,   -0.2,    8.5}},
+    { 700,   {-0.2,    8.5,   1090,    -19.4,   1062,    -24.0,   -0.2,    8.5}},
+    { 800,   {-0.1,    8.4,   1062,    -21.9,   1029,    -27.0,   -0.1,    8.4}},
+    { 900,   { 0.0,    7.1,   1042,    -23.9,   1003,    -29.4,    0.0,    7.1}},
+    {1000,   { 3.8,    7.7,   1013,    -23.0,    969,    -31.9,    3.8,    7.7}},
+    {1100,   { 0.1,    7.4,    982,    -28.1,    934,    -34.3,    0.1,    7.4}},
+    {1200,   { 0.1,    6.0,    953,    -29.9,    900,    -36.5,    0.1,    6.0}},
+    {1300,   { 0.2,    4.2,    935,    -31.3,    878,    -38.1,    0.2,    4.2}},
+    {1400,   { 0.3,    4.2,    907,    -32.8,    847,    -40.0,    0.3,    4.2}},
+    {1500,   { 0.4,    3.7,    880,    -34.3,    817,    -41.7,    0.4,    3.7}},
+    {1600,   { 0.5,    2.7,    853,    -35.6,    787,    -43.2,    0.5,    2.7}},
+    {1700,   { 0.6,    1.2,    827,    -36.8,    760,    -44.6,    0.6,    1.2}},
+    {1800,   { 0.7,   48.7,    809,    -37.8,    739,    -45.8,    0.7,   48.7}},
+    {1900,   { 0.8,   -0.2,    785,    -38.8,    715,    -47.0,    0.8,   -0.2}},
+    {2000,   { 0.9,   -0.7,    763,    -39.7,    691,    -48.0,    0.9,   -0.7}},
+    {2100,   { 1.0,   -1.3,    741,    -40.5,    668,    -49.1,    1.0,   -1.3}},
+    {2200,   { 1.1,   -2.1,    719,    -41.3,    647,    -50.0,    1.1,   -2.1}},
+    {2300,   { 1.2,   -2.1,    699,    -42.0,    625,    -50.8,    1.2,   -2.1}},
+    {2400,   { 1.2,   -4.3,    680,    -42.6,    606,    -51.6,    1.2,   -4.3}},
+    {2500,   { 1.3,   -5.6,    663,    -43.2,    588,    -52.3,    1.3,   -5.6}},
+    {2600,   { 1.6,   -6.2,    656,    -43.4,    581,    -52.7,    1.6,   -6.2}},
+    {2700,   { 1.7,   -6.6,    640,    -43.9,    564,    -53.3,    1.7,   -6.6}},
+    {2800,   { 1.8,   -7.0,    624,    -44.3,    548,    -53.9,    1.8,   -7.0}},
+    {2900,   { 1.9,   -7.5,    609,    -44.7,    533,    -54.4,    1.9,   -7.5}},
+    {3000,   { 2.0,   -8.0,    594,    -45.0,    518,    -54.8,    2.0,   -8.0}},
+    {3100,   { 2.2,   -8.6,    580,    -45.3,    504,    -55.3,    2.2,   -8.6}},
+    {3200,   { 2.3,   -9.2,    566,    -45.6,    490,    -55.7,    2.3,   -9.2}},
+    {3300,   { 2.4,   -9.9,    553,    -45.8,    477,    -56.0,    2.4,   -9.9}},
+    {3400,   { 2.6,  -10.7,    540,    -46.0,    465,    -56.3,    2.6,  -10.7}},
+    {3500,   { 2.7,  -11.4,    529,    -46.2,    454,    -56.6,    2.7,  -11.4}},
+    {3600,   { 2.8,  -12.3,    517,    -46.3,    443,    -56.9,    2.8,  -12.3}},
+    {3700,   { 3.0,  -13.1,    507,    -46.4,    432,    -57.1,    3.0,  -13.1}},
+    {3800,   { 3.1,  -14.0,    497,    -46.5,    422,    -57.3,    3.1,  -14.0}},
+    {3900,   { 3.2,  -14.9,    487,    -46.6,    413,    -57.5,    3.2,  -14.9}},
+    {4000,   { 3.3,  -15.9,    478,    -46.6,    404,    -57.7,    3.3,  -15.9}}
+};
+
+
+/* V.56bis EIA LL-4, non-loaded loop */
+
+struct
+{
+    int freq;
+    float ad[8];
+} eia_ll4[] =
+{
+    { 200,   {-0.8,   31.0,   1564,    -10.7,   1564,    -10.7,   -0.8,   31.0}},
+    { 300,   {-0.8,   32.6,   1520,    -15.6,   1520,    -15.6,   -0.8,   32.6}},
+    { 400,   {-0.8,   29.8,   1447,    -20.5,   1447,    -20.5,   -0.8,   29.8}},
+    { 500,   {-0.6,   29.7,   1402,    -24.3,   1402,    -24.3,   -0.6,   29.7}},
+    { 600,   {-0.5,   24.9,   1328,    -28.1,   1328,    -28.1,   -0.5,   24.9}},
+    { 700,   {-0.4,   24.8,   1270,    -31.2,   1270,    -31.2,   -0.4,   24.8}},
+    { 800,   {-0.3,   22.7,   1200,    -34.0,   1200,    -34.0,   -0.3,   22.7}},
+    { 900,   {-0.1,   19.8,   1148,    -36.2,   1148,    -36.2,   -0.1,   19.8}},
+    {1000,   { 6.1,   19.3,   1086,    -38.3,   1086,    -38.3,    6.1,   19.3}},
+    {1100,   { 0.1,   17.5,   1027,    -40.1,   1027,    -40.1,    0.1,   17.5}},
+    {1200,   { 0.3,   14.3,    974,    -41.6,    974,    -41.6,    0.3,   14.3}},
+    {1300,   { 0.5,   10.9,    941,    -42.6,    941,    -42.6,    0.5,   10.9}},
+    {1400,   { 0.7,    9.6,    897,    -43.7,    897,    -43.7,    0.7,    9.6}},
+    {1500,   { 0.9,    7.7,    856,    -44.6,    856,    -44.6,    0.9,    7.7}},
+    {1600,   { 1.1,    5.3,    818,    -45.3,    818,    -45.3,    1.1,    5.3}},
+    {1700,   { 1.3,    2.4,    784,    -45.9,    784,    -45.9,    1.3,    2.4}},
+    {1800,   { 1.4,   69.1,    761,    -46.3,    761,    -46.3,    1.4,   69.1}},
+    {1900,   { 1.7,   -1.3,    732,    -46.6,    732,    -46.6,    1.7,   -1.3}},
+    {2000,   { 1.9,   -2.7,    706,    -46.9,    706,    -46.9,    1.9,   -2.7}},
+    {2100,   { 2.1,   -4.3,    682,    -47.1,    682,    -47.1,    2.1,   -4.3}},
+    {2200,   { 2.3,   -6.0,    659,    -47.3,    659,    -47.3,    2.3,   -6.0}},
+    {2300,   { 2.5,   -7.9,    638,    -47.4,    638,    -47.4,    2.5,   -7.9}},
+    {2400,   { 2.7,   -9.9,    619,    -47.4,    619,    -47.4,    2.7,   -9.9}},
+    {2500,   { 2.9,  -12.0,    602,    -47.5,    602,    -47.5,    2.9,  -12.0}},
+    {2600,   { 3.1,  -13.0,    596,    -47.4,    596,    -47.4,    3.1,  -13.0}},
+    {2700,   { 3.3,  -13.9,    580,    -47.4,    580,    -47.4,    3.3,  -13.9}},
+    {2800,   { 3.5,  -14.8,    566,    -47.3,    566,    -47.3,    3.5,  -14.8}},
+    {2900,   { 3.7,  -15.7,    552,    -47.2,    552,    -47.2,    3.7,  -15.7}},
+    {3000,   { 3.9,  -16.7,    539,    -47.1,    539,    -47.1,    3.9,  -16.7}},
+    {3100,   { 4.1,  -17.7,    526,    -47.0,    526,    -47.0,    4.1,  -17.7}},
+    {3200,   { 4.3,  -18.7,    515,    -46.8,    515,    -46.8,    4.3,  -18.7}},
+    {3300,   { 4.5,  -19.8,    504,    -46.7,    504,    -46.7,    4.5,  -19.8}},
+    {3400,   { 4.7,  -20.8,    493,    -46.5,    493,    -46.5,    4.7,  -20.8}},
+    {3500,   { 4.9,  -21.8,    484,    -46.4,    484,    -46.4,    4.9,  -21.8}},
+    {3600,   { 5.1,  -22.9,    475,    -46.2,    475,    -46.2,    5.1,  -22.9}},
+    {3700,   { 5.3,  -23.9,    466,    -46.0,    466,    -46.0,    5.3,  -23.9}},
+    {3800,   { 5.5,  -25.0,    458,    -45.9,    458,    -45.9,    5.5,  -25.0}},
+    {3900,   { 5.6,  -26.1,    451,    -45.7,    451,    -45.7,    5.6,  -26.1}},
+    {4000,   { 5.8,  -27.2,    444,    -45.5,    444,    -45.5,    5.8,  -27.2}}
+};
+
+
+/* V.56bis EIA LL-5, non-loaded loop */
+
+struct
+{
+    int freq;
+    float ad[8];
+} eia_ll5[] =
+{
+    { 200,   {-1.4,    55.8,   1607,   -12.7,   1574,    -17.4,   -1.4,   55.8}},
+    { 300,   {-1.3,    57.2,   1541,   -18.3,   1478,    -24.8,   -1.3,   57.2}},
+    { 400,   {-1.2,    52.2,   1443,   -23.6,   1350,    -31.5,   -1.2,   52.2}},
+    { 500,   {-1.0,    51.0,   1379,   -27.5,   1261,    -36.4,   -1.0,   51.0}},
+    { 600,   {-0.9,    43.2,   1287,   -31.2,   1150,    -40.7,   -0.9,   43.2}},
+    { 700,   {-0.7,    41.8,   1216,   -34.0,   1066,    -44.0,   -0.7,   41.8}},
+    { 800,   {-0.5,    37.4,   1137,   -36.5,    979,    -46.9,   -0.5,   37.4}},
+    { 900,   {-0.2,    32.4,   1080,   -38.3,    915,    -48.9,   -0.2,   32.4}},
+    {1000,   { 7.0,    30.5,   1015,   -39.8,    848,    -50.7,    7.0,   30.5}},
+    {1100,   { 0.3,    26.8,    956,   -41.1,    788,    -52.2,    0.3,   26.8}},
+    {1200,   { 0.5,    21.5,    904,   -42.1,    736,    -53.3,    0.5,   21.5}},
+    {1300,   { 0.8,    16.6,    873,   -42.7,    703,    -54.1,    0.8,   16.6}},
+    {1400,   { 1.0,    14.1,    832,   -43.2,    663,    -54.8,    1.0,   14.1}},
+    {1500,   { 1.3,    10.9,    795,   -43.7,    627,    -55.3,    1.3,   10.9}},
+    {1600,   { 1.6,     7.3,    762,   -44.0,    595,    -55.7,    1.6,    7.3}},
+    {1700,   { 1.9,     3.2,    733,   -44.2,    567,    -56.0,    1.9,    3.2}},
+    {1800,   { 2.2,    81.5,    713,   -44.3,    547,    -56.2,    2.2,   81.5}},
+    {1900,   { 2.4,    -1.9,    689,   -44.4,    524,    -56.4,    2.4,   -1.9}},
+    {2000,   { 2.7,    -3.9,    667,   -44.4,    503,    -56.5,    2.7,   -3.9}},
+    {2100,   { 3.0,    -6.1,    646,   -44.4,    485,    -56.5,    3.0,   -6.1}},
+    {2200,   { 3.3,    -8.3,    628,   -44.4,    466,    -56.5,    3.3,   -8.3}},
+    {2300,   { 3.6,   -10.7,    610,   -44.3,    450,    -56.5,    3.6,  -10.7}},
+    {2400,   { 3.8,   -13.1,    595,   -44.2,    436,    -56.4,    3.8,  -13.1}},
+    {2500,   { 4.1,   -15.5,    581,   -44.1,    422,    -56.3,    4.1,  -15.5}},
+    {2600,   { 4.3,   -16.7,    577,   -44.0,    417,    -56.2,    4.3,  -16.7}},
+    {2700,   { 4.6,   -17.7,    565,   -43.9,    406,    -56.1,    4.6,  -17.7}},
+    {2800,   { 4.8,   -18.8,    553,   -43.8,    395,    -56.0,    4.8,  -18.8}},
+    {2900,   { 5.1,   -19.9,    542,   -43.7,    395,    -55.9,    5.1,  -19.9}},
+    {3000,   { 5.4,   -21.0,    531,   -43.6,    375,    -55.7,    5.4,  -21.0}},
+    {3100,   { 5.6,   -22.1,    521,   -43.5,    366,    -55.6,    5.6,  -22.1}},
+    {3200,   { 5.9,   -23.2,    511,   -43.4,    357,    -55.4,    5.9,  -23.2}},
+    {3300,   { 6.1,   -24.3,    502,   -43.3,    349,    -55.3,    6.1,  -24.3}},
+    {3400,   { 6.4,   -25.4,    494,   -43.2,    341,    -55.1,    6.4,  -25.4}},
+    {3500,   { 6.6,   -26.5,    486,   -43.1,    334,    -55.0,    6.6,  -26.5}},
+    {3600,   { 6.9,   -27.6,    478,   -43.0,    327,    -54.8,    6.9,  -27.6}},
+    {3700,   { 7.1,   -28.7,    471,   -42.9,    321,    -54.7,    7.1,  -28.7}},
+    {3800,   { 7.3,   -29.9,    464,   -42.8,    315,    -54.6,    7.3,  -29.9}},
+    {3900,   { 7.5,   -31.0,    458,   -42.7,    310,    -54.4,    7.5,  -31.0}},
+    {4000,   { 7.8,   -32.1,    452,   -42.7,    304,    -54.3,    7.8,  -32.1}}
+};
+
+
+/* V.56bis EIA LL-6, non-loaded loop */
+
+struct
+{
+    int freq;
+    float ad[8];
+} eia_ll6[] =
+{
+    { 200,   {-0.2,  -39.3,   1756,    -12.0,   1748,    -19.8,   -0.2,  -39.3}},
+    { 300,   {-0.2,  -31.7,   1642,    -15.9,   1689,    -26.9,   -0.2,  -31.7}},
+    { 400,   {-0.2,  -37.5,   1506,    -18.4,   1427,    -33.4,   -0.2,  -37.5}},
+    { 500,   {-0.1,  -34.7,   1442,    -19.5,   1301,    -37.7,   -0.1,  -34.7}},
+    { 600,   {-0.1,  -46.0,   1363,    -20.1,   1153,    -40.7,   -0.1,  -46.0}},
+    { 700,   { 0.0,  -40.8,   1320,    -20.7,   1045,    -42.2,    0.0,  -40.8}},
+    { 800,   { 0.0,  -40.1,   1269,    -21.5,    943,    -42.3,    0.0,  -40.1}},
+    { 900,   { 0.0,  -40.6,   1227,    -22.5,    878,    -41.3,    0.0,  -40.6}},
+    {1000,   { 6.6,  -28.0,   1161,    -23.4,    825,    -39.3,    6.6,  -28.0}},
+    {1100,   { 0.0,  -16.5,   1082,    -23.5,    797,    -36.8,    0.0,  -16.5}},
+    {1200,   {-0.1,    0.3,   1000,    -22.2,    798,    -34.4,   -0.1,    0.3}},
+    {1300,   { 0.0,   -2.3,    943,    -19.3,    826,    -33.2,    0.0,   -2.3}},
+    {1400,   { 0.0,   13.5,    896,    -14.0,    870,    -33.8,    0.0,   13.5}},
+    {1500,   { 0.1,   22.6,    890,     -7.2,    916,    -36.8,    0.1,   22.6}},
+    {1600,   { 0.3,   30.3,    940,     -0.3,    938,    -42.0,    0.3,   30.3}},
+    {1700,   { 0.5,   12.5,   1052,      4.6,    929,    -48.0,    0.5,   12.5}},
+    {1800,   { 0.8,  458.6,   1212,      6.9,    880,    -52.8,    0.8,  458.6}},
+    {1900,   { 1.1,   -5.1,   1410,      3.5,    814,    -56.5,    1.1,   -5.1}},
+    {2000,   { 1.4,   -5.0,   1579,     -3.6,    747,    -58.5,    1.4,   -5.0}},
+    {2100,   { 1.5,    6.1,   1618,    -13.2,    688,    -58.8,    1.5,    6.1}},
+    {2200,   { 1.5,   33.5,   1491,    -21.5,    646,    -57.7,    1.5,   33.5}},
+    {2300,   { 1.4,   80.5,   1275,    -24.9,    625,    -55.6,    1.4,   80.5}},
+    {2400,   { 1.3,  142.3,   1078,    -20.8,    633,    -53.8,    1.3,  142.3}},
+    {2500,   { 1.4,  196.5,    985,     -9.3,    664,    -54.5,    1.4,  196.5}},
+    {2600,   { 1.6,  214.5,   1045,      2.4,    692,    -57.6,    1.6,  214.5}},
+    {2700,   { 2.4,  196.8,   1326,     13.7,    684,    -63.5,    2.4,  196.8}},
+    {2800,   { 3.4,  150.4,   1887,     14.7,    637,    -68.3,    3.4,  150.4}},
+    {2900,   { 4.3,  125.3,   2608,      1.3,    501,    -70.7,    4.3,  125.3}},
+    {3000,   { 4.9,  174.6,   2730,    -21.8,    533,    -70.6,    4.9,  174.6}},
+    {3100,   { 4.9,  380.0,   2094,    -33.7,    506,    -68.5,    4.9,  380.0}},
+    {3200,   { 5.2,  759.3,   1642,    -21.3,    522,    -67.0,    5.2,  759.3}},
+    {3300,   { 8.0,  680.1,   2348,      0.5,    531,    -72.9,    8.0,  680.1}},
+    {3400,   {13.1,  237.8,   4510,    -20.9,    482,    -77.3,   13.1,  237.8}},
+    {3500,   {18.2,  -18.8,   4116,    -59.6,    439,    -78.0,   18.2,  -18.8}},
+    {3600,   {22.7, -145.4,   3041,    -74.4,    487,    -77.7,   22.7, -145.4}},
+    {3700,   {26.8, -214.5,   2427,    -80.1,    383,    -77.1,   26.8, -214.5}},
+    {3800,   {30.4, -257.0,   2054,    -82.7,    364,    -76.4,   30.4, -257.0}},
+    {3900,   {33.7, -285.6,   1803,    -84.2,    348,    -75.0,   33.7, -285.6}},
+    {4000,   {36.8, -306.2,   1621,    -85.1,    334,    -75.7,   36.8, -306.2}}
+};
+
+
+/* V.56bis EIA LL-7, non-loaded loop */
+
+struct
+{
+    int freq;
+    float ad[8];
+} eia_ll7[] =
+{
+    { 200,   { 0.4,   -81.3,    1848,  -10.5,   1737,    -15.6,    0.4,  -81.3}},
+    { 300,   { 0.3,   -68.9,    1785,  -16.2,   1585,    -21.6,    0.3,  -68.9}},
+    { 400,   { 0.2,   -68.1,    1646,  -22.0,   1388,    -25.8,    0.2,  -68.1}},
+    { 500,   { 0.1,   -57.0,    1528,  -26.2,   1247,    -27.7,    0.1,  -57.0}},
+    { 600,   { 0.0,   -59.8,    1349,  -28.9,   1087,    -27.3,    0.0,  -59.8}},
+    { 700,   { 0.0,   -45.0,    1205,  -29.1,    975,    -24.8,    0.0,  -45.0}},
+    { 800,   {-0.1,   -36.9,    1064,  -26.8,    885,    -19.7,   -0.1,  -36.9}},
+    { 900,   {-0.1,   -37.1,     989,  -22.6,    846,    -13.5,   -0.1,  -37.1}},
+    {1000,   { 5.9,   -29.2,     944,  -16.6,    847,     -6.1,    5.9,  -29.2}},
+    {1100,   { 0.1,   -30.8,     951,  -10.5,    900,      0.3,    0.1,  -30.8}},
+    {1200,   { 0.2,   -40.7,    1008,   -5.9,    999,      4.9,    0.2,  -40.7}},
+    {1300,   { 0.4,   -53.3,    1897,   -4.0,   1122,      4.6,    0.4,  -53.3}},
+    {1400,   { 0.5,   -52.7,    1197,   -4.8,   1253,      1.9,    0.5,  -52.7}},
+    {1500,   { 0.6,   -48.3,    1269,   -8.4,   1339,     -3.8,    0.6,  -48.3}},
+    {1600,   { 0.6,   -38.0,    1274,  -13.2,   1337,    -10.4,    0.6,  -38.0}},
+    {1700,   { 0.5,   -21.6,    1208,  -16.9,   1250,    -15.2,    0.5,  -21.6}},
+    {1800,   { 0.4,   539.7,    1119,  -17.8,   1143,    -16.6,    0.4,  539.7}},
+    {1900,   { 0.3,    35.4,    1027,  -14.7,   1036,    -13.7,    0.3,   35.4}},
+    {2000,   { 0.3,    64.1,     989,   -7.9,    998,     -6.9,    0.3,   64.1}},
+    {2100,   { 0.4,    76.1,    1045,    0.1,   1040,      1.0,    0.4,   76.1}},
+    {2200,   { 0.6,    69.8,    1210,    5.3,   1197,      6.9,    0.6,   69.8}},
+    {2300,   { 1.0,    55.9,    1460,    4.6,   1430,      5.4,    1.0,   55.9}},
+    {2400,   { 1.2,    51.3,    1692,   -2.8,   1640,     -1.7,    1.2,   51.3}},
+    {2500,   { 1.3,    72.6,    1730,  -13.4,   1666,    -11.5,    1.3,   72.6}},
+    {2600,   { 1.3,   117.1,    1613,  -49.6,   1556,    -16.9,    1.3,  117.1}},
+    {2700,   { 1.1,   222.5,    1371,  -19.5,   1334,    -16.1,    1.1,  222.5}},
+    {2800,   { 1.1,   332.3,    1258,   -8.9,   1243,     -5.1,    1.1,  332.3}},
+    {2900,   { 1.7,   356.1,    1474,    4.8,   1480,      8.4,    1.7,  356.1}},
+    {3000,   { 2.8,   299.9,    2128,    6.6,   2143,      9.8,    2.8,  299.9}},
+    {3100,   { 3.9,   309.4,    2813,  -10.5,   2882,     -7.1,    3.9,  309.4}},
+    {3200,   { 4.4,   576.4,    2490,  -27.7,   2487,    -22.2,    4.4,  576.4}},
+    {3300,   { 5.6,  1030.6,    2237,  -17.4,   2385,     -9.0,    5.6, 1030.6}},
+    {3400,   {10.7,   570.2,    3882,  -19.2,   4855,    -14.9,   10.7,  570.2}},
+    {3500,   {17.3,    83.5,    4116,  -57.4,   4649,    -63.5,   17.3,   83.5}},
+    {3600,   {23.2,  -130.6,    3057,  -74.0,   3175,    -78.6,   23.2, -130.6}},
+    {3700,   {28.3,  -153.9,    2432,  -80.0,   2471,    -83.1,   28.3, -153.9}},
+    {3800,   {32.8,  -292.4,    2055,  -82.8,   2072,    -85.1,   32.8, -292.4}},
+    {3900,   {36.9,  -249.9,    1803,  -84.2,   1811,    -86.1,   36.9, -249.9}},
+    {4000,   {40.7,  -356.2,    1621,  -85.1,   1625,    -86.7,   40.7, -356.2}}
+};
+
+
+/* V.56bis ETSI LL-1, non-loaded loop */
+
+struct
+{
+    int freq;
+    float ad[8];
+} etsi_ll1[] =
+{
+    { 200,  {-0.78,   14.0, 1248.5,     -9.7, 1248.5,     -9.7,  -0.78,   14.0}},
+    { 300,  {-0.74,   10.0, 1220.9,    -14.3, 1220.9,    -14.3,  -0.74,   10.0}},
+    { 400,  {-0.68,    8.0, 1185.2,    -18.6, 1185.2,    -18.6,  -0.68,    8.0}},
+    { 500,  {-0.60,    7.0, 1143.9,    -22.6, 1143.9,    -22.6,  -0.60,    7.0}},
+    { 600,  {-0.51,    6.0, 1099.0,    -26.2, 1099.0,    -26.2,  -0.51,    6.0}},
+    { 700,  {-0.40,    5.6, 1052.5,    -29.5, 1052.5,    -29.5,  -0.40,    5.6}},
+    { 800,  {-0.28,    5.3, 1005.9,    -32.4, 1005.9,    -32.4,  -0.28,    5.3}},
+    { 900,  {-0.14,    5.0,  960.3,    -35.0,  960.3,    -35.0,  -0.14,    5.0}},
+    {1000,  { 4.7,     4.6,  916.4,    -37.3,  916.4,    -37.3,   4.7,     4.6}},
+    {1100,  { 0.16,    4.3,  874.6,    -39.3,  874.6,    -39.3,   0.16,    4.3}},
+    {1200,  { 0.33,    3.6,  835.3,    -41.1,  835.3,    -41.1,   0.33,    3.6}},
+    {1300,  { 0.49,    2.6,  798.5,    -42.6,  798.5,    -42.6,   0.49,    2.6}},
+    {1400,  { 0.67,    2.0,  764.2,    -43.9,  764.2,    -43.9,   0.67,    2.0}},
+    {1500,  { 0.85,    1.0,  732.3,    -45.1,  732.3,    -45.1,   0.85,    1.0}},
+    {1600,  { 1.04,    0.6,  702.7,    -46.1,  702.7,    -46.1,   1.04,    0.6}},
+    {1700,  { 1.23,    0.3,  675.3,    -47.0,  675.3,    -47.0,   1.23,    0.3}},
+    {1800,  { 1.43,   40.0,  649.8,    -47.7,  649.8,    -47.7,   1.43,   40.0}},
+    {1900,  { 1.63,   -1.0,  626.2,    -48.4,  626.2,    -48.4,   1.63,   -1.0}},
+    {2000,  { 1.83,   -2.0,  604.3,    -48.9,  604.3,    -48.9,   1.83,   -2.0}},
+    {2100,  { 2.03,   -3.3,  584.0,    -49.4,  584.0,    -49.4,   2.03,   -3.3}},
+    {2200,  { 2.23,   -3.6,  565.1,    -49.8,  565.1,    -49.8,   2.23,   -3.6}},
+    {2300,  { 2.44,   -4.3,  547.5,    -50.1,  547.5,    -50.1,   2.44,   -4.3}},
+    {2400,  { 2.64,   -5.0,  531.1,    -50.4,  531.1,    -50.4,   2.64,   -5.0}},
+    {2500,  { 2.84,   -6.1,  515.9,    -50.6,  515.9,    -50.6,   2.84,   -6.1}},
+    {2600,  { 3.05,   -6.6,  501.6,    -50.8,  501.6,    -50.8,   3.05,   -6.6}},
+    {2700,  { 3.25,   -7.3,  488.2,    -51.0,  488.2,    -51.0,   3.25,   -7.3}},
+    {2800,  { 3.45,   -7.6,  475.7,    -51.1,  475.7,    -51.1,   3.45,   -7.6}},
+    {2900,  { 3.65,   -8.3,  464.0,    -51.1,  464.0,    -51.1,   3.65,   -8.3}},
+    {3000,  { 3.85,   -8.6,  453.0,    -51.2,  453.0,    -51.2,   3.85,   -8.6}},
+    {3100,  { 4.04,   -9.3,  442.6,    -51.2,  442.6,    -51.2,   4.04,   -9.3}},
+    {3200,  { 4.24,  -10.3,  432.9,    -51.2,  432.9,    -51.2,   4.24,  -10.3}},
+    {3300,  { 4.43,  -10.6,  423.7,    -51.2,  423.7,    -51.2,   4.43,  -10.6}},
+    {3400,  { 4.62,  -11.3,  415.1,    -51.2,  415.1,    -51.2,   4.62,  -11.3}},
+    {3500,  { 4.81,  -11.6,  406.9,    -51.1,  406.9,    -51.1,   4.81,  -11.6}},
+    {3600,  { 5.00,  -12.3,  399.1,    -51.1,  399.1,    -51.1,   5.00,  -12.3}},
+    {3700,  { 5.19,  -13.0,  391.8,    -51.0,  391.8,    -51.0,   5.19,  -13.0}},
+    {3800,  { 5.37,  -13.4,  384.9,    -51.0,  384.9,    -51.0,   5.37,  -13.4}},
+    {3900,  { 5.56,  -13.8,  378.3,    -50.9,  378.3,    -50.9,   5.56,  -13.8}},
+    {4000,  { 5.74,  -14.4,  372.0,    -50.8,  372.0,    -50.8,   5.74,  -14.4}}
+};
+
+
+/* V.56bis ETSI LL-2, non-loaded loop */
+
+struct
+{
+    int freq;
+    float ad[8];
+} etsi_ll2[] =
+{
+    { 200,  {-0.10,   15.0,  850.3,     -3.4,  850.3,     -3.4,  -0.10,   15.0}},
+    { 300,  {-0.09,    8.0,  848.1,     -5.1,  848.1,     -5.1,  -0.09,    8.0}},
+    { 400,  {-0.09,    7.0,  845.1,     -6.7,  845.1,     -6.7,  -0.09,    7.0}},
+    { 500,  {-0.08,    5.0,  841.3,     -8.4,  841.3,     -8.4,  -0.08,    5.0}},
+    { 600,  {-0.07,    4.6,  836.7,    -10.0,  836.7,    -10.0,  -0.07,    4.6}},
+    { 700,  {-0.06,    4.3,  831.3,    -11.6,  831.3,    -11.6,  -0.06,    4.3}},
+    { 800,  {-0.04,    3.8,  825.3,    -13.2,  825.3,    -13.2,  -0.04,    3.8}},
+    { 900,  {-0.02,    3.4,  818.6,    -14.8,  818.6,    -14.8,  -0.02,    3.4}},
+    {1000,  { 1.80,    3.0,  811.4,    -16.3,  811.4,    -16.3,   1.8,     3.0}},
+    {1100,  { 0.02,    2.6,  803.6,    -17.8,  803.6,    -17.8,   0.02,    2.6}},
+    {1200,  { 0.04,    2.3,  795.3,    -19.3,  795.3,    -19.3,   0.04,    2.3}},
+    {1300,  { 0.06,    1.3,  786.6,    -20.7,  786.6,    -20.7,   0.06,    1.3}},
+    {1400,  { 0.09,    0.9,  777.5,    -22.1,  777.5,    -22.1,   0.09,    0.9}},
+    {1500,  { 0.12,    0.6,  768.1,    -23.5,  768.1,    -23.5,   0.12,    0.6}},
+    {1600,  { 0.15,    0.3,  758.4,    -24.8,  758.4,    -24.8,   0.15,    0.3}},
+    {1700,  { 0.18,    0.0,  748.4,    -26.1,  748.4,    -26.1,   0.18,    0.0}},
+    {1800,  { 0.21,     15,  738.4,    -27.3,  738.4,    -27.3,   0.21,   15.0}},
+    {1900,  { 0.24,   -1.0,  728.1,    -28.5,  728.1,    -28.5,   0.24,   -1.0}},
+    {2000,  { 0.28,   -2.3,  717.8,    -29.7,  717.8,    -29.7,   0.28,   -2.3}},
+    {2100,  { 0.32,   -2.6,  707.4,    -30.8,  707.4,    -30.8,   0.32,   -2.6}},
+    {2200,  { 0.36,   -3.0,  697.0,    -31.9,  697.0,    -31.9,   0.36,   -3.0}},
+    {2300,  { 0.40,   -3.3,  686.6,    -33.0,  686.6,    -33.0,   0.40,   -3.3}},
+    {2400,  { 0.44,   -3.6,  676.2,    -34.0,  676.2,    -34.0,   0.44,   -3.6}},
+    {2500,  { 0.48,   -4.5,  665.9,    -35.0,  665.9,    -35.0,   0.48,   -4.5}},
+    {2600,  { 0.53,   -5.4,  655.6,    -35.9,  655.6,    -35.9,   0.53,   -5.4}},
+    {2700,  { 0.57,   -6.3,  645.5,    -36.8,  645.5,    -36.8,   0.57,   -6.3}},
+    {2800,  { 0.62,   -6.6,  635.5,    -37.7,  635.5,    -37.7,   0.62,   -6.6}},
+    {2900,  { 0.67,   -6.9,  625.6,    -38.6,  625.6,    -38.6,   0.67,   -6.9}},
+    {3000,  { 0.72,   -7.5,  615.8,    -39.4,  615.8,    -39.4,   0.72,   -7.5}},
+    {3100,  { 0.77,   -8.3,  606.2,    -40.2,  606.2,    -40.2,   0.77,   -8.3}},
+    {3200,  { 0.82,   -8.6,  596.7,    -40.9,  596.7,    -40.9,   0.82,   -8.6}},
+    {3300,  { 0.87,   -9.3,  587.4,    -41.6,  587.4,    -41.6,   0.87,   -9.3}},
+    {3400,  { 0.92,   -9.6,  578.3,    -42.3,  578.3,    -42.3,   0.92,   -9.6}},
+    {3500,  { 0.98,  -10.3,  569.3,    -43.0,  569.3,    -43.0,   0.98,  -10.3}},
+    {3600,  { 1.03,  -10.6,  560.6,    -43.7,  560.6,    -43.7,   1.03,  -10.6}},
+    {3700,  { 1.09,  -11.3,  552.0,    -44.3,  552.0,    -44.3,   1.09,  -11.3}},
+    {3800,  { 1.14,  -11.6,  543.5,    -44.9,  543.5,    -44.9,   1.14,  -11.6}},
+    {3900,  { 1.20,  -12.3,  535.3,    -45.4,  535.3,    -45.4,   1.20,  -12.3}},
+    {4000,  { 1.26,  -13.3,  527.2,    -46.0,  527.2,    -46.0,   1.26,  -13.3}}
+};
+
+/* V.56bis AD-1 AD-5 AD-6 AD-7 AD-8 AD-9 */
+
+struct
+{
+    int freq;
+    float ad[6];
+} ad[] =
+{
+    {   0,  {90.0,   90.0,   90.0,   90.0,   90.0,   90.0}},
+    { 200,  { 6.0,    3.2,    3.0,    2.9,   11.6,   23.3}},
+    { 300,  { 1.3,    1.4,    1.2,    1.1,    6.9,   13.9}},
+    { 400,  { 0.0,    0.4,    0.3,    0.3,    4.0,    7.9}},
+    { 500,  { 0.0,   -0.1,    0.0,    0.1,    2.0,    4.1}},
+    { 600,  { 0.0,   -0.1,    0.0,    0.1,    1.2,    2.4}},
+    { 700,  { 0.0,    0.1,    0.0,    0.0,    0.8,    1.7}},
+    { 800,  { 0.0,    0.0,    0.0,   -0.1,    0.5,    1.1}},
+    { 900,  { 0.0,    0.0,    0.0,   -0.1,    0.2,    0.4}},
+    {1000,  { 0.0,    0.0,    0.0,    0.0,    0.0,    0.0}},
+    {1100,  { 0.0,    0.0,    0.1,    0.0,   -0.1,   -0.2}},
+    {1200,  { 0.0,    0.0,    0.1,    0.1,   -0.1,   -0.2}},
+    {1300,  { 0.0,    0.1,    0.2,    0.3,   -0.1,   -0.2}},
+    {1400,  { 0.0,    0.2,    0.3,    0.4,   -0.1,   -0.3}},
+    {1500,  { 0.0,    0.2,    0.3,    0.4,   -0.2,   -0.4}},
+    {1600,  { 0.0,    0.3,    0.5,    0.5,   -0.1,   -0.3}},
+    {1700,  { 0.0,    0.3,    0.5,    0.6,   -0.1,   -0.1}},
+    {1800,  { 0.0,    0.3,    0.5,    0.6,    0.0,    0.0}},
+    {1900,  { 0.0,    0.4,    0.7,    0.7,    0.1,    0.2}},
+    {2000,  { 0.0,    0.5,    0.8,    0.9,    0.2,    0.5}},
+    {2100,  { 0.1,    0.6,    1.0,    1.0,    0.5,    0.9}},
+    {2200,  { 0.2,    0.7,    1.1,    1.1,    0.6,    1.1}},
+    {2300,  { 0.3,    0.9,    1.2,    1.4,    0.8,    1.5}},
+    {2400,  { 0.4,    1.1,    1.5,    1.6,    0.9,    1.8}},
+    {2500,  { 0.5,    1.3,    1.8,    2.0,    1.1,    2.3}},
+    {2600,  { 0.6,    1.6,    2.4,    2.7,    1.4,    2.8}},
+    {2700,  { 0.7,    2.0,    3.0,    3.5,    1.7,    3.4}},
+    {2800,  { 0.7,    2.3,    3.5,    4.3,    2.0,    4.0}},
+    {2900,  { 0.9,    2.8,    4.2,    5.0,    2.4,    4.9}},
+    {3000,  { 1.1,    3.2,    4.9,    5.8,    3.0,    5.9}},
+    {3100,  { 1.2,    3.5,    5.6,    6.7,    3.4,    6.8}},
+    {3200,  { 1.3,    4.1,    6.7,    8.0,    3.9,    7.7}},
+    {3300,  { 1.6,    4.8,    8.0,    9.6,    4.6,    9.2}},
+    {3400,  { 1.8,    5.3,    9.1,   11.0,    5.4,   10.7}},
+    {3500,  { 2.4,    5.7,   10.3,   12.2,    6.3,   12.6}},
+    {3600,  { 3.0,    6.6,   12.1,   13.9,    7.8,   15.5}},
+    {3700,  { 5.7,    8.9,   15.8,   17.3,   10.3,   20.5}},
+    {3800,  {13.5,   15.7,   24.4,   25.7,   16.2,   32.4}},
+    {3900,  {31.2,   31.1,   42.2,   43.3,   29.9,   59.9}},
+    {4000,  {31.2,   31.1,   42.2,   43.3,   29.9,   59.9}}
+};
+
+/* V.56bis EDD-1 EDD-2 EDD-3 */
+
+struct
+{
+    int freq;
+    float edd[3];
+} edd[] =
+{
+    {   0,    {3.98,    3.76,    8.00}},
+    { 200,    {3.98,    3.76,    8.00}},
+    { 300,    {2.70,    3.76,    8.00}},
+    { 400,    {1.69,    2.20,    6.90}},
+    { 500,    {1.15,    1.36,    5.50}},
+    { 600,    {0.80,    0.91,    4.40}},
+    { 700,    {0.60,    0.64,    3.40}},
+    { 800,    {0.50,    0.46,    2.80}},
+    { 900,    {0.40,    0.34,    2.00}},
+    {1000,    {0.30,    0.24,    1.50}},
+    {1100,    {0.20,    0.16,    1.00}},
+    {1200,    {0.20,    0.11,    0.70}},
+    {1300,    {0.10,    0.07,    0.40}},
+    {1400,    {0.05,    0.05,    0.30}},
+    {1500,    {0.00,    0.03,    0.20}},
+    {1600,    {0.00,    0.01,    0.10}},
+    {1700,    {0.00,    0.00,    0.10}},
+    {1800,    {0.00,    0.00,    0.00}},
+    {1900,    {0.00,    0.02,    0.10}},
+    {2000,    {0.00,    0.04,    0.10}},
+    {2100,    {0.02,    0.08,    0.10}},
+    {2200,    {0.02,    0.12,    0.20}},
+    {2300,    {0.02,    0.16,    0.20}},
+    {2400,    {0.02,    0.20,    0.30}},
+    {2500,    {0.10,    0.27,    0.40}},
+    {2600,    {0.12,    0.36,    0.50}},
+    {2700,    {0.15,    0.47,    0.80}},
+    {2800,    {0.20,    0.60,    1.10}},
+    {2900,    {0.27,    0.77,    1.50}},
+    {3000,    {0.40,    1.01,    2.00}},
+    {3100,    {0.56,    1.32,    2.60}},
+    {3200,    {0.83,    1.78,    3.20}},
+    {3300,    {1.07,    1.78,    4.00}},
+    {3400,    {1.39,    1.78,    4.00}},
+    {3500,    {1.39,    1.78,    4.00}},
+    {3600,    {1.39,    1.78,    4.00}},
+    {3700,    {1.39,    1.78,    4.00}},
+    {3800,    {1.39,    1.78,    4.00}},
+    {3900,    {1.39,    1.78,    4.00}},
+    {4000,    {1.39,    1.78,    4.00}}
+};
+
+/* V.56bis PCM AD-1, AD-2, AD-3 */
+
+struct
+{
+    int freq;
+    float ad[3];
+} pcm_ad[] =
+{
+    {  50,    {41.4,    77.8,   114.2}},
+    { 100,    {15.5,    27.7,    39.9}},
+    { 150,    { 3.7,     6.1,     8.6}},
+    { 200,    { 0.5,     0.8,     1.0}},
+    { 250,    {-0.2,    -0.2,    -0.3}},
+    { 300,    {-0.2,    -0.3,    -0.4}},
+    { 400,    { 0.0,    -0.2,    -0.3}},
+    { 500,    {-0.2,    -0.4,    -0.5}},
+    { 600,    {-0.2,    -0.3,    -0.5}},
+    { 700,    {-0.2,    -0.3,    -0.5}},
+    { 800,    {-0.2,    -0.4,    -0.5}},
+    { 900,    {-0.2,    -0.3,    -0.4}},
+    {1000,    {-0.1,    -0.2,    -0.3}},
+    {1100,    {-0.2,    -0.3,    -0.3}},
+    {1200,    {-0.2,    -0.3,    -0.4}},
+    {1300,    {-0.2,    -0.3,    -0.5}},
+    {1400,    {-0.1,    -0.3,    -0.4}},
+    {1500,    {-0.1,    -0.3,    -0.4}},
+    {1600,    {-0.1,    -0.2,    -0.3}},
+    {1700,    {-0.1,    -0.3,    -0.4}},
+    {1800,    {-0.2,    -0.3,    -0.4}},
+    {1900,    {-0.2,    -0.3,    -0.3}},
+    {2000,    {-0.1,    -0.2,    -0.3}},
+    {2100,    {-0.1,    -0.2,    -0.3}},
+    {2200,    {-0.1,    -0.3,    -0.4}},
+    {2300,    {-0.1,    -0.1,    -0.2}},
+    {2400,    {-0.1,    -0.1,    -0.2}},
+    {2500,    { 0.0,    -0.1,    -0.1}},
+    {2600,    { 0.0,    -0.1,    -0.1}},
+    {2700,    { 0.0,     0.0,     0.1}},
+    {2800,    { 0.0,     0.0,     0.1}},
+    {2900,    { 0.1,     0.2,     0.2}},
+    {3000,    { 0.0,     0.0,     0.1}},
+    {3100,    { 0.0,     0.0,     0.0}},
+    {3200,    { 0.0,     0.0,     0.1}},
+    {3300,    { 0.3,     0.7,     1.0}},
+    {3400,    { 1.2,     2.4,     3.6}},
+    {3500,    { 3.2,     6.3,     9.5}},
+    {3550,    { 5.0,     9.6,    14.3}},
+    {3600,    { 7.0,    13.5,    19.9}},
+    {3650,    {10.0,    18.7,    27.5}},
+    {3700,    {13.4,    24.6,    35.8}},
+    {3750,    {18.1,    32.1,    46.2}},
+    {3800,    {24.3,    41.2,    58.2}},
+    {3850,    {32.5,    52.6,    72.7}},
+    {3900,    {43.4,    66.6,    89.8}},
+    {4000,    {43.4,    66.6,    89.8}}
+};
+
+/* V.56bis PCM EDD-1, EDD-2, EDD-3 */
+
+struct
+{
+    int freq;
+    float edd[3];
+} pcm_edd[] =
+{
+    { 150,   { 2.76,    5.5,    8.3}},
+    { 200,   { 1.70,    3.4,    5.1}},
+    { 250,   { 0.92,    1.8,    2.8}},
+    { 300,   { 0.55,    1.1,    1.7}},
+    { 400,   { 0.25,    0.5,    0.7}},
+    { 500,   { 0.12,    0.2,    0.4}},
+    { 600,   { 0.06,    0.1,    0.2}},
+    { 700,   { 0.03,    0.1,    0.1}},
+    { 800,   { 0.01,    0.0,    0.0}},
+    { 900,   { 0.00,    0.0,    0.0}},
+    {1000,   {-0.01,    0.0,    0.0}},
+    {1100,   {-0.01,    0.0,    0.0}},
+    {1200,   {-0.02,    0.0,   -0.1}},
+    {1300,   {-0.02,    0.0,   -0.1}},
+    {1400,   {-0.01,    0.0,    0.0}},
+    {1500,   {-0.01,    0.0,    0.0}},
+    {1600,   { 0.00,    0.0,    0.0}},
+    {1700,   { 0.00,    0.0,    0.0}},
+    {1800,   { 0.01,    0.0,    0.0}},
+    {1900,   { 0.02,    0.0,    0.0}},
+    {2000,   { 0.02,    0.0,    0.1}},
+    {2100,   { 0.04,    0.1,    0.1}},
+    {2200,   { 0.05,    0.1,    0.2}},
+    {2300,   { 0.06,    0.1,    0.2}},
+    {2400,   { 0.07,    0.1,    0.2}},
+    {2500,   { 0.10,    0.2,    0.3}},
+    {2600,   { 0.11,    0.2,    0.3}},
+    {2700,   { 0.14,    0.3,    0.4}},
+    {2800,   { 0.18,    0.4,    0.5}},
+    {2900,   { 0.22,    0.4,    0.6}},
+    {3000,   { 0.27,    0.5,    0.8}},
+    {3100,   { 0.34,    0.7,    1.0}},
+    {3200,   { 0.45,    0.9,    1.4}},
+    {3250,   { 0.52,    1.0,    1.6}},
+    {3300,   { 0.60,    1.2,    1.8}},
+    {3350,   { 0.66,    1.3,    2.0}},
+    {3400,   { 0.74,    1.5,    2.2}},
+    {3450,   { 0.79,    1.6,    2.4}},
+    {3500,   { 0.83,    1.7,    2.5}},
+    {3550,   { 0.84,    1.7,    2.5}},
+    {3600,   { 0.81,    1.6,    2.4}},
+    {3700,   { 0.81,    1.6,    2.4}},
+    {3800,   { 0.81,    1.6,    2.4}},
+    {3900,   { 0.81,    1.6,    2.4}},
+    {4000,   { 0.81,    1.6,    2.4}}
+};
+
+FILE *outfile;
+
+float impulse_responses[100][LINE_FILTER_SIZE];
+int filter_sets = 0;
+
+static void generate_ad_edd(void)
+{
+    float f;
+    float offset;
+    float amp;
+    float phase;
+    float delay;
+    float pw;
+#if defined(HAVE_FFTW3_H)
+    double in[FFT_SIZE][2];
+    double out[FFT_SIZE][2];
+#else
+    fftw_complex in[FFT_SIZE];
+    fftw_complex out[FFT_SIZE];
+#endif
+    fftw_plan p;
+    int i;
+    int j;
+    int k;
+    int l;
+
+#if defined(HAVE_FFTW3_H)
+    p = fftw_plan_dft_1d(FFT_SIZE, in, out, FFTW_BACKWARD, FFTW_ESTIMATE);
+#else
+    p = fftw_create_plan(FFT_SIZE, FFTW_BACKWARD, FFTW_ESTIMATE);
+#endif
+    for (j = 0;  j < 6;  j++)
+    {
+        for (k = 0;  k < 3;  k++)
+        {
+            for (i = 0;  i < FFT_SIZE;  i++)
+            {
+#if defined(HAVE_FFTW3_H)
+                in[i][0] =
+                in[i][1] = 0.0;
+#else
+                in[i].re =
+                in[i].im = 0.0;
+#endif
+            }
+            for (i = 1;  i < FFT_SIZE/2;  i++)
+            {
+                f = (float) i*SAMPLE_RATE/FFT_SIZE;
+                amp = 0.0;
+                for (l = 0;  l < (int) (sizeof(ad)/sizeof(ad[0]));  l++)
+                {
+                    if (f < ad[l].freq)
+                        break;
+                }
+                if (l < (int) (sizeof(ad)/sizeof(ad[0])))
+                {
+                    offset = (f - ad[l - 1].freq)/(ad[l].freq - ad[l - 1].freq);
+                    amp = (1.0 - offset)*ad[l - 1].ad[j] + offset*ad[l].ad[j];
+                    amp = pow(10.0, -amp/20.0);
+                }
+                delay = 0.0;
+                for (l = 0;  l < (int) (sizeof(edd)/sizeof(edd[0]));  l++)
+                {
+                    if (f < edd[l].freq)
+                        break;
+                }
+                if (l < (int) (sizeof(edd)/sizeof(edd[0])))
+                {
+                    offset = (f - edd[l - 1].freq)/(edd[l].freq - edd[l - 1].freq);
+                    delay = (1.0 - offset)*edd[l - 1].edd[k] + offset*edd[l].edd[k];
+                }
+                phase = 2.0*M_PI*f*delay*0.001;
+    
+#if defined(HAVE_FFTW3_H)    
+                in[i][0] = amp*cos(phase);
+                in[i][1] = amp*sin(phase);
+                in[FFT_SIZE - i][0] = in[i][0];
+                in[FFT_SIZE - i][1] = -in[i][1];
+#else
+                in[i].re = amp*cos(phase);
+                in[i].im = amp*sin(phase);
+                in[FFT_SIZE - i].re = in[i].re;
+                in[FFT_SIZE - i].im = -in[i].im;
+#endif
+            }
+#if 0
+            for (i = 0;  i < FFT_SIZE;  i++)
+                fprintf(outfile, "%5d %15.5f,%15.5f\n", i, in[i].re, in[i].im);
+#endif
+#if defined(HAVE_FFTW3_H)    
+            fftw_execute(p);
+#else
+            fftw_one(p, in, out);
+#endif
+
+            fprintf(outfile, "/* V.56bis AD-%d, EDD%d */\n", (j == 0)  ?  1  :  j + 4, k + 1);
+
+            fprintf(outfile, "float ad_%d_edd_%d_model[] =\n", (j == 0)  ?  1  :  j + 4, k + 1);
+            fprintf(outfile, "{\n");
+            /* Normalise the filter's gain */
+            pw = 0.0;
+            l = FFT_SIZE - (LINE_FILTER_SIZE - 1)/2;
+            for (i = 0;  i < LINE_FILTER_SIZE;  i++)
+            {
+#if defined(HAVE_FFTW3_H)
+                pw += out[l][0]*out[l][0];
+#else
+                pw += out[l].re*out[l].re;
+#endif
+                if (++l == FFT_SIZE)
+                    l = 0;
+            }
+            pw = sqrt(pw);
+            l = FFT_SIZE - (LINE_FILTER_SIZE - 1)/2;
+            for (i = 0;  i < LINE_FILTER_SIZE;  i++)
+            {
+                
+#if defined(HAVE_FFTW3_H)
+                impulse_responses[filter_sets][i] = out[l][0]/pw;
+#else
+                impulse_responses[filter_sets][i] = out[l].re/pw;
+#endif
+                fprintf(outfile, "%15.5f,\n", impulse_responses[filter_sets][i]);
+                if (++l == FFT_SIZE)
+                    l = 0;
+            }
+            fprintf(outfile, "};\n\n");
+            filter_sets++;
+        }
+    }
+}
+
+static void generate_proakis(void)
+{
+    float f;
+    float f1;
+    float offset;
+    float amp;
+    float phase;
+    float delay;
+    float pw;
+    int index;
+    int i;
+    int l;
+#if defined(HAVE_FFTW3_H)
+    double in[FFT_SIZE][2];
+    double out[FFT_SIZE][2];
+#else
+    fftw_complex in[FFT_SIZE];
+    fftw_complex out[FFT_SIZE];
+#endif
+    fftw_plan p;
+
+#if defined(HAVE_FFTW3_H)
+    p = fftw_plan_dft_1d(FFT_SIZE, in, out, FFTW_BACKWARD, FFTW_ESTIMATE);
+#else
+    p = fftw_create_plan(FFT_SIZE, FFTW_BACKWARD, FFTW_ESTIMATE);
+#endif
+    for (i = 0;  i < FFT_SIZE;  i++)
+    {
+#if defined(HAVE_FFTW3_H)
+        in[i][0] =
+        in[i][1] = 0.0;
+#else
+        in[i].re =
+        in[i].im = 0.0;
+#endif
+    }
+    for (i = 1;  i < FFT_SIZE/2;  i++)
+    {
+        f = (float) i*SAMPLE_RATE/FFT_SIZE;
+        f1 = f/200.0;
+        offset = f1 - floor(f1);
+        index = (int) floor(f1);
+
+        /* Linear interpolation */
+        amp = ((1.0 - offset)*proakis[index].amp + offset*proakis[index + 1].amp)/2.3;
+        delay = (1.0 - offset)*proakis[index].delay + offset*proakis[index + 1].delay;
+        phase = 2.0*M_PI*f*delay*0.001;
+
+#if defined(HAVE_FFTW3_H)
+        in[i][0] = amp*cos(phase);
+        in[i][1] = amp*sin(phase);
+        in[FFT_SIZE - i][0] = in[i][0];
+        in[FFT_SIZE - i][1] = -in[i][1];
+#else
+        in[i].re = amp*cos(phase);
+        in[i].im = amp*sin(phase);
+        in[FFT_SIZE - i].re = in[i].re;
+        in[FFT_SIZE - i].im = -in[i].im;
+#endif
+    }
+
+#if defined(HAVE_FFTW3_H)
+    fftw_execute(p);
+#else
+    fftw_one(p, in, out);
+#endif
+
+    fprintf(outfile, "/* Medium range telephone line response\n");
+    fprintf(outfile, "   (from p 537, Digital Communication, John G. Proakis */\n");
+
+    fprintf(outfile, "float proakis_line_model[] =\n");
+    fprintf(outfile, "{\n");
+    /* Normalise the filter's gain */
+    pw = 0.0;
+    l = FFT_SIZE - (LINE_FILTER_SIZE - 1)/2;
+    for (i = 0;  i < LINE_FILTER_SIZE;  i++)
+    {
+#if defined(HAVE_FFTW3_H)
+        pw += out[l][0]*out[l][0];
+#else
+        pw += out[l].re*out[l].re;
+#endif
+        if (++l == FFT_SIZE)
+            l = 0;
+    }
+    pw = sqrt(pw);
+    l = FFT_SIZE - (LINE_FILTER_SIZE - 1)/2;
+    for (i = 0;  i < LINE_FILTER_SIZE;  i++)
+    {
+#if defined(HAVE_FFTW3_H)
+        impulse_responses[filter_sets][i] = out[l][0]/pw;
+#else
+        impulse_responses[filter_sets][i] = out[l].re/pw;
+#endif
+        fprintf(outfile, "%15.5f,\n", impulse_responses[filter_sets][i]);
+        if (++l == FFT_SIZE)
+            l = 0;
+    }
+    fprintf(outfile, "};\n\n");
+    filter_sets++;
+}
+
+int main(int argc, char *argv[])
+{
+    int i;
+    int j;
+
+    if ((outfile = fopen("line_models.h", "w")) == NULL)
+    {
+        fprintf(stderr, "Failed to open %s\n", "line_model.txt");
+        exit(2);
+    }
+
+    generate_proakis();
+    generate_ad_edd();
+    
+    fclose(outfile);
+    
+    if (argc > 1)
+    {
+        for (i = 0;  i < LINE_FILTER_SIZE;  i++)
+        {
+            printf("%d, ", i);
+            for (j = 0;  j < filter_sets;  j++)
+            {
+                printf("%15.5f, ", impulse_responses[j][i]);
+            }
+            printf("\n");
+        }
+    }
+    return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/modem_connect_tones_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,495 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * modem_connect_tones_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: modem_connect_tones_tests.c,v 1.5 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page modem_connect_tones_tests_page Modem connect tones tests
+\section modem_connect_tones_rx_tests_page_sec_1 What does it do?
+These tests...
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <stdio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <fcntl.h>
+#include <string.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUTPUT_FILE_NAME    "modem_connect_tones.wav"
+
+#define BELLCORE_DIR        "../itutests/bellcore/"
+
+#define FALSE 0
+#define TRUE (!FALSE)
+
+const char *bellcore_files[] =
+{
+    BELLCORE_DIR "tr-tsy-00763-1.wav",
+    BELLCORE_DIR "tr-tsy-00763-2.wav",
+    BELLCORE_DIR "tr-tsy-00763-3.wav",
+    BELLCORE_DIR "tr-tsy-00763-4.wav",
+    BELLCORE_DIR "tr-tsy-00763-5.wav",
+    BELLCORE_DIR "tr-tsy-00763-6.wav",
+    ""
+};
+
+int main(int argc, char *argv[])
+{
+    int i;
+    int j;
+    int pitch;
+    int level;
+    int16_t amp[8000];
+    modem_connect_tones_rx_state_t cng_rx;
+    modem_connect_tones_rx_state_t ced_rx;
+    modem_connect_tones_rx_state_t ec_dis_rx;
+    modem_connect_tones_tx_state_t ec_dis_tx;
+    awgn_state_t chan_noise_source;
+    int hits;
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int frames;
+    int samples;
+    int hit;
+    int false_hit;
+    int false_miss;
+    float x;
+    tone_gen_descriptor_t tone_desc;
+    tone_gen_state_t tone_tx;
+
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    if ((outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+
+    printf("Test 1a: CNG generation to a file\n");
+    modem_connect_tones_tx_init(&ec_dis_tx, MODEM_CONNECT_TONES_FAX_CNG);
+    for (i = 0;  i < 1000;  i++)
+    {
+        samples = modem_connect_tones_tx(&ec_dis_tx, amp, 160);
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  samples);
+        if (outframes != samples)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+
+    printf("Test 1b: CED generation to a file\n");
+    modem_connect_tones_tx_init(&ec_dis_tx, MODEM_CONNECT_TONES_FAX_CED);
+    for (i = 0;  i < 1000;  i++)
+    {
+        samples = modem_connect_tones_tx(&ec_dis_tx, amp, 160);
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  samples);
+        if (outframes != samples)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+
+    printf("Test 1c: Modulated EC-disable generation to a file\n");
+    /* Some with modulation */
+    modem_connect_tones_tx_init(&ec_dis_tx, MODEM_CONNECT_TONES_EC_DISABLE_MOD);
+    for (i = 0;  i < 1000;  i++)
+    {
+        samples = modem_connect_tones_tx(&ec_dis_tx, amp, 160);
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  samples);
+        if (outframes != samples)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+
+    printf("Test 1d: EC-disable generation to a file\n");
+    /* Some without modulation */
+    modem_connect_tones_tx_init(&ec_dis_tx, MODEM_CONNECT_TONES_EC_DISABLE);
+    for (i = 0;  i < 1000;  i++)
+    {
+        samples = modem_connect_tones_tx(&ec_dis_tx, amp, 160);
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  samples);
+        if (outframes != samples)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+    if (afCloseFile(outhandle) != 0)
+    {
+        printf("    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+    
+    printf("Test 2a: CNG detection with frequency\n");
+    awgn_init_dbm0(&chan_noise_source, 7162534, -50.0f);
+    false_hit = FALSE;
+    false_miss = FALSE;
+    for (pitch = 600;  pitch < 1600;  pitch++)
+    {
+        make_tone_gen_descriptor(&tone_desc,
+                                 pitch,
+                                 -11,
+                                 0,
+                                 0,
+                                 425,
+                                 3000,
+                                 0,
+                                 0,
+                                 TRUE);
+        tone_gen_init(&tone_tx, &tone_desc);
+
+        modem_connect_tones_rx_init(&cng_rx, MODEM_CONNECT_TONES_FAX_CNG, NULL, NULL);
+        for (i = 0;  i < 500;  i++)
+        {
+            samples = tone_gen(&tone_tx, amp, 160);
+            for (j = 0;  j < samples;  j++)
+                amp[j] += awgn(&chan_noise_source);
+            /*endfor*/
+            modem_connect_tones_rx(&cng_rx, amp, samples);
+        }
+        hit = modem_connect_tones_rx_get(&cng_rx);
+        if (pitch < (1100 - 70)  ||  pitch > (1100 + 70))
+        {
+            if (hit)
+                false_hit = TRUE;
+        }
+        else if (pitch > (1100 - 50)  &&  pitch < (1100 + 50))
+        {
+            if (!hit)
+                false_miss = TRUE;
+        }
+        if (hit)
+            printf("Detected at %5dHz %12d %12d %d\n", pitch, cng_rx.channel_level, cng_rx.notch_level, hit);
+    }
+    if (false_hit  ||  false_miss)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test 2b: CED detection with frequency\n");
+    awgn_init_dbm0(&chan_noise_source, 7162534, -50.0f);
+    false_hit = FALSE;
+    false_miss = FALSE;
+    for (pitch = 1600;  pitch < 2600;  pitch++)
+    {
+        make_tone_gen_descriptor(&tone_desc,
+                                 pitch,
+                                 -11,
+                                 0,
+                                 0,
+                                 2600,
+                                 0,
+                                 0,
+                                 0,
+                                 FALSE);
+        tone_gen_init(&tone_tx, &tone_desc);
+
+        modem_connect_tones_rx_init(&ced_rx, MODEM_CONNECT_TONES_FAX_CED, NULL, NULL);
+        for (i = 0;  i < 500;  i++)
+        {
+            samples = tone_gen(&tone_tx, amp, 160);
+            for (j = 0;  j < samples;  j++)
+                amp[j] += awgn(&chan_noise_source);
+            /*endfor*/
+            modem_connect_tones_rx(&ced_rx, amp, samples);
+        }
+        hit = modem_connect_tones_rx_get(&ced_rx);
+        if (pitch < (2100 - 70)  ||  pitch > (2100 + 70))
+        {
+            if (hit)
+                false_hit = TRUE;
+        }
+        else if (pitch > (2100 - 50)  &&  pitch < (2100 + 50))
+        {
+            if (!hit)
+                false_miss = TRUE;
+        }
+        if (hit)
+            printf("Detected at %5dHz %12d %12d %d\n", pitch, ced_rx.channel_level, ced_rx.notch_level, hit);
+    }
+    if (false_hit  ||  false_miss)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test 2c: EC disable detection with frequency\n");
+    awgn_init_dbm0(&chan_noise_source, 7162534, -50.0f);
+    false_hit = FALSE;
+    false_miss = FALSE;
+    for (pitch = 2000;  pitch < 2200;  pitch++)
+    {
+        /* Use the transmitter to test the receiver */
+        modem_connect_tones_tx_init(&ec_dis_tx, MODEM_CONNECT_TONES_EC_DISABLE);
+        /* Fudge things for the test */
+        ec_dis_tx.tone_phase_rate = dds_phase_rate(pitch);
+        ec_dis_tx.level = dds_scaling_dbm0(-25);
+        modem_connect_tones_rx_init(&ec_dis_rx, MODEM_CONNECT_TONES_EC_DISABLE, NULL, NULL);
+        for (i = 0;  i < 500;  i++)
+        {
+            samples = modem_connect_tones_tx(&ec_dis_tx, amp, 160);
+            for (j = 0;  j < samples;  j++)
+                amp[j] += awgn(&chan_noise_source);
+            /*endfor*/
+            modem_connect_tones_rx(&ec_dis_rx, amp, samples);
+        }
+        hit = modem_connect_tones_rx_get(&ec_dis_rx);
+        if (pitch < (2100 - 70)  ||  pitch > (2100 + 70))
+        {
+            if (hit)
+                false_hit = TRUE;
+        }
+        else if (pitch > (2100 - 50)  &&  pitch < (2100 + 50))
+        {
+            if (!hit)
+                false_miss = TRUE;
+        }
+        if (hit)
+            printf("Detected at %5dHz %12d %12d %d\n", pitch, ec_dis_rx.channel_level, ec_dis_rx.notch_level, hit);
+    }
+    if (false_hit  ||  false_miss)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test 3a: CNG detection with level\n");
+    awgn_init_dbm0(&chan_noise_source, 7162534, -60.0f);
+    false_hit = FALSE;
+    false_miss = FALSE;
+    for (pitch = 1062;  pitch <= 1138;  pitch += 2*38)
+    {
+        for (level = 0;  level >= -43;  level--)
+        {
+            make_tone_gen_descriptor(&tone_desc,
+                                     pitch,
+                                     level,
+                                     0,
+                                     0,
+                                     500,
+                                     3000,
+                                     0,
+                                     0,
+                                     TRUE);
+            tone_gen_init(&tone_tx, &tone_desc);
+
+            modem_connect_tones_rx_init(&cng_rx, MODEM_CONNECT_TONES_FAX_CNG, NULL, NULL);
+            for (i = 0;  i < 500;  i++)
+            {
+                samples = tone_gen(&tone_tx, amp, 160);
+                for (j = 0;  j < samples;  j++)
+                    amp[j] += awgn(&chan_noise_source);
+                /*endfor*/
+                modem_connect_tones_rx(&cng_rx, amp, samples);
+            }
+            hit = modem_connect_tones_rx_get(&cng_rx);
+            if (level < -43)
+            {
+                if (hit)
+                    false_hit = TRUE;
+            }
+            else if (level > -43)
+            {
+                if (!hit)
+                    false_miss = TRUE;
+            }
+            if (hit)
+                printf("Detected at %5dHz %ddB %12d %12d %d\n", pitch, level, cng_rx.channel_level, cng_rx.notch_level, hit);
+        }
+    }
+    if (false_hit  ||  false_miss)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Test 3b: CED detection with level\n");
+    awgn_init_dbm0(&chan_noise_source, 7162534, -60.0f);
+    false_hit = FALSE;
+    false_miss = FALSE;
+    for (pitch = 2062;  pitch <= 2138;  pitch += 2*38)
+    {
+        for (level = 0;  level >= -43;  level--)
+        {
+            make_tone_gen_descriptor(&tone_desc,
+                                     pitch,
+                                     level,
+                                     0,
+                                     0,
+                                     2600,
+                                     0,
+                                     0,
+                                     0,
+                                     FALSE);
+            tone_gen_init(&tone_tx, &tone_desc);
+
+            modem_connect_tones_rx_init(&ced_rx, MODEM_CONNECT_TONES_FAX_CED, NULL, NULL);
+            for (i = 0;  i < 500;  i++)
+            {
+                samples = tone_gen(&tone_tx, amp, 160);
+                for (j = 0;  j < samples;  j++)
+                    amp[j] += awgn(&chan_noise_source);
+                /*endfor*/
+                modem_connect_tones_rx(&ced_rx, amp, samples);
+            }
+            hit = modem_connect_tones_rx_get(&ced_rx);
+            if (level < -43)
+            {
+                if (hit)
+                    false_hit = TRUE;
+            }
+            else if (level > -43)
+            {
+                if (!hit)
+                    false_miss = TRUE;
+            }
+            if (hit)
+                printf("Detected at %5dHz %ddB %12d %12d %d\n", pitch, level, ced_rx.channel_level, ced_rx.notch_level, hit);
+        }
+    }
+    if (false_hit  ||  false_miss)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    /* Talk-off test */
+    /* Here we use the BellCore talk off test tapes, intended for DTMF detector
+       testing. Presumably they should also have value here, but I am not sure.
+       If those voice snippets were chosen to be tough on DTMF detectors, they
+       might go easy on detectors looking for different pitches. However, the
+       Mitel DTMF test tape is known (the hard way) to exercise 2280Hz tone
+       detectors quite well. */
+    printf("Test 2: Talk-off test\n");
+    modem_connect_tones_rx_init(&cng_rx, MODEM_CONNECT_TONES_FAX_CNG, NULL, NULL);
+    modem_connect_tones_rx_init(&ced_rx, MODEM_CONNECT_TONES_FAX_CED, NULL, NULL);
+    modem_connect_tones_rx_init(&ec_dis_rx, MODEM_CONNECT_TONES_EC_DISABLE, NULL, NULL);
+    hits = 0;
+    for (j = 0;  bellcore_files[j][0];  j++)
+    {
+        if ((inhandle = afOpenFile(bellcore_files[j], "r", 0)) == AF_NULL_FILEHANDLE)
+        {
+            printf ("    Cannot open speech file '%s'\n", bellcore_files[j]);
+            exit (2);
+        }
+        if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+        {
+            printf ("    Unexpected frame size in speech file '%s'\n", bellcore_files[j]);
+            exit (2);
+        }
+        if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+        {
+            printf("    Unexpected sample rate in speech file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+        {
+            printf("    Unexpected number of channels in speech file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+
+        hits = 0;
+        while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, amp, 8000)))
+        {
+            modem_connect_tones_rx(&cng_rx, amp, frames);
+            modem_connect_tones_rx(&ced_rx, amp, frames);
+            modem_connect_tones_rx(&ec_dis_rx, amp, frames);
+            if (modem_connect_tones_rx_get(&cng_rx))
+            {
+                /* This is not a true measure of hits, as there might be more
+                   than one in a block of data. However, since the only good
+                   result is no hits, this approximation is OK. */
+                hits++;
+                modem_connect_tones_rx_init(&cng_rx, MODEM_CONNECT_TONES_FAX_CNG, NULL, NULL);
+            }
+            if (modem_connect_tones_rx_get(&ced_rx))
+            {
+                hits++;
+                modem_connect_tones_rx_init(&ced_rx, MODEM_CONNECT_TONES_FAX_CED, NULL, NULL);
+            }
+            if (modem_connect_tones_rx_get(&ec_dis_rx))
+            {
+                hits++;
+                modem_connect_tones_rx_init(&ec_dis_rx, MODEM_CONNECT_TONES_EC_DISABLE, NULL, NULL);
+            }
+        }
+        if (afCloseFile(inhandle) != 0)
+        {
+            printf("    Cannot close speech file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        printf("    File %d gave %d false hits.\n", j + 1, hits);
+    }
+    if (hits)
+    {
+        printf("Test failed.\n");
+        exit(2);
+    }
+
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/modem_echo_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,440 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * modem_echo_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: modem_echo_tests.c,v 1.22 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page modem_echo_can_tests_page Line echo cancellation for modems tests
+\section modem_echo_can_tests_page_sec_1 What does it do?
+Currently the echo cancellation tests only provide simple exercising of the
+cancellor in the way it might be used for line echo cancellation. The test code
+is in echotests.c. 
+
+The goal is to test the echo cancellor again the G.16X specs. Clearly, that also
+means the goal for the cancellor itself is to comply with those specs. Right
+now, the only aspect of these tests implemented is the line impulse response
+models in g168tests.c. 
+
+\section modem_echo_can_tests_page_sec_2 How does it work?
+The current test consists of feeding a wave file of real speech to the echo
+cancellor as the transmit signal. A very simple model of a telephone line is
+used to simulate a simple echo from the transmit signal. A second wave file of
+real speech is also used to simulate a signal received form the far end of the
+line. This is gated so it is only placed for one second every 10 seconds,
+simulating the double talk condition. The resulting echo cancelled signal can
+either be store in a file for further analysis, or played back as the data is
+processed. 
+
+A number of modified versions of this test have been performed. The signal level
+of the two speech sources has been varied. Several simple models of the
+telephone line have been used. Although the current cancellor design has known
+limitations, it seems stable for all these test conditions. No instability has
+been observed in the current version due to arithmetic overflow when the speech
+is very loud (with earlier versions, well, ....:) ). The lack of saturating
+arithmetic in general purpose CPUs is a huge disadvantage here, as software
+saturation logic would cause a major slow down. Floating point would be good,
+but is not usable in the Linux kernel. Anyway, the bottom line seems to be the
+current design is genuinely useful, if imperfect. 
+
+\section modem_echo_can_tests_page_sec_2 How do I use it?
+
+Build the tests with the command "./build". Currently there is no proper make
+setup, or way to build individual tests. "./build" will built all the tests
+which currently exist for the DSP functions. The echo cancellation test assumes
+there are two wave files containing mono, 16 bit signed PCM speech data, sampled
+at 8kHz. These should be called local_sound.wav and far_sound.wav. A third wave
+file will be produced. This very crudely starts with the first 256 bytes from
+the local_sound.wav file, followed by the results of the echo cancellation. The
+resulting audio is also played to the /dev/dsp device. A printf near the end of
+echo_tests.c is commented out with a \#if. If this is enabled, detailed
+information about the results of the echo cancellation will be written to
+stdout. By saving this into a file, Grace (recommended), GnuPlot, or some other
+plotting package may be used to graphically display the functioning of the
+cancellor.  
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(HAVE_FL_FL_H)  &&  defined(HAVE_FL_FL_CARTESIAN_H)  &&  defined(HAVE_FL_FL_AUDIO_METER_H)
+#define ENABLE_GUI
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#include <time.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#define GEN_CONST
+#include <math.h>
+#endif
+
+#include "spandsp.h"
+#include "spandsp/g168models.h"
+#if defined(ENABLE_GUI)
+#include "echo_monitor.h"
+#endif
+
+#if !defined(NULL)
+#define NULL (void *) 0
+#endif
+
+typedef struct
+{
+    const char *name;
+    int max;
+    int cur;
+    AFfilehandle handle;
+    int16_t signal[8000];
+} signal_source_t;
+
+signal_source_t local_css;
+
+fir32_state_t line_model;
+
+AFfilehandle resulthandle;
+int16_t residue_sound[8000];
+int residue_cur = 0;
+int do_codec_munge = TRUE;
+int use_gui = FALSE;
+
+static const int16_t tone_1khz[] = {10362, 7327, 0, -7327, -10362, -7327, 0, 7327};
+
+static inline void put_residue(int16_t tx, int16_t residue)
+{
+    int outframes;
+
+    residue_sound[residue_cur++] = tx;
+    residue_sound[residue_cur++] = residue;
+    if (residue_cur >= 8000)
+    {
+        residue_cur >>= 1;
+        outframes = afWriteFrames(resulthandle,
+                                  AF_DEFAULT_TRACK,
+                                  residue_sound,
+                                  residue_cur);
+        if (outframes != residue_cur)
+        {
+            fprintf(stderr, "    Error writing residue sound\n");
+            exit(2);
+        }
+        residue_cur = 0;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void signal_load(signal_source_t *sig, const char *name)
+{
+    float x;
+
+    sig->name = name;
+    if ((sig->handle = afOpenFile(sig->name, "r", 0)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open sound file '%s'\n", sig->name);
+        exit(2);
+    }
+    if ((x = afGetFrameSize(sig->handle, AF_DEFAULT_TRACK, 1)) != 2.0)
+    {
+        fprintf(stderr, "    Unexpected frame size in wave file '%s'\n", sig->name);
+        exit(2);
+    }
+    if ((x = afGetRate(sig->handle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+    {
+        printf("    Unexpected sample rate in wave file '%s'\n", sig->name);
+        exit(2);
+    }
+    if ((x = afGetChannels(sig->handle, AF_DEFAULT_TRACK)) != 1.0)
+    {
+        printf("    Unexpected number of channels in wave file '%s'\n", sig->name);
+        exit(2);
+    }
+    sig->max = afReadFrames(sig->handle, AF_DEFAULT_TRACK, sig->signal, 8000);
+    if (sig->max < 0)
+    {
+        fprintf(stderr, "    Error reading sound file '%s'\n", sig->name);
+        exit(2);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void signal_free(signal_source_t *sig)
+{
+    if (afCloseFile(sig->handle) != 0)
+    {
+        fprintf(stderr, "    Cannot close sound file '%s'\n", sig->name);
+        exit(2);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void signal_restart(signal_source_t *sig)
+{
+    sig->cur = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int16_t signal_amp(signal_source_t *sig)
+{
+    int16_t tx;
+
+    tx = sig->signal[sig->cur++];
+    if (sig->cur >= sig->max)
+        sig->cur = 0;
+    return tx;
+}
+/*- End of function --------------------------------------------------------*/
+
+static inline int16_t codec_munge(int16_t amp)
+{
+    if (do_codec_munge)
+        return alaw_to_linear(linear_to_alaw(amp));
+    return amp;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void channel_model_create(int model)
+{
+    static const int32_t *line_models[] =
+    {
+        line_model_d2_coeffs,
+        line_model_d3_coeffs,
+        line_model_d4_coeffs,
+        line_model_d5_coeffs,
+        line_model_d6_coeffs,
+        line_model_d7_coeffs,
+        line_model_d8_coeffs,
+        line_model_d9_coeffs
+    };
+
+    static int line_model_sizes[] =
+    {
+        sizeof(line_model_d2_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d3_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d4_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d5_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d6_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d7_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d8_coeffs)/sizeof(int32_t),
+        sizeof(line_model_d9_coeffs)/sizeof(int32_t)
+    };
+
+    fir32_create(&line_model, line_models[model], line_model_sizes[model]);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int16_t channel_model(int16_t local, int16_t far)
+{
+    int16_t echo;
+    int16_t rx;
+
+    /* Channel modelling is merely simulating the effects of A-law distortion
+       and using one of the echo models from G.168 */
+
+    /* The local tx signal will have gone through an A-law munging before
+       it reached the line's analogue area where the echo occurs. */
+    echo = fir32(&line_model, codec_munge(local/8));
+    /* The far end signal will have been through an A-law munging, although
+       this should not affect things. */
+    rx = echo + codec_munge(far);
+    /* This mixed echo and far end signal will have been through an A-law munging when it came back into
+       the digital network. */
+    rx = codec_munge(rx);
+    return  rx;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    modem_echo_can_state_t *ctx;
+    //awgn_state_t local_noise_source;
+    awgn_state_t far_noise_source;
+    int i;
+    int clean;
+    int16_t rx;
+    int16_t tx;
+    int local_cur;
+    int far_cur;
+    int result_cur;
+    AFfilesetup filesetup;
+    int line_model_no;
+    time_t now;
+    power_meter_t power_before;
+    power_meter_t power_after;
+    float unadapted_output_power;
+    float unadapted_echo_power;
+    float adapted_output_power;
+    float adapted_echo_power;
+#if defined(ENABLE_GUI)
+    int16_t amp[2];
+#endif
+    
+    line_model_no = 0;
+    use_gui = FALSE;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-g") == 0)
+        {
+            use_gui = TRUE;
+            continue;
+        }
+        line_model_no = atoi(argv[1]);
+    }
+    time(&now);
+    ctx = modem_echo_can_create(256);
+    awgn_init_dbm0(&far_noise_source, 7162534, -50.0f);
+
+    signal_load(&local_css, "sound_c1_8k.wav");
+
+    filesetup = afNewFileSetup();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+
+    resulthandle = afOpenFile("modem_echo.wav", "w", filesetup);
+    if (resulthandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open result file\n");
+        exit(2);
+    }
+
+#if defined(ENABLE_GUI)
+    if (use_gui)
+        start_echo_can_monitor(256);
+#endif
+
+    local_cur = 0;
+    far_cur = 0;
+    result_cur = 0;
+    channel_model_create(line_model_no);
+#if defined(ENABLE_GUI)
+    if (use_gui)
+        echo_can_monitor_line_model_update(line_model.coeffs, line_model.taps);
+#endif
+
+    modem_echo_can_flush(ctx);
+
+    power_meter_init(&power_before, 5);
+    power_meter_init(&power_after, 5);
+    
+    /* Measure the echo power before adaption */
+    modem_echo_can_adaption_mode(ctx, FALSE);
+    for (i = 0;  i < 8000*5;  i++)
+    {
+        tx = tone_1khz[i & 7];
+        rx = channel_model(tx, 0);
+        clean = modem_echo_can_update(ctx, tx, rx);
+        power_meter_update(&power_before, rx);
+        power_meter_update(&power_after, clean);
+    }
+    unadapted_output_power = power_meter_dbm0(&power_before);
+    unadapted_echo_power = power_meter_dbm0(&power_after);
+    printf("Pre-adaption: output power %10.5fdBm0, echo power %10.5fdBm0\n", unadapted_output_power, unadapted_echo_power);
+    
+    /* Converge the canceller */
+    signal_restart(&local_css);
+    modem_echo_can_adaption_mode(ctx, TRUE);
+    for (i = 0;  i < 800*2;  i++)
+    {
+        clean = modem_echo_can_update(ctx, 0, 0);
+        put_residue(0, clean);
+    }
+
+    for (i = 0;  i < 8000*50;  i++)
+    {
+        tx = signal_amp(&local_css);
+        rx = channel_model(tx, 0);
+        clean = modem_echo_can_update(ctx, tx, rx);
+        power_meter_update(&power_before, rx);
+        power_meter_update(&power_after, clean);
+#if 0
+        if (i%800 == 0)
+            printf("Powers %10.5fdBm0 %10.5fdBm0\n", power_meter_dbm0(&power_before), power_meter_dbm0(&power_after));
+#endif
+        put_residue(tx, clean);
+#if defined(ENABLE_GUI)
+        if (use_gui)
+        {
+            echo_can_monitor_can_update(ctx->fir_taps16, 256);
+            amp[0] = tx;
+            echo_can_monitor_line_spectrum_update(amp, 1);
+        }
+#endif
+    }
+
+    /* Now lets see how well adapted we are */
+    modem_echo_can_adaption_mode(ctx, FALSE);
+    for (i = 0;  i < 8000*5;  i++)
+    {
+        tx = tone_1khz[i & 7];
+        rx = channel_model(tx, 0);
+        clean = modem_echo_can_update(ctx, tx, rx);
+        power_meter_update(&power_before, rx);
+        power_meter_update(&power_after, clean);
+    }
+    adapted_output_power = power_meter_dbm0(&power_before);
+    adapted_echo_power = power_meter_dbm0(&power_after);
+    printf("Post-adaption: output power %10.5fdBm0, echo power %10.5fdBm0\n", adapted_output_power, adapted_echo_power);
+    
+    if (fabsf(adapted_output_power - unadapted_output_power) > 0.1f
+        ||
+        adapted_echo_power > unadapted_echo_power - 30.0f)
+    {
+        printf("Tests failed.\n");
+        exit(2);
+    }
+
+    modem_echo_can_free(ctx);
+    signal_free(&local_css);
+
+    if (afCloseFile(resulthandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close speech file '%s'\n", "result_sound.wav");
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+
+#if defined(ENABLE_GUI)
+    if (use_gui)
+        echo_can_monitor_wait_to_end();
+#endif
+
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/modem_monitor.cpp	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,522 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * constel.cpp - Display QAM constellations, using the FLTK toolkit.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: modem_monitor.cpp,v 1.11 2006/10/24 13:45:29 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(HAVE_FL_FL_H)  &&  defined(HAVE_FL_FL_CARTESIAN_H)
+
+#include <inttypes.h>
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/select.h>
+
+#include <FL/Fl.H>
+#include <FL/Fl_Overlay_Window.H>
+#include <FL/Fl_Light_Button.H>
+#include <Fl/Fl_Cartesian.H>
+#include <Fl/Fl_Audio_Meter.H>
+#include <Fl/Fl_Output.H>
+#include <FL/fl_draw.H>
+
+#include "../src/spandsp/complex.h"
+
+#define SYMBOL_TRACKER_POINTS   12000
+#define CARRIER_TRACKER_POINTS  12000
+
+struct qam_monitor_s
+{
+    Fl_Double_Window *w;
+    Fl_Group *c_const;
+    Fl_Group *c_right;
+    Fl_Group *c_eq;
+    Fl_Group *c_symbol_track;
+    
+    /* Constellation stuff */
+    Ca_Canvas *canvas_const;
+    Ca_X_Axis *sig_i;
+    Ca_Y_Axis *sig_q;
+
+    Ca_Point *constel_point[100000];
+    int constel_window;
+    int next_constel_point;
+    int skip;
+
+    /* Equalizer stuff */
+    Ca_Canvas *canvas_eq;
+
+    Ca_X_Axis *eq_x;
+    Ca_Y_Axis *eq_y;
+
+    Ca_Line *eq_re;
+    Ca_Line *eq_im;
+
+    double eq_re_plot[200];
+    double eq_im_plot[200];
+
+    /* Carrier and symbol tracking stuff */
+    Ca_Canvas *canvas_track;
+
+    Ca_X_Axis *track_x;
+    Ca_Y_Axis *symbol_track_y;
+    Ca_Y_Axis *carrier_y;
+
+    Ca_Line *symbol_track;
+    Ca_Line *carrier;
+
+    float symbol_tracker[SYMBOL_TRACKER_POINTS];
+    double symbol_track_plot[SYMBOL_TRACKER_POINTS*2];
+    int symbol_track_points;
+    int symbol_track_ptr;
+    int symbol_track_window;
+
+    float carrier_tracker[CARRIER_TRACKER_POINTS];
+    double carrier_plot[CARRIER_TRACKER_POINTS*2];
+    int carrier_points;
+    int carrier_ptr;
+    int carrier_window;
+
+    /* Audio meter stuff */
+    Fl_Audio_Meter *audio_meter;
+    Fl_Output *audio_level;
+    int32_t power_reading;
+};
+
+#include "modem_monitor.h"
+
+int qam_monitor_update_constel(qam_monitor_t *s, const complexf_t *pt)
+{
+    int i;
+
+    s->canvas_const->current(s->canvas_const);
+    if (s->constel_point[s->next_constel_point])
+        delete s->constel_point[s->next_constel_point];
+    s->constel_point[s->next_constel_point++] = new Ca_Point(pt->re, pt->im, FL_BLACK);
+    if (s->next_constel_point >= s->constel_window)
+        s->next_constel_point = 0;
+    if (++s->skip >= 100)
+    {
+        s->skip = 0;
+        Fl::check();
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int qam_monitor_update_equalizer(qam_monitor_t *s, const complexf_t *coeffs, int len)
+{
+    int i;
+    float min;
+    float max;
+
+    /* Protect against screwy values */
+    for (i = 0;  i < len;  i++)
+    {
+        if (isnan(coeffs[i].re)  ||  isinf(coeffs[i].re))
+            break;
+        if (isnan(coeffs[i].im)  ||  isinf(coeffs[i].im))
+            break;
+        if (coeffs[i].re < -20.0  ||  coeffs[i].re > 20.0)
+            break;
+        if (coeffs[i].im < -20.0  ||  coeffs[i].im > 20.0)
+            break;
+    }
+    if (i != len)
+        return -1;
+
+    if (s->eq_re)
+        delete s->eq_re;
+    if (s->eq_im)
+        delete s->eq_im;
+
+    s->canvas_eq->current(s->canvas_eq);
+    i = 0;
+    min = coeffs[i].re;
+    if (min > coeffs[i].im)
+        min = coeffs[i].im;
+    max = coeffs[i].re;
+    if (max < coeffs[i].im)
+        max = coeffs[i].im;
+    for (i = 0;  i < len;  i++)
+    {
+        s->eq_re_plot[2*i] = (i - len/2)/2.0;
+        s->eq_re_plot[2*i + 1] = coeffs[i].re;
+        if (min > coeffs[i].re)
+            min = coeffs[i].re;
+        if (max < coeffs[i].re)
+            max = coeffs[i].re;
+
+        s->eq_im_plot[2*i] = (i - len/2)/2.0;
+        s->eq_im_plot[2*i + 1] = coeffs[i].im;
+        if (min > coeffs[i].im)
+            min = coeffs[i].im;
+        if (max < coeffs[i].im)
+            max = coeffs[i].im;
+    }
+    
+    s->eq_x->minimum(-len/4.0);
+    s->eq_x->maximum(len/4.0);
+    s->eq_y->maximum((max == min)  ?  max + 0.2  :  max);
+    s->eq_y->minimum(min);
+    s->eq_re = new Ca_Line(len, s->eq_re_plot, 0, 0, FL_BLUE, CA_NO_POINT);
+    s->eq_im = new Ca_Line(len, s->eq_im_plot, 0, 0, FL_RED, CA_NO_POINT);
+    Fl::check();
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int qam_monitor_update_symbol_tracking(qam_monitor_t *s, float total_correction)
+{
+    int i;
+    int j;
+    float min;
+    float max;
+
+    s->symbol_tracker[s->symbol_track_ptr++] = total_correction;
+    if (s->symbol_track_points < SYMBOL_TRACKER_POINTS)
+        s->symbol_track_points++;
+    if (s->symbol_track_ptr >= SYMBOL_TRACKER_POINTS)
+        s->symbol_track_ptr = 0;
+
+    s->canvas_track->current(s->canvas_track);
+    if (s->symbol_track)
+        delete s->symbol_track;
+    s->track_x->current();
+    s->symbol_track_y->current();
+
+    min =
+    max = s->symbol_tracker[0];
+    for (i = s->symbol_track_ptr, j = 0;  i < s->symbol_track_points;  i++, j++)
+    {
+        s->symbol_track_plot[2*j] = j;
+        s->symbol_track_plot[2*j + 1] = s->symbol_tracker[i];
+        if (min > s->symbol_tracker[i])
+            min = s->symbol_tracker[i];
+        if (max < s->symbol_tracker[i])
+            max = s->symbol_tracker[i];
+    }
+    for (i = 0;  i < s->symbol_track_ptr;  i++, j++)
+    {
+        s->symbol_track_plot[2*j] = j;
+        s->symbol_track_plot[2*j + 1] = s->symbol_tracker[i];
+        if (min > s->symbol_tracker[i])
+            min = s->symbol_tracker[i];
+        if (max < s->symbol_tracker[i])
+            max = s->symbol_tracker[i];
+    }
+    s->symbol_track_y->maximum((fabs(max - min) < 0.05)  ?  max + 0.05  :  max);
+    s->symbol_track_y->minimum(min);
+
+    s->symbol_track = new Ca_Line(s->symbol_track_points, s->symbol_track_plot, 0, 0, FL_RED, CA_NO_POINT);
+    //Fl::check();
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int qam_monitor_update_audio_level(qam_monitor_t *s, const int16_t amp[], int len)
+{
+    int i;
+    char buf[11];
+    double val;
+    
+    for (i = 0;  i < len;  i++)
+    {
+        s->audio_meter->sample(amp[i]/32768.0);
+        s->power_reading += ((amp[i]*amp[i] - s->power_reading) >> 10);
+    }
+    if (s->power_reading <= 0)
+        val = -90.0;
+    else
+        val = log10((double) s->power_reading/(32767.0f*32767.0f))*10.0f + 3.14 + 3.02;
+
+    snprintf(buf, sizeof(buf), "%5.1fdBm0", val);
+    s->audio_level->value(buf);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int qam_monitor_update_carrier_tracking(qam_monitor_t *s, float carrier_freq)
+{
+    int i;
+    int j;
+    float min;
+    float max;
+
+    s->carrier_tracker[s->carrier_ptr++] = carrier_freq;
+    if (s->carrier_points < CARRIER_TRACKER_POINTS)
+        s->carrier_points++;
+    if (s->carrier_ptr >= CARRIER_TRACKER_POINTS)
+        s->carrier_ptr = 0;
+
+    s->canvas_track->current(s->canvas_track);
+    if (s->carrier)
+        delete s->carrier;
+    s->track_x->current();
+    s->carrier_y->current();
+
+    min =
+    max = s->carrier_tracker[0];
+    for (i = s->carrier_ptr, j = 0;  i < s->carrier_points;  i++, j++)
+    {
+        s->carrier_plot[2*j] = j;
+        s->carrier_plot[2*j + 1] = s->carrier_tracker[i];
+        if (min > s->carrier_tracker[i])
+            min = s->carrier_tracker[i];
+        if (max < s->carrier_tracker[i])
+            max = s->carrier_tracker[i];
+    }
+    for (i = 0;  i < s->carrier_ptr;  i++, j++)
+    {
+        s->carrier_plot[2*j] = j;
+        s->carrier_plot[2*j + 1] = s->carrier_tracker[i];
+        if (min > s->carrier_tracker[i])
+            min = s->carrier_tracker[i];
+        if (max < s->carrier_tracker[i])
+            max = s->carrier_tracker[i];
+    }
+
+    s->carrier_y->maximum((fabs(max - min) < 0.05)  ?  max + 0.05  :  max);
+    s->carrier_y->minimum(min);
+
+    s->carrier = new Ca_Line(s->carrier_points, s->carrier_plot, 0, 0, FL_BLUE, CA_NO_POINT);
+    //Fl::check();
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+qam_monitor_t *qam_monitor_init(float constel_width, const char *tag)
+{
+    char buf[132 + 1];
+    float x;
+    float y;
+    qam_monitor_t *s;
+    
+    if ((s = (qam_monitor_t *) malloc(sizeof(*s))) == NULL)
+        return NULL;
+    
+    s->w = new Fl_Double_Window(905, 400, (tag)  ?  tag  :  "QAM monitor");
+
+    s->c_const = new Fl_Group(0, 0, 380, 400);
+    s->c_const->box(FL_DOWN_BOX);
+    s->c_const->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
+
+    s->canvas_const = new Ca_Canvas(60, 30, 300, 300, "Constellation");
+    s->canvas_const->box(FL_PLASTIC_DOWN_BOX);
+    s->canvas_const->color(7);
+    s->canvas_const->align(FL_ALIGN_TOP);
+    s->canvas_const->border(15);
+
+    s->sig_i = new Ca_X_Axis(65, 330, 290, 30, "I");
+    s->sig_i->align(FL_ALIGN_BOTTOM);
+    s->sig_i->minimum(-constel_width);
+    s->sig_i->maximum(constel_width);
+    s->sig_i->label_format("%g");
+    s->sig_i->minor_grid_color(fl_gray_ramp(20));
+    s->sig_i->major_grid_color(fl_gray_ramp(15));
+    s->sig_i->label_grid_color(fl_gray_ramp(10));
+    s->sig_i->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    s->sig_i->minor_grid_style(FL_DOT);
+    s->sig_i->major_step(5);
+    s->sig_i->label_step(1);
+    s->sig_i->axis_color(FL_BLACK);
+    s->sig_i->axis_align(CA_BOTTOM | CA_LINE);
+
+    s->sig_q = new Ca_Y_Axis(20, 35, 40, 290, "Q");
+    s->sig_q->align(FL_ALIGN_LEFT);
+    s->sig_q->minimum(-constel_width);
+    s->sig_q->maximum(constel_width);
+    s->sig_q->minor_grid_color(fl_gray_ramp(20));
+    s->sig_q->major_grid_color(fl_gray_ramp(15));
+    s->sig_q->label_grid_color(fl_gray_ramp(10));
+    //s->sig_q->grid_visible(CA_MINOR_TICK | CA_MAJOR_TICK | CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    s->sig_q->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    s->sig_q->minor_grid_style(FL_DOT);
+    s->sig_q->major_step(5);
+    s->sig_q->label_step(1);
+    s->sig_q->axis_color(FL_BLACK);
+
+    s->sig_q->current();
+
+    s->c_const->end();
+
+    s->c_right = new Fl_Group(440, 0, 465, 405);
+
+    s->c_eq = new Fl_Group(380, 0, 265, 200);
+    s->c_eq->box(FL_DOWN_BOX);
+    s->c_eq->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
+    s->c_eq->current();
+    s->canvas_eq = new Ca_Canvas(460, 35, 150, 100, "Equalizer");
+    s->canvas_eq->box(FL_PLASTIC_DOWN_BOX);
+    s->canvas_eq->color(7);
+    s->canvas_eq->align(FL_ALIGN_TOP);
+    Fl_Group::current()->resizable(s->canvas_eq);
+    s->canvas_eq->border(15);
+
+    s->eq_x = new Ca_X_Axis(465, 135, 140, 30, "Symbol");
+    s->eq_x->align(FL_ALIGN_BOTTOM);
+    s->eq_x->minimum(-8.0);
+    s->eq_x->maximum(8.0);
+    s->eq_x->label_format("%g");
+    s->eq_x->minor_grid_color(fl_gray_ramp(20));
+    s->eq_x->major_grid_color(fl_gray_ramp(15));
+    s->eq_x->label_grid_color(fl_gray_ramp(10));
+    s->eq_x->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    s->eq_x->minor_grid_style(FL_DOT);
+    s->eq_x->major_step(5);
+    s->eq_x->label_step(1);
+    s->eq_x->axis_align(CA_BOTTOM | CA_LINE);
+    s->eq_x->axis_color(FL_BLACK);
+    s->eq_x->current();
+
+    s->eq_y = new Ca_Y_Axis(420, 40, 40, 90, "Amp");
+    s->eq_y->align(FL_ALIGN_LEFT);
+    s->eq_y->minimum(-0.1);
+    s->eq_y->maximum(0.1);
+    s->eq_y->minor_grid_color(fl_gray_ramp(20));
+    s->eq_y->major_grid_color(fl_gray_ramp(15));
+    s->eq_y->label_grid_color(fl_gray_ramp(10));
+    s->eq_y->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    s->eq_y->minor_grid_style(FL_DOT);
+    s->eq_y->major_step(5);
+    s->eq_y->label_step(1);
+    s->eq_y->axis_color(FL_BLACK);
+    s->eq_y->current();
+
+    s->c_eq->end();
+
+    s->c_symbol_track = new Fl_Group(380, 200, 525, 200);
+    s->c_symbol_track->box(FL_DOWN_BOX);
+    s->c_symbol_track->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
+    s->c_symbol_track->current();
+
+    s->canvas_track = new Ca_Canvas(490, 235, 300, 100, "Symbol and carrier tracking");
+    s->canvas_track->box(FL_PLASTIC_DOWN_BOX);
+    s->canvas_track->color(7);
+    s->canvas_track->align(FL_ALIGN_TOP);
+    Fl_Group::current()->resizable(s->canvas_track);
+    s->canvas_track->border(15);
+
+    s->track_x = new Ca_X_Axis(495, 335, 290, 30, "Time (symbols)");
+    s->track_x->align(FL_ALIGN_BOTTOM);
+    s->track_x->minimum(0.0);
+    s->track_x->maximum(2400.0*5.0);
+    s->track_x->label_format("%g");
+    s->track_x->minor_grid_color(fl_gray_ramp(20));
+    s->track_x->major_grid_color(fl_gray_ramp(15));
+    s->track_x->label_grid_color(fl_gray_ramp(10));
+    s->track_x->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    s->track_x->minor_grid_style(FL_DOT);
+    s->track_x->major_step(5);
+    s->track_x->label_step(1);
+    s->track_x->axis_align(CA_BOTTOM | CA_LINE);
+    s->track_x->axis_color(FL_BLACK);
+    s->track_x->current();
+
+    s->symbol_track_y = new Ca_Y_Axis(420, 240, 70, 90, "Cor");
+    s->symbol_track_y->align(FL_ALIGN_LEFT);
+    s->symbol_track_y->minimum(-0.1);
+    s->symbol_track_y->maximum(0.1);
+    s->symbol_track_y->minor_grid_color(fl_gray_ramp(20));
+    s->symbol_track_y->major_grid_color(fl_gray_ramp(15));
+    s->symbol_track_y->label_grid_color(fl_gray_ramp(10));
+    s->symbol_track_y->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    s->symbol_track_y->minor_grid_style(FL_DOT);
+    s->symbol_track_y->major_step(5);
+    s->symbol_track_y->label_step(1);
+    s->symbol_track_y->axis_color(FL_RED);
+    s->symbol_track_y->current();
+
+    s->carrier_y = new Ca_Y_Axis(790, 240, 70, 90, "Freq");
+    s->carrier_y->align(FL_ALIGN_RIGHT);
+    s->carrier_y->minimum(-0.1);
+    s->carrier_y->maximum(0.1);
+    s->carrier_y->minor_grid_color(fl_gray_ramp(20));
+    s->carrier_y->major_grid_color(fl_gray_ramp(15));
+    s->carrier_y->label_grid_color(fl_gray_ramp(10));
+    s->carrier_y->grid_visible(CA_LABEL_GRID | CA_ALWAYS_VISIBLE);
+    s->carrier_y->minor_grid_style(FL_DOT);
+    s->carrier_y->major_step(5);
+    s->carrier_y->label_step(1);
+    s->carrier_y->axis_align(CA_RIGHT);
+    s->carrier_y->axis_color(FL_BLUE);
+    s->carrier_y->current();
+
+    s->c_symbol_track->end();
+
+    s->audio_meter = new Fl_Audio_Meter(672, 10, 16, 150, "");
+    s->audio_meter->box(FL_PLASTIC_UP_BOX);
+    s->audio_meter->type(FL_VERT_AUDIO_METER);
+
+    s->audio_level = new Fl_Output(650, 170, 60, 20, "");
+    s->audio_level->textsize(10);
+
+    s->c_right->end();
+
+    Fl_Group::current()->resizable(s->c_right);
+    s->w->end();
+    s->w->show();
+
+    s->next_constel_point = 0;
+    s->constel_window = 10000;
+
+    s->carrier_points = 0;
+    s->carrier_ptr = 0;
+    s->carrier_window = 100;
+
+    s->symbol_track_points = 0;
+    s->symbol_track_window = 10000;
+    Fl::check();
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+void qam_wait_to_end(qam_monitor_t *s) 
+{
+    fd_set rfds;
+    int res;
+    struct timeval tv;
+
+    fprintf(stderr, "Processing complete.  Press the <enter> key to end\n");
+    do
+    {
+        usleep(100000);
+        Fl::check();
+        FD_ZERO(&rfds);
+        FD_SET(0, &rfds);
+        tv.tv_usec = 100000;
+        tv.tv_sec = 0;
+        res = select(1, &rfds, NULL, NULL, &tv);
+    }
+    while (res <= 0);
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/modem_monitor.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,67 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * constel.h - Display QAM constellations, using the FLTK toolkit.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: modem_monitor.h,v 1.9 2006/10/24 13:45:29 steveu Exp $
+ */
+
+/*! \page constel_page Modem performance monitoring
+\section constel_page_sec_1 What does it do?
+This code controls a GUI window, which provides monitoring of the internal status
+of a modem. It shows, graphically:
+
+    - the constellation, for PSK, QAM and other similar modulations.
+    - the equalizer status, for modems with adaptive equalizers.
+    - the carrier frequency.
+    - the symbol timing correction.
+
+\section constel_page_sec_2 How does it work?
+This code uses the FLTK cross platform GUI toolkit. It works on X11 and Windows platforms.
+In addition to the basic FLTK toolkit, fltk_cartesian is also required.
+*/
+
+#if !defined(_MODEM_MONITOR_H_)
+#define _MODEM_MONITOR_H_
+
+struct qam_monitor_s;
+
+typedef struct qam_monitor_s qam_monitor_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+qam_monitor_t *qam_monitor_init(float constel_width, const char *tag);
+int qam_monitor_update_constel(qam_monitor_t *s, const complexf_t *pt);
+int qam_monitor_update_equalizer(qam_monitor_t *s, const complexf_t *coeffs, int len);
+int qam_monitor_update_symbol_tracking(qam_monitor_t *s, float total_correction);
+int qam_monitor_update_carrier_tracking(qam_monitor_t *s, float carrier);
+int qam_monitor_update_audio_level(qam_monitor_t *s, const int16_t amp[], int len);
+void qam_wait_to_end(qam_monitor_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/noise_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,280 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * noise_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: noise_tests.c,v 1.9 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page noise_tests_page Noise generator tests
+\section noise_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#if !defined(M_PI)
+# define M_PI           3.14159265358979323846  /* pi */
+#endif
+
+#define OUT_FILE_NAME   "noise.wav"
+
+/* Some simple sanity tests for the noise generation routines */
+
+int main (int argc, char *argv[])
+{
+    int i;
+    int j;
+    int level;
+    int clip_high;
+    int clip_low;
+    int total_samples;
+    int seed = 1234567;
+    int outframes;
+    int16_t value;
+    double total;
+    double x;
+    double p;
+    double o;
+    int bins[65536];
+    int16_t amp[1024];
+    noise_state_t noise_source;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+    if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+
+    /* Generate AWGN at several RMS levels between -50dBOv and 0dBOv. Noise is
+       generated for a large number of samples (1,000,000), and the RMS value
+       of the noise is calculated along the way. If the resulting level is
+       close to the requested RMS level, at least the scaling of the noise
+       should be Ok. At high levels some clipping may distort the result a
+       little. */
+    printf("Testing with quality 7 AWGN\n");
+    for (level = -50;  level <= 0;  level += 5)
+    {
+        clip_high = 0;
+        clip_low = 0;
+        total = 0.0;
+        noise_init_dbov(&noise_source, seed, (float) level, NOISE_CLASS_AWGN, 7);
+        total_samples = 1000000;
+        for (i = 0;  i < total_samples;  i++)
+        {
+            value = noise(&noise_source);
+            if (value == 32767)
+                clip_high++;
+            else if (value == -32768)
+                clip_low++;
+            total += ((double) value)*((double) value);
+        }
+        printf ("RMS = %.3f (expected %d) %.2f%% error [clipped samples %d+%d]\n",
+                log10(sqrt(total/total_samples)/32768.0)*20.0,
+                level,
+                100.0*(1.0 - sqrt(total/total_samples)/(pow(10.0, level/20.0)*32768.0)),
+                clip_low,
+                clip_high);
+        if (level < -5  &&  fabs(log10(sqrt(total/total_samples)/32768.0)*20.0 - level) > 0.2)
+        {
+            printf("Test failed\n");
+            exit(2);
+        }
+    }
+
+    printf("Testing with quality 20 AWGN\n");
+    for (level = -50;  level <= 0;  level += 5)
+    {
+        clip_high = 0;
+        clip_low = 0;
+        total = 0.0;
+        noise_init_dbov(&noise_source, seed, (float) level, NOISE_CLASS_AWGN, 20);
+        total_samples = 1000000;
+        for (i = 0;  i < total_samples;  i++)
+        {
+            value = noise(&noise_source);
+            if (value == 32767)
+                clip_high++;
+            else if (value == -32768)
+                clip_low++;
+            total += ((double) value)*((double) value);
+        }
+        printf ("RMS = %.3f (expected %d) %.2f%% error [clipped samples %d+%d]\n",
+                log10(sqrt(total/total_samples)/32768.0)*20.0,
+                level,
+                100.0*(1.0 - sqrt(total/total_samples)/(pow(10.0, level/20.0)*32768.0)),
+                clip_low,
+                clip_high);
+        if (level < -5  &&  fabs(log10(sqrt(total/total_samples)/32768.0)*20.0 - level) > 0.2)
+        {
+            printf("Test failed\n");
+            exit(2);
+        }
+    }
+
+    /* Now look at the statistical spread of the results, by collecting data in
+       bins from a large number of samples. Use a fairly high noise level, but
+       low enough to avoid significant clipping. Use the Gaussian model to
+       predict the real probability, and present the results for graphing. */
+    memset(bins, 0, sizeof(bins));
+    clip_high = 0;
+    clip_low = 0;
+    level = -15;
+    noise_init_dbov(&noise_source, seed, (float) level, NOISE_CLASS_AWGN, 7);
+    total_samples = 10000000;
+    for (i = 0;  i < total_samples;  i++)
+    {
+        value = noise(&noise_source);
+        if (value == 32767)
+            clip_high++;
+        else if (value == -32768)
+            clip_low++;
+        bins[value + 32768]++;
+    }
+    /* Find the RMS power level to expect */
+    o = pow(10.0, level/20.0)*(32768.0*0.70711);
+    for (i = 0;  i < 65536 - 10;  i++)
+    {
+        x = i - 32768;
+        /* Find the real probability for this bin */
+        p = (1.0/(o*sqrt(2.0*M_PI)))*exp(-(x*x)/(2.0*o*o));
+        /* Now do a little smoothing on the real data to get a reasonably
+           steady answer */
+        x = 0;
+        for (j = 0;  j < 10;  j++)
+            x += bins[i + j];
+        x /= 10.0;
+        x /= total_samples;
+        /* Now send it out for graphing. */
+        if (p > 0.0000001)
+            printf("%6d %.7f %.7f\n", i - 32768, x, p);
+    }
+
+    printf("Generating AWGN at -15dBOv to file\n");
+    for (j = 0;  j < 50;  j++)
+    {
+        for (i = 0;  i < 1024;  i++)
+            amp[i] = noise(&noise_source);
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  1024);
+        if (outframes != 1024)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+
+    /* Generate AWGN at several RMS levels between -50dBm and 0dBm. Noise is
+       generated for a large number of samples (1,000,000), and the RMS value
+       of the noise is calculated along the way. If the resulting level is
+       close to the requested RMS level, at least the scaling of the noise
+       should be Ok. At high levels some clipping may distort the result a
+       little. */
+    printf("Testing with quality 7 Hoth noise.\n");
+    for (level = -50;  level <= 0;  level += 5)
+    {
+        clip_high = 0;
+        clip_low = 0;
+        total = 0.0;
+        noise_init_dbov(&noise_source, seed, (float) level, NOISE_CLASS_HOTH, 7);
+        total_samples = 1000000;
+        for (i = 0;  i < total_samples;  i++)
+        {
+            value = noise(&noise_source);
+            if (value == 32767)
+                clip_high++;
+            else if (value == -32768)
+                clip_low++;
+            total += ((double) value)*((double) value);
+        }
+        printf ("RMS = %.3f (expected %d) %.2f%% error [clipped samples %d+%d]\n",
+                log10(sqrt(total/total_samples)/32768.0)*20.0,
+                level,
+                100.0*(1.0 - sqrt(total/total_samples)/(pow(10.0, level/20.0)*32768.0)),
+                clip_low,
+                clip_high);
+        if (level < -5  &&  fabs(log10(sqrt(total/total_samples)/32768.0)*20.0 - level) > 0.2)
+        {
+            printf("Test failed\n");
+            exit(2);
+        }
+    }
+    
+    printf("Generating Hoth noise at -15dBOv to file\n");
+    level = -15;
+    noise_init_dbov(&noise_source, seed, (float) level, NOISE_CLASS_HOTH, 7);
+    for (j = 0;  j < 50;  j++)
+    {
+        for (i = 0;  i < 1024;  i++)
+            amp[i] = noise(&noise_source);
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  1024);
+        if (outframes != 1024)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+
+    if (afCloseFile(outhandle))
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/oki_adpcm_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,247 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * oki_adpcm_tests.c - Test the Oki (Dialogic) ADPCM encode and decode
+ *                     software at 24kbps and 32kbps.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: oki_adpcm_tests.c,v 1.23 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page oki_adpcm_tests_page OKI (Dialogic) ADPCM tests
+\section oki_adpcm_tests_page_sec_1 What does it do?
+To perform a general audio quality test, oki_adpcm_tests should be run. The test file
+../localtests/short_nb_voice.wav will be compressed to the specified bit rate,
+decompressed, and the resulting audio stored in post_oki_adpcm.wav. A simple SNR test
+is automatically performed. Listening tests may be used for a more detailed evaluation
+of the degradation in quality caused by the compression. Both 32k bps and 24k bps
+compression may be tested.
+
+\section oki_adpcm_tests_page_sec_2 How is it used?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define IN_FILE_NAME    "../localtests/short_nb_voice.wav"
+#define OUT_FILE_NAME   "post_oki_adpcm.wav"
+
+#define HIST_LEN        1000
+
+int main(int argc, char *argv[])
+{
+    int i;
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int frames;
+    int dec_frames;
+    int outframes;
+    int oki_bytes;
+    int bit_rate;
+    float x;
+    double pre_energy;
+    double post_energy;
+    double diff_energy;
+    int16_t pre_amp[HIST_LEN];
+    int16_t post_amp[HIST_LEN];
+    uint8_t oki_data[HIST_LEN];
+    int16_t history[HIST_LEN];
+    int hist_in;
+    int hist_out;
+    oki_adpcm_state_t *oki_enc_state;
+    oki_adpcm_state_t *oki_dec_state;
+    int xx;
+    int total_pre_samples;
+    int total_compressed_bytes;
+    int total_post_samples;
+    const char *in_file_name;
+
+    bit_rate = 32000;
+    in_file_name = IN_FILE_NAME;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-2") == 0)
+        {
+            bit_rate = 24000;
+            continue;
+        }
+        if (strcmp(argv[i], "-i") == 0)
+        {
+            in_file_name = argv[++i];
+            continue;
+        }
+        fprintf(stderr, "Unknown parameter %s specified.\n", argv[i]);
+        exit(2);
+    }
+
+    if ((inhandle = afOpenFile(in_file_name, "r", 0)) == AF_NULL_FILEHANDLE)
+    {
+        printf("    Cannot open wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+    if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+    {
+        printf("    Unexpected frame size in wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+    if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+    {
+        printf("    Unexpected sample rate in wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+    if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+    {
+        printf("    Unexpected number of channels in wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup);
+    if (outhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+
+    if ((oki_enc_state = oki_adpcm_init(NULL, bit_rate)) == NULL)
+    {
+        fprintf(stderr, "    Cannot create encoder\n");
+        exit(2);
+    }
+        
+    if ((oki_dec_state = oki_adpcm_init(NULL, bit_rate)) == NULL)
+    {
+        fprintf(stderr, "    Cannot create decoder\n");
+        exit(2);
+    }
+
+    hist_in = 0;
+    if (bit_rate == 32000)
+        hist_out = 0;
+    else
+        hist_out = HIST_LEN - 27;
+    memset(history, 0, sizeof(history));
+    pre_energy = 0.0;
+    post_energy = 0.0;
+    diff_energy = 0.0;
+    total_pre_samples = 0;
+    total_compressed_bytes = 0;
+    total_post_samples = 0;
+    while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, pre_amp, 159)))
+    {
+        total_pre_samples +=frames;
+        oki_bytes = oki_adpcm_encode(oki_enc_state, oki_data, pre_amp, frames);
+        total_compressed_bytes += oki_bytes;
+        dec_frames = oki_adpcm_decode(oki_dec_state, post_amp, oki_data, oki_bytes);
+        total_post_samples += dec_frames;
+        for (i = 0;  i < frames;  i++)
+        {
+            history[hist_in++] = pre_amp[i];
+            if (hist_in >= HIST_LEN)
+                hist_in = 0;
+            pre_energy += (double) pre_amp[i] * (double) pre_amp[i];
+        }
+        for (i = 0;  i < dec_frames;  i++)
+        {
+            post_energy += (double) post_amp[i] * (double) post_amp[i];
+            xx = post_amp[i] - history[hist_out++];
+            if (hist_out >= HIST_LEN)
+                hist_out = 0;
+            diff_energy += (double) xx * (double) xx;
+            //post_amp[i] = xx;
+        }
+        outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, dec_frames);
+    }
+    if (afCloseFile(inhandle) != 0)
+    {
+        printf("    Cannot close wave file '%s'\n", in_file_name);
+        exit(2);
+    }
+    if (afCloseFile(outhandle) != 0)
+    {
+        printf("    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    oki_adpcm_release(oki_enc_state);
+    oki_adpcm_release(oki_dec_state);
+
+    printf("Pre samples: %d\n", total_pre_samples);
+    printf("Compressed bytes: %d\n", total_compressed_bytes);
+    printf("Post samples: %d\n", total_post_samples);
+
+    printf("Output energy is %f%% of input energy.\n", 100.0*post_energy/pre_energy);
+    printf("Residual energy is %f%% of the total.\n", 100.0*diff_energy/post_energy);
+    if (bit_rate == 32000)
+    {
+        if (fabs(1.0 - post_energy/pre_energy) > 0.05
+            ||
+            fabs(diff_energy/post_energy) > 0.03)
+        {
+            printf("Tests failed.\n");
+            exit(2);
+        }
+    }
+    else
+    {
+        if (fabs(1.0 - post_energy/pre_energy) > 0.20
+            ||
+            fabs(diff_energy/post_energy) > 0.10)
+        {
+            printf("Tests failed.\n");
+            exit(2);
+        }
+    }
+
+    printf("Tests passed.\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/playout_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,364 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * playout_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: playout_tests.c,v 1.16 2006/11/24 12:34:55 steveu Exp $
+ */
+
+/*! \page playout_tests_page Playout (jitter buffering) tests
+\section playout_tests_page_sec_1 What does it do?
+These tests simulate timing jitter and packet loss in an audio stream, and see
+how well the playout module copes.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#include <audiofile.h>
+
+#include "spandsp.h"
+
+#define INPUT_FILE_NAME     "playout_in.wav"
+#define OUTPUT_FILE_NAME    "playout_out.wav"
+
+#define BLOCK_LEN           160
+
+static void dynamic_buffer_tests(void)
+{
+    playout_state_t *s;
+    playout_frame_t frame;
+    playout_frame_t *p;
+    plc_state_t plc;
+    time_scale_t ts;
+    int16_t *amp;
+    int16_t fill[BLOCK_LEN];
+    int16_t buf[20*BLOCK_LEN];
+    int16_t out[10*BLOCK_LEN];
+    timestamp_t time_stamp;
+    timestamp_t next_actual_receive;
+    timestamp_t next_scheduled_receive;
+    int near_far_time_offset;
+    int rng;
+    int i;
+    int j;
+    int ret;
+    int len;
+    int inframes;
+    int outframes;
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+
+    filesetup = afNewFileSetup();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+
+    inhandle = afOpenFile(INPUT_FILE_NAME, "r", NULL);
+    if (inhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open wave file '%s'\n", INPUT_FILE_NAME);
+        exit(2);
+    }
+    outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup);
+    if (outhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to create wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+
+    near_far_time_offset = 54321;
+    time_stamp = 12345;
+    next_actual_receive = time_stamp + near_far_time_offset;
+    next_scheduled_receive = 0;
+    for (i = 0;  i < BLOCK_LEN;  i++)
+        fill[i] = 32767;
+
+    if ((s = playout_new(2*BLOCK_LEN, 15*BLOCK_LEN)) == NULL)
+        return;
+    plc_init(&plc);
+    time_scale_init(&ts, 1.0);
+    for (i = 0;  i < 1000000;  i++)
+    {
+        if (i >= next_actual_receive)
+        {
+            amp = malloc(BLOCK_LEN*sizeof(int16_t));
+            inframes = afReadFrames(inhandle,
+                                    AF_DEFAULT_TRACK,
+                                    amp,
+                                    BLOCK_LEN);
+            if (inframes < BLOCK_LEN)
+                break;
+            ret = playout_put(s,
+                              amp,
+                              PLAYOUT_TYPE_SPEECH,
+                              inframes,
+                              time_stamp,
+                              next_actual_receive);
+#if 0
+            switch (ret)
+            {
+            case PLAYOUT_OK:
+                printf("<< Record\n");
+                break;
+            case PLAYOUT_ERROR:
+                printf("<< Error\n");
+                break;
+            default:
+                printf("<< Eh?\n");
+                break;
+            }
+#endif
+            rng = rand() & 0xFF;
+            if (i < 100000)
+                rng = (rng*rng) >> 7;
+            else if (i < 200000)
+                rng = (rng*rng) >> 6;
+            else if (i < 300000)
+                rng = (rng*rng) >> 5;
+            else if (i < 400000)
+                rng = (rng*rng) >> 7;
+            time_stamp += BLOCK_LEN;
+            next_actual_receive = time_stamp + near_far_time_offset + rng;
+        }
+        if (i >= next_scheduled_receive)
+        {
+            do
+            {
+                ret = playout_get(s, &frame, next_scheduled_receive);
+                if (ret == PLAYOUT_DROP)
+                    printf(">> Drop %d\n", next_scheduled_receive);
+            }
+            while (ret == PLAYOUT_DROP);
+            switch (ret)
+            {
+            case PLAYOUT_OK:
+                printf(">> Play %d\n", next_scheduled_receive);
+                plc_rx(&plc, frame.data, frame.sender_len);
+                len = time_scale(&ts, out, ((int16_t *) frame.data), frame.sender_len);
+printf("len = %d\n", len);
+                for (j = 0;  j < len;  j++)
+                {
+                    buf[2*j] = out[j];
+                    buf[2*j + 1] = 10*playout_current_length(s);
+                }
+                outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, buf, len);
+                if (outframes != len)
+                {
+                    fprintf(stderr, "    Error writing out sound\n");
+                    exit(2);
+                }
+                free(frame.data);
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            case PLAYOUT_FILLIN:
+                printf(">> Fill %d\n", next_scheduled_receive);
+                plc_fillin(&plc, fill, BLOCK_LEN);
+                time_scale_rate(&ts, 0.5);
+                len = time_scale(&ts, out, fill, BLOCK_LEN);
+                time_scale_rate(&ts, 1.0);
+printf("len = %d\n", len);
+                for (j = 0;  j < len;  j++)
+                {
+                    buf[2*j] = out[j];
+                    buf[2*j + 1] = 10*playout_current_length(s);
+                }
+                outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, buf, len);
+                if (outframes != len)
+                {
+                    fprintf(stderr, "    Error writing out sound\n");
+                    exit(2);
+                }
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            case PLAYOUT_DROP:
+                printf(">> Drop %d\n", next_scheduled_receive);
+                break;
+            case PLAYOUT_NOFRAME:
+                printf(">> No frame %d %d %d %d\n", next_scheduled_receive, playout_next_due(s), s->last_speech_sender_stamp, s->last_speech_sender_len);
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            case PLAYOUT_EMPTY:
+                printf(">> Empty %d\n", next_scheduled_receive);
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            case PLAYOUT_ERROR:
+                printf(">> Error %d\n", next_scheduled_receive);
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            default:
+                printf(">> Eh? %d\n", next_scheduled_receive);
+                break;
+            }
+        }
+    }
+    if (afCloseFile(inhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", INPUT_FILE_NAME);
+        exit(2);
+    }
+    if (afCloseFile(outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+
+    printf("%10" PRId32 " %10" PRId32 " %10d\n", s->state_just_in_time, s->state_late, playout_current_length(s));
+
+    /* Clear everything from the queue */
+    while ((p = playout_get_unconditional(s)))
+        /*free(p->data)*/;
+    /* Now free the context itself */
+    playout_free(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void static_buffer_tests(void)
+{
+    playout_state_t *s;
+    playout_frame_t frame;
+    playout_frame_t *p;
+    int type;
+    uint8_t fr[BLOCK_LEN];
+    timestamp_t next_scheduled_send;
+    int transit_time;
+    timestamp_t next_actual_receive;
+    timestamp_t next_scheduled_receive;
+    int len;
+    int i;
+    int ret;
+
+    next_scheduled_send = 0;
+    transit_time = 320;
+    next_actual_receive = next_scheduled_send + transit_time;
+    next_scheduled_receive = 960;
+
+    memset(fr, 0, sizeof(fr));
+    type = PLAYOUT_TYPE_SPEECH;
+    len = BLOCK_LEN;
+
+    if ((s = playout_new(2*BLOCK_LEN, 2*BLOCK_LEN)) == NULL)
+        return;
+    for (i = 0;  i < 1000000;  i++)
+    {
+        if (i >= next_actual_receive)
+        {
+            ret = playout_put(s,
+                              fr,
+                              type,
+                              len,
+                              next_scheduled_send, 
+                              next_actual_receive);
+            switch (ret)
+            {
+            case PLAYOUT_OK:
+                printf("<< Record\n");
+                break;
+            case PLAYOUT_ERROR:
+                printf("<< Error\n");
+                break;
+            default:
+                printf("<< Eh?\n");
+                break;
+            }
+            next_scheduled_send += BLOCK_LEN;
+            ret = rand() & 0xFF;
+            ret = (ret*ret) >> 7;
+            transit_time = 320 + ret;
+            next_actual_receive = next_scheduled_send + transit_time;
+        }
+        if (i >= next_scheduled_receive)
+        {
+            do
+            {
+                ret = playout_get(s, &frame, next_scheduled_receive);
+            }
+            while (ret == PLAYOUT_DROP);
+            switch (ret)
+            {
+            case PLAYOUT_OK:
+                printf(">> Play\n");
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            case PLAYOUT_FILLIN:
+                printf(">> Fill\n");
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            case PLAYOUT_DROP:
+                printf(">> Drop\n");
+                break;
+            case PLAYOUT_NOFRAME:
+                printf(">> No frame\n");
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            case PLAYOUT_EMPTY:
+                printf(">> Empty\n");
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            case PLAYOUT_ERROR:
+                printf(">> Error\n");
+                next_scheduled_receive += BLOCK_LEN;
+                break;
+            default:
+                printf(">> Eh?\n");
+                break;
+            }
+        }
+    }
+    /* Clear everything from the queue */
+    while ((p = playout_get_unconditional(s)))
+        /*free(p->data)*/;
+    /* Now free the context itself */
+    playout_free(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    printf("Dynamic buffering tests\n");
+    dynamic_buffer_tests();
+    printf("Static buffering tests\n");
+    static_buffer_tests();
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/plc_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,208 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * plc_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: plc_tests.c,v 1.18 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page plc_tests_page Packet loss concealment tests
+\section plc_tests_page_sec_1 What does it do?
+These tests run a speech file through the packet loss concealment routines.
+The loss rate, in percent, and the packet size, in samples, may be specified
+on the command line.
+
+\section plc_tests_page_sec_2 How are the tests run?
+These tests process a speech file called pre_plc.wav. This file should contain
+8000 sample/second 16 bits/sample linear audio. The tests read this file in
+blocks, of a size specified on the command line. Some of these blocks are
+dropped, to simulate packet loss. The rate of loss is also specified on the
+command line. The PLC module is then used to reconstruct an acceptable
+approximation to the original signal. The resulting audio is written to a new
+audio file, called post_plc.wav. This file contains 8000 sample/second
+16 bits/sample linear audio.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#include <audiofile.h>
+
+#include "spandsp.h"
+
+#define INPUT_FILE_NAME     "../localtests/short_nb_voice.wav"
+#define OUTPUT_FILE_NAME    "post_plc.wav"
+
+int main(int argc, char *argv[])
+{
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    plc_state_t plc;
+    int inframes;
+    int outframes;
+    int16_t amp[1024];
+    int block_no;
+    int lost_blocks;
+    int block_len;
+    int loss_rate;
+    int dropit;
+    int block_real;
+    int block_synthetic;
+    int tone;
+    int i;
+    uint32_t phase_acc;
+    int32_t phase_rate;
+
+    loss_rate = 25;
+    block_len = 160;
+    block_real = FALSE;
+    block_synthetic = FALSE;
+    tone = -1;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            loss_rate = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-b") == 0)
+        {
+            block_len = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-t") == 0)
+        {
+            tone = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-r") == 0)
+            block_real = TRUE;
+        if (strcmp(argv[i], "-s") == 0)
+            block_synthetic = TRUE;
+    }
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    phase_rate = 0;
+    inhandle = NULL;
+    if (tone < 0)
+    {
+        if ((inhandle = afOpenFile(INPUT_FILE_NAME, "r", NULL)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Failed to open wave file '%s'\n", INPUT_FILE_NAME);
+            exit(2);
+        }
+    }
+    else
+    {
+        phase_rate = dds_phase_ratef((float) tone);
+    }
+    if ((outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+    plc_init(&plc);
+    lost_blocks = 0;
+    for (block_no = 0;  ;  block_no++)
+    {
+        if (tone < 0)
+        {
+            inframes = afReadFrames(inhandle,
+                                    AF_DEFAULT_TRACK,
+                                    amp,
+                                    block_len);
+            if (inframes != block_len)
+                break;
+        }
+        else
+        {
+            if (block_no > 10000)
+                break;
+            for (i = 0;  i < block_len;  i++)
+                amp[i] = (int16_t) dds_modf(&phase_acc, phase_rate, 10000.0, 0);
+            inframes = block_len;
+        }
+        dropit = rand()/(RAND_MAX/100);
+        if (dropit > loss_rate)
+        {
+            plc_rx(&plc, amp, inframes);
+            if (block_real)
+                memset(amp, 0, sizeof(int16_t)*inframes);
+        }
+        else
+        {
+            lost_blocks++;
+            plc_fillin(&plc, amp, inframes);
+            if (block_synthetic)
+                memset(amp, 0, sizeof(int16_t)*inframes);
+        }
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  inframes);
+        if (outframes != inframes)
+        {
+            fprintf(stderr, "    Error writing out sound\n");
+            exit(2);
+        }
+    }
+    printf("Dropped %d of %d blocks\n", lost_blocks, block_no);
+    if (tone < 0)
+    {
+        if (afCloseFile(inhandle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", INPUT_FILE_NAME);
+            exit(2);
+        }
+    }
+    if (afCloseFile(outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/power_meter_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,170 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * power_meter_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: power_meter_tests.c,v 1.15 2006/11/24 12:34:55 steveu Exp $
+ */
+
+/*! \page power_meter_tests_page Power meter tests
+\section power_meter_tests_page_sec_1 What does it do?
+These tests assess the accuracy of power meters built from the power meter module.
+Both tones and noise are used to check the meter's behaviour.
+
+\section power_meter_tests_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <time.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+int main(int argc, char *argv[])
+{
+    awgn_state_t noise_source;
+    power_meter_t meter;
+    tone_gen_descriptor_t tone_desc;
+    tone_gen_state_t gen;
+    int i;
+    int idum = 1234567;
+    int16_t amp[1000];
+    int len;
+    int32_t level;
+
+    power_meter_init(&meter, 7);
+
+    printf("Testing with a square wave 10dB from maximum\n");
+    for (i = 0;  i < 1000;  i++)
+    {
+        amp[i] = (i & 1)  ?  10362  :  -10362;
+        level = power_meter_update(&meter, amp[i]);
+        //printf("%12d %fdBm0 %fdBov\n", level, power_meter_dbm0(&meter), power_meter_dbov(&meter));
+    }
+    printf("Level: expected %" PRId32 "/%" PRId32 ", got %" PRId32 "\n", power_meter_level_dbov(-10.0f), power_meter_level_dbm0(-10.0f + DBM0_MAX_POWER), level);
+    printf("Power: expected %fdBm0, got %fdBm0\n", -10.0f + DBM0_MAX_POWER, power_meter_dbm0(&meter));
+    printf("Power: expected %fdBOv, got %fdBOv\n", -10.0f, power_meter_dbov(&meter));
+    if (level < power_meter_level_dbov(-10.0f)*0.99f
+        ||
+        level > power_meter_level_dbov(-10.0f)*1.01f)
+    {
+        printf("Test failed (level)\n");
+        exit(2);
+    }
+    if (0.1f < fabsf(power_meter_dbm0(&meter) + 10.0f - DBM0_MAX_POWER))
+    {
+        printf("Test failed (dBm0)\n");
+        exit(2);
+    }
+    if (0.1f < fabsf(power_meter_dbov(&meter) + 10.0))
+    {
+        printf("Test failed (dBOv)\n");
+        exit(2);
+    }
+
+    printf("Testing with a sine wave tone 10dB from maximum\n");
+    make_tone_gen_descriptor(&tone_desc,
+                             1000,
+                             -4,
+                             0,
+                             1,
+                             1,
+                             0,
+                             0,
+                             0,
+                             TRUE);
+    tone_gen_init(&gen, &tone_desc);
+    len = tone_gen(&gen, amp, 1000);
+    for (i = 0;  i < len;  i++)
+    {
+        level = power_meter_update(&meter, amp[i]);
+        //printf("%12d %fdBm0 %fdBov\n", level, power_meter_dbm0(&meter), power_meter_dbov(&meter));
+    }
+    printf("Level: expected %" PRId32 "/%" PRId32 ", got %" PRId32 "\n", power_meter_level_dbov(-10.0f), power_meter_level_dbm0(-10.0f + DBM0_MAX_POWER), level);
+    printf("Power: expected %fdBm0, got %fdBm0\n", -10.0f + DBM0_MAX_POWER, power_meter_dbm0(&meter));
+    printf("Power: expected %fdBOv, got %fdBOv\n", -10.0f, power_meter_dbov(&meter));
+    if (level < power_meter_level_dbov(-10.0f)*0.95f
+        ||
+        level > power_meter_level_dbov(-10.0f)*1.05f)
+    {
+        printf("Test failed (level)\n");
+        exit(2);
+    }
+    if (0.2f < fabsf(power_meter_dbm0(&meter) + 10.0f - DBM0_MAX_POWER))
+    {
+        printf("Test failed (dBm0)\n");
+        exit(2);
+    }
+    if (0.2f < fabsf(power_meter_dbov(&meter) + 10.0))
+    {
+        printf("Test failed (dBOv)\n");
+        exit(2);
+    }
+
+    printf("Testing with AWGN 10dB from maximum\n");
+    awgn_init_dbov(&noise_source, idum, -10.0f);
+    for (i = 0;  i < 1000;  i++)
+        amp[i] = awgn(&noise_source);
+    for (i = 0;  i < 1000;  i++)
+    {
+        level = power_meter_update(&meter, amp[i]);
+        //printf("%12d %fdBm0 %fdBov\n", level, power_meter_dbm0(&meter), power_meter_dbov(&meter));
+    }
+    printf("Level: expected %" PRId32 "/%" PRId32 ", got %" PRId32 "\n", power_meter_level_dbov(-10.0f), power_meter_level_dbm0(-10.0f + DBM0_MAX_POWER), level);
+    printf("Power: expected %fdBm0, got %fdBm0\n", -10.0f + DBM0_MAX_POWER, power_meter_dbm0(&meter));
+    printf("Power: expected %fdBOv, got %fdBOv\n", -10.0f, power_meter_dbov(&meter));
+    if (level < power_meter_level_dbov(-10.0f)*0.95f
+        ||
+        level > power_meter_level_dbov(-10.0f)*1.05f)
+    {
+        printf("Test failed (level)\n");
+        exit(2);
+    }
+    if (0.2f < fabsf(power_meter_dbm0(&meter) + 10.0f - DBM0_MAX_POWER))
+    {
+        printf("Test failed (dBm0)\n");
+        exit(2);
+    }
+    if (0.2f < fabsf(power_meter_dbov(&meter) + 10.0f))
+    {
+        printf("Test failed (dBOv)\n");
+        exit(2);
+    }
+    printf("Tests passed\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/r2_mf_rx_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,538 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * r2_mf_tests.c - Test the R2 MF detector against the spec., whatever the
+ *                 spec. may be :)
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: r2_mf_rx_tests.c,v 1.4 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page r2_mf_tests_page R2 MF tone generation and detection tests
+\section r2_mf_tests_page_sec_1 What does it do?
+These tests are fashioned after those on the CM7291 test tape from
+Mitel. Those tests are for DTMF, rather than R2 MF, but make a
+fair starting point for a set of meaningful tests of R2 MF.
+
+These tests include conversion to and from A-law. It is assumed the
+distortion this produces is comparable to u-law, so it should be
+a fair test of performance in a real PSTN channel.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <stdio.h>
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+/* R2 tone generation specs.
+ *  Power: -11.5dBm +- 1dB
+ *  Frequency: within +-4Hz
+ *  Mismatch between the start time of a pair of tones: <=1ms.
+ *  Mismatch between the end time of a pair of tones: <=1ms.
+ */
+/* Basic MFC/R2 tone detection specs:
+ *  Receiver response range: -5dBm to -35dBm
+ *  Difference in level for a pair of frequencies
+ *      Adjacent tones: <5dB
+ *      Non-adjacent tones: <7dB
+ *  Receiver not to detect a signal of 2 frequencies of level -5dB and
+ *  duration <7ms.
+ *  Receiver not to recognise a signal of 2 frequencies having a difference
+ *  in level >=20dB.
+ *  Max received signal frequency error: +-10Hz
+ *  The sum of the operate and release times of a 2 frequency signal not to
+ *  exceed 80ms (there are no individual specs for the operate and release
+ *  times).
+ *  Receiver not to release for signal interruptions <=7ms.
+ *  System malfunction due to signal interruptions >7ms (typically 20ms) is
+ *  prevented by further logic elements.
+ */
+
+#define MF_DURATION                 (68*8)
+#define MF_PAUSE                    (68*8)
+#define MF_CYCLE                    (MF_DURATION + MF_PAUSE)
+
+typedef struct
+{
+    float       f1;         /* First freq */
+    float       f2;         /* Second freq */
+    int8_t      level1;     /* Level of the first freq (dB) */
+    int8_t      level2;     /* Level of the second freq (dB) */
+    uint8_t     on_time;    /* Tone on time (ms) */
+    uint8_t     off_time;   /* Minimum post tone silence (ms) */
+} mf_digit_tones_t;
+
+static const mf_digit_tones_t r2_mf_fwd_tones[] =
+{
+    {1380.0, 1500.0, -11, -11, 1, 0},
+    {1380.0, 1620.0, -11, -11, 1, 0},
+    {1500.0, 1620.0, -11, -11, 1, 0},
+    {1380.0, 1740.0, -11, -11, 1, 0},
+    {1500.0, 1740.0, -11, -11, 1, 0},
+    {1620.0, 1740.0, -11, -11, 1, 0},
+    {1380.0, 1860.0, -11, -11, 1, 0},
+    {1500.0, 1860.0, -11, -11, 1, 0},
+    {1620.0, 1860.0, -11, -11, 1, 0},
+    {1740.0, 1860.0, -11, -11, 1, 0},
+    {1380.0, 1980.0, -11, -11, 1, 0},
+    {1500.0, 1980.0, -11, -11, 1, 0},
+    {1620.0, 1980.0, -11, -11, 1, 0},
+    {1740.0, 1980.0, -11, -11, 1, 0},
+    {1860.0, 1980.0, -11, -11, 1, 0},
+    {0.0, 0.0, 0, 0, 0, 0}
+};
+
+static const mf_digit_tones_t r2_mf_back_tones[] =
+{
+    {1140.0, 1020.0, -11, -11, 1, 0},
+    {1140.0,  900.0, -11, -11, 1, 0},
+    {1020.0,  900.0, -11, -11, 1, 0},
+    {1140.0,  780.0, -11, -11, 1, 0},
+    {1020.0,  780.0, -11, -11, 1, 0},
+    { 900.0,  780.0, -11, -11, 1, 0},
+    {1140.0,  660.0, -11, -11, 1, 0},
+    {1020.0,  660.0, -11, -11, 1, 0},
+    { 900.0,  660.0, -11, -11, 1, 0},
+    { 780.0,  660.0, -11, -11, 1, 0},
+    {1140.0,  540.0, -11, -11, 1, 0},
+    {1020.0,  540.0, -11, -11, 1, 0},
+    { 900.0,  540.0, -11, -11, 1, 0},
+    { 780.0,  540.0, -11, -11, 1, 0},
+    { 660.0,  540.0, -11, -11, 1, 0},
+    {0.0, 0.0, 0, 0, 0, 0}
+};
+
+static tone_gen_descriptor_t my_mf_digit_tones[16];
+
+static char r2_mf_tone_codes[] = "1234567890BCDEF";
+
+static void my_mf_gen_init(float low_fudge,
+                           int low_level,
+                           float high_fudge,
+                           int high_level,
+                           int duration,
+                           int fwd)
+{
+    const mf_digit_tones_t *tone;
+    int i;
+    
+    for (i = 0;  i < 15;  i++)
+    {
+        if (fwd)
+            tone = &r2_mf_fwd_tones[i];
+        else
+            tone = &r2_mf_back_tones[i];
+        make_tone_gen_descriptor(&my_mf_digit_tones[i],
+                                 tone->f1*(1.0 + low_fudge),
+                                 low_level,
+                                 tone->f2*(1.0 + high_fudge),
+                                 high_level,
+                                 duration,
+                                 0,
+                                 0,
+                                 0,
+                                 FALSE);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int my_mf_generate(int16_t amp[], char digit)
+{
+    int len;
+    char *cp;
+    tone_gen_state_t tone;
+
+    len = 0;
+    if ((cp = strchr(r2_mf_tone_codes, digit)))
+    {
+        tone_gen_init(&tone, &my_mf_digit_tones[cp - r2_mf_tone_codes]);
+        len += tone_gen(&tone, amp + len, 9999);
+    }
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void codec_munge(int16_t amp[], int len)
+{
+    int i;
+    uint8_t alaw;
+    
+    for (i = 0;  i < len;  i++)
+    {
+        alaw = linear_to_alaw (amp[i]);
+        amp[i] = alaw_to_linear (alaw);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int test_a_tone_set(int fwd)
+{
+    int i;
+    int j;
+    int len;
+    int sample;
+    const char *s;
+    char digit;
+    int actual;
+    int nplus;
+    int nminus;
+    float rrb;
+    float rcfo;
+    int16_t amp[100000];
+    r2_mf_rx_state_t mf_state;
+    awgn_state_t noise_source;
+    const mf_digit_tones_t *tone;
+
+    if (fwd)
+        tone = &r2_mf_fwd_tones[0];
+    else
+        tone = &r2_mf_back_tones[0];
+    r2_mf_rx_init(&mf_state, fwd);
+
+    /* Test 1: Mitel's test 1 isn't really a test. Its a calibration step,
+       which has no meaning here. */
+
+    printf ("Test 1: Calibration\n");
+    printf ("    Passed\n");
+
+    /* Test 2: Decode check
+       This is a sanity check, that all digits are reliably detected
+       under ideal conditions.  Each possible digit is repeated 10 times,
+       with 68ms bursts. The level of each tone is about 6dB down from clip */
+
+    printf ("Test 2: Decode check\n");
+    my_mf_gen_init(0.0, -3, 0.0, -3, 68, fwd);
+    s = r2_mf_tone_codes;
+    while (*s)
+    {
+        digit = *s++;
+        for (i = 0;  i < 10;  i++)
+        {
+            len = my_mf_generate(amp, digit);
+            codec_munge (amp, len);
+            actual = r2_mf_rx(&mf_state, amp, len);
+            if (actual != digit)
+            {
+                printf ("    Sent     '%c'\n", digit);
+                printf ("    Received 0x%X\n", actual);
+                printf ("    Failed\n");
+                exit (2);
+            }
+        }
+    }
+    printf ("    Passed\n");
+
+    /* Test 3: Recognition bandwidth and channel centre frequency check.
+       Use all digits. Each digit types requires four tests to complete
+       the check. Each section contains 40 pulses of 68ms duration,
+       with an amplitude of -20dB from clip per frequency.
+
+       Four sections covering the tests for one tone (1 digit) are:
+       a. H frequency at 0% deviation from center, L frequency at +0.1%.
+          L frequency is then increments in +01.% steps up to +4%. The
+          number of tone bursts is noted and designated N+.
+       b. H frequency at 0% deviation, L frequency at -0.1%. L frequency
+          is then incremental in -0.1% steps, up to -4%. The number of
+          tone bursts is noted and designated N-.
+       c. The test in (a) is repeated with the L frequency at 0% and the
+          H frequency varied up to +4%.
+       d. The test in (b) is repeated with the L frequency and 0% and the
+          H frequency varied to -4%.
+
+       Receiver Recognition Bandwidth (RRB) is calculated as follows:
+            RRB% = (N+ + N-)/10
+       Receiver Center Frequency Offset (RCFO) is calculated as follows:
+            RCFO% = X + (N+ - N-)/20
+            
+       Note that this test doesn't test what it says it is testing at all,
+       and the results are quite inaccurate, if not a downright lie! However,
+       it follows the Mitel procedure, so how can it be bad? :)
+       
+       The spec calls for +-4 +-10Hz (ie +-14Hz) of bandwidth. */
+
+    printf ("Test 3: Recognition bandwidth and channel centre frequency check\n");
+    s = r2_mf_tone_codes;
+    j = 0;
+    while (*s)
+    {
+        digit = *s++;
+        for (nplus = 0, i = 1;  i <= 60;  i++)
+        {
+            my_mf_gen_init((float) i/1000.0, -17, 0.0, -17, 68, fwd);
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            if (r2_mf_rx(&mf_state, amp, len) == digit)
+                nplus++;
+        }
+        for (nminus = 0, i = -1;  i >= -60;  i--)
+        {
+            my_mf_gen_init((float) i/1000.0, -17, 0.0, -17, 68, fwd);
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            if (r2_mf_rx(&mf_state, amp, len) == digit)
+                nminus++;
+        }
+        rrb = (float) (nplus + nminus)/10.0;
+        rcfo = (float) (nplus - nminus)/10.0;
+        printf ("    %c (low)  rrb = %5.2f%%, rcfo = %5.2f%%, max -ve = %5.2f, max +ve = %5.2f\n",
+                digit,
+                rrb,
+                rcfo,
+                (float) nminus/10.0,
+                (float) nplus/10.0);
+
+        if (rrb < rcfo + (2.0*100.0*14.0/r2_mf_fwd_tones[j].f1)  ||  rrb >= 15.0 + rcfo)
+        {
+            printf ("    Failed\n");
+            exit (2);
+        }
+
+        for (nplus = 0, i = 1;  i <= 60;  i++)
+        {
+            my_mf_gen_init(0.0, -17, (float) i/1000.0, -17, 68, fwd);
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            if (r2_mf_rx(&mf_state, amp, len) == digit)
+                nplus++;
+        }
+        for (nminus = 0, i = -1;  i >= -60;  i--)
+        {
+            my_mf_gen_init(0.0, -17, (float) i/1000.0, -17, 68, fwd);
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            if (r2_mf_rx(&mf_state, amp, len) == digit)
+                nminus++;
+        }
+        rrb = (float) (nplus + nminus)/10.0;
+        rcfo = (float) (nplus - nminus)/10.0;
+        printf ("    %c (high) rrb = %5.2f%%, rcfo = %5.2f%%, max -ve = %5.2f, max +ve = %5.2f\n",
+                digit,
+                rrb,
+                rcfo,
+                (float) nminus/10.0,
+                (float) nplus/10.0);
+        if (rrb < rcfo + (2.0*100.0*14.0/r2_mf_fwd_tones[j].f2)  ||  rrb >= 15.0 + rcfo)
+        {
+            printf ("    Failed\n");
+            exit (2);
+        }
+        j++;
+    }
+    printf ("    Passed\n");
+
+    /* Test 4: Acceptable amplitude ratio (twist).
+       Twist all digits in both directions, and check the maximum twist
+       we can accept. The way this is done is styled after the Mitel DTMF
+       test, and has good and bad points. */
+
+    printf ("Test 4: Acceptable amplitude ratio (twist)\n");
+    s = r2_mf_tone_codes;
+    while (*s)
+    {
+        digit = *s++;
+        for (nplus = 0, i = -50;  i >= -250;  i--)
+        {
+            my_mf_gen_init(0.0, -5, 0.0, i/10, 68, fwd);
+
+            len = my_mf_generate(amp, digit);
+            codec_munge (amp, len);
+            if (r2_mf_rx(&mf_state, amp, len) == digit)
+                nplus++;
+        }
+        printf ("    %c normal twist  = %.2fdB\n", digit, (float) nplus/10.0);
+        if (nplus < 70)
+        {
+            printf ("    Failed\n");
+            exit (2);
+        }
+        for (nminus = 0, i = -50;  i >= -250;  i--)
+        {
+            my_mf_gen_init(0.0, i/10, 0.0, -5, 68, fwd);
+
+            len = my_mf_generate(amp, digit);
+            codec_munge(amp, len);
+            if (r2_mf_rx(&mf_state, amp, len) == digit)
+                nminus++;
+        }
+        printf ("    %c reverse twist = %.2fdB\n", digit, (float) nminus/10.0);
+        if (nminus < 70)
+        {
+            printf ("    Failed\n");
+            exit (2);
+        }
+    }
+    printf ("    Passed\n");
+
+    /* Test 5: Dynamic range
+       This test sends all possible digits, with gradually increasing 
+       amplitude. We determine the span over which we achieve reliable
+       detection. */
+       
+    printf ("Test 5: Dynamic range\n");
+    for (nplus = nminus = -1000, i = -50;  i <= 3;  i++)
+    {
+        s = r2_mf_tone_codes;
+        while (*s)
+        {
+            digit = *s++;
+            my_mf_gen_init(0.0, i, 0.0, i, 68, fwd);
+            for (j = 0;  j < 100;  j++)
+            {
+                len = my_mf_generate(amp, digit);
+                codec_munge(amp, len);
+                if (r2_mf_rx(&mf_state, amp, len) != digit)
+                    break;
+            }
+            if (j < 100)
+                break;
+        }
+        if (j == 100)
+        {
+            if (nplus == -1000)
+                nplus = i;
+        }
+        else
+        {
+            if (nplus != -1000  &&  nminus == -1000)
+                nminus = i;
+        }
+    }
+    printf ("    Dynamic range = %ddB to %ddB\n", nplus, nminus - 1);
+    if (nplus > -35  ||  nminus <= -5)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+    printf ("    Passed\n");
+
+    /* Test 6: Guard time
+       This test sends all possible digits, with a gradually reducing 
+       duration. */
+
+    printf ("Test 6: Guard time\n");
+    for (i = 30;  i < 62;  i++)
+    {
+        s = r2_mf_tone_codes;
+        j = 0;
+        while (*s)
+        {
+            digit = *s++;
+            my_mf_gen_init(0.0, -5, 0.0, -3, i, fwd);
+            for (j = 0;  j < 500;  j++)
+            {
+                len = my_mf_generate(amp, digit);
+                codec_munge(amp, len);
+                if (r2_mf_rx(&mf_state, amp, len) != digit)
+                    break;
+            }
+            if (j < 500)
+                break;
+        }
+        if (j == 500)
+            break;
+    }
+    printf ("    Guard time = %dms\n", i);
+    if (i > 61)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+    printf ("    Passed\n");
+
+    /* Test 7: Acceptable signal to noise ratio
+       We send all possible digits at -6dBm from clip, mixed with AWGN.
+       We gradually reduce the noise until we get clean detection. */
+
+    printf ("Test 7: Acceptable signal to noise ratio\n");
+    my_mf_gen_init(0.0, -3, 0.0, -3, 68, fwd);
+    for (i = -3;  i > -50;  i--)
+    {
+        s = r2_mf_tone_codes;
+        while (*s)
+        {
+            digit = *s++;
+            awgn_init_dbm0(&noise_source, 1234567, (float) i);
+            for (j = 0;  j < 500;  j++)
+            {
+                len = my_mf_generate(amp, digit);
+                for (sample = 0;  sample < len;  sample++)
+                    amp[sample] = saturate(amp[sample] + awgn(&noise_source));
+                codec_munge(amp, len);
+                if (r2_mf_rx(&mf_state, amp, len) != digit)
+                    break;
+            }
+            if (j < 500)
+                break;
+        }
+        if (j == 500)
+            break;
+    }
+    printf("    Acceptable S/N ratio is %ddB\n", -3 - i);
+    if (-3 - i > 26)
+    {
+        printf("    Failed\n");
+        exit(2);
+    }
+    printf("    Passed\n");
+
+    /* The remainder of the Mitel tape is the talk-off test. This is
+       meaningless for R2 MF. However the decoder's tolerance of
+       out of band noise is significant. */
+    /* TODO: add a OOB tolerance test. */
+    
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main (int argc, char *argv[])
+{
+    time_t now;
+    time_t duration;
+
+    now = time(NULL);
+    printf("R2 forward tones\n");
+    test_a_tone_set(TRUE);
+    printf("R2 backward tones\n");
+    test_a_tone_set(FALSE);
+    duration = time(NULL) - now;
+    printf ("Tests passed in %lds\n", duration);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/r2_mf_tx_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,149 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * r2_mf_tx_tests.c - Test the Bell MF generator.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: r2_mf_tx_tests.c,v 1.4 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page r2_mf_tx_tests_page R2 MF generation tests
+\section r2_mf_tx_tests_page_sec_1 What does it do?
+???.
+
+\section r2_mf_tx_tests_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUTPUT_FILE_NAME    "r2_mf.wav"
+
+int main(int argc, char *argv[])
+{
+    r2_mf_tx_state_t gen;
+    int16_t amp[1000];
+    int len;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int fwd;
+    int digit;
+    const char *digits = "0123456789BCDEF";
+
+    filesetup = afNewFileSetup();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, 8000.0);
+    //afInitCompression(filesetup, AF_DEFAULT_TRACK, AF_COMPRESSION_G711_ALAW);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup);
+    if (outhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+
+    r2_mf_tx_init(&gen);
+    fwd = FALSE;
+    for (digit = 0;  digits[digit];  digit++)
+    {
+        len = r2_mf_tx(&gen, amp, 1000, fwd, digits[digit]);
+        printf("Generated %d samples of %c\n", len, digits[digit]);
+        if (len > 0)
+        {
+            outframes = afWriteFrames(outhandle,
+                                      AF_DEFAULT_TRACK,
+                                      amp,
+                                      len);
+        }
+        len = r2_mf_tx(&gen, amp, 1000, fwd, 0);
+        printf("Generated %d samples\n", len);
+        if (len > 0)
+        {
+            outframes = afWriteFrames(outhandle,
+                                      AF_DEFAULT_TRACK,
+                                      amp,
+                                      len);
+        }
+    }
+
+    fwd = TRUE;
+    for (digit = 0;  digits[digit];  digit++)
+    {
+        len = r2_mf_tx(&gen, amp, 1000, fwd, digits[digit]);
+        printf("Generated %d samples of %c\n", len, digits[digit]);
+        if (len > 0)
+        {
+            outframes = afWriteFrames(outhandle,
+                                      AF_DEFAULT_TRACK,
+                                      amp,
+                                      len);
+        }
+        len = r2_mf_tx(&gen, amp, 1000, fwd, 0);
+        printf("Generated %d samples\n", len);
+        if (len > 0)
+        {
+            outframes = afWriteFrames(outhandle,
+                                      AF_DEFAULT_TRACK,
+                                      amp,
+                                      len);
+        }
+    }
+
+    if (afCloseFile(outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit (2);
+    }
+    afFreeFileSetup(filesetup);
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/regression_tests.sh	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,690 @@
+#!/bin/sh
+#
+# spandsp regression tests
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2, as
+# published by the Free Software Foundation.
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# $Id: regression_tests.sh,v 1.36 2006/11/20 14:27:27 steveu Exp $
+#
+
+ITUTESTS_TIF=../itutests/fax/itutests.tif
+STDOUT_DEST=xyzzy
+STDERR_DEST=xyzzy2
+
+echo Performing basic regression tests
+echo
+
+./adsi_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo adsi_tests failed!
+    exit $RETVAL
+fi
+echo adsi_tests completed OK
+
+./async_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo async_tests failed!
+    exit $RETVAL
+fi
+echo async_tests completed OK
+
+./at_interpreter_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo at_interpreter_tests failed!
+    exit $RETVAL
+fi
+echo at_interpreter_tests completed OK
+
+./awgn_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo awgn_tests failed!
+    exit $RETVAL
+fi
+echo awgn_tests completed OK
+
+./bell_mf_rx_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo bell_mf_rx_tests failed!
+    exit $RETVAL
+fi
+echo bell_mf_rx_tests completed OK
+
+./bell_mf_tx_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo bell_mf_tx_tests failed!
+    exit $RETVAL
+fi
+echo bell_mf_tx_tests completed OK
+
+./bert_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo bert_tests failed!
+    exit $RETVAL
+fi
+echo bert_tests completed OK
+
+./bit_operations_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo bit_operations_tests failed!
+    exit $RETVAL
+fi
+echo bit_operations_tests completed OK
+
+./dc_restore_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo dc_restore_tests failed!
+    exit $RETVAL
+fi
+echo dc_restore_tests completed OK
+
+./dds_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo dds_tests failed!
+    exit $RETVAL
+fi
+echo dds_tests completed OK
+
+./dtmf_rx_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo dtmf_rx_tests failed!
+    exit $RETVAL
+fi
+echo dtmf_rx_tests completed OK
+
+./dtmf_tx_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo dtmf_tx_tests failed!
+    exit $RETVAL
+fi
+echo dtmf_tx_tests completed OK
+
+#./echo_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo echo_tests failed!
+#    exit $RETVAL
+#fi
+#echo echo_tests completed OK
+echo echo_tests not enabled
+
+rm -f fax_tests_1.tif
+./fax_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo fax_tests failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} fax_tests_1.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo fax_tests failed!
+    exit $RETVAL
+fi
+rm -f fax_tests_1.tif
+./fax_tests -e >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo fax_tests -e failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} fax_tests_1.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo fax_tests -e failed!
+    exit $RETVAL
+fi
+echo fax_tests completed OK
+
+./fsk_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo fsk_tests failed!
+    exit $RETVAL
+fi
+echo fsk_tests completed OK
+
+./g711_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo g711_tests failed!
+    exit $RETVAL
+fi
+echo g711_tests completed OK
+
+./g722_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo g722_tests failed!
+    exit $RETVAL
+fi
+echo g722_tests completed OK
+
+./g726_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo g726_tests failed!
+    exit $RETVAL
+fi
+echo g726_tests completed OK
+
+./gsm0610_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo gsm0610_tests failed!
+    exit $RETVAL
+fi
+echo gsm0610_tests completed OK
+
+./hdlc_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo hdlc_tests failed!
+    exit $RETVAL
+fi
+echo hdlc_tests completed OK
+
+./ima_adpcm_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo ima_adpcm_tests failed!
+    exit $RETVAL
+fi
+echo ima_adpcm_tests completed OK
+
+./logging_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo logging_tests failed!
+    exit $RETVAL
+fi
+echo logging_tests completed OK
+
+./lpc10_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo lpc10_tests failed!
+    exit $RETVAL
+fi
+echo lpc10_tests completed OK
+
+./modem_echo_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo modem_echo_tests failed!
+    exit $RETVAL
+fi
+echo modem_echo_tests completed OK
+
+./modem_connect_tones_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo modem_connect_tones_tests failed!
+    exit $RETVAL
+fi
+echo modem_connect_tones_tests completed OK
+
+./noise_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo noise_tests failed!
+    exit $RETVAL
+fi
+echo noise_tests completed OK
+
+./oki_adpcm_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo oki_adpcm_tests failed!
+    exit $RETVAL
+fi
+echo oki_adpcm_tests completed OK
+
+#./playout_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo playout_tests failed!
+#    exit $RETVAL
+#fi
+#echo playout_tests completed OK
+echo playout_tests not enabled
+
+#./plc_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo plc_tests failed!
+#    exit $RETVAL
+#fi
+#echo plc_tests completed OK
+echo plc_tests not enabled
+
+./power_meter_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo power_meter_tests failed!
+    exit $RETVAL
+fi
+echo power_meter_tests completed OK
+
+./r2_mf_rx_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo r2_mf_rx_tests failed!
+    exit $RETVAL
+fi
+echo r2_mf_rx_tests completed OK
+
+./r2_mf_tx_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo r2_mf_tx_tests failed!
+    exit $RETVAL
+fi
+echo r2_mf_tx_tests completed OK
+
+./schedule_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo schedule_tests failed!
+    exit $RETVAL
+fi
+echo schedule_tests completed OK
+
+#./sig_tone_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo sig_tone_tests failed!
+#    exit $RETVAL
+#fi
+#echo sig_tone_tests completed OK
+echo sig_tone_tests not enabled
+
+#./super_tone_rx_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo super_tone_rx_tests failed!
+#    exit $RETVAL
+#fi
+#echo super_tone_rx_tests completed OK
+echo super_tone_rx_tests not enabled
+
+#./super_tone_tx_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo super_tone_tx_tests failed!
+#    exit $RETVAL
+#fi
+#echo super_tone_tx_tests completed OK
+echo super_tone_tx_tests not enabled
+
+./t31_tests -r >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t31_tests -r failed!
+    exit $RETVAL
+fi
+./t31_tests -s >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t31_tests -s failed!
+    exit $RETVAL
+fi
+echo t31_tests completed OK
+
+rm -f t38.tif
+./t38_gateway_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_gateway_tests failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_gateway_tests failed!
+    exit $RETVAL
+fi
+rm -f t38.tif
+./t38_gateway_tests -e >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_gateway_tests -e failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_gateway_tests -e failed!
+    exit $RETVAL
+fi
+echo t38_gateway_tests completed OK
+
+rm -f t38.tif
+./t38_gateway_to_terminal_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_gateway_to_terminal_tests failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_gateway_to_terminal_tests failed!
+    exit $RETVAL
+fi
+rm -f t38.tif
+./t38_gateway_to_terminal_tests -e >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_gateway_to_terminal_tests -e failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_gateway_to_terminal_tests -e failed!
+    exit $RETVAL
+fi
+echo t38_gateway_to_terminal_tests completed OK
+
+rm -f t38.tif
+./t38_terminal_to_gateway_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_terminal_to_gateway_tests failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_terminal_to_gateway_tests failed!
+    exit $RETVAL
+fi
+rm -f t38.tif
+./t38_terminal_to_gateway_tests -e >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_terminal_to_gateway_tests -e failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_terminal_to_gateway_tests -e failed!
+    exit $RETVAL
+fi
+echo t38_terminal_to_gateway_tests completed OK
+
+rm -f t38.tif
+./t38_terminal_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_terminal_tests failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_terminal_tests failed!
+    exit $RETVAL
+fi
+rm -f t38.tif
+./t38_terminal_tests -e >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_terminal_tests -e failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t38_terminal_tests -e failed!
+    exit $RETVAL
+fi
+echo t38_terminal_tests completed OK
+
+rm -f t4_tests_receive.tif
+./t4_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t4_tests failed!
+    exit $RETVAL
+fi
+# Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
+# option means the normal differences in tags will be ignored.
+tiffcmp -t ${ITUTESTS_TIF} t4_tests_receive.tif >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo t4_tests failed!
+    exit $RETVAL
+fi
+echo t4_tests completed OK
+
+#./time_scale_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo time_scale_tests failed!
+#    exit $RETVAL
+#fi
+#echo time_scale_tests completed OK
+echo time_scale_tests not enabled
+
+#./tone_generate_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo tone_generate_tests failed!
+#    exit $RETVAL
+#fi
+#echo tone_generate_tests completed OK
+echo tone_generate_tests not enabled
+
+#./v17_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo v17_tests failed!
+#    exit $RETVAL
+#fi
+#echo v17_tests completed OK
+echo v17_tests not enabled
+
+#./v22bis_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo v22bis_tests failed!
+#    exit $RETVAL
+#fi
+#echo v22bis_tests completed OK
+echo v22bis_tests not enabled
+
+./v27ter_tests -s -42 2400 >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo v27ter_tests failed!
+    exit $RETVAL
+fi
+./v27ter_tests -s -42 4800 >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo v27ter_tests failed!
+    exit $RETVAL
+fi
+echo v27ter_tests completed OK
+
+./v29_tests -s -42 4800 >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo v29_tests failed!
+    exit $RETVAL
+fi
+./v29_tests -s -42 7200 >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo v29_tests failed!
+    exit $RETVAL
+fi
+./v29_tests -s -42 9600 >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo v29_tests failed!
+    exit $RETVAL
+fi
+echo v29_tests completed OK
+
+#./v42_tests >$STDOUT_DEST 2>$STDERR_DEST
+#RETVAL=$?
+#if [ $RETVAL != 0 ]
+#then
+#    echo v42_tests failed!
+#    exit $RETVAL
+#fi
+#echo v42_tests completed OK
+echo v42_tests not enabled
+
+./v42bis_tests.sh >/dev/null
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo v42bis_tests failed!
+    exit $RETVAL
+fi
+echo v42bis_tests completed OK
+
+./v8_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo v8_tests failed!
+    exit $RETVAL
+fi
+echo v8_tests completed OK
+
+./vector_float_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo vector_float_tests failed!
+    exit $RETVAL
+fi
+echo vector_float_tests completed OK
+
+./vector_int_tests >$STDOUT_DEST 2>$STDERR_DEST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    echo vector_int_tests failed!
+    exit $RETVAL
+fi
+echo vector_int_tests completed OK
+
+echo
+echo All regression tests successfully completed
Binary file spandsp-0.0.3/spandsp-0.0.3/tests/residue_sound.wav has changed
Binary file spandsp-0.0.3/spandsp-0.0.3/tests/result_sound.wav has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/schedule_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,125 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * schedule_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: schedule_tests.c,v 1.13 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page schedule_tests_page Event scheduler tests
+\section schedule_tests_page_sec_1 What does it do?
+???.
+
+\section schedule_tests_page_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+uint64_t when1;
+uint64_t when2;
+
+static void callback1(span_sched_state_t *s, void *user_data)
+{
+    int id;
+    uint64_t when;
+
+    when = span_schedule_time(s);
+    printf("1: Callback at %f %" PRId64 "\n", (float) when/8000.0, when - when1);
+    if ((when - when1))
+    {
+        printf("Callback occured at the wrong time.\n");
+        exit(2);
+    }
+    id = span_schedule_event(s, 500, callback1, NULL);
+    when1 = when + 500*8;
+    when = span_schedule_next(s);
+    printf("1: Event %d, earliest is %" PRId64 "\n", id, when);
+}
+
+static void callback2(span_sched_state_t *s, void *user_data)
+{
+    int id;
+    uint64_t when;
+
+    when = span_schedule_time(s);
+    printf("2: Callback at %f %" PRId64 "\n", (float) when/8000.0, when - when2);
+    id = span_schedule_event(s, 550, callback2, NULL);
+    if ((when - when2) != 80)
+    {
+        printf("Callback occured at the wrong time.\n");
+        exit(2);
+    }
+    when2 = when + 550*8;
+    when = span_schedule_next(s);
+    printf("2: Event %d, earliest is %" PRId64 "\n", id, when);
+}
+
+int main(int argc, char *argv[])
+{
+    int i;
+    int id1;
+    int id2;
+    span_sched_state_t sched;
+    uint64_t when;
+    
+    span_schedule_init(&sched);
+
+    id1 = span_schedule_event(&sched, 500, callback1, NULL);
+    id2 = span_schedule_event(&sched, 550, callback2, NULL);
+    when1 = span_schedule_time(&sched) + 500*8;
+    when2 = span_schedule_time(&sched) + 550*8;
+    //span_schedule_del(&sched, id);
+    
+    for (i = 0;  i < SAMPLE_RATE*100;  i += 160)
+    {
+        span_schedule_update(&sched, 160);
+    }
+    when = span_schedule_time(&sched);
+    if ((when1 - when) < 0  ||  (when1 - when) > 4000  ||  (when2 - when) < 0  ||  (when2 - when) > 4400)
+    {
+        printf("Callback failed to occur.\n");
+        exit(2);
+    }
+    span_schedule_release(&sched);
+
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/sig_tone_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,265 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * test_sig_tone.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: sig_tone_tests.c,v 1.15 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page sig_tone_tests_page The signaling tone processor tests
+\section sig_tone_tests_sec_1 What does it do?
+???.
+
+\section sig_tone_tests_sec_2 How does it work?
+???.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUT_FILE_NAME   "sig_tone.wav"
+
+static int sampleno = 0;
+static int tone_1_present = 0;
+static int tone_2_present = 0;
+static int ping = 0;
+
+void map_frequency_response(sig_tone_state_t *s);
+
+static int handler(void *user_data, int what)
+{
+    //printf("What - %d\n", what);
+    if ((what & SIG_TONE_1_CHANGE))
+    {
+        tone_1_present = what & SIG_TONE_1_PRESENT;
+        printf("Tone 1 is %s after %d samples\n", (tone_1_present)  ?  "on"  : "off", (what >> 16) & 0xFFFF);
+    }
+    /*endif*/
+    if ((what & SIG_TONE_2_CHANGE))
+    {
+        tone_2_present = what & SIG_TONE_2_PRESENT;
+        printf("Tone 2 is %s after %d samples\n", (tone_2_present)  ?  "on"  : "off", (what >> 16) & 0xFFFF);
+    }
+    /*endif*/
+    if ((what & SIG_TONE_UPDATE_REQUEST))
+    {
+        /* The signaling processor wants to know what to do next */
+        if (sampleno < 800)
+        {
+            /* 100ms off-hook */
+            printf("100ms off-hook - %d samples\n", 800 - sampleno);
+            return 0x02 | ((800 - sampleno) << 16) | SIG_TONE_RX_PASSTHROUGH;
+        }
+        /*endif*/
+        if (sampleno < 4800)
+        {
+            /* 500ms idle */
+            printf("500ms idle - %d samples\n", 4800 - sampleno);
+            return 0x02 | SIG_TONE_1_PRESENT | ((4800 - sampleno) << 16) | SIG_TONE_RX_PASSTHROUGH;
+        }
+        /*endif*/
+        if (sampleno < 5600)
+        {
+            /* 100ms seize */
+            printf("100ms seize - %d samples\n", 5600 - sampleno);
+            return 0x02 | ((5600 - sampleno) << 16) | SIG_TONE_RX_PASSTHROUGH;
+        }
+        /*endif*/
+        if (ping)
+        {
+            printf("33ms break - 262 samples\n");
+            ping = !ping;
+            return 0x02 | (262 << 16) | SIG_TONE_RX_PASSTHROUGH;
+        }
+        else
+        {
+            printf("67ms make - 528 samples\n");
+            ping = !ping;
+            return 0x02 |  SIG_TONE_1_PRESENT | (528 << 16) | SIG_TONE_RX_PASSTHROUGH;
+        }
+        /*endif*/
+    }
+    /*endif*/
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+void map_frequency_response(sig_tone_state_t *s)
+{
+    int16_t buf[8192];
+    awgn_state_t noise_source;
+    int i;
+    int f;
+    uint32_t phase_acc;
+    int32_t phase_rate;
+    int32_t scaling;
+    double sum;
+    
+    /* Things like noise don't highlight the frequency response of the high Q notch
+       very well. We use a slowly swept frequency to check it. */
+    awgn_init_dbm0(&noise_source, 1234567, -10.0f);
+    for (f = 1;  f < 4000;  f++)
+    {
+        phase_rate = dds_phase_rate(f);
+        scaling = dds_scaling_dbm0(-10);
+        phase_acc = 0;
+        for (i = 0;  i < 8192;  i++)
+            buf[i] = dds_mod(&phase_acc, phase_rate, scaling, 0);
+        /*endfor*/
+        sig_tone_rx(s, buf, 8192);
+        sum = 0.0;
+        for (i = 1000;  i < 8192;  i++)
+            sum += (double) buf[i]*(double) buf[i];
+        /*endfor*/
+        sum = sqrt(sum);
+        printf("%7d %f\n", f, sum);
+    }
+    /*endfor*/
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int16_t amp[160];
+    int16_t out_amp[2*160];
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int i;
+    int rx_samples;
+    int tx_samples;
+    sig_tone_state_t state;
+    awgn_state_t noise_source;
+    
+    filesetup = afNewFileSetup();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    /*endif*/
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+
+    outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup);
+    if (outhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    /*endif*/
+
+    awgn_init_dbm0(&noise_source, 1234567, -30.0f);
+
+    printf("2400Hz/26000Hz tests.\n");
+    sig_tone_init(&state, SIG_TONE_2400HZ_2600HZ, handler, NULL);
+    state.current_tx_tone |= SIG_TONE_RX_PASSTHROUGH;
+    
+    map_frequency_response(&state);
+
+    for (sampleno = 0;  sampleno < 20000;  sampleno += 160)
+    {
+        tx_samples = 160;
+        for (i = 0;  i < tx_samples;  i++)
+            amp[i] = alaw_to_linear(linear_to_alaw(awgn(&noise_source)));
+        /*endfor*/
+        for (i = 0;  i < tx_samples;  i++)
+            out_amp[2*i] = amp[i];
+        /*endfor*/
+        rx_samples = sig_tone_rx(&state, amp, tx_samples);
+        for (i = 0;  i < rx_samples;  i++)
+            out_amp[2*i + 1] = amp[i];
+        /*endfor*/
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  out_amp,
+                                  rx_samples);
+        if (outframes != rx_samples)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+        /*endif*/
+    }
+
+    printf("2280Hz tests.\n");
+    sig_tone_init(&state, SIG_TONE_2280HZ, handler, NULL);
+    state.current_tx_tone |= SIG_TONE_RX_PASSTHROUGH;
+    
+    map_frequency_response(&state);
+
+    for (sampleno = 0;  sampleno < 20000;  sampleno += 160)
+    {
+        memset(amp, 0, sizeof(int16_t)*160);
+        tx_samples = sig_tone_tx(&state, amp, 160);
+        for (i = 0;  i < tx_samples;  i++)
+            out_amp[2*i] = amp[i];
+        /*endfor*/
+        rx_samples = sig_tone_rx(&state, amp, tx_samples);
+        for (i = 0;  i < rx_samples;  i++)
+            out_amp[2*i + 1] = amp[i];
+        /*endfor*/
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  out_amp,
+                                  rx_samples);
+        if (outframes != rx_samples)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+        /*endif*/
+    }
+    /*endfor*/
+    if (afCloseFile(outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    /*endif*/
+    afFreeFileSetup(filesetup);
+    
+    printf("Tests completed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
Binary file spandsp-0.0.3/spandsp-0.0.3/tests/sound_c1_8k.wav has changed
Binary file spandsp-0.0.3/spandsp-0.0.3/tests/sound_c3_8k.wav has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/super_tone_rx_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,477 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * super_tone_detect_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: super_tone_rx_tests.c,v 1.18 2006/11/20 13:58:57 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page super_tone_rx_tests_page Supervisory tone detection tests
+\section super_tone_rx_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <time.h>
+#include <inttypes.h>
+#include <sys/socket.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#if defined(HAVE_LIBXML_XMLMEMORY_H)
+#include <libxml/xmlmemory.h>
+#endif
+#if defined(HAVE_LIBXML_PARSER_H)
+#include <libxml/parser.h>
+#endif
+#if defined(HAVE_LIBXML_XINCLUDE_H)
+#include <libxml/xinclude.h>
+#endif
+
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define IN_FILE_NAME    "super_tone.wav"
+#define BELLCORE_DIR	"../itutests/bellcore/"
+
+const char *bellcore_files[] =
+{
+    BELLCORE_DIR "tr-tsy-00763-1.wav",
+    BELLCORE_DIR "tr-tsy-00763-2.wav",
+    BELLCORE_DIR "tr-tsy-00763-3.wav",
+    BELLCORE_DIR "tr-tsy-00763-4.wav",
+    BELLCORE_DIR "tr-tsy-00763-5.wav",
+    BELLCORE_DIR "tr-tsy-00763-6.wav",
+    ""
+};
+
+const char *tone_names[20] = {NULL};
+
+AFfilehandle inhandle;
+
+super_tone_rx_segment_t tone_segments[20][10];
+
+super_tone_tx_step_t *dialtone_tree = NULL;
+super_tone_tx_step_t *ringback_tree = NULL;
+super_tone_tx_step_t *busytone_tree = NULL;
+super_tone_tx_step_t *nutone_tree = NULL;
+super_tone_tx_step_t *congestiontone_tree = NULL;
+super_tone_tx_step_t *waitingtone_tree = NULL;
+
+#if defined(HAVE_LIBXML2)
+static int parse_tone(super_tone_rx_descriptor_t *desc, int tone_id, super_tone_tx_step_t **tree, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
+{
+    xmlChar *x;
+    float f1;
+    float f2;
+    float f_tol;
+    float l1;
+    float l2;
+    float length;
+    float length_tol;
+    float recognition_length;
+    float recognition_length_tol;
+    int cycles;
+    super_tone_tx_step_t *treep;
+    int min_duration;
+    int max_duration;
+
+    cur = cur->xmlChildrenNode;
+    while (cur)
+    {
+        if (xmlStrcmp(cur->name, (const xmlChar *) "step") == 0)
+        {
+            printf("Step - ");
+            /* Set some defaults */
+            f1 = 0.0;
+            f2 = 0.0;
+            f_tol = 1.0;
+            l1 = -11.0;
+            l2 = -11.0;
+            length = 0.0;
+            length_tol = 10.0;
+            recognition_length = 0.0;
+            recognition_length_tol = 10.0;
+            cycles = 1;
+            if ((x = xmlGetProp(cur, (const xmlChar *) "freq")))
+            {
+                sscanf((char *) x, "%f [%f%%]", &f1, &f_tol);
+                sscanf((char *) x, "%f+%f [%f%%]", &f1, &f2, &f_tol);
+                printf(" Frequency=%.2f+%.2f [%.2f%%]", f1, f2, f_tol);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "level")))
+            {
+                if (sscanf((char *) x, "%f+%f", &l1, &l2) < 2)
+                    l2 = l1;
+                printf(" Level=%.2f+%.2f", l1, l2);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "length")))
+            {
+                sscanf((char *) x, "%f [%f%%]", &length, &length_tol);
+                printf(" Length=%.2f [%.2f%%]", length, length_tol);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "recognition-length")))
+            {
+                sscanf((char *) x, "%f [%f%%]", &recognition_length, &recognition_length_tol);
+                printf(" Recognition length=%.2f [%.2f%%]", recognition_length, recognition_length_tol);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "cycles")))
+            {
+                if (strcasecmp((char *) x, "endless") == 0)
+                    cycles = 0;
+                else
+                    cycles = atoi((char *) x);
+                printf(" Cycles='%d' ", cycles);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "recorded-announcement")))
+                printf(" Recorded announcement='%s'", x);
+            printf("\n");
+            if (f1  ||  f2  ||  length)
+            {
+                /* TODO: This cannot handle cycling patterns */
+                if (length == 0.0)
+                {
+                    if (recognition_length)
+                        min_duration = recognition_length*1000.0 + 0.5;
+                    else
+                        min_duration = 700;
+                    max_duration = 0;
+                }
+                else
+                {
+                    if (recognition_length)
+                        min_duration = recognition_length*1000.0 + 0.5;
+                    else
+                        min_duration = (length*1000.0 + 0.5)*(1.0 - length_tol/100.0) - 30;
+                    max_duration = (length*1000.0 + 0.5)*(1.0 + length_tol/100.0) + 30;
+                }
+                printf(">>>Detector element %10d %10d %10d %10d\n", (int) (f1 + 0.5), (int) (f2 + 0.5), min_duration, max_duration);
+                super_tone_rx_add_element(desc, tone_id, f1 + 0.5, f2 + 0.5, min_duration, max_duration);
+            }
+            treep = super_tone_tx_make_step(NULL,
+                                            f1,
+                                            l1,
+                                            f2,
+                                            l2,
+                                            length*1000.0 + 0.5,
+                                            cycles);
+            *tree = treep;
+            tree = &(treep->next);
+            parse_tone(desc, tone_id, &(treep->nest), doc, ns, cur);
+        }
+        /*endif*/
+        cur = cur->next;
+    }
+    /*endwhile*/
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void parse_tone_set(super_tone_rx_descriptor_t *desc, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
+{
+    int tone_id;
+
+    printf("Parsing tone set\n");
+    cur = cur->xmlChildrenNode;
+    while (cur)
+    {
+        if (strcmp((char *) cur->name, "dial-tone") == 0)
+        {
+            printf("Hit %s\n", cur->name);
+            tone_id = super_tone_rx_add_tone(desc);
+            dialtone_tree = NULL;
+            parse_tone(desc, tone_id, &dialtone_tree, doc, ns, cur);
+            tone_names[tone_id] = "Dial tone";
+        }
+        else if (strcmp((char *) cur->name, "ringback-tone") == 0)
+        {
+            printf("Hit %s\n", cur->name);
+            tone_id = super_tone_rx_add_tone(desc);
+            ringback_tree = NULL;
+            parse_tone(desc, tone_id, &ringback_tree, doc, ns, cur);
+            tone_names[tone_id] = "Ringback tone";
+        }
+        else if (strcmp((char *) cur->name, "busy-tone") == 0)
+        {
+            printf("Hit %s\n", cur->name);
+            tone_id = super_tone_rx_add_tone(desc);
+            busytone_tree = NULL;
+            parse_tone(desc, tone_id, &busytone_tree, doc, ns, cur);
+            tone_names[tone_id] = "Busy tone";
+        }
+        else if (strcmp((char *) cur->name, "number-unobtainable-tone") == 0)
+        {
+            printf("Hit %s\n", cur->name);
+            tone_id = super_tone_rx_add_tone(desc);
+            nutone_tree = NULL;
+            parse_tone(desc, tone_id, &nutone_tree, doc, ns, cur);
+            tone_names[tone_id] = "NU tone";
+        }
+        else if (strcmp((char *) cur->name, "congestion-tone") == 0)
+        {
+            printf("Hit %s\n", cur->name);
+            tone_id = super_tone_rx_add_tone(desc);
+            congestiontone_tree = NULL;
+            parse_tone(desc, tone_id, &congestiontone_tree, doc, ns, cur);
+            tone_names[tone_id] = "Congestion tone";
+        }
+        else if (strcmp((char *) cur->name, "waiting-tone") == 0)
+        {
+            printf("Hit %s\n", cur->name);
+            tone_id = super_tone_rx_add_tone(desc);
+            waitingtone_tree = NULL;
+            parse_tone(desc, tone_id, &waitingtone_tree, doc, ns, cur);
+            tone_names[tone_id] = "Waiting tone";
+        }
+        /*endif*/
+        cur = cur->next;
+    }
+    /*endwhile*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void get_tone_set(super_tone_rx_descriptor_t *desc, const char *tone_file, const char *set_id)
+{
+    xmlDocPtr doc;
+    xmlNsPtr ns;
+    xmlNodePtr cur;
+#if 0
+    xmlValidCtxt valid;
+#endif
+    xmlChar *x;
+    
+    ns = NULL;
+    xmlKeepBlanksDefault(0);
+    xmlCleanupParser();
+    doc = xmlParseFile(tone_file);
+    if (doc == NULL)
+    {
+        fprintf(stderr, "No document\n");
+        exit(2);
+    }
+    /*endif*/
+    xmlXIncludeProcess(doc);
+#if 0
+    if (!xmlValidateDocument(&valid, doc))
+    {
+        fprintf(stderr, "Invalid document\n");
+        exit(2);
+    }
+    /*endif*/
+#endif
+    /* Check the document is of the right kind */
+    if ((cur = xmlDocGetRootElement(doc)) == NULL)
+    {
+        fprintf(stderr, "Empty document\n");
+        xmlFreeDoc(doc);
+        exit(2);
+    }
+    /*endif*/
+    if (xmlStrcmp(cur->name, (const xmlChar *) "global-tones"))
+    {
+        fprintf(stderr, "Document of the wrong type, root node != global-tones");
+        xmlFreeDoc(doc);
+        exit(2);
+    }
+    /*endif*/
+    cur = cur->xmlChildrenNode;
+    while (cur  &&  xmlIsBlankNode (cur))
+        cur = cur->next;
+    /*endwhile*/
+    if (cur == NULL)
+        exit(2);
+    /*endif*/
+    while (cur)
+    {
+        if (xmlStrcmp(cur->name, (const xmlChar *) "tone-set") == 0)
+        {
+            if ((x = xmlGetProp(cur, (const xmlChar *) "uncode")))
+            {
+                if (strcmp((char *) x, set_id) == 0)
+                    parse_tone_set(desc, doc, ns, cur);
+            }
+            /*endif*/
+        }
+        /*endif*/
+        cur = cur->next;
+    }
+    /*endwhile*/
+    xmlFreeDoc(doc);
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+static void super_tone_rx_fill_descriptor(super_tone_rx_descriptor_t *desc)
+{
+    int tone_id;
+    
+    tone_id = super_tone_rx_add_tone(desc);
+    super_tone_rx_add_element(desc, tone_id, 400, 0, 700, 0);
+    tone_names[tone_id] = "XXX";
+
+    tone_id = super_tone_rx_add_tone(desc);
+    super_tone_rx_add_element(desc, tone_id, 1100, 0, 400, 600);
+    super_tone_rx_add_element(desc, tone_id, 0, 0, 2800, 3200);
+    tone_names[tone_id] = "FAX tone";
+}
+/*- End of function --------------------------------------------------------*/
+
+static void wakeup(void *data, int code)
+{
+    if (code >= 0)
+        printf("Current tone is %d '%s' '%s'\n", code, (tone_names[code])  ?  tone_names[code]  :  "???", (char *) data);
+    else
+        printf("Tone off '%s'\n", (char *) data);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void tone_segment(void *data, int f1, int f2, int duration)
+{
+    if (f1 < 0)
+        printf("Result %5d silence\n", duration);
+    else if (f2 < 0)
+        printf("Result %5d %4d\n", duration, f1);
+    else
+        printf("Result %5d %4d + %4d\n", duration, f1, f2);
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int x;
+    int16_t amp[8000];
+    int sample;
+    int frames;
+    awgn_state_t noise_source;
+    super_tone_rx_state_t *super;
+    super_tone_rx_descriptor_t desc;
+
+    if ((inhandle = afOpenFile(IN_FILE_NAME, "r", 0)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+    if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+    {
+        printf("    Unexpected frame size in wave file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+    if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+    {
+        printf("    Unexpected sample rate in wave file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+    if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+    {
+        printf("    Unexpected number of channels in wave file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+    super_tone_rx_make_descriptor(&desc);
+#if defined(HAVE_LIBXML2)
+    get_tone_set(&desc, "../spandsp/global-tones.xml", (argc > 1)  ?  argv[1]  :  "hk");
+#endif
+    super_tone_rx_fill_descriptor(&desc);
+    if ((super = super_tone_rx_init(NULL, &desc, wakeup, (void *) "test")) == NULL)
+    {
+        printf("    Failed to create detector.\n");
+        exit(2);
+    }
+    super_tone_rx_segment_callback(super, tone_segment);
+    awgn_init_dbm0(&noise_source, 1234567, -30.0f);
+    printf("Processing file\n");
+    while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, amp, 8000)))
+    {
+        /* Add some noise to the signal for a more meaningful test. */
+        //for (sample = 0;  sample < frames;  sample++)
+        //    amp[sample] += saturate(amp[sample] + awgn (&noise_source));
+        for (sample = 0;  sample < frames;  )
+        {
+            x = super_tone_rx(super, amp + sample, frames - sample);
+            sample += x;
+        }
+    }
+    if (afCloseFile(inhandle))
+    {
+        fprintf(stderr, "    Cannot close audio file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+#if 0
+    /* Test for voice immunity */
+    for (j = 0;  bellcore_files[j][0];  j++)
+    {
+        if ((inhandle = afOpenFile(bellcore_files[j], "r", 0)) == AF_NULL_FILEHANDLE)
+        {
+            printf("    Cannot open wave file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+        {
+            printf("    Unexpected frame size in wave file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+        {
+            printf("    Unexpected sample rate in wave file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+        {
+            printf("    Unexpected number of channels in wave file '%s'\n", bellcore_files[j]);
+            exit(2);
+        }
+        while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, amp, 8000)))
+        {
+            for (sample = 0;  sample < frames;  )
+            {
+                x = super_tone_rx(super, amp + sample, frames - sample);
+                sample += x;
+            }
+    	}
+        if (afCloseFile(inhandle) != 0)
+    	{
+    	    printf("    Cannot close speech file '%s'\n", bellcore_files[j]);
+            exit(2);
+    	}
+    }
+#endif
+    super_tone_rx_free(super);
+    printf("Done\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/super_tone_tx_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,321 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * super_tone_generate_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: super_tone_tx_tests.c,v 1.16 2006/12/01 18:00:48 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page super_tone_tx_tests_page Supervisory tone generation tests
+\section super_tone_tx_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <time.h>
+#include <inttypes.h>
+#include <sys/socket.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#if defined(HAVE_LIBXML_XMLMEMORY_H)
+#include <libxml/xmlmemory.h>
+#endif
+#if defined(HAVE_LIBXML_PARSER_H)
+#include <libxml/parser.h>
+#endif
+#if defined(HAVE_LIBXML_XINCLUDE_H)
+#include <libxml/xinclude.h>
+#endif
+
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUT_FILE_NAME   "super_tone.wav"
+
+AFfilehandle outhandle;
+AFfilesetup filesetup;
+
+super_tone_tx_step_t *tone_tree = NULL;
+
+static void play_tones(super_tone_tx_state_t *tone, int max_samples)
+{
+    int16_t amp[8000];
+    int len;
+    int outframes;
+    int i;
+    int total_length;
+
+    i = 500;
+    total_length = 0;
+    do
+    {
+        len = super_tone_tx(tone, amp, 160);
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  len);
+        if (outframes != len)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+        total_length += len;
+    }
+    while (len > 0  &&  --i > 0);
+    printf("Tone length = %d samples (%dms)\n", total_length, total_length/8);
+}
+/*- End of function --------------------------------------------------------*/
+
+#if defined(HAVE_LIBXML2)
+static int parse_tone(super_tone_tx_step_t **tree, xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
+{
+    xmlChar *x;
+    float f1;
+    float f2;
+    float f_tol;
+    float l1;
+    float l2;
+    float length;
+    float length_tol;
+    int cycles;
+    super_tone_tx_step_t *treep;
+
+    cur = cur->xmlChildrenNode;
+    while (cur)
+    {
+        if (xmlStrcmp(cur->name, (const xmlChar *) "step") == 0)
+        {
+            printf("Step - ");
+            /* Set some defaults */
+            f1 = 0.0;
+            f2 = 0.0;
+            f_tol = 1.0;
+            l1 = -11.0;
+            l2 = -11.0;
+            length = 0.0;
+            length_tol = 10.0;
+            cycles = 1;
+            if ((x = xmlGetProp(cur, (const xmlChar *) "freq")))
+            {
+                sscanf((char *) x, "%f [%f%%]", &f1, &f_tol);
+                sscanf((char *) x, "%f+%f [%f%%]", &f1, &f2, &f_tol);
+                printf("Frequency=%.2f+%.2f [%.2f%%]", f1, f2, f_tol);
+                xmlFree(x);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "level")))
+            {
+                if (sscanf((char *) x, "%f+%f", &l1, &l2) < 2)
+                    l2 = l1;
+                printf("Level=%.2f+%.2f", l1, l2);
+                xmlFree(x);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "length")))
+            {
+                sscanf((char *) x, "%f [%f%%]", &length, &length_tol);
+                printf("Length=%.2f [%.2f%%]", length, length_tol);
+                xmlFree(x);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "recognition-length")))
+            {
+                printf("Recognition length='%s'", x);
+                xmlFree(x);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "cycles")))
+            {
+                if (strcasecmp((char *) x, "endless") == 0)
+                    cycles = 0;
+                else
+                    cycles = atoi((char *) x);
+                printf("Cycles=%d ", cycles);
+                xmlFree(x);
+            }
+            if ((x = xmlGetProp(cur, (const xmlChar *) "recorded-announcement")))
+            {
+                printf("Recorded announcement='%s'", x);
+                xmlFree(x);
+            }
+            printf("\n");
+            treep = super_tone_tx_make_step(NULL,
+                                            f1,
+                                            l1,
+                                            f2,
+                                            l2,
+                                            length*1000.0 + 0.5,
+                                            cycles);
+            *tree = treep;
+            tree = &(treep->next);
+            parse_tone(&(treep->nest), doc, ns, cur);
+        }
+        /*endif*/
+        cur = cur->next;
+    }
+    /*endwhile*/
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void parse_tone_set(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
+{
+    super_tone_tx_state_t tone;
+
+    printf("Parsing tone set\n");
+    cur = cur->xmlChildrenNode;
+    while (cur)
+    {
+        if (strcmp((char *) cur->name + strlen((char *) cur->name) - 5, "-tone") == 0)
+        {
+            printf("Hit %s\n", cur->name);
+            tone_tree = NULL;
+            parse_tone(&tone_tree, doc, ns, cur);
+            super_tone_tx_init(&tone, tone_tree);
+printf("Len %p %p %d %d\n", (void *) tone.levels[0], (void *) tone_tree, tone_tree->length, tone_tree->tone);
+            play_tones(&tone, 99999999);
+            super_tone_tx_free(tone_tree);
+        }
+        /*endif*/
+        cur = cur->next;
+    }
+    /*endwhile*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void get_tone_set(const char *tone_file, const char *set_id)
+{
+    xmlDocPtr doc;
+    xmlNsPtr ns;
+    xmlNodePtr cur;
+#if 0
+    xmlValidCtxt valid;
+#endif
+    xmlChar *x;
+
+    ns = NULL;    
+    xmlKeepBlanksDefault(0);
+    xmlCleanupParser();
+    doc = xmlParseFile(tone_file);
+    if (doc == NULL)
+    {
+        fprintf(stderr, "No document\n");
+        exit(2);
+    }
+    /*endif*/
+    xmlXIncludeProcess(doc);
+#if 0
+    if (!xmlValidateDocument(&valid, doc))
+    {
+        fprintf(stderr, "Invalid document\n");
+        exit(2);
+    }
+    /*endif*/
+#endif
+    /* Check the document is of the right kind */
+    if ((cur = xmlDocGetRootElement(doc)) == NULL)
+    {
+        fprintf(stderr, "Empty document\n");
+        xmlFreeDoc(doc);
+        exit(2);
+    }
+    /*endif*/
+    if (xmlStrcmp(cur->name, (const xmlChar *) "global-tones"))
+    {
+        fprintf(stderr, "Document of the wrong type, root node != global-tones");
+        xmlFreeDoc(doc);
+        exit(2);
+    }
+    /*endif*/
+    cur = cur->xmlChildrenNode;
+    while (cur  &&  xmlIsBlankNode(cur))
+        cur = cur->next;
+    /*endwhile*/
+    if (cur == NULL)
+        exit(2);
+    /*endif*/
+    while (cur)
+    {
+        if (xmlStrcmp(cur->name, (const xmlChar *) "tone-set") == 0)
+        {
+            if ((x = xmlGetProp(cur, (const xmlChar *) "uncode")))
+            {
+                if (strcmp((char *) x, set_id) == 0)
+                    parse_tone_set(doc, ns, cur);
+                /*endif*/
+                xmlFree(x);
+            }
+            /*endif*/
+        }
+        /*endif*/
+        cur = cur->next;
+    }
+    /*endwhile*/
+    xmlFreeDoc(doc);
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
+int main(int argc, char *argv[])
+{
+    if ((filesetup = afNewFileSetup ()) == AF_NULL_FILESETUP)
+    {
+    	fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, 8000.0);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open audio file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+#if defined(HAVE_LIBXML2)
+    get_tone_set("../spandsp/global-tones.xml", (argc > 1)  ?  argv[1]  :  "hk");
+#endif
+    if (afCloseFile (outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close audio file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    printf("Done\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/t31_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,582 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t31_tests.c - Tests for the T.31 modem.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t31_tests.c,v 1.42 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page t31_tests_page T.31 tests
+\section t31_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define _GNU_SOURCE
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+#include "spandsp/t30_fcf.h"
+
+#define INPUT_FILE_NAME         "../itutests/fax/itu1.tif"
+#define OUTPUT_FILE_NAME        "t31.tif"
+#define OUTPUT_WAVE_FILE_NAME   "t31_tests.wav"
+
+#define DLE 0x10
+#define ETX 0x03
+#define SUB 0x1A
+
+#define MANUFACTURER            "www.soft-switch.org"
+
+#define SAMPLES_PER_CHUNK 160
+
+struct command_response_s
+{
+    const char *command;
+    int len_command;
+    const char *response;
+    int len_response;
+};
+
+#define EXCHANGE(a,b) {a, sizeof(a) - 1, b, sizeof(b) - 1}
+#define RESPONSE(b) {"", 0, b, sizeof(b) - 1}
+#define FAST_RESPONSE(b) {NULL, -1, b, sizeof(b) - 1}
+#define FAST_SEND(b) {(const char *) 1, -2, b, sizeof(b) - 1}
+
+static const struct command_response_s fax_send_test_seq[] =
+{
+    EXCHANGE("ATE0\r", "ATE0\r\r\nOK\r\n"),
+    EXCHANGE("AT+FCLASS=1\r", "\r\nOK\r\n"),
+    EXCHANGE("ATD123456789\r", "\r\nCONNECT\r\n"),
+    //<NSF frame>         AT+FRH=3 is implied when dialing in the AT+FCLASS=1 state
+    //RESPONSE("\xFF\x03\x10\x03"),
+    //RESPONSE("\r\nOK\r\n"),
+    //EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
+    //<CSI frame data>
+    RESPONSE("\xFF\x03\x40\x31\x31\x31\x31\x31\x31\x31\x31\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x1e\x46\x10\x03"),
+    RESPONSE("\r\nOK\r\n"),
+    EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
+    //<DIS frame data>
+    RESPONSE("\xFF\x13\x80\x00\xCE\xF8\x80\x80\x89\x80\x80\x80\x98\x80\x80\x80\x80\x80\x00\xFA\x72\x10\x03"),
+    RESPONSE("\r\nOK\r\n"),
+    //EXCHANGE("AT+FRH=3\r", "\r\nNO CARRIER\r\n"),
+    EXCHANGE("AT+FTH=3\r", "\r\nCONNECT\r\n"),
+    //<TSI frame data>
+    EXCHANGE("\xFF\x03\x43\x32\x32\x32\x32\x32\x32\x32\x32\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x10\x03", "\r\nCONNECT\r\n"),
+    //<DCS frame data>
+    EXCHANGE("\xFF\x13\x83\x01\xC6\x80\x80\x80\x80\x01\xFD\x13\x10\x03", "\r\nOK\r\n"),
+    //Do a wait for timed silence at this point, or there won't be one in the tests
+    EXCHANGE("AT+FRS=7\r", "\r\nOK\r\n"),
+    //EXCHANGE("AT+FTS=8;+FTM=96\r", "\r\nCONNECT\r\n"),
+    EXCHANGE("AT+FTS=8\r", "\r\nOK\r\n"),
+    EXCHANGE("AT+FTM=96\r", "\r\nCONNECT\r\n"),
+    //<TCF data pattern>
+    FAST_SEND("\r\nOK\r\n"),
+    EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
+    //<CFR frame data>
+    RESPONSE("\xFF\x13\x84\xEA\x7D\x10\x03"),
+    RESPONSE("\r\nOK\r\n"),
+    EXCHANGE("AT+FTM=96\r", "\r\nCONNECT\r\n"),
+    //<page image data>
+    FAST_SEND("\r\nOK\r\n"),
+    //EXCHANGE("AT+FTS=8;+FTH=3\r", "\r\nCONNECT\r\n"),
+    EXCHANGE("AT+FTS=8\r", "\r\nOK\r\n"),
+    EXCHANGE("AT+FTH=3\r", "\r\nCONNECT\r\n"),
+    //<EOP frame data>
+    EXCHANGE("\xFF\x13\x2E\x10\x03", "\r\nOK\r\n"),
+    EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
+    //<MCF frame data>
+    EXCHANGE("\xFF\x13\x8C\x10\x03", "\r\nOK\r\n"),
+    EXCHANGE("AT+FTH=3\r", "\r\nCONNECT\r\n"),
+    // <DCN frame data>
+    EXCHANGE("\xFF\x13\xFB\x10\x03", "\r\nOK\r\n"),
+    EXCHANGE("ATH0\r", "\r\nOK\r\n")
+};
+
+static const struct command_response_s fax_receive_test_seq[] =
+{
+    EXCHANGE("ATE0\r", "ATE0\r\r\nOK\r\n"),
+    EXCHANGE("AT+FCLASS=1\r", "\r\nOK\r\n"),
+    RESPONSE("\r\nRING\r\n"),
+    EXCHANGE("ATA\r", "\r\nCONNECT\r\n"),
+    //<CSI frame data>
+    EXCHANGE("\xFF\x03\x40\x32\x32\x32\x32\x32\x32\x32\x32\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x10\x03", "\r\nCONNECT\r\n"),
+    //<DIS frame data>
+    EXCHANGE("\xFF\x13\x80\x01\xCE\xF4\x80\x80\x81\x80\x80\x80\x18\x10\x03", "\r\nOK\r\n"),
+    EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
+    //<TSI frame data>
+    RESPONSE("\xFF\x03\x43\x31\x31\x31\x31\x31\x31\x31\x31\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\xAA\x1F\x10\x03"),
+    RESPONSE("\r\nOK\r\n"),
+    EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
+    //<DCS frame data>
+    RESPONSE("\xFF\x13\x83\x00\xC6\xF0\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x00\xE4\x7E\x10\x03"),
+    RESPONSE("\r\nOK\r\n"),
+    EXCHANGE("AT+FRM=96\r", "\r\nCONNECT\r\n"),
+    //<TCF data>
+    FAST_RESPONSE(NULL),
+    RESPONSE("\r\nNO CARRIER\r\n"),
+    EXCHANGE("AT+FTH=3\r", "\r\nCONNECT\r\n"),
+    //<CFR frame data>
+    EXCHANGE("\xFF\x13\x84\x10\x03", "\r\nOK\r\n"),
+    EXCHANGE("AT+FRM=96\r", "\r\nCONNECT\r\n"),
+    //<page image data>
+    FAST_RESPONSE(NULL),
+    RESPONSE("\r\nNO CARRIER\r\n"),
+    EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
+    //<EOP frame data>
+    RESPONSE("\xFF\x13\x2F\x33\x66\x10\x03"),
+    RESPONSE("\r\nOK\r\n"),
+    EXCHANGE("AT+FTH=3\r", "\r\nCONNECT\r\n"),
+    //<MCF frame data>
+    EXCHANGE("\xFF\x13\x8C\x10\x03", "\r\nOK\r\n"),
+    EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
+    //<DCN frame data>
+    RESPONSE("\xFF\x13\xfb\x9a\xf6\x10\x03"),
+    RESPONSE("\r\nOK\r\n"),
+    EXCHANGE("ATH0\r", "\r\nOK\r\n")
+};
+
+char *decode_test_file = NULL;
+int countdown = 0;
+int command_response_test_step = -1;
+char response_buf[1000];
+int response_buf_ptr = 0;
+int answered = FALSE;
+int kick = FALSE;
+int dled = FALSE;
+int done = FALSE;
+
+static const struct command_response_s *fax_test_seq;
+
+int test_seq_ptr = 0;
+
+t31_state_t t31_state;
+
+static void phase_b_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    
+    i = (intptr_t) user_data;
+    printf("Phase B handler on channel %d - (0x%X) %s\n", i, result, t30_frametype(result));
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_d_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+
+    i = (intptr_t) user_data;
+    printf("Phase D handler on channel %d - (0x%X) %s\n", i, result, t30_frametype(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("Phase D: bit rate %d\n", t.bit_rate);
+    printf("Phase D: ECM %s\n", (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("Phase D: pages transferred %d\n", t.pages_transferred);
+    printf("Phase D: image size %d x %d\n", t.width, t.length);
+    printf("Phase D: image resolution %d x %d\n", t.x_resolution, t.y_resolution);
+    printf("Phase D: bad rows %d\n", t.bad_rows);
+    printf("Phase D: longest bad row run %d\n", t.longest_bad_row_run);
+    printf("Phase D: coding method %d\n", t.encoding);
+    printf("Phase D: image size %d\n", t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("Phase D: local ident '%s'\n", ident);
+    t30_get_far_ident(s, ident);
+    printf("Phase D: remote ident '%s'\n", ident);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_e_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    
+    i = (intptr_t) user_data;
+    printf("Phase E handler on channel %d\n", i);
+    //exit(0);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int modem_call_control(t31_state_t *s, void *user_data, int op, const char *num)
+{
+    switch (op)
+    {
+    case AT_MODEM_CONTROL_ANSWER:
+        printf("\nModem control - Answering\n");
+        answered = TRUE;
+        break;
+    case AT_MODEM_CONTROL_CALL:
+        printf("\nModem control - Dialing '%s'\n", num);
+        t31_call_event(&t31_state, AT_CALL_EVENT_CONNECTED);
+        break;
+    case AT_MODEM_CONTROL_HANGUP:
+        printf("\nModem control - Hanging up\n");
+        done = TRUE;
+        break;
+    case AT_MODEM_CONTROL_OFFHOOK:
+        printf("\nModem control - Going off hook\n");
+        break;
+    case AT_MODEM_CONTROL_DTR:
+        printf("\nModem control - DTR %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_RTS:
+        printf("\nModem control - RTS %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_CTS:
+        printf("\nModem control - CTS %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_CAR:
+        printf("\nModem control - CAR %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_RNG:
+        printf("\nModem control - RNG %d\n", (int) (intptr_t) num);
+        break;
+    case AT_MODEM_CONTROL_DSR:
+        printf("\nModem control - DSR %d\n", (int) (intptr_t) num);
+        break;
+    default:
+        printf("\nModem control - operation %d\n", op);
+        break;
+    }
+    /*endswitch*/
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int at_tx_handler(at_state_t *s, void *user_data, const uint8_t *buf, size_t len)
+{
+    size_t i;
+
+    i = 0;
+    if (fax_test_seq[test_seq_ptr].command == NULL)
+    {
+        /* TCF or non-ECM image data expected */
+        for (  ;  i < len;  i++)
+        {
+            if (dled)
+            {
+                if (buf[i] == ETX)
+                {
+                    printf("\nFast data ended\n");
+                    response_buf_ptr = 0;
+                    response_buf[response_buf_ptr] = '\0';
+                    test_seq_ptr++;
+                    if (fax_test_seq[test_seq_ptr].command)
+                        kick = TRUE;
+                    break;
+                }
+                dled = FALSE;
+            }
+            else
+            {
+                if (buf[i] == DLE)
+                    dled = TRUE;
+            }
+        }
+        i++;
+        if (i >= len)
+            return 0;
+    }
+    for (  ;  i < len;  i++)
+    {
+        response_buf[response_buf_ptr++] = buf[i];
+        putchar(buf[i]);
+    }
+    response_buf[response_buf_ptr] = '\0';
+    printf("Expected ");
+    for (i = 0;  i < response_buf_ptr;  i++)
+        printf("%02x ", fax_test_seq[test_seq_ptr].response[i] & 0xFF);
+    printf("\n");
+    printf("Response ");
+    for (i = 0;  i < response_buf_ptr;  i++)
+        printf("%02x ", response_buf[i] & 0xFF);
+    printf("\n");
+printf("Match %d against %d\n", response_buf_ptr, fax_test_seq[test_seq_ptr].len_response);
+    if (response_buf_ptr >= fax_test_seq[test_seq_ptr].len_response
+        &&
+        memcmp(fax_test_seq[test_seq_ptr].response, response_buf, fax_test_seq[test_seq_ptr].len_response) == 0)
+    {
+        printf("\nMatched\n");
+        test_seq_ptr++;
+        response_buf_ptr = 0;
+        response_buf[response_buf_ptr] = '\0';
+        if (fax_test_seq[test_seq_ptr].command)
+            kick = TRUE;
+        else
+            dled = FALSE;
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int i;
+    int k;
+    int outframes;
+    fax_state_t fax_state;
+    int16_t t30_amp[SAMPLES_PER_CHUNK];
+    int16_t t31_amp[SAMPLES_PER_CHUNK];
+    int16_t silence[SAMPLES_PER_CHUNK];
+    int16_t out_amp[2*SAMPLES_PER_CHUNK];
+    int t30_len;
+    int t31_len;
+    AFfilesetup filesetup;
+    AFfilehandle wave_handle;
+    AFfilehandle in_handle;
+    int log_audio;
+    int test_sending;
+    int fast_send;
+    int fast_blocks;
+    uint8_t fast_buf[1000];
+    
+    decode_test_file = NULL;
+    log_audio = FALSE;
+    test_sending = FALSE;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-d") == 0)
+        {
+            decode_test_file = argv[++i];
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-r") == 0)
+        {
+            test_sending = FALSE;
+            continue;
+        }
+        if (strcmp(argv[i], "-s") == 0)
+        {
+            test_sending = TRUE;
+            continue;
+        }
+    }
+
+    filesetup = AF_NULL_FILESETUP;
+    wave_handle = AF_NULL_FILEHANDLE;
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+        if ((wave_handle = afOpenFile(OUTPUT_WAVE_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_WAVE_FILE_NAME);
+            exit(2);
+        }
+    }
+
+    memset(silence, 0, sizeof(silence));
+ 
+    in_handle = NULL;
+    if (decode_test_file)
+    {
+        if ((in_handle = afOpenFile(decode_test_file, "r", NULL)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", decode_test_file);
+            exit(2);
+        }
+    }
+
+    if (test_sending)
+    {
+        fax_init(&fax_state, FALSE);
+        t30_set_rx_file(&fax_state.t30_state, OUTPUT_FILE_NAME, -1);
+        fax_test_seq = fax_send_test_seq;
+        countdown = 0;
+    }
+    else
+    {
+        fax_init(&fax_state, TRUE);
+        t30_set_tx_file(&fax_state.t30_state, INPUT_FILE_NAME, -1, -1);
+        fax_test_seq = fax_receive_test_seq;
+        countdown = 250;
+    }
+    
+    t30_set_local_ident(&fax_state.t30_state, "11111111");
+    t30_set_phase_b_handler(&fax_state.t30_state, phase_b_handler, (void *) 0);
+    t30_set_phase_d_handler(&fax_state.t30_state, phase_d_handler, (void *) 0);
+    t30_set_phase_e_handler(&fax_state.t30_state, phase_e_handler, (void *) 0);
+    memset(t30_amp, 0, sizeof(t30_amp));
+    
+    span_log_set_level(&fax_state.t30_state.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW);
+    span_log_set_tag(&fax_state.t30_state.logging, "YYY");
+    span_log_set_level(&fax_state.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW);
+    span_log_set_tag(&fax_state.logging, "YYY");
+
+    if (t31_init(&t31_state, at_tx_handler, NULL, modem_call_control, NULL, NULL, NULL) == NULL)
+    {
+        fprintf(stderr, "    Cannot start the FAX modem\n");
+        exit(2);
+    }
+
+    span_log_set_level(&t31_state.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW);
+    span_log_set_tag(&t31_state.logging, "XXX");
+
+    fast_send = FALSE;
+    fast_blocks = 0;
+    kick = TRUE;
+    while (!done)
+    {
+        if (kick)
+        {
+            kick = FALSE;
+            if (fax_test_seq[test_seq_ptr].command > (const char *) 1)
+            {
+                if (fax_test_seq[test_seq_ptr].command[0])
+                {
+                    printf("%s\n", fax_test_seq[test_seq_ptr].command);
+                    t31_at_rx(&t31_state, fax_test_seq[test_seq_ptr].command, fax_test_seq[test_seq_ptr].len_command);
+                }
+            }
+            else
+            {
+                printf("Fast send\n");
+                fast_send = TRUE;
+                fast_blocks = 100;
+            }
+        }
+        if (fast_send)
+        {
+            /* Send fast modem data */
+            memset(fast_buf, 0, 36);
+            if (fast_blocks == 1)
+            {
+                /* Insert EOLs */
+                fast_buf[35] = ETX;
+                fast_buf[34] = DLE;
+                fast_buf[31] =
+                fast_buf[28] =
+                fast_buf[25] =
+                fast_buf[22] =
+                fast_buf[19] =
+                fast_buf[16] = 1;
+            }
+            t31_at_rx(&t31_state, (char *) fast_buf, 36);
+            if (--fast_blocks == 0)
+                fast_send = FALSE;
+        }
+        t30_len = fax_tx(&fax_state, t30_amp, SAMPLES_PER_CHUNK);
+        /* The receive side always expects a full block of samples, but the
+           transmit side may not be sending any when it doesn't need to. We
+           may need to pad with some silence. */
+        if (t30_len < SAMPLES_PER_CHUNK)
+        {
+            memset(t30_amp + t30_len, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t30_len));
+            t30_len = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (k = 0;  k < t30_len;  k++)
+                out_amp[2*k] = t30_amp[k];
+        }
+        if (t31_rx(&t31_state, t30_amp, t30_len))
+            break;
+        if (countdown)
+        {
+            if (answered)
+            {
+                countdown = 0;
+                t31_call_event(&t31_state, AT_CALL_EVENT_ANSWERED);
+            }
+            else if (--countdown == 0)
+            {
+                t31_call_event(&t31_state, AT_CALL_EVENT_ALERTING);
+                countdown = 250;
+            }
+        }
+
+        t31_len = t31_tx(&t31_state, t31_amp, SAMPLES_PER_CHUNK);
+        if (t31_len < SAMPLES_PER_CHUNK)
+        {
+            memset(t31_amp + t31_len, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t31_len));
+            t31_len = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (k = 0;  k < t31_len;  k++)
+                out_amp[2*k + 1] = t31_amp[k];
+        }
+        if (fax_rx(&fax_state, t31_amp, SAMPLES_PER_CHUNK))
+            break;
+
+        if (log_audio)
+        {
+            outframes = afWriteFrames(wave_handle, AF_DEFAULT_TRACK, out_amp, SAMPLES_PER_CHUNK);
+            if (outframes != SAMPLES_PER_CHUNK)
+                break;
+        }
+    }
+    if (decode_test_file)
+    {
+        if (afCloseFile(in_handle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", decode_test_file);
+            exit(2);
+        }
+    }
+    if (log_audio)
+    {
+        if (afCloseFile(wave_handle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_WAVE_FILE_NAME);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    if (done)
+    {
+        printf("Tests passed\n");
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/t38_gateway_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,429 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_gateway_tests.c - Tests for the T.38 FoIP gateway module.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_gateway_tests.c,v 1.38 2006/12/09 04:56:20 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page t38_gateway_tests_page T.38 gateway tests tests
+\section t38_gateway_tests_page_sec_1 What does it do?
+These tests exercise the path
+
+    FAX machine <-> T.38 gateway <-> T.38 gateway <-> FAX machine
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <errno.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#define __USE_MISC
+#include <arpa/inet.h>
+#include <sys/select.h>
+#include <sys/time.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#include "ip_network_model.h"
+
+#define SAMPLES_PER_CHUNK       160
+
+#define INPUT_FILE_NAME         "../itutests/fax/itutests.tif"
+#define OUTPUT_FILE_NAME        "t38.tif"
+#define OUTPUT_FILE_NAME_WAVE   "t38_gateway.wav"
+#define OUTPUT_FILE_NAME_T30A   "t38_gateway_t30a.wav"
+#define OUTPUT_FILE_NAME_T38A   "t38_gateway_t38a.wav"
+#define OUTPUT_FILE_NAME_T30B   "t38_gateway_t30b.wav"
+#define OUTPUT_FILE_NAME_T38B   "t38_gateway_t38b.wav"
+
+fax_state_t fax_state_a;
+t38_gateway_state_t t38_state_a;
+t38_gateway_state_t t38_state_b;
+fax_state_t fax_state_b;
+
+ip_network_model_state_t *path_a_to_b;
+ip_network_model_state_t *path_b_to_a;
+
+int done[2] = {FALSE, FALSE};
+int succeeded[2] = {FALSE, FALSE};
+
+static void phase_b_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase B handler on channel %c - (0x%X) %s\n", i, i, result, t30_frametype(result));
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_d_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase D handler on channel %c - (0x%X) %s\n", i, i, result, t30_frametype(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("%c: Phase D: bit rate %d\n", i, t.bit_rate);
+    printf("%c: Phase D: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%c: Phase D: pages transferred %d\n", i, t.pages_transferred);
+    printf("%c: Phase D: image size %d x %d\n", i, t.width, t.length);
+    printf("%c: Phase D: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%c: Phase D: bad rows %d\n", i, t.bad_rows);
+    printf("%c: Phase D: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%c: Phase D: coding method %s\n", i, t4_encoding_to_str(t.encoding));
+    printf("%c: Phase D: image size %d\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%c: Phase D: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%c: Phase D: remote ident '%s'\n", i, ident);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_e_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+    
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase E handler on channel %c - (%d) %s\n", i, i, result, t30_completion_code_to_str(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("%c: Phase E: bit rate %d\n", i, t.bit_rate);
+    printf("%c: Phase E: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%c: Phase E: pages transferred %d\n", i, t.pages_transferred);
+    printf("%c: Phase E: image size %d x %d\n", i, t.width, t.length);
+    printf("%c: Phase E: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%c: Phase E: bad rows %d\n", i, t.bad_rows);
+    printf("%c: Phase E: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%c: Phase E: coding method %s\n", i, t4_encoding_to_str(t.encoding));
+    printf("%c: Phase E: image size %d bytes\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%c: Phase E: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%c: Phase E: remote ident '%s'\n", i, ident);
+    succeeded[i - 'A'] = (result == T30_ERR_OK)  &&  (t.pages_transferred == 12);
+    done[i - 'A'] = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int tx_packet_handler_a(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
+{
+    t38_gateway_state_t *t;
+
+    /* This routine queues messages between two instances of T.38 processing */
+    t = (t38_gateway_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Send seq %d, len %d, count %d\n", s->tx_seq_no, len, count);
+
+    ip_network_model_send(path_a_to_b, s->tx_seq_no, count, buf, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int tx_packet_handler_b(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
+{
+    t38_gateway_state_t *t;
+
+    /* This routine queues messages between two instances of T.38 processing */
+    t = (t38_gateway_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Send seq %d, len %d, count %d\n", s->tx_seq_no, len, count);
+
+    ip_network_model_send(path_b_to_a, s->tx_seq_no, count, buf, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int16_t silence[SAMPLES_PER_CHUNK];
+    int16_t t30_amp_a[SAMPLES_PER_CHUNK];
+    int16_t t38_amp_a[SAMPLES_PER_CHUNK];
+    int16_t t38_amp_b[SAMPLES_PER_CHUNK];
+    int16_t t30_amp_b[SAMPLES_PER_CHUNK];
+    int16_t out_amp[SAMPLES_PER_CHUNK*4];
+    int t30_len_a;
+    int t38_len_a;
+    int t38_len_b;
+    int t30_len_b;
+    int log_audio;
+    int msg_len;
+    uint8_t msg[1024];
+    int outframes;
+    AFfilesetup filesetup;
+    AFfilehandle wave_handle;
+    int use_ecm;
+    int t38_version;
+    const char *input_file_name;
+    int i;
+    int seq_no;
+    
+    log_audio = FALSE;
+    use_ecm = FALSE;
+    t38_version = 1;
+    input_file_name = INPUT_FILE_NAME;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-e") == 0)
+        {
+            use_ecm = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-i") == 0)
+        {
+            i++;
+            input_file_name = argv[i];
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-v") == 0)
+        {
+            i++;
+            t38_version = atoi(argv[i]);
+            continue;
+        }
+    }
+
+    printf("Using T.38 version %d\n", t38_version);
+    if (use_ecm)
+        printf("Using ECM\n");
+
+    filesetup = AF_NULL_FILESETUP;
+    wave_handle = AF_NULL_FILEHANDLE;
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 4);
+        if ((wave_handle = afOpenFile(OUTPUT_FILE_NAME_WAVE, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_FILE_NAME_WAVE);
+            exit(2);
+        }
+    }
+    memset(silence, 0, sizeof(silence));
+ 
+    if ((path_a_to_b = ip_network_model_init(800, 2000, 0)) == NULL)
+    {
+        fprintf(stderr, "Failed to start IP network path model\n");
+        exit(2);
+    }
+    if ((path_b_to_a = ip_network_model_init(800, 2000, 0)) == NULL)
+    {
+        fprintf(stderr, "Failed to start IP network path model\n");
+        exit(2);
+    }
+
+    fax_init(&fax_state_a, TRUE);
+    t30_set_local_ident(&fax_state_a.t30_state, "11111111");
+    t30_set_tx_file(&fax_state_a.t30_state, input_file_name, -1, -1);
+    t30_set_phase_b_handler(&fax_state_a.t30_state, phase_b_handler, (void *) (intptr_t) 'A');
+    t30_set_phase_d_handler(&fax_state_a.t30_state, phase_d_handler, (void *) (intptr_t) 'A');
+    t30_set_phase_e_handler(&fax_state_a.t30_state, phase_e_handler, (void *) (intptr_t) 'A');
+    t30_set_ecm_capability(&fax_state_a.t30_state, use_ecm);
+    if (use_ecm)
+        t30_set_supported_compressions(&fax_state_a.t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION);
+    span_log_set_level(&fax_state_a.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&fax_state_a.logging, "FAX-A ");
+    span_log_set_level(&fax_state_a.t30_state.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&fax_state_a.t30_state.logging, "FAX-A ");
+    memset(t30_amp_a, 0, sizeof(t30_amp_a));
+
+    if (t38_gateway_init(&t38_state_a, tx_packet_handler_a, &t38_state_b) == NULL)
+    {
+        fprintf(stderr, "Cannot start the T.38 channel\n");
+        exit(2);
+    }
+    t38_set_t38_version(&t38_state_a.t38, t38_version);
+    t38_gateway_ecm_control(&t38_state_a, use_ecm);
+    span_log_set_level(&t38_state_a.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.logging, "T.38-A");
+    span_log_set_level(&t38_state_a.t38.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.t38.logging, "T.38-A");
+    memset(t38_amp_a, 0, sizeof(t38_amp_a));
+
+    if (t38_gateway_init(&t38_state_b, tx_packet_handler_b, &t38_state_a) == NULL)
+    {
+        fprintf(stderr, "Cannot start the T.38 channel\n");
+        exit(2);
+    }
+    t38_set_t38_version(&t38_state_b.t38, t38_version);
+    t38_gateway_ecm_control(&t38_state_b, use_ecm);
+    span_log_set_level(&t38_state_b.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.logging, "T.38-B");
+    span_log_set_level(&t38_state_b.t38.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.t38.logging, "T.38-B");
+    memset(t38_amp_b, 0, sizeof(t38_amp_b));
+
+    fax_init(&fax_state_b, FALSE);
+    t30_set_local_ident(&fax_state_b.t30_state, "22222222");
+    t30_set_rx_file(&fax_state_b.t30_state, OUTPUT_FILE_NAME, -1);
+    t30_set_phase_b_handler(&fax_state_b.t30_state, phase_b_handler, (void *) (intptr_t) 'B');
+    t30_set_phase_d_handler(&fax_state_b.t30_state, phase_d_handler, (void *) (intptr_t) 'B');
+    t30_set_phase_e_handler(&fax_state_b.t30_state, phase_e_handler, (void *) (intptr_t) 'B');
+    t30_set_ecm_capability(&fax_state_b.t30_state, use_ecm);
+    if (use_ecm)
+        t30_set_supported_compressions(&fax_state_b.t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION);
+    span_log_set_level(&fax_state_b.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&fax_state_b.logging, "FAX-B ");
+    span_log_set_level(&fax_state_b.t30_state.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&fax_state_b.t30_state.logging, "FAX-B ");
+    memset(t30_amp_b, 0, sizeof(t30_amp_b));
+
+    for (;;)
+    {
+        span_log_bump_samples(&fax_state_a.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&fax_state_a.t30_state.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_a.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_a.t38.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.t38.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&fax_state_b.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&fax_state_b.t30_state.logging, SAMPLES_PER_CHUNK);
+        memset(out_amp, 0, sizeof(out_amp));
+
+        t30_len_a = fax_tx(&fax_state_a, t30_amp_a, SAMPLES_PER_CHUNK);
+        /* The receive side always expects a full block of samples, but the
+           transmit side may not be sending any when it doesn't need to. We
+           may need to pad with some silence. */
+        if (t30_len_a < SAMPLES_PER_CHUNK)
+        {
+            memset(t30_amp_a + t30_len_a, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t30_len_a));
+            t30_len_a = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (i = 0;  i < t30_len_a;  i++)
+                out_amp[i*4] = t30_amp_a[i];
+        }
+        if (t38_gateway_rx(&t38_state_a, t30_amp_a, t30_len_a))
+            break;
+
+        t38_len_a = t38_gateway_tx(&t38_state_a, t38_amp_a, SAMPLES_PER_CHUNK);
+        if (t38_len_a < SAMPLES_PER_CHUNK)
+        {
+            memset(t38_amp_a + t38_len_a, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t38_len_a));
+            t38_len_a = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (i = 0;  i < t38_len_a;  i++)
+                out_amp[i*4 + 1] = t38_amp_a[i];
+        }
+        if (fax_rx(&fax_state_a, t38_amp_a, SAMPLES_PER_CHUNK))
+            break;
+
+        t30_len_b = fax_tx(&fax_state_b, t30_amp_b, SAMPLES_PER_CHUNK);
+        /* The receive side always expects a full block of samples, but the
+           transmit side may not be sending any when it doesn't need to. We
+           may need to pad with some silence. */
+        if (t30_len_b < SAMPLES_PER_CHUNK)
+        {
+            memset(t30_amp_b + t30_len_b, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t30_len_b));
+            t30_len_b = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (i = 0;  i < t30_len_b;  i++)
+                out_amp[i*4 + 3] = t30_amp_b[i];
+        }
+        if (t38_gateway_rx(&t38_state_b, t30_amp_b, t30_len_b))
+            break;
+
+        t38_len_b = t38_gateway_tx(&t38_state_b, t38_amp_b, SAMPLES_PER_CHUNK);
+        if (t38_len_b < SAMPLES_PER_CHUNK)
+        {
+            memset(t38_amp_b + t38_len_b, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t38_len_b));
+            t38_len_b = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (i = 0;  i < t38_len_b;  i++)
+                out_amp[i*4 + 2] = t38_amp_b[i];
+        }
+        if (fax_rx(&fax_state_b, t38_amp_b, SAMPLES_PER_CHUNK))
+            break;
+
+        while ((msg_len = ip_network_model_get(path_a_to_b, SAMPLES_PER_CHUNK, msg, 1024, &seq_no)) >= 0)
+            t38_core_rx_ifp_packet(&t38_state_b.t38, seq_no, msg, msg_len);
+        while ((msg_len = ip_network_model_get(path_b_to_a, SAMPLES_PER_CHUNK, msg, 1024, &seq_no)) >= 0)
+            t38_core_rx_ifp_packet(&t38_state_a.t38, seq_no, msg, msg_len);
+
+        if (log_audio)
+        {
+            outframes = afWriteFrames(wave_handle, AF_DEFAULT_TRACK, out_amp, SAMPLES_PER_CHUNK);
+            if (outframes != SAMPLES_PER_CHUNK)
+                break;
+        }
+
+        if (done[0]  &&  done[1])
+            break;
+    }
+    if (log_audio)
+    {
+        if (afCloseFile(wave_handle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME_WAVE);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    if (!succeeded[0]  ||  !succeeded[1])
+    {
+        printf("Tests failed\n");
+        exit(2);
+    }
+    printf("Tests passed\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/t38_gateway_to_terminal_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,384 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_gateway_to_terminal_tests.c - Joint tests for the T.38 FoIP terminal and gateway modules.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_gateway_to_terminal_tests.c,v 1.31 2006/12/09 04:56:20 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page t38_gateway_to_terminal_tests_page T.38 mixed gateway and termination tests
+\section t38_gateway_to_terminal_tests_page_sec_1 What does it do?
+These tests exercise the path
+
+    FAX machine -> T.38 gateway -> T.38 termination
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <errno.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#define __USE_MISC
+#include <arpa/inet.h>
+#include <sys/select.h>
+#include <sys/time.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#include "ip_network_model.h"
+
+#define SAMPLES_PER_CHUNK       160
+
+#define INPUT_FILE_NAME         "../itutests/fax/itutests.tif"
+#define OUTPUT_FILE_NAME        "t38.tif"
+#define OUTPUT_FILE_NAME_WAVE   "t38_gateway_to_terminal.wav"
+
+fax_state_t fax_state_a;
+t38_gateway_state_t t38_state_a;
+t38_terminal_state_t t38_state_b;
+
+ip_network_model_state_t *path_a_to_b;
+ip_network_model_state_t *path_b_to_a;
+
+int done[2] = {FALSE, FALSE};
+int succeeded[2] = {FALSE, FALSE};
+
+static void phase_b_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase B handler on channel %c - (0x%X) %s\n", i, i, result, t30_frametype(result));
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_d_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase D handler on channel %c - (0x%X) %s\n", i, i, result, t30_frametype(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("%c: Phase D: bit rate %d\n", i, t.bit_rate);
+    printf("%c: Phase D: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%c: Phase D: pages transferred %d\n", i, t.pages_transferred);
+    printf("%c: Phase D: image size %d x %d\n", i, t.width, t.length);
+    printf("%c: Phase D: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%c: Phase D: bad rows %d\n", i, t.bad_rows);
+    printf("%c: Phase D: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%c: Phase D: coding method %s\n", i, t4_encoding_to_str(t.encoding));
+    printf("%c: Phase D: image size %d\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%c: Phase D: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%c: Phase D: remote ident '%s'\n", i, ident);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_e_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+    
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase E handler on channel %c - (%d) %s\n", i, i, result, t30_completion_code_to_str(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("%c: Phase E: bit rate %d\n", i, t.bit_rate);
+    printf("%c: Phase E: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%c: Phase E: pages transferred %d\n", i, t.pages_transferred);
+    printf("%c: Phase E: image size %d x %d\n", i, t.width, t.length);
+    printf("%c: Phase E: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%c: Phase E: bad rows %d\n", i, t.bad_rows);
+    printf("%c: Phase E: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%c: Phase E: coding method %s\n", i, t4_encoding_to_str(t.encoding));
+    printf("%c: Phase E: image size %d bytes\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%c: Phase E: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%c: Phase E: remote ident '%s'\n", i, ident);
+    succeeded[i - 'A'] = (result == T30_ERR_OK)  &&  (t.pages_transferred == 12);
+    done[i - 'A'] = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int tx_packet_handler_a(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
+{
+    t38_terminal_state_t *t;
+
+    /* This routine queues messages between two instances of T.38 processing */
+    t = (t38_terminal_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Send seq %d, len %d, count %d\n", s->tx_seq_no, len, count);
+
+    ip_network_model_send(path_a_to_b, s->tx_seq_no, count, buf, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int tx_packet_handler_b(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
+{
+    t38_gateway_state_t *t;
+
+    /* This routine queues messages between two instances of T.38 processing */
+    t = (t38_gateway_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Send seq %d, len %d, count %d\n", s->tx_seq_no, len, count);
+
+    ip_network_model_send(path_b_to_a, s->tx_seq_no, count, buf, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int16_t t38_amp_a[SAMPLES_PER_CHUNK];
+    int16_t t30_amp_a[SAMPLES_PER_CHUNK];
+    int16_t out_amp[2*SAMPLES_PER_CHUNK];
+    int t38_len_a;
+    int t30_len_a;
+    int msg_len;
+    uint8_t msg[1024];
+    int log_audio;
+    int outframes;
+    int t38_version;
+    int use_ecm;
+    AFfilesetup filesetup;
+    AFfilehandle wave_handle;
+    const char *input_file_name;
+    int i;
+    int seq_no;
+
+    log_audio = FALSE;
+    t38_version = 1;
+    use_ecm = FALSE;
+    input_file_name = INPUT_FILE_NAME;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-e") == 0)
+        {
+            use_ecm = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-i") == 0)
+        {
+            i++;
+            input_file_name = argv[i];
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-v") == 0)
+        {
+            i++;
+            t38_version = atoi(argv[i]);
+            continue;
+        }
+    }
+
+    printf("Using T.38 version %d\n", t38_version);
+    if (use_ecm)
+        printf("Using ECM\n");
+
+    filesetup = AF_NULL_FILESETUP;
+    wave_handle = AF_NULL_FILEHANDLE;
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+
+        wave_handle = afOpenFile(OUTPUT_FILE_NAME_WAVE, "w", filesetup);
+        if (wave_handle == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_FILE_NAME_WAVE);
+            exit(2);
+        }
+    }
+
+    if ((path_a_to_b = ip_network_model_init(800, 2000, 0)) == NULL)
+    {
+        fprintf(stderr, "Failed to start IP network path model\n");
+        exit(2);
+    }
+    if ((path_b_to_a = ip_network_model_init(800, 2000, 0)) == NULL)
+    {
+        fprintf(stderr, "Failed to start IP network path model\n");
+        exit(2);
+    }
+
+    fax_init(&fax_state_a, TRUE);
+    t30_set_local_ident(&fax_state_a.t30_state, "11111111");
+    t30_set_tx_file(&fax_state_a.t30_state, input_file_name, -1, -1);
+    t30_set_phase_b_handler(&fax_state_a.t30_state, phase_b_handler, (void *) (intptr_t) 'A');
+    t30_set_phase_d_handler(&fax_state_a.t30_state, phase_d_handler, (void *) (intptr_t) 'A');
+    t30_set_phase_e_handler(&fax_state_a.t30_state, phase_e_handler, (void *) (intptr_t) 'A');
+    t30_set_ecm_capability(&fax_state_a.t30_state, use_ecm);
+    if (use_ecm)
+        t30_set_supported_compressions(&fax_state_a.t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION);
+    span_log_set_level(&fax_state_a.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&fax_state_a.logging, "FAX-A ");
+    span_log_set_level(&fax_state_a.t30_state.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&fax_state_a.t30_state.logging, "FAX-A ");
+    memset(t30_amp_a, 0, sizeof(t30_amp_a));
+
+    if (t38_gateway_init(&t38_state_a, tx_packet_handler_a, &t38_state_b) == NULL)
+    {
+        fprintf(stderr, "Cannot start the T.38 channel\n");
+        exit(2);
+    }
+    t38_set_t38_version(&t38_state_a.t38, t38_version);
+    t38_gateway_ecm_control(&t38_state_a, use_ecm);
+    span_log_set_level(&t38_state_a.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.logging, "T.38-A");
+    span_log_set_level(&t38_state_a.t38.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.t38.logging, "T.38-A");
+    memset(t38_amp_a, 0, sizeof(t38_amp_a));
+
+    if (t38_terminal_init(&t38_state_b, FALSE, tx_packet_handler_b, &t38_state_a) == NULL)
+    {
+        fprintf(stderr, "Cannot start the T.38 channel\n");
+        exit(2);
+    }
+    t38_set_t38_version(&t38_state_b.t38, t38_version);
+    span_log_set_level(&t38_state_b.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.logging, "T.38-B");
+    span_log_set_level(&t38_state_b.t38.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.t38.logging, "T.38-B");
+    span_log_set_level(&t38_state_b.t30_state.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.t30_state.logging, "T.38-B");
+
+    t30_set_local_ident(&t38_state_b.t30_state, "22222222");
+    t30_set_rx_file(&t38_state_b.t30_state, OUTPUT_FILE_NAME, -1);
+    t30_set_phase_b_handler(&t38_state_b.t30_state, phase_b_handler, (void *) (intptr_t) 'B');
+    t30_set_phase_d_handler(&t38_state_b.t30_state, phase_d_handler, (void *) (intptr_t) 'B');
+    t30_set_phase_e_handler(&t38_state_b.t30_state, phase_e_handler, (void *) (intptr_t) 'B');
+    t30_set_ecm_capability(&t38_state_b.t30_state, use_ecm);
+    if (use_ecm)
+        t30_set_supported_compressions(&t38_state_b.t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION);
+
+    for (;;)
+    {
+        span_log_bump_samples(&fax_state_a.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&fax_state_a.t30_state.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_a.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_a.t38.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.t38.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.t30_state.logging, SAMPLES_PER_CHUNK);
+        memset(out_amp, 0, sizeof(out_amp));
+
+        t38_terminal_send_timeout(&t38_state_b, SAMPLES_PER_CHUNK);
+
+        t30_len_a = fax_tx(&fax_state_a, t30_amp_a, SAMPLES_PER_CHUNK);
+        /* The receive side always expects a full block of samples, but the
+           transmit side may not be sending any when it doesn't need to. We
+           may need to pad with some silence. */
+        if (t30_len_a < SAMPLES_PER_CHUNK)
+        {
+            memset(t30_amp_a + t30_len_a, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t30_len_a));
+            t30_len_a = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (i = 0;  i < t30_len_a;  i++)
+                out_amp[2*i] = t30_amp_a[i];
+        }
+        if (t38_gateway_rx(&t38_state_a, t30_amp_a, t30_len_a))
+            break;
+    
+        t38_len_a = t38_gateway_tx(&t38_state_a, t38_amp_a, SAMPLES_PER_CHUNK);
+        if (t38_len_a < SAMPLES_PER_CHUNK)
+        {
+            memset(t38_amp_a + t38_len_a, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t38_len_a));
+            t38_len_a = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (i = 0;  i < t38_len_a;  i++)
+                out_amp[2*i + 1] = t38_amp_a[i];
+        }
+        if (fax_rx(&fax_state_a, t38_amp_a, SAMPLES_PER_CHUNK))
+            break;
+
+        while ((msg_len = ip_network_model_get(path_a_to_b, SAMPLES_PER_CHUNK, msg, 1024, &seq_no)) >= 0)
+            t38_core_rx_ifp_packet(&t38_state_b.t38, seq_no, msg, msg_len);
+        while ((msg_len = ip_network_model_get(path_b_to_a, SAMPLES_PER_CHUNK, msg, 1024, &seq_no)) >= 0)
+            t38_core_rx_ifp_packet(&t38_state_a.t38, seq_no, msg, msg_len);
+
+        if (log_audio)
+        {
+            outframes = afWriteFrames(wave_handle, AF_DEFAULT_TRACK, out_amp, SAMPLES_PER_CHUNK);
+            if (outframes != SAMPLES_PER_CHUNK)
+                break;
+        }
+
+        if (done[0]  &&  done[1])
+            break;
+    }
+    if (log_audio)
+    {
+        if (afCloseFile(wave_handle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME_WAVE);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    if (!succeeded[0]  ||  !succeeded[1])
+    {
+        printf("Tests failed\n");
+        exit(2);
+    }
+    printf("Tests passed\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/t38_terminal_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,290 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_terminal_tests.c - Tests for the T.38 FoIP terminal module.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_terminal_tests.c,v 1.32 2006/12/09 04:56:20 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page t38_terminal_tests_page T.38 termination tests
+\section t38_terminal_tests_page_sec_1 What does it do?
+These tests exercise the path
+
+    T.38 termination <-> T.38 termination
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <errno.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#define __USE_MISC
+#include <arpa/inet.h>
+#include <sys/select.h>
+#include <sys/time.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#include "ip_network_model.h"
+
+#define SAMPLES_PER_CHUNK 160
+
+#define INPUT_FILE_NAME         "../itutests/fax/itutests.tif"
+#define OUTPUT_FILE_NAME        "t38.tif"
+
+t38_terminal_state_t t38_state_a;
+t38_terminal_state_t t38_state_b;
+
+ip_network_model_state_t *path_a_to_b;
+ip_network_model_state_t *path_b_to_a;
+
+int done[2] = {FALSE, FALSE};
+int succeeded[2] = {FALSE, FALSE};
+
+static void phase_b_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase B handler on channel %c - (0x%X) %s\n", i, i, result, t30_frametype(result));
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_d_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase D handler on channel %c - (0x%X) %s\n", i, i, result, t30_frametype(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("%c: Phase D: bit rate %d\n", i, t.bit_rate);
+    printf("%c: Phase D: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%c: Phase D: pages transferred %d\n", i, t.pages_transferred);
+    printf("%c: Phase D: image size %d x %d\n", i, t.width, t.length);
+    printf("%c: Phase D: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%c: Phase D: bad rows %d\n", i, t.bad_rows);
+    printf("%c: Phase D: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%c: Phase D: coding method %s\n", i, t4_encoding_to_str(t.encoding));
+    printf("%c: Phase D: image size %d\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%c: Phase D: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%c: Phase D: remote ident '%s'\n", i, ident);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_e_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+    
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase E handler on channel %c - (%d) %s\n", i, i, result, t30_completion_code_to_str(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("%c: Phase E: bit rate %d\n", i, t.bit_rate);
+    printf("%c: Phase E: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%c: Phase E: pages transferred %d\n", i, t.pages_transferred);
+    printf("%c: Phase E: image size %d x %d\n", i, t.width, t.length);
+    printf("%c: Phase E: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%c: Phase E: bad rows %d\n", i, t.bad_rows);
+    printf("%c: Phase E: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%c: Phase E: coding method %s\n", i, t4_encoding_to_str(t.encoding));
+    printf("%c: Phase E: image size %d bytes\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%c: Phase E: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%c: Phase E: remote ident '%s'\n", i, ident);
+    succeeded[i - 'A'] = (result == T30_ERR_OK)  &&  (t.pages_transferred == 12);
+    //done[i - 'A'] = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int tx_packet_handler_a(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
+{
+    t38_terminal_state_t *t;
+
+    /* This routine queues messages between two instances of T.38 processing */
+    t = (t38_terminal_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Send seq %d, len %d, count %d\n", s->tx_seq_no, len, count);
+
+    ip_network_model_send(path_a_to_b, s->tx_seq_no, count, buf, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int tx_packet_handler_b(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
+{
+    t38_terminal_state_t *t;
+
+    /* This routine queues messages between two instances of T.38 processing */
+    t = (t38_terminal_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Send seq %d, len %d, count %d\n", s->tx_seq_no, len, count);
+
+    ip_network_model_send(path_b_to_a, s->tx_seq_no, count, buf, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int msg_len;
+    uint8_t msg[1024];
+    int t38_version;
+    int i;
+    int seq_no;
+    int use_ecm;
+    const char *input_file_name;
+    
+    t38_version = 1;
+    input_file_name = INPUT_FILE_NAME;
+    use_ecm = FALSE;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-e") == 0)
+        {
+            use_ecm = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-v") == 0)
+        {
+            i++;
+            t38_version = atoi(argv[i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-i") == 0)
+        {
+            i++;
+            input_file_name = argv[i];
+            continue;
+        }
+    }
+
+    printf("Using T.38 version %d\n", t38_version);
+    if (use_ecm)
+        printf("Using ECM\n");
+
+    if ((path_a_to_b = ip_network_model_init(800, 2000, 0)) == NULL)
+    {
+        fprintf(stderr, "Failed to start IP network path model\n");
+        exit(2);
+    }
+    if ((path_b_to_a = ip_network_model_init(800, 2000, 0)) == NULL)
+    {
+        fprintf(stderr, "Failed to start IP network path model\n");
+        exit(2);
+    }
+
+    if (t38_terminal_init(&t38_state_a, TRUE, tx_packet_handler_a, &t38_state_b) == NULL)
+    {
+        fprintf(stderr, "Cannot start the T.38 channel\n");
+        exit(2);
+    }
+    t38_set_t38_version(&t38_state_a.t38, t38_version);
+    span_log_set_level(&t38_state_a.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.logging, "T.38-A");
+    span_log_set_level(&t38_state_a.t38.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.t38.logging, "T.38-A");
+    span_log_set_level(&t38_state_a.t30_state.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.t30_state.logging, "T.38-A");
+
+    t30_set_local_ident(&t38_state_a.t30_state, "11111111");
+    t30_set_tx_file(&t38_state_a.t30_state, input_file_name, -1, -1);
+    t30_set_phase_b_handler(&t38_state_a.t30_state, phase_b_handler, (void *) (intptr_t) 'A');
+    t30_set_phase_d_handler(&t38_state_a.t30_state, phase_d_handler, (void *) (intptr_t) 'A');
+    t30_set_phase_e_handler(&t38_state_a.t30_state, phase_e_handler, (void *) (intptr_t) 'A');
+    t30_set_ecm_capability(&t38_state_a.t30_state, use_ecm);
+    if (use_ecm)
+        t30_set_supported_compressions(&t38_state_a.t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION);
+
+    if (t38_terminal_init(&t38_state_b, FALSE, tx_packet_handler_b, &t38_state_a) == NULL)
+    {
+        fprintf(stderr, "Cannot start the T.38 channel\n");
+        exit(2);
+    }
+    t38_set_t38_version(&t38_state_b.t38, t38_version);
+    span_log_set_level(&t38_state_b.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.logging, "T.38-B");
+    span_log_set_level(&t38_state_b.t38.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.t38.logging, "T.38-B");
+    span_log_set_level(&t38_state_b.t30_state.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.t30_state.logging, "T.38-B");
+
+    t30_set_local_ident(&t38_state_b.t30_state, "22222222");
+    t30_set_rx_file(&t38_state_b.t30_state, OUTPUT_FILE_NAME, -1);
+    t30_set_phase_b_handler(&t38_state_b.t30_state, phase_b_handler, (void *) (intptr_t) 'B');
+    t30_set_phase_d_handler(&t38_state_b.t30_state, phase_d_handler, (void *) (intptr_t) 'B');
+    t30_set_phase_e_handler(&t38_state_b.t30_state, phase_e_handler, (void *) (intptr_t) 'B');
+    t30_set_ecm_capability(&t38_state_b.t30_state, use_ecm);
+    if (use_ecm)
+        t30_set_supported_compressions(&t38_state_b.t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION);
+
+    for (;;)
+    {
+        span_log_bump_samples(&t38_state_a.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_a.t38.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_a.t30_state.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.t38.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.t30_state.logging, SAMPLES_PER_CHUNK);
+
+        done[0] = t38_terminal_send_timeout(&t38_state_a, SAMPLES_PER_CHUNK);
+        done[1] = t38_terminal_send_timeout(&t38_state_b, SAMPLES_PER_CHUNK);
+
+        while ((msg_len = ip_network_model_get(path_a_to_b, SAMPLES_PER_CHUNK, msg, 1024, &seq_no)) >= 0)
+            t38_core_rx_ifp_packet(&t38_state_b.t38, seq_no, msg, msg_len);
+        while ((msg_len = ip_network_model_get(path_b_to_a, SAMPLES_PER_CHUNK, msg, 1024, &seq_no)) >= 0)
+            t38_core_rx_ifp_packet(&t38_state_a.t38, seq_no, msg, msg_len);
+
+        if (done[0]  &&  done[1])
+            break;
+    }
+    if (!succeeded[0]  ||  !succeeded[1])
+    {
+        printf("Tests failed\n");
+        exit(2);
+    }
+    printf("Tests passed\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/t38_terminal_to_gateway_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,383 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t38_terminal_to_gateway_tests.c - Joint tests for the T.38 FoIP terminal and gateway modules.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005, 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t38_terminal_to_gateway_tests.c,v 1.29 2006/12/09 04:56:20 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page t38_terminal_to_gateway_tests_page T.38 mixed gateway and termination tests
+\section t38_terminal_to_gateway_tests_page_sec_1 What does it do?
+These tests exercise the path
+
+    T.38 termination -> T.38 gateway -> FAX machine
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <errno.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#define __USE_MISC
+#include <arpa/inet.h>
+#include <sys/select.h>
+#include <sys/time.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#include "ip_network_model.h"
+
+#define SAMPLES_PER_CHUNK       160
+
+#define INPUT_FILE_NAME         "../itutests/fax/itutests.tif"
+#define OUTPUT_FILE_NAME        "t38.tif"
+#define OUTPUT_FILE_NAME_WAVE   "t38_terminal_to_gateway.wav"
+
+t38_terminal_state_t t38_state_a;
+t38_gateway_state_t t38_state_b;
+fax_state_t fax_state_b;
+
+ip_network_model_state_t *path_a_to_b;
+ip_network_model_state_t *path_b_to_a;
+
+int done[2] = {FALSE, FALSE};
+int succeeded[2] = {FALSE, FALSE};
+
+static void phase_b_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase B handler on channel %c - (0x%X) %s\n", i, i, result, t30_frametype(result));
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_d_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase D handler on channel %c - (0x%X) %s\n", i, i, result, t30_frametype(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("%c: Phase D: bit rate %d\n", i, t.bit_rate);
+    printf("%c: Phase D: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%c: Phase D: pages transferred %d\n", i, t.pages_transferred);
+    printf("%c: Phase D: image size %d x %d\n", i, t.width, t.length);
+    printf("%c: Phase D: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%c: Phase D: bad rows %d\n", i, t.bad_rows);
+    printf("%c: Phase D: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%c: Phase D: coding method %s\n", i, t4_encoding_to_str(t.encoding));
+    printf("%c: Phase D: image size %d\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%c: Phase D: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%c: Phase D: remote ident '%s'\n", i, ident);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_e_handler(t30_state_t *s, void *user_data, int result)
+{
+    int i;
+    t30_stats_t t;
+    char ident[21];
+    
+    i = (int) (intptr_t) user_data;
+    printf("%c: Phase E handler on channel %d - (%d) %s\n", i, i, result, t30_completion_code_to_str(result));
+    t30_get_transfer_statistics(s, &t);
+    printf("%c: Phase E: bit rate %d\n", i, t.bit_rate);
+    printf("%c: Phase E: ECM %s\n", i, (t.error_correcting_mode)  ?  "on"  :  "off");
+    printf("%c: Phase E: pages transferred %d\n", i, t.pages_transferred);
+    printf("%c: Phase E: image size %d x %d\n", i, t.width, t.length);
+    printf("%c: Phase E: image resolution %d x %d\n", i, t.x_resolution, t.y_resolution);
+    printf("%c: Phase E: bad rows %d\n", i, t.bad_rows);
+    printf("%c: Phase E: longest bad row run %d\n", i, t.longest_bad_row_run);
+    printf("%c: Phase E: coding method %s\n", i, t4_encoding_to_str(t.encoding));
+    printf("%c: Phase E: image size %d bytes\n", i, t.image_size);
+    t30_get_local_ident(s, ident);
+    printf("%c: Phase E: local ident '%s'\n", i, ident);
+    t30_get_far_ident(s, ident);
+    printf("%c: Phase E: remote ident '%s'\n", i, ident);
+    succeeded[i - 'A'] = (result == T30_ERR_OK)  &&  (t.pages_transferred == 12);
+    done[i - 'A'] = TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int tx_packet_handler_a(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
+{
+    t38_gateway_state_t *t;
+
+    /* This routine queues messages between two instances of T.38 processing */
+    t = (t38_gateway_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Send seq %d, len %d, count %d\n", s->tx_seq_no, len, count);
+
+    ip_network_model_send(path_a_to_b, s->tx_seq_no, count, buf, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int tx_packet_handler_b(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
+{
+    t38_terminal_state_t *t;
+
+    /* This routine queues messages between two instances of T.38 processing */
+    t = (t38_terminal_state_t *) user_data;
+    span_log(&s->logging, SPAN_LOG_FLOW, "Send seq %d, len %d, count %d\n", s->tx_seq_no, len, count);
+
+    ip_network_model_send(path_b_to_a, s->tx_seq_no, count, buf, len);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int16_t t38_amp_b[SAMPLES_PER_CHUNK];
+    int16_t t30_amp_b[SAMPLES_PER_CHUNK];
+    int16_t out_amp[2*SAMPLES_PER_CHUNK];
+    int t38_len_b;
+    int t30_len_b;
+    int msg_len;
+    uint8_t msg[1024];
+    int log_audio;
+    int outframes;
+    AFfilesetup filesetup;
+    AFfilehandle wave_handle;
+    int t38_version;
+    int use_ecm;
+    const char *input_file_name;
+    int i;
+    int seq_no;
+
+    log_audio = FALSE;
+    t38_version = 1;
+    use_ecm = FALSE;
+    input_file_name = INPUT_FILE_NAME;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-e") == 0)
+        {
+            use_ecm = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-i") == 0)
+        {
+            i++;
+            input_file_name = argv[i];
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-v") == 0)
+        {
+            i++;
+            t38_version = atoi(argv[i]);
+            continue;
+        }
+    }
+
+    printf("Using T.38 version %d\n", t38_version);
+    if (use_ecm)
+        printf("Using ECM\n");
+
+    filesetup = AF_NULL_FILESETUP;
+    wave_handle = AF_NULL_FILEHANDLE;
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+
+        if ((wave_handle = afOpenFile(OUTPUT_FILE_NAME_WAVE, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_FILE_NAME_WAVE);
+            exit(2);
+        }
+    }
+
+    if ((path_a_to_b = ip_network_model_init(800, 2000, 0)) == NULL)
+    {
+        fprintf(stderr, "Failed to start IP network path model\n");
+        exit(2);
+    }
+    if ((path_b_to_a = ip_network_model_init(800, 2000, 0)) == NULL)
+    {
+        fprintf(stderr, "Failed to start IP network path model\n");
+        exit(2);
+    }
+
+    if (t38_terminal_init(&t38_state_a, TRUE, tx_packet_handler_a, &t38_state_b) == NULL)
+    {
+        fprintf(stderr, "Cannot start the T.38 channel\n");
+        exit(2);
+    }
+    t38_set_t38_version(&t38_state_a.t38, t38_version);
+    span_log_set_level(&t38_state_a.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.logging, "T.38-A");
+    span_log_set_level(&t38_state_a.t38.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.t38.logging, "T.38-A");
+    span_log_set_level(&t38_state_a.t30_state.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_a.t30_state.logging, "T.38-A");
+
+    t30_set_local_ident(&t38_state_a.t30_state, "11111111");
+    t30_set_tx_file(&t38_state_a.t30_state, input_file_name, -1, -1);
+    t30_set_phase_b_handler(&t38_state_a.t30_state, phase_b_handler, (void *) (intptr_t) 'A');
+    t30_set_phase_d_handler(&t38_state_a.t30_state, phase_d_handler, (void *) (intptr_t) 'A');
+    t30_set_phase_e_handler(&t38_state_a.t30_state, phase_e_handler, (void *) (intptr_t) 'A');
+    t30_set_ecm_capability(&t38_state_a.t30_state, use_ecm);
+    if (use_ecm)
+        t30_set_supported_compressions(&t38_state_a.t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION);
+
+    if (t38_gateway_init(&t38_state_b, tx_packet_handler_b, &t38_state_a) == NULL)
+    {
+        fprintf(stderr, "Cannot start the T.38 channel\n");
+        exit(2);
+    }
+    t38_set_t38_version(&t38_state_b.t38, t38_version);
+    t38_gateway_ecm_control(&t38_state_b, use_ecm);
+    span_log_set_level(&t38_state_b.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.logging, "T.38-B");
+    span_log_set_level(&t38_state_b.t38.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&t38_state_b.t38.logging, "T.38-B");
+    memset(t38_amp_b, 0, sizeof(t38_amp_b));
+
+    fax_init(&fax_state_b, FALSE);
+    t30_set_local_ident(&fax_state_b.t30_state, "22222222");
+    t30_set_rx_file(&fax_state_b.t30_state, OUTPUT_FILE_NAME, -1);
+    t30_set_phase_b_handler(&fax_state_b.t30_state, phase_b_handler, (void *) (intptr_t) 'B');
+    t30_set_phase_d_handler(&fax_state_b.t30_state, phase_d_handler, (void *) (intptr_t) 'B');
+    t30_set_phase_e_handler(&fax_state_b.t30_state, phase_e_handler, (void *) (intptr_t) 'B');
+    t30_set_ecm_capability(&fax_state_b.t30_state, use_ecm);
+    if (use_ecm)
+        t30_set_supported_compressions(&fax_state_b.t30_state, T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION | T30_SUPPORT_T6_COMPRESSION);
+    span_log_set_level(&fax_state_b.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&fax_state_b.logging, "FAX-B ");
+    span_log_set_level(&fax_state_b.t30_state.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME);
+    span_log_set_tag(&fax_state_b.t30_state.logging, "FAX-B ");
+    memset(t30_amp_b, 0, sizeof(t30_amp_b));
+
+    for (;;)
+    {
+        span_log_bump_samples(&t38_state_a.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_a.t38.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_a.t30_state.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&t38_state_b.t38.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&fax_state_b.logging, SAMPLES_PER_CHUNK);
+        span_log_bump_samples(&fax_state_b.t30_state.logging, SAMPLES_PER_CHUNK);
+        memset(out_amp, 0, sizeof(out_amp));
+
+        t38_terminal_send_timeout(&t38_state_a, SAMPLES_PER_CHUNK);
+
+        t30_len_b = fax_tx(&fax_state_b, t30_amp_b, SAMPLES_PER_CHUNK);
+        /* The receive side always expects a full block of samples, but the
+           transmit side may not be sending any when it doesn't need to. We
+           may need to pad with some silence. */
+        if (t30_len_b < SAMPLES_PER_CHUNK)
+        {
+            memset(t30_amp_b + t30_len_b, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t30_len_b));
+            t30_len_b = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (i = 0;  i < t30_len_b;  i++)
+                out_amp[2*i + 1] = t30_amp_b[i];
+        }
+        if (t38_gateway_rx(&t38_state_b, t30_amp_b, t30_len_b))
+            break;
+    
+        t38_len_b = t38_gateway_tx(&t38_state_b, t38_amp_b, SAMPLES_PER_CHUNK);
+        if (t38_len_b < SAMPLES_PER_CHUNK)
+        {
+            memset(t38_amp_b + t38_len_b, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - t38_len_b));
+            t38_len_b = SAMPLES_PER_CHUNK;
+        }
+        if (log_audio)
+        {
+            for (i = 0;  i < t38_len_b;  i++)
+                out_amp[2*i] = t38_amp_b[i];
+        }
+        if (fax_rx(&fax_state_b, t38_amp_b, SAMPLES_PER_CHUNK))
+            break;
+
+        while ((msg_len = ip_network_model_get(path_a_to_b, SAMPLES_PER_CHUNK, msg, 1024, &seq_no)) >= 0)
+            t38_core_rx_ifp_packet(&t38_state_b.t38, seq_no, msg, msg_len);
+        while ((msg_len = ip_network_model_get(path_b_to_a, SAMPLES_PER_CHUNK, msg, 1024, &seq_no)) >= 0)
+            t38_core_rx_ifp_packet(&t38_state_a.t38, seq_no, msg, msg_len);
+
+        if (log_audio)
+        {
+            outframes = afWriteFrames(wave_handle, AF_DEFAULT_TRACK, out_amp, SAMPLES_PER_CHUNK);
+            if (outframes != SAMPLES_PER_CHUNK)
+                break;
+        }
+
+        if (done[0]  &&  done[1])
+            break;
+    }
+    if (log_audio)
+    {
+        if (afCloseFile(wave_handle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME_WAVE);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    if (!succeeded[0]  ||  !succeeded[1])
+    {
+        printf("Tests failed\n");
+        exit(2);
+    }
+    printf("Tests passed\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/t4_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,278 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * t4_tests.c - ITU T.4 FAX image to and from TIFF file tests
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: t4_tests.c,v 1.34 2006/11/23 15:48:09 steveu Exp $
+ */
+
+/*! \file */
+
+/*! \page t4_tests_page T.4 tests
+\section t4_tests_page_sec_1 What does it do
+These tests exercise the image compression and decompression methods defined
+in ITU specifications T.4 and T.6.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <fcntl.h>
+#include <memory.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define IN_FILE_NAME    "../itutests/fax/itutests.tif"
+#define OUT_FILE_NAME   "t4_tests_receive.tif"
+
+#define XSIZE           1728
+
+t4_state_t send_state;
+t4_state_t receive_state;
+
+int main(int argc, char* argv[])
+{
+    int sends;
+    int page_no;
+    int bit;
+    int end_of_page;
+    int end_marks;
+    int i;
+    int decode_test;
+    int compression;
+    int compression_step;
+    int add_page_headers;
+    int min_row_bits;
+    int restart_pages;
+    char buf[512];
+    t4_stats_t stats;
+    const char *in_file_name;
+
+    i = 1;
+    decode_test = FALSE;
+    compression = -1;
+    add_page_headers = FALSE;
+    restart_pages = FALSE;
+    in_file_name = IN_FILE_NAME;
+    min_row_bits = 0;
+    while (i < argc)
+    {
+        if (strcmp(argv[i], "-d") == 0)
+            decode_test = TRUE;
+        else if (strcmp(argv[i], "-1") == 0)
+            compression = T4_COMPRESSION_ITU_T4_1D;
+        else if (strcmp(argv[i], "-2") == 0)
+            compression = T4_COMPRESSION_ITU_T4_2D;
+        else if (strcmp(argv[i], "-6") == 0)
+            compression = T4_COMPRESSION_ITU_T6;
+        else if (strcmp(argv[i], "-h") == 0)
+            add_page_headers = TRUE;
+        else if (strcmp(argv[i], "-r") == 0)
+            restart_pages = TRUE;
+        else if (strcmp(argv[i], "-i") == 0)
+            in_file_name = argv[++i];
+        else if (strcmp(argv[i], "-m") == 0)
+            min_row_bits = atoi(argv[++i]);
+        i++;
+    }
+    /* Create a send and a receive end */
+    memset(&send_state, 0, sizeof(send_state));
+    memset(&receive_state, 0, sizeof(receive_state));
+
+    if (decode_test)
+    {
+        if (compression < 0)
+            compression = T4_COMPRESSION_ITU_T4_1D;
+        /* Receive end puts TIFF to a new file. We assume the receive width here. */
+        if (t4_rx_init(&receive_state, OUT_FILE_NAME, T4_COMPRESSION_ITU_T4_2D))
+        {
+            printf("Failed to init\n");
+            exit(2);
+        }
+        
+        t4_rx_set_rx_encoding(&receive_state, compression);
+        t4_rx_set_x_resolution(&receive_state, T4_X_RESOLUTION_R8);
+        t4_rx_set_y_resolution(&receive_state, T4_Y_RESOLUTION_FINE);
+        t4_rx_set_image_width(&receive_state, XSIZE);
+
+        page_no = 1;
+        t4_rx_start_page(&receive_state);
+        while (fgets(buf, 511, stdin))
+        {
+            if (sscanf(buf, "Rx bit %*d - %d", &bit) == 1)
+            {
+                if ((end_of_page = t4_rx_put_bit(&receive_state, bit)))
+                {
+                    printf("End of page detected\n");
+                    break;
+                }
+            }
+        }
+#if 0
+        /* Dump the entire image as text 'X's and spaces */
+        s = receive_state.image_buffer;
+        for (i = 0;  i < receive_state.rows;  i++)
+        {
+            for (j = 0;  j < receive_state.bytes_per_row;  j++)
+            {
+                for (k = 0;  k < 8;  k++)
+                {
+                    printf((receive_state.image_buffer[i*receive_state.bytes_per_row + j] & (0x80 >> k))  ?  "X"  :  " ");
+                }
+            }
+            printf("\n");
+        }
+#endif
+        t4_rx_end_page(&receive_state);
+        t4_get_transfer_statistics(&receive_state, &stats);
+        printf("Pages = %d\n", stats.pages_transferred);
+        printf("Image size = %d x %d\n", stats.width, stats.length);
+        printf("Image resolution = %d x %d\n", stats.x_resolution, stats.y_resolution);
+        printf("Bad rows = %d\n", stats.bad_rows);
+        printf("Longest bad row run = %d\n", stats.longest_bad_row_run);
+        t4_rx_end(&receive_state);
+    }
+    else
+    {
+        /* Send end gets TIFF from a file */
+        if (t4_tx_init(&send_state, in_file_name, -1, -1))
+        {
+            printf("Failed to init TIFF send\n");
+            exit(2);
+        }
+
+        /* Receive end puts TIFF to a new file. */
+        if (t4_rx_init(&receive_state, OUT_FILE_NAME, T4_COMPRESSION_ITU_T4_2D))
+        {
+            printf("Failed to init\n");
+            exit(2);
+        }
+    
+        t4_tx_set_min_row_bits(&send_state, min_row_bits);
+
+        t4_rx_set_x_resolution(&receive_state, t4_tx_get_x_resolution(&send_state));
+        t4_rx_set_y_resolution(&receive_state, t4_tx_get_y_resolution(&send_state));
+        t4_rx_set_image_width(&receive_state, t4_tx_get_image_width(&send_state));
+
+        /* Now send and receive all the pages in the source TIFF file */
+        page_no = 1;
+        t4_tx_set_local_ident(&send_state, "852 2666 0542");
+        sends = 0;
+        /* Select whether we step round the compression schemes, or use a single specified one. */
+        compression_step = (compression < 0)  ?  0  :  -1;
+        for (;;)
+        {
+            end_marks = 0;
+            /* Add a header line to alternate pages, if required */
+            if (add_page_headers  &&  (sends & 2))
+                t4_tx_set_header_info(&send_state, "Header");
+            else
+                t4_tx_set_header_info(&send_state, NULL);
+            if (restart_pages  &&  (sends & 1))
+            {
+                /* Use restart, to send the page a second time */
+                if (t4_tx_restart_page(&send_state))
+                    break;
+            }
+            else
+            {
+                switch (compression_step)
+                {
+                case 0:
+                    compression = T4_COMPRESSION_ITU_T4_1D;
+                    compression_step++;
+                    break;
+                case 1:
+                    compression = T4_COMPRESSION_ITU_T4_2D;
+                    compression_step++;
+                    break;
+                case 2:
+                    compression = T4_COMPRESSION_ITU_T6;
+                    compression_step = 0;
+                    break;
+                }
+                t4_tx_set_tx_encoding(&send_state, compression);
+                t4_rx_set_rx_encoding(&receive_state, compression);
+
+                if (t4_tx_start_page(&send_state))
+                    break;
+            }
+            t4_rx_start_page(&receive_state);
+            do
+            {
+                bit = t4_tx_get_bit(&send_state);
+#if 0
+                if (--next_hit <= 0)
+                {
+                    do
+                        next_hit = rand() & 0x3FF;
+                    while (next_hit < 20);
+                    bit ^= (rand() & 1);
+                }
+#endif
+                if (bit == PUTBIT_END_OF_DATA)
+                {
+                    /* T.6 data does not contain an image termination sequence.
+                       T.4 1D and 2D do, and should locate that sequence. */
+                    if (compression == T4_COMPRESSION_ITU_T6)
+                        break;
+                    if (++end_marks > 50)
+                    {
+                        printf("Receiver missed the end of page mark\n");
+                        exit(2);
+                    }
+                }
+                end_of_page = t4_rx_put_bit(&receive_state, bit & 1);
+            }
+            while (!end_of_page);
+            t4_get_transfer_statistics(&receive_state, &stats);
+            printf("Pages = %d\n", stats.pages_transferred);
+            printf("Image size = %d x %d\n", stats.width, stats.length);
+            printf("Image resolution = %d x %d\n", stats.x_resolution, stats.y_resolution);
+            printf("Bad rows = %d\n", stats.bad_rows);
+            printf("Longest bad row run = %d\n", stats.longest_bad_row_run);
+            if (!restart_pages  ||  (sends & 1))
+                t4_tx_end_page(&send_state);
+            t4_rx_end_page(&receive_state);
+            sends++;
+        }
+        /* And we should now have a matching received TIFF file. Note this will only match
+           at the image level. TIFF files allow a lot of ways to express the same thing,
+           so bit matching of the files is not the normal case. */
+        t4_tx_end(&send_state);
+        t4_rx_end(&receive_state);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/test_utils.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,135 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * test_utils.c - Utility routines for module tests.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: test_utils.c,v 1.7 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \file */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+#include "test_utils.h"
+
+struct codec_munge_state_s
+{
+    int munging_codec;
+    g726_state_t g726_enc_state;
+    g726_state_t g726_dec_state;
+};
+
+codec_munge_state_t *codec_munge_init(int codec)
+{
+    codec_munge_state_t *s;
+    
+    if ((s = (codec_munge_state_t *) malloc(sizeof(*s))))
+    {
+        switch (codec)
+        {
+        case MUNGE_CODEC_G726_40K:
+            g726_init(&s->g726_enc_state, 40000, G726_ENCODING_LINEAR, G726_PACKING_NONE);
+            g726_init(&s->g726_dec_state, 40000, G726_ENCODING_LINEAR, G726_PACKING_NONE);
+            s->munging_codec = MUNGE_CODEC_G726_32K;
+            break;
+        case MUNGE_CODEC_G726_32K:
+            g726_init(&s->g726_enc_state, 32000, G726_ENCODING_LINEAR, G726_PACKING_NONE);
+            g726_init(&s->g726_dec_state, 32000, G726_ENCODING_LINEAR, G726_PACKING_NONE);
+            s->munging_codec = MUNGE_CODEC_G726_32K;
+            break;
+        case MUNGE_CODEC_G726_24K:
+            g726_init(&s->g726_enc_state, 24000, G726_ENCODING_LINEAR, G726_PACKING_NONE);
+            g726_init(&s->g726_dec_state, 24000, G726_ENCODING_LINEAR, G726_PACKING_NONE);
+            s->munging_codec = MUNGE_CODEC_G726_32K;
+            break;
+        case MUNGE_CODEC_G726_16K:
+            g726_init(&s->g726_enc_state, 16000, G726_ENCODING_LINEAR, G726_PACKING_NONE);
+            g726_init(&s->g726_dec_state, 16000, G726_ENCODING_LINEAR, G726_PACKING_NONE);
+            s->munging_codec = MUNGE_CODEC_G726_32K;
+            break;
+        default:
+            s->munging_codec = codec;
+            break;
+        }
+    }
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+void codec_munge(codec_munge_state_t *s, int16_t amp[], int len)
+{
+    uint8_t law;
+    uint8_t adpcmdata[160];
+    int i;
+    int adpcm;
+    int x;
+
+    switch (s->munging_codec)
+    {
+    case MUNGE_CODEC_NONE:
+        /* Do nothing */
+        break;
+    case MUNGE_CODEC_ALAW:
+        for (i = 0;  i < len;  i++)
+        {
+            law = linear_to_alaw(amp[i]);
+            amp[i] = alaw_to_linear(law);
+        }
+        break;
+    case MUNGE_CODEC_ULAW:
+        for (i = 0;  i < len;  i++)
+        {
+            law = linear_to_ulaw(amp[i]);
+            amp[i] = ulaw_to_linear(law);
+        }
+        break;
+    case MUNGE_CODEC_G726_32K:
+        /* This could actually be any of the G.726 rates */
+        for (i = 0;  i < len;  i += x)
+        {
+            x = (len - i >= 160)  ?  160  :  (len - i);
+            adpcm = g726_encode(&s->g726_enc_state, adpcmdata, amp + i, x);
+            g726_decode(&s->g726_dec_state, amp + i, adpcmdata, adpcm);
+        }
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/test_utils.h	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,59 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * test_utils.h - Utility routines for module tests.
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: test_utils.h,v 1.6 2006/10/24 13:45:29 steveu Exp $
+ */
+
+/*! \file */
+
+#if !defined(_TEST_UTILS_H_)
+#define _TEST_UTILS_H_
+
+enum
+{
+    MUNGE_CODEC_NONE = 0,
+    MUNGE_CODEC_ALAW,
+    MUNGE_CODEC_ULAW,
+    MUNGE_CODEC_G726_40K,
+    MUNGE_CODEC_G726_32K,
+    MUNGE_CODEC_G726_24K,
+    MUNGE_CODEC_G726_16K,
+};
+
+typedef struct codec_munge_state_s codec_munge_state_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+codec_munge_state_t *codec_munge_init(int codec);
+
+void codec_munge(codec_munge_state_t *s, int16_t amp[], int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/testadsi.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,686 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * testadsi.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: testadsi.c,v 1.18 2006/10/24 13:45:29 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <sys/signal.h>
+#include <sys/select.h>
+#include <sys/wait.h>
+#include <sys/resource.h>
+#include <sys/time.h>
+
+#if defined(HAVE_LIBUNICALL)
+
+#include <linux/zaptel.h>
+#include <pthread.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "unicall.h"
+//#include "../libmfcr2/libmfcr2.h"
+//#include "../libpri/libpri.h"
+
+#include "spandsp.h"
+
+#define FALSE 0
+#define TRUE (!FALSE)
+
+int caller_mode = FALSE;
+static AFfilehandle rxhandle;
+static AFfilehandle txhandle;
+
+#if 0
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg)
+{
+    int len;
+
+    len = adsi_add_field(s, msg, -1, CLASS_SDMF_CALLERID, 0);
+    len = adsi_add_field(s, msg, len, 0, "10011750", 8);
+    len = adsi_add_field(s, msg, len, 0, "6095551212", 10);
+    return len;
+}
+#endif
+#if 0
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg)
+{
+    int len;
+
+    len = adsi_add_field(s, msg, -1, CLIP_MDMF_CALLERID, 0);
+    len = adsi_add_field(s, msg, len, CLIP_CALLTYPE, "\x81", 1);
+    len = adsi_add_field(s, msg, len, CLIP_DATETIME, "10011750", 8);
+    len = adsi_add_field(s, msg, len, CLIP_CALLER_NUMBER, "12345678", 8);
+    len = adsi_add_field(s, msg, len, CLIP_DIALED_NUMBER, "87654321", 8);
+    len = adsi_add_field(s, msg, len, CLIP_CALLER_NAME, "Steve Underwood", 15);
+    return len;
+}
+#endif
+#if 0
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg)
+{
+    int len;
+
+    len = adsi_add_field(s, msg, -1, CLIP_MDMF_CALLERID, 0);
+    len = adsi_add_field(s, msg, len, CLIP_NUM_MSG, "\x03", 1);
+    return len;
+}
+#endif
+#if 0
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg)
+{
+    int len;
+
+    len = adsi_add_field(s, msg, -1, CLIP_MDMF_MSG_WAITING, NULL, 0);
+    len = adsi_add_field(s, msg, len, CLIP_VISUAL_INDICATOR, "\x00", 1);
+    return len;
+}
+#endif
+#if 0
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg)
+{
+    int len;
+
+    len = adsi_add_field(s, msg, -1, CLIP_MDMF_MSG_WAITING, NULL, 0);
+    len = adsi_add_field(s, msg, len, CLIP_VISUAL_INDICATOR, "\xFF", 1);
+    len = adsi_add_field(s, msg, len, CLIP_NUM_MSG, "\x05", 1);
+    return len;
+}
+#endif
+#if 1
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg)
+{
+    int len;
+
+    len = adsi_add_field(s, msg, -1, CLASS_SDMF_MSG_WAITING, NULL, 0);
+    len = adsi_add_field(s, msg, len, 0, "\x6F", 1);
+    len = adsi_add_field(s, msg, len, 0, "\x6F", 1);
+    len = adsi_add_field(s, msg, len, 0, "\x6F", 1);
+    return len;
+}
+#endif
+#if 0
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg)
+{
+    int len;
+
+    len = adsi_add_field(s, msg, -1, CLASS_SDMF_MSG_WAITING, NULL, 0);
+    len = adsi_add_field(s, msg, len, 0, "\x42", 1);
+    len = adsi_add_field(s, msg, len, 0, "\x42", 1);
+    len = adsi_add_field(s, msg, len, 0, "\x42", 1);
+    return len;
+}
+#endif
+#if 0
+int adsi_create_message(adsi_tx_state_t *s, uint8_t *msg)
+{
+    int len;
+
+    len = adsi_add_field(s, msg, -1, CLIP_MDMF_SMS, NULL, 0);
+    len = adsi_add_field(s, msg, len, CLIP_DISPLAY_INFO, "\x00ABC", 4);
+    return len;
+}
+#endif
+
+struct
+{
+    pthread_t thread;
+    int chan;
+    int sig_fd;
+    int fd;
+    uc_call_t *call;
+    uc_crn_t crn;
+    int xxx;
+    int cause;
+
+    dtmf_rx_state_t dtmf_state;
+    char dtmf[101];
+    int dtmf_ptr;
+    
+    char *tag;
+    
+    char originating_number[32];
+    char destination_number[32];
+    
+    adsi_rx_state_t adsi_rx;
+    adsi_tx_state_t adsi_tx;
+} chan_stuff[30];
+
+tone_gen_descriptor_t tone_desc;
+tone_gen_state_t gen;
+
+void channel_read_adsi_channel(uc_t *uc, int chan, void *user_data, uint8_t *buf, int len);
+int channel_write_adsi_channel(uc_t *uc, int chan, void *user_data, uint8_t *buf, int max_len);
+int channel_error(uc_t *uc, int chan, void *user_data, int cause);
+int signaling_error(uc_t *uc, void *user_data, int cause);
+
+void channel_read_adsi_channel(uc_t *uc, int chan, void *user_data, uint8_t *buf, int len)
+{
+    int i;
+    int xlen;
+    int16_t pcm_buf[1024];
+    char *s;
+    int outframes;
+    
+    for (i = 0;  i < len;  i++)
+        pcm_buf[i] = alaw_to_linear(buf[i]);
+    /*endfor*/
+    outframes = afWriteFrames(rxhandle,
+                              AF_DEFAULT_TRACK,
+                              pcm_buf,
+                              len);
+    if (outframes != len)
+    {
+        printf("Failed to write %d samples\n", len);
+        exit(2);
+    }
+    
+    dtmf_rx(&chan_stuff[chan].dtmf_state, pcm_buf, len);
+    xlen = dtmf_rx_get(&chan_stuff[chan].dtmf_state,
+                       chan_stuff[chan].dtmf + chan_stuff[chan].dtmf_ptr,
+                       100 - chan_stuff[chan].dtmf_ptr);
+    if (xlen > 0)
+    {
+        s = chan_stuff[chan].dtmf + chan_stuff[chan].dtmf_ptr;
+        while (*s)
+        {
+            if (*s == '#')
+            {
+                uc_set_channel_read_callback(uc, 0, NULL, 0);
+                uc_set_channel_write_callback(uc, 0, NULL, 0);
+                if (uc_call_control(uc, UC_OP_DROPCALL, chan_stuff[chan].crn, (void *) UC_CAUSE_NORMAL_CLEARING))
+                    printf ("A Drop Call failed\n");
+                /*endif*/
+                break;
+            }
+            /*endif*/
+            s++;
+        }
+        /*endwhile*/
+        printf("Got '%s'\n", chan_stuff[chan].dtmf);
+        chan_stuff[chan].dtmf_ptr += xlen;
+    }
+    /*endif*/
+    adsi_rx(&(chan_stuff[chan].adsi_rx), pcm_buf, len);
+}
+/*- End of function --------------------------------------------------------*/
+
+int channel_write_adsi_channel(uc_t *uc, int chan, void *user_data, uint8_t *buf, int max_len)
+{
+    int16_t pcm_buf[1024];
+    int len;
+    int i;
+    static int block = 0;
+    uint8_t adsi_msg[256];
+    int adsi_msg_len;
+
+    if (++block == 100)
+    {
+        adsi_send_alert_tone(&(chan_stuff[chan].adsi_tx));
+        printf("Alert tone sent\n");
+        adsi_msg_len = adsi_create_message(&(chan_stuff[chan].adsi_tx), adsi_msg);
+        if ((len = adsi_put_message(&(chan_stuff[chan].adsi_tx), adsi_msg, adsi_msg_len)) > 0)
+            printf("Message put - %d bytes\n", len);
+    }
+    len = adsi_tx(&(chan_stuff[chan].adsi_tx), pcm_buf, max_len);
+    afWriteFrames(txhandle,
+                  AF_DEFAULT_TRACK,
+                  pcm_buf,
+                  len);
+    for (i = 0;  i < len;  i++)
+        buf[i] = linear_to_alaw(pcm_buf[i]);
+    /*endfor*/
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int channel_error(uc_t *uc, int chan, void *user_data, int cause)
+{
+    printf("Error %d\n", cause);
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int signaling_error(uc_t *uc, void *user_data, int cause)
+{
+    printf("Error %d\n", cause);
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void initiate_call(uc_t *uc, int chan, uc_event_t *e)
+{
+    uc_makecall_t makecall;
+    uc_callparms_t *callparms;
+    int ret;
+
+    printf ("Initiating call\n");
+    if ((callparms = uc_new_callparms(NULL)) == NULL)
+        return;
+    /*endif*/
+    uc_callparm_originating_number(callparms, chan_stuff[chan].originating_number);
+    uc_callparm_destination_number(callparms, chan_stuff[chan].destination_number);
+    makecall.callparms = callparms;
+    makecall.crn = 0;
+    if (ret = uc_call_control(uc, UC_OP_MAKECALL, 0, (void *) &makecall) != UC_RET_OK)
+        fprintf(stderr, "Make Call failed - %d\n", ret);
+    /*endif*/
+    chan_stuff[chan].crn = makecall.crn;
+    free(callparms);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void handle_uc_event(uc_t *uc, void *user_data, uc_event_t *e)
+{
+    int chan;
+    
+    chan = (int) user_data;
+    printf ("-- %s (%d)\n", uc_event2str(e->e), chan);
+    switch (e->e)
+    {
+    case UC_EVENT_DEVICEFAIL:
+        break;
+    case UC_EVENT_PROTOCOLFAIL:
+        printf("-- Protocol failure on channel %d, cause %d\n", e->gen.channel, e->gen.data);
+        break;
+    case UC_EVENT_SIGCHANSTATUS:
+        printf("-- Signalling channel status - %s\n", e->sigchanstatus.ok  ?  "Up"  :  "Down");
+        break;
+    case UC_EVENT_ALARM:
+        printf("-- Alarm - 0x%X 0x%X\n", e->alarm.raised, e->alarm.cleared);
+        break;
+    case UC_EVENT_FARBLOCKED:
+        printf("-- Channel far end blocked! :-(\n");
+        chan_stuff[chan].xxx &= ~1;
+        break;
+    case UC_EVENT_FARUNBLOCKED:
+        printf("-- Channel far end unblocked! :-)\n");
+        chan_stuff[chan].xxx |= 1;
+        if (chan_stuff[chan].xxx == 3)
+        {
+            if (caller_mode)
+                initiate_call(uc, chan, e);
+            /*endif*/
+        }
+        /*endif*/
+        break;
+    case UC_EVENT_LOCALBLOCKED:
+        printf("-- Channel local end blocked! :-(\n");
+        chan_stuff[chan].xxx &= ~2;
+        break;
+    case UC_EVENT_LOCALUNBLOCKED:
+        printf("-- Channel local end unblocked! :-)\n");
+        chan_stuff[chan].xxx |= 2;
+        if (chan_stuff[chan].xxx == 3)
+        {
+            if (caller_mode)
+                initiate_call(uc, chan, e);
+            /*endif*/
+        }
+        /*endif*/
+        break;
+    case UC_EVENT_DIALING:
+        printf("-- Dialing on channel %d\n", e->gen.channel);
+        break;
+    case UC_EVENT_ACCEPTED:
+        printf("-- Accepted on channel %d\n", e->gen.channel);
+        if (uc_call_control(uc, UC_OP_ANSWERCALL, e->gen.crn, (void *) -1))
+            fprintf(stderr, "Answer Call failed\n");
+        /*endif*/
+        break;
+    case UC_EVENT_DETECTED:
+        printf("-- Detected on channel %d\n", e->gen.channel);
+        break;
+    case UC_EVENT_ALERTING:
+        printf("-- Alerting on channel %d\n", e->gen.channel);
+        /* This is just a notification of call progress. We need take no action at this point. */
+        break;
+    case UC_EVENT_FARDISCONNECTED:
+        printf("-- Far end disconnected on channel %d\n", e->fardisconnected.channel);
+        /* Kill any outstanding audio processing */
+        uc_set_channel_read_callback(uc, 0, NULL, 0);
+        uc_set_channel_write_callback(uc, 0, NULL, 0);
+        if (uc_call_control(uc, UC_OP_DROPCALL, e->fardisconnected.crn, (void *) UC_CAUSE_NORMAL_CLEARING))
+            fprintf(stderr, "C Drop Call failed\n");
+        /*endif*/
+        break;
+    case UC_EVENT_DROPCALL:
+        printf("-- Drop call on channel %d\n", e->gen.channel);
+        if (uc_call_control(uc, UC_OP_RELEASECALL, e->gen.crn, NULL))
+            fprintf(stderr, "uc_ReleaseCall failed\n");
+        /*endif*/
+        break;
+    case UC_EVENT_RELEASECALL:
+        printf("-- Released on channel %d\n", e->gen.channel);
+        if (caller_mode)
+            initiate_call(uc, chan, e);
+        /*endif*/
+        break;
+    case UC_EVENT_OFFERED:
+        printf("-- Offered on channel %d, CRN %d (ANI: %s, DNIS: %s)\n", e->offered.channel, e->offered.crn, e->offered.parms.originating_number, e->offered.parms.destination_number);
+        if (!caller_mode)
+        {
+            switch (chan_stuff[chan].cause)
+            {
+            case 0:
+                if (uc_call_control(uc, UC_OP_ACCEPTCALL, e->offered.crn, (void *) -1))
+                    fprintf(stderr, "uc_AcceptCall failed\n");
+                /*endif*/
+                break;
+            case 1:
+                if (uc_call_control(uc, UC_OP_ANSWERCALL, e->offered.crn, (void *) -1))
+                    fprintf(stderr, "uc_AnswerCall failed\n");
+                /*endif*/
+                break;
+            case 2:
+                if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_USER_BUSY))
+                    fprintf(stderr, "E Drop Call failed\n");
+                /*endif*/
+                break;
+            case 3:
+                if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_UNASSIGNED_NUMBER))
+                    fprintf(stderr, "F Drop Call failed\n");
+                /*endif*/
+                break;
+            case 4:
+                if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_NETWORK_CONGESTION))
+                    fprintf(stderr, "G Drop Call failed\n");
+                /*endif*/
+                break;
+            case 5:
+                if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_DEST_OUT_OF_ORDER))
+                    fprintf(stderr, "H Drop Call failed\n");
+                /*endif*/
+                break;
+            }
+            /*endswitch*/
+            if (++chan_stuff[chan].cause > 5)
+                chan_stuff[chan].cause = 0;
+            /*endif*/
+        }
+        /*endif*/
+        break;
+    case UC_EVENT_ANSWERED:
+        printf("-- Answered on channel %d\n", e->gen.channel);
+        uc_set_channel_read_callback(uc, 0, channel_read_adsi_channel, (void *) chan);
+printf("XXX read callback set\n");
+        uc_set_channel_write_callback(uc, 0, channel_write_adsi_channel, (void *) chan);
+printf("XXX write callback set\n");
+        adsi_tx_init(&(chan_stuff[chan].adsi_tx), ADSI_STANDARD_CLASS);
+printf("XXX ADSI inited\n");
+        dtmf_rx_init(&chan_stuff[chan].dtmf_state, NULL, NULL);
+printf("XXX DTMF inited\n");
+        break;
+    case UC_EVENT_CONNECTED:
+        printf("-- Connected on channel %d\n", e->gen.channel);
+        if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_NORMAL_CLEARING))
+            printf ("I Drop Call failed\n");
+        /*endif*/
+        break;
+    default:
+        fprintf(stderr, "--!! Unknown signaling event %d\n", e->e);
+        break;
+    }
+    /*endswitch*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void *run_uc(void *arg)
+{
+    uc_t *uc;
+    uc_event_t *e;
+    struct timeval tv = {0,0};
+    struct timeval *next;
+    fd_set rfds;
+    fd_set wfds;
+    fd_set efds;
+    int res;
+    int dfd;
+    int chan;
+    
+    chan = *((int *) arg);
+
+    dfd = chan_stuff[chan].fd;
+    uc = uc_new(dfd, dfd, "mfcr2", "cn", UC_MODE_CPE, 1);
+    //uc = uc_new(dfd, dfd, "pri", "ctr4", UC_MODE_CPE, 1);
+    if (uc == NULL)
+    {
+        fprintf(stderr, "Unable to create instance\n");
+        return NULL;
+    }
+    /*endif*/
+    uc_set_signaling_callback(uc, handle_uc_event, (void *) chan);
+    uc_set_signaling_error_callback(uc, signaling_error, (void *) chan);
+    uc_set_channel_error_callback(uc, 0, channel_error, (void *) chan);
+    uc_set_logging(uc, 0x7FFFFFFF, 0, chan_stuff[chan].tag);
+    uc_call_control(uc, UC_OP_UNBLOCK, 0, (void *) -1);
+    for (;;)
+    {
+        FD_ZERO(&rfds);
+        FD_ZERO(&wfds);
+        FD_ZERO(&efds);
+        FD_SET(dfd, &rfds);
+        FD_SET(dfd, &wfds);
+        FD_SET(dfd, &efds);
+
+        if ((next = uc_schedule_next(uc)))
+        {
+            gettimeofday(&tv, NULL);
+            tv.tv_sec = next->tv_sec - tv.tv_sec;
+            tv.tv_usec = next->tv_usec - tv.tv_usec;
+            if (tv.tv_usec < 0)
+            {
+                tv.tv_usec += 1000000;
+                tv.tv_sec -= 1;
+            }
+            /*endif*/
+            if (tv.tv_sec < 0)
+            {
+                tv.tv_sec = 0;
+                tv.tv_usec = 0;
+            }
+            /*endif*/
+        }
+        /*endif*/
+        res = select(dfd + 1, &rfds, NULL, &efds, next  ?  &tv  :  NULL);
+        e = NULL;
+        if (res == 0)
+        {
+            uc_schedule_run(uc);
+        }
+        else if (res > 0)
+        {
+            e = uc_check_event(uc);
+        }
+        else if (errno != EINTR)
+        {
+            fprintf(stderr, "Error (%d) on select: %s\n", errno, strerror(errno));
+        }
+        /*endif*/
+
+        if (e)
+        {
+            printf("Non-callback signaling event\n");
+            handle_uc_event(uc, (void *) chan, e);
+        }
+        /*endif*/
+    }
+    /*endfor*/
+    return NULL;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[]) 
+{
+    pthread_attr_t attr;
+    struct zt_bufferinfo b;
+    struct zt_gains g;
+    int chan;
+    int chanx;
+    char dev_name[20];
+    AFfilesetup filesetup;
+    int j;
+
+    filesetup = afNewFileSetup();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+    rxhandle = afOpenFile("rxadsi.wav", "w", filesetup);
+    if (rxhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open adsi audio file\n");
+        exit(2);
+    }
+    txhandle = afOpenFile("txadsi.wav", "w", filesetup);
+    if (txhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open adsi audio file\n");
+        exit(2);
+    }
+
+    uc_start();    
+    pthread_attr_init(&attr);
+    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+    if (argc < 1)
+    {
+        fprintf(stderr, "Usage: testcall [call]\n");
+        exit(1);
+    }
+    /*endif*/
+    for (chan = 0;  chan < 1/*30*/;  chan++)
+    {
+        chan_stuff[chan].sig_fd = open("/dev/zap/channel", O_RDWR | O_NONBLOCK);
+        if (chan_stuff[chan].sig_fd < 0)
+        {
+            fprintf(stderr, "Failed to open channel: %s\n", strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        chan_stuff[chan].fd = chan_stuff[chan].sig_fd;
+        
+        /* Allow for the missing channel at TS16 */
+        if (chan < 15)
+            chanx = chan + 1;
+        else
+            chanx = chan + 2;
+        /*endif*/
+        if (ioctl(chan_stuff[chan].fd, ZT_SPECIFY, &chanx))
+        {
+            fprintf(stderr, "Failed to specify channel %d: %s\n", chanx, strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        if (ioctl(chan_stuff[chan].fd, ZT_GET_BUFINFO, &b))
+        {
+            fprintf(stderr, "Unable to get buffer info on channel %d: %s\n", chanx, strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        printf ("%d %d %d %d %d %d\n",
+                b.rxbufpolicy,
+                b.txbufpolicy,
+                b.numbufs,
+                b.bufsize,
+                b.readbufs,
+                b.writebufs);
+        b.rxbufpolicy = ZT_POLICY_IMMEDIATE;
+        b.txbufpolicy = ZT_POLICY_IMMEDIATE;
+        b.numbufs = 4;
+        b.bufsize = 160;
+        if (ioctl(chan_stuff[chan].fd, ZT_SET_BUFINFO, &b))
+        {
+            fprintf(stderr, "Unable to set buffer info on channel %d: %s\n", chanx, strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        if (ioctl(chan_stuff[chan].fd, ZT_GET_BUFINFO, &b))
+        {
+            fprintf(stderr, "Unable to get buffer info on channel %d: %s\n", chanx, strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        for (j = 0;  j < 256;  j++)
+        {
+            g.rxgain[j] = j;
+            g.txgain[j] = j;
+        }
+        ioctl(chan_stuff[chan].fd, ZT_SETGAINS, &g);
+        printf("%d %d %d %d %d %d\n",
+               b.rxbufpolicy,
+               b.txbufpolicy,
+               b.numbufs,
+               b.bufsize,
+               b.readbufs,
+               b.writebufs);
+
+        if (argc > 1)
+            caller_mode = TRUE;
+        /*endif*/
+        chan_stuff[chan].chan = chan;
+        sprintf(dev_name, "Chan %2d:", chanx);
+        chan_stuff[chan].tag = strdup(dev_name);
+        sprintf(chan_stuff[chan].originating_number, "%d", 987654321 + chan);
+        sprintf(chan_stuff[chan].destination_number, "%d", 1234 + chan);
+        
+        printf("Thread for channel %d\n", chan);
+        if (pthread_create(&chan_stuff[chan].thread, &attr, run_uc, &chan_stuff[chan].chan))
+            exit(2);
+        /*endif*/
+    }
+    /*endfor*/
+    for (;;)
+    {
+        sleep(5);
+        printf("Main thread\n");
+    }
+    /*endfor*/
+    exit(0);
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+#else
+int main(int argc, char *argv[]) 
+{
+    printf("This program was not built with Unicall available\n"); 
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/testfax.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,652 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * testfax.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: testfax.c,v 1.28 2006/10/24 13:45:29 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <sys/signal.h>
+#include <sys/select.h>
+#include <sys/wait.h>
+#include <sys/resource.h>
+#include <sys/time.h>
+
+#if defined(HAVE_LIBUNICALL)
+
+#include <linux/zaptel.h>
+#include <pthread.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "unicall.h"
+//#include "../libmfcr2/libmfcr2.h"
+//#include "../libpri/libpri.h"
+//#include "../libpri/libfx.h"
+
+#include "spandsp.h"
+
+int caller_mode = FALSE;
+static AFfilehandle rxhandle;
+static AFfilehandle txhandle;
+
+typedef struct
+{
+    pthread_t thread;
+    int chan;
+    int sig_fd;
+    int fd;
+    uc_call_t *call;
+    uc_crn_t crn;
+    int xxx;
+    int cause;
+    uc_t *uc;
+
+    dtmf_rx_state_t dtmf_state;
+    char dtmf[101];
+    int dtmf_ptr;
+    
+    char *tag;
+    
+    char originating_number[32];
+    char destination_number[32];
+
+    t30_state_t fax;
+} chan_stuff_t;
+
+chan_stuff_t chan_stuff[30];
+
+tone_gen_descriptor_t tone_desc;
+tone_gen_state_t gen;
+
+pthread_mutex_t mutex;
+
+void channel_read_fax_channel(uc_t *uc, int chan, void *user_data, uint8_t *buf, int len);
+int channel_write_fax_channel(uc_t *uc, int chan, void *user_data, uint8_t *buf, int max_len);
+int channel_error(uc_t *uc, int chan, void *user_data, int cause);
+int signaling_error(uc_t *uc, void *user_data, int cause);
+
+void channel_read_fax_channel(uc_t *uc, int chan, void *user_data, uint8_t *buf, int len)
+{
+    int i;
+    int xlen;
+    char *s;
+    int outframes;
+
+#if 0
+    outframes = afWriteFrames(rxhandle,
+                              AF_DEFAULT_TRACK,
+                              buf,
+                              len >> 1);
+    if (outframes != len)
+    {
+        printf("Failed to write %d samples\n", len);
+        exit(2);
+    }
+#endif
+    dtmf_rx(&chan_stuff[chan].dtmf_state, (int16_t *) buf, len);
+    xlen = dtmf_rx_get(&chan_stuff[chan].dtmf_state,
+                       chan_stuff[chan].dtmf + chan_stuff[chan].dtmf_ptr,
+                       100 - chan_stuff[chan].dtmf_ptr);
+    if (xlen > 0)
+    {
+        s = chan_stuff[chan].dtmf + chan_stuff[chan].dtmf_ptr;
+        while (*s)
+        {
+            if (*s == '#')
+            {
+                uc_set_channel_read_callback(uc, 0, NULL, 0);
+                uc_set_channel_write_callback(uc, 0, NULL, 0);
+                if (uc_call_control(uc, UC_OP_DROPCALL, chan_stuff[chan].crn, (void *) UC_CAUSE_NORMAL_CLEARING))
+                    printf ("A Drop Call failed\n");
+                /*endif*/
+                break;
+            }
+            /*endif*/
+            s++;
+        }
+        /*endwhile*/
+        printf("Got '%s'\n", chan_stuff[chan].dtmf);
+        chan_stuff[chan].dtmf_ptr += xlen;
+    }
+    /*endif*/
+    t30_rx(&(chan_stuff[chan].fax), (int16_t *) buf, len);
+}
+/*- End of function --------------------------------------------------------*/
+
+int channel_write_fax_channel(uc_t *uc, int chan, void *user_data, uint8_t *buf, int max_len)
+{
+    int len;
+
+    len = t30_tx(&(chan_stuff[chan].fax), (int16_t *) buf, max_len >> 1);
+    afWriteFrames(txhandle, AF_DEFAULT_TRACK, buf, len);
+    if (len > 0)
+        len <<= 1;
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int channel_error(uc_t *uc, int chan, void *user_data, int cause)
+{
+    printf("Error %d\n", cause);
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+int signaling_error(uc_t *uc, void *user_data, int cause)
+{
+    printf("Error %d\n", cause);
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void initiate_call(uc_t *uc, int chan, uc_event_t *e)
+{
+    uc_makecall_t makecall;
+    uc_callparms_t *callparms;
+    int ret;
+
+    printf ("Initiating call\n");
+    pthread_mutex_lock(&mutex);
+    if ((callparms = uc_new_callparms(NULL)) == NULL)
+        return;
+    /*endif*/
+    pthread_mutex_unlock(&mutex);
+    uc_callparm_originating_number(callparms, chan_stuff[chan].originating_number);
+    uc_callparm_destination_number(callparms, chan_stuff[chan].destination_number);
+    makecall.callparms = callparms;
+    makecall.crn = 0;
+    if (ret = uc_call_control(uc, UC_OP_MAKECALL, 0, (void *) &makecall) != UC_RET_OK)
+        fprintf(stderr, "Make Call failed - %d\n", ret);
+    /*endif*/
+    chan_stuff[chan].crn = makecall.crn;
+    free(callparms);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_b_handler(t30_state_t *s, void *user_data, int msg)
+{
+    chan_stuff_t *t;
+
+    t = (chan_stuff_t *) user_data;
+    printf("Phase B - %d\n", msg);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_d_handler(t30_state_t *s, void *user_data, int msg)
+{
+    chan_stuff_t *t;
+
+    t = (chan_stuff_t *) user_data;
+    printf("Phase D - %d\n", msg);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void phase_e_handler(t30_state_t *s, void *user_data, int result)
+{
+    chan_stuff_t *t;
+    
+    printf("Phase E - %d\n", result);
+    t = (chan_stuff_t *) user_data;
+    if (uc_call_control(t->uc, UC_OP_DROPCALL, t->crn, (void *) UC_CAUSE_NORMAL_CLEARING))
+        fprintf(stderr, "Phase E Drop Call failed\n");
+    /*endif*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void flush_handler(t30_state_t *s, void *user_data, int which)
+{
+    chan_stuff_t *t;
+    
+    printf("Flush\n");
+    t = (chan_stuff_t *) user_data;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void handle_uc_event(uc_t *uc, void *user_data, uc_event_t *e)
+{
+    int chan;
+    
+    chan = (int) user_data;
+
+    printf ("-- %s (%d)\n", uc_event2str(e->e), chan);
+    switch (e->e)
+    {
+    case UC_EVENT_DEVICEFAIL:
+        break;
+    case UC_EVENT_PROTOCOLFAIL:
+        printf("-- Protocol failure on channel %d, cause %d\n", e->gen.channel, e->gen.data);
+        break;
+    case UC_EVENT_SIGCHANSTATUS:
+        printf("-- Signalling channel status - %s\n", e->sigchanstatus.ok  ?  "Up"  :  "Down");
+        break;
+    case UC_EVENT_ALARM:
+        printf("-- Alarm - 0x%X 0x%X\n", e->alarm.raised, e->alarm.cleared);
+        break;
+    case UC_EVENT_FARBLOCKED:
+        printf("-- Channel far end blocked! :-(\n");
+        chan_stuff[chan].xxx &= ~1;
+        break;
+    case UC_EVENT_FARUNBLOCKED:
+        printf("-- Channel far end unblocked! :-)\n");
+        chan_stuff[chan].xxx |= 1;
+        if (chan_stuff[chan].xxx == 3)
+        {
+            if (caller_mode)
+                initiate_call(uc, chan, e);
+            /*endif*/
+        }
+        /*endif*/
+        break;
+    case UC_EVENT_LOCALBLOCKED:
+        printf("-- Channel local end blocked! :-(\n");
+        chan_stuff[chan].xxx &= ~2;
+        break;
+    case UC_EVENT_LOCALUNBLOCKED:
+        printf("-- Channel local end unblocked! :-)\n");
+        chan_stuff[chan].xxx |= 2;
+        if (chan_stuff[chan].xxx == 3)
+        {
+            if (caller_mode)
+                initiate_call(uc, chan, e);
+            /*endif*/
+        }
+        /*endif*/
+        break;
+    case UC_EVENT_DIALING:
+        printf("-- Dialing on channel %d\n", e->gen.channel);
+        break;
+    case UC_EVENT_PROCEEDING:
+        printf("-- Proceeding on channel %d\n", e->gen.channel);
+        break;
+    case UC_EVENT_ACCEPTED:
+        printf("-- Accepted on channel %d\n", e->gen.channel);
+        if (uc_call_control(uc, UC_OP_ANSWERCALL, e->gen.crn, (void *) -1))
+            fprintf(stderr, "Answer Call failed\n");
+        /*endif*/
+        break;
+    case UC_EVENT_DETECTED:
+        printf("-- Detected on channel %d\n", e->gen.channel);
+        break;
+    case UC_EVENT_MOREDIGITS:
+        printf("-- More digits on channel %d, CRN %d (ANI: %s, DNIS: %s)\n", e->offered.channel, e->offered.crn, e->offered.parms.originating_number, e->offered.parms.destination_number);
+        break;
+    case UC_EVENT_ALERTING:
+        printf("-- Alerting on channel %d\n", e->gen.channel);
+        /* This is just a notification of call progress. We need take no action at this point. */
+        break;
+    case UC_EVENT_FARDISCONNECTED:
+        printf("-- Far end disconnected on channel %d\n", e->fardisconnected.channel);
+        /* Kill any outstanding audio processing */
+        uc_set_channel_read_callback(uc, 0, NULL, 0);
+        uc_set_channel_write_callback(uc, 0, NULL, 0);
+        if (uc_call_control(uc, UC_OP_DROPCALL, e->fardisconnected.crn, (void *) UC_CAUSE_NORMAL_CLEARING))
+            fprintf(stderr, "C Drop Call failed\n");
+        /*endif*/
+        break;
+    case UC_EVENT_DROPCALL:
+        printf("-- Drop call on channel %d\n", e->gen.channel);
+        if (uc_call_control(uc, UC_OP_RELEASECALL, e->gen.crn, NULL))
+            fprintf(stderr, "uc_ReleaseCall failed\n");
+        /*endif*/
+        break;
+    case UC_EVENT_RELEASECALL:
+        printf("-- Released on channel %d\n", e->gen.channel);
+        if (caller_mode)
+            initiate_call(uc, chan, e);
+        /*endif*/
+        break;
+    case UC_EVENT_OFFERED:
+        printf("-- Offered on channel %d, CRN %d (ANI: %s, DNIS: %s)\n", e->offered.channel, e->offered.crn, e->offered.parms.originating_number, e->offered.parms.destination_number);
+        if (!caller_mode)
+        {
+            switch (chan_stuff[chan].cause)
+            {
+            case 0:
+                if (uc_call_control(uc, UC_OP_ACCEPTCALL, e->offered.crn, (void *) -1))
+                    fprintf(stderr, "uc_AcceptCall failed\n");
+                /*endif*/
+                chan_stuff[chan].crn = e->offered.crn;
+                break;
+            case 1:
+                if (uc_call_control(uc, UC_OP_ANSWERCALL, e->offered.crn, (void *) -1))
+                    fprintf(stderr, "uc_AnswerCall failed\n");
+                /*endif*/
+                chan_stuff[chan].crn = e->offered.crn;
+                break;
+            case 2:
+                if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_USER_BUSY))
+                    fprintf(stderr, "E Drop Call failed\n");
+                /*endif*/
+                break;
+            case 3:
+                if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_UNASSIGNED_NUMBER))
+                    fprintf(stderr, "F Drop Call failed\n");
+                /*endif*/
+                break;
+            case 4:
+                if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_NETWORK_CONGESTION))
+                    fprintf(stderr, "G Drop Call failed\n");
+                /*endif*/
+                break;
+            case 5:
+                if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_DEST_OUT_OF_ORDER))
+                    fprintf(stderr, "H Drop Call failed\n");
+                /*endif*/
+                break;
+            }
+            /*endswitch*/
+            if (++chan_stuff[chan].cause > 5)
+                chan_stuff[chan].cause = 0;
+            /*endif*/
+        }
+        /*endif*/
+        break;
+    case UC_EVENT_ANSWERED:
+        printf("-- Answered on channel %d\n", e->gen.channel);
+        uc_set_channel_read_callback(uc, 0, channel_read_fax_channel, (void *) chan);
+printf("XXX read callback set\n");
+        uc_set_channel_write_callback(uc, 0, channel_write_fax_channel, (void *) chan);
+printf("XXX write callback set\n");
+        t30_init(&(chan_stuff[chan].fax), FALSE, uc);
+        t30_set_local_ident(&(chan_stuff[chan].fax), "12345678");
+        t30_set_tx_file(&(chan_stuff[chan].fax), "tx.tif");
+        //t30_set_rx_file(&(chan_stuff[chan].fax), "rx.tif");
+        t30_set_phase_b_handler(&(chan_stuff[chan].fax), phase_b_handler, &(chan_stuff[chan]));
+        t30_set_phase_d_handler(&(chan_stuff[chan].fax), phase_d_handler, &(chan_stuff[chan]));
+        t30_set_phase_e_handler(&(chan_stuff[chan].fax), phase_e_handler, &(chan_stuff[chan]));
+        t30_set_flush_handler(&(chan_stuff[chan].fax), flush_handler, &(chan_stuff[chan]));
+printf("XXX FAX inited\n");
+        dtmf_rx_init(&chan_stuff[chan].dtmf_state, NULL, NULL);
+printf("XXX DTMF inited\n");
+        break;
+    case UC_EVENT_CONNECTED:
+        printf("-- Connected on channel %d\n", e->gen.channel);
+        uc_set_channel_read_callback(uc, 0, channel_read_fax_channel, (void *) chan);
+printf("XXX read callback set\n");
+        uc_set_channel_write_callback(uc, 0, channel_write_fax_channel, (void *) chan);
+printf("XXX write callback set\n");
+        t30_init(&(chan_stuff[chan].fax), TRUE, uc);
+        t30_set_local_ident(&(chan_stuff[chan].fax), "87654321");
+        t30_set_tx_file(&(chan_stuff[chan].fax), "tx.tif");
+        //t30_set_rx_file(&(chan_stuff[chan].fax), "rx.tif");
+        t30_set_phase_b_handler(&(chan_stuff[chan].fax), phase_b_handler, &(chan_stuff[chan]));
+        t30_set_phase_d_handler(&(chan_stuff[chan].fax), phase_d_handler, &(chan_stuff[chan]));
+        t30_set_phase_e_handler(&(chan_stuff[chan].fax), phase_e_handler, &(chan_stuff[chan]));
+printf("XXX FAX inited\n");
+#if 0
+        if (uc_call_control(uc, UC_OP_DROPCALL, e->offered.crn, (void *) UC_CAUSE_NORMAL_CLEARING))
+            printf ("I Drop Call failed\n");
+        /*endif*/
+#endif
+        break;
+    default:
+        fprintf(stderr, "--!! Unknown signaling event %d\n", e->e);
+        break;
+    }
+    /*endswitch*/
+}
+/*- End of function --------------------------------------------------------*/
+
+static void *run_uc(void *arg)
+{
+    uc_t *uc;
+    uc_event_t *e;
+    struct timeval tv = {0,0};
+    struct timeval *next;
+    fd_set rfds;
+    fd_set wfds;
+    fd_set efds;
+    int res;
+    int dfd;
+    int chan;
+    
+    chan = *((int *) arg);
+
+    dfd = chan_stuff[chan].fd;
+    if (chan < 4)
+        uc = uc_new(dfd, dfd, "fx", "ls,us", UC_MODE_CO, 1);
+    else
+        uc = uc_new(dfd, dfd, "fx", "ls", UC_MODE_CPE, 1);
+    //uc = uc_new(dfd, dfd, "mfcr2", "cn", UC_MODE_CPE, 1);
+    //uc = uc_new(dfd, dfd, "pri", "ctr4", UC_MODE_CPE, 1);
+    if (uc == NULL)
+    {
+        fprintf(stderr, "Unable to create instance\n");
+        return NULL;
+    }
+    /*endif*/
+    uc_set_api_codec(uc, 0, UC_CODEC_LINEAR16);
+
+    chan_stuff[chan].uc = uc;
+    uc_set_signaling_callback(uc, handle_uc_event, (void *) chan);
+    uc_set_signaling_error_callback(uc, signaling_error, (void *) chan);
+    uc_set_channel_error_callback(uc, 0, channel_error, (void *) chan);
+    uc_set_logging(uc, 0x7FFFFFFF, 0, chan_stuff[chan].tag);
+    uc_call_control(uc, UC_OP_UNBLOCK, 0, (void *) -1);
+    for (;;)
+    {
+        FD_ZERO(&rfds);
+        FD_ZERO(&wfds);
+        FD_ZERO(&efds);
+        FD_SET(dfd, &rfds);
+        FD_SET(dfd, &wfds);
+        FD_SET(dfd, &efds);
+
+        if ((next = uc_schedule_next(uc)))
+        {
+            gettimeofday(&tv, NULL);
+            tv.tv_sec = next->tv_sec - tv.tv_sec;
+            tv.tv_usec = next->tv_usec - tv.tv_usec;
+            if (tv.tv_usec < 0)
+            {
+                tv.tv_usec += 1000000;
+                tv.tv_sec -= 1;
+            }
+            /*endif*/
+            if (tv.tv_sec < 0)
+            {
+                tv.tv_sec = 0;
+                tv.tv_usec = 0;
+            }
+            /*endif*/
+        }
+        /*endif*/
+        res = select(dfd + 1, &rfds, NULL, &efds, next  ?  &tv  :  NULL);
+        e = NULL;
+        if (res == 0)
+        {
+            uc_schedule_run(uc);
+        }
+        else if (res > 0)
+        {
+            e = uc_check_event(uc);
+        }
+        else if (errno != EINTR)
+        {
+            fprintf(stderr, "Error (%d) on select: %s\n", errno, strerror(errno));
+        }
+        /*endif*/
+
+        if (e)
+        {
+            printf("Non-callback signaling event\n");
+            handle_uc_event(uc, (void *) chan, e);
+        }
+        /*endif*/
+    }
+    /*endfor*/
+    return NULL;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[]) 
+{
+    pthread_attr_t attr;
+    struct zt_bufferinfo b;
+    struct zt_gains g;
+    int chan;
+    int chanx;
+    char dev_name[20];
+    AFfilesetup filesetup;
+    int j;
+
+    filesetup = afNewFileSetup();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+    rxhandle = afOpenFile("rxfax.wav", "w", filesetup);
+    if (rxhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open fax audio file\n");
+        exit(2);
+    }
+    txhandle = afOpenFile("txfax.wav", "w", filesetup);
+    if (txhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Failed to open fax audio file\n");
+        exit(2);
+    }
+
+    if (argc < 1)
+    {
+        fprintf(stderr, "Usage: testcall [call]\n");
+        exit(1);
+    }
+    /*endif*/
+    uc_start();    
+    pthread_attr_init(&attr);
+    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+    pthread_mutex_init(&mutex, NULL);
+    for (chan = 0;  chan < 5/*30*/;  chan++)
+    {
+        chan_stuff[chan].sig_fd = open("/dev/zap/channel", O_RDWR | O_NONBLOCK);
+        if (chan_stuff[chan].sig_fd < 0)
+        {
+            fprintf(stderr, "Failed to open channel: %s\n", strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        chan_stuff[chan].fd = chan_stuff[chan].sig_fd;
+        
+        /* Allow for the missing channel at TS16 */
+        chanx = chan + 1 + (chan + 15)%30;
+        chanx = chan + 125;
+        if (ioctl(chan_stuff[chan].fd, ZT_SPECIFY, &chanx))
+        {
+            fprintf(stderr, "Failed to specify channel %d: %s\n", chanx, strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        if (ioctl(chan_stuff[chan].fd, ZT_GET_BUFINFO, &b))
+        {
+            fprintf(stderr, "Unable to get buffer info on channel %d: %s\n", chanx, strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        printf ("%d %d %d %d %d %d\n",
+                b.rxbufpolicy,
+                b.txbufpolicy,
+                b.numbufs,
+                b.bufsize,
+                b.readbufs,
+                b.writebufs);
+        b.rxbufpolicy = ZT_POLICY_IMMEDIATE;
+        b.txbufpolicy = ZT_POLICY_IMMEDIATE;
+        b.numbufs = 4;
+        b.bufsize = 160;
+        if (ioctl(chan_stuff[chan].fd, ZT_SET_BUFINFO, &b))
+        {
+            fprintf(stderr, "Unable to set buffer info on channel %d: %s\n", chanx, strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        if (ioctl(chan_stuff[chan].fd, ZT_GET_BUFINFO, &b))
+        {
+            fprintf(stderr, "Unable to get buffer info on channel %d: %s\n", chanx, strerror(errno));
+            exit(1);
+        }
+        /*endif*/
+        for (j = 0;  j < 256;  j++)
+        {
+            g.rxgain[j] = j;
+            g.txgain[j] = j;
+        }
+        /*endif*/
+        ioctl(chan_stuff[chan].fd, ZT_SETGAINS, &g);
+        printf("%d %d %d %d %d %d\n",
+               b.rxbufpolicy,
+               b.txbufpolicy,
+               b.numbufs,
+               b.bufsize,
+               b.readbufs,
+               b.writebufs);
+
+        if (argc > 1)
+            caller_mode = TRUE;
+        /*endif*/
+        chan_stuff[chan].chan = chan;
+        sprintf(dev_name, "Chan %2d:", chanx);
+        chan_stuff[chan].tag = strdup(dev_name);
+        sprintf(chan_stuff[chan].originating_number, "%d", 987654321 + chan);
+        sprintf(chan_stuff[chan].destination_number, "%d", 1234 + chan);
+        printf("Thread for channel %d\n", chan);
+        if (pthread_create(&chan_stuff[chan].thread, &attr, run_uc, &chan_stuff[chan].chan))
+            exit(2);
+        /*endif*/
+    }
+    /*endfor*/
+    for (;;)
+    {
+        sleep(5);
+        printf("Main thread\n");
+    }
+    /*endfor*/
+
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+#else
+int main(int argc, char *argv[]) 
+{
+    printf("This program was not built with Unicall available\n"); 
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/time_scale_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,154 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * time_scale_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: time_scale_tests.c,v 1.14 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page time_scale_tests_page Time scaling tests
+\section time_scale_tests_page_sec_1 What does it do?
+These tests run a speech file through the time scaling routines.
+
+\section time_scale_tests_page_sec_2 How are the tests run?
+These tests process a speech file called pre_time_scale.wav. This file should contain
+8000 sample/second 16 bits/sample linear audio. The tests read this file, change the
+time scale of its contents, and write the resulting audio to post_time_scale.wav.
+This file also contains 8000 sample/second 16 bits/sample linear audio.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define BLOCK_LEN       160
+
+#define IN_FILE_NAME    "../localtests/short_nb_voice.wav"
+#define OUT_FILE_NAME   "post_time_scaling.wav"
+
+int main(int argc, char *argv[])
+{
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int frames;
+    int new_frames;
+    int out_frames;
+    int count;
+    time_scale_t state;
+    float x;
+    float rate;
+    int16_t in[BLOCK_LEN];
+    int16_t out[5*BLOCK_LEN];
+    
+    if ((inhandle = afOpenFile(IN_FILE_NAME, "r", 0)) == AF_NULL_FILEHANDLE)
+    {
+        printf("    Cannot open wave file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+    if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+    {
+        printf("    Unexpected frame size in wave file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+    if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+    {
+        printf("    Unexpected sample rate in wave file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+    if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+    {
+        printf("    Unexpected number of channels in wave file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+    if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+
+    rate = 1.8;
+
+    time_scale_init(&state, rate);
+    count = 0;
+    while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, in, BLOCK_LEN)))
+    {
+        new_frames = time_scale(&state, out, in, frames);
+        out_frames = afWriteFrames(outhandle, AF_DEFAULT_TRACK, out, new_frames);
+        if (out_frames != new_frames)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+        if (++count > 100)
+        {
+            if (rate > 0.5)
+            {
+                rate -= 0.1;
+                if (rate >= 0.99  &&  rate <= 1.01)
+                    rate -= 0.1;
+                printf("Rate is %f\n", rate);
+                time_scale_init(&state, rate);
+            }
+            count = 0;
+        }
+    }
+    if (afCloseFile(inhandle) != 0)
+    {
+        printf("    Cannot close wave file '%s'\n", IN_FILE_NAME);
+        exit(2);
+    }
+    if (afCloseFile(outhandle) != 0)
+    {
+        printf("    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/tone_generate_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,191 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * tone_generate_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2001 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: tone_generate_tests.c,v 1.13 2006/11/23 15:32:23 steveu Exp $
+ */
+
+/*! \page tone_generate_tests_page Tone generation tests
+\section tone_generate_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <time.h>
+#include <fcntl.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define OUTPUT_FILE_NAME    "tone_generate.wav"
+
+int main(int argc, char *argv[])
+{
+    tone_gen_descriptor_t tone_desc;
+    tone_gen_state_t tone_state;
+    int i;
+    int16_t amp[16384];
+    int len;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+
+    filesetup = afNewFileSetup ();
+    if (filesetup == AF_NULL_FILESETUP)
+    {
+    	fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, 8000.0);
+    //afInitCompression(filesetup, AF_DEFAULT_TRACK, AF_COMPRESSION_G711_ALAW);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+
+    outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup);
+    if (outhandle == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot open wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+    
+    make_tone_gen_descriptor(&tone_desc,
+                             440,
+                             -10,
+                             620,
+                             -15,
+                             100,
+                             200,
+                             300,
+                             400,
+                             FALSE);
+    tone_gen_init(&tone_state, &tone_desc);
+
+    for (i = 0;  i < 1000;  i++)
+    {
+        len = tone_gen(&tone_state, amp, 160);
+        printf("Generated %d samples\n", len);
+        if (len <= 0)
+            break;
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  len);
+    }
+    
+    make_tone_gen_descriptor(&tone_desc,
+                             350,
+                             -10,
+                             440,
+                             -15,
+                             100,
+                             200,
+                             300,
+                             400,
+                             TRUE);
+    tone_gen_init(&tone_state, &tone_desc);
+
+    for (i = 0;  i < 1000;  i++)
+    {
+        len = tone_gen(&tone_state, amp, 160);
+        printf("Generated %d samples\n", len);
+        if (len <= 0)
+            break;
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  len);
+    }
+    
+    make_tone_gen_descriptor(&tone_desc,
+                             400,
+                             -10,
+                             450,
+                             -10,
+                             100,
+                             200,
+                             300,
+                             400,
+                             TRUE);
+    tone_gen_init(&tone_state, &tone_desc);
+
+    for (i = 0;  i < 1000;  i++)
+    {
+        len = tone_gen(&tone_state, amp, 160);
+        printf("Generated %d samples\n", len);
+        if (len <= 0)
+            break;
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  len);
+    }
+    
+    make_tone_gen_descriptor(&tone_desc,
+                             425,
+                             -10,
+                             -50,
+                             100,
+                             100,
+                             200,
+                             300,
+                             400,
+                             TRUE);
+    tone_gen_init(&tone_state, &tone_desc);
+
+    for (i = 0;  i < 1000;  i++)
+    {
+        len = tone_gen(&tone_state, amp, 160);
+        printf("Generated %d samples\n", len);
+        if (len <= 0)
+            break;
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  amp,
+                                  len);
+    }
+    
+    if (afCloseFile(outhandle) != 0)
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit (2);
+    }
+    afFreeFileSetup(filesetup);
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/v17_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,528 @@
+#define ENABLE_V17
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v17_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v17_tests.c,v 1.60 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page v17_tests_page V.17 modem tests
+\section v17_tests_page_sec_1 What does it do?
+These tests test one way paths, as V.17 is a half-duplex modem. They allow either:
+
+ - A V.17 transmit modem to feed a V.17 receive modem through a telephone line
+   model. BER testing is then used to evaluate performance under various line
+   conditions. This is effective for testing the basic performance of the
+   receive modem. It is also the only test mode provided for evaluating the
+   transmit modem.
+
+ - A V.17 receive modem is used to decode V.17 audio, stored in a wave file.
+   This is good way to evaluate performance with audio recorded from other
+   models of modem, and with real world problematic telephone lines.
+
+If the appropriate GUI environment exists, the tests are built such that a visual
+display of modem status is maintained.
+
+\section v17_tests_page_sec_2 How is it used?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(HAVE_FL_FL_H)  &&  defined(HAVE_FL_FL_CARTESIAN_H)  &&  defined(HAVE_FL_FL_AUDIO_METER_H)
+#define ENABLE_GUI
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+#include "test_utils.h"
+#include "line_model.h"
+#if defined(ENABLE_GUI)
+#include "modem_monitor.h"
+#include "line_model_monitor.h"
+#endif
+
+#define BLOCK_LEN       160
+
+#define OUT_FILE_NAME   "v17.wav"
+
+char *decode_test_file = NULL;
+int use_gui = FALSE;
+
+int symbol_no = 0;
+
+int rx_bits = 0;
+int tx_bits = 0;
+
+int test_bps;
+
+bert_state_t bert;
+one_way_line_model_state_t *line_model;
+
+#if defined(ENABLE_GUI)
+qam_monitor_t *qam_monitor;
+#endif
+
+bert_results_t latest_results;
+
+static void reporter(void *user_data, int reason, bert_results_t *results)
+{
+    switch (reason)
+    {
+    case BERT_REPORT_SYNCED:
+        printf("BERT report synced\n");
+        break;
+    case BERT_REPORT_UNSYNCED:
+        printf("BERT report unsync'ed\n");
+        break;
+    case BERT_REPORT_REGULAR:
+        printf("BERT report regular - %d bits, %d bad bits, %d resyncs\n", results->total_bits, results->bad_bits, results->resyncs);
+        memcpy(&latest_results, results, sizeof(latest_results));
+        break;
+    case BERT_REPORT_GT_10_2:
+        printf("BERT report > 1 in 10^2\n");
+        break;
+    case BERT_REPORT_LT_10_2:
+        printf("BERT report < 1 in 10^2\n");
+        break;
+    case BERT_REPORT_LT_10_3:
+        printf("BERT report < 1 in 10^3\n");
+        break;
+    case BERT_REPORT_LT_10_4:
+        printf("BERT report < 1 in 10^4\n");
+        break;
+    case BERT_REPORT_LT_10_5:
+        printf("BERT report < 1 in 10^5\n");
+        break;
+    case BERT_REPORT_LT_10_6:
+        printf("BERT report < 1 in 10^6\n");
+        break;
+    case BERT_REPORT_LT_10_7:
+        printf("BERT report < 1 in 10^7\n");
+        break;
+    default:
+        printf("BERT report reason %d\n", reason);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void v17putbit(void *user_data, int bit)
+{
+    v17_rx_state_t *rx;
+    int i;
+    int len;
+    complexf_t *coeffs;
+    
+    rx = (v17_rx_state_t *) user_data;
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            printf("Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            printf("Training succeeded\n");
+            len = v17_rx_equalizer_state(rx, &coeffs);
+            printf("Equalizer:\n");
+            for (i = 0;  i < len;  i++)
+                printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
+            break;
+        case PUTBIT_CARRIER_UP:
+            printf("Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            printf("Carrier down\n");
+            break;
+        default:
+            printf("Eh!\n");
+            break;
+        }
+        return;
+    }
+
+#if 0
+    printf("Rx bit %d - %d - %d\n", rx_bits++, bit, tx_bits);
+#else
+    if (decode_test_file)
+        printf("Rx bit %d - %d\n", rx_bits++, bit);
+    else
+        bert_put_bit(&bert, bit);
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+static int v17getbit(void *user_data)
+{
+#if 0
+    if (++tx_bits >= 50000)
+    {
+        tx_bits = 0;
+        return PUTBIT_END_OF_DATA;
+    }
+//    if (tx_bits < 200)
+//        return (tx_bits & 1);
+    if (tx_bits == 1)
+        return 0;
+    return 1;
+#else
+    return bert_get_bit(&bert);
+#endif
+}
+/*- End of function --------------------------------------------------------*/
+
+static void qam_report(void *user_data, const complexf_t *constel, const complexf_t *target, int symbol)
+{
+    int i;
+    int len;
+    complexf_t *coeffs;
+    float fpower;
+    v17_rx_state_t *rx;
+    static float smooth_power = 0.0;
+    static int update_interval = 100;
+
+    rx = (v17_rx_state_t *) user_data;
+    if (constel)
+    {
+#if defined(ENABLE_GUI)
+        if (use_gui)
+        {
+            qam_monitor_update_constel(qam_monitor, constel);
+            qam_monitor_update_carrier_tracking(qam_monitor, v17_rx_carrier_frequency(rx));
+            qam_monitor_update_symbol_tracking(qam_monitor, v17_rx_symbol_timing_correction(rx));
+        }
+#endif
+        fpower = (constel->re - target->re)*(constel->re - target->re)
+               + (constel->im - target->im)*(constel->im - target->im);
+        smooth_power = 0.95*smooth_power + 0.05*fpower;
+        printf("%8d [%8.4f, %8.4f] [%8.4f, %8.4f] %2x %8.4f %8.4f %9.4f %7.3f\n",
+               symbol_no,
+               constel->re,
+               constel->im,
+               target->re,
+               target->im,
+               symbol,
+               fpower,
+               smooth_power,
+               v17_rx_carrier_frequency(rx),
+               v17_rx_signal_power(rx));
+        printf("Carrier %d %f %f\n", symbol_no, v17_rx_carrier_frequency(rx), v17_rx_symbol_timing_correction(rx));
+        symbol_no++;
+        if (--update_interval <= 0)
+        {
+            len = v17_rx_equalizer_state(rx, &coeffs);
+            printf("Equalizer A:\n");
+            for (i = 0;  i < len;  i++)
+                printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
+#if defined(ENABLE_GUI)
+            if (use_gui)
+                qam_monitor_update_equalizer(qam_monitor, coeffs, len);
+#endif
+            update_interval = 100;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    v17_rx_state_t rx;
+    v17_tx_state_t tx;
+    bert_results_t bert_results;
+    int16_t gen_amp[BLOCK_LEN];
+    int16_t amp[BLOCK_LEN];
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int samples;
+    int i;
+    int tep;
+    int block_no;
+    int noise_level;
+    int signal_level;
+    int bits_per_test;
+    int line_model_no;
+    int log_audio;
+    int channel_codec;
+
+    channel_codec = MUNGE_CODEC_NONE;
+    test_bps = 14400;
+    tep = FALSE;
+    line_model_no = 0;
+    decode_test_file = NULL;
+    noise_level = -70;
+    signal_level = -13;
+    bits_per_test = 50000;
+    log_audio = FALSE;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-b") == 0)
+        {
+            bits_per_test = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-c") == 0)
+        {
+            channel_codec = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-d") == 0)
+        {
+            decode_test_file = argv[++i];
+            continue;
+        }
+        if (strcmp(argv[i], "-t") == 0)
+        {
+            tep = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-g") == 0)
+        {
+            use_gui = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-m") == 0)
+        {
+            line_model_no = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-n") == 0)
+        {
+            noise_level = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-s") == 0)
+        {
+            signal_level = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "14400") == 0)
+            test_bps = 14400;
+        else if (strcmp(argv[i], "12000") == 0)
+            test_bps = 12000;
+        else if (strcmp(argv[i], "9600") == 0)
+            test_bps = 9600;
+        else if (strcmp(argv[i], "7200") == 0)
+            test_bps = 7200;
+        else
+        {
+            fprintf(stderr, "Invalid bit rate\n");
+            exit(2);
+        }
+    }
+    inhandle = NULL;
+    outhandle = NULL;
+
+    filesetup = AF_NULL_FILESETUP;
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+        if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+    }
+
+    if (decode_test_file)
+    {
+        /* We will decode the audio from a wave file. */
+        if ((inhandle = afOpenFile(decode_test_file, "r", NULL)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot open wave file '%s'\n", decode_test_file);
+            exit(2);
+        }
+    }
+    else
+    {
+        /* We will generate V.17 audio, and add some noise to it. */
+        v17_tx_init(&tx, test_bps, tep, v17getbit, NULL);
+        v17_tx_power(&tx, signal_level);
+        /* Move the carrier off a bit */
+        tx.carrier_phase_rate = dds_phase_ratef(1792.0);
+        tx.carrier_phase = 0x40000000;
+
+        bert_init(&bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+        bert_set_report(&bert, 10000, reporter, NULL);
+
+        if ((line_model = one_way_line_model_init(line_model_no, (float) noise_level, channel_codec)) == NULL)
+        {
+            fprintf(stderr, "    Failed to create line model\n");
+            exit(2);
+        }
+    }
+
+    v17_rx_init(&rx, test_bps, v17putbit, &rx);
+    v17_rx_set_qam_report_handler(&rx, qam_report, (void *) &rx);
+    span_log_set_level(&rx.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
+    span_log_set_tag(&rx.logging, "V.17 rx");
+
+#if defined(ENABLE_GUI)
+    if (use_gui)
+    {
+        qam_monitor = qam_monitor_init(10.0, NULL);
+        if (!decode_test_file)
+        {
+            start_line_model_monitor(129);
+            line_model_monitor_line_model_update(line_model->near_filter, line_model->near_filter_len);
+        }
+    }
+#endif
+
+    memset(&latest_results, 0, sizeof(latest_results));
+    for (block_no = 0;  block_no < 100000000;  block_no++)
+    {
+        if (decode_test_file)
+        {
+            samples = afReadFrames(inhandle,
+                                   AF_DEFAULT_TRACK,
+                                   amp,
+                                   BLOCK_LEN);
+            if (samples == 0)
+                break;
+#if defined(ENABLE_GUI)
+            if (use_gui)
+                qam_monitor_update_audio_level(qam_monitor, amp, samples);
+#endif
+        }
+        else
+        {
+            samples = v17_tx(&tx, gen_amp, BLOCK_LEN);
+#if defined(ENABLE_GUI)
+            if (use_gui)
+                qam_monitor_update_audio_level(qam_monitor, gen_amp, samples);
+#endif
+            if (samples == 0)
+            {
+                printf("Restarting on zero output\n");
+
+                /* Push a little silence through, to ensure all the data bits get out of the buffers */
+                memset(amp, 0, BLOCK_LEN*sizeof(int16_t));
+                v17_rx(&rx, amp, BLOCK_LEN);
+
+                /* Note that we might get a few bad bits as the carrier shuts down. */
+                bert_result(&bert, &bert_results);
+                fprintf(stderr, "Final result %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
+                fprintf(stderr, "Last report  %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, latest_results.total_bits, latest_results.bad_bits, latest_results.resyncs);
+                /* See if bit errors are appearing yet. Also check we are getting enough bits out of the receiver. The last regular report
+                   should be error free, though the final report will generally contain bits errors as the carrier was dying. The total
+                   number of bits out of the receiver should be at least the number we sent. Also, since BERT sync should have occurred
+                   rapidly at the start of transmission, the last report should have occurred at not much less than the total number of
+                   bits we sent. */
+#if 0
+                if (bert_results.total_bits < bits_per_test
+                    ||
+                    latest_results.total_bits < bits_per_test - 100
+                    ||
+                    latest_results.bad_bits != 0)
+                {
+                    break;
+                }
+#endif
+                memset(&latest_results, 0, sizeof(latest_results));
+                v17_tx_restart(&tx, test_bps, tep, TRUE);
+                v17_tx_power(&tx, signal_level);
+                v17_rx_restart(&rx, test_bps, TRUE);
+                rx.eq_put_step = rand()%(192*10/3);
+                bert_init(&bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+                bert_set_report(&bert, 10000, reporter, NULL);
+            }
+            if (log_audio)
+            {
+                outframes = afWriteFrames(outhandle,
+                                          AF_DEFAULT_TRACK,
+                                          gen_amp,
+                                          samples);
+                if (outframes != samples)
+                {
+                    fprintf(stderr, "    Error writing wave file\n");
+                    exit(2);
+                }
+            }
+            one_way_line_model(line_model, amp, gen_amp, samples);
+        }
+#if defined(ENABLE_GUI)
+        if (use_gui  &&  !decode_test_file)
+            line_model_monitor_line_spectrum_update(amp, samples);
+#endif
+        v17_rx(&rx, amp, samples);
+    }
+    if (decode_test_file)
+    {
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            qam_wait_to_end(qam_monitor);
+#endif
+    }
+    else
+    {
+        bert_result(&bert, &bert_results);
+        fprintf(stderr, "At completion:\n");
+        fprintf(stderr, "Final result %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
+        fprintf(stderr, "Last report  %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, latest_results.total_bits, latest_results.bad_bits, latest_results.resyncs);
+        one_way_line_model_release(line_model);
+    }
+    if (log_audio)
+    {
+        if (afCloseFile(outhandle))
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/v22bis_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,421 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v22bis_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v22bis_tests.c,v 1.37 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page v22bis_tests_page V.22bis modem tests
+\section v22bis_tests_page_sec_1 What does it do?
+These tests connect two V.22bis modems back to back, through a telephone line
+model. BER testing is then used to evaluate performance under various line
+conditions.
+
+If the appropriate GUI environment exists, the tests are built such that a visual
+display of modem status is maintained.
+
+\section v22bis_tests_page_sec_2 How is it used?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(HAVE_FL_FL_H)  &&  defined(HAVE_FL_FL_CARTESIAN_H)  &&  defined(HAVE_FL_FL_AUDIO_METER_H)
+#define ENABLE_GUI
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+#include "test_utils.h"
+#include "line_model.h"
+#if defined(ENABLE_GUI)
+#include "modem_monitor.h"
+#endif
+
+#define BLOCK_LEN       160
+
+#define IN_FILE_NAME    "v22bis_samp.wav"
+#define OUT_FILE_NAME   "v22bis.wav"
+
+int in_bit = 0;
+int out_bit = 0;
+
+int in_bit_no = 0;
+int out_bit_no = 0;
+
+uint8_t tx_buf[1000];
+int rx_ptr = 0;
+int tx_ptr = 0;
+
+int rx_bits = 0;
+int rx_bad_bits = 0;
+
+int use_gui = FALSE;
+
+both_ways_line_model_state_t *model;
+
+v22bis_state_t caller;
+v22bis_state_t answerer;
+
+struct qam_report_control_s
+{
+    v22bis_state_t *s;
+#if defined(ENABLE_GUI)
+    qam_monitor_t *qam_monitor;
+#endif
+    float smooth_power;
+    int symbol_no;
+};
+
+struct qam_report_control_s qam_caller;
+struct qam_report_control_s qam_answerer;
+
+static void v22bis_putbit(void *user_data, int bit)
+{
+    v22bis_state_t *s;
+    int i;
+    int len;
+    complexf_t *coeffs;
+    
+    s = (v22bis_state_t *) user_data;
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            printf("Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            printf("Training succeeded\n");
+            len = v22bis_rx_equalizer_state(s, &coeffs);
+            printf("Equalizer:\n");
+            for (i = 0;  i < len;  i++)
+                printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
+            break;
+        case PUTBIT_CARRIER_UP:
+            printf("Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            printf("Carrier down\n");
+            break;
+        default:
+            printf("Eh!\n");
+            break;
+        }
+        return;
+    }
+
+    if (bit != tx_buf[rx_ptr])
+    {
+        printf("Rx bit %d - %d\n", rx_bits, bit);
+        rx_bad_bits++;
+    }
+    rx_ptr++;
+    if (rx_ptr > 1000)
+        rx_ptr = 0;
+    rx_bits++;
+    if ((rx_bits % 100000) == 0)
+    {
+        printf("%d bits received, %d bad bits\r", rx_bits, rx_bad_bits);
+        fflush(stdout);
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static int v22bis_getbit(void *user_data)
+{
+    int bit;
+    static int tx_bits = 0;
+
+    bit = rand() & 1;
+    tx_buf[tx_ptr++] = bit;
+    if (tx_ptr > 1000)
+        tx_ptr = 0;
+    //printf("Tx bit %d\n", bit);
+    if (++tx_bits > 100000)
+    {
+        tx_bits = 0;
+        bit = 2;
+    }
+    return bit;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void qam_report(void *user_data, const complexf_t *constel, const complexf_t *target, int symbol)
+{
+    int i;
+    int len;
+    complexf_t *coeffs;
+    float fpower;
+    struct qam_report_control_s *s;
+
+    s = (struct qam_report_control_s *) user_data;
+    if (constel)
+    {
+#if defined(ENABLE_GUI)
+        if (use_gui)
+        {
+            qam_monitor_update_constel(s->qam_monitor, constel);
+            qam_monitor_update_carrier_tracking(s->qam_monitor, v22bis_rx_carrier_frequency(s->s));
+            qam_monitor_update_symbol_tracking(s->qam_monitor, v22bis_rx_symbol_timing_correction(s->s));
+        }
+#endif
+        fpower = (constel->re - target->re)*(constel->re - target->re)
+               + (constel->im - target->im)*(constel->im - target->im);
+        s->smooth_power = 0.95*s->smooth_power + 0.05*fpower;
+        printf("%8d [%8.4f, %8.4f] [%8.4f, %8.4f] %8.4f %8.4f\n", s->symbol_no, constel->re, constel->im, target->re, target->im, fpower, s->smooth_power);
+        s->symbol_no++;
+    }
+    else
+    {
+        printf("Gardner step %d\n", symbol);
+        len = v22bis_rx_equalizer_state(s->s, &coeffs);
+        printf("Equalizer A:\n");
+        for (i = 0;  i < len;  i++)
+            printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            qam_monitor_update_equalizer(s->qam_monitor, coeffs, len);
+#endif
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int16_t caller_amp[BLOCK_LEN];
+    int16_t answerer_amp[BLOCK_LEN];
+    int16_t caller_model_amp[BLOCK_LEN];
+    int16_t answerer_model_amp[BLOCK_LEN];
+    int16_t out_amp[2*BLOCK_LEN];
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int samples;
+    int i;
+    int test_bps;
+    int line_model_no;
+    int bits_per_test;
+    int noise_level;
+    int signal_level;
+    int log_audio;
+    int channel_codec;
+    
+    channel_codec = MUNGE_CODEC_NONE;
+    test_bps = 2400;
+    line_model_no = 0;
+    noise_level = -70;
+    signal_level = -13;
+    bits_per_test = 50000;
+    log_audio = FALSE;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-b") == 0)
+        {
+            bits_per_test = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-c") == 0)
+        {
+            channel_codec = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-g") == 0)
+        {
+            use_gui = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-m") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-m") == 0)
+        {
+            line_model_no = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-n") == 0)
+        {
+            noise_level = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-s") == 0)
+        {
+            signal_level = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "2400") == 0)
+            test_bps = 2400;
+        else if (strcmp(argv[i], "1200") == 0)
+            test_bps = 1200;
+        else
+        {
+            fprintf(stderr, "Invalid bit rate\n");
+            exit(2);
+        }
+    }
+    filesetup = AF_NULL_FILESETUP;
+    outhandle = AF_NULL_FILEHANDLE;
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+
+        if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+    }
+    v22bis_init(&caller, test_bps, 2, TRUE, v22bis_getbit, v22bis_putbit, &caller);
+    v22bis_tx_power(&caller, signal_level);
+    /* Move the carrier off a bit */
+    caller.tx_carrier_phase_rate = dds_phase_ratef(1207.0);
+    v22bis_init(&answerer, test_bps, 2, FALSE, v22bis_getbit, v22bis_putbit, &answerer);
+    v22bis_tx_power(&answerer, signal_level);
+    answerer.tx_carrier_phase_rate = dds_phase_ratef(2407.0);
+    v22bis_rx_set_qam_report_handler(&caller, qam_report, (void *) &qam_caller);
+    v22bis_rx_set_qam_report_handler(&answerer, qam_report, (void *) &qam_answerer);
+    span_log_set_level(&caller.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW);
+    span_log_set_tag(&caller.logging, "caller");
+    span_log_set_level(&answerer.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_FLOW);
+    span_log_set_tag(&answerer.logging, "answerer");
+
+    qam_caller.s = &caller;
+    qam_caller.smooth_power = 0.0;
+    qam_caller.symbol_no = 0;
+
+    qam_answerer.s = &answerer;
+    qam_answerer.smooth_power = 0.0;
+    qam_answerer.symbol_no = 0;
+
+#if defined(ENABLE_GUI)
+    if (use_gui)
+    {
+        qam_caller.qam_monitor = qam_monitor_init(6.0, "Calling modem");
+        qam_answerer.qam_monitor = qam_monitor_init(6.0, "Answering modem");
+    }
+#endif
+
+    if ((model = both_ways_line_model_init(line_model_no, (float) noise_level, line_model_no, (float) noise_level, channel_codec)) == NULL)
+    {
+        fprintf(stderr, "    Failed to create line model\n");
+        exit(2);
+    }
+    for (;;)
+    {
+        samples = v22bis_tx(&caller, caller_amp, BLOCK_LEN);
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            qam_monitor_update_audio_level(qam_caller.qam_monitor, caller_amp, samples);
+#endif
+        if (samples == 0)
+        {
+            printf("Restarting on zero output\n");
+            v22bis_restart(&caller, test_bps);
+            rx_ptr = 0;
+            tx_ptr = 0;
+        }
+
+        samples = v22bis_tx(&answerer, answerer_amp, BLOCK_LEN);
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            qam_monitor_update_audio_level(qam_answerer.qam_monitor, answerer_amp, samples);
+#endif
+        if (samples == 0)
+        {
+            printf("Restarting on zero output\n");
+            v22bis_restart(&answerer, test_bps);
+            rx_ptr = 0;
+            tx_ptr = 0;
+        }
+
+        both_ways_line_model(model, 
+                             caller_model_amp,
+                             caller_amp,
+                             answerer_model_amp,
+                             answerer_amp,
+                             samples);
+
+        v22bis_rx(&answerer, caller_model_amp, samples);
+        for (i = 0;  i < samples;  i++)
+            out_amp[2*i] = caller_model_amp[i];
+        for (  ;  i < BLOCK_LEN;  i++)
+            out_amp[2*i] = 0;
+
+        v22bis_rx(&caller, answerer_model_amp, samples);
+        for (i = 0;  i < samples;  i++)
+            out_amp[2*i + 1] = answerer_model_amp[i];
+        for (  ;  i < BLOCK_LEN;  i++)
+            out_amp[2*i + 1] = 0;
+
+        if (log_audio)
+        {
+            outframes = afWriteFrames(outhandle,
+                                      AF_DEFAULT_TRACK,
+                                      out_amp,
+                                      BLOCK_LEN);
+            if (outframes != BLOCK_LEN)
+            {
+                fprintf(stderr, "    Error writing wave file\n");
+                exit(2);
+            }
+        }
+    }
+    if (log_audio)
+    {
+        if (afCloseFile(outhandle) != 0)
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/v27ter_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,528 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v27ter_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v27ter_tests.c,v 1.70 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page v27ter_tests_page V.27ter modem tests
+\section v27ter_tests_page_sec_1 What does it do?
+These tests test one way paths, as V.27ter is a half-duplex modem. They allow either:
+
+ - A V.27ter transmit modem to feed a V.27ter receive modem through a telephone line
+   model. BER testing is then used to evaluate performance under various line
+   conditions. This is effective for testing the basic performance of the
+   receive modem. It is also the only test mode provided for evaluating the
+   transmit modem.
+
+ - A V.27ter receive modem is used to decode V.27ter audio, stored in a wave file.
+   This is good way to evaluate performance with audio recorded from other
+   models of modem, and with real world problematic telephone lines.
+
+If the appropriate GUI environment exists, the tests are built such that a visual
+display of modem status is maintained.
+
+\section v27ter_tests_page_sec_2 How is it used?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(HAVE_FL_FL_H)  &&  defined(HAVE_FL_FL_CARTESIAN_H)  &&  defined(HAVE_FL_FL_AUDIO_METER_H)
+#define ENABLE_GUI
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+#include "test_utils.h"
+#include "line_model.h"
+#if defined(ENABLE_GUI)
+#include "modem_monitor.h"
+#include "line_model_monitor.h"
+#endif
+
+#define BLOCK_LEN       160
+
+#define OUT_FILE_NAME   "v27ter.wav"
+
+char *decode_test_file = NULL;
+int use_gui = FALSE;
+
+int symbol_no = 0;
+
+int rx_bits = 0;
+
+bert_state_t bert;
+one_way_line_model_state_t *line_model;
+
+#if defined(ENABLE_GUI)
+qam_monitor_t *qam_monitor;
+#endif
+
+bert_results_t latest_results;
+
+static void reporter(void *user_data, int reason, bert_results_t *results)
+{
+    switch (reason)
+    {
+    case BERT_REPORT_SYNCED:
+        printf("BERT report synced\n");
+        break;
+    case BERT_REPORT_UNSYNCED:
+        printf("BERT report unsync'ed\n");
+        break;
+    case BERT_REPORT_REGULAR:
+        printf("BERT report regular - %d bits, %d bad bits, %d resyncs\n", results->total_bits, results->bad_bits, results->resyncs);
+        memcpy(&latest_results, results, sizeof(latest_results));
+        break;
+    case BERT_REPORT_GT_10_2:
+        printf("BERT report > 1 in 10^2\n");
+        break;
+    case BERT_REPORT_LT_10_2:
+        printf("BERT report < 1 in 10^2\n");
+        break;
+    case BERT_REPORT_LT_10_3:
+        printf("BERT report < 1 in 10^3\n");
+        break;
+    case BERT_REPORT_LT_10_4:
+        printf("BERT report < 1 in 10^4\n");
+        break;
+    case BERT_REPORT_LT_10_5:
+        printf("BERT report < 1 in 10^5\n");
+        break;
+    case BERT_REPORT_LT_10_6:
+        printf("BERT report < 1 in 10^6\n");
+        break;
+    case BERT_REPORT_LT_10_7:
+        printf("BERT report < 1 in 10^7\n");
+        break;
+    default:
+        printf("BERT report reason %d\n", reason);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void v27terputbit(void *user_data, int bit)
+{
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            printf("Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            printf("Training succeeded\n");
+            break;
+        case PUTBIT_CARRIER_UP:
+            printf("Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            printf("Carrier down\n");
+            break;
+        default:
+            printf("Eh!\n");
+            break;
+        }
+        return;
+    }
+    if (decode_test_file)
+        printf("Rx bit %d - %d\n", rx_bits++, bit);
+    else
+        bert_put_bit(&bert, bit);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int v27tergetbit(void *user_data)
+{
+    return bert_get_bit(&bert);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void qam_report(void *user_data, const complexf_t *constel, const complexf_t *target, int symbol)
+{
+    int i;
+    int len;
+    complexf_t *coeffs;
+    float fpower;
+    float error;
+    v27ter_rx_state_t *rx;
+    static float smooth_power = 0.0;
+#if defined(ENABLE_GUI)
+    static int reports = 0;
+#endif
+
+    rx = (v27ter_rx_state_t *) user_data;
+    if (constel)
+    {
+        fpower = (constel->re - target->re)*(constel->re - target->re)
+               + (constel->im - target->im)*(constel->im - target->im);
+        smooth_power = 0.95*smooth_power + 0.05*fpower;
+#if defined(ENABLE_GUI)
+        if (use_gui)
+        {
+            qam_monitor_update_constel(qam_monitor, constel);
+            qam_monitor_update_carrier_tracking(qam_monitor, v27ter_rx_carrier_frequency(rx));
+            qam_monitor_update_symbol_tracking(qam_monitor, v27ter_rx_symbol_timing_correction(rx));
+        }
+#endif
+        error = constel->im*target->re - constel->re*target->im;
+        printf("Tracking error %f %f %f %f %f %f\n", error, v27ter_rx_carrier_frequency(rx), constel->re, constel->im, target->re, target->im);
+        printf("%8d [%8.4f, %8.4f] [%8.4f, %8.4f] %8.4f %8.4f %9.4f %7.3f\n",
+               symbol_no,
+               constel->re,
+               constel->im,
+               target->re,
+               target->im,
+               fpower,
+               smooth_power,
+               v27ter_rx_carrier_frequency(rx),
+               v27ter_rx_signal_power(rx));
+        len = v27ter_rx_equalizer_state(rx, &coeffs);
+        printf("Equalizer B:\n");
+        for (i = 0;  i < len;  i++)
+            printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
+        printf("Gardtest %d %f %d\n", symbol_no, v27ter_rx_symbol_timing_correction(rx), rx->gardner_integrate);
+        printf("Carcar %d %f\n", symbol_no, v27ter_rx_carrier_frequency(rx));
+#if defined(ENABLE_GUI)
+        if (use_gui)
+        {
+            if (++reports >= 1000)
+            {
+                qam_monitor_update_equalizer(qam_monitor, coeffs, len);
+                reports = 0;
+            }
+        }
+#endif
+        symbol_no++;
+    }
+    else
+    {
+        printf("Gardner step %d\n", symbol);
+        len = v27ter_rx_equalizer_state(rx, &coeffs);
+        printf("Equalizer A:\n");
+        for (i = 0;  i < len;  i++)
+            printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            qam_monitor_update_equalizer(qam_monitor, coeffs, len);
+#endif
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    v27ter_rx_state_t rx;
+    v27ter_tx_state_t tx;
+    bert_results_t bert_results;
+    int16_t gen_amp[BLOCK_LEN];
+    int16_t amp[BLOCK_LEN];
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int samples;
+    int i;
+    int tep;
+    int test_bps;
+    int noise_level;
+    int signal_level;
+    int bits_per_test;
+    int line_model_no;
+    int block;
+    int log_audio;
+    int channel_codec;
+
+    channel_codec = MUNGE_CODEC_NONE;
+    test_bps = 4800;
+    tep = FALSE;
+    line_model_no = 0;
+    decode_test_file = NULL;
+    use_gui = FALSE;
+    noise_level = -70;
+    signal_level = -13;
+    bits_per_test = 50000;
+    log_audio = FALSE;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-b") == 0)
+        {
+            bits_per_test = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-c") == 0)
+        {
+            channel_codec = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-d") == 0)
+        {
+            decode_test_file = argv[++i];
+            continue;
+        }
+        if (strcmp(argv[i], "-t") == 0)
+        {
+            tep = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-g") == 0)
+        {
+            use_gui = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-m") == 0)
+        {
+            line_model_no = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-n") == 0)
+        {
+            noise_level = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-s") == 0)
+        {
+            signal_level = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "4800") == 0)
+            test_bps = 4800;
+        else if (strcmp(argv[i], "2400") == 0)
+            test_bps = 2400;
+        else
+        {
+            fprintf(stderr, "Invalid bit rate\n");
+            exit(2);
+        }
+    }
+    inhandle = NULL;
+    outhandle = NULL;
+
+    filesetup = AF_NULL_FILESETUP;
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+        if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+    }
+
+    if (decode_test_file)
+    {
+        /* We will decode the audio from a wave file. */
+        if ((inhandle = afOpenFile(decode_test_file, "r", NULL)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot open wave file '%s'\n", decode_test_file);
+            exit(2);
+        }
+    }
+    else
+    {
+        /* We will generate V.27ter audio, and add some noise to it. */
+        v27ter_tx_init(&tx, test_bps, tep, v27tergetbit, NULL);
+        v27ter_tx_power(&tx, signal_level);
+        /* Move the carrier off a bit */
+        tx.carrier_phase_rate = dds_phase_ratef(1810.0f);
+
+        bert_init(&bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+        bert_set_report(&bert, 10000, reporter, NULL);
+
+        if ((line_model = one_way_line_model_init(line_model_no, (float) noise_level, channel_codec)) == NULL)
+        {
+            fprintf(stderr, "    Failed to create line model\n");
+            exit(2);
+        }
+    }
+
+    v27ter_rx_init(&rx, test_bps, v27terputbit, NULL);
+    v27ter_rx_set_qam_report_handler(&rx, qam_report, (void *) &rx);
+    span_log_set_level(&rx.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
+    span_log_set_tag(&rx.logging, "V.27ter-rx");
+
+#if defined(ENABLE_GUI)
+    if (use_gui)
+    {
+        qam_monitor = qam_monitor_init(2.0, NULL);
+        if (!decode_test_file)
+        {
+            start_line_model_monitor(129);
+            line_model_monitor_line_model_update(line_model->near_filter, line_model->near_filter_len);
+        }
+    }
+#endif
+
+    memset(&latest_results, 0, sizeof(latest_results));
+    for (block = 0;  ;  block++)
+    {
+        if (decode_test_file)
+        {
+            samples = afReadFrames(inhandle,
+                                   AF_DEFAULT_TRACK,
+                                   amp,
+                                   BLOCK_LEN);
+#if defined(ENABLE_GUI)
+            if (use_gui)
+                qam_monitor_update_audio_level(qam_monitor, amp, samples);
+#endif
+            if (samples == 0)
+                break;
+        }
+        else
+        {
+            samples = v27ter_tx(&tx, gen_amp, BLOCK_LEN);
+#if defined(ENABLE_GUI)
+            if (use_gui)
+                qam_monitor_update_audio_level(qam_monitor, gen_amp, samples);
+#endif
+            if (samples == 0)
+            {
+                printf("Restarting on zero output\n");
+
+                /* Push a little silence through, to ensure all the data bits get out of the buffers */
+                memset(amp, 0, BLOCK_LEN*sizeof(int16_t));
+                v27ter_rx(&rx, amp, BLOCK_LEN);
+                v27ter_rx(&rx, amp, BLOCK_LEN);
+                v27ter_rx(&rx, amp, BLOCK_LEN);
+
+                /* Note that we might get a few bad bits as the carrier shuts down. */
+                bert_result(&bert, &bert_results);
+                fprintf(stderr, "Final result %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
+                fprintf(stderr, "Last report  %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, latest_results.total_bits, latest_results.bad_bits, latest_results.resyncs);
+                /* See if bit errors are appearing yet. Also check we are getting enough bits out of the receiver. The last regular report
+                   should be error free, though the final report will generally contain bits errors as the carrier was dying. The total
+                   number of bits out of the receiver should be at least the number we sent. Also, since BERT sync should have occurred
+                   rapidly at the start of transmission, the last report should have occurred at not much less than the total number of
+                   bits we sent. */
+                if (bert_results.total_bits < bits_per_test
+                    ||
+                    latest_results.total_bits < bits_per_test - 100
+                    ||
+                    latest_results.bad_bits != 0)
+                {
+                    break;
+                }
+                memset(&latest_results, 0, sizeof(latest_results));
+                signal_level--;
+                v27ter_tx_restart(&tx, test_bps, tep);
+                v27ter_tx_power(&tx, signal_level);
+                v27ter_rx_restart(&rx, test_bps, FALSE);
+                bert_init(&bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+                bert_set_report(&bert, 10000, reporter, NULL);
+                one_way_line_model_release(line_model);
+                if ((line_model = one_way_line_model_init(line_model_no, (float) noise_level, channel_codec)) == NULL)
+                {
+                    fprintf(stderr, "    Failed to create line model\n");
+                    exit(2);
+                }
+            }
+
+            if (log_audio)
+            {
+                outframes = afWriteFrames(outhandle,
+                                          AF_DEFAULT_TRACK,
+                                          gen_amp,
+                                          samples);
+                if (outframes != samples)
+                {
+                    fprintf(stderr, "    Error writing wave file\n");
+                    exit(2);
+                }
+            }
+            one_way_line_model(line_model, amp, gen_amp, samples);
+        }
+#if defined(ENABLE_GUI)
+        if (use_gui  &&  !decode_test_file)
+            line_model_monitor_line_spectrum_update(amp, samples);
+#endif
+        v27ter_rx(&rx, amp, samples);
+        if (decode_test_file == NULL  &&  block%500 == 0)
+            printf("Noise level is %d\n", noise_level);
+    }
+    if (decode_test_file)
+    {
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            qam_wait_to_end(qam_monitor);
+#endif
+    }
+    else
+    {
+        bert_result(&bert, &bert_results);
+        fprintf(stderr, "At completion:\n");
+        fprintf(stderr, "Final result %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
+        fprintf(stderr, "Last report  %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, latest_results.total_bits, latest_results.bad_bits, latest_results.resyncs);
+        one_way_line_model_release(line_model);
+        if (signal_level > -43)
+        {
+            printf("Tests failed.\n");
+            exit(2);
+        }
+
+        printf("Tests passed.\n");
+    }
+    if (log_audio)
+    {
+        if (afCloseFile(outhandle))
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/v29_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,522 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v29_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2003 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v29_tests.c,v 1.82 2006/11/19 14:07:27 steveu Exp $
+ */
+
+/*! \page v29_tests_page V.29 modem tests
+\section v29_tests_page_sec_1 What does it do?
+These tests test one way paths, as V.29 is a half-duplex modem. They allow either:
+
+ - A V.29 transmit modem to feed a V.29 receive modem through a telephone line
+   model. BER testing is then used to evaluate performance under various line
+   conditions. This is effective for testing the basic performance of the
+   receive modem. It is also the only test mode provided for evaluating the
+   transmit modem.
+
+ - A V.29 receive modem is used to decode V.29 audio, stored in a wave file.
+   This is good way to evaluate performance with audio recorded from other
+   models of modem, and with real world problematic telephone lines.
+
+If the appropriate GUI environment exists, the tests are built such that a visual
+display of modem status is maintained.
+
+\section v29_tests_page_sec_2 How is it used?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(HAVE_FL_FL_H)  &&  defined(HAVE_FL_FL_CARTESIAN_H)  &&  defined(HAVE_FL_FL_AUDIO_METER_H)
+#define ENABLE_GUI
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+#include "test_utils.h"
+#include "line_model.h"
+#if defined(ENABLE_GUI)
+#include "modem_monitor.h"
+#include "line_model_monitor.h"
+#endif
+
+#define BLOCK_LEN       160
+
+#define OUT_FILE_NAME   "v29.wav"
+
+char *decode_test_file = NULL;
+int use_gui = FALSE;
+
+int symbol_no = 0;
+int rx_bits = 0;
+
+bert_state_t bert;
+one_way_line_model_state_t *line_model;
+
+#if defined(ENABLE_GUI)
+qam_monitor_t *qam_monitor;
+#endif
+
+bert_results_t latest_results;
+
+static void reporter(void *user_data, int reason, bert_results_t *results)
+{
+    switch (reason)
+    {
+    case BERT_REPORT_SYNCED:
+        printf("BERT report synced\n");
+        break;
+    case BERT_REPORT_UNSYNCED:
+        printf("BERT report unsync'ed\n");
+        break;
+    case BERT_REPORT_REGULAR:
+        printf("BERT report regular - %d bits, %d bad bits, %d resyncs\n", results->total_bits, results->bad_bits, results->resyncs);
+        memcpy(&latest_results, results, sizeof(latest_results));
+        break;
+    case BERT_REPORT_GT_10_2:
+        printf("BERT report > 1 in 10^2\n");
+        break;
+    case BERT_REPORT_LT_10_2:
+        printf("BERT report < 1 in 10^2\n");
+        break;
+    case BERT_REPORT_LT_10_3:
+        printf("BERT report < 1 in 10^3\n");
+        break;
+    case BERT_REPORT_LT_10_4:
+        printf("BERT report < 1 in 10^4\n");
+        break;
+    case BERT_REPORT_LT_10_5:
+        printf("BERT report < 1 in 10^5\n");
+        break;
+    case BERT_REPORT_LT_10_6:
+        printf("BERT report < 1 in 10^6\n");
+        break;
+    case BERT_REPORT_LT_10_7:
+        printf("BERT report < 1 in 10^7\n");
+        break;
+    default:
+        printf("BERT report reason %d\n", reason);
+        break;
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+static void v29putbit(void *user_data, int bit)
+{
+    v29_rx_state_t *rx;
+    int i;
+    int len;
+    complexf_t *coeffs;
+    
+    rx = (v29_rx_state_t *) user_data;
+    if (bit < 0)
+    {
+        /* Special conditions */
+        switch (bit)
+        {
+        case PUTBIT_TRAINING_FAILED:
+            printf("Training failed\n");
+            break;
+        case PUTBIT_TRAINING_SUCCEEDED:
+            printf("Training succeeded\n");
+            len = v29_rx_equalizer_state(rx, &coeffs);
+            printf("Equalizer:\n");
+            for (i = 0;  i < len;  i++)
+                printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
+            break;
+        case PUTBIT_CARRIER_UP:
+            printf("Carrier up\n");
+            break;
+        case PUTBIT_CARRIER_DOWN:
+            printf("Carrier down\n");
+            break;
+        default:
+            printf("Eh!\n");
+            break;
+        }
+        return;
+    }
+
+    if (decode_test_file)
+        printf("Rx bit %d - %d\n", rx_bits++, bit);
+    else
+        bert_put_bit(&bert, bit);
+}
+/*- End of function --------------------------------------------------------*/
+
+static int v29getbit(void *user_data)
+{
+    return bert_get_bit(&bert);
+}
+/*- End of function --------------------------------------------------------*/
+
+static void qam_report(void *user_data, const complexf_t *constel, const complexf_t *target, int symbol)
+{
+    int i;
+    int len;
+    complexf_t *coeffs;
+    float fpower;
+    v29_rx_state_t *rx;
+    static float smooth_power = 0.0;
+    static int update_interval = 100;
+
+    rx = (v29_rx_state_t *) user_data;
+    if (constel)
+    {
+        fpower = (constel->re - target->re)*(constel->re - target->re)
+               + (constel->im - target->im)*(constel->im - target->im);
+        smooth_power = 0.95*smooth_power + 0.05*fpower;
+#if defined(ENABLE_GUI)
+        if (use_gui)
+        {
+            qam_monitor_update_constel(qam_monitor, constel);
+            qam_monitor_update_carrier_tracking(qam_monitor, v29_rx_carrier_frequency(rx));
+            //qam_monitor_update_carrier_tracking(qam_monitor, (fpower)  ?  fpower  :  0.001);
+            qam_monitor_update_symbol_tracking(qam_monitor, v29_rx_symbol_timing_correction(rx));
+        }
+#endif
+        printf("%8d [%8.4f, %8.4f] [%8.4f, %8.4f] %8.4f %8.4f %9.4f %7.3f %7.1f\n",
+               symbol_no,
+               constel->re,
+               constel->im,
+               target->re,
+               target->im,
+               fpower,
+               smooth_power,
+               v29_rx_carrier_frequency(rx),
+               v29_rx_signal_power(rx),
+               v29_rx_symbol_timing_correction(rx));
+        symbol_no++;
+        if (--update_interval <= 0)
+        {
+            len = v29_rx_equalizer_state(rx, &coeffs);
+            printf("Equalizer A:\n");
+            for (i = 0;  i < len;  i++)
+                printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
+#if defined(ENABLE_GUI)
+            if (use_gui)
+                qam_monitor_update_equalizer(qam_monitor, coeffs, len);
+#endif
+            update_interval = 100;
+        }
+    }
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    v29_rx_state_t rx;
+    v29_tx_state_t tx;
+    bert_results_t bert_results;
+    int16_t gen_amp[BLOCK_LEN];
+    int16_t amp[BLOCK_LEN];
+    AFfilehandle inhandle;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    int outframes;
+    int samples;
+    int i;
+    int tep;
+    int test_bps;
+    int noise_level;
+    int signal_level;
+    int bits_per_test;
+    int line_model_no;
+    int block;
+    int log_audio;
+    int channel_codec;
+    
+    channel_codec = MUNGE_CODEC_NONE;
+    test_bps = 9600;
+    tep = FALSE;
+    line_model_no = 0;
+    decode_test_file = NULL;
+    use_gui = FALSE;
+    noise_level = -70;
+    signal_level = -13;
+    bits_per_test = 50000;
+    log_audio = FALSE;
+    for (i = 1;  i < argc;  i++)
+    {
+        if (strcmp(argv[i], "-b") == 0)
+        {
+            bits_per_test = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-c") == 0)
+        {
+            channel_codec = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-d") == 0)
+        {
+            decode_test_file = argv[++i];
+            continue;
+        }
+        if (strcmp(argv[i], "-t") == 0)
+        {
+            tep = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-g") == 0)
+        {
+            use_gui = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-l") == 0)
+        {
+            log_audio = TRUE;
+            continue;
+        }
+        if (strcmp(argv[i], "-m") == 0)
+        {
+            line_model_no = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-n") == 0)
+        {
+            noise_level = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "-s") == 0)
+        {
+            signal_level = atoi(argv[++i]);
+            continue;
+        }
+        if (strcmp(argv[i], "9600") == 0)
+            test_bps = 9600;
+        else if (strcmp(argv[i], "7200") == 0)
+            test_bps = 7200;
+        else if (strcmp(argv[i], "4800") == 0)
+            test_bps = 4800;
+        else
+        {
+            fprintf(stderr, "Invalid bit rate\n");
+            exit(2);
+        }
+    }
+    inhandle = NULL;
+    outhandle = NULL;
+
+    filesetup = AF_NULL_FILESETUP;
+    if (log_audio)
+    {
+        if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+        {
+            fprintf(stderr, "    Failed to create file setup\n");
+            exit(2);
+        }
+        afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+        afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+        afInitFileFormat(filesetup, AF_FILE_WAVE);
+        afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+        if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot create wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+    }
+
+    if (decode_test_file)
+    {
+        /* We will decode the audio from a wave file. */
+        if ((inhandle = afOpenFile(decode_test_file, "r", NULL)) == AF_NULL_FILEHANDLE)
+        {
+            fprintf(stderr, "    Cannot open wave file '%s'\n", decode_test_file);
+            exit(2);
+        }
+    }
+    else
+    {
+        /* We will generate V.29 audio, and add some noise to it. */
+        v29_tx_init(&tx, test_bps, tep, v29getbit, NULL);
+        v29_tx_power(&tx, signal_level);
+        /* Move the carrier off a bit */
+        tx.carrier_phase_rate = dds_phase_ratef(1710.0f);
+        tx.carrier_phase = 0;
+
+        bert_init(&bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+        bert_set_report(&bert, 10000, reporter, NULL);
+
+        if ((line_model = one_way_line_model_init(line_model_no, (float) noise_level, channel_codec)) == NULL)
+        {
+            fprintf(stderr, "    Failed to create line model\n");
+            exit(2);
+        }
+    }
+
+    v29_rx_init(&rx, test_bps, v29putbit, &rx);
+    v29_rx_signal_cutoff(&rx, -45.5);
+    v29_rx_set_qam_report_handler(&rx, qam_report, (void *) &rx);
+    /* Rotate the starting phase */
+    rx.carrier_phase = 0x80000000;
+    span_log_set_level(&rx.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
+    span_log_set_tag(&rx.logging, "V.29-rx");
+
+#if defined(ENABLE_GUI)
+    if (use_gui)
+    {
+        qam_monitor = qam_monitor_init(6.0, NULL);
+        if (!decode_test_file)
+        {
+            start_line_model_monitor(129);
+            line_model_monitor_line_model_update(line_model->near_filter, line_model->near_filter_len);
+        }
+    }
+#endif
+
+    memset(&latest_results, 0, sizeof(latest_results));
+    for (block = 0;  ;  block++)
+    {
+        if (decode_test_file)
+        {
+            samples = afReadFrames(inhandle,
+                                   AF_DEFAULT_TRACK,
+                                   amp,
+                                   BLOCK_LEN);
+#if defined(ENABLE_GUI)
+            if (use_gui)
+                qam_monitor_update_audio_level(qam_monitor, amp, samples);
+#endif
+            if (samples == 0)
+                break;
+        }
+        else
+        {
+            samples = v29_tx(&tx, gen_amp, BLOCK_LEN);
+#if defined(ENABLE_GUI)
+            if (use_gui)
+                qam_monitor_update_audio_level(qam_monitor, gen_amp, samples);
+#endif
+            if (samples == 0)
+            {
+                /* Push a little silence through, to ensure all the data bits get out of the buffers */
+                memset(amp, 0, BLOCK_LEN*sizeof(int16_t));
+                v29_rx(&rx, amp, BLOCK_LEN);
+
+                /* Note that we might get a few bad bits as the carrier shuts down. */
+                bert_result(&bert, &bert_results);
+                fprintf(stderr, "Final result %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
+                fprintf(stderr, "Last report  %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, latest_results.total_bits, latest_results.bad_bits, latest_results.resyncs);
+                /* See if bit errors are appearing yet. Also check we are getting enough bits out of the receiver. The last regular report
+                   should be error free, though the final report will generally contain bits errors as the carrier was dying. The total
+                   number of bits out of the receiver should be at least the number we sent. Also, since BERT sync should have occurred
+                   rapidly at the start of transmission, the last report should have occurred at not much less than the total number of
+                   bits we sent. */
+                if (bert_results.total_bits < bits_per_test
+                    ||
+                    latest_results.total_bits < bits_per_test - 100
+                    ||
+                    latest_results.bad_bits != 0)
+                {
+                    break;
+                }
+                memset(&latest_results, 0, sizeof(latest_results));
+                signal_level--;
+                v29_tx_restart(&tx, test_bps, tep);
+                v29_tx_power(&tx, signal_level);
+                v29_rx_restart(&rx, test_bps, FALSE);
+                rx.eq_put_step = rand()%(48*10/3);
+                bert_init(&bert, bits_per_test, BERT_PATTERN_ITU_O152_11, test_bps, 20);
+                bert_set_report(&bert, 10000, reporter, NULL);
+                one_way_line_model_release(line_model);
+                if ((line_model = one_way_line_model_init(line_model_no, (float) noise_level, channel_codec)) == NULL)
+                {
+                    fprintf(stderr, "    Failed to create line model\n");
+                    exit(2);
+                }
+            }
+            if (log_audio)
+            {
+                outframes = afWriteFrames(outhandle,
+                                          AF_DEFAULT_TRACK,
+                                          gen_amp,
+                                          samples);
+                if (outframes != samples)
+                {
+                    fprintf(stderr, "    Error writing wave file\n");
+                    exit(2);
+                }
+            }
+            one_way_line_model(line_model, amp, gen_amp, samples);
+        }
+#if defined(ENABLE_GUI)
+        if (use_gui  &&  !decode_test_file)
+            line_model_monitor_line_spectrum_update(amp, samples);
+#endif
+        v29_rx(&rx, amp, samples);
+        if (decode_test_file == NULL  &&  block%500 == 0)
+            printf("Noise level is %d\n", noise_level);
+    }
+    if (decode_test_file)
+    {
+#if defined(ENABLE_GUI)
+        if (use_gui)
+            qam_wait_to_end(qam_monitor);
+#endif
+    }
+    else
+    {
+        bert_result(&bert, &bert_results);
+        fprintf(stderr, "At completion:\n");
+        fprintf(stderr, "Final result %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
+        fprintf(stderr, "Last report  %ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, latest_results.total_bits, latest_results.bad_bits, latest_results.resyncs);
+        one_way_line_model_release(line_model);
+        
+        if (signal_level > -43)
+        {
+            printf("Tests failed.\n");
+            exit(2);
+        }
+
+        printf("Tests passed.\n");
+    }
+    if (log_audio)
+    {
+        if (afCloseFile(outhandle))
+        {
+            fprintf(stderr, "    Cannot close wave file '%s'\n", OUT_FILE_NAME);
+            exit(2);
+        }
+        afFreeFileSetup(filesetup);
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/v42_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,124 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v42_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v42_tests.c,v 1.19 2006/11/19 14:07:28 steveu Exp $
+ */
+
+/* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. */
+
+/*! \page v42_tests_page V.42 tests
+\section v42_tests_page_sec_1 What does it do?
+These tests connect two instances of V.42 back to back. V.42 frames are
+then exchanged between them.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+v42_state_t caller;
+v42_state_t answerer;
+
+int rx_next[3] = {0};
+int tx_next[3] = {0};
+
+static void v42_status(void *user_data, int status)
+{
+    int x;
+    
+    x = (intptr_t) user_data;
+    printf("%d: Status is '%s' (%d)\n", x, lapm_status_to_str(status), status);
+    //if (status == LAPM_DATA)
+    //    lapm_tx_iframe((x == 1)  ?  &caller.lapm  :  &answerer.lapm, "ABCDEFGHIJ", 10, 1);
+}
+
+static void v42_frames(void *user_data, const uint8_t *msg, int len)
+{
+    int i;
+    int x;
+    
+    x = (intptr_t) user_data;
+    for (i = 0;  i < len;  i++)
+    {
+        if (msg[i] != (rx_next[x] & 0xFF))
+            printf("%d: Mismatch 0x%02X 0x%02X\n", x, msg[i], rx_next[x] & 0xFF);
+        rx_next[x]++;
+    }
+    printf("%d: Got frame len %d\n", x, len);
+}
+
+int main(int argc, char *argv[])
+{
+    int i;
+    int bit;
+    uint8_t buf[1024];
+
+    v42_init(&caller, TRUE, TRUE, v42_frames, (void *) 1);
+    v42_init(&answerer, FALSE, TRUE, v42_frames, (void *) 2);
+    v42_set_status_callback(&caller, v42_status, (void *) 1);
+    v42_set_status_callback(&answerer, v42_status, (void *) 2);
+    span_log_set_level(&caller.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
+    span_log_set_tag(&caller.logging, "caller");
+    span_log_set_level(&caller.lapm.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
+    span_log_set_tag(&caller.lapm.logging, "caller");
+    span_log_set_level(&answerer.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
+    span_log_set_tag(&answerer.logging, "answerer");
+    span_log_set_level(&answerer.lapm.logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
+    span_log_set_tag(&answerer.lapm.logging, "answerer");
+    for (i = 0;  i < 100000;  i++)
+    {
+        bit = v42_tx_bit(&caller);
+        v42_rx_bit(&answerer, bit);
+        bit = v42_tx_bit(&answerer);
+        if (i%10000 == 0)
+            bit ^= 1;
+        v42_rx_bit(&caller, bit);
+        span_schedule_update(&caller.lapm.sched, 4);
+        span_schedule_update(&answerer.lapm.sched, 4);
+        buf[0] = tx_next[1];
+        if (lapm_tx(&caller.lapm, buf, 1) == 1)
+            tx_next[1]++;
+        buf[0] = tx_next[2];
+        if (lapm_tx(&answerer.lapm, buf, 1) == 1)
+            tx_next[2]++;
+    }
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/v42bis_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,173 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v42bis_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2005 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v42bis_tests.c,v 1.18 2006/11/19 14:07:28 steveu Exp $
+ */
+
+/* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. */
+
+/*! \page v42bis_tests_page V.42bis tests
+\section v42bis_tests_page_sec_1 What does it do?
+These tests compress the contents of a file specified on the command line, writing
+the compressed data to v42bis_tests.v42bis. They then read back the contents of the
+compressed file, decompress, and write the results to v42bis_tests.out. The contents
+of this file should exactly match the original file.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <ctype.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define COMPRESSED_FILE_NAME        "v42bis_tests.v42bis"
+#define OUTPUT_FILE_NAME            "v42bis_tests.out"
+
+int in_octets_to_date = 0;
+int out_octets_to_date = 0;
+
+static void frame_handler(void *user_data, const uint8_t *buf, int len)
+{
+    int ret;
+    
+    if ((ret = write((intptr_t) user_data, buf, len)) != len)
+        fprintf(stderr, "Write error %d/%d\n", ret, errno);
+    out_octets_to_date += len;
+}
+
+static void data_handler(void *user_data, const uint8_t *buf, int len)
+{
+    int ret;
+
+    if ((ret = write((intptr_t) user_data, buf, len)) != len)
+        fprintf(stderr, "Write error %d/%d\n", ret, errno);
+    out_octets_to_date += len;
+}
+
+int main(int argc, char *argv[])
+{
+    int len;
+    v42bis_state_t state_a;
+    v42bis_state_t state_b;
+    uint8_t buf[1024];
+    int in_fd;
+    int v42bis_fd;
+    int out_fd;
+    int do_compression;
+    int do_decompression;
+    time_t now;
+
+    do_compression = TRUE;
+    do_decompression = TRUE;
+    if (argc < 2)
+    {
+        fprintf(stderr, "Usage: %s <file>\n", argv[0]);
+        exit(2);
+    }
+    if (do_compression)
+    {
+        if ((in_fd = open(argv[1], O_RDONLY)) < 0)
+        {
+            fprintf(stderr, "Error opening file '%s'.\n", argv[1]);
+            exit(2);
+        }
+        if ((v42bis_fd = open(COMPRESSED_FILE_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
+        {
+            fprintf(stderr, "Error opening file '%s'.\n", COMPRESSED_FILE_NAME);
+            exit(2);
+        }
+
+        time(&now);
+        v42bis_init(&state_a, 3, 512, 6, frame_handler, (void *) (intptr_t) v42bis_fd, 512, data_handler, NULL, 512);
+        v42bis_compression_control(&state_a, V42BIS_COMPRESSION_MODE_ALWAYS);
+        in_octets_to_date = 0;
+        out_octets_to_date = 0;
+        while ((len = read(in_fd, buf, 1024)) > 0)
+        {
+            if (v42bis_compress(&state_a, buf, len))
+            {
+                fprintf(stderr, "Bad return code from compression\n");
+                exit(2);
+            }
+            in_octets_to_date += len;
+        }
+        v42bis_compress_flush(&state_a);
+        printf("%d bytes compressed to %d bytes in %lds\n", in_octets_to_date, out_octets_to_date, time(NULL) - now);
+        close(in_fd);
+        close(v42bis_fd);
+    }
+
+    if (do_decompression)
+    {
+        /* Now open the files for the decompression. */
+        if ((v42bis_fd = open(COMPRESSED_FILE_NAME, O_RDONLY)) < 0)
+        {
+            fprintf(stderr, "Error opening file '%s'.\n", COMPRESSED_FILE_NAME);
+            exit(2);
+        }
+        if ((out_fd = open(OUTPUT_FILE_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
+        {
+            fprintf(stderr, "Error opening file '%s'.\n", OUTPUT_FILE_NAME);
+            exit(2);
+        }
+    
+        time(&now);
+        v42bis_init(&state_b, 3, 512, 6, frame_handler, (void *) (intptr_t) v42bis_fd, 512, data_handler, (void *) (intptr_t) out_fd, 512);
+        in_octets_to_date = 0;
+        out_octets_to_date = 0;
+        while ((len = read(v42bis_fd, buf, 1024)) > 0)
+        {
+            if (v42bis_decompress(&state_b, buf, len))
+            {
+                fprintf(stderr, "Bad return code from decompression\n");
+                exit(2);
+            }
+            in_octets_to_date += len;
+        }
+        v42bis_decompress_flush(&state_b);
+        printf("%d bytes decompressed to %d bytes in %lds\n", in_octets_to_date, out_octets_to_date, time(NULL) - now);
+        close(v42bis_fd);
+        close(out_fd);
+    }
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/v42bis_tests.sh	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,154 @@
+#!/bin/sh
+#
+# V.42bis compression/decompression tests, as specified in V.56ter
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2, as
+# published by the Free Software Foundation.
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# $Id: v42bis_tests.sh,v 1.3 2006/11/20 14:27:27 steveu Exp $
+#
+
+BASE=../itutests/v56ter
+
+./v42bis_tests ${BASE}/1.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/1.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/1X04.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/1X04.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/1X30.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/1X30.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/2.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/2.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/2X10.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/2X10.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/3.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/3.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/3X06.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/3X06.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/4.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/4.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/4X04.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/4X04.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/5.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/5.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+./v42bis_tests ${BASE}/5X16.TST
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
+diff ${BASE}/5X16.TST v42bis_tests.out
+RETVAL=$?
+if [ $RETVAL != 0 ]
+then
+    exit $RETVAL
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/v8_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,206 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * v8_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: v8_tests.c,v 1.19 2006/11/23 15:48:09 steveu Exp $
+ */
+
+/*! \page v8_tests_page V.8 tests
+\section v8_tests_page_sec_1 What does it do?
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <stdio.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <fcntl.h>
+#include <string.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+#define FALSE 0
+#define TRUE (!FALSE)
+
+#define SAMPLES_PER_CHUNK   160
+
+#define OUTPUT_FILE_NAME    "v8.wav"
+
+int negotiations_ok = 0;
+
+static void handler(void *user_data, v8_result_t *result)
+{
+    const char *s;
+    
+    s = (const char *) user_data;
+    
+    if (result == NULL)
+    {
+        printf("%s V.8 negotiation failed\n", s);
+        return;
+    }
+    printf("%s V.8 negotiation result:\n", s);
+    printf("  Call function '%s'\n", v8_call_function_to_str(result->call_function));
+    printf("  Negotiated modulation '%s'\n", v8_modulation_to_str(result->negotiated_modulation));
+    printf("  Protocol '%s'\n", v8_protocol_to_str(result->protocol));
+    printf("  PSTN access '%s'\n", v8_pstn_access_to_str(result->pstn_access));
+    printf("  PCM modem availability '%s'\n", v8_pcm_modem_availability_to_str(result->pcm_modem_availability));
+    if (result->call_function == V8_CALL_V_SERIES
+        &&
+        result->negotiated_modulation == V8_MOD_V90
+        &&
+        result->protocol == V8_PROTOCOL_LAPM_V42)
+    {
+        negotiations_ok++;
+    }
+}
+
+int main(int argc, char *argv[])
+{
+    int i;
+    int16_t amp[SAMPLES_PER_CHUNK];
+    int16_t out_amp[2*SAMPLES_PER_CHUNK];
+    v8_state_t v8_caller;
+    v8_state_t v8_answerer;
+    int outframes;
+    int samples;
+    int remnant;
+    int caller_available_modulations;
+    int answerer_available_modulations;
+    AFfilehandle outhandle;
+    AFfilesetup filesetup;
+    
+    if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+    {
+        fprintf(stderr, "    Failed to create file setup\n");
+        exit(2);
+    }
+    afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+    afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+    afInitFileFormat(filesetup, AF_FILE_WAVE);
+    afInitChannels(filesetup, AF_DEFAULT_TRACK, 2);
+    if ((outhandle = afOpenFile(OUTPUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
+    {
+        fprintf(stderr, "    Cannot create wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+
+    caller_available_modulations = V8_MOD_V17
+                                 | V8_MOD_V21
+                                 | V8_MOD_V22
+                                 | V8_MOD_V23HALF
+                                 | V8_MOD_V23
+                                 | V8_MOD_V26BIS
+                                 | V8_MOD_V26TER
+                                 | V8_MOD_V27TER
+                                 | V8_MOD_V29
+                                 | V8_MOD_V32
+                                 | V8_MOD_V34HALF
+                                 | V8_MOD_V34
+                                 | V8_MOD_V90
+                                 | V8_MOD_V92;
+    answerer_available_modulations = V8_MOD_V17
+                                   | V8_MOD_V21
+                                   | V8_MOD_V22
+                                   | V8_MOD_V23HALF
+                                   | V8_MOD_V23
+                                   | V8_MOD_V26BIS
+                                   | V8_MOD_V26TER
+                                   | V8_MOD_V27TER
+                                   | V8_MOD_V29
+                                   | V8_MOD_V32
+                                   | V8_MOD_V34HALF
+                                   | V8_MOD_V34
+                                   | V8_MOD_V90
+                                   | V8_MOD_V92;
+
+    v8_init(&v8_caller, TRUE, caller_available_modulations, handler, (void *) "caller");
+    v8_init(&v8_answerer, FALSE, answerer_available_modulations, handler, (void *) "answerer");
+    span_log_set_level(&v8_caller.logging, SPAN_LOG_FLOW | SPAN_LOG_SHOW_TAG);
+    span_log_set_tag(&v8_caller.logging, "caller");
+    span_log_set_level(&v8_answerer.logging, SPAN_LOG_FLOW | SPAN_LOG_SHOW_TAG);
+    span_log_set_tag(&v8_answerer.logging, "answerer");
+    for (i = 0;  i < 1000;  i++)
+    {
+        samples = v8_tx(&v8_caller, amp, SAMPLES_PER_CHUNK);
+        if (samples < SAMPLES_PER_CHUNK)
+        {
+            memset(amp + samples, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - samples));
+            samples = SAMPLES_PER_CHUNK;
+        }
+        remnant = v8_rx(&v8_answerer, amp, samples);
+        for (i = 0;  i < samples;  i++)
+            out_amp[2*i] = amp[i];
+        
+        samples = v8_tx(&v8_answerer, amp, SAMPLES_PER_CHUNK);
+        if (samples < SAMPLES_PER_CHUNK)
+        {
+            memset(amp + samples, 0, sizeof(int16_t)*(SAMPLES_PER_CHUNK - samples));
+            samples = SAMPLES_PER_CHUNK;
+        }
+        if (v8_rx(&v8_caller, amp, samples)  &&  remnant)
+            break;
+        for (i = 0;  i < samples;  i++)
+            out_amp[2*i + 1] = amp[i];
+
+        outframes = afWriteFrames(outhandle,
+                                  AF_DEFAULT_TRACK,
+                                  out_amp,
+                                  samples);
+        if (outframes != samples)
+        {
+            fprintf(stderr, "    Error writing wave file\n");
+            exit(2);
+        }
+    }
+    if (afCloseFile(outhandle))
+    {
+        fprintf(stderr, "    Cannot close wave file '%s'\n", OUTPUT_FILE_NAME);
+        exit(2);
+    }
+    afFreeFileSetup(filesetup);
+    
+    v8_release(&v8_caller);
+    v8_release(&v8_answerer);
+    
+    if (negotiations_ok != 2)
+    {
+        printf("Tests failed.\n");
+        exit(2);
+    }
+    
+    printf("Tests passed.\n");
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/vector_float_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,86 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * vector_float_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: vector_float_tests.c,v 1.4 2006/11/19 14:07:28 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+static double vec_dot_prod_dumb(const double x[], const double y[], int n)
+{
+    int i;
+    double z;
+
+    z = 0.0;
+    for (i = 0;  i < n;  i++)
+        z += x[i]*y[i];
+    return z;
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+    int i;
+    double x[100];
+    double y[100];
+    double zsa;
+    double zsb;
+
+    for (i = 0;  i < 99;  i++)
+    {
+        x[i] = rand();
+        y[i] = rand();
+    }
+    zsa = vec_dot_prod(x, y, 99);
+    zsb = vec_dot_prod_dumb(x, y, 99);
+    if (zsa != zsb)
+    {
+        printf("Tests failed\n");
+        exit(2);
+    }
+
+    printf("Tests passed.\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/tests/vector_int_tests.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,131 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * vector_int_tests.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2006 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: vector_int_tests.c,v 1.3 2006/11/19 14:07:28 steveu Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
+#if defined(HAVE_TGMATH_H)
+#include <tgmath.h>
+#endif
+#if defined(HAVE_MATH_H)
+#include <math.h>
+#endif
+#include <assert.h>
+#include <audiofile.h>
+#include <tiffio.h>
+
+#include "spandsp.h"
+
+static int32_t vec_dot_prodi16_dumb(const int16_t x[], const int16_t y[], int n)
+{
+    int32_t z;
+    int i;
+
+    z = 0;
+    for (i = 0;  i < n;  i++)
+        z += x[i]*y[i];
+    return  z;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int32_t vec_min_maxi16_dumb(const int16_t x[], int n, int16_t out[])
+{
+    int i;
+    int16_t min;
+    int16_t max;
+    int16_t temp;
+    int32_t z;
+    
+    max = INT16_MIN;
+    min = INT16_MAX;
+    for (i = 0;  i < n;  i++)
+    {
+        temp = x[i];
+        if (temp > max)
+            max = temp;
+        /*endif*/
+        if (temp < min)
+            min = temp;
+        /*endif*/
+    }
+    /*endfor*/
+    out[0] = max;
+    out[1] = min;
+    z = abs(min);
+    if (z > max)
+        return z;
+    return max;
+}
+/*- End of function --------------------------------------------------------*/
+    
+int main(int argc, char *argv[])
+{
+    int i;
+    int32_t za;
+    int32_t zb;
+    int16_t x[99];
+    int16_t y[99];
+    int16_t outa[2];
+    int16_t outb[2];
+
+    for (i = 0;  i < 99;  i++)
+    {
+        x[i] = rand();
+        y[i] = rand();
+    }
+
+    za = vec_dot_prodi16(x, y, 99);
+    zb = vec_dot_prodi16_dumb(x, y, 99);
+    if (za != zb)
+    {
+        printf("Tests failed\n");
+        exit(2);
+    }
+
+    x[42] = -32768;
+    za = vec_min_maxi16_dumb(x, 99, outa);
+    zb = vec_min_maxi16(x, 99, outb);
+    if (za != zb
+        ||
+        outa[0] != outb[0]
+        ||
+        outa[1] != outb[1])
+    {
+        printf("Tests failed\n");
+        exit(2);
+    }
+    printf("Tests passed.\n");
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/spandsp-0.0.3/wrapper.xsl	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,5 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
+  <xsl:param name="html.stylesheet">css.css</xsl:param>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/user/Makefile	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,82 @@
+# Makefile for user mode oslec test programs
+# David Rowe December 16 2006
+#
+# Copyright David Rowe 2007 
+# This program is distributed under the terms of the GNU General Public License 
+# Version 2
+
+TOPDIR = $(shell pwd)
+export TOPDIR
+
+# extract dir from /path/to/dir
+RELCWD = $(shell pwd | sed -e "s/.*\///")
+
+VERSION = 0.1
+PROJ=zaptap
+
+DATE = $(shell date '+%d %b %Y')
+
+TARGETS = sample speedtest 
+
+# add Blackfin targets if Blackfin toolchain is present
+
+BLACKFIN=$(shell which bfin-linux-uclibc-gcc 2>/dev/null)
+ifeq ($(BLACKFIN),)
+else
+TARGETS += speedtest.bf speedtest_slow.bf tfir.bf
+endif
+ 
+all: $(TARGETS)
+
+sample: sample.c
+	gcc sample.c -o sample -Wall
+
+speedtest: speedtest.c
+	gcc speedtest.c -O6 -I../spandsp-0.0.3/src/spandsp/ \
+	../spandsp-0.0.3/src/echo.c -o speedtest -Wall
+
+echo.s : ../spandsp-0.0.3/src/echo.c
+	bfin-linux-uclibc-gcc -D__BLACKFIN__ -D__BLACKFIN_ASM__ -O6 \
+	-I../spandsp-0.0.3/src/spandsp/ \
+	../spandsp-0.0.3/src/echo.c -c -S -Wall
+
+speedtest.bf: speedtest.c echo.s
+	bfin-linux-uclibc-gcc -D__BLACKFIN__ -D__BLACKFIN_ASM__ speedtest.c -O6 \
+	-I../spandsp-0.0.3/src/spandsp/ \
+	echo.s -o speedtest.bf -Wall
+
+speedtest_slow.bf: speedtest.c
+	bfin-linux-uclibc-gcc -D__BLACKFIN__ speedtest.c -O6 \
+	-I../spandsp-0.0.3/src/spandsp/ \
+	../spandsp-0.0.3/src/echo.c -o speedtest_slow.bf -Wall
+
+tfir.bf: tfir.c
+	bfin-linux-uclibc-gcc -D__BLACKFIN_ASM__ \
+	-I../spandsp-0.0.3/src/spandsp/ \
+	tfir.c -o tfir.bf -Wall
+
+# generate tarball distro
+
+dist:
+	@if [ ! -d ../$(PROJ) ]; then \
+	  echo "Please change directory name to $(PROJ)"; \
+	  exit 1; \
+        fi 
+
+	# remove unneeded files
+	rm -f *~ 
+
+	# create tar ball containing only directories we need
+	cd ..; tar vczf $(PROJ)-$(VERSION).tar.gz $(RELCWD)
+	@echo
+	@echo "Tar ball created in ../"
+	ls -lh ../$(PROJ)-$(VERSION).tar.gz
+
+clean:
+	rm -f $(TARGETS) *~
+
+publish:
+	/home/david/attic/asciidoc-7.0.4/asciidoc.py \
+	-a stylesdir=$(TOPDIR)/asciidoc -f $(TOPDIR)/asciidoc/asciidoc.conf \
+	 --unsafe -a date='$(DATE)' -a icons -a badges README.txt 
+	scp README.html $(WEBSITE)/zaptap.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/user/pl.m	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,46 @@
+% Copyright David Rowe 2007 
+% This program is distributed under the terms of the GNU General Public License 
+% Version 2
+
+function pl(samplename, start_sam, end_sam, pngname)
+  
+  ftx=fopen(strcat(samplename, "_tx.raw"),"rb");
+  tx=fread(ftx,Inf,"short");
+  frx=fopen(strcat(samplename, "_rx.raw"),"rb");
+  rx=fread(frx,Inf,"short");
+  fec=fopen(strcat(samplename, "_ec.raw"),"rb");
+  ec=fread(fec,Inf,"short");
+
+  st = 1;
+  en = length(tx);
+  if (nargin >= 2)
+    st = start_sam;
+  endif
+  if (nargin >= 3)
+    en = end_sam;
+  endif
+
+  figure(1);
+  clg;
+  plot(tx(st:en),"r;tx;", rx(st:en),"g;rx;", ec(st:en),"b;ec;");
+  %axis([1 en-st min(tx) max(tx)]);
+ 
+  if (nargin == 4)
+
+    % small image
+
+    __gnuplot_set__ terminal png size 420,300
+    s = sprintf("__gnuplot_set__ output \"%s.png\"", pngname);
+    eval(s)
+    replot;
+
+    % larger image
+
+    __gnuplot_set__ terminal png size 800,600
+    s = sprintf("__gnuplot_set__ output \"%s_large.png\"", pngname);
+    eval(s)
+    replot;
+
+  endif
+
+endfunction
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/user/sample.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,148 @@
+/*
+  sample.c
+  David Rowe 14 December 2006
+
+  User mode side of zaptel echo sampling system.
+
+  Compile:
+  
+    gcc sample.c -o sample -Wall
+*/
+
+/*
+  Copyright (C) 2007 David Rowe
+ 
+  All rights reserved.
+ 
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License version 2, as
+  published by the Free Software Foundation.
+ 
+  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., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define SAMPLE_BUF_SZ 1000
+#define FS            8000
+#define MAX_STR       256
+#define ZT_CHUNKSIZE  8
+
+/* ioctls for sample */
+
+#define SAMPLE_SET_CHANNEL 0
+#define SAMPLE_TX_IMPULSE  1
+
+int main(int argc, char *argv[]) {
+	int    fd, len, i, j, frames;
+	short  buf[3*SAMPLE_BUF_SZ];
+	short  txbuf[SAMPLE_BUF_SZ];
+	short  rxbuf[SAMPLE_BUF_SZ];
+	short  ecbuf[SAMPLE_BUF_SZ];
+	FILE  *ftx, *frx, *fec;
+	float  secs;
+        int    sample_ch;
+        char   filename[MAX_STR];
+	short  *pbuf, *ptxbuf, *prxbuf, *pecbuf;
+
+	if (argc < 4) {
+	  printf("usage: %s SampleName channel(1|2|.....) length(secs)\n"
+		 " [-i(impulse mode)]", 
+		 argv[0]);
+	  exit(0);
+	}
+
+	sprintf(filename, "%s_tx.raw", argv[1]);
+	ftx = fopen(filename,"wb");
+	if (ftx == NULL) {
+	  printf("Can't open tx sample file: %s\n", filename);
+	  exit(1);
+	}
+
+	sprintf(filename, "%s_rx.raw", argv[1]);
+	frx = fopen(filename,"wb");
+	if (frx == NULL) {
+	  printf("Can't open rx sample file: %s\n", filename);
+	  exit(1);
+	}
+
+	sprintf(filename, "%s_ec.raw", argv[1]);
+	fec = fopen(filename,"wb");
+	if (frx == NULL) {
+	  printf("Can't open ec sample file: %s\n", filename);
+	  exit(1);
+	}
+
+	sample_ch = atoi(argv[2]);
+	if (sample_ch < 1) {
+	  printf("Invalid channel: %d must be > 0\n", sample_ch);
+	  exit(1);
+	}
+
+	secs = atof(argv[3]);
+	if ((secs < 0.0) || (secs > 100.0)) {
+	  printf("Invalid secs %f, must be between 0 and 100\n", secs);
+	  exit(1);
+	}
+	frames = (secs*FS)/SAMPLE_BUF_SZ;
+
+	fd = open("/dev/sample", O_RDWR);
+	if( fd == -1) {
+		printf("open error...\n");
+		exit(0);
+	}
+	
+	ioctl(fd, SAMPLE_SET_CHANNEL, &sample_ch);
+
+	if (argc == 5) {
+	  if(!strcmp(argv[4], "-i")) {
+	    printf("Impulse mode enabled\n");
+	    ioctl(fd, SAMPLE_TX_IMPULSE, &sample_ch);
+	  }
+	}
+
+	printf("sampling Zap/%d...\n", sample_ch);
+	for(i=0; i<frames; i++) {
+	  len = read(fd, buf, 3*sizeof(short)*SAMPLE_BUF_SZ);
+	  if( len == -1 ) {
+	    printf("read error...\n");
+	    exit(1);
+	  }
+
+	  /* demultiplex and write to disk */
+
+	  pbuf = buf;
+	  ptxbuf = txbuf;
+	  prxbuf = rxbuf;
+	  pecbuf = ecbuf;
+	  for(j=0; j<SAMPLE_BUF_SZ; j++) {
+	      *ptxbuf++ = *pbuf++;
+	      *prxbuf++ = *pbuf++;
+	      *pecbuf++ = *pbuf++;
+	  }
+	  fwrite(txbuf, sizeof(short), SAMPLE_BUF_SZ, ftx);
+	  fwrite(rxbuf, sizeof(short), SAMPLE_BUF_SZ, frx);
+	  fwrite(ecbuf, sizeof(short), SAMPLE_BUF_SZ, fec);
+	}
+
+	close(fd);
+	fclose(ftx);
+	fclose(frx);
+	fclose(fec);
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/user/speedtest.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,162 @@
+/*
+   speedtest.c
+   David Rowe
+   Created 27 Feb 2007
+
+   Measures execution speed of oslec in user mode.
+*/
+
+/*
+  Copyright (C) 2007 David Rowe
+ 
+  All rights reserved.
+ 
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License version 2, as
+  published by the Free Software Foundation.
+ 
+  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., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <time.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdint.h>
+#include <echo.h>
+
+#define TAPS 128
+#define N    8000 /* sample rate                            */
+#define AMP  1000
+#define SECS 10   /* number of simulated seconds to process */
+
+/* constant for isr cycle averaging */
+
+#define LTC   5   
+
+/* number of cycles we are using per call */
+
+long long cycles_last = 0;
+long long cycles_worst = 0;
+long long cycles_average = 0; 
+
+#ifdef __BLACKFIN__
+/* sample cycles register of Blackfin */
+
+static inline unsigned int cycles(void) {
+  int ret;
+
+   __asm__ __volatile__
+   (
+   "%0 = CYCLES;\n\t"
+   : "=&d" (ret)
+   :
+   : "R1"
+   );
+
+   return ret;
+}
+#elif defined(__X86__) || defined (__i386) || defined (__x86_64__)
+static __inline__ uint64_t cycles() {
+  uint64_t x;
+  __asm__ volatile ("rdtsc\n\t" : "=A" (x));
+  return x;
+}
+#else
+static inline volatile unsigned int cycles(void) {
+        /* A dummy implementation for other architectures */
+        static unsigned int dummy_cycles = 1;
+        return dummy_cycles++;
+}
+#endif
+
+int main(int argc, char **argv) {
+    int                i,j;
+    echo_can_state_t  *ec;
+    short              tx[N],rx[N],clean;
+    struct timeval     tv_before;
+    struct timeval     tv_after;
+    unsigned long long t_before_ms, t_after_ms;
+    unsigned long long before_clocks, after_clocks;
+    unsigned long long t_ms;
+    unsigned long long start_cycles;
+    float              mips_cpu, mips_per_ec;
+    FILE               *f;
+
+    printf("\nTesting OSLEC with %d taps (%d ms tail)\n", TAPS, (TAPS*1000)/N);
+    for(i=0; i<N; i++) {
+	tx[i] = (short)AMP*(float)rand()/RAND_MAX;
+	rx[i] = tx[i]/4;
+    }
+
+    /* note NLP not switched on to make output more interesting for bit exact
+       testing */
+
+    ec = echo_can_create(TAPS,   ECHO_CAN_USE_ADAPTION);
+   
+    /* dump output of first run for bit exact testing when optimising */
+
+    f = fopen("out.txt","wt");
+    assert(f != NULL);
+    for(i=0; i<N; i++) {
+	clean = echo_can_update(ec, tx[i], rx[i]);
+	fprintf(f,"%d\n", clean);
+    }
+    fclose(f);
+
+    gettimeofday(&tv_before, NULL);
+    before_clocks = cycles();
+    for(j=0; j<SECS; j++) {
+	
+ 	for(i=0; i<N; i++) {	    
+	    start_cycles = cycles();
+	    clean = echo_can_update(ec, tx[i], rx[i]);
+	    cycles_last = cycles() - start_cycles;
+	    cycles_average += (cycles_last - cycles_average +(1<<(LTC-1))) >> LTC;
+    
+	    if (cycles_last > cycles_worst)
+		cycles_worst = cycles_last;    
+	}
+  
+    }
+    after_clocks = cycles();
+    gettimeofday(&tv_after, NULL);
+    t_before_ms = 1000*tv_before.tv_sec + tv_before.tv_usec/1000;
+    t_after_ms = 1000*tv_after.tv_sec + tv_after.tv_usec/1000;
+    t_ms = t_after_ms - t_before_ms;
+
+    mips_cpu = (after_clocks - before_clocks)/(1E3*t_ms);
+    printf("CPU executes %5.2f MIPS\n-------------------------\n\n", mips_cpu);
+
+    printf("Method 1: gettimeofday() at start and end\n");
+    printf("  %llu ms for %ds of speech\n", t_ms, SECS);
+    mips_per_ec = mips_cpu/((float)SECS*1E3/(float)t_ms);
+    printf("  %5.2f MIPS\n", mips_per_ec);
+    printf("  %5.2f instances possible at 100%% CPU load\n", 
+	   (float)SECS*1E3/(float)t_ms);
+    
+    printf("Method 2: samples clock cycles at start and end\n");
+    printf("  %5.2f MIPS\n", (after_clocks - before_clocks)/(1E6*SECS));
+    printf("  %5.2f instances possible at 100%% CPU load\n", 
+	   mips_cpu/((after_clocks - before_clocks)/(1E6*SECS)));
+
+    printf("Method 3: samples clock cycles for each call, IIR average\n");
+    mips_per_ec = 8*(float)cycles_average/1000;
+    printf("  cycles_worst %lld cycles_last %lld cycles_av: %lld"
+	   "\n  %5.2f MIPS\n",
+	   cycles_worst, cycles_last, cycles_average, mips_per_ec);
+    printf("  %5.2f instances possible at 100%% CPU load\n", mips_cpu/mips_per_ec);
+
+    return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spandsp-0.0.3/user/tfir.c	Fri Jun 25 16:00:21 2010 +0200
@@ -0,0 +1,154 @@
+/*
+   tfir.c
+   David Rowe
+   Created 30 May 2007
+
+   Test program for Spandsp fir2 function, used for developing optimised
+   Blackfin assembler.
+*/
+
+/*
+  Copyright (C) 2007 David Rowe
+ 
+  All rights reserved.
+ 
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License version 2, as
+  published by the Free Software Foundation.
+ 
+  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., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <inttypes.h>
+
+#include "fir.h"
+
+#define TAPS 256
+#define N    100
+
+/* C-callable function to return value of CYCLES register */
+
+int cycles() {
+  int ret;
+
+   __asm__ __volatile__ 
+   (
+   "%0 = CYCLES;\n\t"
+   : "=&d" (ret)
+   : 
+   : "R1"
+   );
+
+   return ret;
+}
+
+static int32_t dot(int16_t *x, int16_t *y, int n) {
+    int32_t acc = 0;
+    int     i;
+
+    for(i=0; i<n; i++)
+	acc += *x++ * *y++;
+
+    return acc;
+}
+
+#ifdef FIRST_TRY
+static int16_t fir16_asm(fir16_state_t *fir, int16_t sample)
+{
+    int i;
+    int32_t y, y_dot;
+    int offset1;
+    int offset2;
+
+    fir->history[fir->curr_pos] = sample;
+
+    offset2 = fir->curr_pos;
+    offset1 = fir->taps - offset2;
+    y = 0;
+    for (i = fir->taps - 1;  i >= offset1;  i--)
+        y += fir->coeffs[i]*fir->history[i - offset1]; 
+    y_dot = 0;
+    y_dot += dot_asm((int16_t*)&fir->coeffs[offset1], fir->history, fir->curr_pos);
+    printf("offset1 %d offset2: %d y = %d  y_dot = %d\n", offset1, offset2, y, y_dot);
+    assert(y_dot == y);
+
+    for (  ;  i >= 0;  i--)
+        y += fir->coeffs[i]*fir->history[i + offset2];
+    y_dot += dot((int16_t*)fir->coeffs, &fir->history[offset2], offset1);
+    assert(y_dot == y);
+
+    if (fir->curr_pos <= 0)
+    	fir->curr_pos = fir->taps;
+    fir->curr_pos--;
+    return (int16_t) (y >> 15);
+}
+#endif
+
+static int16_t fir16_asm(fir16_state_t *fir, int16_t sample)
+{
+    int i;
+    int32_t y, y_dot;
+
+    fir->history[fir->curr_pos] = sample;
+    fir->history[fir->curr_pos + fir->taps] = sample;
+
+    /*
+    y = 0;
+    for (i=0; i<fir->taps; i++)
+        y += fir->coeffs[i]*fir->history[fir->curr_pos+i]; 
+    */
+    y_dot = dot_asm((int16_t*)fir->coeffs, &fir->history[fir->curr_pos], fir->taps);
+    //assert(y_dot == y);
+    
+    if (fir->curr_pos <= 0)
+    	fir->curr_pos = fir->taps;
+    fir->curr_pos--;
+    return (int16_t) (y_dot >> 15);
+}
+
+int main() {
+    int16_t       taps[TAPS];
+    fir16_state_t fir, fir_asm;
+    int16_t       out, out_asm, in;
+    int           i, before;
+
+    for(i=0; i<TAPS; i++)
+	taps[i] = 0x8000;
+    
+    fir16_create(&fir, taps, TAPS);
+    fir16_create(&fir_asm, taps, TAPS);
+
+    /* first check the results are the same for C and asm */
+
+    for(i=0; i<N; i++) {
+	in = i;
+	out = fir16(&fir, in);
+	out_asm = fir16_asm(&fir_asm, in);
+	//printf("[%d] out = %d  out_asm = %d\n", i, out, out_asm);
+	assert(out == out_asm);
+    }
+
+    printf("OK\n");
+
+    /* now measure the speed */
+
+    before = cycles();
+    out = fir16(&fir, in);
+    printf("C version: %d cycles\n", cycles() - before);
+    before = cycles();
+    out_asm = fir16_asm(&fir_asm, in);
+    printf("ASM version: %d cycles\n", cycles() - before);
+
+    return 0;
+}

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.