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"
128 ################################################################## clock_gettime
130 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
131 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
133 if test -n "$clock_gettime_lib"; then
134 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
135 define to 1 if clock_gettime() is supported])
137 if test "$clock_gettime_lib" = "rt"; then
138 AC_SUBST(clock_gettime_ldflags, -lrt)
140 ########################################################################### osl
142 OLD_CPPFLAGS="$CPPFLAGS"
143 OLD_LDFLAGS="$LDFLAGS"
145 AC_ARG_WITH(osl_headers, [AS_HELP_STRING(--with-osl-headers=dir,
146 [look for osl.h also in dir])])
147 if test -n "$with_osl_headers"; then
148 osl_cppflags="-I$with_osl_headers"
149 CPPFLAGS="$CPPFLAGS $osl_cppflags"
151 AC_ARG_WITH(osl_libs, [AS_HELP_STRING(--with-osl-libs=dir,
152 [look for libosl also in dir])])
153 if test -n "$with_osl_libs"; then
154 osl_libs="-L$with_osl_libs"
155 LDFLAGS="$LDFLAGS $osl_libs"
158 AC_CHECK_HEADER(osl.h, [], have_osl=no)
159 AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no)
160 if test "$have_osl" = "yes"; then
161 AC_SUBST(osl_cppflags)
162 osl_ldflags="$osl_libs -losl"
163 AC_SUBST(osl_ldflags)
165 AC_MSG_WARN([libosl not found, can not build para_server.
167 http://systemlinux.org/~maan/osl
169 git clone git://git.tuebingen.mpg.de/osl
172 CPPFLAGS="$OLD_CPPFLAGS"
173 LDFLAGS="$OLD_LDFLAGS"
175 ########################################################################### crypto
176 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
177 Force using crypto library "lib". This package requires either
178 openssl or libgcrypt being installed. Possible values for "lib"
179 are thus "openssl" and "gcrypt". If this option is not given,
180 openssl is tried first. If openssl was not found, gcrypt is
183 case "$enable_cryptolib" in
184 "openssl") check_openssl="yes"; check_gcrypt="no";;
185 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
186 "") check_openssl="yes"; check_gcrypt="yes";;
187 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
189 ###################################################################### openssl
190 if test "$check_openssl" = "yes"; then
191 OLD_CPPFLAGS="$CPPFLAGS"
192 OLD_LDFLAGS="$LDFLAGS"
195 AC_ARG_WITH(openssl_headers, [AS_HELP_STRING(--with-openssl-headers=dir,
196 [look for openssl headers also in dir])])
197 if test -n "$with_openssl_headers"; then
198 openssl_cppflags="-I$with_openssl_headers"
199 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
201 AC_ARG_WITH(openssl_libs, [AS_HELP_STRING(--with-openssl-libs=dir,
202 [look for openssl libraries also in dir])])
203 if test -n "$with_openssl_libs"; then
204 openssl_libs="-L$with_openssl_libs"
205 LDFLAGS="$LDFLAGS $openssl_libs"
207 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
208 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
209 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
210 # try harder: openssl is sometimes installed in /usr/local/ssl
211 openssl_cppflags="-I/usr/local/ssl/include"
212 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
213 openssl_libs="-L/usr/local/ssl/lib"
214 LDFLAGS="$LDFLAGS $openssl_libs"
216 unset ac_cv_header_openssl_ssl_h 2> /dev/null
217 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
218 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
219 if test "$have_openssl" = "yes"; then
220 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
223 if test "$have_openssl" = "yes"; then
224 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
225 AC_SUBST(openssl_cppflags)
226 openssl_ldflags="$openssl_libs -lssl -lcrypto"
227 AC_SUBST(openssl_ldflags)
229 server_errlist_objs="$server_errlist_objs crypt"
230 client_errlist_objs="$client_errlist_objs crypt"
231 audiod_errlist_objs="$audiod_errlist_objs crypt"
235 AC_MSG_WARN([openssl libraries not found])
237 CPPFLAGS="$OLD_CPPFLAGS"
238 LDFLAGS="$OLD_LDFLAGS"
243 ########################################################################### gcrypt
244 if test "$check_gcrypt" = "yes"; then
245 OLD_CPPFLAGS="$CPPFLAGS"
246 OLD_LDFLAGS="$LDFLAGS"
249 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
250 [look for gcrypt headers also in dir])])
251 if test -n "$with_gcrypt_headers"; then
252 gcrypt_cppflags="-I$with_gcrypt_headers"
253 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
255 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
256 [look for libgcrypt also in dir])])
257 if test -n "$with_gcrypt_libs"; then
258 gcrypt_libs="-L$with_gcrypt_libs"
259 LDFLAGS="$LDFLAGS $gcrypt_libs"
261 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
262 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
263 if test "$have_gcrypt" = "yes"; then
264 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
265 AC_SUBST(gcrypt_cppflags)
266 gcrypt_ldflags="$gcrypt_libs -lgcrypt"
267 AC_SUBST(gcrypt_ldflags)
269 server_errlist_objs="$server_errlist_objs gcrypt"
270 client_errlist_objs="$client_errlist_objs gcrypt"
271 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
273 AC_MSG_WARN([gcrypt library not found])
275 CPPFLAGS="$OLD_CPPFLAGS"
276 LDFLAGS="$OLD_LDFLAGS"
281 ########################################################################### libsocket
282 AC_CHECK_LIB([c], [socket],
284 [socket_ldflags="-lsocket"]
286 AC_SUBST(socket_ldflags)
287 ########################################################################### libnsl
288 AC_CHECK_LIB([c], [gethostbyname],
290 [nsl_ldflags="-lnsl"]
292 AC_SUBST(nsl_ldflags)
293 ########################################################################### ucred
294 AC_MSG_CHECKING(for struct ucred)
295 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
297 #include <sys/types.h>
298 #include <sys/socket.h>
300 struct ucred sucred; sucred.pid=0;
301 ]])],[have_ucred=yes],[have_ucred=no])
302 AC_MSG_RESULT($have_ucred)
303 if test ${have_ucred} = yes; then
304 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
306 ########################################################################### gengetopt
307 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
309 [gengetopt_args_info_description],
310 [ggo_descriptions_declared=yes],
311 [ggo_descriptions_declared=no],
312 [#include "conftest-ggo.h"]
314 AC_SUBST(ggo_descriptions_declared)
315 ########################################################################### curses
317 OLD_CPPFLAGS="$CPPFLAGS"
318 OLD_LDFLAGS="$LDFLAGS"
320 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
321 [look for curses.h also in dir])])
322 if test -n "$with_curses_headers"; then
323 curses_cppflags="-I$with_curses_headers"
324 CPPFLAGS="$CPPFLAGS $curses_cppflags"
326 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
327 [look for libcurses also in dir])])
328 if test -n "$with_curses_libs"; then
329 curses_libs="-L$with_curses_libs"
330 LDFLAGS="$LDFLAGS $curses_libs"
332 AC_CHECK_HEADER(curses.h, [], [
335 curses_ldflags="$curses_libs"
336 AC_CHECK_LIB([ncursesw], [initscr],
337 [curses_ldflags="$curses_libs -lncursesw"], [
338 AC_CHECK_LIB([curses], [initscr],
339 [curses_ldflags="$curses_libs -lcurses"],
344 AC_SUBST(curses_cppflags)
345 AC_SUBST(curses_ldflags)
346 CPPFLAGS="$OLD_CPPFLAGS"
347 LDFLAGS="$OLD_LDFLAGS"
349 ########################################################################### ip_mreqn
350 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
351 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
357 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
358 AC_MSG_RESULT($have_ip_mreqn)
359 if test ${have_ip_mreqn} = yes; then
360 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
362 ########################################################################### osx
364 AC_MSG_CHECKING(for CoreAudio (MacOs))
365 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
366 #include <CoreAudio/CoreAudio.h>
369 ]])],[have_core_audio=yes],[have_core_audio=no])
370 AC_MSG_RESULT($have_core_audio)
371 if test ${have_core_audio} = yes; then
372 f1="-framework CoreAudio"
373 f2="-framework AudioToolbox"
374 f3="-framework AudioUnit"
375 f4="-framework CoreServices"
376 core_audio_ldflags="$f1 $f2 $f3 $f4"
377 AC_SUBST(core_audio_ldflags)
379 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
380 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
382 write_errlist_objs="$write_errlist_objs osx_write ipc"
383 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
384 writers="$writers osx"
385 default_writer="OSX_WRITE"
386 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
388 ####################################################### ogg/vorbis/speex/opus
390 OLD_CPPFLAGS="$CPPFLAGS"
391 OLD_LDFLAGS="$LDFLAGS"
393 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
394 [look for ogg headers also in dir])])
395 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
396 [look for ogg libs also in dir])])
397 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
398 [look for vorbis headers also in dir])])
399 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
400 [look for vorbis libs also in dir])])
401 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
402 [look for speex headers also in dir])])
403 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
404 [look for speex libs also in dir])])
405 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
406 [look for opus headers also in dir])])
407 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
408 [look for opus libs also in dir])])
410 if test -n "$with_ogg_headers"; then
411 ogg_cppflags="-I$with_ogg_headers"
412 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
414 if test -n "$with_ogg_libs"; then
415 ogg_libs="-L$with_ogg_libs"
416 LDFLAGS="$LDFLAGS $ogg_libs"
418 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
419 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
424 if test "$have_ogg" = "yes"; then
426 if test -n "$with_vorbis_headers"; then
427 vorbis_cppflags="-I$with_vorbis_headers"
428 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
430 if test -n "$with_vorbis_libs"; then
431 vorbis_libs="-L$with_vorbis_libs"
432 LDFLAGS="$LDFLAGS $vorbis_libs"
434 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
435 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
438 if test -n "$with_speex_headers"; then
439 speex_cppflags="-I$with_speex_headers"
440 CPPFLAGS="$CPPFLAGS $speex_cppflags"
442 if test -n "$with_speex_libs"; then
443 speex_libs="-L$with_speex_libs"
444 LDFLAGS="$LDFLAGS $speex_libs"
446 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
447 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
450 if test -n "$with_opus_headers"; then
451 opus_cppflags="-I$with_opus_headers"
452 CPPFLAGS="$CPPFLAGS $opus_cppflags"
454 if test -n "$with_opus_libs"; then
455 opus_libs="-L$with_opus_libs"
456 LDFLAGS="$LDFLAGS $opus_libs"
458 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
459 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
461 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
467 msg="support in para_server/para_filter/para_afh"
468 if test "$have_vorbis" = "yes" || \
469 test "$have_speex" = "yes" || \
470 test "$have_opus" = "yes"; then
471 AC_SUBST(ogg_cppflags)
472 ogg_ldflags="$ogg_libs -logg"
473 if test "$OSTYPE" = "Darwin"; then
474 ogg_ldflags="-Wl,-bind_at_load $ogg_ldflags"
476 AC_SUBST(ogg_ldflags)
477 server_errlist_objs="$server_errlist_objs ogg_afh_common"
479 if test "$have_vorbis" = "yes"; then
480 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
481 vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile"
482 AC_SUBST(vorbis_ldflags)
484 server_errlist_objs="$server_errlist_objs ogg_afh"
485 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
487 audiod_audio_formats="$audiod_audio_formats ogg"
488 audio_format_handlers="$audio_format_handlers ogg"
490 if test "$have_speex" = "yes"; then
491 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
492 AC_SUBST(speex_cppflags)
493 speex_ldflags="$speex_libs -lspeex"
494 AC_SUBST(speex_ldflags)
497 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
498 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
500 audiod_audio_formats="$audiod_audio_formats spx"
501 audio_format_handlers="$audio_format_handlers spx"
503 AC_MSG_WARN([no ogg/speex $msg])
505 if test "$have_opus" = "yes"; then
506 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
507 AC_SUBST(opus_cppflags)
508 opus_ldflags="$opus_libs -lopus"
509 AC_SUBST(opus_ldflags)
512 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
513 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
515 audiod_audio_formats="$audiod_audio_formats opus"
516 audio_format_handlers="$audio_format_handlers opus"
518 AC_MSG_WARN([no ogg/opus $msg])
520 CPPFLAGS="$OLD_CPPFLAGS"
521 LDFLAGS="$OLD_LDFLAGS"
523 ########################################################################### faad
525 OLD_CPPFLAGS="$CPPFLAGS"
526 OLD_LDFLAGS="$LDFLAGS"
528 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
529 [look for neaacdec.h also in dir])])
530 if test -n "$with_faad_headers"; then
531 faad_cppflags="-I$with_faad_headers"
532 CPPFLAGS="$CPPFLAGS $faad_cppflags"
534 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
535 [look for libfaad also in dir])])
536 if test -n "$with_faad_libs"; then
537 faad_libs="-L$with_faad_libs"
538 LDFLAGS="$LDFLAGS $faad_libs"
540 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
541 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
542 if test "$have_faad" = "yes"; then
543 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
544 AC_SUBST(faad_cppflags)
545 faad_ldflags="$faad_libs -lfaad"
546 AC_SUBST(faad_ldflags)
548 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
549 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
551 audiod_audio_formats="$audiod_audio_formats aac"
552 audio_format_handlers="$audio_format_handlers aac"
554 CPPFLAGS="$OLD_CPPFLAGS"
555 LDFLAGS="$OLD_LDFLAGS"
557 ########################################################################### mad
559 OLD_CPPFLAGS="$CPPFLAGS"
560 OLD_LDFLAGS="$LDFLAGS"
563 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
564 [look for mad.h also in dir])])
565 if test -n "$with_mad_headers"; then
566 mad_cppflags="-I$with_mad_headers"
567 CPPFLAGS="$CPPFLAGS $mad_cppflags"
569 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
570 [look for libmad also in dir])])
571 if test -n "$with_mad_libs"; then
572 mad_libs="-L$with_mad_libs"
573 LDFLAGS="$LDFLAGS $mad_libs"
575 AC_CHECK_HEADERS([mad.h], [], [
578 AC_CHECK_LIB([mad], [mad_stream_init], [], [
581 if test "$have_mad" = "yes"; then
582 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
583 AC_SUBST(mad_cppflags)
584 mad_ldflags="$mad_libs -lmad"
585 AC_SUBST(mad_ldflags)
586 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
587 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
588 audiod_audio_formats="$audiod_audio_formats mp3"
590 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
592 CPPFLAGS="$OLD_CPPFLAGS"
593 LDFLAGS="$OLD_LDFLAGS"
595 ###################################################################### libid3tag
596 OLD_CPPFLAGS="$CPPFLAGS"
597 OLD_LDFLAGS="$LDFLAGS"
601 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
602 [look for id3tag header files also in dir])])
603 if test -n "$with_id3tag_headers"; then
604 id3tag_cppflags="-I$with_id3tag_headers"
605 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
607 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
608 [look for id3tag libs also in dir])])
609 if test -n "$with_id3tag_libs"; then
610 id3tag_libs="-L$with_id3tag_libs"
611 LDFLAGS="$LDFLAGS $id3tag_libs"
614 AC_MSG_CHECKING(for libid3tag)
615 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
618 struct id3_tag t = {.flags = 0};
619 ]])],[],[have_libid3tag=no])
620 AC_MSG_RESULT($have_libid3tag)
622 if test ${have_libid3tag} = yes; then
623 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
624 AC_SUBST(id3tag_cppflags)
625 AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
627 CPPFLAGS="$OLD_CPPFLAGS"
628 LDFLAGS="$OLD_LDFLAGS"
630 ########################################################################### flac
631 OLD_CPPFLAGS="$CPPFLAGS"
632 OLD_LDFLAGS="$LDFLAGS"
636 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
637 [look for flac headers also in dir])])
638 if test -n "$with_flac_headers"; then
639 flac_cppflags="-I$with_flac_headers"
640 CPPFLAGS="$CPPFLAGS $flac_cppflags"
642 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
643 [look for flac libs also in dir])])
644 if test -n "$with_flac_libs"; then
645 flac_libs="-L$with_flac_libs"
646 LDFLAGS="$LDFLAGS $flac_libs"
648 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
649 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
650 if test "$have_flac" = "yes"; then
651 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
652 AC_SUBST(flac_cppflags)
653 flac_ldflags="$flac_libs -lFLAC"
654 AC_SUBST(flac_ldflags)
656 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
657 server_errlist_objs="$server_errlist_objs flac_afh"
658 audio_format_handlers="$audio_format_handlers flac"
659 audiod_audio_formats="$audiod_audio_formats flac"
661 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
663 CPPFLAGS="$OLD_CPPFLAGS"
664 LDFLAGS="$OLD_LDFLAGS"
666 ########################################################################### oss
667 OLD_CPPFLAGS="$CPPFLAGS"
668 OLD_LDFLAGS="$LDFLAGS"
672 msg="=> will not build oss writer"
674 AC_CHECK_HEADER(sys/soundcard.h, [
675 audiod_errlist_objs="$audiod_errlist_objs oss_write"
676 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
678 write_errlist_objs="$write_errlist_objs oss_write"
679 write_cmdline_objs="$write_cmdline_objs oss_write"
680 fade_errlist_objs="$fade_errlist_objs oss_mix"
682 writers="$writers oss"
683 default_writer="OSS_WRITE"
684 mixers="${mixers}oss "
685 default_mixer="OSS_MIX"
687 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
688 oss_ldflags="-lossaudio"
689 AC_SUBST(oss_ldflags)
695 AC_MSG_WARN([no sys/soundcard.h $msg])
698 CPPFLAGS="$OLD_CPPFLAGS"
699 LDFLAGS="$OLD_LDFLAGS"
702 ########################################################################### alsa
703 OLD_CPPFLAGS="$CPPFLAGS"
704 OLD_LDFLAGS="$LDFLAGS"
707 msg="=> no alsa support for para_audiod/para_write"
708 if test "$OSTYPE" != "Linux"; then
713 if test "$have_alsa" = "yes"; then
714 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
716 AC_MSG_WARN([no alsa/asoundlib $msg])
720 if test "$have_alsa" = "yes"; then
721 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
723 AC_MSG_WARN([no libasound $msg])
727 if test "$have_alsa" = "yes"; then
728 alsa_ldflags="-lasound"
729 AC_SUBST(alsa_ldflags)
730 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
731 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
733 write_errlist_objs="$write_errlist_objs alsa_write"
734 write_cmdline_objs="$write_cmdline_objs alsa_write"
735 fade_errlist_objs="$fade_errlist_objs alsa_mix"
737 writers="$writers alsa"
738 default_writer="ALSA_WRITE"
739 mixers="${mixers}alsa "
740 default_mixer="ALSA_MIX"
743 CPPFLAGS="$OLD_CPPFLAGS"
744 LDFLAGS="$OLD_LDFLAGS"
746 ########################################################################### libao
747 OLD_CPPFLAGS="$CPPFLAGS"
748 OLD_LDFLAGS="$LDFLAGS"
752 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
753 [look for ao/ao.h also in dir])])
754 if test -n "$with_ao_headers"; then
755 ao_cppflags="-I$with_ao_headers"
756 CPPFLAGS="$CPPFLAGS $ao_cppflags"
758 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
759 [look for libao also in dir])])
760 if test -n "$with_ao_libs"; then
761 ao_libs="-L$with_ao_libs"
762 LDFLAGS="$LDFLAGS $ao_libs"
764 msg="no libao support for para_audiod/para_write"
765 AC_CHECK_HEADERS([ao/ao.h], [
768 AC_MSG_WARN([ao.h not found, $msg])
770 if test "$have_ao" = "yes"; then
771 AC_CHECK_LIB([ao], [ao_initialize], [], [
773 AC_MSG_WARN([ao lib not found or not working, $msg])
776 if test "$have_ao" = "yes"; then
777 AC_CHECK_HEADERS([pthread.h], [
780 AC_MSG_WARN([pthread.h not found, $msg])
783 if test "$have_ao" = "yes"; then
784 AC_CHECK_LIB([pthread], [pthread_create], [], [
786 AC_MSG_WARN([pthread lib not found or not working, $msg])
789 if test "$have_ao" = "yes"; then
790 AC_SUBST(ao_cppflags)
791 ao_ldflags="$ao_libs -lao -lpthread"
794 audiod_errlist_objs="$audiod_errlist_objs ao_write"
795 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
797 write_errlist_objs="$write_errlist_objs ao_write"
798 write_cmdline_objs="$write_cmdline_objs ao_write"
799 writers="$writers ao"
802 CPPFLAGS="$OLD_CPPFLAGS"
803 LDFLAGS="$OLD_LDFLAGS"
805 ############################################################# readline
806 OLD_CPPFLAGS="$CPPFLAGS"
807 OLD_LDFLAGS="$LDFLAGS"
811 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
812 [look for libreadline header files also in dir])])
813 if test -n "$with_readline_headers"; then
814 readline_cppflags="-I$with_readline_headers"
815 CPPFLAGS="$CPPFLAGS $readline_cppflags"
818 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
819 [look for readline library also in dir])])
820 if test -n "$with_readline_libs"; then
821 readline_libs="-L$with_readline_libs"
822 LDFLAGS="$LDFLAGS $readline_libs"
824 msg="no interactive cli support"
825 AC_CHECK_HEADERS([readline/readline.h], [
828 AC_MSG_WARN([readline/readline.h not found, $msg])
831 if test "$have_curses" != "yes"; then
833 AC_MSG_WARN([interactive cli support depends on curses,])
834 AC_MSG_WARN([but no curses lib was detected, $msg])
837 if test "$have_readline" = "yes"; then
838 readline_ldflags="$readline_libs -lreadline"
839 AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
840 if test "$have_readline" = "no"; then # try with -lcurses
842 AC_MSG_NOTICE([trying again with -lcurses])
843 unset ac_cv_search_rl_free_keymap 2> /dev/null
844 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
846 readline_ldflags="$readline_ldflags -lcurses"
849 if test "$have_readline" = "no"; then # try with -ltermcap
851 AC_MSG_NOTICE([trying again with -ltermcap])
852 unset ac_cv_search_rl_free_keymap 2> /dev/null
853 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
855 readline_ldflags="$readline_ldflags -ltermcap"
860 if test "$have_readline" = "yes"; then
861 AC_SUBST(readline_cppflags)
862 AC_SUBST(readline_ldflags)
863 client_errlist_objs="$client_errlist_objs interactive"
864 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
865 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
867 AC_MSG_WARN([libreadline not found or unusable])
869 CPPFLAGS="$OLD_CPPFLAGS"
870 LDFLAGS="$OLD_LDFLAGS"
872 ############################################################# libsamplerate
873 OLD_CPPFLAGS="$CPPFLAGS"
874 OLD_LDFLAGS="$LDFLAGS"
877 have_samplerate="yes"
878 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
879 [look for samplerate headers also in dir])])
880 if test -n "$with_samplerate_headers"; then
881 samplerate_cppflags="-I$with_samplerate_headers"
882 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
884 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
885 [look for samplerate libs also in dir])])
886 if test -n "$with_samplerate_libs"; then
887 samplerate_libs="-L$with_samplerate_libs"
888 LDFLAGS="$LDFLAGS $samplerate_libs"
891 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
892 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
894 if test "$have_samplerate" = "yes"; then
895 AC_SUBST(samplerate_cppflags)
896 samplerate_ldflags="$samplerate_libs -lsamplerate"
897 AC_SUBST(samplerate_ldflags)
899 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
900 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
902 AC_MSG_WARN([no resample support in para_audiod/para_filter])
904 CPPFLAGS="$OLD_CPPFLAGS"
905 LDFLAGS="$OLD_LDFLAGS"
907 ######################################################################### server
908 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
909 -a "$have_osl" = "yes" ; then
912 executables="$executables server"
913 server_cmdline_objs="server"
914 server_errlist_objs="$server_errlist_objs
956 ############################################################# client
957 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
959 executables="$executables client"
960 client_cmdline_objs="client"
961 client_errlist_objs="$client_errlist_objs
980 ############################################################# audiod
981 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
983 executables="$executables audiod"
984 audiod_cmdline_objs="$audiod_cmdline_objs
995 audiod_errlist_objs="$audiod_errlist_objs
1032 audiod_ldflags="$audiod_ldflags -lm"
1033 audiod_audio_formats="$audiod_audio_formats wma"
1037 ########################################################################### fade
1038 if test -n "$mixers"; then
1040 executables="$executables fade"
1041 fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
1042 fade_cmdline_objs="fade"
1043 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
1044 AC_SUBST(fade_objs, add_dot_o($fade_objs))
1045 AC_SUBST(fade_ldflags, $fade_ldflags)
1046 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
1047 objlist_to_errlist($fade_errlist_objs),
1048 errors used by para_fade)
1050 for i in $mixers; do
1051 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
1054 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
1055 enum of supported mixers)
1056 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
1057 use this mixer if none was specified)
1058 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
1059 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
1061 for i in $mixers; do
1062 printf 'extern void '$i'_mix_init(struct mixer *); '
1065 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
1066 init functions of the supported mixers)
1067 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
1068 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
1069 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
1072 AC_MSG_WARN([no mixer support])
1073 mixer_summary="para_fade: no"
1075 ########################################################################### gui
1076 if test "$have_curses" = "yes"; then
1078 executables="$executables gui"
1079 gui_cmdline_objs="gui"
1093 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1096 AC_MSG_WARN([no curses lib, cannot build para_gui])
1098 ######################################################################## filter
1107 filter_errlist_objs="
1131 filter_cmdline_objs="
1138 if test "$have_vorbis" = "yes"; then
1139 filters="$filters oggdec"
1140 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
1142 if test "$have_speex" = "yes"; then
1143 filters="$filters spxdec"
1144 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
1146 if test "$have_opus" = "yes"; then
1147 filters="$filters opusdec"
1148 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
1150 if test "$have_faad" = "yes"; then
1151 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
1152 filters="$filters aacdec"
1154 if test "$have_mad" = "yes"; then
1155 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
1156 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
1157 filters="$filters mp3dec"
1159 if test "$have_flac" = "yes"; then
1160 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
1161 filters="$filters flacdec"
1163 if test "$have_samplerate" = "yes"; then
1164 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1165 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
1166 filters="$filters resample"
1168 ########################################################################## recv
1198 if test "$have_vorbis" = "yes" || \
1199 test "$have_speex" = "yes" || \
1200 test "$have_opus" = "yes"; then
1201 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
1203 if test "$have_vorbis" = "yes"; then
1204 recv_errlist_objs="$recv_errlist_objs ogg_afh"
1206 if test "$have_speex" = "yes"; then
1207 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
1209 if test "$have_opus" = "yes"; then
1210 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
1212 if test "$have_faad" = "yes"; then
1213 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
1215 if test "$have_flac" = "yes"; then
1216 recv_errlist_objs="$recv_errlist_objs flac_afh"
1218 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1219 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1220 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1221 errors used by para_recv)
1222 ########################################################################### afh
1223 afh_cmdline_objs="afh"
1236 if test "$have_vorbis" = "yes" || \
1237 test "$have_speex" = "yes" || \
1238 test "$have_opus" = "yes"; then
1239 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
1241 if test "$have_vorbis" = "yes"; then
1242 afh_errlist_objs="$afh_errlist_objs ogg_afh"
1244 if test "$have_speex" = "yes"; then
1245 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
1247 if test "$have_opus" = "yes"; then
1248 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
1250 if test "$have_faad" = "yes"; then
1251 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
1253 if test "$have_flac" = "yes"; then
1254 afh_errlist_objs="$afh_errlist_objs flac_afh"
1257 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1259 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1260 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1261 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1262 ########################################################################## play
1306 if test "$have_core_audio" = "yes"; then
1307 play_errlist_objs="$play_errlist_objs osx_write ipc"
1308 play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
1310 if test "$have_vorbis" = "yes" || \
1311 test "$have_speex" = "yes" || \
1312 test "$have_opus" = "yes"; then
1313 play_errlist_objs="$play_errlist_objs ogg_afh_common"
1315 if test "$have_vorbis" = "yes"; then
1316 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
1318 if test "$have_speex" = "yes"; then
1319 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
1321 if test "$have_opus" = "yes"; then
1322 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
1324 if test "$have_faad" = "yes"; then
1325 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
1327 if test "$have_mad" = "yes"; then
1328 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
1329 play_errlist_objs="$play_errlist_objs mp3dec_filter"
1331 if test "$have_flac" = "yes"; then
1332 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
1334 if test "$have_oss" = "yes"; then
1335 play_errlist_objs="$play_errlist_objs oss_write"
1336 play_cmdline_objs="$play_cmdline_objs oss_write"
1338 if test "$have_alsa" = "yes"; then
1339 play_errlist_objs="$play_errlist_objs alsa_write"
1340 play_cmdline_objs="$play_cmdline_objs alsa_write"
1342 if test "$have_ao" = "yes"; then
1343 play_errlist_objs="$play_errlist_objs ao_write"
1344 play_cmdline_objs="$play_cmdline_objs ao_write"
1346 if test "$have_readline" = "yes"; then
1347 play_errlist_objs="$play_errlist_objs interactive"
1349 if test "$have_samplerate" = "yes"; then
1350 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1351 play_cmdline_objs="$play_cmdline_objs resample_filter"
1354 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1355 AC_SUBST(play_objs, add_dot_o($play_objs))
1356 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1357 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1358 ############################################################# error2.h
1359 # these are always built
1362 $filter_errlist_objs
1363 $audioc_errlist_objs
1369 # optional executables
1370 if test "$build_server" = "yes"; then
1371 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1373 if test "$build_gui" = "yes"; then
1374 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1376 if test "$build_fade" = "yes"; then
1377 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1379 if test "$build_client" = "yes"; then
1380 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1382 if test "$build_audiod" = "yes"; then
1383 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1386 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1388 object_executable_matrix=
1389 for i in $executables; do
1390 eval objs=\$${i}_errlist_objs
1391 object_executable_matrix="$object_executable_matrix $i: $objs"
1393 # use echo to replace newlines by space
1394 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1396 for obj in $all_errlist_objs; do
1397 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1399 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1400 [enum {$SS NUM_SS}],
1401 [list of all objects that use the paraslash error facility]
1403 ################################################################## status items
1405 status_items="basename status num_played mtime bitrate frequency file_size
1406 status_flags format score techinfo afs_mode
1407 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1408 offset seconds_total stream_start current_time audiod_uptime image_id
1409 lyrics_id duration directory lyrics_name image_name path hash channels
1410 last_played num_chunks chunk_time amplification artist title year album
1414 for i in $status_items; do
1415 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1417 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1418 [enum of all status items])
1421 for i in $status_items; do
1422 result="$result \"$i\", "
1424 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1425 [char * array of all status items])
1427 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1428 [formats supported by para_server and para_afh])
1430 AC_SUBST(executables)
1432 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1433 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
1434 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
1435 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1436 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
1437 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1439 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1440 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1441 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1443 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1444 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1445 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1446 errors used by para_audiod)
1448 AC_SUBST(server_objs, add_dot_o($server_objs))
1449 AC_SUBST(server_ldflags, $server_ldflags)
1450 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1451 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1453 AC_SUBST(write_objs, add_dot_o($write_objs))
1454 AC_SUBST(write_ldflags, $write_ldflags)
1455 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1456 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1458 AC_SUBST(client_objs, add_dot_o($client_objs))
1459 AC_SUBST(client_ldflags, $client_ldflags)
1460 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1461 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1463 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1464 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1465 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1466 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1468 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1469 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1470 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1472 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1473 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1474 enum of supported filters)
1475 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1476 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1477 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1478 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1480 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1481 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1482 enum of supported writers)
1483 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1484 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1485 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1486 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1487 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1488 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1489 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1491 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1492 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1493 enum of audio formats supported by audiod)
1494 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1495 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1499 paraslash configuration:
1500 ~~~~~~~~~~~~~~~~~~~~~~~~
1501 unix socket credentials: $have_ucred
1502 readline (interactive CLIs): $have_readline
1503 audio formats handlers: $audio_format_handlers
1504 id3 version2 support: $have_libid3tag
1505 filters: $(echo $filters)
1509 para_server: $build_server
1510 para_gui: $build_gui
1511 para_fade: $build_fade
1512 para_client: $build_client
1513 para_audiod: $build_audiod