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])
66 AC_PATH_PROG([INSTALL], [install])
67 test -z "$INSTALL" && AC_MSG_ERROR(
68 [The install program is required to build this package])
73 executables="recv filter audioc write afh play"
74 ########################################################################### osl
76 LIB_ARG_WITH([osl], [-losl])
78 AC_CHECK_HEADER(osl.h, [], [HAVE_OSL=no])
79 AC_CHECK_LIB([osl], [osl_open_table], [], [HAVE_OSL=no])
82 ######################################################################## openssl
85 LIB_ARG_WITH([openssl], [-lssl -lcrypto])
86 AC_CHECK_HEADER(openssl/ssl.h, [], [HAVE_OPENSSL=no])
87 AC_CHECK_LIB([crypto], [RAND_bytes], [], [HAVE_OPENSSL=no])
88 LIB_SUBST_FLAGS(openssl)
89 if test $HAVE_OPENSSL = yes; then
90 AC_CHECK_LIB([crypto], [RSA_set0_key],
91 AC_DEFINE([HAVE_RSA_SET0_KEY], [1], [openssl-1.1]))
94 ######################################################################### gcrypt
97 LIB_ARG_WITH([gcrypt], [-lgcrypt])
98 AC_CHECK_HEADER(gcrypt.h, [], [HAVE_GCRYPT=no])
99 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [HAVE_GCRYPT=no])
100 LIB_SUBST_FLAGS(gcrypt)
102 ######################################################################### crypto
103 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
104 Force using crypto library "lib". This package requires either
105 openssl or libgcrypt being installed. Possible values for "lib"
106 are thus "openssl" and "gcrypt". If this option is not given,
107 openssl is tried first. If openssl was not found, gcrypt is
110 CRYPTOLIB="$enable_cryptolib"
111 case "$enable_cryptolib" in
113 test $HAVE_OPENSSL = no && AC_MSG_ERROR(openssl not found)
114 crypto_ldflags="$openssl_ldflags"
117 test $HAVE_GCRYPT = no && AC_MSG_ERROR(gcrypt not found)
118 crypto_ldflags="$gcrypt_ldflags"
122 if test $HAVE_GCRYPT = yes; then
124 crypto_ldflags="$gcrypt_ldflags"
126 if test $HAVE_OPENSSL = yes; then
128 crypto_ldflags="$openssl_ldflags"
132 AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib])
135 AC_SUBST(crypto_ldflags)
136 ########################################################################## iconv
139 AC_SEARCH_LIBS([libiconv_open], [iconv],
140 [iconv_ldflags="$LIBS"],
143 AC_SUBST(iconv_ldflags)
144 AC_MSG_CHECKING([whether iconv needs const char ** cast])
149 size_t iconv(iconv_t cd, const char **inbuf,
150 size_t *inbytesleft, char **outbuf,
151 size_t *outbytesleft);
154 [cast='(const char **)'; msg=yes],
157 AC_DEFINE_UNQUOTED(ICONV_CAST, $cast, [cast for second arg to iconv()])
160 ########################################################################### ucred
161 AC_MSG_CHECKING(for struct ucred)
162 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
163 #include <sys/types.h>
164 #include <sys/socket.h>
166 struct ucred sucred; sucred.pid=0;
167 ]])],[have_ucred=yes],[have_ucred=no])
168 AC_MSG_RESULT($have_ucred)
169 if test ${have_ucred} = yes; then
170 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
172 ########################################################################### gengetopt
173 echo 'option "z" z "" flag off' | $GENGETOPT --file-name conftest-ggo &&
175 [gengetopt_args_info_description],
176 [ggo_descriptions_declared=yes],
177 [ggo_descriptions_declared=no],
178 [#include "conftest-ggo.h"]
180 AC_SUBST(ggo_descriptions_declared)
181 ########################################################################### curses
183 LIB_ARG_WITH([curses], [])
185 AC_CHECK_HEADER(curses.h, [], [HAVE_CURSES=no])
186 AC_SEARCH_LIBS([initscr], [ncursesw curses], [], [HAVE_CURSES=no])
187 curses_ldflags="$curses_ldflags $LIBS"
188 LIB_SUBST_FLAGS(curses)
190 ########################################################################### ip_mreqn
191 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
192 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
198 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
199 AC_MSG_RESULT($have_ip_mreqn)
200 if test ${have_ip_mreqn} = yes; then
201 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
203 ########################################################################### ogg
205 LIB_ARG_WITH([ogg], [-logg])
207 AC_CHECK_HEADERS([ogg/ogg.h], [], [HAVE_OGG=no])
208 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [HAVE_OGG=no])
209 AC_CHECK_LIB([ogg], [ogg_stream_flush_fill], [
210 AC_DEFINE(HAVE_OGG_STREAM_FLUSH_FILL, 1, [libogg >= 1.3.0])])
213 ######################################################################### vorbis
215 LIB_ARG_WITH([vorbis], [-lvorbis -lvorbisfile])
217 AC_CHECK_HEADERS([vorbis/codec.h], [], [HAVE_VORBIS=no])
218 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [HAVE_VORBIS=no])
219 LIB_SUBST_FLAGS(vorbis)
221 ######################################################################### speex
223 LIB_ARG_WITH([speex], [-lspeex])
225 AC_CHECK_HEADERS([speex/speex.h], [], [HAVE_SPEEX=no])
226 AC_CHECK_LIB([speex], [speex_decoder_init], [], [HAVE_SPEEX=no])
227 LIB_SUBST_FLAGS(speex)
229 ######################################################################### opus
231 LIB_ARG_WITH([opus], [-lopus])
233 AC_CHECK_HEADERS([opus/opus.h], [], [HAVE_OPUS=no])
234 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [HAVE_OPUS=no])
235 LIB_SUBST_FLAGS(opus)
237 ########################################################################### flac
239 LIB_ARG_WITH([flac], [-lFLAC -lm])
241 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], HAVE_FLAC=no)
242 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], HAVE_FLAC=no)
243 LIB_SUBST_FLAGS(flac)
246 # some helper functions for codecs which use the ogg container format
247 AC_DEFUN([NEED_OGG_OBJECTS], [{
248 test "$HAVE_OGG" = 'yes' -a \( \
249 "$HAVE_VORBIS" = 'yes' \
250 -o "$HAVE_SPEEX" = 'yes' \
251 -o "$HAVE_OPUS" = 'yes' \
252 -o "$HAVE_FLAC" = 'yes' \
255 AC_DEFUN([NEED_VORBIS_OBJECTS], [{
256 test "$HAVE_OGG" = 'yes' -a "$HAVE_VORBIS" = 'yes'
258 AC_DEFUN([NEED_SPEEX_OBJECTS], [{
259 test "$HAVE_OGG" = 'yes' -a "$HAVE_SPEEX" = 'yes'
261 AC_DEFUN([NEED_OPUS_OBJECTS], [{
262 test "$HAVE_OGG" = 'yes' -a "$HAVE_OPUS" = 'yes'
264 AC_DEFUN([NEED_FLAC_OBJECTS], [{
265 test "$HAVE_OGG" = 'yes' -a "$HAVE_FLAC" = 'yes'
267 ########################################################################### faad
269 LIB_ARG_WITH([faad], [-lfaad])
271 AC_CHECK_HEADER(neaacdec.h, [], HAVE_FAAD=no)
272 AC_CHECK_LIB([faad], [NeAACDecOpen], [], HAVE_FAAD=no)
273 LIB_SUBST_FLAGS(faad)
275 ########################################################################### mad
277 LIB_ARG_WITH([mad], [-lmad])
279 AC_CHECK_HEADER(mad.h, [], HAVE_MAD=no)
280 AC_CHECK_LIB([mad], [mad_stream_init], [], HAVE_MAD=no)
283 ###################################################################### libid3tag
285 LIB_ARG_WITH([id3tag], [-lid3tag -lz])
287 AC_CHECK_HEADER(id3tag.h, [], HAVE_ID3TAG=no)
288 AC_CHECK_LIB([id3tag], [id3_file_fdopen], [], HAVE_ID3TAG=no)
289 LIB_SUBST_FLAGS(id3tag)
291 ########################################################################### oss
293 LIB_ARG_WITH([oss], [])
294 AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=yes], [HAVE_OSS=no])
295 AC_CHECK_LIB(ossaudio, _oss_ioctl, [oss_ldflags="$oss_ldflags -lossaudio"], [])
298 ########################################################################### alsa
300 LIB_ARG_WITH([alsa], [-lasound])
302 AC_CHECK_HEADER(alsa/asoundlib.h, [], HAVE_ALSA=no)
303 AC_CHECK_LIB([asound], [snd_pcm_open], [], HAVE_ALSA=no)
304 LIB_SUBST_FLAGS(alsa)
306 ######################################################################### pthread
308 LIB_ARG_WITH([pthread], [-lpthread])
310 AC_CHECK_HEADER(pthread.h, [], HAVE_PTHREAD=no)
311 AC_CHECK_LIB([pthread], [pthread_create], [], HAVE_PTHREAD=no)
312 LIB_SUBST_FLAGS(pthread)
314 ########################################################################### libao
316 LIB_ARG_WITH([ao], [-lao])
318 AC_CHECK_HEADER(ao/ao.h, [], HAVE_AO=no)
319 AC_CHECK_LIB([ao], [ao_initialize], [], HAVE_AO=no)
322 AC_DEFUN([NEED_AO_OBJECTS], [{ test $HAVE_AO = yes -a $HAVE_PTHREAD = yes; }])
323 ######################################################################## readline
325 AC_SEARCH_LIBS([tgetent], [tinfo curses terminfo termcap])
326 LIB_ARG_WITH([readline], [-lreadline $LIBS])
328 AC_CHECK_HEADER([readline/readline.h], [], [HAVE_READLINE=no])
329 AC_CHECK_LIB([readline], [rl_free_keymap], [], HAVE_READLINE=no)
332 [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)],
336 #include <readline/readline.h>
339 LIB_SUBST_FLAGS(readline)
341 ############################################################# libsamplerate
343 LIB_ARG_WITH([samplerate], [-lsamplerate])
345 AC_CHECK_HEADER(samplerate.h, [], HAVE_SAMPLERATE=no)
346 AC_CHECK_LIB([samplerate], [src_process], [], HAVE_SAMPLERATE=no)
347 LIB_SUBST_FLAGS(samplerate)
349 ########################################################################## mp4v2
351 LIB_ARG_WITH([mp4v2], [-lmp4v2])
353 AC_CHECK_HEADER([mp4v2/mp4v2.h], [], [HAVE_MP4V2=no])
354 AC_CHECK_LIB([mp4v2], [MP4Read], [], [HAVE_MP4V2=no])
355 LIB_SUBST_FLAGS(mp4v2)
357 ######################################################################### server
358 if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes; then
360 executables="$executables server"
361 server_cmdline_objs="server"
362 server_errlist_objs="
402 if test "$CRYPTOLIB" = openssl; then
403 server_errlist_objs="$server_errlist_objs crypt"
405 server_errlist_objs="$server_errlist_objs gcrypt"
407 NEED_OGG_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh_common"
408 NEED_VORBIS_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh"
409 NEED_SPEEX_OBJECTS() && server_errlist_objs="$server_errlist_objs spx_afh spx_common"
410 NEED_OPUS_OBJECTS() && server_errlist_objs="$server_errlist_objs opus_afh opus_common"
411 NEED_FLAC_OBJECTS && server_errlist_objs="$server_errlist_objs flac_afh"
412 if test $HAVE_FAAD = yes && test $HAVE_MP4V2 = yes; then
413 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
415 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
416 AC_SUBST(server_objs, add_dot_o($server_objs))
420 ############################################################# client
421 if test -n "$CRYPTOLIB"; then
423 executables="$executables client"
424 client_cmdline_objs="client"
425 client_errlist_objs="
442 if test "$CRYPTOLIB" = openssl; then
443 client_errlist_objs="$client_errlist_objs crypt"
445 client_errlist_objs="$client_errlist_objs gcrypt"
447 if test $HAVE_READLINE = yes; then
448 client_errlist_objs="$client_errlist_objs interactive"
450 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
451 AC_SUBST(client_objs, add_dot_o($client_objs))
455 ############################################################# audiod
456 if test -n "$CRYPTOLIB"; then
458 executables="$executables audiod"
459 audiod_audio_formats="wma"
460 audiod_cmdline_objs="$audiod_cmdline_objs
472 audiod_errlist_objs="$audiod_errlist_objs
511 if test "$CRYPTOLIB" = openssl; then
512 audiod_errlist_objs="$audiod_errlist_objs crypt"
514 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
516 NEED_VORBIS_OBJECTS && {
517 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
518 audiod_audio_formats="$audiod_audio_formats ogg"
520 NEED_SPEEX_OBJECTS && {
521 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
522 audiod_audio_formats="$audiod_audio_formats spx"
524 NEED_OPUS_OBJECTS && {
525 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
526 audiod_audio_formats="$audiod_audio_formats opus"
528 NEED_FLAC_OBJECTS && {
529 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
530 audiod_audio_formats="$audiod_audio_formats flac"
532 if test $HAVE_FAAD = yes; then
533 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
534 audiod_audio_formats="$audiod_audio_formats aac"
536 if test $HAVE_MAD = yes; then
537 audiod_audio_formats="$audiod_audio_formats mp3"
538 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
539 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
541 if test $HAVE_OSS = yes; then
542 audiod_errlist_objs="$audiod_errlist_objs oss_write"
543 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
545 if test $HAVE_ALSA = yes; then
546 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
547 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
550 audiod_errlist_objs="$audiod_errlist_objs ao_write"
551 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
553 if test $HAVE_SAMPLERATE = yes; then
554 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
555 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
557 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
558 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
560 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
561 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
562 enum of audio formats supported by audiod)
563 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
564 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
568 ########################################################################### fade
569 if test $HAVE_OSS = yes -o $HAVE_ALSA = yes; then
571 executables="$executables fade"
572 fade_cmdline_objs="fade"
573 fade_errlist_objs="fade exec string fd version ggo"
574 if test $HAVE_OSS = yes; then
575 fade_errlist_objs="$fade_errlist_objs oss_mix"
576 mixers="${mixers}oss "
577 default_mixer="OSS_MIX"
579 if test $HAVE_ALSA = yes; then
580 fade_errlist_objs="$fade_errlist_objs alsa_mix"
581 mixers="${mixers}alsa "
582 default_mixer="ALSA_MIX"
584 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
585 AC_SUBST(fade_objs, add_dot_o($fade_objs))
588 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
591 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
592 enum of supported mixers)
593 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
594 use this mixer if none was specified)
595 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
596 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
599 printf 'extern void '$i'_mix_init(struct mixer *); '
602 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
603 init functions of the supported mixers)
604 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
605 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
608 AC_MSG_WARN([no mixer support])
610 ########################################################################### gui
611 if test $HAVE_CURSES = yes; then
613 executables="$executables gui"
614 gui_cmdline_objs="gui"
629 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
630 AC_SUBST(gui_objs, add_dot_o($gui_objs))
633 AC_MSG_WARN([no curses lib, cannot build para_gui])
635 ######################################################################## filter
645 filter_errlist_objs="
670 filter_cmdline_objs="
677 NEED_VORBIS_OBJECTS && {
678 filters="$filters oggdec"
679 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
681 NEED_SPEEX_OBJECTS && {
682 filters="$filters spxdec"
683 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
685 NEED_OPUS_OBJECTS && {
686 filters="$filters opusdec"
687 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
689 NEED_FLAC_OBJECTS && {
690 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
691 filters="$filters flacdec"
693 if test $HAVE_FAAD = yes; then
694 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
695 filters="$filters aacdec"
697 if test $HAVE_MAD = yes; then
698 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
699 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
700 filters="$filters mp3dec"
702 if test $HAVE_SAMPLERATE = yes; then
703 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
704 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
705 filters="$filters resample"
707 filters="$(echo $filters)"
709 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
711 AC_SUBST(filter_objs, add_dot_o($filter_objs))
713 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
714 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
715 enum of supported filters)
716 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
717 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
718 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
719 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
720 ########################################################################## recv
750 NEED_OGG_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
751 NEED_VORBIS_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh"
752 NEED_SPEEX_OBJECTS && recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
753 NEED_OPUS_OBJECTS && recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
754 NEED_FLAC_OBJECTS && recv_errlist_objs="$recv_errlist_objs flac_afh"
756 if test $HAVE_FAAD = yes -a $HAVE_MP4V2 = yes; then
757 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
759 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
760 AC_SUBST(receivers, "http dccp udp afh")
761 AC_SUBST(recv_objs, add_dot_o($recv_objs))
762 ########################################################################### afh
763 audio_format_handlers="mp3 wma"
764 afh_cmdline_objs="afh"
777 NEED_OGG_OBJECTS && afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
778 NEED_VORBIS_OBJECTS && {
779 afh_errlist_objs="$afh_errlist_objs ogg_afh"
780 audio_format_handlers="$audio_format_handlers ogg"
782 NEED_SPEEX_OBJECTS && {
783 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
784 audio_format_handlers="$audio_format_handlers spx"
786 NEED_OPUS_OBJECTS && {
787 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
788 audio_format_handlers="$audio_format_handlers opus"
790 NEED_FLAC_OBJECTS && {
791 afh_errlist_objs="$afh_errlist_objs flac_afh"
792 audio_format_handlers="$audio_format_handlers flac"
794 if test $HAVE_FAAD = yes -a $HAVE_MP4V2 = yes; then
795 afh_errlist_objs="$afh_errlist_objs aac_afh aac_common"
796 audio_format_handlers="$audio_format_handlers aac"
799 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
801 AC_SUBST(afh_objs, add_dot_o($afh_objs))
802 ########################################################################## play
848 NEED_OGG_OBJECTS && play_errlist_objs="$play_errlist_objs ogg_afh_common"
849 NEED_VORBIS_OBJECTS && {
850 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
852 NEED_SPEEX_OBJECTS && {
853 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
856 play_errlist_objs="$play_errlist_objs
861 NEED_FLAC_OBJECTS && {
862 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
864 if test $HAVE_FAAD = yes; then
865 play_errlist_objs="$play_errlist_objs aacdec_filter"
867 if test $HAVE_MP4V2 = yes; then
868 play_errlist_objs="$play_errlist_objs aac_afh"
870 if test $HAVE_MP4V2 = yes || test $HAVE_FAAD = yes; then
871 play_errlist_objs="$play_errlist_objs aac_common"
873 if test $HAVE_MAD = yes; then
874 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
875 play_errlist_objs="$play_errlist_objs mp3dec_filter"
877 if test $HAVE_OSS = yes; then
878 play_errlist_objs="$play_errlist_objs oss_write"
879 play_cmdline_objs="$play_cmdline_objs oss_write"
881 if test $HAVE_ALSA = yes; then
882 play_errlist_objs="$play_errlist_objs alsa_write"
883 play_cmdline_objs="$play_cmdline_objs alsa_write"
886 play_errlist_objs="$play_errlist_objs ao_write"
887 play_cmdline_objs="$play_cmdline_objs ao_write"
889 if test $HAVE_READLINE = yes; then
890 play_errlist_objs="$play_errlist_objs interactive"
892 if test $HAVE_SAMPLERATE = yes; then
893 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
894 play_cmdline_objs="$play_cmdline_objs resample_filter"
897 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
898 AC_SUBST(play_objs, add_dot_o($play_objs))
899 ######################################################################### write
919 default_writer="FILE_WRITE"
922 write_errlist_objs="$write_errlist_objs ao_write"
923 write_cmdline_objs="$write_cmdline_objs ao_write"
924 writers="$writers ao"
925 default_writer="AO_WRITE"
927 if test $HAVE_OSS = yes; then
928 write_errlist_objs="$write_errlist_objs oss_write"
929 write_cmdline_objs="$write_cmdline_objs oss_write"
930 writers="$writers oss"
931 default_writer="OSS_WRITE"
933 if test $HAVE_ALSA = yes; then
934 write_errlist_objs="$write_errlist_objs alsa_write"
935 write_cmdline_objs="$write_cmdline_objs alsa_write"
936 writers="$writers alsa"
937 default_writer="ALSA_WRITE"
940 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
941 AC_SUBST(write_objs, add_dot_o($write_objs))
942 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
943 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
944 enum of supported writers)
945 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
946 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
947 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
948 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
949 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
950 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
951 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
952 ######################################################################## audioc
953 audioc_cmdline_objs="audioc"
954 audioc_errlist_objs="
962 if test $HAVE_READLINE = yes; then
963 audioc_errlist_objs="$audioc_errlist_objs
970 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
971 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
972 ################################################################## status items
974 status_items="basename status num_played mtime bitrate frequency file_size
975 status_flags format score techinfo afs_mode
976 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
977 offset seconds_total stream_start current_time audiod_uptime image_id
978 lyrics_id duration directory lyrics_name image_name path hash channels
979 last_played num_chunks chunk_time amplification artist title year album
983 for i in $status_items; do
984 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
986 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
987 [enum of all status items])
990 for i in $status_items; do
991 result="$result \"$i\", "
993 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
994 [char * array of all status items])
996 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
997 [formats supported by para_server and para_afh])
999 AC_SUBST(executables)
1003 paraslash configuration:
1004 ~~~~~~~~~~~~~~~~~~~~~~~~
1005 crypto lib: ${CRYPTOLIB:-[none]}
1006 unix socket credentials: $have_ucred
1007 readline (interactive CLIs): $HAVE_READLINE
1008 id3 version 2 support: $HAVE_ID3TAG
1012 audio format handlers: $audio_format_handlers
1013 filters: $(echo $filters)
1016 para_server: $build_server
1017 para_gui: $build_gui
1018 para_fade: $build_fade
1019 para_client: $build_client
1020 para_audiod: $build_audiod