2 # Process this file with autoconf to produce a configure script.
6 AC_INIT([paraslash], [m4_esyscmd_s(./GIT-VERSION-GEN)],
7 [maan@tuebingen.mpg.de], [], [http://people.tuebingen.mpg.de/maan/paraslash/])
8 AC_CONFIG_HEADERS([config.h])
10 AC_CONFIG_FILES([Makefile])
11 AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
12 AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
13 AC_DEFUN([make_errlist_defines], \
15 printf "DEFINE_ERRLIST($(echo $i | tr 'a-z' 'A-Z'));"; \
18 AC_DEFUN([make_para_errlists], \
20 printf "PARA_ERRLIST($(echo $i | tr 'a-z' 'A-Z')), "; \
23 AC_DEFUN([objlist_to_errlist],[ \
24 make_errlist_defines($@) \
25 [const char **para_errlist[[]]] = {make_para_errlists($@)} \
27 AC_DEFUN([LIB_ARG_WITH], [
28 AC_ARG_WITH($1-headers, [AS_HELP_STRING(--with-$1-headers=dir,
29 [look for $1 headers in dir])])
30 AC_ARG_WITH($1-libs, [AS_HELP_STRING(--with-$1-libs=dir,
31 [look for $1 libraries in dir])])
32 if test -n "$with_$1_headers"; then
33 $1_cppflags="-I$with_$1_headers"
34 CPPFLAGS="$CPPFLAGS $$1_cppflags"
36 if test -n "$with_$1_libs"; then
37 $1_ldflags="-L$with_$1_libs $2"
41 LDFLAGS="$LDFLAGS $$1_ldflags"
44 AC_DEFUN([STASH_FLAGS], [
45 OLD_CPPFLAGS="$CPPFLAGS"
46 OLD_LDFLAGS="$LDFLAGS"
50 AC_DEFUN([UNSTASH_FLAGS], [
51 CPPFLAGS="$OLD_CPPFLAGS"
52 LDFLAGS="$OLD_LDFLAGS"
55 AC_DEFUN([LIB_SUBST_FLAGS], [
56 if test "$HAVE_[]m4_toupper([$1])" == 'yes'; then
57 AC_DEFINE(HAVE_[]m4_toupper([$1]), 1,
58 define to 1 to turn on $1 support)
63 AC_SUBST(HAVE_[]m4_toupper([$1]))
68 AC_PATH_PROG(UNAMEPATH, uname, no)
69 if test "$UNAMEPATH" = "no"; then
70 AC_MSG_ERROR(unable to determine system type)
72 AC_MSG_CHECKING(os type)
73 OSTYPE="`$UNAMEPATH -s`"
74 AC_MSG_RESULT("$OSTYPE")
76 if test "$OSTYPE" = "SunOS"; then
77 # needed on SunOS for socket magic
78 arch_cppflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
79 AC_SUBST(arch_cppflags)
84 AC_PATH_PROG([gengetopt], [gengetopt])
85 test -z "$gengetopt" && AC_MSG_ERROR(
86 [gengetopt is required to build this package])
88 AC_PATH_PROG([help2man], [help2man])
89 test -z "$help2man" && AC_MSG_ERROR(
90 [help2man is required to build this package])
92 AC_PATH_PROG([install], [install])
93 test -z "$install" && AC_MSG_ERROR(
94 [The install program is required to build this package])
99 executables="recv filter audioc write afh play"
100 ################################################################## clock_gettime
102 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
103 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
105 if test -n "$clock_gettime_lib"; then
106 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
107 define to 1 if clock_gettime() is supported])
109 if test "$clock_gettime_lib" = "rt"; then
110 AC_SUBST(clock_gettime_ldflags, -lrt)
113 ########################################################################### osl
115 LIB_ARG_WITH([osl], [-losl])
117 AC_CHECK_HEADER(osl.h, [], [HAVE_OSL=no])
118 AC_CHECK_LIB([osl], [osl_open_table], [], [HAVE_OSL=no])
121 ########################################################################### crypto
122 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
123 Force using crypto library "lib". This package requires either
124 openssl or libgcrypt being installed. Possible values for "lib"
125 are thus "openssl" and "gcrypt". If this option is not given,
126 openssl is tried first. If openssl was not found, gcrypt is
129 case "$enable_cryptolib" in
130 "openssl") check_openssl="yes"; check_gcrypt="no";;
131 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
132 "") check_openssl="yes"; check_gcrypt="yes";;
133 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
135 ###################################################################### openssl
136 if test "$check_openssl" = "yes"; then
137 OLD_CPPFLAGS="$CPPFLAGS"
138 OLD_LDFLAGS="$LDFLAGS"
141 AC_ARG_WITH(openssl_headers, [AS_HELP_STRING(--with-openssl-headers=dir,
142 [look for openssl headers also in dir])])
143 if test -n "$with_openssl_headers"; then
144 openssl_cppflags="-I$with_openssl_headers"
145 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
147 AC_ARG_WITH(openssl_libs, [AS_HELP_STRING(--with-openssl-libs=dir,
148 [look for openssl libraries also in dir])])
149 if test -n "$with_openssl_libs"; then
150 openssl_libs="-L$with_openssl_libs"
151 LDFLAGS="$LDFLAGS $openssl_libs"
153 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
154 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
155 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
156 # try harder: openssl is sometimes installed in /usr/local/ssl
157 openssl_cppflags="-I/usr/local/ssl/include"
158 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
159 openssl_libs="-L/usr/local/ssl/lib"
160 LDFLAGS="$LDFLAGS $openssl_libs"
162 unset ac_cv_header_openssl_ssl_h 2> /dev/null
163 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
164 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
165 if test "$have_openssl" = "yes"; then
166 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
169 if test "$have_openssl" = "yes"; then
170 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
171 AC_SUBST(openssl_cppflags)
172 openssl_ldflags="$openssl_libs -lssl -lcrypto"
173 AC_SUBST(openssl_ldflags)
177 AC_MSG_WARN([openssl libraries not found])
179 CPPFLAGS="$OLD_CPPFLAGS"
180 LDFLAGS="$OLD_LDFLAGS"
185 ########################################################################### gcrypt
186 if test "$check_gcrypt" = "yes"; then
187 OLD_CPPFLAGS="$CPPFLAGS"
188 OLD_LDFLAGS="$LDFLAGS"
191 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
192 [look for gcrypt headers also in dir])])
193 if test -n "$with_gcrypt_headers"; then
194 gcrypt_cppflags="-I$with_gcrypt_headers"
195 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
197 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
198 [look for libgcrypt also in dir])])
199 if test -n "$with_gcrypt_libs"; then
200 gcrypt_libs="-L$with_gcrypt_libs"
201 LDFLAGS="$LDFLAGS $gcrypt_libs"
203 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
204 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
205 if test "$have_gcrypt" = "yes"; then
206 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
207 AC_SUBST(gcrypt_cppflags)
208 gcrypt_ldflags="$gcrypt_libs -lgcrypt"
209 AC_SUBST(gcrypt_ldflags)
211 AC_MSG_WARN([gcrypt library not found])
213 CPPFLAGS="$OLD_CPPFLAGS"
214 LDFLAGS="$OLD_LDFLAGS"
219 ########################################################################### libsocket
220 AC_CHECK_LIB([c], [socket],
222 [socket_ldflags="-lsocket"]
224 AC_SUBST(socket_ldflags)
225 ########################################################################### libnsl
226 AC_CHECK_LIB([c], [gethostbyname],
228 [nsl_ldflags="-lnsl"]
230 AC_SUBST(nsl_ldflags)
231 ########################################################################### ucred
232 AC_MSG_CHECKING(for struct ucred)
233 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
235 #include <sys/types.h>
236 #include <sys/socket.h>
238 struct ucred sucred; sucred.pid=0;
239 ]])],[have_ucred=yes],[have_ucred=no])
240 AC_MSG_RESULT($have_ucred)
241 if test ${have_ucred} = yes; then
242 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
244 ########################################################################### gengetopt
245 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
247 [gengetopt_args_info_description],
248 [ggo_descriptions_declared=yes],
249 [ggo_descriptions_declared=no],
250 [#include "conftest-ggo.h"]
252 AC_SUBST(ggo_descriptions_declared)
253 ########################################################################### curses
255 OLD_CPPFLAGS="$CPPFLAGS"
256 OLD_LDFLAGS="$LDFLAGS"
258 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
259 [look for curses.h also in dir])])
260 if test -n "$with_curses_headers"; then
261 curses_cppflags="-I$with_curses_headers"
262 CPPFLAGS="$CPPFLAGS $curses_cppflags"
264 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
265 [look for libcurses also in dir])])
266 if test -n "$with_curses_libs"; then
267 curses_libs="-L$with_curses_libs"
268 LDFLAGS="$LDFLAGS $curses_libs"
270 AC_CHECK_HEADER(curses.h, [], [
273 curses_ldflags="$curses_libs"
274 AC_CHECK_LIB([ncursesw], [initscr],
275 [curses_ldflags="$curses_libs -lncursesw"], [
276 AC_CHECK_LIB([curses], [initscr],
277 [curses_ldflags="$curses_libs -lcurses"],
282 AC_SUBST(curses_cppflags)
283 AC_SUBST(curses_ldflags)
284 CPPFLAGS="$OLD_CPPFLAGS"
285 LDFLAGS="$OLD_LDFLAGS"
287 ########################################################################### ip_mreqn
288 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
289 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
295 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
296 AC_MSG_RESULT($have_ip_mreqn)
297 if test ${have_ip_mreqn} = yes; then
298 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
300 ########################################################################### osx
302 AC_MSG_CHECKING(for CoreAudio (MacOs))
303 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
304 #include <CoreAudio/CoreAudio.h>
307 ]])],[have_core_audio=yes],[have_core_audio=no])
308 AC_MSG_RESULT($have_core_audio)
309 if test ${have_core_audio} = yes; then
310 f1="-framework CoreAudio"
311 f2="-framework AudioToolbox"
312 f3="-framework AudioUnit"
313 f4="-framework CoreServices"
314 core_audio_ldflags="$f1 $f2 $f3 $f4"
315 AC_SUBST(core_audio_ldflags)
316 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
318 ########################################################################### ogg
320 LIB_ARG_WITH([ogg], [-logg])
322 AC_CHECK_HEADERS([ogg/ogg.h], [], [HAVE_OGG=no])
323 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [HAVE_OGG=no])
326 ######################################################################### vorbis
328 LIB_ARG_WITH([vorbis], [-lvorbis -lvorbisfile])
330 AC_CHECK_HEADERS([vorbis/codec.h], [], [HAVE_VORBIS=no])
331 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [HAVE_VORBIS=no])
332 LIB_SUBST_FLAGS(vorbis)
334 ######################################################################### speex
336 LIB_ARG_WITH([speex], [-lspeex])
338 AC_CHECK_HEADERS([speex/speex.h], [], [HAVE_SPEEX=no])
339 AC_CHECK_LIB([speex], [speex_decoder_init], [], [HAVE_SPEEX=no])
340 LIB_SUBST_FLAGS(speex)
343 AC_DEFUN([NEED_OGG_OBJECTS], [{
344 test "$HAVE_OGG" = 'yes' -a \( \
345 "$HAVE_VORBIS" = 'yes' \
346 -o "$HAVE_SPEEX" = 'yes' \
349 AC_DEFUN([NEED_VORBIS_OBJECTS], [{
350 test "$HAVE_OGG" = 'yes' -a "$HAVE_VORBIS" = 'yes'
352 AC_DEFUN([NEED_SPEEX_OBJECTS], [{
353 test "$HAVE_OGG" = 'yes' -a "$HAVE_SPEEX" = 'yes'
355 ####################################################### ogg/vorbis/speex/opus
356 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
357 [look for opus headers also in dir])])
358 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
359 [look for opus libs also in dir])])
362 if test "$HAVE_OGG" = 'yes'; then
365 OLD_CPPFLAGS="$CPPFLAGS"
366 OLD_LDFLAGS="$LDFLAGS"
368 if test -n "$with_opus_headers"; then
369 opus_cppflags="-I$with_opus_headers"
370 CPPFLAGS="$CPPFLAGS $opus_cppflags"
372 if test -n "$with_opus_libs"; then
373 opus_libs="-L$with_opus_libs"
374 LDFLAGS="$LDFLAGS $opus_libs"
376 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
377 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
378 CPPFLAGS="$OLD_CPPFLAGS"
379 LDFLAGS="$OLD_LDFLAGS"
382 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
386 if test "$have_opus" = "yes"; then
387 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
388 AC_SUBST(opus_cppflags)
389 opus_ldflags="$opus_libs -lopus"
390 AC_SUBST(opus_ldflags)
391 audio_format_handlers="$audio_format_handlers opus"
393 AC_MSG_WARN([no ogg/opus $msg])
395 ########################################################################### faad
397 OLD_CPPFLAGS="$CPPFLAGS"
398 OLD_LDFLAGS="$LDFLAGS"
400 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
401 [look for neaacdec.h also in dir])])
402 if test -n "$with_faad_headers"; then
403 faad_cppflags="-I$with_faad_headers"
404 CPPFLAGS="$CPPFLAGS $faad_cppflags"
406 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
407 [look for libfaad also in dir])])
408 if test -n "$with_faad_libs"; then
409 faad_libs="-L$with_faad_libs"
410 LDFLAGS="$LDFLAGS $faad_libs"
412 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
413 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
414 if test "$have_faad" = "yes"; then
415 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
416 AC_SUBST(faad_cppflags)
417 faad_ldflags="$faad_libs -lfaad"
418 AC_SUBST(faad_ldflags)
420 CPPFLAGS="$OLD_CPPFLAGS"
421 LDFLAGS="$OLD_LDFLAGS"
423 ########################################################################### mad
425 OLD_CPPFLAGS="$CPPFLAGS"
426 OLD_LDFLAGS="$LDFLAGS"
429 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
430 [look for mad.h also in dir])])
431 if test -n "$with_mad_headers"; then
432 mad_cppflags="-I$with_mad_headers"
433 CPPFLAGS="$CPPFLAGS $mad_cppflags"
435 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
436 [look for libmad also in dir])])
437 if test -n "$with_mad_libs"; then
438 mad_libs="-L$with_mad_libs"
439 LDFLAGS="$LDFLAGS $mad_libs"
441 AC_CHECK_HEADERS([mad.h], [], [
444 AC_CHECK_LIB([mad], [mad_stream_init], [], [
447 if test "$have_mad" = "yes"; then
448 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
449 AC_SUBST(mad_cppflags)
450 mad_ldflags="$mad_libs -lmad"
451 AC_SUBST(mad_ldflags)
453 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
455 CPPFLAGS="$OLD_CPPFLAGS"
456 LDFLAGS="$OLD_LDFLAGS"
458 ###################################################################### libid3tag
459 OLD_CPPFLAGS="$CPPFLAGS"
460 OLD_LDFLAGS="$LDFLAGS"
464 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
465 [look for id3tag header files also in dir])])
466 if test -n "$with_id3tag_headers"; then
467 id3tag_cppflags="-I$with_id3tag_headers"
468 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
470 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
471 [look for id3tag libs also in dir])])
472 if test -n "$with_id3tag_libs"; then
473 id3tag_libs="-L$with_id3tag_libs"
474 LDFLAGS="$LDFLAGS $id3tag_libs"
477 AC_MSG_CHECKING(for libid3tag)
478 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
481 struct id3_tag t = {.flags = 0};
482 ]])],[],[have_libid3tag=no])
483 AC_MSG_RESULT($have_libid3tag)
485 if test ${have_libid3tag} = yes; then
486 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
487 AC_SUBST(id3tag_cppflags)
488 AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
490 CPPFLAGS="$OLD_CPPFLAGS"
491 LDFLAGS="$OLD_LDFLAGS"
493 ########################################################################### flac
494 OLD_CPPFLAGS="$CPPFLAGS"
495 OLD_LDFLAGS="$LDFLAGS"
499 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
500 [look for flac headers also in dir])])
501 if test -n "$with_flac_headers"; then
502 flac_cppflags="-I$with_flac_headers"
503 CPPFLAGS="$CPPFLAGS $flac_cppflags"
505 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
506 [look for flac libs also in dir])])
507 if test -n "$with_flac_libs"; then
508 flac_libs="-L$with_flac_libs"
509 LDFLAGS="$LDFLAGS $flac_libs"
511 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
512 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], [
513 # nope, try again with -logg
514 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [],
515 have_flac=no, -lm -logg)
517 if test "$have_flac" = "yes"; then
518 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
519 AC_SUBST(flac_cppflags)
520 flac_ldflags="$flac_libs -lFLAC"
521 AC_SUBST(flac_ldflags)
523 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
525 CPPFLAGS="$OLD_CPPFLAGS"
526 LDFLAGS="$OLD_LDFLAGS"
528 ########################################################################### oss
529 OLD_CPPFLAGS="$CPPFLAGS"
530 OLD_LDFLAGS="$LDFLAGS"
534 msg="=> will not build oss writer"
536 AC_CHECK_HEADER(sys/soundcard.h, [
537 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
538 oss_ldflags="-lossaudio"
539 AC_SUBST(oss_ldflags)
545 AC_MSG_WARN([no sys/soundcard.h $msg])
548 CPPFLAGS="$OLD_CPPFLAGS"
549 LDFLAGS="$OLD_LDFLAGS"
552 ########################################################################### alsa
553 OLD_CPPFLAGS="$CPPFLAGS"
554 OLD_LDFLAGS="$LDFLAGS"
557 msg="=> no alsa support for para_audiod/para_write"
558 if test "$OSTYPE" != "Linux"; then
563 if test "$have_alsa" = "yes"; then
564 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
566 AC_MSG_WARN([no alsa/asoundlib $msg])
570 if test "$have_alsa" = "yes"; then
571 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
573 AC_MSG_WARN([no libasound $msg])
577 if test "$have_alsa" = "yes"; then
578 alsa_ldflags="-lasound"
579 AC_SUBST(alsa_ldflags)
582 CPPFLAGS="$OLD_CPPFLAGS"
583 LDFLAGS="$OLD_LDFLAGS"
585 ########################################################################### libao
586 OLD_CPPFLAGS="$CPPFLAGS"
587 OLD_LDFLAGS="$LDFLAGS"
591 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
592 [look for ao/ao.h also in dir])])
593 if test -n "$with_ao_headers"; then
594 ao_cppflags="-I$with_ao_headers"
595 CPPFLAGS="$CPPFLAGS $ao_cppflags"
597 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
598 [look for libao also in dir])])
599 if test -n "$with_ao_libs"; then
600 ao_libs="-L$with_ao_libs"
601 LDFLAGS="$LDFLAGS $ao_libs"
603 msg="no libao support for para_audiod/para_write"
604 AC_CHECK_HEADERS([ao/ao.h], [
607 AC_MSG_WARN([ao.h not found, $msg])
609 if test "$have_ao" = "yes"; then
610 AC_CHECK_LIB([ao], [ao_initialize], [], [
612 AC_MSG_WARN([ao lib not found or not working, $msg])
615 if test "$have_ao" = "yes"; then
616 AC_CHECK_HEADERS([pthread.h], [
619 AC_MSG_WARN([pthread.h not found, $msg])
622 if test "$have_ao" = "yes"; then
623 AC_CHECK_LIB([pthread], [pthread_create], [], [
625 AC_MSG_WARN([pthread lib not found or not working, $msg])
628 if test "$have_ao" = "yes"; then
629 AC_SUBST(ao_cppflags)
630 ao_ldflags="$ao_libs -lao -lpthread"
634 CPPFLAGS="$OLD_CPPFLAGS"
635 LDFLAGS="$OLD_LDFLAGS"
637 ############################################################# readline
638 OLD_CPPFLAGS="$CPPFLAGS"
639 OLD_LDFLAGS="$LDFLAGS"
643 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
644 [look for libreadline header files also in dir])])
645 if test -n "$with_readline_headers"; then
646 readline_cppflags="-I$with_readline_headers"
647 CPPFLAGS="$CPPFLAGS $readline_cppflags"
650 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
651 [look for readline library also in dir])])
652 if test -n "$with_readline_libs"; then
653 readline_libs="-L$with_readline_libs"
654 LDFLAGS="$LDFLAGS $readline_libs"
656 msg="no interactive cli support"
657 AC_CHECK_HEADERS([readline/readline.h], [
660 AC_MSG_WARN([readline/readline.h not found, $msg])
663 if test "$have_readline" = "yes"; then
664 readline_ldflags="$readline_libs"
665 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
666 readline_ldflags="$readline_ldflags -lreadline"
667 ], [have_readline="no"])
668 if test "$have_readline" = "no"; then # try with -lcurses
670 AC_MSG_NOTICE([trying again with -lcurses])
671 unset ac_cv_search_rl_free_keymap 2> /dev/null
672 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
674 readline_ldflags="$readline_ldflags -lreadline -lcurses"
677 if test "$have_readline" = "no"; then # try with -ltermcap
679 AC_MSG_NOTICE([trying again with -ltermcap])
680 unset ac_cv_search_rl_free_keymap 2> /dev/null
681 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
683 readline_ldflags="$readline_ldflags -lreadline -ltermcap"
688 if test "$have_readline" = "yes"; then
691 [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)],
695 #include <readline/readline.h>
698 AC_SUBST(readline_cppflags)
699 AC_SUBST(readline_ldflags)
700 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
702 AC_MSG_WARN([libreadline not found or unusable])
704 CPPFLAGS="$OLD_CPPFLAGS"
705 LDFLAGS="$OLD_LDFLAGS"
707 ############################################################# libsamplerate
708 OLD_CPPFLAGS="$CPPFLAGS"
709 OLD_LDFLAGS="$LDFLAGS"
712 have_samplerate="yes"
713 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
714 [look for samplerate headers also in dir])])
715 if test -n "$with_samplerate_headers"; then
716 samplerate_cppflags="-I$with_samplerate_headers"
717 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
719 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
720 [look for samplerate libs also in dir])])
721 if test -n "$with_samplerate_libs"; then
722 samplerate_libs="-L$with_samplerate_libs"
723 LDFLAGS="$LDFLAGS $samplerate_libs"
726 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
727 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
729 if test "$have_samplerate" = "yes"; then
730 AC_SUBST(samplerate_cppflags)
731 samplerate_ldflags="$samplerate_libs -lsamplerate"
732 AC_SUBST(samplerate_ldflags)
734 AC_MSG_WARN([no resample support in para_audiod/para_filter])
736 CPPFLAGS="$OLD_CPPFLAGS"
737 LDFLAGS="$OLD_LDFLAGS"
739 ######################################################################### server
740 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
741 -a "$HAVE_OSL" = "yes" ; then
744 executables="$executables server"
745 server_cmdline_objs="server"
746 server_errlist_objs="
785 if test "$have_openssl" = "yes"; then
786 server_errlist_objs="$server_errlist_objs crypt"
788 if test "$have_gcrypt" = "yes"; then
789 server_errlist_objs="$server_errlist_objs gcrypt"
791 NEED_OGG_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh_common"
792 NEED_VORBIS_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh"
793 NEED_SPEEX_OBJECTS() && server_errlist_objs="$server_errlist_objs spx_afh spx_common"
794 if test "$have_opus" = "yes"; then
795 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
797 if test "$have_faad" = "yes"; then
798 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
800 if test "$have_flac" = "yes"; then
801 server_errlist_objs="$server_errlist_objs flac_afh"
803 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
804 AC_SUBST(server_objs, add_dot_o($server_objs))
805 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
806 objlist_to_errlist($server_errlist_objs), errors used by para_server)
810 ############################################################# client
811 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
813 executables="$executables client"
814 client_cmdline_objs="client"
815 client_errlist_objs="
831 if test "$have_openssl" = "yes"; then
832 client_errlist_objs="$client_errlist_objs crypt"
834 if test "$have_gcrypt" = "yes"; then
835 client_errlist_objs="$client_errlist_objs gcrypt"
837 if test "$have_readline" = "yes"; then
838 client_errlist_objs="$client_errlist_objs interactive"
840 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
841 AC_SUBST(client_objs, add_dot_o($client_objs))
842 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
843 objlist_to_errlist($client_errlist_objs), errors used by para_client)
847 ############################################################# audiod
848 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
850 executables="$executables audiod"
851 audiod_audio_formats="wma"
852 audiod_cmdline_objs="$audiod_cmdline_objs
864 audiod_errlist_objs="$audiod_errlist_objs
902 if test "$have_openssl" = "yes"; then
903 audiod_errlist_objs="$audiod_errlist_objs crypt"
905 if test "$have_gcrypt" = "yes"; then
906 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
908 if test "$have_core_audio" = "yes"; then
909 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
910 audiod_cmdline_objs="$audiod_cmdline_objs osx_write"
912 NEED_VORBIS_OBJECTS && {
913 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
914 audiod_audio_formats="$audiod_audio_formats ogg"
916 NEED_SPEEX_OBJECTS && {
917 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
918 audiod_audio_formats="$audiod_audio_formats spx"
920 if test "$have_opus" = "yes"; then
921 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
922 audiod_audio_formats="$audiod_audio_formats opus"
924 if test "$have_faad" = "yes"; then
925 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
926 audiod_audio_formats="$audiod_audio_formats aac"
928 if test "$have_mad" = "yes"; then
929 audiod_audio_formats="$audiod_audio_formats mp3"
930 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
931 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
933 if test "$have_flac" = "yes"; then
934 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
935 audiod_audio_formats="$audiod_audio_formats flac"
937 if test "$have_oss" = "yes"; then
938 audiod_errlist_objs="$audiod_errlist_objs oss_write"
939 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
941 if test "$have_alsa" = "yes"; then
942 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
943 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
945 if test "$have_ao" = "yes"; then
946 audiod_errlist_objs="$audiod_errlist_objs ao_write"
947 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
949 if test "$have_samplerate" = "yes"; then
950 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
951 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
953 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
954 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
955 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
956 errors used by para_audiod)
958 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
959 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
960 enum of audio formats supported by audiod)
961 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
962 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
966 ########################################################################### fade
967 if test "$have_oss" = "yes" -o "$have_alsa" = "yes"; then
969 executables="$executables fade"
970 fade_cmdline_objs="fade"
971 fade_errlist_objs="fade exec string fd version ggo"
972 if test "$have_oss" = "yes"; then
973 fade_errlist_objs="$fade_errlist_objs oss_mix"
974 mixers="${mixers}oss "
975 default_mixer="OSS_MIX"
977 if test "$have_alsa" = "yes"; then
978 fade_errlist_objs="$fade_errlist_objs alsa_mix"
979 mixers="${mixers}alsa "
980 default_mixer="ALSA_MIX"
982 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
983 AC_SUBST(fade_objs, add_dot_o($fade_objs))
984 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
985 objlist_to_errlist($fade_errlist_objs),
986 errors used by para_fade)
989 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
992 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
993 enum of supported mixers)
994 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
995 use this mixer if none was specified)
996 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
997 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
1000 printf 'extern void '$i'_mix_init(struct mixer *); '
1003 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
1004 init functions of the supported mixers)
1005 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
1006 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
1009 AC_MSG_WARN([no mixer support])
1011 ########################################################################### gui
1012 if test "$have_curses" = "yes"; then
1014 executables="$executables gui"
1015 gui_cmdline_objs="gui"
1030 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1031 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1032 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1033 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1036 AC_MSG_WARN([no curses lib, cannot build para_gui])
1038 ######################################################################## filter
1048 filter_errlist_objs="
1073 filter_cmdline_objs="
1080 NEED_VORBIS_OBJECTS && {
1081 filters="$filters oggdec"
1082 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
1084 NEED_SPEEX_OBJECTS && {
1085 filters="$filters spxdec"
1086 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
1088 if test "$have_opus" = "yes"; then
1089 filters="$filters opusdec"
1090 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
1092 if test "$have_faad" = "yes"; then
1093 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
1094 filters="$filters aacdec"
1096 if test "$have_mad" = "yes"; then
1097 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
1098 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
1099 filters="$filters mp3dec"
1101 if test "$have_flac" = "yes"; then
1102 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
1103 filters="$filters flacdec"
1105 if test "$have_samplerate" = "yes"; then
1106 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1107 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
1108 filters="$filters resample"
1110 filters="$(echo $filters)"
1112 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1114 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1115 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1116 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1118 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1119 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1120 enum of supported filters)
1121 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1122 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1123 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1124 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1125 ########################################################################## recv
1155 if NEED_OGG_OBJECTS || test "$have_opus" = 'yes'; then
1156 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
1158 NEED_VORBIS_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh"
1159 NEED_SPEEX_OBJECTS && recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
1160 if test "$have_opus" = "yes"; then
1161 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
1163 if test "$have_faad" = "yes"; then
1164 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
1166 if test "$have_flac" = "yes"; then
1167 recv_errlist_objs="$recv_errlist_objs flac_afh"
1169 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1170 AC_SUBST(receivers, "http dccp udp afh")
1171 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1172 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1173 errors used by para_recv)
1174 ########################################################################### afh
1175 audio_format_handlers="mp3 wma"
1176 afh_cmdline_objs="afh"
1189 if NEED_OGG_OBJECTS || test "$have_opus" = 'yes'; then
1190 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
1192 NEED_VORBIS_OBJECTS && {
1193 afh_errlist_objs="$afh_errlist_objs ogg_afh"
1194 audio_format_handlers="$audio_format_handlers ogg"
1196 NEED_SPEEX_OBJECTS && {
1197 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
1198 audio_format_handlers="$audio_format_handlers spx"
1200 if test "$have_opus" = "yes"; then
1201 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
1202 audio_format_handlers="$audio_format_handlers opus"
1204 if test "$have_faad" = "yes"; then
1205 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
1206 audio_format_handlers="$audio_format_handlers aac"
1208 if test "$have_flac" = "yes"; then
1209 afh_errlist_objs="$afh_errlist_objs flac_afh"
1210 audio_format_handlers="$audio_format_handlers flac"
1213 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1215 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1216 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1217 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1218 ########################################################################## play
1264 if test "$have_core_audio" = "yes"; then
1265 play_errlist_objs="$play_errlist_objs osx_write ipc"
1266 play_cmdline_objs="$play_cmdline_objs osx_write"
1268 if NEED_OGG_OBJECTS || test "$have_opus" = 'yes'; then
1269 play_errlist_objs="$play_errlist_objs ogg_afh_common"
1271 NEED_VORBIS_OBJECTS && {
1272 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
1274 NEED_SPEEX_OBJECTS && {
1275 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
1277 if test "$have_opus" = "yes"; then
1278 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
1280 if test "$have_faad" = "yes"; then
1281 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
1283 if test "$have_mad" = "yes"; then
1284 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
1285 play_errlist_objs="$play_errlist_objs mp3dec_filter"
1287 if test "$have_flac" = "yes"; then
1288 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
1290 if test "$have_oss" = "yes"; then
1291 play_errlist_objs="$play_errlist_objs oss_write"
1292 play_cmdline_objs="$play_cmdline_objs oss_write"
1294 if test "$have_alsa" = "yes"; then
1295 play_errlist_objs="$play_errlist_objs alsa_write"
1296 play_cmdline_objs="$play_cmdline_objs alsa_write"
1298 if test "$have_ao" = "yes"; then
1299 play_errlist_objs="$play_errlist_objs ao_write"
1300 play_cmdline_objs="$play_cmdline_objs ao_write"
1302 if test "$have_readline" = "yes"; then
1303 play_errlist_objs="$play_errlist_objs interactive"
1305 if test "$have_samplerate" = "yes"; then
1306 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1307 play_cmdline_objs="$play_cmdline_objs resample_filter"
1310 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1311 AC_SUBST(play_objs, add_dot_o($play_objs))
1312 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1313 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1314 ######################################################################### write
1315 write_cmdline_objs="
1319 write_errlist_objs="
1334 default_writer="FILE_WRITE"
1336 if test "$have_core_audio" = "yes"; then
1337 write_errlist_objs="$write_errlist_objs osx_write ipc"
1338 write_cmdline_objs="$write_cmdline_objs osx_write"
1339 writers="$writers osx"
1340 default_writer="OSX_WRITE"
1342 if test "$have_ao" = "yes"; then
1343 write_errlist_objs="$write_errlist_objs ao_write"
1344 write_cmdline_objs="$write_cmdline_objs ao_write"
1345 writers="$writers ao"
1346 default_writer="AO_WRITE"
1348 if test "$have_oss" = "yes"; then
1349 write_errlist_objs="$write_errlist_objs oss_write"
1350 write_cmdline_objs="$write_cmdline_objs oss_write"
1351 writers="$writers oss"
1352 default_writer="OSS_WRITE"
1354 if test "$have_alsa" = "yes"; then
1355 write_errlist_objs="$write_errlist_objs alsa_write"
1356 write_cmdline_objs="$write_cmdline_objs alsa_write"
1357 writers="$writers alsa"
1358 default_writer="ALSA_WRITE"
1361 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1362 AC_SUBST(write_objs, add_dot_o($write_objs))
1363 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1364 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1365 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1366 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1367 enum of supported writers)
1368 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1369 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1370 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1371 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1372 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1373 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1374 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1375 ######################################################################## audioc
1376 audioc_cmdline_objs="audioc"
1377 audioc_errlist_objs="
1385 if test "$have_readline" = "yes"; then
1386 audioc_errlist_objs="$audioc_errlist_objs
1393 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1394 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1395 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1396 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1397 ############################################################# error2.h
1398 # these are always built
1401 $filter_errlist_objs
1402 $audioc_errlist_objs
1408 # optional executables
1409 if test "$build_server" = "yes"; then
1410 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1412 if test "$build_gui" = "yes"; then
1413 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1415 if test "$build_fade" = "yes"; then
1416 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1418 if test "$build_client" = "yes"; then
1419 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1421 if test "$build_audiod" = "yes"; then
1422 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1425 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1427 object_executable_matrix=
1428 for i in $executables; do
1429 eval objs=\$${i}_errlist_objs
1430 object_executable_matrix="$object_executable_matrix $i: $objs"
1432 # use echo to replace newlines by space
1433 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1435 SS=$(for obj in $all_errlist_objs; do
1436 printf '%s' " SS_$obj,"; done | tr 'a-z' 'A-Z')
1437 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1438 [enum {$SS NUM_SS}],
1439 [list of all objects that use the paraslash error facility]
1441 ################################################################## status items
1443 status_items="basename status num_played mtime bitrate frequency file_size
1444 status_flags format score techinfo afs_mode
1445 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1446 offset seconds_total stream_start current_time audiod_uptime image_id
1447 lyrics_id duration directory lyrics_name image_name path hash channels
1448 last_played num_chunks chunk_time amplification artist title year album
1452 for i in $status_items; do
1453 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1455 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1456 [enum of all status items])
1459 for i in $status_items; do
1460 result="$result \"$i\", "
1462 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1463 [char * array of all status items])
1465 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1466 [formats supported by para_server and para_afh])
1468 AC_SUBST(executables)
1472 paraslash configuration:
1473 ~~~~~~~~~~~~~~~~~~~~~~~~
1474 unix socket credentials: $have_ucred
1475 readline (interactive CLIs): $have_readline
1476 audio formats handlers: $audio_format_handlers
1477 id3 version2 support: $have_libid3tag
1481 para_fade: $build_fade
1482 para_server: $build_server
1483 para_gui: $build_gui
1484 para_fade: $build_fade
1485 para_client: $build_client
1486 para_audiod: $build_audiod