+########################################################################### fade
+if test "$have_oss" = "yes" -o "$have_alsa" = "yes"; then
+ build_fade="yes"
+ executables="$executables fade"
+ fade_cmdline_objs="fade"
+ fade_errlist_objs="fade exec string fd version ggo"
+ if test "$have_oss" = "yes"; then
+ fade_errlist_objs="$fade_errlist_objs oss_mix"
+ mixers="${mixers}oss "
+ default_mixer="OSS_MIX"
+ fi
+ if test "$have_alsa" = "yes"; then
+ fade_errlist_objs="$fade_errlist_objs alsa_mix"
+ mixers="${mixers}alsa "
+ default_mixer="ALSA_MIX"
+ fi
+ fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
+ AC_SUBST(fade_objs, add_dot_o($fade_objs))
+ AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
+ objlist_to_errlist($fade_errlist_objs),
+ errors used by para_fade)
+ enum="$(
+ for i in $mixers; do
+ printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
+ done
+ )"
+ AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
+ enum of supported mixers)
+ AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
+ use this mixer if none was specified)
+ names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
+ AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
+ inits="$(
+ for i in $mixers; do
+ printf 'extern void '$i'_mix_init(struct mixer *); '
+ done
+ )"
+ AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
+ init functions of the supported mixers)
+ array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
+ AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
+else
+ build_fade="no"
+ AC_MSG_WARN([no mixer support])
+fi
+########################################################################### gui
+if test "$have_curses" = "yes"; then
+ build_gui="yes"
+ executables="$executables gui"
+ gui_cmdline_objs="gui"
+ gui_errlist_objs="
+ exec
+ signal
+ string
+ stat
+ ringbuffer
+ fd
+ gui
+ gui_theme
+ time
+ sched
+ version
+ ggo
+ "
+ gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
+ AC_SUBST(gui_objs, add_dot_o($gui_objs))
+ AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
+ objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
+else
+ build_gui="no"
+ AC_MSG_WARN([no curses lib, cannot build para_gui])
+fi
+######################################################################## filter
+filters="
+ compress
+ wav
+ amp
+ fecdec
+ wmadec
+ prebuffer
+ sync
+"
+filter_errlist_objs="
+ filter_common
+ wav_filter
+ compress_filter
+ filter
+ string
+ stdin
+ stdout
+ sched
+ fd
+ amp_filter
+ ggo
+ fecdec_filter
+ fec
+ version
+ prebuffer_filter
+ time
+ bitstream
+ imdct
+ wma_common
+ wmadec_filter
+ buffer_tree
+ net
+ sync_filter
+"
+filter_cmdline_objs="
+ filter
+ compress_filter
+ amp_filter
+ prebuffer_filter
+ sync_filter
+"
+
+if test "$have_vorbis" = "yes"; then
+ filters="$filters oggdec"
+ filter_errlist_objs="$filter_errlist_objs oggdec_filter"
+fi
+if test "$have_speex" = "yes"; then
+ filters="$filters spxdec"
+ filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
+fi
+if test "$have_opus" = "yes"; then
+ filters="$filters opusdec"
+ filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
+fi
+if test "$have_faad" = "yes"; then
+ filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
+ filters="$filters aacdec"
+fi
+if test "$have_mad" = "yes"; then
+ filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
+ filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
+ filters="$filters mp3dec"
+fi
+if test "$have_flac" = "yes"; then
+ filter_errlist_objs="$filter_errlist_objs flacdec_filter"
+ filters="$filters flacdec"
+fi
+if test "$have_samplerate" = "yes"; then
+ filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
+ filter_cmdline_objs="$filter_cmdline_objs resample_filter"
+ filters="$filters resample"
+fi
+filters="$(echo $filters)"
+AC_SUBST(filters)
+filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
+
+AC_SUBST(filter_objs, add_dot_o($filter_objs))
+AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
+ objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
+
+enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
+AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
+ enum of supported filters)
+inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
+AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
+array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
+AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
+########################################################################## recv
+recv_cmdline_objs="
+ recv
+ http_recv
+ dccp_recv
+ udp_recv
+ afh_recv
+"
+
+recv_errlist_objs="
+ http_recv
+ recv_common
+ recv
+ time
+ string
+ net
+ dccp_recv
+ fd
+ sched
+ stdout
+ ggo
+ udp_recv
+ buffer_tree
+ afh_recv
+ afh_common
+ wma_afh
+ wma_common
+ mp3_afh
+ version
+"
+if test "$have_vorbis" = "yes" || \
+ test "$have_speex" = "yes" || \
+ test "$have_opus" = "yes"; then
+ recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
+fi
+if test "$have_vorbis" = "yes"; then
+ recv_errlist_objs="$recv_errlist_objs ogg_afh"
+fi
+if test "$have_speex" = "yes"; then
+ recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
+fi
+if test "$have_opus" = "yes"; then
+ recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
+fi
+if test "$have_faad" = "yes"; then
+ recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
+fi
+if test "$have_flac" = "yes"; then
+ recv_errlist_objs="$recv_errlist_objs flac_afh"
+fi
+recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
+AC_SUBST(receivers, "http dccp udp afh")
+AC_SUBST(recv_objs, add_dot_o($recv_objs))
+AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
+ errors used by para_recv)
+########################################################################### afh
+audio_format_handlers="mp3 wma"
+afh_cmdline_objs="afh"
+afh_errlist_objs="
+ afh
+ string
+ fd
+ mp3_afh
+ afh_common
+ time
+ wma_afh
+ wma_common
+ version
+ ggo
+"
+if test "$have_vorbis" = "yes" || \
+ test "$have_speex" = "yes" || \
+ test "$have_opus" = "yes"; then
+ afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
+fi
+if test "$have_vorbis" = "yes"; then
+ afh_errlist_objs="$afh_errlist_objs ogg_afh"
+ audio_format_handlers="$audio_format_handlers ogg"
+fi
+if test "$have_speex" = "yes"; then
+ afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
+ audio_format_handlers="$audio_format_handlers spx"
+fi
+if test "$have_opus" = "yes"; then
+ afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
+ audio_format_handlers="$audio_format_handlers opus"
+fi
+if test "$have_faad" = "yes"; then
+ afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
+ audio_format_handlers="$audio_format_handlers aac"
+fi
+if test "$have_flac" = "yes"; then
+ afh_errlist_objs="$afh_errlist_objs flac_afh"
+ audio_format_handlers="$audio_format_handlers flac"
+fi
+
+afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
+
+AC_SUBST(afh_objs, add_dot_o($afh_objs))
+AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
+ objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
+########################################################################## play
+play_errlist_objs="
+ play
+ fd
+ sched
+ ggo
+ buffer_tree
+ time
+ string
+ net
+ afh_recv
+ afh_common
+ wma_afh
+ wma_common
+ mp3_afh
+ recv_common
+ udp_recv
+ http_recv
+ dccp_recv
+ filter_common
+ fec
+ bitstream
+ imdct
+ wav_filter
+ compress_filter
+ amp_filter
+ prebuffer_filter
+ fecdec_filter
+ wmadec_filter
+ write_common
+ file_write
+ version
+ sync_filter
+"
+play_cmdline_objs="
+ http_recv
+ dccp_recv
+ udp_recv
+ afh_recv
+ compress_filter
+ amp_filter
+ prebuffer_filter
+ file_write
+ play
+ sync_filter
+"
+if test "$have_core_audio" = "yes"; then
+ play_errlist_objs="$play_errlist_objs osx_write ipc"
+ play_cmdline_objs="$play_cmdline_objs osx_write"
+fi
+if test "$have_vorbis" = "yes" || \
+ test "$have_speex" = "yes" || \
+ test "$have_opus" = "yes"; then
+ play_errlist_objs="$play_errlist_objs ogg_afh_common"
+fi
+if test "$have_vorbis" = "yes"; then
+ play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
+fi
+if test "$have_speex" = "yes"; then
+ play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
+fi
+if test "$have_opus" = "yes"; then
+ play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
+fi
+if test "$have_faad" = "yes"; then
+ play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
+fi
+if test "$have_mad" = "yes"; then
+ play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
+ play_errlist_objs="$play_errlist_objs mp3dec_filter"
+fi
+if test "$have_flac" = "yes"; then
+ play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
+fi
+if test "$have_oss" = "yes"; then
+ play_errlist_objs="$play_errlist_objs oss_write"
+ play_cmdline_objs="$play_cmdline_objs oss_write"
+fi
+if test "$have_alsa" = "yes"; then
+ play_errlist_objs="$play_errlist_objs alsa_write"
+ play_cmdline_objs="$play_cmdline_objs alsa_write"
+fi
+if test "$have_ao" = "yes"; then
+ play_errlist_objs="$play_errlist_objs ao_write"
+ play_cmdline_objs="$play_cmdline_objs ao_write"
+fi
+if test "$have_readline" = "yes"; then
+ play_errlist_objs="$play_errlist_objs interactive"
+fi
+if test "$have_samplerate" = "yes"; then
+ play_errlist_objs="$play_errlist_objs resample_filter check_wav"
+ play_cmdline_objs="$play_cmdline_objs resample_filter"
+fi
+
+play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
+AC_SUBST(play_objs, add_dot_o($play_objs))
+AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
+ objlist_to_errlist($play_errlist_objs), errors used by para_play)
+######################################################################### write
+write_cmdline_objs="
+ write
+ file_write
+"
+write_errlist_objs="
+ write
+ write_common
+ file_write
+ time
+ fd
+ string
+ sched
+ stdin
+ buffer_tree
+ ggo
+ check_wav
+ version
+"
+writers="file"
+default_writer="FILE_WRITE"
+
+if test "$have_core_audio" = "yes"; then
+ write_errlist_objs="$write_errlist_objs osx_write ipc"
+ write_cmdline_objs="$write_cmdline_objs osx_write"
+ writers="$writers osx"
+ default_writer="OSX_WRITE"
+fi
+if test "$have_ao" = "yes"; then
+ write_errlist_objs="$write_errlist_objs ao_write"
+ write_cmdline_objs="$write_cmdline_objs ao_write"
+ writers="$writers ao"
+ default_writer="AO_WRITE"
+fi
+if test "$have_oss" = "yes"; then
+ write_errlist_objs="$write_errlist_objs oss_write"
+ write_cmdline_objs="$write_cmdline_objs oss_write"
+ writers="$writers oss"
+ default_writer="OSS_WRITE"
+fi
+if test "$have_alsa" = "yes"; then
+ write_errlist_objs="$write_errlist_objs alsa_write"
+ write_cmdline_objs="$write_cmdline_objs alsa_write"
+ writers="$writers alsa"
+ default_writer="ALSA_WRITE"
+fi
+AC_SUBST(writers)
+write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
+AC_SUBST(write_objs, add_dot_o($write_objs))
+AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
+ objlist_to_errlist($write_errlist_objs), errors used by para_write)
+enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
+AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
+ enum of supported writers)
+AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
+names="$(for i in $writers; do printf \"$i\",' ' ; done)"
+AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
+inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
+AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
+array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
+AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
+######################################################################## audioc
+audioc_cmdline_objs="audioc"
+audioc_errlist_objs="
+ audioc
+ string
+ net
+ fd
+ version
+ ggo
+"
+if test "$have_readline" = "yes"; then
+ audioc_errlist_objs="$audioc_errlist_objs
+ buffer_tree
+ interactive
+ sched
+ time
+ "
+fi
+audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
+AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
+AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
+ objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
+############################################################# error2.h
+# these are always built
+all_errlist_objs="
+ $recv_errlist_objs
+ $filter_errlist_objs
+ $audioc_errlist_objs
+ $write_errlist_objs
+ $afh_errlist_objs
+ $play_errlist_objs
+"
+
+# optional executables
+if test "$build_server" = "yes"; then
+ all_errlist_objs="$all_errlist_objs $server_errlist_objs"
+fi
+if test "$build_gui" = "yes"; then
+ all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
+fi
+if test "$build_fade" = "yes"; then
+ all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
+fi
+if test "$build_client" = "yes"; then
+ all_errlist_objs="$all_errlist_objs $client_errlist_objs"