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_libs="$openssl_libs -lssl -lcrypto"
357 server_ldflags="$server_ldflags $openssl_libs"
358 client_ldflags="$client_ldflags $openssl_libs"
359 audiod_ldflags="$audiod_ldflags $openssl_libs"
361 server_errlist_objs="$server_errlist_objs crypt"
362 client_errlist_objs="$client_errlist_objs crypt"
363 audiod_errlist_objs="$audiod_errlist_objs crypt"
367 AC_MSG_WARN([openssl libraries not found])
369 CPPFLAGS="$OLD_CPPFLAGS"
370 LDFLAGS="$OLD_LDFLAGS"
375 ########################################################################### gcrypt
376 if test "$check_gcrypt" = "yes"; then
377 OLD_CPPFLAGS="$CPPFLAGS"
378 OLD_LDFLAGS="$LDFLAGS"
381 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
382 [look for gcrypt headers also in dir])])
383 if test -n "$with_gcrypt_headers"; then
384 gcrypt_cppflags="-I$with_gcrypt_headers"
385 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
387 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
388 [look for libgcrypt also in dir])])
389 if test -n "$with_gcrypt_libs"; then
390 gcrypt_libs="-L$with_gcrypt_libs"
391 LDFLAGS="$LDFLAGS $gcrypt_libs"
393 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
394 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
395 if test "$have_gcrypt" = "yes"; then
396 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
397 AC_SUBST(gcrypt_cppflags)
398 gcrypt_libs="$gcrypt_libs -lgcrypt"
399 server_ldflags="$server_ldflags $gcrypt_libs"
400 client_ldflags="$client_ldflags $gcrypt_libs"
401 audiod_ldflags="$audiod_ldflags $gcrypt_libs"
403 server_errlist_objs="$server_errlist_objs gcrypt"
404 client_errlist_objs="$client_errlist_objs gcrypt"
405 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
407 AC_MSG_WARN([gcrypt library not found])
409 CPPFLAGS="$OLD_CPPFLAGS"
410 LDFLAGS="$OLD_LDFLAGS"
415 ########################################################################### libsocket
416 AC_CHECK_LIB([c], [socket],
418 [socket_lib="-lsocket"]
420 server_ldflags="$server_ldflags $socket_lib"
421 client_ldflags="$client_ldflags $socket_lib"
422 audioc_ldflags="$audioc_ldflags $socket_lib"
423 audiod_ldflags="$audiod_ldflags $socket_lib"
424 recv_ldflags="$recv_ldflags $socket_lib"
425 AC_SEARCH_LIBS([connect],[socket],[],[
426 AC_MSG_ERROR([Fatal: Did not find connect().])
428 ########################################################################### libnsl
429 AC_CHECK_LIB([c], [gethostbyname],
433 server_ldflags="$server_ldflags $nsl_lib"
434 client_ldflags="$client_ldflags $nsl_lib"
435 audioc_ldflags="$audioc_ldflags $nsl_lib"
436 recv_ldflags="$recv_ldflags $nsl_lib"
437 AC_SEARCH_LIBS([inet_ntoa],[nsl],[],[
438 AC_MSG_ERROR([Fatal: Did not find inet_ntoa().])
440 ########################################################################### ucred
441 AC_MSG_CHECKING(for struct ucred)
442 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
444 #include <sys/types.h>
445 #include <sys/socket.h>
447 struct ucred sucred; sucred.pid=0;
448 ]])],[have_ucred=yes],[have_ucred=no])
449 AC_MSG_RESULT($have_ucred)
450 if test ${have_ucred} = yes; then
451 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
453 ########################################################################### gengetopt
454 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
456 [gengetopt_args_info_description],
457 [ggo_descriptions_declared=yes],
458 [ggo_descriptions_declared=no],
459 [#include "conftest-ggo.h"]
461 AC_SUBST(ggo_descriptions_declared)
462 ########################################################################### curses
464 OLD_CPPFLAGS="$CPPFLAGS"
465 OLD_LDFLAGS="$LDFLAGS"
467 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
468 [look for curses.h also in dir])])
469 if test -n "$with_curses_headers"; then
470 curses_cppflags="-I$with_curses_headers"
471 CPPFLAGS="$CPPFLAGS $curses_cppflags"
473 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
474 [look for libcurses also in dir])])
475 if test -n "$with_curses_libs"; then
476 curses_libs="-L$with_curses_libs"
477 LDFLAGS="$LDFLAGS $curses_libs"
479 AC_CHECK_HEADER(curses.h, [], [
482 curses_ldflags="$curses_libs"
483 AC_CHECK_LIB([ncursesw], [initscr],
484 [curses_ldflags="$curses_libs -lncursesw"], [
485 AC_CHECK_LIB([curses], [initscr],
486 [curses_ldflags="$curses_libs -lcurses"],
491 AC_SUBST(curses_cppflags)
492 AC_SUBST(curses_ldflags)
493 CPPFLAGS="$OLD_CPPFLAGS"
494 LDFLAGS="$OLD_LDFLAGS"
496 ########################################################################### ip_mreqn
497 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
498 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
504 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
505 AC_MSG_RESULT($have_ip_mreqn)
506 if test ${have_ip_mreqn} = yes; then
507 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
509 ########################################################################### osx
511 AC_MSG_CHECKING(for CoreAudio (MacOs))
512 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
513 #include <CoreAudio/CoreAudio.h>
516 ]])],[have_core_audio=yes],[have_core_audio=no])
517 AC_MSG_RESULT($have_core_audio)
518 if test ${have_core_audio} = yes; then
519 f1="-framework CoreAudio"
520 f2="-framework AudioToolbox"
521 f3="-framework AudioUnit"
522 f4="-framework CoreServices"
525 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
526 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
527 audiod_ldflags="$audiod_ldflags $f"
529 play_errlist_objs="$play_errlist_objs osx_write ipc"
530 play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
531 play_ldflags="$play_ldflags $f"
533 write_errlist_objs="$write_errlist_objs osx_write ipc"
534 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
535 write_ldflags="$write_ldflags $f"
536 writers="$writers osx"
537 default_writer="OSX_WRITE"
538 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
540 ####################################################### ogg/vorbis/speex/opus
542 OLD_CPPFLAGS="$CPPFLAGS"
543 OLD_LDFLAGS="$LDFLAGS"
545 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
546 [look for ogg headers also in dir])])
547 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
548 [look for ogg libs also in dir])])
549 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
550 [look for vorbis headers also in dir])])
551 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
552 [look for vorbis libs also in dir])])
553 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
554 [look for speex headers also in dir])])
555 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
556 [look for speex libs also in dir])])
557 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
558 [look for opus headers also in dir])])
559 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
560 [look for opus libs also in dir])])
562 if test -n "$with_ogg_headers"; then
563 ogg_cppflags="-I$with_ogg_headers"
564 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
566 if test -n "$with_ogg_libs"; then
567 ogg_libs="-L$with_ogg_libs"
568 LDFLAGS="$LDFLAGS $ogg_libs"
570 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
571 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
576 if test "$have_ogg" = "yes"; then
578 if test -n "$with_vorbis_headers"; then
579 vorbis_cppflags="-I$with_vorbis_headers"
580 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
582 if test -n "$with_vorbis_libs"; then
583 vorbis_libs="-L$with_vorbis_libs"
584 LDFLAGS="$LDFLAGS $vorbis_libs"
586 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
587 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
590 if test -n "$with_speex_headers"; then
591 speex_cppflags="-I$with_speex_headers"
592 CPPFLAGS="$CPPFLAGS $speex_cppflags"
594 if test -n "$with_speex_libs"; then
595 speex_libs="-L$with_speex_libs"
596 LDFLAGS="$LDFLAGS $speex_libs"
598 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
599 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
602 if test -n "$with_opus_headers"; then
603 opus_cppflags="-I$with_opus_headers"
604 CPPFLAGS="$CPPFLAGS $opus_cppflags"
606 if test -n "$with_opus_libs"; then
607 opus_libs="-L$with_opus_libs"
608 LDFLAGS="$LDFLAGS $opus_libs"
610 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
611 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
613 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
619 msg="support in para_server/para_filter/para_afh"
620 if test "$have_vorbis" = "yes" || \
621 test "$have_speex" = "yes" || \
622 test "$have_opus" = "yes"; then
623 AC_SUBST(ogg_cppflags)
624 ogg_ldflags="$ogg_libs -logg"
625 if test "$OSTYPE" = "Darwin"; then
626 ogg_ldflags="-Wl,-bind_at_load $ogg_ldflags"
628 AC_SUBST(ogg_ldflags)
629 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
630 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
631 server_errlist_objs="$server_errlist_objs ogg_afh_common"
632 play_errlist_objs="$play_errlist_objs ogg_afh_common"
634 if test "$have_vorbis" = "yes"; then
635 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
636 filters="$filters oggdec"
637 vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile"
638 AC_SUBST(vorbis_ldflags)
640 server_errlist_objs="$server_errlist_objs ogg_afh"
641 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
642 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
643 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
644 afh_errlist_objs="$afh_errlist_objs ogg_afh"
645 recv_errlist_objs="$recv_errlist_objs ogg_afh"
647 audiod_audio_formats="$audiod_audio_formats ogg"
648 audio_format_handlers="$audio_format_handlers ogg"
650 if test "$have_speex" = "yes"; then
651 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
652 AC_SUBST(speex_cppflags)
653 speex_ldflags="$speex_libs -lspeex"
654 AC_SUBST(speex_ldflags)
656 filters="$filters spxdec"
658 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
659 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
660 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
661 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
662 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
663 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
665 audiod_audio_formats="$audiod_audio_formats spx"
666 audio_format_handlers="$audio_format_handlers spx"
668 AC_MSG_WARN([no ogg/speex $msg])
670 if test "$have_opus" = "yes"; then
671 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
672 AC_SUBST(opus_cppflags)
673 opus_ldflags="$opus_libs -lopus"
674 AC_SUBST(opus_ldflags)
676 filters="$filters opusdec"
678 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
679 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
680 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
681 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
682 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
683 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
685 audiod_audio_formats="$audiod_audio_formats opus"
686 audio_format_handlers="$audio_format_handlers opus"
688 AC_MSG_WARN([no ogg/opus $msg])
690 CPPFLAGS="$OLD_CPPFLAGS"
691 LDFLAGS="$OLD_LDFLAGS"
693 ########################################################################### faad
695 OLD_CPPFLAGS="$CPPFLAGS"
696 OLD_LDFLAGS="$LDFLAGS"
698 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
699 [look for neaacdec.h also in dir])])
700 if test -n "$with_faad_headers"; then
701 faad_cppflags="-I$with_faad_headers"
702 CPPFLAGS="$CPPFLAGS $faad_cppflags"
704 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
705 [look for libfaad also in dir])])
706 if test -n "$with_faad_libs"; then
707 faad_libs="-L$with_faad_libs"
708 LDFLAGS="$LDFLAGS $faad_libs"
710 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
711 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
712 if test "$have_faad" = "yes"; then
713 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
714 AC_SUBST(faad_cppflags)
715 faad_ldflags="$faad_libs -lfaad"
716 AC_SUBST(faad_ldflags)
718 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
719 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
720 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
721 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
722 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
723 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
725 audiod_audio_formats="$audiod_audio_formats aac"
726 audio_format_handlers="$audio_format_handlers aac"
727 filters="$filters aacdec"
729 AC_MSG_WARN([no aac support in para_audiod/para_filter])
731 CPPFLAGS="$OLD_CPPFLAGS"
732 LDFLAGS="$OLD_LDFLAGS"
734 ########################################################################### mad
736 OLD_CPPFLAGS="$CPPFLAGS"
737 OLD_LDFLAGS="$LDFLAGS"
740 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
741 [look for mad.h also in dir])])
742 if test -n "$with_mad_headers"; then
743 mad_cppflags="-I$with_mad_headers"
744 CPPFLAGS="$CPPFLAGS $mad_cppflags"
746 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
747 [look for libmad also in dir])])
748 if test -n "$with_mad_libs"; then
749 mad_libs="-L$with_mad_libs"
750 LDFLAGS="$LDFLAGS $mad_libs"
752 AC_CHECK_HEADERS([mad.h], [], [
755 AC_CHECK_LIB([mad], [mad_stream_init], [], [
758 if test "$have_mad" = "yes"; then
759 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
760 AC_SUBST(mad_cppflags)
761 mad_ldflags="$mad_libs -lmad"
762 AC_SUBST(mad_ldflags)
763 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
764 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
765 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
766 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
767 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
768 play_errlist_objs="$play_errlist_objs mp3dec_filter"
769 audiod_audio_formats="$audiod_audio_formats mp3"
770 filters="$filters mp3dec"
772 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
774 CPPFLAGS="$OLD_CPPFLAGS"
775 LDFLAGS="$OLD_LDFLAGS"
777 ###################################################################### libid3tag
778 OLD_CPPFLAGS="$CPPFLAGS"
779 OLD_LDFLAGS="$LDFLAGS"
783 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
784 [look for id3tag header files also in dir])])
785 if test -n "$with_id3tag_headers"; then
786 id3tag_cppflags="-I$with_id3tag_headers"
787 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
789 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
790 [look for id3tag libs also in dir])])
791 if test -n "$with_id3tag_libs"; then
792 id3tag_libs="-L$with_id3tag_libs"
793 LDFLAGS="$LDFLAGS $id3tag_libs"
796 AC_MSG_CHECKING(for libid3tag)
797 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
800 struct id3_tag t = {.flags = 0};
801 ]])],[],[have_libid3tag=no])
802 AC_MSG_RESULT($have_libid3tag)
804 if test ${have_libid3tag} = yes; then
805 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
806 AC_SUBST(id3tag_cppflags)
807 AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
809 CPPFLAGS="$OLD_CPPFLAGS"
810 LDFLAGS="$OLD_LDFLAGS"
812 ########################################################################### flac
813 OLD_CPPFLAGS="$CPPFLAGS"
814 OLD_LDFLAGS="$LDFLAGS"
818 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
819 [look for flac headers also in dir])])
820 if test -n "$with_flac_headers"; then
821 flac_cppflags="-I$with_flac_headers"
822 CPPFLAGS="$CPPFLAGS $flac_cppflags"
824 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
825 [look for flac libs also in dir])])
826 if test -n "$with_flac_libs"; then
827 flac_libs="-L$with_flac_libs"
828 LDFLAGS="$LDFLAGS $flac_libs"
830 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
831 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
832 if test "$have_flac" = "yes"; then
833 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
834 AC_SUBST(flac_cppflags)
835 flac_ldflags="$flac_libs -lFLAC"
836 AC_SUBST(flac_ldflags)
838 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
839 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
840 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
841 afh_errlist_objs="$afh_errlist_objs flac_afh"
842 server_errlist_objs="$server_errlist_objs flac_afh"
843 recv_errlist_objs="$recv_errlist_objs flac_afh"
844 filters="$filters flacdec"
845 audio_format_handlers="$audio_format_handlers flac"
846 audiod_audio_formats="$audiod_audio_formats flac"
848 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
850 CPPFLAGS="$OLD_CPPFLAGS"
851 LDFLAGS="$OLD_LDFLAGS"
853 ########################################################################### oss
854 OLD_CPPFLAGS="$CPPFLAGS"
855 OLD_LDFLAGS="$LDFLAGS"
859 msg="=> will not build oss writer"
861 AC_CHECK_HEADER(sys/soundcard.h, [
862 audiod_errlist_objs="$audiod_errlist_objs oss_write"
863 play_errlist_objs="$play_errlist_objs oss_write"
864 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
865 play_cmdline_objs="$play_cmdline_objs oss_write"
867 write_errlist_objs="$write_errlist_objs oss_write"
868 write_cmdline_objs="$write_cmdline_objs oss_write"
869 fade_errlist_objs="$fade_errlist_objs oss_mix"
871 writers="$writers oss"
872 default_writer="OSS_WRITE"
873 mixers="${mixers}oss "
874 default_mixer="OSS_MIX"
876 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
877 oss_ldflags="-lossaudio"
878 AC_SUBST(oss_ldflags)
884 AC_MSG_WARN([no sys/soundcard.h $msg])
887 CPPFLAGS="$OLD_CPPFLAGS"
888 LDFLAGS="$OLD_LDFLAGS"
891 ########################################################################### alsa
892 OLD_CPPFLAGS="$CPPFLAGS"
893 OLD_LDFLAGS="$LDFLAGS"
896 msg="=> no alsa support for para_audiod/para_write"
897 if test "$OSTYPE" != "Linux"; then
902 if test "$have_alsa" = "yes"; then
903 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
905 AC_MSG_WARN([no alsa/asoundlib $msg])
909 if test "$have_alsa" = "yes"; then
910 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
912 AC_MSG_WARN([no libasound $msg])
916 if test "$have_alsa" = "yes"; then
917 alsa_ldflags="-lasound"
918 AC_SUBST(alsa_ldflags)
919 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
920 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
921 play_errlist_objs="$play_errlist_objs alsa_write"
922 play_cmdline_objs="$play_cmdline_objs alsa_write"
924 write_errlist_objs="$write_errlist_objs alsa_write"
925 write_cmdline_objs="$write_cmdline_objs alsa_write"
926 fade_errlist_objs="$fade_errlist_objs alsa_mix"
928 writers="$writers alsa"
929 default_writer="ALSA_WRITE"
930 mixers="${mixers}alsa "
931 default_mixer="ALSA_MIX"
934 CPPFLAGS="$OLD_CPPFLAGS"
935 LDFLAGS="$OLD_LDFLAGS"
937 ########################################################################### libao
938 OLD_CPPFLAGS="$CPPFLAGS"
939 OLD_LDFLAGS="$LDFLAGS"
943 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
944 [look for ao/ao.h also in dir])])
945 if test -n "$with_ao_headers"; then
946 ao_cppflags="-I$with_ao_headers"
947 CPPFLAGS="$CPPFLAGS $ao_cppflags"
949 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
950 [look for libao also in dir])])
951 if test -n "$with_ao_libs"; then
952 ao_libs="-L$with_ao_libs"
953 LDFLAGS="$LDFLAGS $ao_libs"
955 msg="no libao support for para_audiod/para_write"
956 AC_CHECK_HEADERS([ao/ao.h], [
959 AC_MSG_WARN([ao.h not found, $msg])
961 if test "$have_ao" = "yes"; then
962 AC_CHECK_LIB([ao], [ao_initialize], [], [
964 AC_MSG_WARN([ao lib not found or not working, $msg])
967 if test "$have_ao" = "yes"; then
968 AC_CHECK_HEADERS([pthread.h], [
971 AC_MSG_WARN([pthread.h not found, $msg])
974 if test "$have_ao" = "yes"; then
975 AC_CHECK_LIB([pthread], [pthread_create], [], [
977 AC_MSG_WARN([pthread lib not found or not working, $msg])
980 if test "$have_ao" = "yes"; then
981 AC_SUBST(ao_cppflags)
982 ao_ldflags="$ao_libs -lao -lpthread"
985 audiod_errlist_objs="$audiod_errlist_objs ao_write"
986 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
988 play_errlist_objs="$play_errlist_objs ao_write"
989 play_cmdline_objs="$play_cmdline_objs ao_write"
991 write_errlist_objs="$write_errlist_objs ao_write"
992 write_cmdline_objs="$write_cmdline_objs ao_write"
993 writers="$writers ao"
996 CPPFLAGS="$OLD_CPPFLAGS"
997 LDFLAGS="$OLD_LDFLAGS"
999 ############################################################# readline
1000 OLD_CPPFLAGS="$CPPFLAGS"
1001 OLD_LDFLAGS="$LDFLAGS"
1005 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
1006 [look for libreadline header files also in dir])])
1007 if test -n "$with_readline_headers"; then
1008 readline_cppflags="-I$with_readline_headers"
1009 CPPFLAGS="$CPPFLAGS $readline_cppflags"
1012 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
1013 [look for readline library also in dir])])
1014 if test -n "$with_readline_libs"; then
1015 readline_libs="-L$with_readline_libs"
1016 LDFLAGS="$LDFLAGS $readline_libs"
1018 msg="no interactive cli support"
1019 AC_CHECK_HEADERS([readline/readline.h], [
1022 AC_MSG_WARN([readline/readline.h not found, $msg])
1025 if test "$have_curses" != "yes"; then
1027 AC_MSG_WARN([interactive cli support depends on curses,])
1028 AC_MSG_WARN([but no curses lib was detected, $msg])
1031 if test "$have_readline" = "yes"; then
1032 readline_ldflags="$readline_libs -lreadline"
1033 AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
1034 if test "$have_readline" = "no"; then # try with -lcurses
1036 AC_MSG_NOTICE([trying again with -lcurses])
1037 unset ac_cv_search_rl_free_keymap 2> /dev/null
1038 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1040 readline_ldflags="$readline_ldflags -lcurses"
1043 if test "$have_readline" = "no"; then # try with -ltermcap
1045 AC_MSG_NOTICE([trying again with -ltermcap])
1046 unset ac_cv_search_rl_free_keymap 2> /dev/null
1047 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1049 readline_ldflags="$readline_ldflags -ltermcap"
1054 if test "$have_readline" = "yes"; then
1055 AC_SUBST(readline_cppflags)
1056 AC_SUBST(readline_ldflags)
1057 client_errlist_objs="$client_errlist_objs interactive"
1058 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
1059 play_errlist_objs="$play_errlist_objs interactive"
1060 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
1062 AC_MSG_WARN([libreadline not found or unusable])
1064 CPPFLAGS="$OLD_CPPFLAGS"
1065 LDFLAGS="$OLD_LDFLAGS"
1067 ############################################################# libsamplerate
1068 OLD_CPPFLAGS="$CPPFLAGS"
1069 OLD_LDFLAGS="$LDFLAGS"
1072 have_samplerate="yes"
1073 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
1074 [look for samplerate headers also in dir])])
1075 if test -n "$with_samplerate_headers"; then
1076 samplerate_cppflags="-I$with_samplerate_headers"
1077 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
1079 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
1080 [look for samplerate libs also in dir])])
1081 if test -n "$with_samplerate_libs"; then
1082 samplerate_libs="-L$with_samplerate_libs"
1083 LDFLAGS="$LDFLAGS $samplerate_libs"
1086 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
1087 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
1089 if test "$have_samplerate" = "yes"; then
1090 AC_SUBST(samplerate_cppflags)
1091 samplerate_ldflags="$samplerate_libs -lsamplerate"
1092 AC_SUBST(samplerate_ldflags)
1094 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1095 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
1096 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
1097 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
1098 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1099 play_cmdline_objs="$play_cmdline_objs resample_filter"
1100 filters="$filters resample"
1102 AC_MSG_WARN([no resample support in para_audiod/para_filter])
1104 CPPFLAGS="$OLD_CPPFLAGS"
1105 LDFLAGS="$OLD_LDFLAGS"
1107 ######################################################################### server
1108 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
1109 -a "$have_osl" = "yes" ; then
1112 executables="$executables server"
1113 server_cmdline_objs="server"
1114 server_errlist_objs="$server_errlist_objs
1156 ############################################################# client
1157 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1159 executables="$executables client"
1160 client_cmdline_objs="client"
1161 client_errlist_objs="$client_errlist_objs
1180 ############################################################# audiod
1181 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1183 executables="$executables audiod"
1184 audiod_cmdline_objs="$audiod_cmdline_objs
1195 audiod_errlist_objs="$audiod_errlist_objs
1232 audiod_ldflags="$audiod_ldflags -lm"
1233 audiod_audio_formats="$audiod_audio_formats wma"
1237 ########################################################################### fade
1238 if test -n "$mixers"; then
1240 executables="$executables fade"
1241 fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
1242 fade_cmdline_objs="fade"
1243 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
1244 AC_SUBST(fade_objs, add_dot_o($fade_objs))
1245 AC_SUBST(fade_ldflags, $fade_ldflags)
1246 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
1247 objlist_to_errlist($fade_errlist_objs),
1248 errors used by para_fade)
1250 for i in $mixers; do
1251 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
1254 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
1255 enum of supported mixers)
1256 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
1257 use this mixer if none was specified)
1258 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
1259 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
1261 for i in $mixers; do
1262 printf 'extern void '$i'_mix_init(struct mixer *); '
1265 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
1266 init functions of the supported mixers)
1267 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
1268 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
1269 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
1272 AC_MSG_WARN([no mixer support])
1273 mixer_summary="para_fade: no"
1275 ########################################################################### gui
1276 if test "$have_curses" = "yes"; then
1278 executables="$executables gui"
1279 gui_cmdline_objs="gui"
1293 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1296 AC_MSG_WARN([no curses lib, cannot build para_gui])
1298 ############################################################# error2.h
1299 # these are always built
1302 $filter_errlist_objs
1303 $audioc_errlist_objs
1309 # optional executables
1310 if test "$build_server" = "yes"; then
1311 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1313 if test "$build_gui" = "yes"; then
1314 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1316 if test "$build_fade" = "yes"; then
1317 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1319 if test "$build_client" = "yes"; then
1320 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1322 if test "$build_audiod" = "yes"; then
1323 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1326 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1328 object_executable_matrix=
1329 for i in $executables; do
1330 eval objs=\$${i}_errlist_objs
1331 object_executable_matrix="$object_executable_matrix $i: $objs"
1333 # use echo to replace newlines by space
1334 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1336 for obj in $all_errlist_objs; do
1337 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1339 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1340 [enum {$SS NUM_SS}],
1341 [list of all objects that use the paraslash error facility]
1343 ################################################################## status items
1345 status_items="basename status num_played mtime bitrate frequency file_size
1346 status_flags format score techinfo afs_mode
1347 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1348 offset seconds_total stream_start current_time audiod_uptime image_id
1349 lyrics_id duration directory lyrics_name image_name path hash channels
1350 last_played num_chunks chunk_time amplification artist title year album
1354 for i in $status_items; do
1355 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1357 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1358 [enum of all status items])
1361 for i in $status_items; do
1362 result="$result \"$i\", "
1364 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1365 [char * array of all status items])
1367 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1368 [formats supported by para_server and para_afh])
1370 AC_SUBST(executables)
1372 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1373 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1374 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
1375 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
1376 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1377 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
1378 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1379 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1380 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1381 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1383 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1384 AC_SUBST(recv_ldflags, $recv_ldflags)
1385 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1386 errors used by para_recv)
1388 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1389 AC_SUBST(filter_ldflags, $filter_ldflags)
1390 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1391 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1393 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1394 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1395 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1396 errors used by para_audiod)
1398 AC_SUBST(server_objs, add_dot_o($server_objs))
1399 AC_SUBST(server_ldflags, $server_ldflags)
1400 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1401 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1403 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1404 AC_SUBST(afh_ldflags, $afh_ldflags)
1405 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1406 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1408 AC_SUBST(write_objs, add_dot_o($write_objs))
1409 AC_SUBST(write_ldflags, $write_ldflags)
1410 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1411 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1413 AC_SUBST(client_objs, add_dot_o($client_objs))
1414 AC_SUBST(client_ldflags, $client_ldflags)
1415 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1416 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1418 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1419 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1420 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1421 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1423 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1424 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1425 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1427 AC_SUBST(play_objs, add_dot_o($play_objs))
1428 AC_SUBST(play_ldflags, $play_ldflags)
1429 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1430 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1432 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1433 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1434 enum of supported filters)
1435 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1436 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1437 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1438 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1440 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1441 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1442 enum of supported writers)
1443 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1444 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1445 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1446 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1447 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1448 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1449 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1451 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1452 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1453 enum of audio formats supported by audiod)
1454 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1455 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1459 paraslash configuration:
1460 ~~~~~~~~~~~~~~~~~~~~~~~~
1461 unix socket credentials: $have_ucred
1462 readline (interactive CLIs): $have_readline
1463 audio formats handlers: $audio_format_handlers
1464 id3 version2 support: $have_libid3tag
1465 filters: $(echo $filters)
1469 para_server: $build_server
1470 para_gui: $build_gui
1471 para_fade: $build_fade
1472 para_client: $build_client
1473 para_audiod: $build_audiod