3 AC_INIT([paraslash], [m4_esyscmd_s(./GIT-VERSION-GEN)],
4 [maan@tuebingen.mpg.de], [], [http://people.tuebingen.mpg.de/maan/paraslash/])
5 AC_CONFIG_HEADERS([config.h])
7 AC_CONFIG_FILES([Makefile])
8 AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
9 AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
10 AC_DEFUN([LIB_ARG_WITH], [
11 AC_ARG_WITH($1-headers, [AS_HELP_STRING(--with-$1-headers=dir,
12 [look for $1 headers in dir])])
13 AC_ARG_WITH($1-libs, [AS_HELP_STRING(--with-$1-libs=dir,
14 [look for $1 libraries in dir])])
15 if test -n "$with_$1_headers"; then
16 $1_cppflags="-I$with_$1_headers"
17 CPPFLAGS="$CPPFLAGS $$1_cppflags"
19 if test -n "$with_$1_libs"; then
20 $1_ldflags="-L$with_$1_libs $2"
24 LDFLAGS="$LDFLAGS $$1_ldflags"
27 AC_DEFUN([STASH_FLAGS], [
28 OLD_CPPFLAGS="$CPPFLAGS"
29 OLD_LDFLAGS="$LDFLAGS"
33 AC_DEFUN([UNSTASH_FLAGS], [
34 CPPFLAGS="$OLD_CPPFLAGS"
35 LDFLAGS="$OLD_LDFLAGS"
38 AC_DEFUN([LIB_SUBST_FLAGS], [
39 if test "$HAVE_[]m4_toupper([$1])" = 'yes'; then
40 AC_DEFINE(HAVE_[]m4_toupper([$1]), 1,
41 define to 1 to turn on $1 support)
46 AC_SUBST(HAVE_[]m4_toupper([$1]))
51 AC_USE_SYSTEM_EXTENSIONS
54 AC_PATH_PROG([GENGETOPT], [gengetopt])
55 test -z "$GENGETOPT" && AC_MSG_ERROR(
56 [gengetopt is required to build this package])
58 AC_PATH_PROG([M4], [m4])
59 test -z "$M4" && AC_MSG_ERROR(
60 [The m4 macro processor is required to build this package])
62 AC_PATH_PROG([HELP2MAN], [help2man])
63 test -z "$HELP2MAN" && AC_MSG_ERROR(
64 [help2man is required to build this package])
69 executables="recv filter audioc write afh play"
70 ########################################################################### osl
72 LIB_ARG_WITH([osl], [-losl])
74 AC_CHECK_HEADER(osl.h, [], [HAVE_OSL=no])
75 AC_CHECK_LIB([osl], [osl_open_table], [], [HAVE_OSL=no])
78 ######################################################################## openssl
81 LIB_ARG_WITH([openssl], [-lssl -lcrypto])
82 AC_CHECK_HEADER(openssl/ssl.h, [], [HAVE_OPENSSL=no])
83 AC_CHECK_LIB([crypto], [RAND_bytes], [], [HAVE_OPENSSL=no])
84 LIB_SUBST_FLAGS(openssl)
85 if test $HAVE_OPENSSL = yes; then
86 AC_CHECK_LIB([crypto], [RSA_set0_key],
87 AC_DEFINE([HAVE_RSA_SET0_KEY], [1], [openssl-1.1]))
90 ######################################################################### gcrypt
93 LIB_ARG_WITH([gcrypt], [-lgcrypt])
94 AC_CHECK_HEADER(gcrypt.h, [], [HAVE_GCRYPT=no])
95 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [HAVE_GCRYPT=no])
96 LIB_SUBST_FLAGS(gcrypt)
98 ######################################################################### crypto
99 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
100 Force using crypto library "lib". This package requires either
101 openssl or libgcrypt being installed. Possible values for "lib"
102 are thus "openssl" and "gcrypt". If this option is not given,
103 openssl is tried first. If openssl was not found, gcrypt is
106 CRYPTOLIB="$enable_cryptolib"
107 case "$enable_cryptolib" in
109 test $HAVE_OPENSSL = no && AC_MSG_ERROR(openssl not found)
110 crypto_ldflags="$openssl_ldflags"
113 test $HAVE_GCRYPT = no && AC_MSG_ERROR(gcrypt not found)
114 crypto_ldflags="$gcrypt_ldflags"
118 if test $HAVE_GCRYPT = yes; then
120 crypto_ldflags="$gcrypt_ldflags"
122 if test $HAVE_OPENSSL = yes; then
124 crypto_ldflags="$openssl_ldflags"
128 AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib])
131 AC_SUBST(crypto_ldflags)
132 ########################################################################## iconv
135 AC_SEARCH_LIBS([libiconv_open], [iconv],
136 [iconv_ldflags="$LIBS"],
139 AC_SUBST(iconv_ldflags)
140 AC_MSG_CHECKING([whether iconv needs const char ** cast])
145 size_t iconv(iconv_t cd, const char **inbuf,
146 size_t *inbytesleft, char **outbuf,
147 size_t *outbytesleft);
150 [cast='(const char **)'; msg=yes],
153 AC_DEFINE_UNQUOTED(ICONV_CAST, $cast, [cast for second arg to iconv()])
156 ########################################################################### ucred
157 AC_MSG_CHECKING(for struct ucred)
158 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
159 #include <sys/types.h>
160 #include <sys/socket.h>
162 struct ucred sucred; sucred.pid=0;
163 ]])],[have_ucred=yes],[have_ucred=no])
164 AC_MSG_RESULT($have_ucred)
165 if test ${have_ucred} = yes; then
166 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
168 ########################################################################### gengetopt
169 echo 'option "z" z "" flag off' | $GENGETOPT --file-name conftest-ggo &&
171 [gengetopt_args_info_description],
172 [ggo_descriptions_declared=yes],
173 [ggo_descriptions_declared=no],
174 [#include "conftest-ggo.h"]
176 AC_SUBST(ggo_descriptions_declared)
177 ########################################################################### curses
179 LIB_ARG_WITH([curses], [])
181 AC_CHECK_HEADER(curses.h, [], [HAVE_CURSES=no])
182 AC_SEARCH_LIBS([initscr], [ncursesw curses], [], [HAVE_CURSES=no])
183 curses_ldflags="$curses_ldflags $LIBS"
184 LIB_SUBST_FLAGS(curses)
186 ########################################################################### ip_mreqn
187 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
188 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
194 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
195 AC_MSG_RESULT($have_ip_mreqn)
196 if test ${have_ip_mreqn} = yes; then
197 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
199 ########################################################################### ogg
201 LIB_ARG_WITH([ogg], [-logg])
203 AC_CHECK_HEADERS([ogg/ogg.h], [], [HAVE_OGG=no])
204 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [HAVE_OGG=no])
205 AC_CHECK_LIB([ogg], [ogg_stream_flush_fill], [
206 AC_DEFINE(HAVE_OGG_STREAM_FLUSH_FILL, 1, [libogg >= 1.3.0])])
209 ######################################################################### vorbis
211 LIB_ARG_WITH([vorbis], [-lvorbis -lvorbisfile])
213 AC_CHECK_HEADERS([vorbis/codec.h], [], [HAVE_VORBIS=no])
214 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [HAVE_VORBIS=no])
215 LIB_SUBST_FLAGS(vorbis)
217 ######################################################################### speex
219 LIB_ARG_WITH([speex], [-lspeex])
221 AC_CHECK_HEADERS([speex/speex.h], [], [HAVE_SPEEX=no])
222 AC_CHECK_LIB([speex], [speex_decoder_init], [], [HAVE_SPEEX=no])
223 LIB_SUBST_FLAGS(speex)
225 ######################################################################### opus
227 LIB_ARG_WITH([opus], [-lopus])
229 AC_CHECK_HEADERS([opus/opus.h], [], [HAVE_OPUS=no])
230 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [HAVE_OPUS=no])
231 LIB_SUBST_FLAGS(opus)
233 ########################################################################### flac
235 LIB_ARG_WITH([flac], [-lFLAC -lm])
237 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], HAVE_FLAC=no)
238 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], HAVE_FLAC=no)
239 LIB_SUBST_FLAGS(flac)
242 # some helper functions for codecs which use the ogg container format
243 AC_DEFUN([NEED_OGG_OBJECTS], [{
244 test "$HAVE_OGG" = 'yes' -a \( \
245 "$HAVE_VORBIS" = 'yes' \
246 -o "$HAVE_SPEEX" = 'yes' \
247 -o "$HAVE_OPUS" = 'yes' \
248 -o "$HAVE_FLAC" = 'yes' \
251 AC_DEFUN([NEED_VORBIS_OBJECTS], [{
252 test "$HAVE_OGG" = 'yes' -a "$HAVE_VORBIS" = 'yes'
254 AC_DEFUN([NEED_SPEEX_OBJECTS], [{
255 test "$HAVE_OGG" = 'yes' -a "$HAVE_SPEEX" = 'yes'
257 AC_DEFUN([NEED_OPUS_OBJECTS], [{
258 test "$HAVE_OGG" = 'yes' -a "$HAVE_OPUS" = 'yes'
260 AC_DEFUN([NEED_FLAC_OBJECTS], [{
261 test "$HAVE_OGG" = 'yes' -a "$HAVE_FLAC" = 'yes'
263 ########################################################################### faad
265 LIB_ARG_WITH([faad], [-lfaad -lmp4ff])
267 AC_CHECK_HEADER(neaacdec.h, [], HAVE_FAAD=no)
268 AC_CHECK_HEADER(mp4ff.h, [], HAVE_FAAD=no)
269 AC_CHECK_LIB([faad], [NeAACDecOpen], [], HAVE_FAAD=no)
270 AC_CHECK_LIB([mp4ff], [mp4ff_meta_get_artist], [], HAVE_FAAD=no)
271 LIB_SUBST_FLAGS(faad)
273 ########################################################################### mad
275 LIB_ARG_WITH([mad], [-lmad])
277 AC_CHECK_HEADER(mad.h, [], HAVE_MAD=no)
278 AC_CHECK_LIB([mad], [mad_stream_init], [], HAVE_MAD=no)
281 ###################################################################### libid3tag
283 LIB_ARG_WITH([id3tag], [-lid3tag -lz])
285 AC_CHECK_HEADER(id3tag.h, [], HAVE_ID3TAG=no)
286 AC_CHECK_LIB([id3tag], [id3_file_fdopen], [], HAVE_ID3TAG=no)
287 LIB_SUBST_FLAGS(id3tag)
289 ########################################################################### oss
291 LIB_ARG_WITH([oss], [])
292 AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=yes], [HAVE_OSS=no])
293 AC_CHECK_LIB(ossaudio, _oss_ioctl, [oss_ldflags="$oss_ldflags -lossaudio"], [])
296 ########################################################################### alsa
298 LIB_ARG_WITH([alsa], [-lasound])
300 AC_CHECK_HEADER(alsa/asoundlib.h, [], HAVE_ALSA=no)
301 AC_CHECK_LIB([asound], [snd_pcm_open], [], HAVE_ALSA=no)
302 LIB_SUBST_FLAGS(alsa)
304 ######################################################################### pthread
306 LIB_ARG_WITH([pthread], [-lpthread])
308 AC_CHECK_HEADER(pthread.h, [], HAVE_PTHREAD=no)
309 AC_CHECK_LIB([pthread], [pthread_create], [], HAVE_PTHREAD=no)
310 LIB_SUBST_FLAGS(pthread)
312 ########################################################################### libao
314 LIB_ARG_WITH([ao], [-lao])
316 AC_CHECK_HEADER(ao/ao.h, [], HAVE_AO=no)
317 AC_CHECK_LIB([ao], [ao_initialize], [], HAVE_AO=no)
320 AC_DEFUN([NEED_AO_OBJECTS], [{ test $HAVE_AO = yes -a $HAVE_PTHREAD = yes; }])
321 ######################################################################## readline
323 AC_SEARCH_LIBS([tgetent], [tinfo curses terminfo termcap])
324 LIB_ARG_WITH([readline], [-lreadline $LIBS])
326 AC_CHECK_HEADER([readline/readline.h], [], [HAVE_READLINE=no])
327 AC_CHECK_LIB([readline], [rl_free_keymap], [], HAVE_READLINE=no)
330 [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)],
334 #include <readline/readline.h>
337 LIB_SUBST_FLAGS(readline)
339 ############################################################# libsamplerate
341 LIB_ARG_WITH([samplerate], [-lsamplerate])
343 AC_CHECK_HEADER(samplerate.h, [], HAVE_SAMPLERATE=no)
344 AC_CHECK_LIB([samplerate], [src_process], [], HAVE_SAMPLERATE=no)
345 LIB_SUBST_FLAGS(samplerate)
347 ######################################################################### server
348 if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes; then
350 executables="$executables server"
351 server_cmdline_objs="server"
352 server_errlist_objs="
392 if test "$CRYPTOLIB" = openssl; then
393 server_errlist_objs="$server_errlist_objs crypt"
395 server_errlist_objs="$server_errlist_objs gcrypt"
397 NEED_OGG_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh_common"
398 NEED_VORBIS_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh"
399 NEED_SPEEX_OBJECTS() && server_errlist_objs="$server_errlist_objs spx_afh spx_common"
400 NEED_OPUS_OBJECTS() && server_errlist_objs="$server_errlist_objs opus_afh opus_common"
401 NEED_FLAC_OBJECTS && server_errlist_objs="$server_errlist_objs flac_afh"
402 if test $HAVE_FAAD = yes; then
403 server_errlist_objs="$server_errlist_objs aac_afh"
405 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
406 AC_SUBST(server_objs, add_dot_o($server_objs))
410 ############################################################# client
411 if test -n "$CRYPTOLIB"; then
413 executables="$executables client"
414 client_cmdline_objs="client"
415 client_errlist_objs="
432 if test "$CRYPTOLIB" = openssl; then
433 client_errlist_objs="$client_errlist_objs crypt"
435 client_errlist_objs="$client_errlist_objs gcrypt"
437 if test $HAVE_READLINE = yes; then
438 client_errlist_objs="$client_errlist_objs interactive"
440 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
441 AC_SUBST(client_objs, add_dot_o($client_objs))
445 ############################################################# audiod
446 if test -n "$CRYPTOLIB"; then
448 executables="$executables audiod"
449 audiod_audio_formats="wma"
450 audiod_cmdline_objs="$audiod_cmdline_objs
462 audiod_errlist_objs="$audiod_errlist_objs
501 if test "$CRYPTOLIB" = openssl; then
502 audiod_errlist_objs="$audiod_errlist_objs crypt"
504 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
506 NEED_VORBIS_OBJECTS && {
507 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
508 audiod_audio_formats="$audiod_audio_formats ogg"
510 NEED_SPEEX_OBJECTS && {
511 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
512 audiod_audio_formats="$audiod_audio_formats spx"
514 NEED_OPUS_OBJECTS && {
515 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
516 audiod_audio_formats="$audiod_audio_formats opus"
518 NEED_FLAC_OBJECTS && {
519 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
520 audiod_audio_formats="$audiod_audio_formats flac"
522 if test $HAVE_FAAD = yes; then
523 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter"
524 audiod_audio_formats="$audiod_audio_formats aac"
526 if test $HAVE_MAD = yes; then
527 audiod_audio_formats="$audiod_audio_formats mp3"
528 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
529 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
531 if test $HAVE_OSS = yes; then
532 audiod_errlist_objs="$audiod_errlist_objs oss_write"
533 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
535 if test $HAVE_ALSA = yes; then
536 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
537 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
540 audiod_errlist_objs="$audiod_errlist_objs ao_write"
541 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
543 if test $HAVE_SAMPLERATE = yes; then
544 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
545 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
547 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
548 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
550 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
551 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
552 enum of audio formats supported by audiod)
553 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
554 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
558 ########################################################################### fade
559 if test $HAVE_OSS = yes -o $HAVE_ALSA = yes; then
561 executables="$executables fade"
562 fade_cmdline_objs="fade"
563 fade_errlist_objs="fade exec string fd version ggo"
564 if test $HAVE_OSS = yes; then
565 fade_errlist_objs="$fade_errlist_objs oss_mix"
566 mixers="${mixers}oss "
567 default_mixer="OSS_MIX"
569 if test $HAVE_ALSA = yes; then
570 fade_errlist_objs="$fade_errlist_objs alsa_mix"
571 mixers="${mixers}alsa "
572 default_mixer="ALSA_MIX"
574 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
575 AC_SUBST(fade_objs, add_dot_o($fade_objs))
578 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
581 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
582 enum of supported mixers)
583 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
584 use this mixer if none was specified)
585 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
586 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
589 printf 'extern void '$i'_mix_init(struct mixer *); '
592 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
593 init functions of the supported mixers)
594 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
595 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
598 AC_MSG_WARN([no mixer support])
600 ########################################################################### gui
601 if test $HAVE_CURSES = yes; then
603 executables="$executables gui"
604 gui_cmdline_objs="gui"
619 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
620 AC_SUBST(gui_objs, add_dot_o($gui_objs))
623 AC_MSG_WARN([no curses lib, cannot build para_gui])
625 ######################################################################## filter
635 filter_errlist_objs="
660 filter_cmdline_objs="
667 NEED_VORBIS_OBJECTS && {
668 filters="$filters oggdec"
669 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
671 NEED_SPEEX_OBJECTS && {
672 filters="$filters spxdec"
673 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
675 NEED_OPUS_OBJECTS && {
676 filters="$filters opusdec"
677 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
679 NEED_FLAC_OBJECTS && {
680 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
681 filters="$filters flacdec"
683 if test $HAVE_FAAD = yes; then
684 filter_errlist_objs="$filter_errlist_objs aacdec_filter"
685 filters="$filters aacdec"
687 if test $HAVE_MAD = yes; then
688 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
689 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
690 filters="$filters mp3dec"
692 if test $HAVE_SAMPLERATE = yes; then
693 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
694 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
695 filters="$filters resample"
697 filters="$(echo $filters)"
699 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
701 AC_SUBST(filter_objs, add_dot_o($filter_objs))
703 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
704 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
705 enum of supported filters)
706 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
707 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
708 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
709 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
710 ########################################################################## recv
740 NEED_OGG_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
741 NEED_VORBIS_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh"
742 NEED_SPEEX_OBJECTS && recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
743 NEED_OPUS_OBJECTS && recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
744 NEED_FLAC_OBJECTS && recv_errlist_objs="$recv_errlist_objs flac_afh"
746 if test $HAVE_FAAD = yes; then
747 recv_errlist_objs="$recv_errlist_objs aac_afh"
749 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
750 AC_SUBST(receivers, "http dccp udp afh")
751 AC_SUBST(recv_objs, add_dot_o($recv_objs))
752 ########################################################################### afh
753 audio_format_handlers="mp3 wma"
754 afh_cmdline_objs="afh"
767 NEED_OGG_OBJECTS && afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
768 NEED_VORBIS_OBJECTS && {
769 afh_errlist_objs="$afh_errlist_objs ogg_afh"
770 audio_format_handlers="$audio_format_handlers ogg"
772 NEED_SPEEX_OBJECTS && {
773 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
774 audio_format_handlers="$audio_format_handlers spx"
776 NEED_OPUS_OBJECTS && {
777 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
778 audio_format_handlers="$audio_format_handlers opus"
780 NEED_FLAC_OBJECTS && {
781 afh_errlist_objs="$afh_errlist_objs flac_afh"
782 audio_format_handlers="$audio_format_handlers flac"
784 if test $HAVE_FAAD = yes; then
785 afh_errlist_objs="$afh_errlist_objs aac_afh"
786 audio_format_handlers="$audio_format_handlers aac"
789 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
791 AC_SUBST(afh_objs, add_dot_o($afh_objs))
792 ########################################################################## play
838 NEED_OGG_OBJECTS && play_errlist_objs="$play_errlist_objs ogg_afh_common"
839 NEED_VORBIS_OBJECTS && {
840 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
842 NEED_SPEEX_OBJECTS && {
843 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
846 play_errlist_objs="$play_errlist_objs
851 NEED_FLAC_OBJECTS && {
852 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
854 if test $HAVE_FAAD = yes; then
855 play_errlist_objs="$play_errlist_objs aac_afh aacdec_filter"
857 if test $HAVE_MAD = yes; then
858 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
859 play_errlist_objs="$play_errlist_objs mp3dec_filter"
861 if test $HAVE_OSS = yes; then
862 play_errlist_objs="$play_errlist_objs oss_write"
863 play_cmdline_objs="$play_cmdline_objs oss_write"
865 if test $HAVE_ALSA = yes; then
866 play_errlist_objs="$play_errlist_objs alsa_write"
867 play_cmdline_objs="$play_cmdline_objs alsa_write"
870 play_errlist_objs="$play_errlist_objs ao_write"
871 play_cmdline_objs="$play_cmdline_objs ao_write"
873 if test $HAVE_READLINE = yes; then
874 play_errlist_objs="$play_errlist_objs interactive"
876 if test $HAVE_SAMPLERATE = yes; then
877 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
878 play_cmdline_objs="$play_cmdline_objs resample_filter"
881 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
882 AC_SUBST(play_objs, add_dot_o($play_objs))
883 ######################################################################### write
903 default_writer="FILE_WRITE"
906 write_errlist_objs="$write_errlist_objs ao_write"
907 write_cmdline_objs="$write_cmdline_objs ao_write"
908 writers="$writers ao"
909 default_writer="AO_WRITE"
911 if test $HAVE_OSS = yes; then
912 write_errlist_objs="$write_errlist_objs oss_write"
913 write_cmdline_objs="$write_cmdline_objs oss_write"
914 writers="$writers oss"
915 default_writer="OSS_WRITE"
917 if test $HAVE_ALSA = yes; then
918 write_errlist_objs="$write_errlist_objs alsa_write"
919 write_cmdline_objs="$write_cmdline_objs alsa_write"
920 writers="$writers alsa"
921 default_writer="ALSA_WRITE"
924 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
925 AC_SUBST(write_objs, add_dot_o($write_objs))
926 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
927 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
928 enum of supported writers)
929 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
930 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
931 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
932 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
933 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
934 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
935 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
936 ######################################################################## audioc
937 audioc_cmdline_objs="audioc"
938 audioc_errlist_objs="
946 if test $HAVE_READLINE = yes; then
947 audioc_errlist_objs="$audioc_errlist_objs
954 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
955 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
956 ################################################################## status items
958 status_items="basename status num_played mtime bitrate frequency file_size
959 status_flags format score techinfo afs_mode
960 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
961 offset seconds_total stream_start current_time audiod_uptime image_id
962 lyrics_id duration directory lyrics_name image_name path hash channels
963 last_played num_chunks chunk_time amplification artist title year album
964 comment max_chunk_size"
967 for i in $status_items; do
968 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
970 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
971 [enum of all status items])
974 for i in $status_items; do
975 result="$result \"$i\", "
977 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
978 [char * array of all status items])
980 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
981 [formats supported by para_server and para_afh])
983 AC_SUBST(executables)
987 paraslash configuration:
988 ~~~~~~~~~~~~~~~~~~~~~~~~
989 crypto lib: ${CRYPTOLIB:-[none]}
990 unix socket credentials: $have_ucred
991 readline (interactive CLIs): $HAVE_READLINE
992 id3 version 2 support: $HAVE_ID3TAG
995 audio format handlers: $audio_format_handlers
996 filters: $(echo $filters)
999 para_server: $build_server
1000 para_gui: $build_gui
1001 para_fade: $build_fade
1002 para_client: $build_client
1003 para_audiod: $build_audiod