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([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) }])
12 AC_PATH_PROG(UNAMEPATH, uname, no)
13 if test "$UNAMEPATH" = "no"; then
14 AC_MSG_ERROR(unable to determine system type)
16 AC_MSG_CHECKING(os type)
17 OSTYPE="`$UNAMEPATH -s`"
18 AC_MSG_RESULT("$OSTYPE")
20 if test "$OSTYPE" = "SunOS"; then
21 # needed on SunOS for socket magic
22 arch_cppflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
23 AC_SUBST(arch_cppflags)
28 AC_PATH_PROG([gengetopt], [gengetopt])
29 test -z "$gengetopt" && AC_MSG_ERROR(
30 [gengetopt is required to build this package])
32 AC_PATH_PROG([help2man], [help2man])
33 test -z "$help2man" && AC_MSG_ERROR(
34 [help2man is required to build this package])
39 AC_SUBST(install_sh, [$INSTALL])
46 AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h limits.h netdb.h netinet/in.h \
47 stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h sys/un.h \
48 sys/ipc.h unistd.h utime.h stddef.h],
49 [], [AC_MSG_ERROR([$ac_header not found])])
51 # Checks for typedefs, structures, and compiler characteristics.
71 # Checks for library functions.
73 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 AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
95 executables="recv filter audioc write client afh audiod play"
97 recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv afh_recv)"
100 http_recv recv_common recv time string net dccp_recv fd
101 sched stdout ggo udp_recv buffer_tree afh_recv afh_common
102 wma_afh wma_common mp3_afh version
107 filter_cmdline_objs="add_cmdline(filter compress_filter amp_filter prebuffer_filter)"
108 filter_errlist_objs="filter_common wav_filter compress_filter filter string
109 stdin stdout sched fd amp_filter ggo fecdec_filter fec version
110 prebuffer_filter time bitstream imdct wma_common wmadec_filter buffer_tree"
112 filters=" compress wav amp fecdec wmadec prebuffer"
114 audioc_cmdline_objs="add_cmdline(audioc)"
115 audioc_errlist_objs="
125 audiod_cmdline_objs="add_cmdline(audiod compress_filter http_recv dccp_recv file_write client amp_filter udp_recv prebuffer_filter)"
126 audiod_errlist_objs="audiod signal string daemon stat net crypt_common sideband
127 time grab_client filter_common wav_filter compress_filter amp_filter http_recv dccp_recv
128 recv_common fd sched write_common file_write audiod_command fecdec_filter
129 client_common ggo udp_recv color fec prebuffer_filter version
130 bitstream imdct wma_common wmadec_filter buffer_tree"
132 audiod_audio_formats="wma"
134 afh_cmdline_objs="add_cmdline(afh)"
135 afh_errlist_objs="afh string fd mp3_afh afh_common time wma_afh wma_common
139 write_cmdline_objs="add_cmdline(write file_write)"
140 write_errlist_objs="write write_common file_write time fd string sched stdin
141 buffer_tree ggo check_wav version"
144 default_writer="FILE_WRITE"
146 client_cmdline_objs="add_cmdline(client)"
147 client_errlist_objs="
165 gui_cmdline_objs="add_cmdline(gui)"
179 gui_objs="$gui_cmdline_objs $gui_errlist_objs"
180 play_errlist_objs="play fd sched ggo buffer_tree time string net
182 wma_afh wma_common mp3_afh
183 recv_common udp_recv http_recv dccp_recv
184 filter_common fec bitstream imdct
185 wav_filter compress_filter amp_filter prebuffer_filter fecdec_filter
187 write_common file_write
190 play_cmdline_objs="add_cmdline(http_recv dccp_recv udp_recv afh_recv compress_filter amp_filter prebuffer_filter file_write play)"
192 ################################################################## clock_gettime
194 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
195 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
197 if test -n "$clock_gettime_lib"; then
198 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
199 define to 1 if clock_gettime() is supported])
201 if test "$clock_gettime_lib" = "rt"; then
202 AC_SUBST(clock_gettime_ldflags, -lrt)
204 ########################################################################### osl
206 OLD_CPPFLAGS="$CPPFLAGS"
207 OLD_LDFLAGS="$LDFLAGS"
209 AC_ARG_WITH(osl_headers, [AS_HELP_STRING(--with-osl-headers=dir,
210 [look for osl.h also in dir])])
211 if test -n "$with_osl_headers"; then
212 osl_cppflags="-I$with_osl_headers"
213 CPPFLAGS="$CPPFLAGS $osl_cppflags"
215 AC_ARG_WITH(osl_libs, [AS_HELP_STRING(--with-osl-libs=dir,
216 [look for libosl also in dir])])
217 if test -n "$with_osl_libs"; then
218 osl_libs="-L$with_osl_libs"
219 LDFLAGS="$LDFLAGS $osl_libs"
222 AC_CHECK_HEADER(osl.h, [], have_osl=no)
223 AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no)
224 if test "$have_osl" = "no"; then
226 AC_MSG_WARN([libosl not found, can not build para_server.
228 http://systemlinux.org/~maan/osl
230 git clone git://git.tuebingen.mpg.de/osl
234 executables="$executables server"
235 server_cmdline_objs="add_cmdline(server)"
236 server_errlist_objs="
274 audio_format_handlers="mp3 wma"
275 AC_SUBST(osl_cppflags)
276 server_ldflags="$server_ldflags $osl_libs -losl"
278 CPPFLAGS="$OLD_CPPFLAGS"
279 LDFLAGS="$OLD_LDFLAGS"
281 ########################################################################### crypto
282 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
283 Force using crypto library "lib". This package requires either
284 openssl or libgcrypt being installed. Possible values for "lib"
285 are thus "openssl" and "gcrypt". If this option is not given,
286 openssl is tried first. If openssl was not found, gcrypt is
289 case "$enable_cryptolib" in
290 "openssl") check_openssl="yes"; check_gcrypt="no";;
291 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
292 "") check_openssl="yes"; check_gcrypt="yes";;
293 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
295 ###################################################################### openssl
296 if test "$check_openssl" = "yes"; then
297 OLD_CPPFLAGS="$CPPFLAGS"
298 OLD_LDFLAGS="$LDFLAGS"
301 AC_ARG_WITH(openssl_headers, [AS_HELP_STRING(--with-openssl-headers=dir,
302 [look for openssl headers also in dir])])
303 if test -n "$with_openssl_headers"; then
304 openssl_cppflags="-I$with_openssl_headers"
305 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
307 AC_ARG_WITH(openssl_libs, [AS_HELP_STRING(--with-openssl-libs=dir,
308 [look for openssl libraries also in dir])])
309 if test -n "$with_openssl_libs"; then
310 openssl_libs="-L$with_openssl_libs"
311 LDFLAGS="$LDFLAGS $openssl_libs"
313 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
314 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
315 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
316 # try harder: openssl is sometimes installed in /usr/local/ssl
317 openssl_cppflags="-I/usr/local/ssl/include"
318 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
319 openssl_libs="-L/usr/local/ssl/lib"
320 LDFLAGS="$LDFLAGS $openssl_libs"
322 unset ac_cv_header_openssl_ssl_h 2> /dev/null
323 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
324 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
325 if test "$have_openssl" = "yes"; then
326 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
329 if test "$have_openssl" = "yes"; then
330 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
331 AC_SUBST(openssl_cppflags)
332 openssl_libs="$openssl_libs -lssl -lcrypto"
333 server_ldflags="$server_ldflags $openssl_libs"
334 client_ldflags="$client_ldflags $openssl_libs"
335 audiod_ldflags="$audiod_ldflags $openssl_libs"
337 server_errlist_objs="$server_errlist_objs crypt"
338 client_errlist_objs="$client_errlist_objs crypt"
339 audiod_errlist_objs="$audiod_errlist_objs crypt"
343 AC_MSG_WARN([openssl libraries not found])
345 CPPFLAGS="$OLD_CPPFLAGS"
346 LDFLAGS="$OLD_LDFLAGS"
351 ########################################################################### gcrypt
352 if test "$check_gcrypt" = "yes"; then
353 OLD_CPPFLAGS="$CPPFLAGS"
354 OLD_LDFLAGS="$LDFLAGS"
357 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
358 [look for gcrypt headers also in dir])])
359 if test -n "$with_gcrypt_headers"; then
360 gcrypt_cppflags="-I$with_gcrypt_headers"
361 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
363 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
364 [look for libgcrypt also in dir])])
365 if test -n "$with_gcrypt_libs"; then
366 gcrypt_libs="-L$with_gcrypt_libs"
367 LDFLAGS="$LDFLAGS $gcrypt_libs"
369 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
370 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
371 if test "$have_gcrypt" = "yes"; then
372 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
373 AC_SUBST(gcrypt_cppflags)
374 gcrypt_libs="$gcrypt_libs -lgcrypt"
375 server_ldflags="$server_ldflags $gcrypt_libs"
376 client_ldflags="$client_ldflags $gcrypt_libs"
377 audiod_ldflags="$audiod_ldflags $gcrypt_libs"
379 server_errlist_objs="$server_errlist_objs gcrypt"
380 client_errlist_objs="$client_errlist_objs gcrypt"
381 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
383 AC_MSG_WARN([gcrypt library not found])
385 CPPFLAGS="$OLD_CPPFLAGS"
386 LDFLAGS="$OLD_LDFLAGS"
391 ###########################################################################
392 if test "$have_openssl" = "no" -a "$have_gcrypt" = "no"; then
393 AC_MSG_ERROR([neither openssl nor gcrypt usable])
395 ########################################################################### libsocket
396 AC_CHECK_LIB([c], [socket],
398 [socket_lib="-lsocket"]
400 server_ldflags="$server_ldflags $socket_lib"
401 client_ldflags="$client_ldflags $socket_lib"
402 audioc_ldflags="$audioc_ldflags $socket_lib"
403 audiod_ldflags="$audiod_ldflags $socket_lib"
404 recv_ldflags="$recv_ldflags $socket_lib"
405 AC_SEARCH_LIBS([connect],[socket],[],[
406 AC_MSG_ERROR([Fatal: Did not find connect().])
408 ########################################################################### libnsl
409 AC_CHECK_LIB([c], [gethostbyname],
413 server_ldflags="$server_ldflags $nsl_lib"
414 client_ldflags="$client_ldflags $nsl_lib"
415 audioc_ldflags="$audioc_ldflags $nsl_lib"
416 recv_ldflags="$recv_ldflags $nsl_lib"
417 AC_SEARCH_LIBS([inet_ntoa],[nsl],[],[
418 AC_MSG_ERROR([Fatal: Did not find inet_ntoa().])
420 ########################################################################### ucred
421 AC_MSG_CHECKING(for struct ucred)
422 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
424 #include <sys/types.h>
425 #include <sys/socket.h>
427 struct ucred sucred; sucred.pid=0;
428 ]])],[have_ucred=yes],[have_ucred=no])
429 AC_MSG_RESULT($have_ucred)
430 if test ${have_ucred} = yes; then
431 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
433 ########################################################################### gengetopt
434 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
436 [gengetopt_args_info_description],
437 [ggo_descriptions_declared=yes],
438 [ggo_descriptions_declared=no],
439 [#include "conftest-ggo.h"]
441 AC_SUBST(ggo_descriptions_declared)
442 ########################################################################### curses
444 OLD_CPPFLAGS="$CPPFLAGS"
445 OLD_LDFLAGS="$LDFLAGS"
447 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
448 [look for curses.h also in dir])])
449 if test -n "$with_curses_headers"; then
450 curses_cppflags="-I$with_curses_headers"
451 CPPFLAGS="$CPPFLAGS $curses_cppflags"
453 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
454 [look for libcurses also in dir])])
455 if test -n "$with_curses_libs"; then
456 curses_libs="-L$with_curses_libs"
457 LDFLAGS="$LDFLAGS $curses_libs"
459 AC_CHECK_HEADER(curses.h, [], [
462 gui_ldflags="$curses_libs"
463 AC_CHECK_LIB([ncursesw], [initscr],
464 [gui_ldflags="$curses_libs -lncursesw"], [
465 AC_CHECK_LIB([curses], [initscr],
466 [gui_ldflags="$curses_libs -lcurses"],
471 if test "$have_curses" = "yes"; then
472 AC_SUBST(curses_cppflags)
474 executables="$executables gui"
477 AC_MSG_WARN([no curses lib, cannot build para_gui])
479 CPPFLAGS="$OLD_CPPFLAGS"
480 LDFLAGS="$OLD_LDFLAGS"
483 ########################################################################### ip_mreqn
484 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
485 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
491 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
492 AC_MSG_RESULT($have_ip_mreqn)
493 if test ${have_ip_mreqn} = yes; then
494 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
496 ########################################################################### osx
498 AC_MSG_CHECKING(for CoreAudio (MacOs))
499 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
500 #include <CoreAudio/CoreAudio.h>
503 ]])],[have_core_audio=yes],[have_core_audio=no])
504 AC_MSG_RESULT($have_core_audio)
505 if test ${have_core_audio} = yes; then
506 f1="-framework CoreAudio"
507 f2="-framework AudioToolbox"
508 f3="-framework AudioUnit"
509 f4="-framework CoreServices"
512 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
513 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
514 audiod_ldflags="$audiod_ldflags $f"
516 play_errlist_objs="$play_errlist_objs osx_write ipc"
517 play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
518 play_ldflags="$play_ldflags $f"
520 write_errlist_objs="$write_errlist_objs osx_write ipc"
521 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
522 write_ldflags="$write_ldflags $f"
523 writers="$writers osx"
524 default_writer="OSX_WRITE"
525 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
527 ####################################################### ogg/vorbis/speex/opus
529 OLD_CPPFLAGS="$CPPFLAGS"
530 OLD_LDFLAGS="$LDFLAGS"
532 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
533 [look for ogg headers also in dir])])
534 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
535 [look for ogg libs also in dir])])
536 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
537 [look for vorbis headers also in dir])])
538 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
539 [look for vorbis libs also in dir])])
540 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
541 [look for speex headers also in dir])])
542 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
543 [look for speex libs also in dir])])
544 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
545 [look for opus headers also in dir])])
546 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
547 [look for opus libs also in dir])])
549 if test -n "$with_ogg_headers"; then
550 ogg_cppflags="-I$with_ogg_headers"
551 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
553 if test -n "$with_ogg_libs"; then
554 ogg_libs="-L$with_ogg_libs"
555 LDFLAGS="$LDFLAGS $ogg_libs"
557 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
558 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
563 if test "$have_ogg" = "yes"; then
565 if test -n "$with_vorbis_headers"; then
566 vorbis_cppflags="-I$with_vorbis_headers"
567 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
569 if test -n "$with_vorbis_libs"; then
570 vorbis_libs="-L$with_vorbis_libs"
571 LDFLAGS="$LDFLAGS $vorbis_libs"
573 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
574 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
577 if test -n "$with_speex_headers"; then
578 speex_cppflags="-I$with_speex_headers"
579 CPPFLAGS="$CPPFLAGS $speex_cppflags"
581 if test -n "$with_speex_libs"; then
582 speex_libs="-L$with_speex_libs"
583 LDFLAGS="$LDFLAGS $speex_libs"
585 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
586 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
589 if test -n "$with_opus_headers"; then
590 opus_cppflags="-I$with_opus_headers"
591 CPPFLAGS="$CPPFLAGS $opus_cppflags"
593 if test -n "$with_opus_libs"; then
594 opus_libs="-L$with_opus_libs"
595 LDFLAGS="$LDFLAGS $opus_libs"
597 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
598 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
600 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
606 msg="support in para_server/para_filter/para_afh"
607 if test "$have_vorbis" = "yes" || \
608 test "$have_speex" = "yes" || \
609 test "$have_opus" = "yes"; then
610 AC_SUBST(ogg_cppflags)
611 ogg_libs="$ogg_libs -logg"
612 if test "$OSTYPE" = "Darwin"; then
613 ogg_libs="-Wl,-bind_at_load $ogg_libs"
615 server_ldflags="$server_ldflags $ogg_libs"
616 filter_ldflags="$filter_ldflags $ogg_libs"
617 audiod_ldflags="$audiod_ldflags $ogg_libs"
618 play_ldflags="$play_ldflags $ogg_libs"
619 afh_ldflags="$afh_ldflags $ogg_libs"
620 recv_ldflags="$recv_ldflags $ogg_libs"
621 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
622 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
623 server_errlist_objs="$server_errlist_objs ogg_afh_common"
624 play_errlist_objs="$play_errlist_objs ogg_afh_common"
626 if test "$have_vorbis" = "yes"; then
627 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
628 filters="$filters oggdec"
629 vorbis_libs="-lvorbis -lvorbisfile"
630 server_ldflags="$server_ldflags $vorbis_libs"
631 filter_ldflags="$filter_ldflags $vorbis_libs"
632 audiod_ldflags="$audiod_ldflags $vorbis_libs"
633 play_ldflags="$play_ldflags $vorbis_libs"
634 afh_ldflags="$afh_ldflags $vorbis_libs"
635 recv_ldflags="$recv_ldflags $vorbis_libs"
637 server_errlist_objs="$server_errlist_objs ogg_afh"
638 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
639 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
640 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
641 afh_errlist_objs="$afh_errlist_objs ogg_afh"
642 recv_errlist_objs="$recv_errlist_objs ogg_afh"
644 audiod_audio_formats="$audiod_audio_formats ogg"
645 audio_format_handlers="$audio_format_handlers ogg"
647 AC_MSG_WARN([no ogg/vorbis $msg])
649 if test "$have_speex" = "yes"; then
650 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
651 filters="$filters spxdec"
653 server_ldflags="$server_ldflags $speex_libs"
654 filter_ldflags="$filter_ldflags $speex_libs"
655 audiod_ldflags="$audiod_ldflags $speex_libs"
656 play_ldflags="$play_ldflags $speex_libs"
657 afh_ldflags="$afh_ldflags $speex_libs"
658 recv_ldflags="$recv_ldflags $speex_libs"
660 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
661 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
662 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
663 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
664 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
665 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
667 audiod_audio_formats="$audiod_audio_formats spx"
668 audio_format_handlers="$audio_format_handlers spx"
670 AC_MSG_WARN([no ogg/speex $msg])
672 if test "$have_opus" = "yes"; then
673 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
674 filters="$filters opusdec"
676 server_ldflags="$server_ldflags $opus_libs"
677 filter_ldflags="$filter_ldflags $opus_libs"
678 audiod_ldflags="$audiod_ldflags $opus_libs"
679 afh_ldflags="$afh_ldflags $opus_libs"
680 play_ldflags="$play_ldflags $opus_libs"
681 recv_ldflags="$recv_ldflags $opus_libs"
683 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
684 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
685 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
686 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
687 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
688 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
690 audiod_audio_formats="$audiod_audio_formats opus"
691 audio_format_handlers="$audio_format_handlers opus"
693 AC_MSG_WARN([no ogg/opus $msg])
695 CPPFLAGS="$OLD_CPPFLAGS"
696 LDFLAGS="$OLD_LDFLAGS"
698 ########################################################################### faad
700 OLD_CPPFLAGS="$CPPFLAGS"
701 OLD_LDFLAGS="$LDFLAGS"
703 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
704 [look for neaacdec.h also in dir])])
705 if test -n "$with_faad_headers"; then
706 faad_cppflags="-I$with_faad_headers"
707 CPPFLAGS="$CPPFLAGS $faad_cppflags"
709 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
710 [look for libfaad also in dir])])
711 if test -n "$with_faad_libs"; then
712 faad_libs="-L$with_faad_libs"
713 LDFLAGS="$LDFLAGS $faad_libs"
715 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
716 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
717 if test "$have_faad" = "yes"; then
718 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
719 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
720 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
721 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
722 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
723 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
724 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
726 server_ldflags="$server_ldflags $faad_libs -lfaad"
727 filter_ldflags="$filter_ldflags $faad_libs -lfaad"
728 audiod_ldflags="$audiod_ldflags $faad_libs -lfaad"
729 play_ldflags="$play_ldflags $faad_libs -lfaad"
730 afh_ldflags="$afh_ldflags $faad_libs -lfaad"
731 recv_ldflags="$afh_ldflags $faad_libs -lfaad"
733 audiod_audio_formats="$audiod_audio_formats aac"
734 audio_format_handlers="$audio_format_handlers aac"
735 filters="$filters aacdec"
736 AC_SUBST(faad_cppflags)
738 AC_MSG_WARN([no aac support in para_audiod/para_filter])
740 CPPFLAGS="$OLD_CPPFLAGS"
741 LDFLAGS="$OLD_LDFLAGS"
743 ########################################################################### mad
745 OLD_CPPFLAGS="$CPPFLAGS"
746 OLD_LDFLAGS="$LDFLAGS"
749 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
750 [look for mad.h also in dir])])
751 if test -n "$with_mad_headers"; then
752 mad_cppflags="-I$with_mad_headers"
753 CPPFLAGS="$CPPFLAGS $mad_cppflags"
755 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
756 [look for libmad also in dir])])
757 if test -n "$with_mad_libs"; then
758 mad_libs="-L$with_mad_libs"
759 LDFLAGS="$LDFLAGS $mad_libs"
761 AC_CHECK_HEADERS([mad.h], [], [
764 AC_CHECK_LIB([mad], [mad_stream_init], [], [
767 if test "$have_mad" = "yes"; then
768 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
769 filter_cmdline_objs="$filter_cmdline_objs add_cmdline(mp3dec_filter)"
770 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(mp3dec_filter)"
771 play_cmdline_objs="$play_cmdline_objs add_cmdline(mp3dec_filter)"
772 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
773 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
774 play_errlist_objs="$play_errlist_objs mp3dec_filter"
775 filter_ldflags="$filter_ldflags $mad_libs -lmad"
776 audiod_ldflags="$audiod_ldflags $mad_libs -lmad"
777 play_ldflags="$play_ldflags $mad_libs -lmad"
778 audiod_audio_formats="$audiod_audio_formats mp3"
779 filters="$filters mp3dec"
780 AC_SUBST(mad_cppflags)
782 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
784 CPPFLAGS="$OLD_CPPFLAGS"
785 LDFLAGS="$OLD_LDFLAGS"
787 ###################################################################### libid3tag
788 OLD_CPPFLAGS="$CPPFLAGS"
789 OLD_LDFLAGS="$LDFLAGS"
793 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
794 [look for id3tag header files also in dir])])
795 if test -n "$with_id3tag_headers"; then
796 id3tag_cppflags="-I$with_id3tag_headers"
797 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
799 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
800 [look for id3tag libs also in dir])])
801 if test -n "$with_id3tag_libs"; then
802 id3tag_libs="-L$with_id3tag_libs"
803 LDFLAGS="$LDFLAGS $id3tag_libs"
806 AC_MSG_CHECKING(for libid3tag)
807 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
810 struct id3_tag t = {.flags = 0};
811 ]])],[],[have_libid3tag=no])
812 AC_MSG_RESULT($have_libid3tag)
814 if test ${have_libid3tag} = yes; then
815 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
816 server_ldflags="$server_ldflags $id3tag_libs -lid3tag -lz"
817 afh_ldflags="$afh_ldflags $id3tag_libs -lid3tag -lz"
818 play_ldflags="$play_ldflags -lz"
819 recv_ldflags="$recv_ldflags $id3tag_libs -lid3tag"
820 play_ldflags="$play_ldflags $id3tag_libs -lid3tag"
821 AC_SUBST(id3tag_cppflags)
823 AC_MSG_WARN([no support for id3v2 tags])
825 CPPFLAGS="$OLD_CPPFLAGS"
826 LDFLAGS="$OLD_LDFLAGS"
828 ########################################################################### flac
829 OLD_CPPFLAGS="$CPPFLAGS"
830 OLD_LDFLAGS="$LDFLAGS"
834 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
835 [look for flac headers also in dir])])
836 if test -n "$with_flac_headers"; then
837 flac_cppflags="-I$with_flac_headers"
838 CPPFLAGS="$CPPFLAGS $flac_cppflags"
840 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
841 [look for flac libs also in dir])])
842 if test -n "$with_flac_libs"; then
843 flac_libs="-L$with_flac_libs"
844 LDFLAGS="$LDFLAGS $flac_libs"
846 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
847 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
848 if test "$have_flac" = "yes"; then
849 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
850 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
851 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
852 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
853 afh_errlist_objs="$afh_errlist_objs flac_afh"
854 server_errlist_objs="$server_errlist_objs flac_afh"
855 recv_errlist_objs="$recv_errlist_objs flac_afh"
856 filter_ldflags="$filter_ldflags $flac_libs -lFLAC"
857 audiod_ldflags="$audiod_ldflags $flac_libs -lFLAC"
858 play_ldflags="$play_ldflags $flac_libs -lFLAC"
859 server_ldflags="$server_ldflags $flac_libs -lFLAC"
860 afh_ldflags="$afh_ldflags $flac_libs -lFLAC"
861 recv_ldflags="$recv_ldflags $flac_libs -lFLAC"
862 filters="$filters flacdec"
863 audio_format_handlers="$audio_format_handlers flac"
864 audiod_audio_formats="$audiod_audio_formats flac"
865 AC_SUBST(flac_cppflags)
867 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
869 CPPFLAGS="$OLD_CPPFLAGS"
870 LDFLAGS="$OLD_LDFLAGS"
872 ########################################################################### oss
873 OLD_CPPFLAGS="$CPPFLAGS"
874 OLD_LDFLAGS="$LDFLAGS"
878 msg="=> will not build oss writer"
880 AC_CHECK_HEADER(sys/soundcard.h, [
881 audiod_errlist_objs="$audiod_errlist_objs oss_write"
882 play_errlist_objs="$play_errlist_objs oss_write"
883 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(oss_write)"
884 play_cmdline_objs="$play_cmdline_objs add_cmdline(oss_write)"
886 write_errlist_objs="$write_errlist_objs oss_write"
887 write_cmdline_objs="$write_cmdline_objs add_cmdline(oss_write)"
888 fade_errlist_objs="$fade_errlist_objs oss_mix"
890 writers="$writers oss"
891 default_writer="OSS_WRITE"
892 mixers="${mixers}oss "
893 default_mixer="OSS_MIX"
895 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
896 audiod_ldflags="$audiod_ldflags -lossaudio"
897 play_ldflags="$play_ldflags -lossaudio"
898 write_ldflags="$write_ldflags -lossaudio"
899 fade_ldflags="$fade_ldflags -lossaudio"
905 AC_MSG_WARN([no sys/soundcard.h $msg])
908 CPPFLAGS="$OLD_CPPFLAGS"
909 LDFLAGS="$OLD_LDFLAGS"
912 ########################################################################### alsa
913 OLD_CPPFLAGS="$CPPFLAGS"
914 OLD_LDFLAGS="$LDFLAGS"
917 msg="=> no alsa support for para_audiod/para_write"
918 if test "$OSTYPE" != "Linux"; then
923 if test "$have_alsa" = "yes"; then
924 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
926 AC_MSG_WARN([no alsa/asoundlib $msg])
930 if test "$have_alsa" = "yes"; then
931 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
933 AC_MSG_WARN([no libasound $msg])
937 if test "$have_alsa" = "yes"; then
938 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
939 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(alsa_write)"
940 audiod_ldflags="$audiod_ldflags -lasound"
941 play_errlist_objs="$play_errlist_objs alsa_write"
942 play_cmdline_objs="$play_cmdline_objs add_cmdline(alsa_write)"
943 play_ldflags="$play_ldflags -lasound"
945 write_errlist_objs="$write_errlist_objs alsa_write"
946 write_cmdline_objs="$write_cmdline_objs add_cmdline(alsa_write)"
947 write_ldflags="$write_ldflags -lasound"
948 fade_errlist_objs="$fade_errlist_objs alsa_mix"
949 fade_ldflags="$fade_ldflags -lasound"
951 writers="$writers alsa"
952 default_writer="ALSA_WRITE"
953 mixers="${mixers}alsa "
954 default_mixer="ALSA_MIX"
957 CPPFLAGS="$OLD_CPPFLAGS"
958 LDFLAGS="$OLD_LDFLAGS"
960 ########################################################################### fade
961 if test -n "$mixers"; then
963 executables="$executables fade"
964 fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
965 fade_cmdline_objs="add_cmdline(fade)"
966 fade_objs="$fade_cmdline_objs $fade_errlist_objs"
967 AC_SUBST(fade_objs, add_dot_o($fade_objs))
968 AC_SUBST(fade_ldflags, $fade_ldflags)
969 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
970 objlist_to_errlist($fade_errlist_objs),
971 errors used by para_fade)
974 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
977 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
978 enum of supported mixers)
979 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
980 use this mixer if none was specified)
981 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
982 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
985 printf 'extern void '$i'_mix_init(struct mixer *); '
988 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
989 init functions of the supported mixers)
990 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
991 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
992 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
995 AC_MSG_WARN([no mixer support])
996 mixer_summary="para_fade: no"
998 ########################################################################### libao
999 OLD_CPPFLAGS="$CPPFLAGS"
1000 OLD_LDFLAGS="$LDFLAGS"
1004 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
1005 [look for ao/ao.h also in dir])])
1006 if test -n "$with_ao_headers"; then
1007 ao_cppflags="-I$with_ao_headers"
1008 CPPFLAGS="$CPPFLAGS $ao_cppflags"
1010 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
1011 [look for libao also in dir])])
1012 if test -n "$with_ao_libs"; then
1013 ao_libs="-L$with_ao_libs"
1014 LDFLAGS="$LDFLAGS $ao_libs"
1016 msg="no libao support for para_audiod/para_write"
1017 AC_CHECK_HEADERS([ao/ao.h], [
1020 AC_MSG_WARN([ao.h not found, $msg])
1022 if test "$have_ao" = "yes"; then
1023 AC_CHECK_LIB([ao], [ao_initialize], [], [
1025 AC_MSG_WARN([ao lib not found or not working, $msg])
1028 if test "$have_ao" = "yes"; then
1029 AC_CHECK_HEADERS([pthread.h], [
1032 AC_MSG_WARN([pthread.h not found, $msg])
1035 if test "$have_ao" = "yes"; then
1036 AC_CHECK_LIB([pthread], [pthread_create], [], [
1038 AC_MSG_WARN([pthread lib not found or not working, $msg])
1041 if test "$have_ao" = "yes"; then
1042 audiod_errlist_objs="$audiod_errlist_objs ao_write"
1043 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(ao_write)"
1044 audiod_ldflags="$audiod_ldflags -lao -lpthread"
1046 play_errlist_objs="$play_errlist_objs ao_write"
1047 play_cmdline_objs="$play_cmdline_objs add_cmdline(ao_write)"
1048 play_ldflags="$play_ldflags -lao -lpthread"
1050 write_errlist_objs="$write_errlist_objs ao_write"
1051 write_cmdline_objs="$write_cmdline_objs add_cmdline(ao_write)"
1052 write_ldflags="$write_ldflags $ao_libs -lao -lpthread"
1053 writers="$writers ao"
1054 AC_SUBST(ao_cppflags)
1057 CPPFLAGS="$OLD_CPPFLAGS"
1058 LDFLAGS="$OLD_LDFLAGS"
1060 ############################################################# readline
1061 OLD_CPPFLAGS="$CPPFLAGS"
1062 OLD_LDFLAGS="$LDFLAGS"
1066 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
1067 [look for libreadline header files also in dir])])
1068 if test -n "$with_readline_headers"; then
1069 readline_cppflags="-I$with_readline_headers"
1070 CPPFLAGS="$CPPFLAGS $readline_cppflags"
1073 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
1074 [look for readline library also in dir])])
1075 if test -n "$with_readline_libs"; then
1076 readline_libs="-L$with_readline_libs"
1077 LDFLAGS="$LDFLAGS $readline_libs"
1079 msg="no interactive cli support"
1080 AC_CHECK_HEADERS([readline/readline.h], [
1083 AC_MSG_WARN([readline/readline.h not found, $msg])
1086 if test "$have_curses" != "yes"; then
1088 AC_MSG_WARN([interactive cli support depends on curses,])
1089 AC_MSG_WARN([but no curses lib was detected, $msg])
1092 if test "$have_readline" = "yes"; then
1093 readline_libs="$readline_libs -lreadline"
1094 AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
1095 if test "$have_readline" = "no"; then # try with -lcurses
1097 AC_MSG_NOTICE([trying again with -lcurses])
1098 unset ac_cv_search_rl_free_keymap 2> /dev/null
1099 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1101 readline_libs="$readline_libs -lcurses"
1104 if test "$have_readline" = "no"; then # try with -ltermcap
1106 AC_MSG_NOTICE([trying again with -ltermcap])
1107 unset ac_cv_search_rl_free_keymap 2> /dev/null
1108 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1110 readline_libs="$readline_libs -ltermcap"
1115 if test "$have_readline" = "yes"; then
1116 client_errlist_objs="$client_errlist_objs interactive"
1117 client_ldflags="$client_ldflags $readline_libs"
1118 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
1119 audioc_ldflags="$audioc_ldflags $readline_libs"
1120 play_errlist_objs="$play_errlist_objs interactive"
1121 play_ldflags="$play_ldflags $readline_libs"
1122 AC_SUBST(readline_cppflags)
1123 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
1125 AC_MSG_WARN([libreadline not found or unusable])
1127 CPPFLAGS="$OLD_CPPFLAGS"
1128 LDFLAGS="$OLD_LDFLAGS"
1130 ############################################################# libsamplerate
1131 OLD_CPPFLAGS="$CPPFLAGS"
1132 OLD_LDFLAGS="$LDFLAGS"
1135 have_samplerate="yes"
1136 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
1137 [look for samplerate headers also in dir])])
1138 if test -n "$with_samplerate_headers"; then
1139 samplerate_cppflags="-I$with_samplerate_headers"
1140 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
1142 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
1143 [look for samplerate libs also in dir])])
1144 if test -n "$with_samplerate_libs"; then
1145 samplerate_libs="-L$with_samplerate_libs"
1146 LDFLAGS="$LDFLAGS $samplerate_libs"
1149 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
1150 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
1152 if test "$have_samplerate" = "yes"; then
1153 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1154 filter_cmdline_objs="$filter_cmdline_objs add_cmdline(resample_filter)"
1155 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
1156 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(resample_filter)"
1157 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1158 play_cmdline_objs="$play_cmdline_objs add_cmdline(resample_filter)"
1159 filter_ldflags="$filter_ldflags $samplerate_libs -lsamplerate"
1160 audiod_ldflags="$audiod_ldflags $samplerate_libs -lsamplerate"
1161 play_ldflags="$play_ldflags $samplerate_libs -lsamplerate"
1162 filters="$filters resample"
1163 AC_SUBST(samplerate_cppflags)
1165 AC_MSG_WARN([no resample support in para_audiod/para_filter])
1167 CPPFLAGS="$OLD_CPPFLAGS"
1168 LDFLAGS="$OLD_LDFLAGS"
1170 ############################################################# error2.h
1171 AC_MSG_NOTICE(creating error2.h)
1173 # these are always built
1176 $filter_errlist_objs
1177 $audioc_errlist_objs
1179 $client_errlist_objs
1181 $audiod_errlist_objs
1185 # optional executables
1186 if test "$build_server" = "yes"; then
1187 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1189 if test "$build_gui" = "yes"; then
1190 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1192 if test "$build_fade" = "yes"; then
1193 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1196 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1198 for i in $executables; do
1200 eval echo \$${i}_errlist_objs
1201 done | ./error2.pl > error2.h
1202 for obj in $all_errlist_objs; do
1203 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1205 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1206 [enum {$SS NUM_SS}],
1207 [list of all objects that use the paraslash error facility]
1210 ################################################################## status items
1212 status_items="basename status num_played mtime bitrate frequency file_size
1213 status_flags format score techinfo afs_mode
1214 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1215 offset seconds_total stream_start current_time audiod_uptime image_id
1216 lyrics_id duration directory lyrics_name image_name path hash channels
1217 last_played num_chunks chunk_time amplification artist title year album
1221 for i in $status_items; do
1222 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1224 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1225 [enum of all status items])
1228 for i in $status_items; do
1229 result="$result \"$i\", "
1231 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1232 [char * array of all status items])
1234 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1235 [formats supported by para_server and para_afh])
1237 AC_SUBST(executables)
1239 recv_objs="$recv_cmdline_objs $recv_errlist_objs"
1240 filter_objs="$filter_cmdline_objs $filter_errlist_objs"
1241 audiod_objs="$audiod_cmdline_objs $audiod_errlist_objs"
1242 server_objs="$server_cmdline_objs $server_errlist_objs"
1243 write_objs="$write_cmdline_objs $write_errlist_objs"
1244 client_objs="$client_cmdline_objs $client_errlist_objs"
1245 audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs"
1246 afh_objs="$afh_cmdline_objs $afh_errlist_objs"
1247 play_objs="$play_cmdline_objs $play_errlist_objs"
1250 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1251 AC_SUBST(recv_ldflags, $recv_ldflags)
1252 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1253 errors used by para_recv)
1255 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1256 AC_SUBST(filter_ldflags, $filter_ldflags)
1257 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1258 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1260 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1261 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1262 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1263 errors used by para_audiod)
1265 AC_SUBST(server_objs, add_dot_o($server_objs))
1266 AC_SUBST(server_ldflags, $server_ldflags)
1267 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1268 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1270 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1271 AC_SUBST(afh_ldflags, $afh_ldflags)
1272 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1273 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1275 AC_SUBST(write_objs, add_dot_o($write_objs))
1276 AC_SUBST(write_ldflags, $write_ldflags)
1277 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1278 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1280 AC_SUBST(client_objs, add_dot_o($client_objs))
1281 AC_SUBST(client_ldflags, $client_ldflags)
1282 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1283 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1285 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1286 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1287 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1288 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1290 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1291 AC_SUBST(gui_ldflags, $gui_ldflags)
1292 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1293 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1295 AC_SUBST(play_objs, add_dot_o($play_objs))
1296 AC_SUBST(play_ldflags, $play_ldflags)
1297 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1298 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1300 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1301 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1302 enum of supported filters)
1303 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1304 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1305 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1306 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1308 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1309 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1310 enum of supported writers)
1311 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1312 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1313 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1314 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1315 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1316 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1317 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1319 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1320 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1321 enum of audio formats supported by audiod)
1322 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1323 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1327 paraslash configuration:
1328 ~~~~~~~~~~~~~~~~~~~~~~~~
1329 unix socket credentials: $have_ucred
1330 readline (interactive CLIs): $have_readline
1331 audio formats handlers: $audio_format_handlers
1332 id3 version2 support: $have_libid3tag
1337 para_server: $build_server
1338 para_gui: $build_gui
1339 para_fade: $build_fade