2 # Process this file with autoconf to produce a configure script.
6 AC_INIT([paraslash],[git],[maan@systemlinux.org])
7 AC_CONFIG_HEADER([config.h])
9 AC_CONFIG_FILES([Makefile])
10 AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
11 AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
12 AC_DEFUN([objlist_to_errlist],[$(for i in $@; do printf "DEFINE_ERRLIST($(echo $i| tr 'a-z' 'A-Z'));"; done) [const char **para_errlist[[]]] = {$(for i in $@; do printf "PARA_ERRLIST($(echo $i | tr 'a-z' 'A-Z')), "; done) }])
13 AC_PATH_PROG(UNAMEPATH, uname, no)
14 if test "$UNAMEPATH" = "no"; then
15 AC_MSG_ERROR(unable to determine system type)
17 AC_MSG_CHECKING(os type)
18 OSTYPE="`$UNAMEPATH -s`"
19 AC_MSG_RESULT("$OSTYPE")
21 if test "$OSTYPE" = "SunOS"; then
22 # needed on SunOS for socket magic
23 arch_cppflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
24 AC_SUBST(arch_cppflags)
29 AC_PATH_PROG([gengetopt], [gengetopt])
30 test -z "$gengetopt" && AC_MSG_ERROR(
31 [gengetopt is required to build this package])
33 AC_PATH_PROG([help2man], [help2man])
34 test -z "$help2man" && AC_MSG_ERROR(
35 [help2man is required to build this package])
37 AC_PATH_PROG([install], [install])
38 test -z "$install" && AC_MSG_ERROR(
39 [The install program is required to build this package])
48 AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h limits.h netdb.h netinet/in.h \
49 stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h sys/un.h \
50 sys/ipc.h unistd.h utime.h stddef.h],
51 [], [AC_MSG_ERROR([$ac_header not found])])
53 # Checks for typedefs, structures, and compiler characteristics.
73 # Checks for library functions.
75 AC_PROG_GCC_TRADITIONAL
79 AC_FUNC_SELECT_ARGTYPES
86 AC_CHECK_FUNCS([atexit dup2 memchr memmove memset \
87 regcomp select strchr strdup strerror strstr strtol uname \
88 fchdir gettimeofday localtime_r munmap strcasecmp strcspn \
89 strncasecmp strrchr strspn alarm mkdir inet_ntoa socket], [],
90 [AC_MSG_ERROR([function not found, cannot live without it])])
92 executables="recv filter audioc write afh play"
93 audio_format_handlers="mp3 wma"
127 audioc_cmdline_objs="audioc"
128 audioc_errlist_objs="
138 afh_cmdline_objs="afh"
173 default_writer="FILE_WRITE"
219 ################################################################## clock_gettime
221 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
222 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
224 if test -n "$clock_gettime_lib"; then
225 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
226 define to 1 if clock_gettime() is supported])
228 if test "$clock_gettime_lib" = "rt"; then
229 AC_SUBST(clock_gettime_ldflags, -lrt)
231 ########################################################################### osl
233 OLD_CPPFLAGS="$CPPFLAGS"
234 OLD_LDFLAGS="$LDFLAGS"
236 AC_ARG_WITH(osl_headers, [AS_HELP_STRING(--with-osl-headers=dir,
237 [look for osl.h also in dir])])
238 if test -n "$with_osl_headers"; then
239 osl_cppflags="-I$with_osl_headers"
240 CPPFLAGS="$CPPFLAGS $osl_cppflags"
242 AC_ARG_WITH(osl_libs, [AS_HELP_STRING(--with-osl-libs=dir,
243 [look for libosl also in dir])])
244 if test -n "$with_osl_libs"; then
245 osl_libs="-L$with_osl_libs"
246 LDFLAGS="$LDFLAGS $osl_libs"
249 AC_CHECK_HEADER(osl.h, [], have_osl=no)
250 AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no)
251 if test "$have_osl" = "yes"; then
252 AC_SUBST(osl_cppflags)
253 osl_ldflags="$osl_libs -losl"
254 AC_SUBST(osl_ldflags)
256 AC_MSG_WARN([libosl not found, can not build para_server.
258 http://systemlinux.org/~maan/osl
260 git clone git://git.tuebingen.mpg.de/osl
263 CPPFLAGS="$OLD_CPPFLAGS"
264 LDFLAGS="$OLD_LDFLAGS"
266 ########################################################################### crypto
267 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
268 Force using crypto library "lib". This package requires either
269 openssl or libgcrypt being installed. Possible values for "lib"
270 are thus "openssl" and "gcrypt". If this option is not given,
271 openssl is tried first. If openssl was not found, gcrypt is
274 case "$enable_cryptolib" in
275 "openssl") check_openssl="yes"; check_gcrypt="no";;
276 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
277 "") check_openssl="yes"; check_gcrypt="yes";;
278 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
280 ###################################################################### openssl
281 if test "$check_openssl" = "yes"; then
282 OLD_CPPFLAGS="$CPPFLAGS"
283 OLD_LDFLAGS="$LDFLAGS"
286 AC_ARG_WITH(openssl_headers, [AS_HELP_STRING(--with-openssl-headers=dir,
287 [look for openssl headers also in dir])])
288 if test -n "$with_openssl_headers"; then
289 openssl_cppflags="-I$with_openssl_headers"
290 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
292 AC_ARG_WITH(openssl_libs, [AS_HELP_STRING(--with-openssl-libs=dir,
293 [look for openssl libraries also in dir])])
294 if test -n "$with_openssl_libs"; then
295 openssl_libs="-L$with_openssl_libs"
296 LDFLAGS="$LDFLAGS $openssl_libs"
298 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
299 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
300 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
301 # try harder: openssl is sometimes installed in /usr/local/ssl
302 openssl_cppflags="-I/usr/local/ssl/include"
303 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
304 openssl_libs="-L/usr/local/ssl/lib"
305 LDFLAGS="$LDFLAGS $openssl_libs"
307 unset ac_cv_header_openssl_ssl_h 2> /dev/null
308 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
309 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
310 if test "$have_openssl" = "yes"; then
311 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
314 if test "$have_openssl" = "yes"; then
315 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
316 AC_SUBST(openssl_cppflags)
317 openssl_ldflags="$openssl_libs -lssl -lcrypto"
318 AC_SUBST(openssl_ldflags)
320 server_errlist_objs="$server_errlist_objs crypt"
321 client_errlist_objs="$client_errlist_objs crypt"
322 audiod_errlist_objs="$audiod_errlist_objs crypt"
326 AC_MSG_WARN([openssl libraries not found])
328 CPPFLAGS="$OLD_CPPFLAGS"
329 LDFLAGS="$OLD_LDFLAGS"
334 ########################################################################### gcrypt
335 if test "$check_gcrypt" = "yes"; then
336 OLD_CPPFLAGS="$CPPFLAGS"
337 OLD_LDFLAGS="$LDFLAGS"
340 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
341 [look for gcrypt headers also in dir])])
342 if test -n "$with_gcrypt_headers"; then
343 gcrypt_cppflags="-I$with_gcrypt_headers"
344 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
346 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
347 [look for libgcrypt also in dir])])
348 if test -n "$with_gcrypt_libs"; then
349 gcrypt_libs="-L$with_gcrypt_libs"
350 LDFLAGS="$LDFLAGS $gcrypt_libs"
352 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
353 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
354 if test "$have_gcrypt" = "yes"; then
355 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
356 AC_SUBST(gcrypt_cppflags)
357 gcrypt_ldflags="$gcrypt_libs -lgcrypt"
358 AC_SUBST(gcrypt_ldflags)
360 server_errlist_objs="$server_errlist_objs gcrypt"
361 client_errlist_objs="$client_errlist_objs gcrypt"
362 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
364 AC_MSG_WARN([gcrypt library not found])
366 CPPFLAGS="$OLD_CPPFLAGS"
367 LDFLAGS="$OLD_LDFLAGS"
372 ########################################################################### libsocket
373 AC_CHECK_LIB([c], [socket],
375 [socket_ldflags="-lsocket"]
377 AC_SUBST(socket_ldflags)
378 ########################################################################### libnsl
379 AC_CHECK_LIB([c], [gethostbyname],
381 [nsl_ldflags="-lnsl"]
383 AC_SUBST(nsl_ldflags)
384 ########################################################################### ucred
385 AC_MSG_CHECKING(for struct ucred)
386 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
388 #include <sys/types.h>
389 #include <sys/socket.h>
391 struct ucred sucred; sucred.pid=0;
392 ]])],[have_ucred=yes],[have_ucred=no])
393 AC_MSG_RESULT($have_ucred)
394 if test ${have_ucred} = yes; then
395 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
397 ########################################################################### gengetopt
398 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
400 [gengetopt_args_info_description],
401 [ggo_descriptions_declared=yes],
402 [ggo_descriptions_declared=no],
403 [#include "conftest-ggo.h"]
405 AC_SUBST(ggo_descriptions_declared)
406 ########################################################################### curses
408 OLD_CPPFLAGS="$CPPFLAGS"
409 OLD_LDFLAGS="$LDFLAGS"
411 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
412 [look for curses.h also in dir])])
413 if test -n "$with_curses_headers"; then
414 curses_cppflags="-I$with_curses_headers"
415 CPPFLAGS="$CPPFLAGS $curses_cppflags"
417 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
418 [look for libcurses also in dir])])
419 if test -n "$with_curses_libs"; then
420 curses_libs="-L$with_curses_libs"
421 LDFLAGS="$LDFLAGS $curses_libs"
423 AC_CHECK_HEADER(curses.h, [], [
426 curses_ldflags="$curses_libs"
427 AC_CHECK_LIB([ncursesw], [initscr],
428 [curses_ldflags="$curses_libs -lncursesw"], [
429 AC_CHECK_LIB([curses], [initscr],
430 [curses_ldflags="$curses_libs -lcurses"],
435 AC_SUBST(curses_cppflags)
436 AC_SUBST(curses_ldflags)
437 CPPFLAGS="$OLD_CPPFLAGS"
438 LDFLAGS="$OLD_LDFLAGS"
440 ########################################################################### ip_mreqn
441 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
442 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
448 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
449 AC_MSG_RESULT($have_ip_mreqn)
450 if test ${have_ip_mreqn} = yes; then
451 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
453 ########################################################################### osx
455 AC_MSG_CHECKING(for CoreAudio (MacOs))
456 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
457 #include <CoreAudio/CoreAudio.h>
460 ]])],[have_core_audio=yes],[have_core_audio=no])
461 AC_MSG_RESULT($have_core_audio)
462 if test ${have_core_audio} = yes; then
463 f1="-framework CoreAudio"
464 f2="-framework AudioToolbox"
465 f3="-framework AudioUnit"
466 f4="-framework CoreServices"
467 core_audio_ldflags="$f1 $f2 $f3 $f4"
468 AC_SUBST(core_audio_ldflags)
470 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
471 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
473 play_errlist_objs="$play_errlist_objs osx_write ipc"
474 play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
476 write_errlist_objs="$write_errlist_objs osx_write ipc"
477 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
478 writers="$writers osx"
479 default_writer="OSX_WRITE"
480 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
482 ####################################################### ogg/vorbis/speex/opus
484 OLD_CPPFLAGS="$CPPFLAGS"
485 OLD_LDFLAGS="$LDFLAGS"
487 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
488 [look for ogg headers also in dir])])
489 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
490 [look for ogg libs also in dir])])
491 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
492 [look for vorbis headers also in dir])])
493 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
494 [look for vorbis libs also in dir])])
495 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
496 [look for speex headers also in dir])])
497 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
498 [look for speex libs also in dir])])
499 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
500 [look for opus headers also in dir])])
501 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
502 [look for opus libs also in dir])])
504 if test -n "$with_ogg_headers"; then
505 ogg_cppflags="-I$with_ogg_headers"
506 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
508 if test -n "$with_ogg_libs"; then
509 ogg_libs="-L$with_ogg_libs"
510 LDFLAGS="$LDFLAGS $ogg_libs"
512 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
513 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
518 if test "$have_ogg" = "yes"; then
520 if test -n "$with_vorbis_headers"; then
521 vorbis_cppflags="-I$with_vorbis_headers"
522 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
524 if test -n "$with_vorbis_libs"; then
525 vorbis_libs="-L$with_vorbis_libs"
526 LDFLAGS="$LDFLAGS $vorbis_libs"
528 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
529 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
532 if test -n "$with_speex_headers"; then
533 speex_cppflags="-I$with_speex_headers"
534 CPPFLAGS="$CPPFLAGS $speex_cppflags"
536 if test -n "$with_speex_libs"; then
537 speex_libs="-L$with_speex_libs"
538 LDFLAGS="$LDFLAGS $speex_libs"
540 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
541 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
544 if test -n "$with_opus_headers"; then
545 opus_cppflags="-I$with_opus_headers"
546 CPPFLAGS="$CPPFLAGS $opus_cppflags"
548 if test -n "$with_opus_libs"; then
549 opus_libs="-L$with_opus_libs"
550 LDFLAGS="$LDFLAGS $opus_libs"
552 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
553 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
555 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
561 msg="support in para_server/para_filter/para_afh"
562 if test "$have_vorbis" = "yes" || \
563 test "$have_speex" = "yes" || \
564 test "$have_opus" = "yes"; then
565 AC_SUBST(ogg_cppflags)
566 ogg_ldflags="$ogg_libs -logg"
567 if test "$OSTYPE" = "Darwin"; then
568 ogg_ldflags="-Wl,-bind_at_load $ogg_ldflags"
570 AC_SUBST(ogg_ldflags)
571 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
572 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
573 server_errlist_objs="$server_errlist_objs ogg_afh_common"
574 play_errlist_objs="$play_errlist_objs ogg_afh_common"
576 if test "$have_vorbis" = "yes"; then
577 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
578 vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile"
579 AC_SUBST(vorbis_ldflags)
581 server_errlist_objs="$server_errlist_objs ogg_afh"
582 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
583 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
584 afh_errlist_objs="$afh_errlist_objs ogg_afh"
585 recv_errlist_objs="$recv_errlist_objs ogg_afh"
587 audiod_audio_formats="$audiod_audio_formats ogg"
588 audio_format_handlers="$audio_format_handlers ogg"
590 if test "$have_speex" = "yes"; then
591 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
592 AC_SUBST(speex_cppflags)
593 speex_ldflags="$speex_libs -lspeex"
594 AC_SUBST(speex_ldflags)
597 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
598 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
599 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
600 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
601 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
603 audiod_audio_formats="$audiod_audio_formats spx"
604 audio_format_handlers="$audio_format_handlers spx"
606 AC_MSG_WARN([no ogg/speex $msg])
608 if test "$have_opus" = "yes"; then
609 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
610 AC_SUBST(opus_cppflags)
611 opus_ldflags="$opus_libs -lopus"
612 AC_SUBST(opus_ldflags)
615 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
616 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
617 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
618 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
619 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
621 audiod_audio_formats="$audiod_audio_formats opus"
622 audio_format_handlers="$audio_format_handlers opus"
624 AC_MSG_WARN([no ogg/opus $msg])
626 CPPFLAGS="$OLD_CPPFLAGS"
627 LDFLAGS="$OLD_LDFLAGS"
629 ########################################################################### faad
631 OLD_CPPFLAGS="$CPPFLAGS"
632 OLD_LDFLAGS="$LDFLAGS"
634 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
635 [look for neaacdec.h also in dir])])
636 if test -n "$with_faad_headers"; then
637 faad_cppflags="-I$with_faad_headers"
638 CPPFLAGS="$CPPFLAGS $faad_cppflags"
640 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
641 [look for libfaad also in dir])])
642 if test -n "$with_faad_libs"; then
643 faad_libs="-L$with_faad_libs"
644 LDFLAGS="$LDFLAGS $faad_libs"
646 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
647 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
648 if test "$have_faad" = "yes"; then
649 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
650 AC_SUBST(faad_cppflags)
651 faad_ldflags="$faad_libs -lfaad"
652 AC_SUBST(faad_ldflags)
654 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
655 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
656 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
657 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
658 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
660 audiod_audio_formats="$audiod_audio_formats aac"
661 audio_format_handlers="$audio_format_handlers aac"
663 CPPFLAGS="$OLD_CPPFLAGS"
664 LDFLAGS="$OLD_LDFLAGS"
666 ########################################################################### mad
668 OLD_CPPFLAGS="$CPPFLAGS"
669 OLD_LDFLAGS="$LDFLAGS"
672 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
673 [look for mad.h also in dir])])
674 if test -n "$with_mad_headers"; then
675 mad_cppflags="-I$with_mad_headers"
676 CPPFLAGS="$CPPFLAGS $mad_cppflags"
678 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
679 [look for libmad also in dir])])
680 if test -n "$with_mad_libs"; then
681 mad_libs="-L$with_mad_libs"
682 LDFLAGS="$LDFLAGS $mad_libs"
684 AC_CHECK_HEADERS([mad.h], [], [
687 AC_CHECK_LIB([mad], [mad_stream_init], [], [
690 if test "$have_mad" = "yes"; then
691 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
692 AC_SUBST(mad_cppflags)
693 mad_ldflags="$mad_libs -lmad"
694 AC_SUBST(mad_ldflags)
695 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
696 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
697 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
698 play_errlist_objs="$play_errlist_objs mp3dec_filter"
699 audiod_audio_formats="$audiod_audio_formats mp3"
701 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
703 CPPFLAGS="$OLD_CPPFLAGS"
704 LDFLAGS="$OLD_LDFLAGS"
706 ###################################################################### libid3tag
707 OLD_CPPFLAGS="$CPPFLAGS"
708 OLD_LDFLAGS="$LDFLAGS"
712 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
713 [look for id3tag header files also in dir])])
714 if test -n "$with_id3tag_headers"; then
715 id3tag_cppflags="-I$with_id3tag_headers"
716 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
718 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
719 [look for id3tag libs also in dir])])
720 if test -n "$with_id3tag_libs"; then
721 id3tag_libs="-L$with_id3tag_libs"
722 LDFLAGS="$LDFLAGS $id3tag_libs"
725 AC_MSG_CHECKING(for libid3tag)
726 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
729 struct id3_tag t = {.flags = 0};
730 ]])],[],[have_libid3tag=no])
731 AC_MSG_RESULT($have_libid3tag)
733 if test ${have_libid3tag} = yes; then
734 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
735 AC_SUBST(id3tag_cppflags)
736 AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
738 CPPFLAGS="$OLD_CPPFLAGS"
739 LDFLAGS="$OLD_LDFLAGS"
741 ########################################################################### flac
742 OLD_CPPFLAGS="$CPPFLAGS"
743 OLD_LDFLAGS="$LDFLAGS"
747 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
748 [look for flac headers also in dir])])
749 if test -n "$with_flac_headers"; then
750 flac_cppflags="-I$with_flac_headers"
751 CPPFLAGS="$CPPFLAGS $flac_cppflags"
753 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
754 [look for flac libs also in dir])])
755 if test -n "$with_flac_libs"; then
756 flac_libs="-L$with_flac_libs"
757 LDFLAGS="$LDFLAGS $flac_libs"
759 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
760 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
761 if test "$have_flac" = "yes"; then
762 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
763 AC_SUBST(flac_cppflags)
764 flac_ldflags="$flac_libs -lFLAC"
765 AC_SUBST(flac_ldflags)
767 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
768 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
769 afh_errlist_objs="$afh_errlist_objs flac_afh"
770 server_errlist_objs="$server_errlist_objs flac_afh"
771 recv_errlist_objs="$recv_errlist_objs flac_afh"
772 audio_format_handlers="$audio_format_handlers flac"
773 audiod_audio_formats="$audiod_audio_formats flac"
775 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
777 CPPFLAGS="$OLD_CPPFLAGS"
778 LDFLAGS="$OLD_LDFLAGS"
780 ########################################################################### oss
781 OLD_CPPFLAGS="$CPPFLAGS"
782 OLD_LDFLAGS="$LDFLAGS"
786 msg="=> will not build oss writer"
788 AC_CHECK_HEADER(sys/soundcard.h, [
789 audiod_errlist_objs="$audiod_errlist_objs oss_write"
790 play_errlist_objs="$play_errlist_objs oss_write"
791 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
792 play_cmdline_objs="$play_cmdline_objs oss_write"
794 write_errlist_objs="$write_errlist_objs oss_write"
795 write_cmdline_objs="$write_cmdline_objs oss_write"
796 fade_errlist_objs="$fade_errlist_objs oss_mix"
798 writers="$writers oss"
799 default_writer="OSS_WRITE"
800 mixers="${mixers}oss "
801 default_mixer="OSS_MIX"
803 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
804 oss_ldflags="-lossaudio"
805 AC_SUBST(oss_ldflags)
811 AC_MSG_WARN([no sys/soundcard.h $msg])
814 CPPFLAGS="$OLD_CPPFLAGS"
815 LDFLAGS="$OLD_LDFLAGS"
818 ########################################################################### alsa
819 OLD_CPPFLAGS="$CPPFLAGS"
820 OLD_LDFLAGS="$LDFLAGS"
823 msg="=> no alsa support for para_audiod/para_write"
824 if test "$OSTYPE" != "Linux"; then
829 if test "$have_alsa" = "yes"; then
830 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
832 AC_MSG_WARN([no alsa/asoundlib $msg])
836 if test "$have_alsa" = "yes"; then
837 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
839 AC_MSG_WARN([no libasound $msg])
843 if test "$have_alsa" = "yes"; then
844 alsa_ldflags="-lasound"
845 AC_SUBST(alsa_ldflags)
846 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
847 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
848 play_errlist_objs="$play_errlist_objs alsa_write"
849 play_cmdline_objs="$play_cmdline_objs alsa_write"
851 write_errlist_objs="$write_errlist_objs alsa_write"
852 write_cmdline_objs="$write_cmdline_objs alsa_write"
853 fade_errlist_objs="$fade_errlist_objs alsa_mix"
855 writers="$writers alsa"
856 default_writer="ALSA_WRITE"
857 mixers="${mixers}alsa "
858 default_mixer="ALSA_MIX"
861 CPPFLAGS="$OLD_CPPFLAGS"
862 LDFLAGS="$OLD_LDFLAGS"
864 ########################################################################### libao
865 OLD_CPPFLAGS="$CPPFLAGS"
866 OLD_LDFLAGS="$LDFLAGS"
870 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
871 [look for ao/ao.h also in dir])])
872 if test -n "$with_ao_headers"; then
873 ao_cppflags="-I$with_ao_headers"
874 CPPFLAGS="$CPPFLAGS $ao_cppflags"
876 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
877 [look for libao also in dir])])
878 if test -n "$with_ao_libs"; then
879 ao_libs="-L$with_ao_libs"
880 LDFLAGS="$LDFLAGS $ao_libs"
882 msg="no libao support for para_audiod/para_write"
883 AC_CHECK_HEADERS([ao/ao.h], [
886 AC_MSG_WARN([ao.h not found, $msg])
888 if test "$have_ao" = "yes"; then
889 AC_CHECK_LIB([ao], [ao_initialize], [], [
891 AC_MSG_WARN([ao lib not found or not working, $msg])
894 if test "$have_ao" = "yes"; then
895 AC_CHECK_HEADERS([pthread.h], [
898 AC_MSG_WARN([pthread.h not found, $msg])
901 if test "$have_ao" = "yes"; then
902 AC_CHECK_LIB([pthread], [pthread_create], [], [
904 AC_MSG_WARN([pthread lib not found or not working, $msg])
907 if test "$have_ao" = "yes"; then
908 AC_SUBST(ao_cppflags)
909 ao_ldflags="$ao_libs -lao -lpthread"
912 audiod_errlist_objs="$audiod_errlist_objs ao_write"
913 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
915 play_errlist_objs="$play_errlist_objs ao_write"
916 play_cmdline_objs="$play_cmdline_objs ao_write"
918 write_errlist_objs="$write_errlist_objs ao_write"
919 write_cmdline_objs="$write_cmdline_objs ao_write"
920 writers="$writers ao"
923 CPPFLAGS="$OLD_CPPFLAGS"
924 LDFLAGS="$OLD_LDFLAGS"
926 ############################################################# readline
927 OLD_CPPFLAGS="$CPPFLAGS"
928 OLD_LDFLAGS="$LDFLAGS"
932 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
933 [look for libreadline header files also in dir])])
934 if test -n "$with_readline_headers"; then
935 readline_cppflags="-I$with_readline_headers"
936 CPPFLAGS="$CPPFLAGS $readline_cppflags"
939 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
940 [look for readline library also in dir])])
941 if test -n "$with_readline_libs"; then
942 readline_libs="-L$with_readline_libs"
943 LDFLAGS="$LDFLAGS $readline_libs"
945 msg="no interactive cli support"
946 AC_CHECK_HEADERS([readline/readline.h], [
949 AC_MSG_WARN([readline/readline.h not found, $msg])
952 if test "$have_curses" != "yes"; then
954 AC_MSG_WARN([interactive cli support depends on curses,])
955 AC_MSG_WARN([but no curses lib was detected, $msg])
958 if test "$have_readline" = "yes"; then
959 readline_ldflags="$readline_libs -lreadline"
960 AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
961 if test "$have_readline" = "no"; then # try with -lcurses
963 AC_MSG_NOTICE([trying again with -lcurses])
964 unset ac_cv_search_rl_free_keymap 2> /dev/null
965 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
967 readline_ldflags="$readline_ldflags -lcurses"
970 if test "$have_readline" = "no"; then # try with -ltermcap
972 AC_MSG_NOTICE([trying again with -ltermcap])
973 unset ac_cv_search_rl_free_keymap 2> /dev/null
974 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
976 readline_ldflags="$readline_ldflags -ltermcap"
981 if test "$have_readline" = "yes"; then
982 AC_SUBST(readline_cppflags)
983 AC_SUBST(readline_ldflags)
984 client_errlist_objs="$client_errlist_objs interactive"
985 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
986 play_errlist_objs="$play_errlist_objs interactive"
987 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
989 AC_MSG_WARN([libreadline not found or unusable])
991 CPPFLAGS="$OLD_CPPFLAGS"
992 LDFLAGS="$OLD_LDFLAGS"
994 ############################################################# libsamplerate
995 OLD_CPPFLAGS="$CPPFLAGS"
996 OLD_LDFLAGS="$LDFLAGS"
999 have_samplerate="yes"
1000 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
1001 [look for samplerate headers also in dir])])
1002 if test -n "$with_samplerate_headers"; then
1003 samplerate_cppflags="-I$with_samplerate_headers"
1004 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
1006 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
1007 [look for samplerate libs also in dir])])
1008 if test -n "$with_samplerate_libs"; then
1009 samplerate_libs="-L$with_samplerate_libs"
1010 LDFLAGS="$LDFLAGS $samplerate_libs"
1013 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
1014 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
1016 if test "$have_samplerate" = "yes"; then
1017 AC_SUBST(samplerate_cppflags)
1018 samplerate_ldflags="$samplerate_libs -lsamplerate"
1019 AC_SUBST(samplerate_ldflags)
1021 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
1022 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
1023 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1024 play_cmdline_objs="$play_cmdline_objs resample_filter"
1026 AC_MSG_WARN([no resample support in para_audiod/para_filter])
1028 CPPFLAGS="$OLD_CPPFLAGS"
1029 LDFLAGS="$OLD_LDFLAGS"
1031 ######################################################################### server
1032 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
1033 -a "$have_osl" = "yes" ; then
1036 executables="$executables server"
1037 server_cmdline_objs="server"
1038 server_errlist_objs="$server_errlist_objs
1080 ############################################################# client
1081 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1083 executables="$executables client"
1084 client_cmdline_objs="client"
1085 client_errlist_objs="$client_errlist_objs
1104 ############################################################# audiod
1105 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1107 executables="$executables audiod"
1108 audiod_cmdline_objs="$audiod_cmdline_objs
1119 audiod_errlist_objs="$audiod_errlist_objs
1156 audiod_ldflags="$audiod_ldflags -lm"
1157 audiod_audio_formats="$audiod_audio_formats wma"
1161 ########################################################################### fade
1162 if test -n "$mixers"; then
1164 executables="$executables fade"
1165 fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
1166 fade_cmdline_objs="fade"
1167 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
1168 AC_SUBST(fade_objs, add_dot_o($fade_objs))
1169 AC_SUBST(fade_ldflags, $fade_ldflags)
1170 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
1171 objlist_to_errlist($fade_errlist_objs),
1172 errors used by para_fade)
1174 for i in $mixers; do
1175 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
1178 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
1179 enum of supported mixers)
1180 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
1181 use this mixer if none was specified)
1182 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
1183 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
1185 for i in $mixers; do
1186 printf 'extern void '$i'_mix_init(struct mixer *); '
1189 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
1190 init functions of the supported mixers)
1191 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
1192 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
1193 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
1196 AC_MSG_WARN([no mixer support])
1197 mixer_summary="para_fade: no"
1199 ########################################################################### gui
1200 if test "$have_curses" = "yes"; then
1202 executables="$executables gui"
1203 gui_cmdline_objs="gui"
1217 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1220 AC_MSG_WARN([no curses lib, cannot build para_gui])
1222 ######################################################################## filter
1231 filter_errlist_objs="
1255 filter_cmdline_objs="
1262 if test "$have_vorbis" = "yes"; then
1263 filters="$filters oggdec"
1264 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
1266 if test "$have_speex" = "yes"; then
1267 filters="$filters spxdec"
1268 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
1270 if test "$have_opus" = "yes"; then
1271 filters="$filters opusdec"
1272 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
1274 if test "$have_faad" = "yes"; then
1275 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
1276 filters="$filters aacdec"
1278 if test "$have_mad" = "yes"; then
1279 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
1280 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
1281 filters="$filters mp3dec"
1283 if test "$have_flac" = "yes"; then
1284 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
1285 filters="$filters flacdec"
1287 if test "$have_samplerate" = "yes"; then
1288 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1289 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
1290 filters="$filters resample"
1293 ############################################################# error2.h
1294 # these are always built
1297 $filter_errlist_objs
1298 $audioc_errlist_objs
1304 # optional executables
1305 if test "$build_server" = "yes"; then
1306 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1308 if test "$build_gui" = "yes"; then
1309 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1311 if test "$build_fade" = "yes"; then
1312 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1314 if test "$build_client" = "yes"; then
1315 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1317 if test "$build_audiod" = "yes"; then
1318 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1321 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1323 object_executable_matrix=
1324 for i in $executables; do
1325 eval objs=\$${i}_errlist_objs
1326 object_executable_matrix="$object_executable_matrix $i: $objs"
1328 # use echo to replace newlines by space
1329 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1331 for obj in $all_errlist_objs; do
1332 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1334 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1335 [enum {$SS NUM_SS}],
1336 [list of all objects that use the paraslash error facility]
1338 ################################################################## status items
1340 status_items="basename status num_played mtime bitrate frequency file_size
1341 status_flags format score techinfo afs_mode
1342 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1343 offset seconds_total stream_start current_time audiod_uptime image_id
1344 lyrics_id duration directory lyrics_name image_name path hash channels
1345 last_played num_chunks chunk_time amplification artist title year album
1349 for i in $status_items; do
1350 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1352 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1353 [enum of all status items])
1356 for i in $status_items; do
1357 result="$result \"$i\", "
1359 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1360 [char * array of all status items])
1362 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1363 [formats supported by para_server and para_afh])
1365 AC_SUBST(executables)
1367 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1368 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1369 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
1370 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
1371 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1372 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
1373 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1374 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1375 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1376 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1378 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1379 AC_SUBST(recv_ldflags, $recv_ldflags)
1380 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1381 errors used by para_recv)
1383 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1384 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1385 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1387 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1388 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1389 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1390 errors used by para_audiod)
1392 AC_SUBST(server_objs, add_dot_o($server_objs))
1393 AC_SUBST(server_ldflags, $server_ldflags)
1394 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1395 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1397 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1398 AC_SUBST(afh_ldflags, $afh_ldflags)
1399 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1400 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1402 AC_SUBST(write_objs, add_dot_o($write_objs))
1403 AC_SUBST(write_ldflags, $write_ldflags)
1404 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1405 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1407 AC_SUBST(client_objs, add_dot_o($client_objs))
1408 AC_SUBST(client_ldflags, $client_ldflags)
1409 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1410 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1412 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1413 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1414 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1415 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1417 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1418 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1419 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1421 AC_SUBST(play_objs, add_dot_o($play_objs))
1422 AC_SUBST(play_ldflags, $play_ldflags)
1423 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1424 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1426 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1427 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1428 enum of supported filters)
1429 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1430 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1431 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1432 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1434 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1435 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1436 enum of supported writers)
1437 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1438 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1439 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1440 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1441 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1442 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1443 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1445 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1446 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1447 enum of audio formats supported by audiod)
1448 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1449 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1453 paraslash configuration:
1454 ~~~~~~~~~~~~~~~~~~~~~~~~
1455 unix socket credentials: $have_ucred
1456 readline (interactive CLIs): $have_readline
1457 audio formats handlers: $audio_format_handlers
1458 id3 version2 support: $have_libid3tag
1459 filters: $(echo $filters)
1463 para_server: $build_server
1464 para_gui: $build_gui
1465 para_fade: $build_fade
1466 para_client: $build_client
1467 para_audiod: $build_audiod