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([M4], [m4])
55 test -z "$M4" && AC_MSG_ERROR(
56 [The m4 macro processor is required to build this package])
58 AC_PATH_PROG([INSTALL], [install])
59 test -z "$INSTALL" && AC_MSG_ERROR(
60 [The install program is required to build this package])
62 AC_PATH_PROG([lopsubgen], [lopsubgen])
63 test -z "$lopsubgen" && AC_MSG_ERROR(
64 [lopsubgen is required to build this package])
69 executables="recv filter audioc write afh play"
70 ################################################################## clock_gettime
72 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
73 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
75 if test -n "$clock_gettime_lib"; then
76 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
77 define to 1 if clock_gettime() is supported])
79 if test "$clock_gettime_lib" = "rt"; then
80 AC_SUBST(clock_gettime_ldflags, -lrt)
83 ########################################################################### osl
85 LIB_ARG_WITH([osl], [-losl])
87 AC_CHECK_HEADER(osl.h, [], [HAVE_OSL=no])
88 AC_CHECK_LIB([osl], [osl_open_table], [], [HAVE_OSL=no])
91 ######################################################################## lopsub
93 LIB_ARG_WITH([lopsub], [-llopsub])
95 AC_CHECK_HEADER(lopsub.h, [], [HAVE_LOPSUB=no])
96 AC_CHECK_LIB([lopsub], [lls_merge], [], [HAVE_LOPSUB=yes])
97 if test $HAVE_LOPSUB = no; then AC_MSG_ERROR([
98 The lopsub library is required to build this software, but
99 the above checks indicate it is not installed on your system.
100 Run the following command to download a copy.
101 git clone git://git.tuebingen.mpg.de/lopsub.git
102 Install the library, then run this configure script again.
105 LIB_SUBST_FLAGS([lopsub])
107 ######################################################################## openssl
110 LIB_ARG_WITH([openssl], [-lssl -lcrypto])
111 AC_CHECK_HEADER(openssl/ssl.h, [], [HAVE_OPENSSL=no])
112 AC_CHECK_LIB([crypto], [RAND_bytes], [], [HAVE_OPENSSL=no])
113 LIB_SUBST_FLAGS(openssl)
114 if test $HAVE_OPENSSL = yes; then
115 AC_CHECK_LIB([crypto], [RSA_set0_key],
116 AC_DEFINE([HAVE_RSA_SET0_KEY], [1], [openssl-1.1]))
119 ######################################################################### gcrypt
122 LIB_ARG_WITH([gcrypt], [-lgcrypt])
123 AC_CHECK_HEADER(gcrypt.h, [], [HAVE_GCRYPT=no])
124 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [HAVE_GCRYPT=no])
125 LIB_SUBST_FLAGS(gcrypt)
127 ######################################################################### crypto
128 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
129 Force using crypto library "lib". This package requires either
130 openssl or libgcrypt being installed. Possible values for "lib"
131 are thus "openssl" and "gcrypt". If this option is not given,
132 openssl is tried first. If openssl was not found, gcrypt is
135 CRYPTOLIB="$enable_cryptolib"
136 case "$enable_cryptolib" in
138 test $HAVE_OPENSSL = no && AC_MSG_ERROR(openssl not found)
139 crypto_ldflags="$openssl_ldflags"
142 test $HAVE_GCRYPT = no && AC_MSG_ERROR(gcrypt not found)
143 crypto_ldflags="$gcrypt_ldflags"
147 if test $HAVE_GCRYPT = yes; then
149 crypto_ldflags="$gcrypt_ldflags"
151 if test $HAVE_OPENSSL = yes; then
153 crypto_ldflags="$openssl_ldflags"
157 AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib])
160 AC_SUBST(crypto_ldflags)
161 ########################################################################## iconv
164 AC_SEARCH_LIBS([libiconv_open], [iconv],
165 [iconv_ldflags="$LIBS"],
168 AC_SUBST(iconv_ldflags)
169 AC_MSG_CHECKING([whether iconv needs const char ** cast])
174 size_t iconv(iconv_t cd, const char **inbuf,
175 size_t *inbytesleft, char **outbuf,
176 size_t *outbytesleft);
179 [cast='(const char **)'; msg=yes],
182 AC_DEFINE_UNQUOTED(ICONV_CAST, $cast, [cast for second arg to iconv()])
185 ########################################################################### ucred
186 AC_MSG_CHECKING(for struct ucred)
187 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
188 #include <sys/types.h>
189 #include <sys/socket.h>
191 struct ucred sucred; sucred.pid=0;
192 ]])],[have_ucred=yes],[have_ucred=no])
193 AC_MSG_RESULT($have_ucred)
194 if test ${have_ucred} = yes; then
195 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
197 ########################################################################### curses
199 LIB_ARG_WITH([curses], [])
201 AC_CHECK_HEADER(curses.h, [], [HAVE_CURSES=no])
202 AC_SEARCH_LIBS([initscr], [ncursesw curses], [], [HAVE_CURSES=no])
203 curses_ldflags="$curses_ldflags $LIBS"
204 LIB_SUBST_FLAGS(curses)
206 ########################################################################### ip_mreqn
207 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
208 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
214 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
215 AC_MSG_RESULT($have_ip_mreqn)
216 if test ${have_ip_mreqn} = yes; then
217 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
219 ########################################################################### osx
221 AC_MSG_CHECKING(for CoreAudio (MacOs))
222 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
223 #include <CoreAudio/CoreAudio.h>
226 ]])],[have_core_audio=yes],[have_core_audio=no])
227 AC_MSG_RESULT($have_core_audio)
228 if test ${have_core_audio} = yes; then
229 f1="-framework CoreAudio"
230 f2="-framework AudioToolbox"
231 f3="-framework AudioUnit"
232 f4="-framework CoreServices"
233 core_audio_ldflags="$f1 $f2 $f3 $f4"
234 AC_SUBST(core_audio_ldflags)
235 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
237 ########################################################################### ogg
239 LIB_ARG_WITH([ogg], [-logg])
241 AC_CHECK_HEADERS([ogg/ogg.h], [], [HAVE_OGG=no])
242 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [HAVE_OGG=no])
243 AC_CHECK_LIB([ogg], [ogg_stream_flush_fill], [
244 AC_DEFINE(HAVE_OGG_STREAM_FLUSH_FILL, 1, [libogg >= 1.3.0])])
247 ######################################################################### vorbis
249 LIB_ARG_WITH([vorbis], [-lvorbis -lvorbisfile])
251 AC_CHECK_HEADERS([vorbis/codec.h], [], [HAVE_VORBIS=no])
252 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [HAVE_VORBIS=no])
253 LIB_SUBST_FLAGS(vorbis)
255 ######################################################################### speex
257 LIB_ARG_WITH([speex], [-lspeex])
259 AC_CHECK_HEADERS([speex/speex.h], [], [HAVE_SPEEX=no])
260 AC_CHECK_LIB([speex], [speex_decoder_init], [], [HAVE_SPEEX=no])
261 LIB_SUBST_FLAGS(speex)
263 ######################################################################### opus
265 LIB_ARG_WITH([opus], [-lopus])
267 AC_CHECK_HEADERS([opus/opus.h], [], [HAVE_OPUS=no])
268 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [HAVE_OPUS=no])
269 LIB_SUBST_FLAGS(opus)
271 ########################################################################### flac
273 LIB_ARG_WITH([flac], [-lFLAC -lm])
275 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], HAVE_FLAC=no)
276 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], HAVE_FLAC=no)
277 LIB_SUBST_FLAGS(flac)
280 # some helper functions for codecs which use the ogg container format
281 AC_DEFUN([NEED_OGG_OBJECTS], [{
282 test "$HAVE_OGG" = 'yes' -a \( \
283 "$HAVE_VORBIS" = 'yes' \
284 -o "$HAVE_SPEEX" = 'yes' \
285 -o "$HAVE_OPUS" = 'yes' \
286 -o "$HAVE_FLAC" = 'yes' \
289 AC_DEFUN([NEED_VORBIS_OBJECTS], [{
290 test "$HAVE_OGG" = 'yes' -a "$HAVE_VORBIS" = 'yes'
292 AC_DEFUN([NEED_SPEEX_OBJECTS], [{
293 test "$HAVE_OGG" = 'yes' -a "$HAVE_SPEEX" = 'yes'
295 AC_DEFUN([NEED_OPUS_OBJECTS], [{
296 test "$HAVE_OGG" = 'yes' -a "$HAVE_OPUS" = 'yes'
298 AC_DEFUN([NEED_FLAC_OBJECTS], [{
299 test "$HAVE_OGG" = 'yes' -a "$HAVE_FLAC" = 'yes'
301 ########################################################################### faad
303 LIB_ARG_WITH([faad], [-lfaad])
305 AC_CHECK_HEADER(neaacdec.h, [], HAVE_FAAD=no)
306 AC_CHECK_LIB([faad], [NeAACDecOpen], [], HAVE_FAAD=no)
307 LIB_SUBST_FLAGS(faad)
309 ########################################################################### mad
311 LIB_ARG_WITH([mad], [-lmad])
313 AC_CHECK_HEADER(mad.h, [], HAVE_MAD=no)
314 AC_CHECK_LIB([mad], [mad_stream_init], [], HAVE_MAD=no)
317 ###################################################################### libid3tag
319 LIB_ARG_WITH([id3tag], [-lid3tag -lz])
321 AC_CHECK_HEADER(id3tag.h, [], HAVE_ID3TAG=no)
322 AC_CHECK_LIB([id3tag], [id3_file_fdopen], [], HAVE_ID3TAG=no)
323 LIB_SUBST_FLAGS(id3tag)
325 ########################################################################### oss
327 LIB_ARG_WITH([oss], [])
328 AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=yes], [HAVE_OSS=no])
329 AC_CHECK_LIB(ossaudio, _oss_ioctl, [oss_ldflags="$oss_ldflags -lossaudio"], [])
332 ########################################################################### alsa
334 LIB_ARG_WITH([alsa], [-lasound])
336 AC_CHECK_HEADER(alsa/asoundlib.h, [], HAVE_ALSA=no)
337 AC_CHECK_LIB([asound], [snd_pcm_open], [], HAVE_ALSA=no)
338 LIB_SUBST_FLAGS(alsa)
340 ######################################################################### pthread
342 LIB_ARG_WITH([pthread], [-lpthread])
344 AC_CHECK_HEADER(pthread.h, [], HAVE_PTHREAD=no)
345 AC_CHECK_LIB([pthread], [pthread_create], [], HAVE_PTHREAD=no)
346 LIB_SUBST_FLAGS(pthread)
348 ########################################################################### libao
350 LIB_ARG_WITH([ao], [-lao])
352 AC_CHECK_HEADER(ao/ao.h, [], HAVE_AO=no)
353 AC_CHECK_LIB([ao], [ao_initialize], [], HAVE_AO=no)
356 AC_DEFUN([NEED_AO_OBJECTS], [{ test $HAVE_AO = yes -a $HAVE_PTHREAD = yes; }])
357 ######################################################################## readline
359 AC_SEARCH_LIBS([tgetent], [tinfo curses terminfo termcap])
360 LIB_ARG_WITH([readline], [-lreadline $LIBS])
362 AC_CHECK_HEADER([readline/readline.h], [], [HAVE_READLINE=no])
363 AC_CHECK_LIB([readline], [rl_free_keymap], [], HAVE_READLINE=no)
366 [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)],
370 #include <readline/readline.h>
373 LIB_SUBST_FLAGS(readline)
375 ############################################################# libsamplerate
377 LIB_ARG_WITH([samplerate], [-lsamplerate])
379 AC_CHECK_HEADER(samplerate.h, [], HAVE_SAMPLERATE=no)
380 AC_CHECK_LIB([samplerate], [src_process], [], HAVE_SAMPLERATE=no)
381 LIB_SUBST_FLAGS(samplerate)
383 ########################################################################## mp4v2
385 LIB_ARG_WITH([mp4v2], [-lmp4v2])
387 AC_CHECK_HEADER([mp4v2/mp4v2.h], [], [HAVE_MP4V2=no])
388 AC_CHECK_LIB([mp4v2], [MP4Read], [], [HAVE_MP4V2=no])
389 LIB_SUBST_FLAGS(mp4v2)
391 ######################################################################### server
392 if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes; then
394 executables="$executables server"
395 server_errlist_objs="
434 if test "$CRYPTOLIB" = openssl; then
435 server_errlist_objs="$server_errlist_objs crypt"
437 server_errlist_objs="$server_errlist_objs gcrypt"
439 NEED_OGG_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh_common"
440 NEED_VORBIS_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh"
441 NEED_SPEEX_OBJECTS() && server_errlist_objs="$server_errlist_objs spx_afh spx_common"
442 NEED_OPUS_OBJECTS() && server_errlist_objs="$server_errlist_objs opus_afh opus_common"
443 NEED_FLAC_OBJECTS && server_errlist_objs="$server_errlist_objs flac_afh"
444 if test $HAVE_FAAD = yes && test $HAVE_MP4V2 = yes; then
445 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
447 server_objs="$server_errlist_objs"
448 AC_SUBST(server_objs, add_dot_o($server_objs))
452 ############################################################# client
453 if test -n "$CRYPTOLIB"; then
455 executables="$executables client"
456 client_errlist_objs="
472 if test "$CRYPTOLIB" = openssl; then
473 client_errlist_objs="$client_errlist_objs crypt"
475 client_errlist_objs="$client_errlist_objs gcrypt"
477 if test $HAVE_READLINE = yes; then
478 client_errlist_objs="$client_errlist_objs interactive"
480 client_objs="$client_errlist_objs"
481 AC_SUBST(client_objs, add_dot_o($client_errlist_objs))
485 ############################################################# audiod
486 if test -n "$CRYPTOLIB"; then
488 executables="$executables audiod"
489 audiod_audio_formats="wma"
490 audiod_errlist_objs="$audiod_errlist_objs
528 if test "$CRYPTOLIB" = openssl; then
529 audiod_errlist_objs="$audiod_errlist_objs crypt"
531 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
533 if test "$have_core_audio" = "yes"; then
534 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
536 NEED_VORBIS_OBJECTS && {
537 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
538 audiod_audio_formats="$audiod_audio_formats ogg"
540 NEED_SPEEX_OBJECTS && {
541 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
542 audiod_audio_formats="$audiod_audio_formats spx"
544 NEED_OPUS_OBJECTS && {
545 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
546 audiod_audio_formats="$audiod_audio_formats opus"
548 NEED_FLAC_OBJECTS && {
549 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
550 audiod_audio_formats="$audiod_audio_formats flac"
552 if test $HAVE_FAAD = yes; then
553 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
554 audiod_audio_formats="$audiod_audio_formats aac"
556 if test $HAVE_MAD = yes; then
557 audiod_audio_formats="$audiod_audio_formats mp3"
558 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
560 if test $HAVE_OSS = yes; then
561 audiod_errlist_objs="$audiod_errlist_objs oss_write"
563 if test $HAVE_ALSA = yes; then
564 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
567 audiod_errlist_objs="$audiod_errlist_objs ao_write"
569 if test $HAVE_SAMPLERATE = yes; then
570 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
572 audiod_objs="$audiod_errlist_objs"
573 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
575 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
576 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
577 enum of audio formats supported by audiod)
578 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
579 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
583 ########################################################################### mixer
584 if test $HAVE_OSS = yes -o $HAVE_ALSA = yes; then
586 executables="$executables mixer"
587 mixer_errlist_objs="mixer exec string fd version"
588 if test $HAVE_OSS = yes; then
589 mixer_errlist_objs="$mixer_errlist_objs oss_mix"
590 mixers="${mixers}oss "
591 default_mixer="OSS_MIX"
593 if test $HAVE_ALSA = yes; then
594 mixer_errlist_objs="$mixer_errlist_objs alsa_mix"
595 mixers="${mixers}alsa "
596 default_mixer="ALSA_MIX"
598 mixer_objs="$mixer_errlist_objs"
599 AC_SUBST(mixer_objs, add_dot_o($mixer_objs))
602 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
605 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
606 enum of supported mixers)
607 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
608 use this mixer if none was specified)
609 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
610 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
613 printf 'extern void '$i'_mix_init(struct mixer *); '
616 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
617 init functions of the supported mixers)
618 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
619 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
622 AC_MSG_WARN([no mixer support])
624 ########################################################################### gui
625 if test $HAVE_CURSES = yes; then
627 executables="$executables gui"
641 gui_objs="$gui_errlist_objs"
642 AC_SUBST(gui_objs, add_dot_o($gui_objs))
645 AC_MSG_WARN([no curses lib, cannot build para_gui])
647 ######################################################################## filter
648 filter_errlist_objs="
672 NEED_VORBIS_OBJECTS && filter_errlist_objs="$filter_errlist_objs oggdec_filter"
673 NEED_SPEEX_OBJECTS && filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
674 NEED_OPUS_OBJECTS && filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
675 NEED_FLAC_OBJECTS && filter_errlist_objs="$filter_errlist_objs flacdec_filter"
676 if test $HAVE_FAAD = yes; then
677 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
679 if test $HAVE_MAD = yes; then
680 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
682 if test $HAVE_SAMPLERATE = yes; then
683 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
685 filter_objs="$filter_errlist_objs"
687 AC_SUBST(filter_objs, add_dot_o($filter_objs))
688 ########################################################################## recv
709 NEED_OGG_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
710 NEED_VORBIS_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh"
711 NEED_SPEEX_OBJECTS && recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
712 NEED_OPUS_OBJECTS && recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
713 NEED_FLAC_OBJECTS && recv_errlist_objs="$recv_errlist_objs flac_afh"
715 if test $HAVE_FAAD = yes -a $HAVE_MP4V2 = yes; then
716 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
718 recv_objs="$recv_errlist_objs"
719 AC_SUBST(recv_objs, add_dot_o($recv_objs))
720 ########################################################################### afh
721 audio_format_handlers="mp3 wma"
733 NEED_OGG_OBJECTS && afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
734 NEED_VORBIS_OBJECTS && {
735 afh_errlist_objs="$afh_errlist_objs ogg_afh"
736 audio_format_handlers="$audio_format_handlers ogg"
738 NEED_SPEEX_OBJECTS && {
739 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
740 audio_format_handlers="$audio_format_handlers spx"
742 NEED_OPUS_OBJECTS && {
743 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
744 audio_format_handlers="$audio_format_handlers opus"
746 NEED_FLAC_OBJECTS && {
747 afh_errlist_objs="$afh_errlist_objs flac_afh"
748 audio_format_handlers="$audio_format_handlers flac"
750 if test $HAVE_FAAD = yes -a $HAVE_MP4V2 = yes; then
751 afh_errlist_objs="$afh_errlist_objs aac_afh aac_common"
752 audio_format_handlers="$audio_format_handlers aac"
755 afh_objs="$afh_errlist_objs"
757 AC_SUBST(afh_objs, add_dot_o($afh_objs))
758 ########################################################################## play
791 if test "$have_core_audio" = "yes"; then
792 play_errlist_objs="$play_errlist_objs osx_write ipc"
794 NEED_OGG_OBJECTS && play_errlist_objs="$play_errlist_objs ogg_afh_common"
795 NEED_VORBIS_OBJECTS && {
796 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
798 NEED_SPEEX_OBJECTS && {
799 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
802 play_errlist_objs="$play_errlist_objs
807 NEED_FLAC_OBJECTS && {
808 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
810 if test $HAVE_FAAD = yes; then
811 play_errlist_objs="$play_errlist_objs aacdec_filter"
813 if test $HAVE_MP4V2 = yes; then
814 play_errlist_objs="$play_errlist_objs aac_afh"
816 if test $HAVE_MP4V2 = yes || test $HAVE_FAAD = yes; then
817 play_errlist_objs="$play_errlist_objs aac_common"
819 if test $HAVE_MAD = yes; then
820 play_errlist_objs="$play_errlist_objs mp3dec_filter"
822 if test $HAVE_OSS = yes; then
823 play_errlist_objs="$play_errlist_objs oss_write"
825 if test $HAVE_ALSA = yes; then
826 play_errlist_objs="$play_errlist_objs alsa_write"
829 play_errlist_objs="$play_errlist_objs ao_write"
831 if test $HAVE_READLINE = yes; then
832 play_errlist_objs="$play_errlist_objs interactive"
834 if test $HAVE_SAMPLERATE = yes; then
835 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
838 play_objs="$play_errlist_objs"
839 AC_SUBST(play_objs, add_dot_o($play_objs))
840 ######################################################################### write
855 if test "$have_core_audio" = "yes"; then
856 write_errlist_objs="$write_errlist_objs osx_write ipc"
859 write_errlist_objs="$write_errlist_objs ao_write"
861 if test $HAVE_OSS = yes; then
862 write_errlist_objs="$write_errlist_objs oss_write"
864 if test $HAVE_ALSA = yes; then
865 write_errlist_objs="$write_errlist_objs alsa_write"
867 write_objs="$write_errlist_objs"
868 AC_SUBST(write_objs, add_dot_o($write_objs))
869 ######################################################################## audioc
870 audioc_errlist_objs="
877 if test $HAVE_READLINE = yes; then
878 audioc_errlist_objs="$audioc_errlist_objs
885 audioc_objs="$audioc_errlist_objs"
886 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
887 ################################################################## status items
889 status_items="basename status num_played mtime bitrate frequency file_size
890 status_flags format score techinfo afs_mode
891 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
892 offset seconds_total stream_start current_time audiod_uptime image_id
893 lyrics_id duration directory lyrics_name image_name path hash channels
894 last_played num_chunks chunk_time amplification artist title year album
898 for i in $status_items; do
899 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
901 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
902 [enum of all status items])
905 for i in $status_items; do
906 result="$result \"$i\", "
908 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
909 [char * array of all status items])
911 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
912 [formats supported by para_server and para_afh])
914 AC_SUBST(executables)
918 paraslash configuration:
919 ~~~~~~~~~~~~~~~~~~~~~~~~
920 crypto lib: ${CRYPTOLIB:-[none]}
921 unix socket credentials: $have_ucred
922 readline (interactive CLIs): $HAVE_READLINE
923 id3 version 2 support: $HAVE_ID3TAG
926 audio format handlers: $audio_format_handlers
928 para_server: $build_server
930 para_mixer: $build_mixer
931 para_client: $build_client
932 para_audiod: $build_audiod