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 filter_cmdline_objs="
133 filter_errlist_objs="
166 audioc_cmdline_objs="audioc"
167 audioc_errlist_objs="
177 afh_cmdline_objs="afh"
212 default_writer="FILE_WRITE"
258 ################################################################## clock_gettime
260 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
261 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
263 if test -n "$clock_gettime_lib"; then
264 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
265 define to 1 if clock_gettime() is supported])
267 if test "$clock_gettime_lib" = "rt"; then
268 AC_SUBST(clock_gettime_ldflags, -lrt)
270 ########################################################################### osl
272 OLD_CPPFLAGS="$CPPFLAGS"
273 OLD_LDFLAGS="$LDFLAGS"
275 AC_ARG_WITH(osl_headers, [AS_HELP_STRING(--with-osl-headers=dir,
276 [look for osl.h also in dir])])
277 if test -n "$with_osl_headers"; then
278 osl_cppflags="-I$with_osl_headers"
279 CPPFLAGS="$CPPFLAGS $osl_cppflags"
281 AC_ARG_WITH(osl_libs, [AS_HELP_STRING(--with-osl-libs=dir,
282 [look for libosl also in dir])])
283 if test -n "$with_osl_libs"; then
284 osl_libs="-L$with_osl_libs"
285 LDFLAGS="$LDFLAGS $osl_libs"
288 AC_CHECK_HEADER(osl.h, [], have_osl=no)
289 AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no)
290 if test "$have_osl" = "yes"; then
291 AC_SUBST(osl_cppflags)
292 osl_ldflags="$osl_libs -losl"
293 AC_SUBST(osl_ldflags)
295 AC_MSG_WARN([libosl not found, can not build para_server.
297 http://systemlinux.org/~maan/osl
299 git clone git://git.tuebingen.mpg.de/osl
302 CPPFLAGS="$OLD_CPPFLAGS"
303 LDFLAGS="$OLD_LDFLAGS"
305 ########################################################################### crypto
306 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
307 Force using crypto library "lib". This package requires either
308 openssl or libgcrypt being installed. Possible values for "lib"
309 are thus "openssl" and "gcrypt". If this option is not given,
310 openssl is tried first. If openssl was not found, gcrypt is
313 case "$enable_cryptolib" in
314 "openssl") check_openssl="yes"; check_gcrypt="no";;
315 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
316 "") check_openssl="yes"; check_gcrypt="yes";;
317 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
319 ###################################################################### openssl
320 if test "$check_openssl" = "yes"; then
321 OLD_CPPFLAGS="$CPPFLAGS"
322 OLD_LDFLAGS="$LDFLAGS"
325 AC_ARG_WITH(openssl_headers, [AS_HELP_STRING(--with-openssl-headers=dir,
326 [look for openssl headers also in dir])])
327 if test -n "$with_openssl_headers"; then
328 openssl_cppflags="-I$with_openssl_headers"
329 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
331 AC_ARG_WITH(openssl_libs, [AS_HELP_STRING(--with-openssl-libs=dir,
332 [look for openssl libraries also in dir])])
333 if test -n "$with_openssl_libs"; then
334 openssl_libs="-L$with_openssl_libs"
335 LDFLAGS="$LDFLAGS $openssl_libs"
337 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
338 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
339 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
340 # try harder: openssl is sometimes installed in /usr/local/ssl
341 openssl_cppflags="-I/usr/local/ssl/include"
342 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
343 openssl_libs="-L/usr/local/ssl/lib"
344 LDFLAGS="$LDFLAGS $openssl_libs"
346 unset ac_cv_header_openssl_ssl_h 2> /dev/null
347 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
348 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
349 if test "$have_openssl" = "yes"; then
350 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
353 if test "$have_openssl" = "yes"; then
354 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
355 AC_SUBST(openssl_cppflags)
356 openssl_ldflags="$openssl_libs -lssl -lcrypto"
357 AC_SUBST(openssl_ldflags)
359 server_errlist_objs="$server_errlist_objs crypt"
360 client_errlist_objs="$client_errlist_objs crypt"
361 audiod_errlist_objs="$audiod_errlist_objs crypt"
365 AC_MSG_WARN([openssl libraries not found])
367 CPPFLAGS="$OLD_CPPFLAGS"
368 LDFLAGS="$OLD_LDFLAGS"
373 ########################################################################### gcrypt
374 if test "$check_gcrypt" = "yes"; then
375 OLD_CPPFLAGS="$CPPFLAGS"
376 OLD_LDFLAGS="$LDFLAGS"
379 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
380 [look for gcrypt headers also in dir])])
381 if test -n "$with_gcrypt_headers"; then
382 gcrypt_cppflags="-I$with_gcrypt_headers"
383 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
385 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
386 [look for libgcrypt also in dir])])
387 if test -n "$with_gcrypt_libs"; then
388 gcrypt_libs="-L$with_gcrypt_libs"
389 LDFLAGS="$LDFLAGS $gcrypt_libs"
391 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
392 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
393 if test "$have_gcrypt" = "yes"; then
394 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
395 AC_SUBST(gcrypt_cppflags)
396 gcrypt_ldflags="$gcrypt_libs -lgcrypt"
397 AC_SUBST(gcrypt_ldflags)
399 server_errlist_objs="$server_errlist_objs gcrypt"
400 client_errlist_objs="$client_errlist_objs gcrypt"
401 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
403 AC_MSG_WARN([gcrypt library not found])
405 CPPFLAGS="$OLD_CPPFLAGS"
406 LDFLAGS="$OLD_LDFLAGS"
411 ########################################################################### libsocket
412 AC_CHECK_LIB([c], [socket],
414 [socket_ldflags="-lsocket"]
416 AC_SUBST(socket_ldflags)
417 ########################################################################### libnsl
418 AC_CHECK_LIB([c], [gethostbyname],
420 [nsl_ldflags="-lnsl"]
422 AC_SUBST(nsl_ldflags)
423 ########################################################################### ucred
424 AC_MSG_CHECKING(for struct ucred)
425 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
427 #include <sys/types.h>
428 #include <sys/socket.h>
430 struct ucred sucred; sucred.pid=0;
431 ]])],[have_ucred=yes],[have_ucred=no])
432 AC_MSG_RESULT($have_ucred)
433 if test ${have_ucred} = yes; then
434 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
436 ########################################################################### gengetopt
437 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
439 [gengetopt_args_info_description],
440 [ggo_descriptions_declared=yes],
441 [ggo_descriptions_declared=no],
442 [#include "conftest-ggo.h"]
444 AC_SUBST(ggo_descriptions_declared)
445 ########################################################################### curses
447 OLD_CPPFLAGS="$CPPFLAGS"
448 OLD_LDFLAGS="$LDFLAGS"
450 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
451 [look for curses.h also in dir])])
452 if test -n "$with_curses_headers"; then
453 curses_cppflags="-I$with_curses_headers"
454 CPPFLAGS="$CPPFLAGS $curses_cppflags"
456 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
457 [look for libcurses also in dir])])
458 if test -n "$with_curses_libs"; then
459 curses_libs="-L$with_curses_libs"
460 LDFLAGS="$LDFLAGS $curses_libs"
462 AC_CHECK_HEADER(curses.h, [], [
465 curses_ldflags="$curses_libs"
466 AC_CHECK_LIB([ncursesw], [initscr],
467 [curses_ldflags="$curses_libs -lncursesw"], [
468 AC_CHECK_LIB([curses], [initscr],
469 [curses_ldflags="$curses_libs -lcurses"],
474 AC_SUBST(curses_cppflags)
475 AC_SUBST(curses_ldflags)
476 CPPFLAGS="$OLD_CPPFLAGS"
477 LDFLAGS="$OLD_LDFLAGS"
479 ########################################################################### ip_mreqn
480 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
481 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
487 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
488 AC_MSG_RESULT($have_ip_mreqn)
489 if test ${have_ip_mreqn} = yes; then
490 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
492 ########################################################################### osx
494 AC_MSG_CHECKING(for CoreAudio (MacOs))
495 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
496 #include <CoreAudio/CoreAudio.h>
499 ]])],[have_core_audio=yes],[have_core_audio=no])
500 AC_MSG_RESULT($have_core_audio)
501 if test ${have_core_audio} = yes; then
502 f1="-framework CoreAudio"
503 f2="-framework AudioToolbox"
504 f3="-framework AudioUnit"
505 f4="-framework CoreServices"
508 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
509 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
510 audiod_ldflags="$audiod_ldflags $f"
512 play_errlist_objs="$play_errlist_objs osx_write ipc"
513 play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
514 play_ldflags="$play_ldflags $f"
516 write_errlist_objs="$write_errlist_objs osx_write ipc"
517 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
518 write_ldflags="$write_ldflags $f"
519 writers="$writers osx"
520 default_writer="OSX_WRITE"
521 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
523 ####################################################### ogg/vorbis/speex/opus
525 OLD_CPPFLAGS="$CPPFLAGS"
526 OLD_LDFLAGS="$LDFLAGS"
528 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
529 [look for ogg headers also in dir])])
530 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
531 [look for ogg libs also in dir])])
532 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
533 [look for vorbis headers also in dir])])
534 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
535 [look for vorbis libs also in dir])])
536 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
537 [look for speex headers also in dir])])
538 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
539 [look for speex libs also in dir])])
540 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
541 [look for opus headers also in dir])])
542 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
543 [look for opus libs also in dir])])
545 if test -n "$with_ogg_headers"; then
546 ogg_cppflags="-I$with_ogg_headers"
547 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
549 if test -n "$with_ogg_libs"; then
550 ogg_libs="-L$with_ogg_libs"
551 LDFLAGS="$LDFLAGS $ogg_libs"
553 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
554 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
559 if test "$have_ogg" = "yes"; then
561 if test -n "$with_vorbis_headers"; then
562 vorbis_cppflags="-I$with_vorbis_headers"
563 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
565 if test -n "$with_vorbis_libs"; then
566 vorbis_libs="-L$with_vorbis_libs"
567 LDFLAGS="$LDFLAGS $vorbis_libs"
569 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
570 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
573 if test -n "$with_speex_headers"; then
574 speex_cppflags="-I$with_speex_headers"
575 CPPFLAGS="$CPPFLAGS $speex_cppflags"
577 if test -n "$with_speex_libs"; then
578 speex_libs="-L$with_speex_libs"
579 LDFLAGS="$LDFLAGS $speex_libs"
581 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
582 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
585 if test -n "$with_opus_headers"; then
586 opus_cppflags="-I$with_opus_headers"
587 CPPFLAGS="$CPPFLAGS $opus_cppflags"
589 if test -n "$with_opus_libs"; then
590 opus_libs="-L$with_opus_libs"
591 LDFLAGS="$LDFLAGS $opus_libs"
593 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
594 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
596 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
602 msg="support in para_server/para_filter/para_afh"
603 if test "$have_vorbis" = "yes" || \
604 test "$have_speex" = "yes" || \
605 test "$have_opus" = "yes"; then
606 AC_SUBST(ogg_cppflags)
607 ogg_ldflags="$ogg_libs -logg"
608 if test "$OSTYPE" = "Darwin"; then
609 ogg_ldflags="-Wl,-bind_at_load $ogg_ldflags"
611 AC_SUBST(ogg_ldflags)
612 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
613 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
614 server_errlist_objs="$server_errlist_objs ogg_afh_common"
615 play_errlist_objs="$play_errlist_objs ogg_afh_common"
617 if test "$have_vorbis" = "yes"; then
618 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
619 filters="$filters oggdec"
620 vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile"
621 AC_SUBST(vorbis_ldflags)
623 server_errlist_objs="$server_errlist_objs ogg_afh"
624 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
625 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
626 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
627 afh_errlist_objs="$afh_errlist_objs ogg_afh"
628 recv_errlist_objs="$recv_errlist_objs ogg_afh"
630 audiod_audio_formats="$audiod_audio_formats ogg"
631 audio_format_handlers="$audio_format_handlers ogg"
633 if test "$have_speex" = "yes"; then
634 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
635 AC_SUBST(speex_cppflags)
636 speex_ldflags="$speex_libs -lspeex"
637 AC_SUBST(speex_ldflags)
639 filters="$filters spxdec"
641 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
642 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
643 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
644 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
645 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
646 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
648 audiod_audio_formats="$audiod_audio_formats spx"
649 audio_format_handlers="$audio_format_handlers spx"
651 AC_MSG_WARN([no ogg/speex $msg])
653 if test "$have_opus" = "yes"; then
654 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
655 AC_SUBST(opus_cppflags)
656 opus_ldflags="$opus_libs -lopus"
657 AC_SUBST(opus_ldflags)
659 filters="$filters opusdec"
661 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
662 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
663 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
664 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
665 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
666 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
668 audiod_audio_formats="$audiod_audio_formats opus"
669 audio_format_handlers="$audio_format_handlers opus"
671 AC_MSG_WARN([no ogg/opus $msg])
673 CPPFLAGS="$OLD_CPPFLAGS"
674 LDFLAGS="$OLD_LDFLAGS"
676 ########################################################################### faad
678 OLD_CPPFLAGS="$CPPFLAGS"
679 OLD_LDFLAGS="$LDFLAGS"
681 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
682 [look for neaacdec.h also in dir])])
683 if test -n "$with_faad_headers"; then
684 faad_cppflags="-I$with_faad_headers"
685 CPPFLAGS="$CPPFLAGS $faad_cppflags"
687 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
688 [look for libfaad also in dir])])
689 if test -n "$with_faad_libs"; then
690 faad_libs="-L$with_faad_libs"
691 LDFLAGS="$LDFLAGS $faad_libs"
693 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
694 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
695 if test "$have_faad" = "yes"; then
696 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
697 AC_SUBST(faad_cppflags)
698 faad_ldflags="$faad_libs -lfaad"
699 AC_SUBST(faad_ldflags)
701 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
702 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
703 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
704 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
705 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
706 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
708 audiod_audio_formats="$audiod_audio_formats aac"
709 audio_format_handlers="$audio_format_handlers aac"
710 filters="$filters aacdec"
712 AC_MSG_WARN([no aac support in para_audiod/para_filter])
714 CPPFLAGS="$OLD_CPPFLAGS"
715 LDFLAGS="$OLD_LDFLAGS"
717 ########################################################################### mad
719 OLD_CPPFLAGS="$CPPFLAGS"
720 OLD_LDFLAGS="$LDFLAGS"
723 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
724 [look for mad.h also in dir])])
725 if test -n "$with_mad_headers"; then
726 mad_cppflags="-I$with_mad_headers"
727 CPPFLAGS="$CPPFLAGS $mad_cppflags"
729 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
730 [look for libmad also in dir])])
731 if test -n "$with_mad_libs"; then
732 mad_libs="-L$with_mad_libs"
733 LDFLAGS="$LDFLAGS $mad_libs"
735 AC_CHECK_HEADERS([mad.h], [], [
738 AC_CHECK_LIB([mad], [mad_stream_init], [], [
741 if test "$have_mad" = "yes"; then
742 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
743 AC_SUBST(mad_cppflags)
744 mad_ldflags="$mad_libs -lmad"
745 AC_SUBST(mad_ldflags)
746 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
747 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
748 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
749 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
750 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
751 play_errlist_objs="$play_errlist_objs mp3dec_filter"
752 audiod_audio_formats="$audiod_audio_formats mp3"
753 filters="$filters mp3dec"
755 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
757 CPPFLAGS="$OLD_CPPFLAGS"
758 LDFLAGS="$OLD_LDFLAGS"
760 ###################################################################### libid3tag
761 OLD_CPPFLAGS="$CPPFLAGS"
762 OLD_LDFLAGS="$LDFLAGS"
766 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
767 [look for id3tag header files also in dir])])
768 if test -n "$with_id3tag_headers"; then
769 id3tag_cppflags="-I$with_id3tag_headers"
770 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
772 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
773 [look for id3tag libs also in dir])])
774 if test -n "$with_id3tag_libs"; then
775 id3tag_libs="-L$with_id3tag_libs"
776 LDFLAGS="$LDFLAGS $id3tag_libs"
779 AC_MSG_CHECKING(for libid3tag)
780 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
783 struct id3_tag t = {.flags = 0};
784 ]])],[],[have_libid3tag=no])
785 AC_MSG_RESULT($have_libid3tag)
787 if test ${have_libid3tag} = yes; then
788 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
789 AC_SUBST(id3tag_cppflags)
790 AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
792 CPPFLAGS="$OLD_CPPFLAGS"
793 LDFLAGS="$OLD_LDFLAGS"
795 ########################################################################### flac
796 OLD_CPPFLAGS="$CPPFLAGS"
797 OLD_LDFLAGS="$LDFLAGS"
801 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
802 [look for flac headers also in dir])])
803 if test -n "$with_flac_headers"; then
804 flac_cppflags="-I$with_flac_headers"
805 CPPFLAGS="$CPPFLAGS $flac_cppflags"
807 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
808 [look for flac libs also in dir])])
809 if test -n "$with_flac_libs"; then
810 flac_libs="-L$with_flac_libs"
811 LDFLAGS="$LDFLAGS $flac_libs"
813 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
814 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
815 if test "$have_flac" = "yes"; then
816 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
817 AC_SUBST(flac_cppflags)
818 flac_ldflags="$flac_libs -lFLAC"
819 AC_SUBST(flac_ldflags)
821 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
822 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
823 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
824 afh_errlist_objs="$afh_errlist_objs flac_afh"
825 server_errlist_objs="$server_errlist_objs flac_afh"
826 recv_errlist_objs="$recv_errlist_objs flac_afh"
827 filters="$filters flacdec"
828 audio_format_handlers="$audio_format_handlers flac"
829 audiod_audio_formats="$audiod_audio_formats flac"
831 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
833 CPPFLAGS="$OLD_CPPFLAGS"
834 LDFLAGS="$OLD_LDFLAGS"
836 ########################################################################### oss
837 OLD_CPPFLAGS="$CPPFLAGS"
838 OLD_LDFLAGS="$LDFLAGS"
842 msg="=> will not build oss writer"
844 AC_CHECK_HEADER(sys/soundcard.h, [
845 audiod_errlist_objs="$audiod_errlist_objs oss_write"
846 play_errlist_objs="$play_errlist_objs oss_write"
847 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
848 play_cmdline_objs="$play_cmdline_objs oss_write"
850 write_errlist_objs="$write_errlist_objs oss_write"
851 write_cmdline_objs="$write_cmdline_objs oss_write"
852 fade_errlist_objs="$fade_errlist_objs oss_mix"
854 writers="$writers oss"
855 default_writer="OSS_WRITE"
856 mixers="${mixers}oss "
857 default_mixer="OSS_MIX"
859 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
860 oss_ldflags="-lossaudio"
861 AC_SUBST(oss_ldflags)
867 AC_MSG_WARN([no sys/soundcard.h $msg])
870 CPPFLAGS="$OLD_CPPFLAGS"
871 LDFLAGS="$OLD_LDFLAGS"
874 ########################################################################### alsa
875 OLD_CPPFLAGS="$CPPFLAGS"
876 OLD_LDFLAGS="$LDFLAGS"
879 msg="=> no alsa support for para_audiod/para_write"
880 if test "$OSTYPE" != "Linux"; then
885 if test "$have_alsa" = "yes"; then
886 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
888 AC_MSG_WARN([no alsa/asoundlib $msg])
892 if test "$have_alsa" = "yes"; then
893 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
895 AC_MSG_WARN([no libasound $msg])
899 if test "$have_alsa" = "yes"; then
900 alsa_ldflags="-lasound"
901 AC_SUBST(alsa_ldflags)
902 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
903 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
904 play_errlist_objs="$play_errlist_objs alsa_write"
905 play_cmdline_objs="$play_cmdline_objs alsa_write"
907 write_errlist_objs="$write_errlist_objs alsa_write"
908 write_cmdline_objs="$write_cmdline_objs alsa_write"
909 fade_errlist_objs="$fade_errlist_objs alsa_mix"
911 writers="$writers alsa"
912 default_writer="ALSA_WRITE"
913 mixers="${mixers}alsa "
914 default_mixer="ALSA_MIX"
917 CPPFLAGS="$OLD_CPPFLAGS"
918 LDFLAGS="$OLD_LDFLAGS"
920 ########################################################################### libao
921 OLD_CPPFLAGS="$CPPFLAGS"
922 OLD_LDFLAGS="$LDFLAGS"
926 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
927 [look for ao/ao.h also in dir])])
928 if test -n "$with_ao_headers"; then
929 ao_cppflags="-I$with_ao_headers"
930 CPPFLAGS="$CPPFLAGS $ao_cppflags"
932 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
933 [look for libao also in dir])])
934 if test -n "$with_ao_libs"; then
935 ao_libs="-L$with_ao_libs"
936 LDFLAGS="$LDFLAGS $ao_libs"
938 msg="no libao support for para_audiod/para_write"
939 AC_CHECK_HEADERS([ao/ao.h], [
942 AC_MSG_WARN([ao.h not found, $msg])
944 if test "$have_ao" = "yes"; then
945 AC_CHECK_LIB([ao], [ao_initialize], [], [
947 AC_MSG_WARN([ao lib not found or not working, $msg])
950 if test "$have_ao" = "yes"; then
951 AC_CHECK_HEADERS([pthread.h], [
954 AC_MSG_WARN([pthread.h not found, $msg])
957 if test "$have_ao" = "yes"; then
958 AC_CHECK_LIB([pthread], [pthread_create], [], [
960 AC_MSG_WARN([pthread lib not found or not working, $msg])
963 if test "$have_ao" = "yes"; then
964 AC_SUBST(ao_cppflags)
965 ao_ldflags="$ao_libs -lao -lpthread"
968 audiod_errlist_objs="$audiod_errlist_objs ao_write"
969 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
971 play_errlist_objs="$play_errlist_objs ao_write"
972 play_cmdline_objs="$play_cmdline_objs ao_write"
974 write_errlist_objs="$write_errlist_objs ao_write"
975 write_cmdline_objs="$write_cmdline_objs ao_write"
976 writers="$writers ao"
979 CPPFLAGS="$OLD_CPPFLAGS"
980 LDFLAGS="$OLD_LDFLAGS"
982 ############################################################# readline
983 OLD_CPPFLAGS="$CPPFLAGS"
984 OLD_LDFLAGS="$LDFLAGS"
988 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
989 [look for libreadline header files also in dir])])
990 if test -n "$with_readline_headers"; then
991 readline_cppflags="-I$with_readline_headers"
992 CPPFLAGS="$CPPFLAGS $readline_cppflags"
995 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
996 [look for readline library also in dir])])
997 if test -n "$with_readline_libs"; then
998 readline_libs="-L$with_readline_libs"
999 LDFLAGS="$LDFLAGS $readline_libs"
1001 msg="no interactive cli support"
1002 AC_CHECK_HEADERS([readline/readline.h], [
1005 AC_MSG_WARN([readline/readline.h not found, $msg])
1008 if test "$have_curses" != "yes"; then
1010 AC_MSG_WARN([interactive cli support depends on curses,])
1011 AC_MSG_WARN([but no curses lib was detected, $msg])
1014 if test "$have_readline" = "yes"; then
1015 readline_ldflags="$readline_libs -lreadline"
1016 AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
1017 if test "$have_readline" = "no"; then # try with -lcurses
1019 AC_MSG_NOTICE([trying again with -lcurses])
1020 unset ac_cv_search_rl_free_keymap 2> /dev/null
1021 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1023 readline_ldflags="$readline_ldflags -lcurses"
1026 if test "$have_readline" = "no"; then # try with -ltermcap
1028 AC_MSG_NOTICE([trying again with -ltermcap])
1029 unset ac_cv_search_rl_free_keymap 2> /dev/null
1030 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1032 readline_ldflags="$readline_ldflags -ltermcap"
1037 if test "$have_readline" = "yes"; then
1038 AC_SUBST(readline_cppflags)
1039 AC_SUBST(readline_ldflags)
1040 client_errlist_objs="$client_errlist_objs interactive"
1041 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
1042 play_errlist_objs="$play_errlist_objs interactive"
1043 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
1045 AC_MSG_WARN([libreadline not found or unusable])
1047 CPPFLAGS="$OLD_CPPFLAGS"
1048 LDFLAGS="$OLD_LDFLAGS"
1050 ############################################################# libsamplerate
1051 OLD_CPPFLAGS="$CPPFLAGS"
1052 OLD_LDFLAGS="$LDFLAGS"
1055 have_samplerate="yes"
1056 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
1057 [look for samplerate headers also in dir])])
1058 if test -n "$with_samplerate_headers"; then
1059 samplerate_cppflags="-I$with_samplerate_headers"
1060 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
1062 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
1063 [look for samplerate libs also in dir])])
1064 if test -n "$with_samplerate_libs"; then
1065 samplerate_libs="-L$with_samplerate_libs"
1066 LDFLAGS="$LDFLAGS $samplerate_libs"
1069 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
1070 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
1072 if test "$have_samplerate" = "yes"; then
1073 AC_SUBST(samplerate_cppflags)
1074 samplerate_ldflags="$samplerate_libs -lsamplerate"
1075 AC_SUBST(samplerate_ldflags)
1077 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1078 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
1079 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
1080 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
1081 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1082 play_cmdline_objs="$play_cmdline_objs resample_filter"
1083 filters="$filters resample"
1085 AC_MSG_WARN([no resample support in para_audiod/para_filter])
1087 CPPFLAGS="$OLD_CPPFLAGS"
1088 LDFLAGS="$OLD_LDFLAGS"
1090 ######################################################################### server
1091 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
1092 -a "$have_osl" = "yes" ; then
1095 executables="$executables server"
1096 server_cmdline_objs="server"
1097 server_errlist_objs="$server_errlist_objs
1139 ############################################################# client
1140 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1142 executables="$executables client"
1143 client_cmdline_objs="client"
1144 client_errlist_objs="$client_errlist_objs
1163 ############################################################# audiod
1164 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1166 executables="$executables audiod"
1167 audiod_cmdline_objs="$audiod_cmdline_objs
1178 audiod_errlist_objs="$audiod_errlist_objs
1215 audiod_ldflags="$audiod_ldflags -lm"
1216 audiod_audio_formats="$audiod_audio_formats wma"
1220 ########################################################################### fade
1221 if test -n "$mixers"; then
1223 executables="$executables fade"
1224 fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
1225 fade_cmdline_objs="fade"
1226 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
1227 AC_SUBST(fade_objs, add_dot_o($fade_objs))
1228 AC_SUBST(fade_ldflags, $fade_ldflags)
1229 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
1230 objlist_to_errlist($fade_errlist_objs),
1231 errors used by para_fade)
1233 for i in $mixers; do
1234 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
1237 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
1238 enum of supported mixers)
1239 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
1240 use this mixer if none was specified)
1241 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
1242 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
1244 for i in $mixers; do
1245 printf 'extern void '$i'_mix_init(struct mixer *); '
1248 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
1249 init functions of the supported mixers)
1250 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
1251 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
1252 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
1255 AC_MSG_WARN([no mixer support])
1256 mixer_summary="para_fade: no"
1258 ########################################################################### gui
1259 if test "$have_curses" = "yes"; then
1261 executables="$executables gui"
1262 gui_cmdline_objs="gui"
1276 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1279 AC_MSG_WARN([no curses lib, cannot build para_gui])
1281 ############################################################# error2.h
1282 # these are always built
1285 $filter_errlist_objs
1286 $audioc_errlist_objs
1292 # optional executables
1293 if test "$build_server" = "yes"; then
1294 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1296 if test "$build_gui" = "yes"; then
1297 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1299 if test "$build_fade" = "yes"; then
1300 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1302 if test "$build_client" = "yes"; then
1303 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1305 if test "$build_audiod" = "yes"; then
1306 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1309 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1311 object_executable_matrix=
1312 for i in $executables; do
1313 eval objs=\$${i}_errlist_objs
1314 object_executable_matrix="$object_executable_matrix $i: $objs"
1316 # use echo to replace newlines by space
1317 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1319 for obj in $all_errlist_objs; do
1320 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1322 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1323 [enum {$SS NUM_SS}],
1324 [list of all objects that use the paraslash error facility]
1326 ################################################################## status items
1328 status_items="basename status num_played mtime bitrate frequency file_size
1329 status_flags format score techinfo afs_mode
1330 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1331 offset seconds_total stream_start current_time audiod_uptime image_id
1332 lyrics_id duration directory lyrics_name image_name path hash channels
1333 last_played num_chunks chunk_time amplification artist title year album
1337 for i in $status_items; do
1338 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1340 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1341 [enum of all status items])
1344 for i in $status_items; do
1345 result="$result \"$i\", "
1347 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1348 [char * array of all status items])
1350 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1351 [formats supported by para_server and para_afh])
1353 AC_SUBST(executables)
1355 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1356 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1357 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
1358 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
1359 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1360 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
1361 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1362 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1363 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1364 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1366 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1367 AC_SUBST(recv_ldflags, $recv_ldflags)
1368 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1369 errors used by para_recv)
1371 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1372 AC_SUBST(filter_ldflags, $filter_ldflags)
1373 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1374 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1376 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1377 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1378 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1379 errors used by para_audiod)
1381 AC_SUBST(server_objs, add_dot_o($server_objs))
1382 AC_SUBST(server_ldflags, $server_ldflags)
1383 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1384 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1386 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1387 AC_SUBST(afh_ldflags, $afh_ldflags)
1388 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1389 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1391 AC_SUBST(write_objs, add_dot_o($write_objs))
1392 AC_SUBST(write_ldflags, $write_ldflags)
1393 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1394 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1396 AC_SUBST(client_objs, add_dot_o($client_objs))
1397 AC_SUBST(client_ldflags, $client_ldflags)
1398 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1399 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1401 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1402 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1403 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1404 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1406 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1407 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1408 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1410 AC_SUBST(play_objs, add_dot_o($play_objs))
1411 AC_SUBST(play_ldflags, $play_ldflags)
1412 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1413 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1415 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1416 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1417 enum of supported filters)
1418 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1419 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1420 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1421 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1423 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1424 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1425 enum of supported writers)
1426 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1427 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1428 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1429 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1430 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1431 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1432 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1434 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1435 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1436 enum of audio formats supported by audiod)
1437 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1438 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1442 paraslash configuration:
1443 ~~~~~~~~~~~~~~~~~~~~~~~~
1444 unix socket credentials: $have_ucred
1445 readline (interactive CLIs): $have_readline
1446 audio formats handlers: $audio_format_handlers
1447 id3 version2 support: $have_libid3tag
1448 filters: $(echo $filters)
1452 para_server: $build_server
1453 para_gui: $build_gui
1454 para_fade: $build_fade
1455 para_client: $build_client
1456 para_audiod: $build_audiod