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])
267 AC_CHECK_HEADER(neaacdec.h, [], HAVE_FAAD=no)
268 AC_CHECK_LIB([faad], [NeAACDecOpen], [], HAVE_FAAD=no)
269 LIB_SUBST_FLAGS(faad)
271 ########################################################################### mad
273 LIB_ARG_WITH([mad], [-lmad])
275 AC_CHECK_HEADER(mad.h, [], HAVE_MAD=no)
276 AC_CHECK_LIB([mad], [mad_stream_init], [], HAVE_MAD=no)
279 ###################################################################### libid3tag
281 LIB_ARG_WITH([id3tag], [-lid3tag -lz])
283 AC_CHECK_HEADER(id3tag.h, [], HAVE_ID3TAG=no)
284 AC_CHECK_LIB([id3tag], [id3_file_fdopen], [], HAVE_ID3TAG=no)
285 LIB_SUBST_FLAGS(id3tag)
287 ########################################################################### oss
289 LIB_ARG_WITH([oss], [])
290 AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=yes], [HAVE_OSS=no])
291 AC_CHECK_LIB(ossaudio, _oss_ioctl, [oss_ldflags="$oss_ldflags -lossaudio"], [])
294 ########################################################################### alsa
296 LIB_ARG_WITH([alsa], [-lasound])
298 AC_CHECK_HEADER(alsa/asoundlib.h, [], HAVE_ALSA=no)
299 AC_CHECK_LIB([asound], [snd_pcm_open], [], HAVE_ALSA=no)
300 LIB_SUBST_FLAGS(alsa)
302 ######################################################################### pthread
304 LIB_ARG_WITH([pthread], [-lpthread])
306 AC_CHECK_HEADER(pthread.h, [], HAVE_PTHREAD=no)
307 AC_CHECK_LIB([pthread], [pthread_create], [], HAVE_PTHREAD=no)
308 LIB_SUBST_FLAGS(pthread)
310 ########################################################################### libao
312 LIB_ARG_WITH([ao], [-lao])
314 AC_CHECK_HEADER(ao/ao.h, [], HAVE_AO=no)
315 AC_CHECK_LIB([ao], [ao_initialize], [], HAVE_AO=no)
318 AC_DEFUN([NEED_AO_OBJECTS], [{ test $HAVE_AO = yes -a $HAVE_PTHREAD = yes; }])
319 ######################################################################## readline
321 AC_SEARCH_LIBS([tgetent], [tinfo curses terminfo termcap])
322 LIB_ARG_WITH([readline], [-lreadline $LIBS])
324 AC_CHECK_HEADER([readline/readline.h], [], [HAVE_READLINE=no])
325 AC_CHECK_LIB([readline], [rl_free_keymap], [], HAVE_READLINE=no)
328 [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)],
332 #include <readline/readline.h>
335 LIB_SUBST_FLAGS(readline)
337 ############################################################# libsamplerate
339 LIB_ARG_WITH([samplerate], [-lsamplerate])
341 AC_CHECK_HEADER(samplerate.h, [], HAVE_SAMPLERATE=no)
342 AC_CHECK_LIB([samplerate], [src_process], [], HAVE_SAMPLERATE=no)
343 LIB_SUBST_FLAGS(samplerate)
345 ########################################################################## mp4v2
347 LIB_ARG_WITH([mp4v2], [-lmp4v2])
349 AC_CHECK_HEADER([mp4v2/mp4v2.h], [], [HAVE_MP4V2=no])
350 AC_CHECK_LIB([mp4v2], [MP4Read], [], [HAVE_MP4V2=no])
351 LIB_SUBST_FLAGS(mp4v2)
353 ######################################################################### server
354 if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes; then
356 executables="$executables server"
357 server_cmdline_objs="server"
358 server_errlist_objs="
398 if test "$CRYPTOLIB" = openssl; then
399 server_errlist_objs="$server_errlist_objs crypt"
401 server_errlist_objs="$server_errlist_objs gcrypt"
403 NEED_OGG_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh_common"
404 NEED_VORBIS_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh"
405 NEED_SPEEX_OBJECTS() && server_errlist_objs="$server_errlist_objs spx_afh spx_common"
406 NEED_OPUS_OBJECTS() && server_errlist_objs="$server_errlist_objs opus_afh opus_common"
407 NEED_FLAC_OBJECTS && server_errlist_objs="$server_errlist_objs flac_afh"
408 if test $HAVE_FAAD = yes && test $HAVE_MP4V2 = yes; then
409 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
411 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
412 AC_SUBST(server_objs, add_dot_o($server_objs))
416 ############################################################# client
417 if test -n "$CRYPTOLIB"; then
419 executables="$executables client"
420 client_cmdline_objs="client"
421 client_errlist_objs="
438 if test "$CRYPTOLIB" = openssl; then
439 client_errlist_objs="$client_errlist_objs crypt"
441 client_errlist_objs="$client_errlist_objs gcrypt"
443 if test $HAVE_READLINE = yes; then
444 client_errlist_objs="$client_errlist_objs interactive"
446 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
447 AC_SUBST(client_objs, add_dot_o($client_objs))
451 ############################################################# audiod
452 if test -n "$CRYPTOLIB"; then
454 executables="$executables audiod"
455 audiod_audio_formats="wma"
456 audiod_cmdline_objs="$audiod_cmdline_objs
468 audiod_errlist_objs="$audiod_errlist_objs
507 if test "$CRYPTOLIB" = openssl; then
508 audiod_errlist_objs="$audiod_errlist_objs crypt"
510 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
512 NEED_VORBIS_OBJECTS && {
513 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
514 audiod_audio_formats="$audiod_audio_formats ogg"
516 NEED_SPEEX_OBJECTS && {
517 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
518 audiod_audio_formats="$audiod_audio_formats spx"
520 NEED_OPUS_OBJECTS && {
521 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
522 audiod_audio_formats="$audiod_audio_formats opus"
524 NEED_FLAC_OBJECTS && {
525 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
526 audiod_audio_formats="$audiod_audio_formats flac"
528 if test $HAVE_FAAD = yes; then
529 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
530 audiod_audio_formats="$audiod_audio_formats aac"
532 if test $HAVE_MAD = yes; then
533 audiod_audio_formats="$audiod_audio_formats mp3"
534 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
535 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
537 if test $HAVE_OSS = yes; then
538 audiod_errlist_objs="$audiod_errlist_objs oss_write"
539 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
541 if test $HAVE_ALSA = yes; then
542 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
543 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
546 audiod_errlist_objs="$audiod_errlist_objs ao_write"
547 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
549 if test $HAVE_SAMPLERATE = yes; then
550 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
551 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
553 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
554 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
556 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
557 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
558 enum of audio formats supported by audiod)
559 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
560 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
564 ########################################################################### fade
565 if test $HAVE_OSS = yes -o $HAVE_ALSA = yes; then
567 executables="$executables fade"
568 fade_cmdline_objs="fade"
569 fade_errlist_objs="fade exec string fd version ggo"
570 if test $HAVE_OSS = yes; then
571 fade_errlist_objs="$fade_errlist_objs oss_mix"
572 mixers="${mixers}oss "
573 default_mixer="OSS_MIX"
575 if test $HAVE_ALSA = yes; then
576 fade_errlist_objs="$fade_errlist_objs alsa_mix"
577 mixers="${mixers}alsa "
578 default_mixer="ALSA_MIX"
580 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
581 AC_SUBST(fade_objs, add_dot_o($fade_objs))
584 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
587 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
588 enum of supported mixers)
589 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
590 use this mixer if none was specified)
591 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
592 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
595 printf 'extern void '$i'_mix_init(struct mixer *); '
598 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
599 init functions of the supported mixers)
600 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
601 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
604 AC_MSG_WARN([no mixer support])
606 ########################################################################### gui
607 if test $HAVE_CURSES = yes; then
609 executables="$executables gui"
610 gui_cmdline_objs="gui"
625 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
626 AC_SUBST(gui_objs, add_dot_o($gui_objs))
629 AC_MSG_WARN([no curses lib, cannot build para_gui])
631 ######################################################################## filter
641 filter_errlist_objs="
666 filter_cmdline_objs="
673 NEED_VORBIS_OBJECTS && {
674 filters="$filters oggdec"
675 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
677 NEED_SPEEX_OBJECTS && {
678 filters="$filters spxdec"
679 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
681 NEED_OPUS_OBJECTS && {
682 filters="$filters opusdec"
683 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
685 NEED_FLAC_OBJECTS && {
686 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
687 filters="$filters flacdec"
689 if test $HAVE_FAAD = yes; then
690 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
691 filters="$filters aacdec"
693 if test $HAVE_MAD = yes; then
694 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
695 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
696 filters="$filters mp3dec"
698 if test $HAVE_SAMPLERATE = yes; then
699 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
700 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
701 filters="$filters resample"
703 filters="$(echo $filters)"
705 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
707 AC_SUBST(filter_objs, add_dot_o($filter_objs))
709 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
710 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
711 enum of supported filters)
712 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
713 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
714 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
715 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
716 ########################################################################## recv
746 NEED_OGG_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
747 NEED_VORBIS_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh"
748 NEED_SPEEX_OBJECTS && recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
749 NEED_OPUS_OBJECTS && recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
750 NEED_FLAC_OBJECTS && recv_errlist_objs="$recv_errlist_objs flac_afh"
752 if test $HAVE_FAAD = yes -a $HAVE_MP4V2 = yes; then
753 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
755 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
756 AC_SUBST(receivers, "http dccp udp afh")
757 AC_SUBST(recv_objs, add_dot_o($recv_objs))
758 ########################################################################### afh
759 audio_format_handlers="mp3 wma"
760 afh_cmdline_objs="afh"
773 NEED_OGG_OBJECTS && afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
774 NEED_VORBIS_OBJECTS && {
775 afh_errlist_objs="$afh_errlist_objs ogg_afh"
776 audio_format_handlers="$audio_format_handlers ogg"
778 NEED_SPEEX_OBJECTS && {
779 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
780 audio_format_handlers="$audio_format_handlers spx"
782 NEED_OPUS_OBJECTS && {
783 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
784 audio_format_handlers="$audio_format_handlers opus"
786 NEED_FLAC_OBJECTS && {
787 afh_errlist_objs="$afh_errlist_objs flac_afh"
788 audio_format_handlers="$audio_format_handlers flac"
790 if test $HAVE_FAAD = yes -a $HAVE_MP4V2 = yes; then
791 afh_errlist_objs="$afh_errlist_objs aac_afh aac_common"
792 audio_format_handlers="$audio_format_handlers aac"
795 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
797 AC_SUBST(afh_objs, add_dot_o($afh_objs))
798 ########################################################################## play
844 NEED_OGG_OBJECTS && play_errlist_objs="$play_errlist_objs ogg_afh_common"
845 NEED_VORBIS_OBJECTS && {
846 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
848 NEED_SPEEX_OBJECTS && {
849 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
852 play_errlist_objs="$play_errlist_objs
857 NEED_FLAC_OBJECTS && {
858 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
860 if test $HAVE_FAAD = yes; then
861 play_errlist_objs="$play_errlist_objs aacdec_filter"
863 if test $HAVE_MP4V2 = yes; then
864 play_errlist_objs="$play_errlist_objs aac_afh"
866 if test $HAVE_MP4V2 = yes || test $HAVE_FAAD = yes; then
867 play_errlist_objs="$play_errlist_objs aac_common"
869 if test $HAVE_MAD = yes; then
870 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
871 play_errlist_objs="$play_errlist_objs mp3dec_filter"
873 if test $HAVE_OSS = yes; then
874 play_errlist_objs="$play_errlist_objs oss_write"
875 play_cmdline_objs="$play_cmdline_objs oss_write"
877 if test $HAVE_ALSA = yes; then
878 play_errlist_objs="$play_errlist_objs alsa_write"
879 play_cmdline_objs="$play_cmdline_objs alsa_write"
882 play_errlist_objs="$play_errlist_objs ao_write"
883 play_cmdline_objs="$play_cmdline_objs ao_write"
885 if test $HAVE_READLINE = yes; then
886 play_errlist_objs="$play_errlist_objs interactive"
888 if test $HAVE_SAMPLERATE = yes; then
889 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
890 play_cmdline_objs="$play_cmdline_objs resample_filter"
893 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
894 AC_SUBST(play_objs, add_dot_o($play_objs))
895 ######################################################################### write
915 default_writer="FILE_WRITE"
918 write_errlist_objs="$write_errlist_objs ao_write"
919 write_cmdline_objs="$write_cmdline_objs ao_write"
920 writers="$writers ao"
921 default_writer="AO_WRITE"
923 if test $HAVE_OSS = yes; then
924 write_errlist_objs="$write_errlist_objs oss_write"
925 write_cmdline_objs="$write_cmdline_objs oss_write"
926 writers="$writers oss"
927 default_writer="OSS_WRITE"
929 if test $HAVE_ALSA = yes; then
930 write_errlist_objs="$write_errlist_objs alsa_write"
931 write_cmdline_objs="$write_cmdline_objs alsa_write"
932 writers="$writers alsa"
933 default_writer="ALSA_WRITE"
936 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
937 AC_SUBST(write_objs, add_dot_o($write_objs))
938 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
939 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
940 enum of supported writers)
941 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
942 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
943 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
944 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
945 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
946 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
947 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
948 ######################################################################## audioc
949 audioc_cmdline_objs="audioc"
950 audioc_errlist_objs="
958 if test $HAVE_READLINE = yes; then
959 audioc_errlist_objs="$audioc_errlist_objs
966 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
967 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
968 ################################################################## status items
970 status_items="basename status num_played mtime bitrate frequency file_size
971 status_flags format score techinfo afs_mode
972 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
973 offset seconds_total stream_start current_time audiod_uptime image_id
974 lyrics_id duration directory lyrics_name image_name path hash channels
975 last_played num_chunks chunk_time amplification artist title year album
979 for i in $status_items; do
980 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
982 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
983 [enum of all status items])
986 for i in $status_items; do
987 result="$result \"$i\", "
989 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
990 [char * array of all status items])
992 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
993 [formats supported by para_server and para_afh])
995 AC_SUBST(executables)
999 paraslash configuration:
1000 ~~~~~~~~~~~~~~~~~~~~~~~~
1001 crypto lib: ${CRYPTOLIB:-[none]}
1002 unix socket credentials: $have_ucred
1003 readline (interactive CLIs): $HAVE_READLINE
1004 id3 version 2 support: $HAVE_ID3TAG
1008 audio format handlers: $audio_format_handlers
1009 filters: $(echo $filters)
1012 para_server: $build_server
1013 para_gui: $build_gui
1014 para_fade: $build_fade
1015 para_client: $build_client
1016 para_audiod: $build_audiod