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)
335 AC_DEFUN([NEED_OGG_OBJECTS], [{
336 test "$HAVE_OGG" = 'yes' -a "$HAVE_VORBIS" = 'yes'
338 AC_DEFUN([NEED_VORBIS_OBJECTS], [{
339 test "$HAVE_OGG" = 'yes' -a "$HAVE_VORBIS" = 'yes'
341 ####################################################### ogg/vorbis/speex/opus
342 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
343 [look for speex headers also in dir])])
344 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
345 [look for speex libs also in dir])])
346 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
347 [look for opus headers also in dir])])
348 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
349 [look for opus libs also in dir])])
353 if test "$HAVE_OGG" = 'yes'; then
356 OLD_CPPFLAGS="$CPPFLAGS"
357 OLD_LDFLAGS="$LDFLAGS"
359 if test -n "$with_speex_headers"; then
360 speex_cppflags="-I$with_speex_headers"
361 CPPFLAGS="$CPPFLAGS $speex_cppflags"
363 if test -n "$with_speex_libs"; then
364 speex_libs="-L$with_speex_libs"
365 LDFLAGS="$LDFLAGS $speex_libs"
367 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
368 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
369 CPPFLAGS="$OLD_CPPFLAGS"
370 LDFLAGS="$OLD_LDFLAGS"
374 OLD_CPPFLAGS="$CPPFLAGS"
375 OLD_LDFLAGS="$LDFLAGS"
377 if test -n "$with_opus_headers"; then
378 opus_cppflags="-I$with_opus_headers"
379 CPPFLAGS="$CPPFLAGS $opus_cppflags"
381 if test -n "$with_opus_libs"; then
382 opus_libs="-L$with_opus_libs"
383 LDFLAGS="$LDFLAGS $opus_libs"
385 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
386 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
387 CPPFLAGS="$OLD_CPPFLAGS"
388 LDFLAGS="$OLD_LDFLAGS"
391 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
396 if test "$have_speex" = "yes"; then
397 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
398 AC_SUBST(speex_cppflags)
399 speex_ldflags="$speex_libs -lspeex"
400 AC_SUBST(speex_ldflags)
402 AC_MSG_WARN([no ogg/speex $msg])
404 if test "$have_opus" = "yes"; then
405 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
406 AC_SUBST(opus_cppflags)
407 opus_ldflags="$opus_libs -lopus"
408 AC_SUBST(opus_ldflags)
409 audio_format_handlers="$audio_format_handlers opus"
411 AC_MSG_WARN([no ogg/opus $msg])
413 ########################################################################### faad
415 OLD_CPPFLAGS="$CPPFLAGS"
416 OLD_LDFLAGS="$LDFLAGS"
418 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
419 [look for neaacdec.h also in dir])])
420 if test -n "$with_faad_headers"; then
421 faad_cppflags="-I$with_faad_headers"
422 CPPFLAGS="$CPPFLAGS $faad_cppflags"
424 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
425 [look for libfaad also in dir])])
426 if test -n "$with_faad_libs"; then
427 faad_libs="-L$with_faad_libs"
428 LDFLAGS="$LDFLAGS $faad_libs"
430 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
431 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
432 if test "$have_faad" = "yes"; then
433 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
434 AC_SUBST(faad_cppflags)
435 faad_ldflags="$faad_libs -lfaad"
436 AC_SUBST(faad_ldflags)
438 CPPFLAGS="$OLD_CPPFLAGS"
439 LDFLAGS="$OLD_LDFLAGS"
441 ########################################################################### mad
443 OLD_CPPFLAGS="$CPPFLAGS"
444 OLD_LDFLAGS="$LDFLAGS"
447 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
448 [look for mad.h also in dir])])
449 if test -n "$with_mad_headers"; then
450 mad_cppflags="-I$with_mad_headers"
451 CPPFLAGS="$CPPFLAGS $mad_cppflags"
453 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
454 [look for libmad also in dir])])
455 if test -n "$with_mad_libs"; then
456 mad_libs="-L$with_mad_libs"
457 LDFLAGS="$LDFLAGS $mad_libs"
459 AC_CHECK_HEADERS([mad.h], [], [
462 AC_CHECK_LIB([mad], [mad_stream_init], [], [
465 if test "$have_mad" = "yes"; then
466 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
467 AC_SUBST(mad_cppflags)
468 mad_ldflags="$mad_libs -lmad"
469 AC_SUBST(mad_ldflags)
471 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
473 CPPFLAGS="$OLD_CPPFLAGS"
474 LDFLAGS="$OLD_LDFLAGS"
476 ###################################################################### libid3tag
477 OLD_CPPFLAGS="$CPPFLAGS"
478 OLD_LDFLAGS="$LDFLAGS"
482 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
483 [look for id3tag header files also in dir])])
484 if test -n "$with_id3tag_headers"; then
485 id3tag_cppflags="-I$with_id3tag_headers"
486 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
488 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
489 [look for id3tag libs also in dir])])
490 if test -n "$with_id3tag_libs"; then
491 id3tag_libs="-L$with_id3tag_libs"
492 LDFLAGS="$LDFLAGS $id3tag_libs"
495 AC_MSG_CHECKING(for libid3tag)
496 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
499 struct id3_tag t = {.flags = 0};
500 ]])],[],[have_libid3tag=no])
501 AC_MSG_RESULT($have_libid3tag)
503 if test ${have_libid3tag} = yes; then
504 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
505 AC_SUBST(id3tag_cppflags)
506 AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
508 CPPFLAGS="$OLD_CPPFLAGS"
509 LDFLAGS="$OLD_LDFLAGS"
511 ########################################################################### flac
512 OLD_CPPFLAGS="$CPPFLAGS"
513 OLD_LDFLAGS="$LDFLAGS"
517 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
518 [look for flac headers also in dir])])
519 if test -n "$with_flac_headers"; then
520 flac_cppflags="-I$with_flac_headers"
521 CPPFLAGS="$CPPFLAGS $flac_cppflags"
523 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
524 [look for flac libs also in dir])])
525 if test -n "$with_flac_libs"; then
526 flac_libs="-L$with_flac_libs"
527 LDFLAGS="$LDFLAGS $flac_libs"
529 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
530 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], [
531 # nope, try again with -logg
532 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [],
533 have_flac=no, -lm -logg)
535 if test "$have_flac" = "yes"; then
536 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
537 AC_SUBST(flac_cppflags)
538 flac_ldflags="$flac_libs -lFLAC"
539 AC_SUBST(flac_ldflags)
541 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
543 CPPFLAGS="$OLD_CPPFLAGS"
544 LDFLAGS="$OLD_LDFLAGS"
546 ########################################################################### oss
547 OLD_CPPFLAGS="$CPPFLAGS"
548 OLD_LDFLAGS="$LDFLAGS"
552 msg="=> will not build oss writer"
554 AC_CHECK_HEADER(sys/soundcard.h, [
555 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
556 oss_ldflags="-lossaudio"
557 AC_SUBST(oss_ldflags)
563 AC_MSG_WARN([no sys/soundcard.h $msg])
566 CPPFLAGS="$OLD_CPPFLAGS"
567 LDFLAGS="$OLD_LDFLAGS"
570 ########################################################################### alsa
571 OLD_CPPFLAGS="$CPPFLAGS"
572 OLD_LDFLAGS="$LDFLAGS"
575 msg="=> no alsa support for para_audiod/para_write"
576 if test "$OSTYPE" != "Linux"; then
581 if test "$have_alsa" = "yes"; then
582 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
584 AC_MSG_WARN([no alsa/asoundlib $msg])
588 if test "$have_alsa" = "yes"; then
589 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
591 AC_MSG_WARN([no libasound $msg])
595 if test "$have_alsa" = "yes"; then
596 alsa_ldflags="-lasound"
597 AC_SUBST(alsa_ldflags)
600 CPPFLAGS="$OLD_CPPFLAGS"
601 LDFLAGS="$OLD_LDFLAGS"
603 ########################################################################### libao
604 OLD_CPPFLAGS="$CPPFLAGS"
605 OLD_LDFLAGS="$LDFLAGS"
609 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
610 [look for ao/ao.h also in dir])])
611 if test -n "$with_ao_headers"; then
612 ao_cppflags="-I$with_ao_headers"
613 CPPFLAGS="$CPPFLAGS $ao_cppflags"
615 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
616 [look for libao also in dir])])
617 if test -n "$with_ao_libs"; then
618 ao_libs="-L$with_ao_libs"
619 LDFLAGS="$LDFLAGS $ao_libs"
621 msg="no libao support for para_audiod/para_write"
622 AC_CHECK_HEADERS([ao/ao.h], [
625 AC_MSG_WARN([ao.h not found, $msg])
627 if test "$have_ao" = "yes"; then
628 AC_CHECK_LIB([ao], [ao_initialize], [], [
630 AC_MSG_WARN([ao lib not found or not working, $msg])
633 if test "$have_ao" = "yes"; then
634 AC_CHECK_HEADERS([pthread.h], [
637 AC_MSG_WARN([pthread.h not found, $msg])
640 if test "$have_ao" = "yes"; then
641 AC_CHECK_LIB([pthread], [pthread_create], [], [
643 AC_MSG_WARN([pthread lib not found or not working, $msg])
646 if test "$have_ao" = "yes"; then
647 AC_SUBST(ao_cppflags)
648 ao_ldflags="$ao_libs -lao -lpthread"
652 CPPFLAGS="$OLD_CPPFLAGS"
653 LDFLAGS="$OLD_LDFLAGS"
655 ############################################################# readline
656 OLD_CPPFLAGS="$CPPFLAGS"
657 OLD_LDFLAGS="$LDFLAGS"
661 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
662 [look for libreadline header files also in dir])])
663 if test -n "$with_readline_headers"; then
664 readline_cppflags="-I$with_readline_headers"
665 CPPFLAGS="$CPPFLAGS $readline_cppflags"
668 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
669 [look for readline library also in dir])])
670 if test -n "$with_readline_libs"; then
671 readline_libs="-L$with_readline_libs"
672 LDFLAGS="$LDFLAGS $readline_libs"
674 msg="no interactive cli support"
675 AC_CHECK_HEADERS([readline/readline.h], [
678 AC_MSG_WARN([readline/readline.h not found, $msg])
681 if test "$have_readline" = "yes"; then
682 readline_ldflags="$readline_libs"
683 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
684 readline_ldflags="$readline_ldflags -lreadline"
685 ], [have_readline="no"])
686 if test "$have_readline" = "no"; then # try with -lcurses
688 AC_MSG_NOTICE([trying again with -lcurses])
689 unset ac_cv_search_rl_free_keymap 2> /dev/null
690 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
692 readline_ldflags="$readline_ldflags -lreadline -lcurses"
695 if test "$have_readline" = "no"; then # try with -ltermcap
697 AC_MSG_NOTICE([trying again with -ltermcap])
698 unset ac_cv_search_rl_free_keymap 2> /dev/null
699 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
701 readline_ldflags="$readline_ldflags -lreadline -ltermcap"
706 if test "$have_readline" = "yes"; then
709 [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)],
713 #include <readline/readline.h>
716 AC_SUBST(readline_cppflags)
717 AC_SUBST(readline_ldflags)
718 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
720 AC_MSG_WARN([libreadline not found or unusable])
722 CPPFLAGS="$OLD_CPPFLAGS"
723 LDFLAGS="$OLD_LDFLAGS"
725 ############################################################# libsamplerate
726 OLD_CPPFLAGS="$CPPFLAGS"
727 OLD_LDFLAGS="$LDFLAGS"
730 have_samplerate="yes"
731 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
732 [look for samplerate headers also in dir])])
733 if test -n "$with_samplerate_headers"; then
734 samplerate_cppflags="-I$with_samplerate_headers"
735 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
737 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
738 [look for samplerate libs also in dir])])
739 if test -n "$with_samplerate_libs"; then
740 samplerate_libs="-L$with_samplerate_libs"
741 LDFLAGS="$LDFLAGS $samplerate_libs"
744 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
745 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
747 if test "$have_samplerate" = "yes"; then
748 AC_SUBST(samplerate_cppflags)
749 samplerate_ldflags="$samplerate_libs -lsamplerate"
750 AC_SUBST(samplerate_ldflags)
752 AC_MSG_WARN([no resample support in para_audiod/para_filter])
754 CPPFLAGS="$OLD_CPPFLAGS"
755 LDFLAGS="$OLD_LDFLAGS"
757 ######################################################################### server
758 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
759 -a "$HAVE_OSL" = "yes" ; then
762 executables="$executables server"
763 server_cmdline_objs="server"
764 server_errlist_objs="
803 if test "$have_openssl" = "yes"; then
804 server_errlist_objs="$server_errlist_objs crypt"
806 if test "$have_gcrypt" = "yes"; then
807 server_errlist_objs="$server_errlist_objs gcrypt"
809 NEED_OGG_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh_common"
810 NEED_VORBIS_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh"
811 if test "$have_speex" = "yes"; then
812 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
814 if test "$have_opus" = "yes"; then
815 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
817 if test "$have_faad" = "yes"; then
818 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
820 if test "$have_flac" = "yes"; then
821 server_errlist_objs="$server_errlist_objs flac_afh"
823 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
824 AC_SUBST(server_objs, add_dot_o($server_objs))
825 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
826 objlist_to_errlist($server_errlist_objs), errors used by para_server)
830 ############################################################# client
831 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
833 executables="$executables client"
834 client_cmdline_objs="client"
835 client_errlist_objs="
851 if test "$have_openssl" = "yes"; then
852 client_errlist_objs="$client_errlist_objs crypt"
854 if test "$have_gcrypt" = "yes"; then
855 client_errlist_objs="$client_errlist_objs gcrypt"
857 if test "$have_readline" = "yes"; then
858 client_errlist_objs="$client_errlist_objs interactive"
860 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
861 AC_SUBST(client_objs, add_dot_o($client_objs))
862 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
863 objlist_to_errlist($client_errlist_objs), errors used by para_client)
867 ############################################################# audiod
868 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
870 executables="$executables audiod"
871 audiod_audio_formats="wma"
872 audiod_cmdline_objs="$audiod_cmdline_objs
884 audiod_errlist_objs="$audiod_errlist_objs
922 if test "$have_openssl" = "yes"; then
923 audiod_errlist_objs="$audiod_errlist_objs crypt"
925 if test "$have_gcrypt" = "yes"; then
926 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
928 if test "$have_core_audio" = "yes"; then
929 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
930 audiod_cmdline_objs="$audiod_cmdline_objs osx_write"
932 NEED_VORBIS_OBJECTS && {
933 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
934 audiod_audio_formats="$audiod_audio_formats ogg"
936 if test "$have_speex" = "yes"; then
937 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
938 audiod_audio_formats="$audiod_audio_formats spx"
940 if test "$have_opus" = "yes"; then
941 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
942 audiod_audio_formats="$audiod_audio_formats opus"
944 if test "$have_faad" = "yes"; then
945 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
946 audiod_audio_formats="$audiod_audio_formats aac"
948 if test "$have_mad" = "yes"; then
949 audiod_audio_formats="$audiod_audio_formats mp3"
950 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
951 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
953 if test "$have_flac" = "yes"; then
954 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
955 audiod_audio_formats="$audiod_audio_formats flac"
957 if test "$have_oss" = "yes"; then
958 audiod_errlist_objs="$audiod_errlist_objs oss_write"
959 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
961 if test "$have_alsa" = "yes"; then
962 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
963 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
965 if test "$have_ao" = "yes"; then
966 audiod_errlist_objs="$audiod_errlist_objs ao_write"
967 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
969 if test "$have_samplerate" = "yes"; then
970 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
971 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
973 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
974 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
975 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
976 errors used by para_audiod)
978 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
979 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
980 enum of audio formats supported by audiod)
981 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
982 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
986 ########################################################################### fade
987 if test "$have_oss" = "yes" -o "$have_alsa" = "yes"; then
989 executables="$executables fade"
990 fade_cmdline_objs="fade"
991 fade_errlist_objs="fade exec string fd version ggo"
992 if test "$have_oss" = "yes"; then
993 fade_errlist_objs="$fade_errlist_objs oss_mix"
994 mixers="${mixers}oss "
995 default_mixer="OSS_MIX"
997 if test "$have_alsa" = "yes"; then
998 fade_errlist_objs="$fade_errlist_objs alsa_mix"
999 mixers="${mixers}alsa "
1000 default_mixer="ALSA_MIX"
1002 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
1003 AC_SUBST(fade_objs, add_dot_o($fade_objs))
1004 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
1005 objlist_to_errlist($fade_errlist_objs),
1006 errors used by para_fade)
1008 for i in $mixers; do
1009 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
1012 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
1013 enum of supported mixers)
1014 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
1015 use this mixer if none was specified)
1016 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
1017 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
1019 for i in $mixers; do
1020 printf 'extern void '$i'_mix_init(struct mixer *); '
1023 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
1024 init functions of the supported mixers)
1025 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
1026 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
1029 AC_MSG_WARN([no mixer support])
1031 ########################################################################### gui
1032 if test "$have_curses" = "yes"; then
1034 executables="$executables gui"
1035 gui_cmdline_objs="gui"
1050 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1051 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1052 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1053 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1056 AC_MSG_WARN([no curses lib, cannot build para_gui])
1058 ######################################################################## filter
1068 filter_errlist_objs="
1093 filter_cmdline_objs="
1100 NEED_VORBIS_OBJECTS && {
1101 filters="$filters oggdec"
1102 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
1104 if test "$have_speex" = "yes"; then
1105 filters="$filters spxdec"
1106 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
1108 if test "$have_opus" = "yes"; then
1109 filters="$filters opusdec"
1110 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
1112 if test "$have_faad" = "yes"; then
1113 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
1114 filters="$filters aacdec"
1116 if test "$have_mad" = "yes"; then
1117 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
1118 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
1119 filters="$filters mp3dec"
1121 if test "$have_flac" = "yes"; then
1122 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
1123 filters="$filters flacdec"
1125 if test "$have_samplerate" = "yes"; then
1126 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1127 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
1128 filters="$filters resample"
1130 filters="$(echo $filters)"
1132 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1134 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1135 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1136 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1138 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1139 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1140 enum of supported filters)
1141 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1142 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1143 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1144 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1145 ########################################################################## recv
1175 if NEED_OGG_OBJECTS || test "$have_speex" = 'yes' || test "$have_opus" = 'yes'; then
1176 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
1178 NEED_VORBIS_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh"
1179 if test "$have_speex" = "yes"; then
1180 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
1182 if test "$have_opus" = "yes"; then
1183 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
1185 if test "$have_faad" = "yes"; then
1186 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
1188 if test "$have_flac" = "yes"; then
1189 recv_errlist_objs="$recv_errlist_objs flac_afh"
1191 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1192 AC_SUBST(receivers, "http dccp udp afh")
1193 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1194 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1195 errors used by para_recv)
1196 ########################################################################### afh
1197 audio_format_handlers="mp3 wma"
1198 afh_cmdline_objs="afh"
1211 if NEED_OGG_OBJECTS || test "$have_speex" = 'yes' || test "$have_opus" = 'yes'; then
1212 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
1214 NEED_VORBIS_OBJECTS && {
1215 afh_errlist_objs="$afh_errlist_objs ogg_afh"
1216 audio_format_handlers="$audio_format_handlers ogg"
1218 if test "$have_speex" = "yes"; then
1219 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
1220 audio_format_handlers="$audio_format_handlers spx"
1222 if test "$have_opus" = "yes"; then
1223 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
1224 audio_format_handlers="$audio_format_handlers opus"
1226 if test "$have_faad" = "yes"; then
1227 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
1228 audio_format_handlers="$audio_format_handlers aac"
1230 if test "$have_flac" = "yes"; then
1231 afh_errlist_objs="$afh_errlist_objs flac_afh"
1232 audio_format_handlers="$audio_format_handlers flac"
1235 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1237 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1238 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1239 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1240 ########################################################################## play
1286 if test "$have_core_audio" = "yes"; then
1287 play_errlist_objs="$play_errlist_objs osx_write ipc"
1288 play_cmdline_objs="$play_cmdline_objs osx_write"
1290 if NEED_OGG_OBJECTS || test "$have_speex" = 'yes' || test "$have_opus" = 'yes'; then
1291 play_errlist_objs="$play_errlist_objs ogg_afh_common"
1293 NEED_VORBIS_OBJECTS && {
1294 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
1296 if test "$have_speex" = "yes"; then
1297 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
1299 if test "$have_opus" = "yes"; then
1300 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
1302 if test "$have_faad" = "yes"; then
1303 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
1305 if test "$have_mad" = "yes"; then
1306 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
1307 play_errlist_objs="$play_errlist_objs mp3dec_filter"
1309 if test "$have_flac" = "yes"; then
1310 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
1312 if test "$have_oss" = "yes"; then
1313 play_errlist_objs="$play_errlist_objs oss_write"
1314 play_cmdline_objs="$play_cmdline_objs oss_write"
1316 if test "$have_alsa" = "yes"; then
1317 play_errlist_objs="$play_errlist_objs alsa_write"
1318 play_cmdline_objs="$play_cmdline_objs alsa_write"
1320 if test "$have_ao" = "yes"; then
1321 play_errlist_objs="$play_errlist_objs ao_write"
1322 play_cmdline_objs="$play_cmdline_objs ao_write"
1324 if test "$have_readline" = "yes"; then
1325 play_errlist_objs="$play_errlist_objs interactive"
1327 if test "$have_samplerate" = "yes"; then
1328 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1329 play_cmdline_objs="$play_cmdline_objs resample_filter"
1332 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1333 AC_SUBST(play_objs, add_dot_o($play_objs))
1334 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1335 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1336 ######################################################################### write
1337 write_cmdline_objs="
1341 write_errlist_objs="
1356 default_writer="FILE_WRITE"
1358 if test "$have_core_audio" = "yes"; then
1359 write_errlist_objs="$write_errlist_objs osx_write ipc"
1360 write_cmdline_objs="$write_cmdline_objs osx_write"
1361 writers="$writers osx"
1362 default_writer="OSX_WRITE"
1364 if test "$have_ao" = "yes"; then
1365 write_errlist_objs="$write_errlist_objs ao_write"
1366 write_cmdline_objs="$write_cmdline_objs ao_write"
1367 writers="$writers ao"
1368 default_writer="AO_WRITE"
1370 if test "$have_oss" = "yes"; then
1371 write_errlist_objs="$write_errlist_objs oss_write"
1372 write_cmdline_objs="$write_cmdline_objs oss_write"
1373 writers="$writers oss"
1374 default_writer="OSS_WRITE"
1376 if test "$have_alsa" = "yes"; then
1377 write_errlist_objs="$write_errlist_objs alsa_write"
1378 write_cmdline_objs="$write_cmdline_objs alsa_write"
1379 writers="$writers alsa"
1380 default_writer="ALSA_WRITE"
1383 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1384 AC_SUBST(write_objs, add_dot_o($write_objs))
1385 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1386 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1387 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1388 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1389 enum of supported writers)
1390 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1391 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1392 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1393 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1394 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1395 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1396 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1397 ######################################################################## audioc
1398 audioc_cmdline_objs="audioc"
1399 audioc_errlist_objs="
1407 if test "$have_readline" = "yes"; then
1408 audioc_errlist_objs="$audioc_errlist_objs
1415 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1416 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1417 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1418 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1419 ############################################################# error2.h
1420 # these are always built
1423 $filter_errlist_objs
1424 $audioc_errlist_objs
1430 # optional executables
1431 if test "$build_server" = "yes"; then
1432 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1434 if test "$build_gui" = "yes"; then
1435 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1437 if test "$build_fade" = "yes"; then
1438 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1440 if test "$build_client" = "yes"; then
1441 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1443 if test "$build_audiod" = "yes"; then
1444 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1447 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1449 object_executable_matrix=
1450 for i in $executables; do
1451 eval objs=\$${i}_errlist_objs
1452 object_executable_matrix="$object_executable_matrix $i: $objs"
1454 # use echo to replace newlines by space
1455 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1457 SS=$(for obj in $all_errlist_objs; do
1458 printf '%s' " SS_$obj,"; done | tr 'a-z' 'A-Z')
1459 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1460 [enum {$SS NUM_SS}],
1461 [list of all objects that use the paraslash error facility]
1463 ################################################################## status items
1465 status_items="basename status num_played mtime bitrate frequency file_size
1466 status_flags format score techinfo afs_mode
1467 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1468 offset seconds_total stream_start current_time audiod_uptime image_id
1469 lyrics_id duration directory lyrics_name image_name path hash channels
1470 last_played num_chunks chunk_time amplification artist title year album
1474 for i in $status_items; do
1475 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1477 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1478 [enum of all status items])
1481 for i in $status_items; do
1482 result="$result \"$i\", "
1484 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1485 [char * array of all status items])
1487 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1488 [formats supported by para_server and para_afh])
1490 AC_SUBST(executables)
1494 paraslash configuration:
1495 ~~~~~~~~~~~~~~~~~~~~~~~~
1496 unix socket credentials: $have_ucred
1497 readline (interactive CLIs): $have_readline
1498 audio formats handlers: $audio_format_handlers
1499 id3 version2 support: $have_libid3tag
1503 para_fade: $build_fade
1504 para_server: $build_server
1505 para_gui: $build_gui
1506 para_fade: $build_fade
1507 para_client: $build_client
1508 para_audiod: $build_audiod