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"
95 audioc_cmdline_objs="audioc"
126 default_writer="FILE_WRITE"
172 ################################################################## clock_gettime
174 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
175 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
177 if test -n "$clock_gettime_lib"; then
178 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
179 define to 1 if clock_gettime() is supported])
181 if test "$clock_gettime_lib" = "rt"; then
182 AC_SUBST(clock_gettime_ldflags, -lrt)
184 ########################################################################### osl
186 OLD_CPPFLAGS="$CPPFLAGS"
187 OLD_LDFLAGS="$LDFLAGS"
189 AC_ARG_WITH(osl_headers, [AS_HELP_STRING(--with-osl-headers=dir,
190 [look for osl.h also in dir])])
191 if test -n "$with_osl_headers"; then
192 osl_cppflags="-I$with_osl_headers"
193 CPPFLAGS="$CPPFLAGS $osl_cppflags"
195 AC_ARG_WITH(osl_libs, [AS_HELP_STRING(--with-osl-libs=dir,
196 [look for libosl also in dir])])
197 if test -n "$with_osl_libs"; then
198 osl_libs="-L$with_osl_libs"
199 LDFLAGS="$LDFLAGS $osl_libs"
202 AC_CHECK_HEADER(osl.h, [], have_osl=no)
203 AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no)
204 if test "$have_osl" = "yes"; then
205 AC_SUBST(osl_cppflags)
206 osl_ldflags="$osl_libs -losl"
207 AC_SUBST(osl_ldflags)
209 AC_MSG_WARN([libosl not found, can not build para_server.
211 http://systemlinux.org/~maan/osl
213 git clone git://git.tuebingen.mpg.de/osl
216 CPPFLAGS="$OLD_CPPFLAGS"
217 LDFLAGS="$OLD_LDFLAGS"
219 ########################################################################### crypto
220 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
221 Force using crypto library "lib". This package requires either
222 openssl or libgcrypt being installed. Possible values for "lib"
223 are thus "openssl" and "gcrypt". If this option is not given,
224 openssl is tried first. If openssl was not found, gcrypt is
227 case "$enable_cryptolib" in
228 "openssl") check_openssl="yes"; check_gcrypt="no";;
229 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
230 "") check_openssl="yes"; check_gcrypt="yes";;
231 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
233 ###################################################################### openssl
234 if test "$check_openssl" = "yes"; then
235 OLD_CPPFLAGS="$CPPFLAGS"
236 OLD_LDFLAGS="$LDFLAGS"
239 AC_ARG_WITH(openssl_headers, [AS_HELP_STRING(--with-openssl-headers=dir,
240 [look for openssl headers also in dir])])
241 if test -n "$with_openssl_headers"; then
242 openssl_cppflags="-I$with_openssl_headers"
243 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
245 AC_ARG_WITH(openssl_libs, [AS_HELP_STRING(--with-openssl-libs=dir,
246 [look for openssl libraries also in dir])])
247 if test -n "$with_openssl_libs"; then
248 openssl_libs="-L$with_openssl_libs"
249 LDFLAGS="$LDFLAGS $openssl_libs"
251 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
252 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
253 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
254 # try harder: openssl is sometimes installed in /usr/local/ssl
255 openssl_cppflags="-I/usr/local/ssl/include"
256 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
257 openssl_libs="-L/usr/local/ssl/lib"
258 LDFLAGS="$LDFLAGS $openssl_libs"
260 unset ac_cv_header_openssl_ssl_h 2> /dev/null
261 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
262 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
263 if test "$have_openssl" = "yes"; then
264 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
267 if test "$have_openssl" = "yes"; then
268 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
269 AC_SUBST(openssl_cppflags)
270 openssl_ldflags="$openssl_libs -lssl -lcrypto"
271 AC_SUBST(openssl_ldflags)
273 server_errlist_objs="$server_errlist_objs crypt"
274 client_errlist_objs="$client_errlist_objs crypt"
275 audiod_errlist_objs="$audiod_errlist_objs crypt"
279 AC_MSG_WARN([openssl libraries not found])
281 CPPFLAGS="$OLD_CPPFLAGS"
282 LDFLAGS="$OLD_LDFLAGS"
287 ########################################################################### gcrypt
288 if test "$check_gcrypt" = "yes"; then
289 OLD_CPPFLAGS="$CPPFLAGS"
290 OLD_LDFLAGS="$LDFLAGS"
293 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
294 [look for gcrypt headers also in dir])])
295 if test -n "$with_gcrypt_headers"; then
296 gcrypt_cppflags="-I$with_gcrypt_headers"
297 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
299 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
300 [look for libgcrypt also in dir])])
301 if test -n "$with_gcrypt_libs"; then
302 gcrypt_libs="-L$with_gcrypt_libs"
303 LDFLAGS="$LDFLAGS $gcrypt_libs"
305 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
306 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
307 if test "$have_gcrypt" = "yes"; then
308 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
309 AC_SUBST(gcrypt_cppflags)
310 gcrypt_ldflags="$gcrypt_libs -lgcrypt"
311 AC_SUBST(gcrypt_ldflags)
313 server_errlist_objs="$server_errlist_objs gcrypt"
314 client_errlist_objs="$client_errlist_objs gcrypt"
315 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
317 AC_MSG_WARN([gcrypt library not found])
319 CPPFLAGS="$OLD_CPPFLAGS"
320 LDFLAGS="$OLD_LDFLAGS"
325 ########################################################################### libsocket
326 AC_CHECK_LIB([c], [socket],
328 [socket_ldflags="-lsocket"]
330 AC_SUBST(socket_ldflags)
331 ########################################################################### libnsl
332 AC_CHECK_LIB([c], [gethostbyname],
334 [nsl_ldflags="-lnsl"]
336 AC_SUBST(nsl_ldflags)
337 ########################################################################### ucred
338 AC_MSG_CHECKING(for struct ucred)
339 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
341 #include <sys/types.h>
342 #include <sys/socket.h>
344 struct ucred sucred; sucred.pid=0;
345 ]])],[have_ucred=yes],[have_ucred=no])
346 AC_MSG_RESULT($have_ucred)
347 if test ${have_ucred} = yes; then
348 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
350 ########################################################################### gengetopt
351 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
353 [gengetopt_args_info_description],
354 [ggo_descriptions_declared=yes],
355 [ggo_descriptions_declared=no],
356 [#include "conftest-ggo.h"]
358 AC_SUBST(ggo_descriptions_declared)
359 ########################################################################### curses
361 OLD_CPPFLAGS="$CPPFLAGS"
362 OLD_LDFLAGS="$LDFLAGS"
364 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
365 [look for curses.h also in dir])])
366 if test -n "$with_curses_headers"; then
367 curses_cppflags="-I$with_curses_headers"
368 CPPFLAGS="$CPPFLAGS $curses_cppflags"
370 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
371 [look for libcurses also in dir])])
372 if test -n "$with_curses_libs"; then
373 curses_libs="-L$with_curses_libs"
374 LDFLAGS="$LDFLAGS $curses_libs"
376 AC_CHECK_HEADER(curses.h, [], [
379 curses_ldflags="$curses_libs"
380 AC_CHECK_LIB([ncursesw], [initscr],
381 [curses_ldflags="$curses_libs -lncursesw"], [
382 AC_CHECK_LIB([curses], [initscr],
383 [curses_ldflags="$curses_libs -lcurses"],
388 AC_SUBST(curses_cppflags)
389 AC_SUBST(curses_ldflags)
390 CPPFLAGS="$OLD_CPPFLAGS"
391 LDFLAGS="$OLD_LDFLAGS"
393 ########################################################################### ip_mreqn
394 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
395 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
401 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
402 AC_MSG_RESULT($have_ip_mreqn)
403 if test ${have_ip_mreqn} = yes; then
404 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
406 ########################################################################### osx
408 AC_MSG_CHECKING(for CoreAudio (MacOs))
409 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
410 #include <CoreAudio/CoreAudio.h>
413 ]])],[have_core_audio=yes],[have_core_audio=no])
414 AC_MSG_RESULT($have_core_audio)
415 if test ${have_core_audio} = yes; then
416 f1="-framework CoreAudio"
417 f2="-framework AudioToolbox"
418 f3="-framework AudioUnit"
419 f4="-framework CoreServices"
420 core_audio_ldflags="$f1 $f2 $f3 $f4"
421 AC_SUBST(core_audio_ldflags)
423 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
424 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
426 play_errlist_objs="$play_errlist_objs osx_write ipc"
427 play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
429 write_errlist_objs="$write_errlist_objs osx_write ipc"
430 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
431 writers="$writers osx"
432 default_writer="OSX_WRITE"
433 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
435 ####################################################### ogg/vorbis/speex/opus
437 OLD_CPPFLAGS="$CPPFLAGS"
438 OLD_LDFLAGS="$LDFLAGS"
440 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
441 [look for ogg headers also in dir])])
442 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
443 [look for ogg libs also in dir])])
444 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
445 [look for vorbis headers also in dir])])
446 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
447 [look for vorbis libs also in dir])])
448 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
449 [look for speex headers also in dir])])
450 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
451 [look for speex libs also in dir])])
452 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
453 [look for opus headers also in dir])])
454 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
455 [look for opus libs also in dir])])
457 if test -n "$with_ogg_headers"; then
458 ogg_cppflags="-I$with_ogg_headers"
459 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
461 if test -n "$with_ogg_libs"; then
462 ogg_libs="-L$with_ogg_libs"
463 LDFLAGS="$LDFLAGS $ogg_libs"
465 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
466 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
471 if test "$have_ogg" = "yes"; then
473 if test -n "$with_vorbis_headers"; then
474 vorbis_cppflags="-I$with_vorbis_headers"
475 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
477 if test -n "$with_vorbis_libs"; then
478 vorbis_libs="-L$with_vorbis_libs"
479 LDFLAGS="$LDFLAGS $vorbis_libs"
481 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
482 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
485 if test -n "$with_speex_headers"; then
486 speex_cppflags="-I$with_speex_headers"
487 CPPFLAGS="$CPPFLAGS $speex_cppflags"
489 if test -n "$with_speex_libs"; then
490 speex_libs="-L$with_speex_libs"
491 LDFLAGS="$LDFLAGS $speex_libs"
493 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
494 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
497 if test -n "$with_opus_headers"; then
498 opus_cppflags="-I$with_opus_headers"
499 CPPFLAGS="$CPPFLAGS $opus_cppflags"
501 if test -n "$with_opus_libs"; then
502 opus_libs="-L$with_opus_libs"
503 LDFLAGS="$LDFLAGS $opus_libs"
505 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
506 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
508 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
514 msg="support in para_server/para_filter/para_afh"
515 if test "$have_vorbis" = "yes" || \
516 test "$have_speex" = "yes" || \
517 test "$have_opus" = "yes"; then
518 AC_SUBST(ogg_cppflags)
519 ogg_ldflags="$ogg_libs -logg"
520 if test "$OSTYPE" = "Darwin"; then
521 ogg_ldflags="-Wl,-bind_at_load $ogg_ldflags"
523 AC_SUBST(ogg_ldflags)
524 server_errlist_objs="$server_errlist_objs ogg_afh_common"
525 play_errlist_objs="$play_errlist_objs ogg_afh_common"
527 if test "$have_vorbis" = "yes"; then
528 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
529 vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile"
530 AC_SUBST(vorbis_ldflags)
532 server_errlist_objs="$server_errlist_objs ogg_afh"
533 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
534 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
536 audiod_audio_formats="$audiod_audio_formats ogg"
537 audio_format_handlers="$audio_format_handlers ogg"
539 if test "$have_speex" = "yes"; then
540 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
541 AC_SUBST(speex_cppflags)
542 speex_ldflags="$speex_libs -lspeex"
543 AC_SUBST(speex_ldflags)
546 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
547 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
548 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
550 audiod_audio_formats="$audiod_audio_formats spx"
551 audio_format_handlers="$audio_format_handlers spx"
553 AC_MSG_WARN([no ogg/speex $msg])
555 if test "$have_opus" = "yes"; then
556 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
557 AC_SUBST(opus_cppflags)
558 opus_ldflags="$opus_libs -lopus"
559 AC_SUBST(opus_ldflags)
562 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
563 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
564 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
566 audiod_audio_formats="$audiod_audio_formats opus"
567 audio_format_handlers="$audio_format_handlers opus"
569 AC_MSG_WARN([no ogg/opus $msg])
571 CPPFLAGS="$OLD_CPPFLAGS"
572 LDFLAGS="$OLD_LDFLAGS"
574 ########################################################################### faad
576 OLD_CPPFLAGS="$CPPFLAGS"
577 OLD_LDFLAGS="$LDFLAGS"
579 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
580 [look for neaacdec.h also in dir])])
581 if test -n "$with_faad_headers"; then
582 faad_cppflags="-I$with_faad_headers"
583 CPPFLAGS="$CPPFLAGS $faad_cppflags"
585 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
586 [look for libfaad also in dir])])
587 if test -n "$with_faad_libs"; then
588 faad_libs="-L$with_faad_libs"
589 LDFLAGS="$LDFLAGS $faad_libs"
591 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
592 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
593 if test "$have_faad" = "yes"; then
594 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
595 AC_SUBST(faad_cppflags)
596 faad_ldflags="$faad_libs -lfaad"
597 AC_SUBST(faad_ldflags)
599 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
600 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
601 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
603 audiod_audio_formats="$audiod_audio_formats aac"
604 audio_format_handlers="$audio_format_handlers aac"
606 CPPFLAGS="$OLD_CPPFLAGS"
607 LDFLAGS="$OLD_LDFLAGS"
609 ########################################################################### mad
611 OLD_CPPFLAGS="$CPPFLAGS"
612 OLD_LDFLAGS="$LDFLAGS"
615 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
616 [look for mad.h also in dir])])
617 if test -n "$with_mad_headers"; then
618 mad_cppflags="-I$with_mad_headers"
619 CPPFLAGS="$CPPFLAGS $mad_cppflags"
621 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
622 [look for libmad also in dir])])
623 if test -n "$with_mad_libs"; then
624 mad_libs="-L$with_mad_libs"
625 LDFLAGS="$LDFLAGS $mad_libs"
627 AC_CHECK_HEADERS([mad.h], [], [
630 AC_CHECK_LIB([mad], [mad_stream_init], [], [
633 if test "$have_mad" = "yes"; then
634 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
635 AC_SUBST(mad_cppflags)
636 mad_ldflags="$mad_libs -lmad"
637 AC_SUBST(mad_ldflags)
638 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
639 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
640 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
641 play_errlist_objs="$play_errlist_objs mp3dec_filter"
642 audiod_audio_formats="$audiod_audio_formats mp3"
644 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
646 CPPFLAGS="$OLD_CPPFLAGS"
647 LDFLAGS="$OLD_LDFLAGS"
649 ###################################################################### libid3tag
650 OLD_CPPFLAGS="$CPPFLAGS"
651 OLD_LDFLAGS="$LDFLAGS"
655 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
656 [look for id3tag header files also in dir])])
657 if test -n "$with_id3tag_headers"; then
658 id3tag_cppflags="-I$with_id3tag_headers"
659 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
661 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
662 [look for id3tag libs also in dir])])
663 if test -n "$with_id3tag_libs"; then
664 id3tag_libs="-L$with_id3tag_libs"
665 LDFLAGS="$LDFLAGS $id3tag_libs"
668 AC_MSG_CHECKING(for libid3tag)
669 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
672 struct id3_tag t = {.flags = 0};
673 ]])],[],[have_libid3tag=no])
674 AC_MSG_RESULT($have_libid3tag)
676 if test ${have_libid3tag} = yes; then
677 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
678 AC_SUBST(id3tag_cppflags)
679 AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
681 CPPFLAGS="$OLD_CPPFLAGS"
682 LDFLAGS="$OLD_LDFLAGS"
684 ########################################################################### flac
685 OLD_CPPFLAGS="$CPPFLAGS"
686 OLD_LDFLAGS="$LDFLAGS"
690 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
691 [look for flac headers also in dir])])
692 if test -n "$with_flac_headers"; then
693 flac_cppflags="-I$with_flac_headers"
694 CPPFLAGS="$CPPFLAGS $flac_cppflags"
696 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
697 [look for flac libs also in dir])])
698 if test -n "$with_flac_libs"; then
699 flac_libs="-L$with_flac_libs"
700 LDFLAGS="$LDFLAGS $flac_libs"
702 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
703 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
704 if test "$have_flac" = "yes"; then
705 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
706 AC_SUBST(flac_cppflags)
707 flac_ldflags="$flac_libs -lFLAC"
708 AC_SUBST(flac_ldflags)
710 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
711 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
712 server_errlist_objs="$server_errlist_objs flac_afh"
713 audio_format_handlers="$audio_format_handlers flac"
714 audiod_audio_formats="$audiod_audio_formats flac"
716 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
718 CPPFLAGS="$OLD_CPPFLAGS"
719 LDFLAGS="$OLD_LDFLAGS"
721 ########################################################################### oss
722 OLD_CPPFLAGS="$CPPFLAGS"
723 OLD_LDFLAGS="$LDFLAGS"
727 msg="=> will not build oss writer"
729 AC_CHECK_HEADER(sys/soundcard.h, [
730 audiod_errlist_objs="$audiod_errlist_objs oss_write"
731 play_errlist_objs="$play_errlist_objs oss_write"
732 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
733 play_cmdline_objs="$play_cmdline_objs oss_write"
735 write_errlist_objs="$write_errlist_objs oss_write"
736 write_cmdline_objs="$write_cmdline_objs oss_write"
737 fade_errlist_objs="$fade_errlist_objs oss_mix"
739 writers="$writers oss"
740 default_writer="OSS_WRITE"
741 mixers="${mixers}oss "
742 default_mixer="OSS_MIX"
744 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
745 oss_ldflags="-lossaudio"
746 AC_SUBST(oss_ldflags)
752 AC_MSG_WARN([no sys/soundcard.h $msg])
755 CPPFLAGS="$OLD_CPPFLAGS"
756 LDFLAGS="$OLD_LDFLAGS"
759 ########################################################################### alsa
760 OLD_CPPFLAGS="$CPPFLAGS"
761 OLD_LDFLAGS="$LDFLAGS"
764 msg="=> no alsa support for para_audiod/para_write"
765 if test "$OSTYPE" != "Linux"; then
770 if test "$have_alsa" = "yes"; then
771 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
773 AC_MSG_WARN([no alsa/asoundlib $msg])
777 if test "$have_alsa" = "yes"; then
778 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
780 AC_MSG_WARN([no libasound $msg])
784 if test "$have_alsa" = "yes"; then
785 alsa_ldflags="-lasound"
786 AC_SUBST(alsa_ldflags)
787 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
788 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
789 play_errlist_objs="$play_errlist_objs alsa_write"
790 play_cmdline_objs="$play_cmdline_objs alsa_write"
792 write_errlist_objs="$write_errlist_objs alsa_write"
793 write_cmdline_objs="$write_cmdline_objs alsa_write"
794 fade_errlist_objs="$fade_errlist_objs alsa_mix"
796 writers="$writers alsa"
797 default_writer="ALSA_WRITE"
798 mixers="${mixers}alsa "
799 default_mixer="ALSA_MIX"
802 CPPFLAGS="$OLD_CPPFLAGS"
803 LDFLAGS="$OLD_LDFLAGS"
805 ########################################################################### libao
806 OLD_CPPFLAGS="$CPPFLAGS"
807 OLD_LDFLAGS="$LDFLAGS"
811 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
812 [look for ao/ao.h also in dir])])
813 if test -n "$with_ao_headers"; then
814 ao_cppflags="-I$with_ao_headers"
815 CPPFLAGS="$CPPFLAGS $ao_cppflags"
817 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
818 [look for libao also in dir])])
819 if test -n "$with_ao_libs"; then
820 ao_libs="-L$with_ao_libs"
821 LDFLAGS="$LDFLAGS $ao_libs"
823 msg="no libao support for para_audiod/para_write"
824 AC_CHECK_HEADERS([ao/ao.h], [
827 AC_MSG_WARN([ao.h not found, $msg])
829 if test "$have_ao" = "yes"; then
830 AC_CHECK_LIB([ao], [ao_initialize], [], [
832 AC_MSG_WARN([ao lib not found or not working, $msg])
835 if test "$have_ao" = "yes"; then
836 AC_CHECK_HEADERS([pthread.h], [
839 AC_MSG_WARN([pthread.h not found, $msg])
842 if test "$have_ao" = "yes"; then
843 AC_CHECK_LIB([pthread], [pthread_create], [], [
845 AC_MSG_WARN([pthread lib not found or not working, $msg])
848 if test "$have_ao" = "yes"; then
849 AC_SUBST(ao_cppflags)
850 ao_ldflags="$ao_libs -lao -lpthread"
853 audiod_errlist_objs="$audiod_errlist_objs ao_write"
854 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
856 play_errlist_objs="$play_errlist_objs ao_write"
857 play_cmdline_objs="$play_cmdline_objs ao_write"
859 write_errlist_objs="$write_errlist_objs ao_write"
860 write_cmdline_objs="$write_cmdline_objs ao_write"
861 writers="$writers ao"
864 CPPFLAGS="$OLD_CPPFLAGS"
865 LDFLAGS="$OLD_LDFLAGS"
867 ############################################################# readline
868 OLD_CPPFLAGS="$CPPFLAGS"
869 OLD_LDFLAGS="$LDFLAGS"
873 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
874 [look for libreadline header files also in dir])])
875 if test -n "$with_readline_headers"; then
876 readline_cppflags="-I$with_readline_headers"
877 CPPFLAGS="$CPPFLAGS $readline_cppflags"
880 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
881 [look for readline library also in dir])])
882 if test -n "$with_readline_libs"; then
883 readline_libs="-L$with_readline_libs"
884 LDFLAGS="$LDFLAGS $readline_libs"
886 msg="no interactive cli support"
887 AC_CHECK_HEADERS([readline/readline.h], [
890 AC_MSG_WARN([readline/readline.h not found, $msg])
893 if test "$have_curses" != "yes"; then
895 AC_MSG_WARN([interactive cli support depends on curses,])
896 AC_MSG_WARN([but no curses lib was detected, $msg])
899 if test "$have_readline" = "yes"; then
900 readline_ldflags="$readline_libs -lreadline"
901 AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
902 if test "$have_readline" = "no"; then # try with -lcurses
904 AC_MSG_NOTICE([trying again with -lcurses])
905 unset ac_cv_search_rl_free_keymap 2> /dev/null
906 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
908 readline_ldflags="$readline_ldflags -lcurses"
911 if test "$have_readline" = "no"; then # try with -ltermcap
913 AC_MSG_NOTICE([trying again with -ltermcap])
914 unset ac_cv_search_rl_free_keymap 2> /dev/null
915 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
917 readline_ldflags="$readline_ldflags -ltermcap"
922 if test "$have_readline" = "yes"; then
923 AC_SUBST(readline_cppflags)
924 AC_SUBST(readline_ldflags)
925 client_errlist_objs="$client_errlist_objs interactive"
926 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
927 play_errlist_objs="$play_errlist_objs interactive"
928 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
930 AC_MSG_WARN([libreadline not found or unusable])
932 CPPFLAGS="$OLD_CPPFLAGS"
933 LDFLAGS="$OLD_LDFLAGS"
935 ############################################################# libsamplerate
936 OLD_CPPFLAGS="$CPPFLAGS"
937 OLD_LDFLAGS="$LDFLAGS"
940 have_samplerate="yes"
941 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
942 [look for samplerate headers also in dir])])
943 if test -n "$with_samplerate_headers"; then
944 samplerate_cppflags="-I$with_samplerate_headers"
945 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
947 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
948 [look for samplerate libs also in dir])])
949 if test -n "$with_samplerate_libs"; then
950 samplerate_libs="-L$with_samplerate_libs"
951 LDFLAGS="$LDFLAGS $samplerate_libs"
954 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
955 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
957 if test "$have_samplerate" = "yes"; then
958 AC_SUBST(samplerate_cppflags)
959 samplerate_ldflags="$samplerate_libs -lsamplerate"
960 AC_SUBST(samplerate_ldflags)
962 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
963 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
964 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
965 play_cmdline_objs="$play_cmdline_objs resample_filter"
967 AC_MSG_WARN([no resample support in para_audiod/para_filter])
969 CPPFLAGS="$OLD_CPPFLAGS"
970 LDFLAGS="$OLD_LDFLAGS"
972 ######################################################################### server
973 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
974 -a "$have_osl" = "yes" ; then
977 executables="$executables server"
978 server_cmdline_objs="server"
979 server_errlist_objs="$server_errlist_objs
1021 ############################################################# client
1022 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1024 executables="$executables client"
1025 client_cmdline_objs="client"
1026 client_errlist_objs="$client_errlist_objs
1045 ############################################################# audiod
1046 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
1048 executables="$executables audiod"
1049 audiod_cmdline_objs="$audiod_cmdline_objs
1060 audiod_errlist_objs="$audiod_errlist_objs
1097 audiod_ldflags="$audiod_ldflags -lm"
1098 audiod_audio_formats="$audiod_audio_formats wma"
1102 ########################################################################### fade
1103 if test -n "$mixers"; then
1105 executables="$executables fade"
1106 fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
1107 fade_cmdline_objs="fade"
1108 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
1109 AC_SUBST(fade_objs, add_dot_o($fade_objs))
1110 AC_SUBST(fade_ldflags, $fade_ldflags)
1111 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
1112 objlist_to_errlist($fade_errlist_objs),
1113 errors used by para_fade)
1115 for i in $mixers; do
1116 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
1119 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
1120 enum of supported mixers)
1121 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
1122 use this mixer if none was specified)
1123 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
1124 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
1126 for i in $mixers; do
1127 printf 'extern void '$i'_mix_init(struct mixer *); '
1130 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
1131 init functions of the supported mixers)
1132 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
1133 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
1134 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
1137 AC_MSG_WARN([no mixer support])
1138 mixer_summary="para_fade: no"
1140 ########################################################################### gui
1141 if test "$have_curses" = "yes"; then
1143 executables="$executables gui"
1144 gui_cmdline_objs="gui"
1158 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1161 AC_MSG_WARN([no curses lib, cannot build para_gui])
1163 ######################################################################## filter
1172 filter_errlist_objs="
1196 filter_cmdline_objs="
1203 if test "$have_vorbis" = "yes"; then
1204 filters="$filters oggdec"
1205 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
1207 if test "$have_speex" = "yes"; then
1208 filters="$filters spxdec"
1209 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
1211 if test "$have_opus" = "yes"; then
1212 filters="$filters opusdec"
1213 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
1215 if test "$have_faad" = "yes"; then
1216 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
1217 filters="$filters aacdec"
1219 if test "$have_mad" = "yes"; then
1220 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
1221 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
1222 filters="$filters mp3dec"
1224 if test "$have_flac" = "yes"; then
1225 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
1226 filters="$filters flacdec"
1228 if test "$have_samplerate" = "yes"; then
1229 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1230 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
1231 filters="$filters resample"
1233 ########################################################################## recv
1263 if test "$have_vorbis" = "yes" || \
1264 test "$have_speex" = "yes" || \
1265 test "$have_opus" = "yes"; then
1266 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
1268 if test "$have_vorbis" = "yes"; then
1269 recv_errlist_objs="$recv_errlist_objs ogg_afh"
1271 if test "$have_speex" = "yes"; then
1272 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
1274 if test "$have_opus" = "yes"; then
1275 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
1277 if test "$have_faad" = "yes"; then
1278 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
1280 if test "$have_flac" = "yes"; then
1281 recv_errlist_objs="$recv_errlist_objs flac_afh"
1283 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1284 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1285 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1286 errors used by para_recv)
1287 ########################################################################### afh
1288 afh_cmdline_objs="afh"
1301 if test "$have_vorbis" = "yes" || \
1302 test "$have_speex" = "yes" || \
1303 test "$have_opus" = "yes"; then
1304 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
1306 if test "$have_vorbis" = "yes"; then
1307 afh_errlist_objs="$afh_errlist_objs ogg_afh"
1309 if test "$have_speex" = "yes"; then
1310 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
1312 if test "$have_opus" = "yes"; then
1313 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
1315 if test "$have_faad" = "yes"; then
1316 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
1318 if test "$have_flac" = "yes"; then
1319 afh_errlist_objs="$afh_errlist_objs flac_afh"
1322 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1324 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1325 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1326 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1327 ############################################################# error2.h
1328 # these are always built
1331 $filter_errlist_objs
1332 $audioc_errlist_objs
1338 # optional executables
1339 if test "$build_server" = "yes"; then
1340 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1342 if test "$build_gui" = "yes"; then
1343 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1345 if test "$build_fade" = "yes"; then
1346 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1348 if test "$build_client" = "yes"; then
1349 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1351 if test "$build_audiod" = "yes"; then
1352 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1355 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1357 object_executable_matrix=
1358 for i in $executables; do
1359 eval objs=\$${i}_errlist_objs
1360 object_executable_matrix="$object_executable_matrix $i: $objs"
1362 # use echo to replace newlines by space
1363 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1365 for obj in $all_errlist_objs; do
1366 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1368 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1369 [enum {$SS NUM_SS}],
1370 [list of all objects that use the paraslash error facility]
1372 ################################################################## status items
1374 status_items="basename status num_played mtime bitrate frequency file_size
1375 status_flags format score techinfo afs_mode
1376 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1377 offset seconds_total stream_start current_time audiod_uptime image_id
1378 lyrics_id duration directory lyrics_name image_name path hash channels
1379 last_played num_chunks chunk_time amplification artist title year album
1383 for i in $status_items; do
1384 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1386 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1387 [enum of all status items])
1390 for i in $status_items; do
1391 result="$result \"$i\", "
1393 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1394 [char * array of all status items])
1396 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1397 [formats supported by para_server and para_afh])
1399 AC_SUBST(executables)
1401 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1402 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
1403 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
1404 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1405 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
1406 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1407 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1408 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1410 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1411 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1412 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1414 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1415 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1416 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1417 errors used by para_audiod)
1419 AC_SUBST(server_objs, add_dot_o($server_objs))
1420 AC_SUBST(server_ldflags, $server_ldflags)
1421 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1422 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1424 AC_SUBST(write_objs, add_dot_o($write_objs))
1425 AC_SUBST(write_ldflags, $write_ldflags)
1426 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1427 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1429 AC_SUBST(client_objs, add_dot_o($client_objs))
1430 AC_SUBST(client_ldflags, $client_ldflags)
1431 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1432 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1434 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1435 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1436 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1437 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1439 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1440 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1441 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1443 AC_SUBST(play_objs, add_dot_o($play_objs))
1444 AC_SUBST(play_ldflags, $play_ldflags)
1445 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1446 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1448 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1449 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1450 enum of supported filters)
1451 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1452 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1453 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1454 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1456 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1457 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1458 enum of supported writers)
1459 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1460 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1461 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1462 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1463 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1464 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1465 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1467 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1468 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1469 enum of audio formats supported by audiod)
1470 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1471 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1475 paraslash configuration:
1476 ~~~~~~~~~~~~~~~~~~~~~~~~
1477 unix socket credentials: $have_ucred
1478 readline (interactive CLIs): $have_readline
1479 audio formats handlers: $audio_format_handlers
1480 id3 version2 support: $have_libid3tag
1481 filters: $(echo $filters)
1485 para_server: $build_server
1486 para_gui: $build_gui
1487 para_fade: $build_fade
1488 para_client: $build_client
1489 para_audiod: $build_audiod