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_libs="$gcrypt_libs -lgcrypt"
397 server_ldflags="$server_ldflags $gcrypt_libs"
398 client_ldflags="$client_ldflags $gcrypt_libs"
399 audiod_ldflags="$audiod_ldflags $gcrypt_libs"
401 server_errlist_objs="$server_errlist_objs gcrypt"
402 client_errlist_objs="$client_errlist_objs gcrypt"
403 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
405 AC_MSG_WARN([gcrypt library not found])
407 CPPFLAGS="$OLD_CPPFLAGS"
408 LDFLAGS="$OLD_LDFLAGS"
413 ########################################################################### libsocket
414 AC_CHECK_LIB([c], [socket],
416 [socket_lib="-lsocket"]
418 server_ldflags="$server_ldflags $socket_lib"
419 client_ldflags="$client_ldflags $socket_lib"
420 audioc_ldflags="$audioc_ldflags $socket_lib"
421 audiod_ldflags="$audiod_ldflags $socket_lib"
422 recv_ldflags="$recv_ldflags $socket_lib"
423 AC_SEARCH_LIBS([connect],[socket],[],[
424 AC_MSG_ERROR([Fatal: Did not find connect().])
426 ########################################################################### libnsl
427 AC_CHECK_LIB([c], [gethostbyname],
431 server_ldflags="$server_ldflags $nsl_lib"
432 client_ldflags="$client_ldflags $nsl_lib"
433 audioc_ldflags="$audioc_ldflags $nsl_lib"
434 recv_ldflags="$recv_ldflags $nsl_lib"
435 AC_SEARCH_LIBS([inet_ntoa],[nsl],[],[
436 AC_MSG_ERROR([Fatal: Did not find inet_ntoa().])
438 ########################################################################### ucred
439 AC_MSG_CHECKING(for struct ucred)
440 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
442 #include <sys/types.h>
443 #include <sys/socket.h>
445 struct ucred sucred; sucred.pid=0;
446 ]])],[have_ucred=yes],[have_ucred=no])
447 AC_MSG_RESULT($have_ucred)
448 if test ${have_ucred} = yes; then
449 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
451 ########################################################################### gengetopt
452 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
454 [gengetopt_args_info_description],
455 [ggo_descriptions_declared=yes],
456 [ggo_descriptions_declared=no],
457 [#include "conftest-ggo.h"]
459 AC_SUBST(ggo_descriptions_declared)
460 ########################################################################### curses
462 OLD_CPPFLAGS="$CPPFLAGS"
463 OLD_LDFLAGS="$LDFLAGS"
465 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
466 [look for curses.h also in dir])])
467 if test -n "$with_curses_headers"; then
468 curses_cppflags="-I$with_curses_headers"
469 CPPFLAGS="$CPPFLAGS $curses_cppflags"
471 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
472 [look for libcurses also in dir])])
473 if test -n "$with_curses_libs"; then
474 curses_libs="-L$with_curses_libs"
475 LDFLAGS="$LDFLAGS $curses_libs"
477 AC_CHECK_HEADER(curses.h, [], [
480 curses_ldflags="$curses_libs"
481 AC_CHECK_LIB([ncursesw], [initscr],
482 [curses_ldflags="$curses_libs -lncursesw"], [
483 AC_CHECK_LIB([curses], [initscr],
484 [curses_ldflags="$curses_libs -lcurses"],
489 AC_SUBST(curses_cppflags)
490 AC_SUBST(curses_ldflags)
491 CPPFLAGS="$OLD_CPPFLAGS"
492 LDFLAGS="$OLD_LDFLAGS"
494 ########################################################################### ip_mreqn
495 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
496 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
502 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
503 AC_MSG_RESULT($have_ip_mreqn)
504 if test ${have_ip_mreqn} = yes; then
505 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
507 ########################################################################### osx
509 AC_MSG_CHECKING(for CoreAudio (MacOs))
510 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
511 #include <CoreAudio/CoreAudio.h>
514 ]])],[have_core_audio=yes],[have_core_audio=no])
515 AC_MSG_RESULT($have_core_audio)
516 if test ${have_core_audio} = yes; then
517 f1="-framework CoreAudio"
518 f2="-framework AudioToolbox"
519 f3="-framework AudioUnit"
520 f4="-framework CoreServices"
523 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
524 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
525 audiod_ldflags="$audiod_ldflags $f"
527 play_errlist_objs="$play_errlist_objs osx_write ipc"
528 play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
529 play_ldflags="$play_ldflags $f"
531 write_errlist_objs="$write_errlist_objs osx_write ipc"
532 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
533 write_ldflags="$write_ldflags $f"
534 writers="$writers osx"
535 default_writer="OSX_WRITE"
536 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
538 ####################################################### ogg/vorbis/speex/opus
540 OLD_CPPFLAGS="$CPPFLAGS"
541 OLD_LDFLAGS="$LDFLAGS"
543 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
544 [look for ogg headers also in dir])])
545 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
546 [look for ogg libs also in dir])])
547 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
548 [look for vorbis headers also in dir])])
549 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
550 [look for vorbis libs also in dir])])
551 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
552 [look for speex headers also in dir])])
553 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
554 [look for speex libs also in dir])])
555 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
556 [look for opus headers also in dir])])
557 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
558 [look for opus libs also in dir])])
560 if test -n "$with_ogg_headers"; then
561 ogg_cppflags="-I$with_ogg_headers"
562 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
564 if test -n "$with_ogg_libs"; then
565 ogg_libs="-L$with_ogg_libs"
566 LDFLAGS="$LDFLAGS $ogg_libs"
568 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
569 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
574 if test "$have_ogg" = "yes"; then
576 if test -n "$with_vorbis_headers"; then
577 vorbis_cppflags="-I$with_vorbis_headers"
578 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
580 if test -n "$with_vorbis_libs"; then
581 vorbis_libs="-L$with_vorbis_libs"
582 LDFLAGS="$LDFLAGS $vorbis_libs"
584 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
585 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
588 if test -n "$with_speex_headers"; then
589 speex_cppflags="-I$with_speex_headers"
590 CPPFLAGS="$CPPFLAGS $speex_cppflags"
592 if test -n "$with_speex_libs"; then
593 speex_libs="-L$with_speex_libs"
594 LDFLAGS="$LDFLAGS $speex_libs"
596 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
597 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
600 if test -n "$with_opus_headers"; then
601 opus_cppflags="-I$with_opus_headers"
602 CPPFLAGS="$CPPFLAGS $opus_cppflags"
604 if test -n "$with_opus_libs"; then
605 opus_libs="-L$with_opus_libs"
606 LDFLAGS="$LDFLAGS $opus_libs"
608 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
609 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
611 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
617 msg="support in para_server/para_filter/para_afh"
618 if test "$have_vorbis" = "yes" || \
619 test "$have_speex" = "yes" || \
620 test "$have_opus" = "yes"; then
621 AC_SUBST(ogg_cppflags)
622 ogg_ldflags="$ogg_libs -logg"
623 if test "$OSTYPE" = "Darwin"; then
624 ogg_ldflags="-Wl,-bind_at_load $ogg_ldflags"
626 AC_SUBST(ogg_ldflags)
627 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
628 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
629 server_errlist_objs="$server_errlist_objs ogg_afh_common"
630 play_errlist_objs="$play_errlist_objs ogg_afh_common"
632 if test "$have_vorbis" = "yes"; then
633 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
634 filters="$filters oggdec"
635 vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile"
636 AC_SUBST(vorbis_ldflags)
638 server_errlist_objs="$server_errlist_objs ogg_afh"
639 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
640 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
641 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
642 afh_errlist_objs="$afh_errlist_objs ogg_afh"
643 recv_errlist_objs="$recv_errlist_objs ogg_afh"
645 audiod_audio_formats="$audiod_audio_formats ogg"
646 audio_format_handlers="$audio_format_handlers ogg"
648 if test "$have_speex" = "yes"; then
649 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
650 AC_SUBST(speex_cppflags)
651 speex_ldflags="$speex_libs -lspeex"
652 AC_SUBST(speex_ldflags)
654 filters="$filters spxdec"
656 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
657 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
658 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
659 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
660 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
661 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
663 audiod_audio_formats="$audiod_audio_formats spx"
664 audio_format_handlers="$audio_format_handlers spx"
666 AC_MSG_WARN([no ogg/speex $msg])
668 if test "$have_opus" = "yes"; then
669 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
670 AC_SUBST(opus_cppflags)
671 opus_ldflags="$opus_libs -lopus"
672 AC_SUBST(opus_ldflags)
674 filters="$filters opusdec"
676 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
677 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
678 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
679 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
680 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
681 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
683 audiod_audio_formats="$audiod_audio_formats opus"
684 audio_format_handlers="$audio_format_handlers opus"
686 AC_MSG_WARN([no ogg/opus $msg])
688 CPPFLAGS="$OLD_CPPFLAGS"
689 LDFLAGS="$OLD_LDFLAGS"
691 ########################################################################### faad
693 OLD_CPPFLAGS="$CPPFLAGS"
694 OLD_LDFLAGS="$LDFLAGS"
696 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
697 [look for neaacdec.h also in dir])])
698 if test -n "$with_faad_headers"; then
699 faad_cppflags="-I$with_faad_headers"
700 CPPFLAGS="$CPPFLAGS $faad_cppflags"
702 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
703 [look for libfaad also in dir])])
704 if test -n "$with_faad_libs"; then
705 faad_libs="-L$with_faad_libs"
706 LDFLAGS="$LDFLAGS $faad_libs"
708 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
709 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
710 if test "$have_faad" = "yes"; then
711 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
712 AC_SUBST(faad_cppflags)
713 faad_ldflags="$faad_libs -lfaad"
714 AC_SUBST(faad_ldflags)
716 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
717 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
718 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
719 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
720 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
721 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
723 audiod_audio_formats="$audiod_audio_formats aac"
724 audio_format_handlers="$audio_format_handlers aac"
725 filters="$filters aacdec"
727 AC_MSG_WARN([no aac support in para_audiod/para_filter])
729 CPPFLAGS="$OLD_CPPFLAGS"
730 LDFLAGS="$OLD_LDFLAGS"
732 ########################################################################### mad
734 OLD_CPPFLAGS="$CPPFLAGS"
735 OLD_LDFLAGS="$LDFLAGS"
738 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
739 [look for mad.h also in dir])])
740 if test -n "$with_mad_headers"; then
741 mad_cppflags="-I$with_mad_headers"
742 CPPFLAGS="$CPPFLAGS $mad_cppflags"
744 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
745 [look for libmad also in dir])])
746 if test -n "$with_mad_libs"; then
747 mad_libs="-L$with_mad_libs"
748 LDFLAGS="$LDFLAGS $mad_libs"
750 AC_CHECK_HEADERS([mad.h], [], [
753 AC_CHECK_LIB([mad], [mad_stream_init], [], [
756 if test "$have_mad" = "yes"; then
757 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
758 AC_SUBST(mad_cppflags)
759 mad_ldflags="$mad_libs -lmad"
760 AC_SUBST(mad_ldflags)
761 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
762 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
763 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
764 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
765 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
766 play_errlist_objs="$play_errlist_objs mp3dec_filter"
767 audiod_audio_formats="$audiod_audio_formats mp3"
768 filters="$filters mp3dec"
770 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
772 CPPFLAGS="$OLD_CPPFLAGS"
773 LDFLAGS="$OLD_LDFLAGS"
775 ###################################################################### libid3tag
776 OLD_CPPFLAGS="$CPPFLAGS"
777 OLD_LDFLAGS="$LDFLAGS"
781 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
782 [look for id3tag header files also in dir])])
783 if test -n "$with_id3tag_headers"; then
784 id3tag_cppflags="-I$with_id3tag_headers"
785 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
787 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
788 [look for id3tag libs also in dir])])
789 if test -n "$with_id3tag_libs"; then
790 id3tag_libs="-L$with_id3tag_libs"
791 LDFLAGS="$LDFLAGS $id3tag_libs"
794 AC_MSG_CHECKING(for libid3tag)
795 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
798 struct id3_tag t = {.flags = 0};
799 ]])],[],[have_libid3tag=no])
800 AC_MSG_RESULT($have_libid3tag)
802 if test ${have_libid3tag} = yes; then
803 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
804 AC_SUBST(id3tag_cppflags)
805 AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
807 CPPFLAGS="$OLD_CPPFLAGS"
808 LDFLAGS="$OLD_LDFLAGS"
810 ########################################################################### flac
811 OLD_CPPFLAGS="$CPPFLAGS"
812 OLD_LDFLAGS="$LDFLAGS"
816 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
817 [look for flac headers also in dir])])
818 if test -n "$with_flac_headers"; then
819 flac_cppflags="-I$with_flac_headers"
820 CPPFLAGS="$CPPFLAGS $flac_cppflags"
822 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
823 [look for flac libs also in dir])])
824 if test -n "$with_flac_libs"; then
825 flac_libs="-L$with_flac_libs"
826 LDFLAGS="$LDFLAGS $flac_libs"
828 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
829 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
830 if test "$have_flac" = "yes"; then
831 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
832 AC_SUBST(flac_cppflags)
833 flac_ldflags="$flac_libs -lFLAC"
834 AC_SUBST(flac_ldflags)
836 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
837 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
838 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
839 afh_errlist_objs="$afh_errlist_objs flac_afh"
840 server_errlist_objs="$server_errlist_objs flac_afh"
841 recv_errlist_objs="$recv_errlist_objs flac_afh"
842 filters="$filters flacdec"
843 audio_format_handlers="$audio_format_handlers flac"
844 audiod_audio_formats="$audiod_audio_formats flac"
846 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
848 CPPFLAGS="$OLD_CPPFLAGS"
849 LDFLAGS="$OLD_LDFLAGS"
851 ########################################################################### oss
852 OLD_CPPFLAGS="$CPPFLAGS"
853 OLD_LDFLAGS="$LDFLAGS"
857 msg="=> will not build oss writer"
859 AC_CHECK_HEADER(sys/soundcard.h, [
860 audiod_errlist_objs="$audiod_errlist_objs oss_write"
861 play_errlist_objs="$play_errlist_objs oss_write"
862 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
863 play_cmdline_objs="$play_cmdline_objs oss_write"
865 write_errlist_objs="$write_errlist_objs oss_write"
866 write_cmdline_objs="$write_cmdline_objs oss_write"
867 fade_errlist_objs="$fade_errlist_objs oss_mix"
869 writers="$writers oss"
870 default_writer="OSS_WRITE"
871 mixers="${mixers}oss "
872 default_mixer="OSS_MIX"
874 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
875 oss_ldflags="-lossaudio"
876 AC_SUBST(oss_ldflags)
882 AC_MSG_WARN([no sys/soundcard.h $msg])
885 CPPFLAGS="$OLD_CPPFLAGS"
886 LDFLAGS="$OLD_LDFLAGS"
889 ########################################################################### alsa
890 OLD_CPPFLAGS="$CPPFLAGS"
891 OLD_LDFLAGS="$LDFLAGS"
894 msg="=> no alsa support for para_audiod/para_write"
895 if test "$OSTYPE" != "Linux"; then
900 if test "$have_alsa" = "yes"; then
901 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
903 AC_MSG_WARN([no alsa/asoundlib $msg])
907 if test "$have_alsa" = "yes"; then
908 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
910 AC_MSG_WARN([no libasound $msg])
914 if test "$have_alsa" = "yes"; then
915 alsa_ldflags="-lasound"
916 AC_SUBST(alsa_ldflags)
917 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
918 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
919 play_errlist_objs="$play_errlist_objs alsa_write"
920 play_cmdline_objs="$play_cmdline_objs alsa_write"
922 write_errlist_objs="$write_errlist_objs alsa_write"
923 write_cmdline_objs="$write_cmdline_objs alsa_write"
924 fade_errlist_objs="$fade_errlist_objs alsa_mix"
926 writers="$writers alsa"
927 default_writer="ALSA_WRITE"
928 mixers="${mixers}alsa "
929 default_mixer="ALSA_MIX"
932 CPPFLAGS="$OLD_CPPFLAGS"
933 LDFLAGS="$OLD_LDFLAGS"
935 ########################################################################### libao
936 OLD_CPPFLAGS="$CPPFLAGS"
937 OLD_LDFLAGS="$LDFLAGS"
941 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
942 [look for ao/ao.h also in dir])])
943 if test -n "$with_ao_headers"; then
944 ao_cppflags="-I$with_ao_headers"
945 CPPFLAGS="$CPPFLAGS $ao_cppflags"
947 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
948 [look for libao also in dir])])
949 if test -n "$with_ao_libs"; then
950 ao_libs="-L$with_ao_libs"
951 LDFLAGS="$LDFLAGS $ao_libs"
953 msg="no libao support for para_audiod/para_write"
954 AC_CHECK_HEADERS([ao/ao.h], [
957 AC_MSG_WARN([ao.h not found, $msg])
959 if test "$have_ao" = "yes"; then
960 AC_CHECK_LIB([ao], [ao_initialize], [], [
962 AC_MSG_WARN([ao lib not found or not working, $msg])
965 if test "$have_ao" = "yes"; then
966 AC_CHECK_HEADERS([pthread.h], [
969 AC_MSG_WARN([pthread.h not found, $msg])
972 if test "$have_ao" = "yes"; then
973 AC_CHECK_LIB([pthread], [pthread_create], [], [
975 AC_MSG_WARN([pthread lib not found or not working, $msg])
978 if test "$have_ao" = "yes"; then
979 AC_SUBST(ao_cppflags)
980 ao_ldflags="$ao_libs -lao -lpthread"
983 audiod_errlist_objs="$audiod_errlist_objs ao_write"
984 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
986 play_errlist_objs="$play_errlist_objs ao_write"
987 play_cmdline_objs="$play_cmdline_objs ao_write"
989 write_errlist_objs="$write_errlist_objs ao_write"
990 write_cmdline_objs="$write_cmdline_objs ao_write"
991 writers="$writers ao"
994 CPPFLAGS="$OLD_CPPFLAGS"
995 LDFLAGS="$OLD_LDFLAGS"
997 ############################################################# readline
998 OLD_CPPFLAGS="$CPPFLAGS"
999 OLD_LDFLAGS="$LDFLAGS"
1003 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
1004 [look for libreadline header files also in dir])])
1005 if test -n "$with_readline_headers"; then
1006 readline_cppflags="-I$with_readline_headers"
1007 CPPFLAGS="$CPPFLAGS $readline_cppflags"
1010 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
1011 [look for readline library also in dir])])
1012 if test -n "$with_readline_libs"; then
1013 readline_libs="-L$with_readline_libs"
1014 LDFLAGS="$LDFLAGS $readline_libs"
1016 msg="no interactive cli support"
1017 AC_CHECK_HEADERS([readline/readline.h], [
1020 AC_MSG_WARN([readline/readline.h not found, $msg])
1023 if test "$have_curses" != "yes"; then
1025 AC_MSG_WARN([interactive cli support depends on curses,])
1026 AC_MSG_WARN([but no curses lib was detected, $msg])
1029 if test "$have_readline" = "yes"; then
1030 readline_ldflags="$readline_libs -lreadline"
1031 AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
1032 if test "$have_readline" = "no"; then # try with -lcurses
1034 AC_MSG_NOTICE([trying again with -lcurses])
1035 unset ac_cv_search_rl_free_keymap 2> /dev/null
1036 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1038 readline_ldflags="$readline_ldflags -lcurses"
1041 if test "$have_readline" = "no"; then # try with -ltermcap
1043 AC_MSG_NOTICE([trying again with -ltermcap])
1044 unset ac_cv_search_rl_free_keymap 2> /dev/null
1045 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1047 readline_ldflags="$readline_ldflags -ltermcap"
1052 if test "$have_readline" = "yes"; then
1053 AC_SUBST(readline_cppflags)
1054 AC_SUBST(readline_ldflags)
1055 client_errlist_objs="$client_errlist_objs interactive"
1056 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
1057 play_errlist_objs="$play_errlist_objs interactive"
1058 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
1060 AC_MSG_WARN([libreadline not found or unusable])
1062 CPPFLAGS="$OLD_CPPFLAGS"
1063 LDFLAGS="$OLD_LDFLAGS"
1065 ############################################################# libsamplerate
1066 OLD_CPPFLAGS="$CPPFLAGS"
1067 OLD_LDFLAGS="$LDFLAGS"
1070 have_samplerate="yes"
1071 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
1072 [look for samplerate headers also in dir])])
1073 if test -n "$with_samplerate_headers"; then
1074 samplerate_cppflags="-I$with_samplerate_headers"
1075 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
1077 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
1078 [look for samplerate libs also in dir])])
1079 if test -n "$with_samplerate_libs"; then
1080 samplerate_libs="-L$with_samplerate_libs"
1081 LDFLAGS="$LDFLAGS $samplerate_libs"
1084 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
1085 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
1087 if test "$have_samplerate" = "yes"; then
1088 AC_SUBST(samplerate_cppflags)
1089 samplerate_ldflags="$samplerate_libs -lsamplerate"
1090 AC_SUBST(samplerate_ldflags)
1092 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1093 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
1094 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
1095 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
1096 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1097 play_cmdline_objs="$play_cmdline_objs resample_filter"
1098 filters="$filters resample"
1100 AC_MSG_WARN([no resample support in para_audiod/para_filter])
1102 CPPFLAGS="$OLD_CPPFLAGS"
1103 LDFLAGS="$OLD_LDFLAGS"
1105 ######################################################################### server
1106 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
1107 -a "$have_osl" = "yes" ; then
1110 executables="$executables server"
1111 server_cmdline_objs="server"
1112 server_errlist_objs="$server_errlist_objs
1154 ############################################################# client
1155 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1157 executables="$executables client"
1158 client_cmdline_objs="client"
1159 client_errlist_objs="$client_errlist_objs
1178 ############################################################# audiod
1179 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1181 executables="$executables audiod"
1182 audiod_cmdline_objs="$audiod_cmdline_objs
1193 audiod_errlist_objs="$audiod_errlist_objs
1230 audiod_ldflags="$audiod_ldflags -lm"
1231 audiod_audio_formats="$audiod_audio_formats wma"
1235 ########################################################################### fade
1236 if test -n "$mixers"; then
1238 executables="$executables fade"
1239 fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
1240 fade_cmdline_objs="fade"
1241 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
1242 AC_SUBST(fade_objs, add_dot_o($fade_objs))
1243 AC_SUBST(fade_ldflags, $fade_ldflags)
1244 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
1245 objlist_to_errlist($fade_errlist_objs),
1246 errors used by para_fade)
1248 for i in $mixers; do
1249 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
1252 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
1253 enum of supported mixers)
1254 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
1255 use this mixer if none was specified)
1256 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
1257 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
1259 for i in $mixers; do
1260 printf 'extern void '$i'_mix_init(struct mixer *); '
1263 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
1264 init functions of the supported mixers)
1265 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
1266 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
1267 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
1270 AC_MSG_WARN([no mixer support])
1271 mixer_summary="para_fade: no"
1273 ########################################################################### gui
1274 if test "$have_curses" = "yes"; then
1276 executables="$executables gui"
1277 gui_cmdline_objs="gui"
1291 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1294 AC_MSG_WARN([no curses lib, cannot build para_gui])
1296 ############################################################# error2.h
1297 # these are always built
1300 $filter_errlist_objs
1301 $audioc_errlist_objs
1307 # optional executables
1308 if test "$build_server" = "yes"; then
1309 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1311 if test "$build_gui" = "yes"; then
1312 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1314 if test "$build_fade" = "yes"; then
1315 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1317 if test "$build_client" = "yes"; then
1318 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1320 if test "$build_audiod" = "yes"; then
1321 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1324 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1326 object_executable_matrix=
1327 for i in $executables; do
1328 eval objs=\$${i}_errlist_objs
1329 object_executable_matrix="$object_executable_matrix $i: $objs"
1331 # use echo to replace newlines by space
1332 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1334 for obj in $all_errlist_objs; do
1335 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1337 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1338 [enum {$SS NUM_SS}],
1339 [list of all objects that use the paraslash error facility]
1341 ################################################################## status items
1343 status_items="basename status num_played mtime bitrate frequency file_size
1344 status_flags format score techinfo afs_mode
1345 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1346 offset seconds_total stream_start current_time audiod_uptime image_id
1347 lyrics_id duration directory lyrics_name image_name path hash channels
1348 last_played num_chunks chunk_time amplification artist title year album
1352 for i in $status_items; do
1353 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1355 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1356 [enum of all status items])
1359 for i in $status_items; do
1360 result="$result \"$i\", "
1362 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1363 [char * array of all status items])
1365 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1366 [formats supported by para_server and para_afh])
1368 AC_SUBST(executables)
1370 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1371 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1372 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
1373 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
1374 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1375 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
1376 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1377 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1378 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1379 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1381 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1382 AC_SUBST(recv_ldflags, $recv_ldflags)
1383 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1384 errors used by para_recv)
1386 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1387 AC_SUBST(filter_ldflags, $filter_ldflags)
1388 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1389 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1391 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1392 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1393 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1394 errors used by para_audiod)
1396 AC_SUBST(server_objs, add_dot_o($server_objs))
1397 AC_SUBST(server_ldflags, $server_ldflags)
1398 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1399 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1401 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1402 AC_SUBST(afh_ldflags, $afh_ldflags)
1403 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1404 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1406 AC_SUBST(write_objs, add_dot_o($write_objs))
1407 AC_SUBST(write_ldflags, $write_ldflags)
1408 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1409 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1411 AC_SUBST(client_objs, add_dot_o($client_objs))
1412 AC_SUBST(client_ldflags, $client_ldflags)
1413 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1414 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1416 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1417 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1418 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1419 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1421 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1422 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1423 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1425 AC_SUBST(play_objs, add_dot_o($play_objs))
1426 AC_SUBST(play_ldflags, $play_ldflags)
1427 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1428 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1430 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1431 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1432 enum of supported filters)
1433 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1434 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1435 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1436 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1438 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1439 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1440 enum of supported writers)
1441 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1442 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1443 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1444 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1445 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1446 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1447 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1449 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1450 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1451 enum of audio formats supported by audiod)
1452 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1453 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1457 paraslash configuration:
1458 ~~~~~~~~~~~~~~~~~~~~~~~~
1459 unix socket credentials: $have_ucred
1460 readline (interactive CLIs): $have_readline
1461 audio formats handlers: $audio_format_handlers
1462 id3 version2 support: $have_libid3tag
1463 filters: $(echo $filters)
1467 para_server: $build_server
1468 para_gui: $build_gui
1469 para_fade: $build_fade
1470 para_client: $build_client
1471 para_audiod: $build_audiod