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"
104 http_recv recv_common recv time string net dccp_recv fd
105 sched stdout ggo udp_recv buffer_tree afh_recv afh_common
106 wma_afh wma_common mp3_afh version
111 filter_cmdline_objs="
117 filter_errlist_objs="filter_common wav_filter compress_filter filter string
118 stdin stdout sched fd amp_filter ggo fecdec_filter fec version
119 prebuffer_filter time bitstream imdct wma_common wmadec_filter buffer_tree"
121 filters=" compress wav amp fecdec wmadec prebuffer"
123 audioc_cmdline_objs="audioc"
124 audioc_errlist_objs="
134 afh_cmdline_objs="afh"
135 afh_errlist_objs="afh string fd mp3_afh afh_common time wma_afh wma_common
139 write_cmdline_objs="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 gui_cmdline_objs="gui"
160 play_errlist_objs="play fd sched ggo buffer_tree time string net
162 wma_afh wma_common mp3_afh
163 recv_common udp_recv http_recv dccp_recv
164 filter_common fec bitstream imdct
165 wav_filter compress_filter amp_filter prebuffer_filter fecdec_filter
167 write_common file_write
182 ################################################################## clock_gettime
184 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
185 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
187 if test -n "$clock_gettime_lib"; then
188 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
189 define to 1 if clock_gettime() is supported])
191 if test "$clock_gettime_lib" = "rt"; then
192 AC_SUBST(clock_gettime_ldflags, -lrt)
194 ########################################################################### osl
196 OLD_CPPFLAGS="$CPPFLAGS"
197 OLD_LDFLAGS="$LDFLAGS"
199 AC_ARG_WITH(osl_headers, [AS_HELP_STRING(--with-osl-headers=dir,
200 [look for osl.h also in dir])])
201 if test -n "$with_osl_headers"; then
202 osl_cppflags="-I$with_osl_headers"
203 CPPFLAGS="$CPPFLAGS $osl_cppflags"
205 AC_ARG_WITH(osl_libs, [AS_HELP_STRING(--with-osl-libs=dir,
206 [look for libosl also in dir])])
207 if test -n "$with_osl_libs"; then
208 osl_libs="-L$with_osl_libs"
209 LDFLAGS="$LDFLAGS $osl_libs"
212 AC_CHECK_HEADER(osl.h, [], have_osl=no)
213 AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no)
214 if test "$have_osl" = "no"; then
215 AC_MSG_WARN([libosl not found, can not build para_server.
217 http://systemlinux.org/~maan/osl
219 git clone git://git.tuebingen.mpg.de/osl
222 AC_SUBST(osl_cppflags)
223 CPPFLAGS="$OLD_CPPFLAGS"
224 LDFLAGS="$OLD_LDFLAGS"
226 ########################################################################### crypto
227 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
228 Force using crypto library "lib". This package requires either
229 openssl or libgcrypt being installed. Possible values for "lib"
230 are thus "openssl" and "gcrypt". If this option is not given,
231 openssl is tried first. If openssl was not found, gcrypt is
234 case "$enable_cryptolib" in
235 "openssl") check_openssl="yes"; check_gcrypt="no";;
236 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
237 "") check_openssl="yes"; check_gcrypt="yes";;
238 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
240 ###################################################################### openssl
241 if test "$check_openssl" = "yes"; then
242 OLD_CPPFLAGS="$CPPFLAGS"
243 OLD_LDFLAGS="$LDFLAGS"
246 AC_ARG_WITH(openssl_headers, [AS_HELP_STRING(--with-openssl-headers=dir,
247 [look for openssl headers also in dir])])
248 if test -n "$with_openssl_headers"; then
249 openssl_cppflags="-I$with_openssl_headers"
250 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
252 AC_ARG_WITH(openssl_libs, [AS_HELP_STRING(--with-openssl-libs=dir,
253 [look for openssl libraries also in dir])])
254 if test -n "$with_openssl_libs"; then
255 openssl_libs="-L$with_openssl_libs"
256 LDFLAGS="$LDFLAGS $openssl_libs"
258 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
259 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
260 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
261 # try harder: openssl is sometimes installed in /usr/local/ssl
262 openssl_cppflags="-I/usr/local/ssl/include"
263 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
264 openssl_libs="-L/usr/local/ssl/lib"
265 LDFLAGS="$LDFLAGS $openssl_libs"
267 unset ac_cv_header_openssl_ssl_h 2> /dev/null
268 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
269 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
270 if test "$have_openssl" = "yes"; then
271 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
274 if test "$have_openssl" = "yes"; then
275 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
276 AC_SUBST(openssl_cppflags)
277 openssl_libs="$openssl_libs -lssl -lcrypto"
278 server_ldflags="$server_ldflags $openssl_libs"
279 client_ldflags="$client_ldflags $openssl_libs"
280 audiod_ldflags="$audiod_ldflags $openssl_libs"
282 server_errlist_objs="$server_errlist_objs crypt"
283 client_errlist_objs="$client_errlist_objs crypt"
284 audiod_errlist_objs="$audiod_errlist_objs crypt"
288 AC_MSG_WARN([openssl libraries not found])
290 CPPFLAGS="$OLD_CPPFLAGS"
291 LDFLAGS="$OLD_LDFLAGS"
296 ########################################################################### gcrypt
297 if test "$check_gcrypt" = "yes"; then
298 OLD_CPPFLAGS="$CPPFLAGS"
299 OLD_LDFLAGS="$LDFLAGS"
302 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
303 [look for gcrypt headers also in dir])])
304 if test -n "$with_gcrypt_headers"; then
305 gcrypt_cppflags="-I$with_gcrypt_headers"
306 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
308 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
309 [look for libgcrypt also in dir])])
310 if test -n "$with_gcrypt_libs"; then
311 gcrypt_libs="-L$with_gcrypt_libs"
312 LDFLAGS="$LDFLAGS $gcrypt_libs"
314 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
315 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
316 if test "$have_gcrypt" = "yes"; then
317 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
318 AC_SUBST(gcrypt_cppflags)
319 gcrypt_libs="$gcrypt_libs -lgcrypt"
320 server_ldflags="$server_ldflags $gcrypt_libs"
321 client_ldflags="$client_ldflags $gcrypt_libs"
322 audiod_ldflags="$audiod_ldflags $gcrypt_libs"
324 server_errlist_objs="$server_errlist_objs gcrypt"
325 client_errlist_objs="$client_errlist_objs gcrypt"
326 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
328 AC_MSG_WARN([gcrypt library not found])
330 CPPFLAGS="$OLD_CPPFLAGS"
331 LDFLAGS="$OLD_LDFLAGS"
336 ########################################################################### libsocket
337 AC_CHECK_LIB([c], [socket],
339 [socket_lib="-lsocket"]
341 server_ldflags="$server_ldflags $socket_lib"
342 client_ldflags="$client_ldflags $socket_lib"
343 audioc_ldflags="$audioc_ldflags $socket_lib"
344 audiod_ldflags="$audiod_ldflags $socket_lib"
345 recv_ldflags="$recv_ldflags $socket_lib"
346 AC_SEARCH_LIBS([connect],[socket],[],[
347 AC_MSG_ERROR([Fatal: Did not find connect().])
349 ########################################################################### libnsl
350 AC_CHECK_LIB([c], [gethostbyname],
354 server_ldflags="$server_ldflags $nsl_lib"
355 client_ldflags="$client_ldflags $nsl_lib"
356 audioc_ldflags="$audioc_ldflags $nsl_lib"
357 recv_ldflags="$recv_ldflags $nsl_lib"
358 AC_SEARCH_LIBS([inet_ntoa],[nsl],[],[
359 AC_MSG_ERROR([Fatal: Did not find inet_ntoa().])
361 ########################################################################### ucred
362 AC_MSG_CHECKING(for struct ucred)
363 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
365 #include <sys/types.h>
366 #include <sys/socket.h>
368 struct ucred sucred; sucred.pid=0;
369 ]])],[have_ucred=yes],[have_ucred=no])
370 AC_MSG_RESULT($have_ucred)
371 if test ${have_ucred} = yes; then
372 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
374 ########################################################################### gengetopt
375 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
377 [gengetopt_args_info_description],
378 [ggo_descriptions_declared=yes],
379 [ggo_descriptions_declared=no],
380 [#include "conftest-ggo.h"]
382 AC_SUBST(ggo_descriptions_declared)
383 ########################################################################### curses
385 OLD_CPPFLAGS="$CPPFLAGS"
386 OLD_LDFLAGS="$LDFLAGS"
388 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
389 [look for curses.h also in dir])])
390 if test -n "$with_curses_headers"; then
391 curses_cppflags="-I$with_curses_headers"
392 CPPFLAGS="$CPPFLAGS $curses_cppflags"
394 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
395 [look for libcurses also in dir])])
396 if test -n "$with_curses_libs"; then
397 curses_libs="-L$with_curses_libs"
398 LDFLAGS="$LDFLAGS $curses_libs"
400 AC_CHECK_HEADER(curses.h, [], [
403 gui_ldflags="$curses_libs"
404 AC_CHECK_LIB([ncursesw], [initscr],
405 [gui_ldflags="$curses_libs -lncursesw"], [
406 AC_CHECK_LIB([curses], [initscr],
407 [gui_ldflags="$curses_libs -lcurses"],
412 if test "$have_curses" = "yes"; then
413 AC_SUBST(curses_cppflags)
415 executables="$executables gui"
418 AC_MSG_WARN([no curses lib, cannot build para_gui])
420 CPPFLAGS="$OLD_CPPFLAGS"
421 LDFLAGS="$OLD_LDFLAGS"
424 ########################################################################### ip_mreqn
425 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
426 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
432 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
433 AC_MSG_RESULT($have_ip_mreqn)
434 if test ${have_ip_mreqn} = yes; then
435 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
437 ########################################################################### osx
439 AC_MSG_CHECKING(for CoreAudio (MacOs))
440 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
441 #include <CoreAudio/CoreAudio.h>
444 ]])],[have_core_audio=yes],[have_core_audio=no])
445 AC_MSG_RESULT($have_core_audio)
446 if test ${have_core_audio} = yes; then
447 f1="-framework CoreAudio"
448 f2="-framework AudioToolbox"
449 f3="-framework AudioUnit"
450 f4="-framework CoreServices"
453 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
454 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
455 audiod_ldflags="$audiod_ldflags $f"
457 play_errlist_objs="$play_errlist_objs osx_write ipc"
458 play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
459 play_ldflags="$play_ldflags $f"
461 write_errlist_objs="$write_errlist_objs osx_write ipc"
462 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
463 write_ldflags="$write_ldflags $f"
464 writers="$writers osx"
465 default_writer="OSX_WRITE"
466 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
468 ####################################################### ogg/vorbis/speex/opus
470 OLD_CPPFLAGS="$CPPFLAGS"
471 OLD_LDFLAGS="$LDFLAGS"
473 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
474 [look for ogg headers also in dir])])
475 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
476 [look for ogg libs also in dir])])
477 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
478 [look for vorbis headers also in dir])])
479 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
480 [look for vorbis libs also in dir])])
481 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
482 [look for speex headers also in dir])])
483 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
484 [look for speex libs also in dir])])
485 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
486 [look for opus headers also in dir])])
487 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
488 [look for opus libs also in dir])])
490 if test -n "$with_ogg_headers"; then
491 ogg_cppflags="-I$with_ogg_headers"
492 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
494 if test -n "$with_ogg_libs"; then
495 ogg_libs="-L$with_ogg_libs"
496 LDFLAGS="$LDFLAGS $ogg_libs"
498 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
499 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
504 if test "$have_ogg" = "yes"; then
506 if test -n "$with_vorbis_headers"; then
507 vorbis_cppflags="-I$with_vorbis_headers"
508 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
510 if test -n "$with_vorbis_libs"; then
511 vorbis_libs="-L$with_vorbis_libs"
512 LDFLAGS="$LDFLAGS $vorbis_libs"
514 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
515 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
518 if test -n "$with_speex_headers"; then
519 speex_cppflags="-I$with_speex_headers"
520 CPPFLAGS="$CPPFLAGS $speex_cppflags"
522 if test -n "$with_speex_libs"; then
523 speex_libs="-L$with_speex_libs"
524 LDFLAGS="$LDFLAGS $speex_libs"
526 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
527 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
530 if test -n "$with_opus_headers"; then
531 opus_cppflags="-I$with_opus_headers"
532 CPPFLAGS="$CPPFLAGS $opus_cppflags"
534 if test -n "$with_opus_libs"; then
535 opus_libs="-L$with_opus_libs"
536 LDFLAGS="$LDFLAGS $opus_libs"
538 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
539 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
541 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
547 msg="support in para_server/para_filter/para_afh"
548 if test "$have_vorbis" = "yes" || \
549 test "$have_speex" = "yes" || \
550 test "$have_opus" = "yes"; then
551 AC_SUBST(ogg_cppflags)
552 ogg_libs="$ogg_libs -logg"
553 if test "$OSTYPE" = "Darwin"; then
554 ogg_libs="-Wl,-bind_at_load $ogg_libs"
556 server_ldflags="$server_ldflags $ogg_libs"
557 filter_ldflags="$filter_ldflags $ogg_libs"
558 audiod_ldflags="$audiod_ldflags $ogg_libs"
559 play_ldflags="$play_ldflags $ogg_libs"
560 afh_ldflags="$afh_ldflags $ogg_libs"
561 recv_ldflags="$recv_ldflags $ogg_libs"
562 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
563 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
564 server_errlist_objs="$server_errlist_objs ogg_afh_common"
565 play_errlist_objs="$play_errlist_objs ogg_afh_common"
567 if test "$have_vorbis" = "yes"; then
568 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
569 filters="$filters oggdec"
570 vorbis_libs="-lvorbis -lvorbisfile"
571 server_ldflags="$server_ldflags $vorbis_libs"
572 filter_ldflags="$filter_ldflags $vorbis_libs"
573 audiod_ldflags="$audiod_ldflags $vorbis_libs"
574 play_ldflags="$play_ldflags $vorbis_libs"
575 afh_ldflags="$afh_ldflags $vorbis_libs"
576 recv_ldflags="$recv_ldflags $vorbis_libs"
578 server_errlist_objs="$server_errlist_objs ogg_afh"
579 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
580 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
581 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
582 afh_errlist_objs="$afh_errlist_objs ogg_afh"
583 recv_errlist_objs="$recv_errlist_objs ogg_afh"
585 audiod_audio_formats="$audiod_audio_formats ogg"
586 audio_format_handlers="$audio_format_handlers ogg"
588 AC_MSG_WARN([no ogg/vorbis $msg])
590 if test "$have_speex" = "yes"; then
591 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
592 filters="$filters spxdec"
594 server_ldflags="$server_ldflags $speex_libs"
595 filter_ldflags="$filter_ldflags $speex_libs"
596 audiod_ldflags="$audiod_ldflags $speex_libs"
597 play_ldflags="$play_ldflags $speex_libs"
598 afh_ldflags="$afh_ldflags $speex_libs"
599 recv_ldflags="$recv_ldflags $speex_libs"
601 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
602 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
603 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
604 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
605 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
606 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
608 audiod_audio_formats="$audiod_audio_formats spx"
609 audio_format_handlers="$audio_format_handlers spx"
611 AC_MSG_WARN([no ogg/speex $msg])
613 if test "$have_opus" = "yes"; then
614 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
615 filters="$filters opusdec"
617 server_ldflags="$server_ldflags $opus_libs"
618 filter_ldflags="$filter_ldflags $opus_libs"
619 audiod_ldflags="$audiod_ldflags $opus_libs"
620 afh_ldflags="$afh_ldflags $opus_libs"
621 play_ldflags="$play_ldflags $opus_libs"
622 recv_ldflags="$recv_ldflags $opus_libs"
624 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
625 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
626 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
627 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
628 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
629 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
631 audiod_audio_formats="$audiod_audio_formats opus"
632 audio_format_handlers="$audio_format_handlers opus"
634 AC_MSG_WARN([no ogg/opus $msg])
636 CPPFLAGS="$OLD_CPPFLAGS"
637 LDFLAGS="$OLD_LDFLAGS"
639 ########################################################################### faad
641 OLD_CPPFLAGS="$CPPFLAGS"
642 OLD_LDFLAGS="$LDFLAGS"
644 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
645 [look for neaacdec.h also in dir])])
646 if test -n "$with_faad_headers"; then
647 faad_cppflags="-I$with_faad_headers"
648 CPPFLAGS="$CPPFLAGS $faad_cppflags"
650 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
651 [look for libfaad also in dir])])
652 if test -n "$with_faad_libs"; then
653 faad_libs="-L$with_faad_libs"
654 LDFLAGS="$LDFLAGS $faad_libs"
656 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
657 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
658 if test "$have_faad" = "yes"; then
659 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
660 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
661 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
662 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
663 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
664 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
665 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
667 server_ldflags="$server_ldflags $faad_libs -lfaad"
668 filter_ldflags="$filter_ldflags $faad_libs -lfaad"
669 audiod_ldflags="$audiod_ldflags $faad_libs -lfaad"
670 play_ldflags="$play_ldflags $faad_libs -lfaad"
671 afh_ldflags="$afh_ldflags $faad_libs -lfaad"
672 recv_ldflags="$afh_ldflags $faad_libs -lfaad"
674 audiod_audio_formats="$audiod_audio_formats aac"
675 audio_format_handlers="$audio_format_handlers aac"
676 filters="$filters aacdec"
677 AC_SUBST(faad_cppflags)
679 AC_MSG_WARN([no aac support in para_audiod/para_filter])
681 CPPFLAGS="$OLD_CPPFLAGS"
682 LDFLAGS="$OLD_LDFLAGS"
684 ########################################################################### mad
686 OLD_CPPFLAGS="$CPPFLAGS"
687 OLD_LDFLAGS="$LDFLAGS"
690 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
691 [look for mad.h also in dir])])
692 if test -n "$with_mad_headers"; then
693 mad_cppflags="-I$with_mad_headers"
694 CPPFLAGS="$CPPFLAGS $mad_cppflags"
696 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
697 [look for libmad also in dir])])
698 if test -n "$with_mad_libs"; then
699 mad_libs="-L$with_mad_libs"
700 LDFLAGS="$LDFLAGS $mad_libs"
702 AC_CHECK_HEADERS([mad.h], [], [
705 AC_CHECK_LIB([mad], [mad_stream_init], [], [
708 if test "$have_mad" = "yes"; then
709 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
710 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
711 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
712 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
713 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
714 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
715 play_errlist_objs="$play_errlist_objs mp3dec_filter"
716 filter_ldflags="$filter_ldflags $mad_libs -lmad"
717 audiod_ldflags="$audiod_ldflags $mad_libs -lmad"
718 play_ldflags="$play_ldflags $mad_libs -lmad"
719 audiod_audio_formats="$audiod_audio_formats mp3"
720 filters="$filters mp3dec"
721 AC_SUBST(mad_cppflags)
723 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
725 CPPFLAGS="$OLD_CPPFLAGS"
726 LDFLAGS="$OLD_LDFLAGS"
728 ###################################################################### libid3tag
729 OLD_CPPFLAGS="$CPPFLAGS"
730 OLD_LDFLAGS="$LDFLAGS"
734 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
735 [look for id3tag header files also in dir])])
736 if test -n "$with_id3tag_headers"; then
737 id3tag_cppflags="-I$with_id3tag_headers"
738 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
740 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
741 [look for id3tag libs also in dir])])
742 if test -n "$with_id3tag_libs"; then
743 id3tag_libs="-L$with_id3tag_libs"
744 LDFLAGS="$LDFLAGS $id3tag_libs"
747 AC_MSG_CHECKING(for libid3tag)
748 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
751 struct id3_tag t = {.flags = 0};
752 ]])],[],[have_libid3tag=no])
753 AC_MSG_RESULT($have_libid3tag)
755 if test ${have_libid3tag} = yes; then
756 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
757 server_ldflags="$server_ldflags $id3tag_libs -lid3tag -lz"
758 afh_ldflags="$afh_ldflags $id3tag_libs -lid3tag -lz"
759 play_ldflags="$play_ldflags -lz"
760 recv_ldflags="$recv_ldflags $id3tag_libs -lid3tag"
761 play_ldflags="$play_ldflags $id3tag_libs -lid3tag"
762 AC_SUBST(id3tag_cppflags)
764 AC_MSG_WARN([no support for id3v2 tags])
766 CPPFLAGS="$OLD_CPPFLAGS"
767 LDFLAGS="$OLD_LDFLAGS"
769 ########################################################################### flac
770 OLD_CPPFLAGS="$CPPFLAGS"
771 OLD_LDFLAGS="$LDFLAGS"
775 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
776 [look for flac headers also in dir])])
777 if test -n "$with_flac_headers"; then
778 flac_cppflags="-I$with_flac_headers"
779 CPPFLAGS="$CPPFLAGS $flac_cppflags"
781 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
782 [look for flac libs also in dir])])
783 if test -n "$with_flac_libs"; then
784 flac_libs="-L$with_flac_libs"
785 LDFLAGS="$LDFLAGS $flac_libs"
787 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
788 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
789 if test "$have_flac" = "yes"; then
790 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
791 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
792 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
793 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
794 afh_errlist_objs="$afh_errlist_objs flac_afh"
795 server_errlist_objs="$server_errlist_objs flac_afh"
796 recv_errlist_objs="$recv_errlist_objs flac_afh"
797 filter_ldflags="$filter_ldflags $flac_libs -lFLAC"
798 audiod_ldflags="$audiod_ldflags $flac_libs -lFLAC"
799 play_ldflags="$play_ldflags $flac_libs -lFLAC"
800 server_ldflags="$server_ldflags $flac_libs -lFLAC"
801 afh_ldflags="$afh_ldflags $flac_libs -lFLAC"
802 recv_ldflags="$recv_ldflags $flac_libs -lFLAC"
803 filters="$filters flacdec"
804 audio_format_handlers="$audio_format_handlers flac"
805 audiod_audio_formats="$audiod_audio_formats flac"
806 AC_SUBST(flac_cppflags)
808 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
810 CPPFLAGS="$OLD_CPPFLAGS"
811 LDFLAGS="$OLD_LDFLAGS"
813 ########################################################################### oss
814 OLD_CPPFLAGS="$CPPFLAGS"
815 OLD_LDFLAGS="$LDFLAGS"
819 msg="=> will not build oss writer"
821 AC_CHECK_HEADER(sys/soundcard.h, [
822 audiod_errlist_objs="$audiod_errlist_objs oss_write"
823 play_errlist_objs="$play_errlist_objs oss_write"
824 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
825 play_cmdline_objs="$play_cmdline_objs oss_write"
827 write_errlist_objs="$write_errlist_objs oss_write"
828 write_cmdline_objs="$write_cmdline_objs oss_write"
829 fade_errlist_objs="$fade_errlist_objs oss_mix"
831 writers="$writers oss"
832 default_writer="OSS_WRITE"
833 mixers="${mixers}oss "
834 default_mixer="OSS_MIX"
836 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
837 audiod_ldflags="$audiod_ldflags -lossaudio"
838 play_ldflags="$play_ldflags -lossaudio"
839 write_ldflags="$write_ldflags -lossaudio"
840 fade_ldflags="$fade_ldflags -lossaudio"
846 AC_MSG_WARN([no sys/soundcard.h $msg])
849 CPPFLAGS="$OLD_CPPFLAGS"
850 LDFLAGS="$OLD_LDFLAGS"
853 ########################################################################### alsa
854 OLD_CPPFLAGS="$CPPFLAGS"
855 OLD_LDFLAGS="$LDFLAGS"
858 msg="=> no alsa support for para_audiod/para_write"
859 if test "$OSTYPE" != "Linux"; then
864 if test "$have_alsa" = "yes"; then
865 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
867 AC_MSG_WARN([no alsa/asoundlib $msg])
871 if test "$have_alsa" = "yes"; then
872 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
874 AC_MSG_WARN([no libasound $msg])
878 if test "$have_alsa" = "yes"; then
879 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
880 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
881 audiod_ldflags="$audiod_ldflags -lasound"
882 play_errlist_objs="$play_errlist_objs alsa_write"
883 play_cmdline_objs="$play_cmdline_objs alsa_write"
884 play_ldflags="$play_ldflags -lasound"
886 write_errlist_objs="$write_errlist_objs alsa_write"
887 write_cmdline_objs="$write_cmdline_objs alsa_write"
888 write_ldflags="$write_ldflags -lasound"
889 fade_errlist_objs="$fade_errlist_objs alsa_mix"
890 fade_ldflags="$fade_ldflags -lasound"
892 writers="$writers alsa"
893 default_writer="ALSA_WRITE"
894 mixers="${mixers}alsa "
895 default_mixer="ALSA_MIX"
898 CPPFLAGS="$OLD_CPPFLAGS"
899 LDFLAGS="$OLD_LDFLAGS"
901 ########################################################################### fade
902 if test -n "$mixers"; then
904 executables="$executables fade"
905 fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
906 fade_cmdline_objs="fade"
907 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
908 AC_SUBST(fade_objs, add_dot_o($fade_objs))
909 AC_SUBST(fade_ldflags, $fade_ldflags)
910 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
911 objlist_to_errlist($fade_errlist_objs),
912 errors used by para_fade)
915 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
918 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
919 enum of supported mixers)
920 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
921 use this mixer if none was specified)
922 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
923 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
926 printf 'extern void '$i'_mix_init(struct mixer *); '
929 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
930 init functions of the supported mixers)
931 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
932 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
933 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
936 AC_MSG_WARN([no mixer support])
937 mixer_summary="para_fade: no"
939 ########################################################################### libao
940 OLD_CPPFLAGS="$CPPFLAGS"
941 OLD_LDFLAGS="$LDFLAGS"
945 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
946 [look for ao/ao.h also in dir])])
947 if test -n "$with_ao_headers"; then
948 ao_cppflags="-I$with_ao_headers"
949 CPPFLAGS="$CPPFLAGS $ao_cppflags"
951 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
952 [look for libao also in dir])])
953 if test -n "$with_ao_libs"; then
954 ao_libs="-L$with_ao_libs"
955 LDFLAGS="$LDFLAGS $ao_libs"
957 msg="no libao support for para_audiod/para_write"
958 AC_CHECK_HEADERS([ao/ao.h], [
961 AC_MSG_WARN([ao.h not found, $msg])
963 if test "$have_ao" = "yes"; then
964 AC_CHECK_LIB([ao], [ao_initialize], [], [
966 AC_MSG_WARN([ao lib not found or not working, $msg])
969 if test "$have_ao" = "yes"; then
970 AC_CHECK_HEADERS([pthread.h], [
973 AC_MSG_WARN([pthread.h not found, $msg])
976 if test "$have_ao" = "yes"; then
977 AC_CHECK_LIB([pthread], [pthread_create], [], [
979 AC_MSG_WARN([pthread lib not found or not working, $msg])
982 if test "$have_ao" = "yes"; then
983 audiod_errlist_objs="$audiod_errlist_objs ao_write"
984 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
985 audiod_ldflags="$audiod_ldflags -lao -lpthread"
987 play_errlist_objs="$play_errlist_objs ao_write"
988 play_cmdline_objs="$play_cmdline_objs ao_write"
989 play_ldflags="$play_ldflags -lao -lpthread"
991 write_errlist_objs="$write_errlist_objs ao_write"
992 write_cmdline_objs="$write_cmdline_objs ao_write"
993 write_ldflags="$write_ldflags $ao_libs -lao -lpthread"
994 writers="$writers ao"
995 AC_SUBST(ao_cppflags)
998 CPPFLAGS="$OLD_CPPFLAGS"
999 LDFLAGS="$OLD_LDFLAGS"
1001 ############################################################# readline
1002 OLD_CPPFLAGS="$CPPFLAGS"
1003 OLD_LDFLAGS="$LDFLAGS"
1007 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
1008 [look for libreadline header files also in dir])])
1009 if test -n "$with_readline_headers"; then
1010 readline_cppflags="-I$with_readline_headers"
1011 CPPFLAGS="$CPPFLAGS $readline_cppflags"
1014 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
1015 [look for readline library also in dir])])
1016 if test -n "$with_readline_libs"; then
1017 readline_libs="-L$with_readline_libs"
1018 LDFLAGS="$LDFLAGS $readline_libs"
1020 msg="no interactive cli support"
1021 AC_CHECK_HEADERS([readline/readline.h], [
1024 AC_MSG_WARN([readline/readline.h not found, $msg])
1027 if test "$have_curses" != "yes"; then
1029 AC_MSG_WARN([interactive cli support depends on curses,])
1030 AC_MSG_WARN([but no curses lib was detected, $msg])
1033 if test "$have_readline" = "yes"; then
1034 readline_libs="$readline_libs -lreadline"
1035 AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
1036 if test "$have_readline" = "no"; then # try with -lcurses
1038 AC_MSG_NOTICE([trying again with -lcurses])
1039 unset ac_cv_search_rl_free_keymap 2> /dev/null
1040 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1042 readline_libs="$readline_libs -lcurses"
1045 if test "$have_readline" = "no"; then # try with -ltermcap
1047 AC_MSG_NOTICE([trying again with -ltermcap])
1048 unset ac_cv_search_rl_free_keymap 2> /dev/null
1049 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
1051 readline_libs="$readline_libs -ltermcap"
1056 if test "$have_readline" = "yes"; then
1057 client_errlist_objs="$client_errlist_objs interactive"
1058 client_ldflags="$client_ldflags $readline_libs"
1059 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
1060 audioc_ldflags="$audioc_ldflags $readline_libs"
1061 play_errlist_objs="$play_errlist_objs interactive"
1062 play_ldflags="$play_ldflags $readline_libs"
1063 AC_SUBST(readline_cppflags)
1064 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
1066 AC_MSG_WARN([libreadline not found or unusable])
1068 CPPFLAGS="$OLD_CPPFLAGS"
1069 LDFLAGS="$OLD_LDFLAGS"
1071 ############################################################# libsamplerate
1072 OLD_CPPFLAGS="$CPPFLAGS"
1073 OLD_LDFLAGS="$LDFLAGS"
1076 have_samplerate="yes"
1077 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
1078 [look for samplerate headers also in dir])])
1079 if test -n "$with_samplerate_headers"; then
1080 samplerate_cppflags="-I$with_samplerate_headers"
1081 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
1083 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
1084 [look for samplerate libs also in dir])])
1085 if test -n "$with_samplerate_libs"; then
1086 samplerate_libs="-L$with_samplerate_libs"
1087 LDFLAGS="$LDFLAGS $samplerate_libs"
1090 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
1091 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
1093 if test "$have_samplerate" = "yes"; then
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 filter_ldflags="$filter_ldflags $samplerate_libs -lsamplerate"
1101 audiod_ldflags="$audiod_ldflags $samplerate_libs -lsamplerate"
1102 play_ldflags="$play_ldflags $samplerate_libs -lsamplerate"
1103 filters="$filters resample"
1104 AC_SUBST(samplerate_cppflags)
1106 AC_MSG_WARN([no resample support in para_audiod/para_filter])
1108 CPPFLAGS="$OLD_CPPFLAGS"
1109 LDFLAGS="$OLD_LDFLAGS"
1111 ######################################################################### server
1112 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
1113 -a "$have_osl" = "yes" ; then
1116 executables="$executables server"
1117 server_cmdline_objs="server"
1118 server_errlist_objs="$server_errlist_objs
1157 server_ldflags="$server_ldflags $osl_libs -losl"
1161 ############################################################# client
1162 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1164 executables="$executables client"
1165 client_cmdline_objs="client"
1166 client_errlist_objs="$client_errlist_objs
1185 ############################################################# audiod
1186 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1188 executables="$executables audiod"
1189 audiod_cmdline_objs="$audiod_cmdline_objs
1200 audiod_errlist_objs="$audiod_errlist_objs
1237 audiod_ldflags="$audiod_ldflags -lm"
1238 audiod_audio_formats="$audiod_audio_formats wma"
1242 ############################################################# error2.h
1243 AC_MSG_NOTICE(creating error2.h)
1245 # these are always built
1248 $filter_errlist_objs
1249 $audioc_errlist_objs
1255 # optional executables
1256 if test "$build_server" = "yes"; then
1257 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1259 if test "$build_gui" = "yes"; then
1260 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1262 if test "$build_fade" = "yes"; then
1263 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1265 if test "$build_client" = "yes"; then
1266 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1268 if test "$build_audiod" = "yes"; then
1269 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1272 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1274 for i in $executables; do
1276 eval echo \$${i}_errlist_objs
1277 done | ./error2.pl > error2.h
1278 for obj in $all_errlist_objs; do
1279 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1281 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1282 [enum {$SS NUM_SS}],
1283 [list of all objects that use the paraslash error facility]
1286 ################################################################## status items
1288 status_items="basename status num_played mtime bitrate frequency file_size
1289 status_flags format score techinfo afs_mode
1290 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1291 offset seconds_total stream_start current_time audiod_uptime image_id
1292 lyrics_id duration directory lyrics_name image_name path hash channels
1293 last_played num_chunks chunk_time amplification artist title year album
1297 for i in $status_items; do
1298 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1300 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1301 [enum of all status items])
1304 for i in $status_items; do
1305 result="$result \"$i\", "
1307 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1308 [char * array of all status items])
1310 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1311 [formats supported by para_server and para_afh])
1313 AC_SUBST(executables)
1315 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1316 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1317 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
1318 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
1319 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1320 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
1321 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1322 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1323 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1324 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1326 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1327 AC_SUBST(recv_ldflags, $recv_ldflags)
1328 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1329 errors used by para_recv)
1331 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1332 AC_SUBST(filter_ldflags, $filter_ldflags)
1333 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1334 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1336 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1337 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1338 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1339 errors used by para_audiod)
1341 AC_SUBST(server_objs, add_dot_o($server_objs))
1342 AC_SUBST(server_ldflags, $server_ldflags)
1343 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1344 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1346 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1347 AC_SUBST(afh_ldflags, $afh_ldflags)
1348 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1349 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1351 AC_SUBST(write_objs, add_dot_o($write_objs))
1352 AC_SUBST(write_ldflags, $write_ldflags)
1353 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1354 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1356 AC_SUBST(client_objs, add_dot_o($client_objs))
1357 AC_SUBST(client_ldflags, $client_ldflags)
1358 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1359 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1361 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1362 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1363 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1364 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1366 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1367 AC_SUBST(gui_ldflags, $gui_ldflags)
1368 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1369 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1371 AC_SUBST(play_objs, add_dot_o($play_objs))
1372 AC_SUBST(play_ldflags, $play_ldflags)
1373 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1374 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1376 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1377 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1378 enum of supported filters)
1379 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1380 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1381 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1382 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1384 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1385 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1386 enum of supported writers)
1387 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1388 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1389 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1390 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1391 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1392 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1393 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1395 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1396 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1397 enum of audio formats supported by audiod)
1398 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1399 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1403 paraslash configuration:
1404 ~~~~~~~~~~~~~~~~~~~~~~~~
1405 unix socket credentials: $have_ucred
1406 readline (interactive CLIs): $have_readline
1407 audio formats handlers: $audio_format_handlers
1408 id3 version2 support: $have_libid3tag
1413 para_server: $build_server
1414 para_gui: $build_gui
1415 para_fade: $build_fade
1416 para_client: $build_client
1417 para_audiod: $build_audiod