+######################################################################### server
+if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
+ -a "$have_osl" = "yes" ; then
+
+ build_server="yes"
+ executables="$executables server"
+ server_cmdline_objs="server"
+ server_errlist_objs="
+ server
+ afh_common
+ mp3_afh
+ vss
+ command
+ net
+ string
+ signal
+ time
+ daemon
+ http_send
+ close_on_fork
+ mm
+ crypt_common
+ ipc
+ dccp_send
+ fd
+ user_list
+ chunk_queue
+ afs
+ aft
+ mood
+ score
+ attribute
+ blob
+ playlist
+ sched
+ acl
+ send_common
+ udp_send
+ color
+ fec
+ wma_afh
+ wma_common
+ sideband
+ version
+ ggo
+ "
+ if test "$have_openssl" = "yes"; then
+ server_errlist_objs="$server_errlist_objs crypt"
+ fi
+ if test "$have_gcrypt" = "yes"; then
+ server_errlist_objs="$server_errlist_objs gcrypt"
+ fi
+ if test "$have_vorbis" = "yes" || \
+ test "$have_speex" = "yes" || \
+ test "$have_opus" = "yes"; then
+ server_errlist_objs="$server_errlist_objs ogg_afh_common"
+ fi
+ if test "$have_vorbis" = "yes"; then
+ server_errlist_objs="$server_errlist_objs ogg_afh"
+ fi
+ if test "$have_speex" = "yes"; then
+ server_errlist_objs="$server_errlist_objs spx_afh spx_common"
+ fi
+ if test "$have_opus" = "yes"; then
+ server_errlist_objs="$server_errlist_objs opus_afh opus_common"
+ fi
+ if test "$have_faad" = "yes"; then
+ server_errlist_objs="$server_errlist_objs aac_afh aac_common"
+ fi
+ if test "$have_flac" = "yes"; then
+ server_errlist_objs="$server_errlist_objs flac_afh"
+ fi
+ server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
+ AC_SUBST(server_objs, add_dot_o($server_objs))
+ AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
+ objlist_to_errlist($server_errlist_objs), errors used by para_server)
+else
+ build_server="no"
+fi
+############################################################# client
+if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
+ build_client="yes"
+ executables="$executables client"
+ client_cmdline_objs="client"
+ client_errlist_objs="
+ client
+ net
+ string
+ fd
+ sched
+ stdin
+ stdout
+ time
+ sideband
+ client_common
+ buffer_tree
+ crypt_common
+ version
+ ggo
+ "
+ if test "$have_openssl" = "yes"; then
+ client_errlist_objs="$client_errlist_objs crypt"
+ fi
+ if test "$have_gcrypt" = "yes"; then
+ client_errlist_objs="$client_errlist_objs gcrypt"
+ fi
+ if test "$have_readline" = "yes"; then
+ client_errlist_objs="$client_errlist_objs interactive"
+ fi
+ client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
+ AC_SUBST(client_objs, add_dot_o($client_objs))
+ AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
+ objlist_to_errlist($client_errlist_objs), errors used by para_client)
+else
+ build_client="no"
+fi
+############################################################# audiod
+if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
+ build_audiod="yes"
+ executables="$executables audiod"
+ audiod_audio_formats="wma"
+ audiod_cmdline_objs="$audiod_cmdline_objs
+ audiod
+ compress_filter
+ http_recv
+ dccp_recv
+ file_write
+ client
+ amp_filter
+ udp_recv
+ prebuffer_filter
+ "
+ audiod_errlist_objs="$audiod_errlist_objs
+ audiod
+ signal
+ string
+ daemon
+ stat
+ net
+ crypt_common
+ sideband
+ time
+ grab_client
+ filter_common
+ wav_filter
+ compress_filter
+ amp_filter
+ http_recv
+ dccp_recv
+ recv_common
+ fd
+ sched
+ write_common
+ file_write
+ audiod_command
+ fecdec_filter
+ client_common
+ ggo
+ udp_recv
+ color
+ fec
+ prebuffer_filter
+ version
+ bitstream
+ imdct
+ wma_common
+ wmadec_filter
+ buffer_tree
+ "
+ if test "$have_openssl" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs crypt"
+ fi
+ if test "$have_gcrypt" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs gcrypt"
+ fi
+ if test "$have_core_audio" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
+ audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
+ fi
+ if test "$have_vorbis" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
+ audiod_audio_formats="$audiod_audio_formats ogg"
+ fi
+ if test "$have_speex" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
+ audiod_audio_formats="$audiod_audio_formats spx"
+ fi
+ if test "$have_opus" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
+ audiod_audio_formats="$audiod_audio_formats opus"
+ fi
+ if test "$have_faad" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
+ audiod_audio_formats="$audiod_audio_formats aac"
+ fi
+ if test "$have_mad" = "yes"; then
+ audiod_audio_formats="$audiod_audio_formats mp3"
+ audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
+ audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
+ fi
+ if test "$have_flac" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
+ audiod_audio_formats="$audiod_audio_formats flac"
+ fi
+ if test "$have_oss" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs oss_write"
+ audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
+ fi
+ if test "$have_alsa" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs alsa_write"
+ audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
+ fi
+ if test "$have_ao" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs ao_write"
+ audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
+ fi
+ if test "$have_samplerate" = "yes"; then
+ audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
+ audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
+ fi
+ audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
+ AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
+ AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
+ errors used by para_audiod)
+
+ enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
+ AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
+ enum of audio formats supported by audiod)
+ names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
+ AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
+else
+ build_audiod="no"
+fi
+########################################################################### 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
+ 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
+"
+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
+"
+filter_cmdline_objs="
+ filter
+ compress_filter
+ amp_filter
+ prebuffer_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
+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(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"
+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
+"
+play_cmdline_objs="
+ http_recv
+ dccp_recv
+ udp_recv
+ afh_recv
+ compress_filter
+ amp_filter
+ prebuffer_filter
+ file_write
+ play
+"
+if test "$have_core_audio" = "yes"; then
+ play_errlist_objs="$play_errlist_objs osx_write ipc"
+ play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
+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.cmdline"
+ 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
+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)