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"
106 ################################################################## clock_gettime
108 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
109 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
111 if test -n "$clock_gettime_lib"; then
112 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
113 define to 1 if clock_gettime() is supported])
115 if test "$clock_gettime_lib" = "rt"; then
116 AC_SUBST(clock_gettime_ldflags, -lrt)
118 ########################################################################### osl
120 OLD_CPPFLAGS="$CPPFLAGS"
121 OLD_LDFLAGS="$LDFLAGS"
123 AC_ARG_WITH(osl_headers, [AS_HELP_STRING(--with-osl-headers=dir,
124 [look for osl.h also in dir])])
125 if test -n "$with_osl_headers"; then
126 osl_cppflags="-I$with_osl_headers"
127 CPPFLAGS="$CPPFLAGS $osl_cppflags"
129 AC_ARG_WITH(osl_libs, [AS_HELP_STRING(--with-osl-libs=dir,
130 [look for libosl also in dir])])
131 if test -n "$with_osl_libs"; then
132 osl_libs="-L$with_osl_libs"
133 LDFLAGS="$LDFLAGS $osl_libs"
136 AC_CHECK_HEADER(osl.h, [], have_osl=no)
137 AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no)
138 if test "$have_osl" = "yes"; then
139 AC_SUBST(osl_cppflags)
140 osl_ldflags="$osl_libs -losl"
141 AC_SUBST(osl_ldflags)
143 AC_MSG_WARN([libosl not found, can not build para_server.
145 http://systemlinux.org/~maan/osl
147 git clone git://git.tuebingen.mpg.de/osl
150 CPPFLAGS="$OLD_CPPFLAGS"
151 LDFLAGS="$OLD_LDFLAGS"
153 ########################################################################### crypto
154 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
155 Force using crypto library "lib". This package requires either
156 openssl or libgcrypt being installed. Possible values for "lib"
157 are thus "openssl" and "gcrypt". If this option is not given,
158 openssl is tried first. If openssl was not found, gcrypt is
161 case "$enable_cryptolib" in
162 "openssl") check_openssl="yes"; check_gcrypt="no";;
163 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
164 "") check_openssl="yes"; check_gcrypt="yes";;
165 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
167 ###################################################################### openssl
168 if test "$check_openssl" = "yes"; then
169 OLD_CPPFLAGS="$CPPFLAGS"
170 OLD_LDFLAGS="$LDFLAGS"
173 AC_ARG_WITH(openssl_headers, [AS_HELP_STRING(--with-openssl-headers=dir,
174 [look for openssl headers also in dir])])
175 if test -n "$with_openssl_headers"; then
176 openssl_cppflags="-I$with_openssl_headers"
177 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
179 AC_ARG_WITH(openssl_libs, [AS_HELP_STRING(--with-openssl-libs=dir,
180 [look for openssl libraries also in dir])])
181 if test -n "$with_openssl_libs"; then
182 openssl_libs="-L$with_openssl_libs"
183 LDFLAGS="$LDFLAGS $openssl_libs"
185 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
186 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
187 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
188 # try harder: openssl is sometimes installed in /usr/local/ssl
189 openssl_cppflags="-I/usr/local/ssl/include"
190 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
191 openssl_libs="-L/usr/local/ssl/lib"
192 LDFLAGS="$LDFLAGS $openssl_libs"
194 unset ac_cv_header_openssl_ssl_h 2> /dev/null
195 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
196 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
197 if test "$have_openssl" = "yes"; then
198 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
201 if test "$have_openssl" = "yes"; then
202 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
203 AC_SUBST(openssl_cppflags)
204 openssl_ldflags="$openssl_libs -lssl -lcrypto"
205 AC_SUBST(openssl_ldflags)
207 server_errlist_objs="$server_errlist_objs crypt"
208 client_errlist_objs="$client_errlist_objs crypt"
209 audiod_errlist_objs="$audiod_errlist_objs crypt"
213 AC_MSG_WARN([openssl libraries not found])
215 CPPFLAGS="$OLD_CPPFLAGS"
216 LDFLAGS="$OLD_LDFLAGS"
221 ########################################################################### gcrypt
222 if test "$check_gcrypt" = "yes"; then
223 OLD_CPPFLAGS="$CPPFLAGS"
224 OLD_LDFLAGS="$LDFLAGS"
227 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
228 [look for gcrypt headers also in dir])])
229 if test -n "$with_gcrypt_headers"; then
230 gcrypt_cppflags="-I$with_gcrypt_headers"
231 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
233 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
234 [look for libgcrypt also in dir])])
235 if test -n "$with_gcrypt_libs"; then
236 gcrypt_libs="-L$with_gcrypt_libs"
237 LDFLAGS="$LDFLAGS $gcrypt_libs"
239 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
240 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
241 if test "$have_gcrypt" = "yes"; then
242 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
243 AC_SUBST(gcrypt_cppflags)
244 gcrypt_ldflags="$gcrypt_libs -lgcrypt"
245 AC_SUBST(gcrypt_ldflags)
247 server_errlist_objs="$server_errlist_objs gcrypt"
248 client_errlist_objs="$client_errlist_objs gcrypt"
249 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
251 AC_MSG_WARN([gcrypt library not found])
253 CPPFLAGS="$OLD_CPPFLAGS"
254 LDFLAGS="$OLD_LDFLAGS"
259 ########################################################################### libsocket
260 AC_CHECK_LIB([c], [socket],
262 [socket_ldflags="-lsocket"]
264 AC_SUBST(socket_ldflags)
265 ########################################################################### libnsl
266 AC_CHECK_LIB([c], [gethostbyname],
268 [nsl_ldflags="-lnsl"]
270 AC_SUBST(nsl_ldflags)
271 ########################################################################### ucred
272 AC_MSG_CHECKING(for struct ucred)
273 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
275 #include <sys/types.h>
276 #include <sys/socket.h>
278 struct ucred sucred; sucred.pid=0;
279 ]])],[have_ucred=yes],[have_ucred=no])
280 AC_MSG_RESULT($have_ucred)
281 if test ${have_ucred} = yes; then
282 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
284 ########################################################################### gengetopt
285 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
287 [gengetopt_args_info_description],
288 [ggo_descriptions_declared=yes],
289 [ggo_descriptions_declared=no],
290 [#include "conftest-ggo.h"]
292 AC_SUBST(ggo_descriptions_declared)
293 ########################################################################### curses
295 OLD_CPPFLAGS="$CPPFLAGS"
296 OLD_LDFLAGS="$LDFLAGS"
298 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
299 [look for curses.h also in dir])])
300 if test -n "$with_curses_headers"; then
301 curses_cppflags="-I$with_curses_headers"
302 CPPFLAGS="$CPPFLAGS $curses_cppflags"
304 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
305 [look for libcurses also in dir])])
306 if test -n "$with_curses_libs"; then
307 curses_libs="-L$with_curses_libs"
308 LDFLAGS="$LDFLAGS $curses_libs"
310 AC_CHECK_HEADER(curses.h, [], [
313 curses_ldflags="$curses_libs"
314 AC_CHECK_LIB([ncursesw], [initscr],
315 [curses_ldflags="$curses_libs -lncursesw"], [
316 AC_CHECK_LIB([curses], [initscr],
317 [curses_ldflags="$curses_libs -lcurses"],
322 AC_SUBST(curses_cppflags)
323 AC_SUBST(curses_ldflags)
324 CPPFLAGS="$OLD_CPPFLAGS"
325 LDFLAGS="$OLD_LDFLAGS"
327 ########################################################################### ip_mreqn
328 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
329 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
335 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
336 AC_MSG_RESULT($have_ip_mreqn)
337 if test ${have_ip_mreqn} = yes; then
338 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
340 ########################################################################### osx
342 AC_MSG_CHECKING(for CoreAudio (MacOs))
343 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
344 #include <CoreAudio/CoreAudio.h>
347 ]])],[have_core_audio=yes],[have_core_audio=no])
348 AC_MSG_RESULT($have_core_audio)
349 if test ${have_core_audio} = yes; then
350 f1="-framework CoreAudio"
351 f2="-framework AudioToolbox"
352 f3="-framework AudioUnit"
353 f4="-framework CoreServices"
354 core_audio_ldflags="$f1 $f2 $f3 $f4"
355 AC_SUBST(core_audio_ldflags)
357 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
358 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
360 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
362 ####################################################### ogg/vorbis/speex/opus
364 OLD_CPPFLAGS="$CPPFLAGS"
365 OLD_LDFLAGS="$LDFLAGS"
367 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
368 [look for ogg headers also in dir])])
369 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
370 [look for ogg libs also in dir])])
371 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
372 [look for vorbis headers also in dir])])
373 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
374 [look for vorbis libs also in dir])])
375 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
376 [look for speex headers also in dir])])
377 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
378 [look for speex libs also in dir])])
379 AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir,
380 [look for opus headers also in dir])])
381 AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir,
382 [look for opus libs also in dir])])
384 if test -n "$with_ogg_headers"; then
385 ogg_cppflags="-I$with_ogg_headers"
386 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
388 if test -n "$with_ogg_libs"; then
389 ogg_libs="-L$with_ogg_libs"
390 LDFLAGS="$LDFLAGS $ogg_libs"
392 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
393 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
398 if test "$have_ogg" = "yes"; then
400 if test -n "$with_vorbis_headers"; then
401 vorbis_cppflags="-I$with_vorbis_headers"
402 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
404 if test -n "$with_vorbis_libs"; then
405 vorbis_libs="-L$with_vorbis_libs"
406 LDFLAGS="$LDFLAGS $vorbis_libs"
408 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
409 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
412 if test -n "$with_speex_headers"; then
413 speex_cppflags="-I$with_speex_headers"
414 CPPFLAGS="$CPPFLAGS $speex_cppflags"
416 if test -n "$with_speex_libs"; then
417 speex_libs="-L$with_speex_libs"
418 LDFLAGS="$LDFLAGS $speex_libs"
420 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
421 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
424 if test -n "$with_opus_headers"; then
425 opus_cppflags="-I$with_opus_headers"
426 CPPFLAGS="$CPPFLAGS $opus_cppflags"
428 if test -n "$with_opus_libs"; then
429 opus_libs="-L$with_opus_libs"
430 LDFLAGS="$LDFLAGS $opus_libs"
432 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [ have_opus="no" ])
433 AC_CHECK_HEADERS([opus/opus.h], [], [ have_opus="no" ])
435 AC_MSG_WARN([vorbis/speex/opus depend on libogg, which was not detected])
441 msg="support in para_server/para_filter/para_afh"
442 if test "$have_vorbis" = "yes" || \
443 test "$have_speex" = "yes" || \
444 test "$have_opus" = "yes"; then
445 AC_SUBST(ogg_cppflags)
446 ogg_ldflags="$ogg_libs -logg"
447 if test "$OSTYPE" = "Darwin"; then
448 ogg_ldflags="-Wl,-bind_at_load $ogg_ldflags"
450 AC_SUBST(ogg_ldflags)
451 server_errlist_objs="$server_errlist_objs ogg_afh_common"
453 if test "$have_vorbis" = "yes"; then
454 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
455 vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile"
456 AC_SUBST(vorbis_ldflags)
458 server_errlist_objs="$server_errlist_objs ogg_afh"
459 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
461 audiod_audio_formats="$audiod_audio_formats ogg"
462 audio_format_handlers="$audio_format_handlers ogg"
464 if test "$have_speex" = "yes"; then
465 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
466 AC_SUBST(speex_cppflags)
467 speex_ldflags="$speex_libs -lspeex"
468 AC_SUBST(speex_ldflags)
471 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
472 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
474 audiod_audio_formats="$audiod_audio_formats spx"
475 audio_format_handlers="$audio_format_handlers spx"
477 AC_MSG_WARN([no ogg/speex $msg])
479 if test "$have_opus" = "yes"; then
480 AC_DEFINE(HAVE_OPUS, 1, define to 1 to turn on ogg/opus support)
481 AC_SUBST(opus_cppflags)
482 opus_ldflags="$opus_libs -lopus"
483 AC_SUBST(opus_ldflags)
486 server_errlist_objs="$server_errlist_objs opus_afh opus_common"
487 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
489 audiod_audio_formats="$audiod_audio_formats opus"
490 audio_format_handlers="$audio_format_handlers opus"
492 AC_MSG_WARN([no ogg/opus $msg])
494 CPPFLAGS="$OLD_CPPFLAGS"
495 LDFLAGS="$OLD_LDFLAGS"
497 ########################################################################### faad
499 OLD_CPPFLAGS="$CPPFLAGS"
500 OLD_LDFLAGS="$LDFLAGS"
502 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
503 [look for neaacdec.h also in dir])])
504 if test -n "$with_faad_headers"; then
505 faad_cppflags="-I$with_faad_headers"
506 CPPFLAGS="$CPPFLAGS $faad_cppflags"
508 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
509 [look for libfaad also in dir])])
510 if test -n "$with_faad_libs"; then
511 faad_libs="-L$with_faad_libs"
512 LDFLAGS="$LDFLAGS $faad_libs"
514 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
515 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
516 if test "$have_faad" = "yes"; then
517 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
518 AC_SUBST(faad_cppflags)
519 faad_ldflags="$faad_libs -lfaad"
520 AC_SUBST(faad_ldflags)
522 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
523 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
525 audiod_audio_formats="$audiod_audio_formats aac"
526 audio_format_handlers="$audio_format_handlers aac"
528 CPPFLAGS="$OLD_CPPFLAGS"
529 LDFLAGS="$OLD_LDFLAGS"
531 ########################################################################### mad
533 OLD_CPPFLAGS="$CPPFLAGS"
534 OLD_LDFLAGS="$LDFLAGS"
537 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
538 [look for mad.h also in dir])])
539 if test -n "$with_mad_headers"; then
540 mad_cppflags="-I$with_mad_headers"
541 CPPFLAGS="$CPPFLAGS $mad_cppflags"
543 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
544 [look for libmad also in dir])])
545 if test -n "$with_mad_libs"; then
546 mad_libs="-L$with_mad_libs"
547 LDFLAGS="$LDFLAGS $mad_libs"
549 AC_CHECK_HEADERS([mad.h], [], [
552 AC_CHECK_LIB([mad], [mad_stream_init], [], [
555 if test "$have_mad" = "yes"; then
556 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
557 AC_SUBST(mad_cppflags)
558 mad_ldflags="$mad_libs -lmad"
559 AC_SUBST(mad_ldflags)
560 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
561 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
562 audiod_audio_formats="$audiod_audio_formats mp3"
564 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
566 CPPFLAGS="$OLD_CPPFLAGS"
567 LDFLAGS="$OLD_LDFLAGS"
569 ###################################################################### libid3tag
570 OLD_CPPFLAGS="$CPPFLAGS"
571 OLD_LDFLAGS="$LDFLAGS"
575 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
576 [look for id3tag header files also in dir])])
577 if test -n "$with_id3tag_headers"; then
578 id3tag_cppflags="-I$with_id3tag_headers"
579 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
581 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
582 [look for id3tag libs also in dir])])
583 if test -n "$with_id3tag_libs"; then
584 id3tag_libs="-L$with_id3tag_libs"
585 LDFLAGS="$LDFLAGS $id3tag_libs"
588 AC_MSG_CHECKING(for libid3tag)
589 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
592 struct id3_tag t = {.flags = 0};
593 ]])],[],[have_libid3tag=no])
594 AC_MSG_RESULT($have_libid3tag)
596 if test ${have_libid3tag} = yes; then
597 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
598 AC_SUBST(id3tag_cppflags)
599 AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz")
601 CPPFLAGS="$OLD_CPPFLAGS"
602 LDFLAGS="$OLD_LDFLAGS"
604 ########################################################################### flac
605 OLD_CPPFLAGS="$CPPFLAGS"
606 OLD_LDFLAGS="$LDFLAGS"
610 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
611 [look for flac headers also in dir])])
612 if test -n "$with_flac_headers"; then
613 flac_cppflags="-I$with_flac_headers"
614 CPPFLAGS="$CPPFLAGS $flac_cppflags"
616 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
617 [look for flac libs also in dir])])
618 if test -n "$with_flac_libs"; then
619 flac_libs="-L$with_flac_libs"
620 LDFLAGS="$LDFLAGS $flac_libs"
622 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
623 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
624 if test "$have_flac" = "yes"; then
625 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
626 AC_SUBST(flac_cppflags)
627 flac_ldflags="$flac_libs -lFLAC"
628 AC_SUBST(flac_ldflags)
630 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
631 server_errlist_objs="$server_errlist_objs flac_afh"
632 audio_format_handlers="$audio_format_handlers flac"
633 audiod_audio_formats="$audiod_audio_formats flac"
635 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
637 CPPFLAGS="$OLD_CPPFLAGS"
638 LDFLAGS="$OLD_LDFLAGS"
640 ########################################################################### oss
641 OLD_CPPFLAGS="$CPPFLAGS"
642 OLD_LDFLAGS="$LDFLAGS"
646 msg="=> will not build oss writer"
648 AC_CHECK_HEADER(sys/soundcard.h, [
649 audiod_errlist_objs="$audiod_errlist_objs oss_write"
650 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
652 fade_errlist_objs="$fade_errlist_objs oss_mix"
654 mixers="${mixers}oss "
655 default_mixer="OSS_MIX"
657 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
658 oss_ldflags="-lossaudio"
659 AC_SUBST(oss_ldflags)
665 AC_MSG_WARN([no sys/soundcard.h $msg])
668 CPPFLAGS="$OLD_CPPFLAGS"
669 LDFLAGS="$OLD_LDFLAGS"
672 ########################################################################### alsa
673 OLD_CPPFLAGS="$CPPFLAGS"
674 OLD_LDFLAGS="$LDFLAGS"
677 msg="=> no alsa support for para_audiod/para_write"
678 if test "$OSTYPE" != "Linux"; then
683 if test "$have_alsa" = "yes"; then
684 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
686 AC_MSG_WARN([no alsa/asoundlib $msg])
690 if test "$have_alsa" = "yes"; then
691 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
693 AC_MSG_WARN([no libasound $msg])
697 if test "$have_alsa" = "yes"; then
698 alsa_ldflags="-lasound"
699 AC_SUBST(alsa_ldflags)
700 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
701 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
703 fade_errlist_objs="$fade_errlist_objs alsa_mix"
705 mixers="${mixers}alsa "
706 default_mixer="ALSA_MIX"
709 CPPFLAGS="$OLD_CPPFLAGS"
710 LDFLAGS="$OLD_LDFLAGS"
712 ########################################################################### libao
713 OLD_CPPFLAGS="$CPPFLAGS"
714 OLD_LDFLAGS="$LDFLAGS"
718 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
719 [look for ao/ao.h also in dir])])
720 if test -n "$with_ao_headers"; then
721 ao_cppflags="-I$with_ao_headers"
722 CPPFLAGS="$CPPFLAGS $ao_cppflags"
724 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
725 [look for libao also in dir])])
726 if test -n "$with_ao_libs"; then
727 ao_libs="-L$with_ao_libs"
728 LDFLAGS="$LDFLAGS $ao_libs"
730 msg="no libao support for para_audiod/para_write"
731 AC_CHECK_HEADERS([ao/ao.h], [
734 AC_MSG_WARN([ao.h not found, $msg])
736 if test "$have_ao" = "yes"; then
737 AC_CHECK_LIB([ao], [ao_initialize], [], [
739 AC_MSG_WARN([ao lib not found or not working, $msg])
742 if test "$have_ao" = "yes"; then
743 AC_CHECK_HEADERS([pthread.h], [
746 AC_MSG_WARN([pthread.h not found, $msg])
749 if test "$have_ao" = "yes"; then
750 AC_CHECK_LIB([pthread], [pthread_create], [], [
752 AC_MSG_WARN([pthread lib not found or not working, $msg])
755 if test "$have_ao" = "yes"; then
756 AC_SUBST(ao_cppflags)
757 ao_ldflags="$ao_libs -lao -lpthread"
760 audiod_errlist_objs="$audiod_errlist_objs ao_write"
761 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
765 CPPFLAGS="$OLD_CPPFLAGS"
766 LDFLAGS="$OLD_LDFLAGS"
768 ############################################################# readline
769 OLD_CPPFLAGS="$CPPFLAGS"
770 OLD_LDFLAGS="$LDFLAGS"
774 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
775 [look for libreadline header files also in dir])])
776 if test -n "$with_readline_headers"; then
777 readline_cppflags="-I$with_readline_headers"
778 CPPFLAGS="$CPPFLAGS $readline_cppflags"
781 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
782 [look for readline library also in dir])])
783 if test -n "$with_readline_libs"; then
784 readline_libs="-L$with_readline_libs"
785 LDFLAGS="$LDFLAGS $readline_libs"
787 msg="no interactive cli support"
788 AC_CHECK_HEADERS([readline/readline.h], [
791 AC_MSG_WARN([readline/readline.h not found, $msg])
794 if test "$have_curses" != "yes"; then
796 AC_MSG_WARN([interactive cli support depends on curses,])
797 AC_MSG_WARN([but no curses lib was detected, $msg])
800 if test "$have_readline" = "yes"; then
801 readline_ldflags="$readline_libs -lreadline"
802 AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
803 if test "$have_readline" = "no"; then # try with -lcurses
805 AC_MSG_NOTICE([trying again with -lcurses])
806 unset ac_cv_search_rl_free_keymap 2> /dev/null
807 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
809 readline_ldflags="$readline_ldflags -lcurses"
812 if test "$have_readline" = "no"; then # try with -ltermcap
814 AC_MSG_NOTICE([trying again with -ltermcap])
815 unset ac_cv_search_rl_free_keymap 2> /dev/null
816 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
818 readline_ldflags="$readline_ldflags -ltermcap"
823 if test "$have_readline" = "yes"; then
824 AC_SUBST(readline_cppflags)
825 AC_SUBST(readline_ldflags)
826 client_errlist_objs="$client_errlist_objs interactive"
827 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
828 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
830 AC_MSG_WARN([libreadline not found or unusable])
832 CPPFLAGS="$OLD_CPPFLAGS"
833 LDFLAGS="$OLD_LDFLAGS"
835 ############################################################# libsamplerate
836 OLD_CPPFLAGS="$CPPFLAGS"
837 OLD_LDFLAGS="$LDFLAGS"
840 have_samplerate="yes"
841 AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
842 [look for samplerate headers also in dir])])
843 if test -n "$with_samplerate_headers"; then
844 samplerate_cppflags="-I$with_samplerate_headers"
845 CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
847 AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
848 [look for samplerate libs also in dir])])
849 if test -n "$with_samplerate_libs"; then
850 samplerate_libs="-L$with_samplerate_libs"
851 LDFLAGS="$LDFLAGS $samplerate_libs"
854 AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
855 AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
857 if test "$have_samplerate" = "yes"; then
858 AC_SUBST(samplerate_cppflags)
859 samplerate_ldflags="$samplerate_libs -lsamplerate"
860 AC_SUBST(samplerate_ldflags)
862 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
863 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
865 AC_MSG_WARN([no resample support in para_audiod/para_filter])
867 CPPFLAGS="$OLD_CPPFLAGS"
868 LDFLAGS="$OLD_LDFLAGS"
870 ######################################################################### server
871 if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
872 -a "$have_osl" = "yes" ; then
875 executables="$executables server"
876 server_cmdline_objs="server"
877 server_errlist_objs="$server_errlist_objs
919 ############################################################# client
920 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
922 executables="$executables client"
923 client_cmdline_objs="client"
924 client_errlist_objs="$client_errlist_objs
943 ############################################################# audiod
944 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
946 executables="$executables audiod"
947 audiod_cmdline_objs="$audiod_cmdline_objs
958 audiod_errlist_objs="$audiod_errlist_objs
995 audiod_ldflags="$audiod_ldflags -lm"
996 audiod_audio_formats="$audiod_audio_formats wma"
1000 ########################################################################### fade
1001 if test -n "$mixers"; then
1003 executables="$executables fade"
1004 fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
1005 fade_cmdline_objs="fade"
1006 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
1007 AC_SUBST(fade_objs, add_dot_o($fade_objs))
1008 AC_SUBST(fade_ldflags, $fade_ldflags)
1009 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
1010 objlist_to_errlist($fade_errlist_objs),
1011 errors used by para_fade)
1013 for i in $mixers; do
1014 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
1017 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
1018 enum of supported mixers)
1019 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
1020 use this mixer if none was specified)
1021 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
1022 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
1024 for i in $mixers; do
1025 printf 'extern void '$i'_mix_init(struct mixer *); '
1028 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
1029 init functions of the supported mixers)
1030 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
1031 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
1032 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
1035 AC_MSG_WARN([no mixer support])
1036 mixer_summary="para_fade: no"
1038 ########################################################################### gui
1039 if test "$have_curses" = "yes"; then
1041 executables="$executables gui"
1042 gui_cmdline_objs="gui"
1056 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
1059 AC_MSG_WARN([no curses lib, cannot build para_gui])
1061 ######################################################################## filter
1070 filter_errlist_objs="
1094 filter_cmdline_objs="
1101 if test "$have_vorbis" = "yes"; then
1102 filters="$filters oggdec"
1103 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
1105 if test "$have_speex" = "yes"; then
1106 filters="$filters spxdec"
1107 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
1109 if test "$have_opus" = "yes"; then
1110 filters="$filters opusdec"
1111 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
1113 if test "$have_faad" = "yes"; then
1114 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
1115 filters="$filters aacdec"
1117 if test "$have_mad" = "yes"; then
1118 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
1119 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
1120 filters="$filters mp3dec"
1122 if test "$have_flac" = "yes"; then
1123 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
1124 filters="$filters flacdec"
1126 if test "$have_samplerate" = "yes"; then
1127 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
1128 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
1129 filters="$filters resample"
1131 ########################################################################## recv
1161 if test "$have_vorbis" = "yes" || \
1162 test "$have_speex" = "yes" || \
1163 test "$have_opus" = "yes"; then
1164 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
1166 if test "$have_vorbis" = "yes"; then
1167 recv_errlist_objs="$recv_errlist_objs ogg_afh"
1169 if test "$have_speex" = "yes"; then
1170 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
1172 if test "$have_opus" = "yes"; then
1173 recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
1175 if test "$have_faad" = "yes"; then
1176 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
1178 if test "$have_flac" = "yes"; then
1179 recv_errlist_objs="$recv_errlist_objs flac_afh"
1181 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
1182 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1183 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1184 errors used by para_recv)
1185 ########################################################################### afh
1186 afh_cmdline_objs="afh"
1199 if test "$have_vorbis" = "yes" || \
1200 test "$have_speex" = "yes" || \
1201 test "$have_opus" = "yes"; then
1202 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
1204 if test "$have_vorbis" = "yes"; then
1205 afh_errlist_objs="$afh_errlist_objs ogg_afh"
1207 if test "$have_speex" = "yes"; then
1208 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
1210 if test "$have_opus" = "yes"; then
1211 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
1213 if test "$have_faad" = "yes"; then
1214 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
1216 if test "$have_flac" = "yes"; then
1217 afh_errlist_objs="$afh_errlist_objs flac_afh"
1220 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
1222 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1223 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1224 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1225 ########################################################################## play
1269 if test "$have_core_audio" = "yes"; then
1270 play_errlist_objs="$play_errlist_objs osx_write ipc"
1271 play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
1273 if test "$have_vorbis" = "yes" || \
1274 test "$have_speex" = "yes" || \
1275 test "$have_opus" = "yes"; then
1276 play_errlist_objs="$play_errlist_objs ogg_afh_common"
1278 if test "$have_vorbis" = "yes"; then
1279 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
1281 if test "$have_speex" = "yes"; then
1282 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
1284 if test "$have_opus" = "yes"; then
1285 play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
1287 if test "$have_faad" = "yes"; then
1288 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
1290 if test "$have_mad" = "yes"; then
1291 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
1292 play_errlist_objs="$play_errlist_objs mp3dec_filter"
1294 if test "$have_flac" = "yes"; then
1295 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
1297 if test "$have_oss" = "yes"; then
1298 play_errlist_objs="$play_errlist_objs oss_write"
1299 play_cmdline_objs="$play_cmdline_objs oss_write"
1301 if test "$have_alsa" = "yes"; then
1302 play_errlist_objs="$play_errlist_objs alsa_write"
1303 play_cmdline_objs="$play_cmdline_objs alsa_write"
1305 if test "$have_ao" = "yes"; then
1306 play_errlist_objs="$play_errlist_objs ao_write"
1307 play_cmdline_objs="$play_cmdline_objs ao_write"
1309 if test "$have_readline" = "yes"; then
1310 play_errlist_objs="$play_errlist_objs interactive"
1312 if test "$have_samplerate" = "yes"; then
1313 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1314 play_cmdline_objs="$play_cmdline_objs resample_filter"
1317 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1318 AC_SUBST(play_objs, add_dot_o($play_objs))
1319 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1320 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1321 ######################################################################### write
1322 write_cmdline_objs="
1326 write_errlist_objs="
1341 default_writer="FILE_WRITE"
1343 if test "$have_core_audio" = "yes"; then
1344 write_errlist_objs="$write_errlist_objs osx_write ipc"
1345 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
1346 writers="$writers osx"
1347 default_writer="OSX_WRITE"
1349 if test "$have_ao" = "yes"; then
1350 write_errlist_objs="$write_errlist_objs ao_write"
1351 write_cmdline_objs="$write_cmdline_objs ao_write"
1352 writers="$writers ao"
1353 default_writer="AO_WRITE"
1355 if test "$have_oss" = "yes"; then
1356 write_errlist_objs="$write_errlist_objs oss_write"
1357 write_cmdline_objs="$write_cmdline_objs oss_write"
1358 writers="$writers oss"
1359 default_writer="OSS_WRITE"
1361 if test "$have_alsa" = "yes"; then
1362 write_errlist_objs="$write_errlist_objs alsa_write"
1363 write_cmdline_objs="$write_cmdline_objs alsa_write"
1364 writers="$writers alsa"
1365 default_writer="ALSA_WRITE"
1367 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1368 AC_SUBST(write_objs, add_dot_o($write_objs))
1369 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1370 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1371 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1372 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1373 enum of supported writers)
1374 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1375 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1376 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1377 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1378 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1379 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1380 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1381 ############################################################# error2.h
1382 # these are always built
1385 $filter_errlist_objs
1386 $audioc_errlist_objs
1392 # optional executables
1393 if test "$build_server" = "yes"; then
1394 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1396 if test "$build_gui" = "yes"; then
1397 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1399 if test "$build_fade" = "yes"; then
1400 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1402 if test "$build_client" = "yes"; then
1403 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1405 if test "$build_audiod" = "yes"; then
1406 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1409 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1411 object_executable_matrix=
1412 for i in $executables; do
1413 eval objs=\$${i}_errlist_objs
1414 object_executable_matrix="$object_executable_matrix $i: $objs"
1416 # use echo to replace newlines by space
1417 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1419 for obj in $all_errlist_objs; do
1420 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1422 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1423 [enum {$SS NUM_SS}],
1424 [list of all objects that use the paraslash error facility]
1426 ################################################################## status items
1428 status_items="basename status num_played mtime bitrate frequency file_size
1429 status_flags format score techinfo afs_mode
1430 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1431 offset seconds_total stream_start current_time audiod_uptime image_id
1432 lyrics_id duration directory lyrics_name image_name path hash channels
1433 last_played num_chunks chunk_time amplification artist title year album
1437 for i in $status_items; do
1438 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1440 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1441 [enum of all status items])
1444 for i in $status_items; do
1445 result="$result \"$i\", "
1447 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1448 [char * array of all status items])
1450 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1451 [formats supported by para_server and para_afh])
1453 AC_SUBST(executables)
1455 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
1456 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
1457 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
1458 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
1459 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1461 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1462 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1463 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1465 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1466 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1467 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1468 errors used by para_audiod)
1470 AC_SUBST(server_objs, add_dot_o($server_objs))
1471 AC_SUBST(server_ldflags, $server_ldflags)
1472 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1473 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1475 AC_SUBST(client_objs, add_dot_o($client_objs))
1476 AC_SUBST(client_ldflags, $client_ldflags)
1477 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1478 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1480 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1481 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1482 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1483 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1485 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1486 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1487 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1489 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1490 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1491 enum of supported filters)
1492 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1493 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1494 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1495 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1497 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1498 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1499 enum of audio formats supported by audiod)
1500 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1501 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1505 paraslash configuration:
1506 ~~~~~~~~~~~~~~~~~~~~~~~~
1507 unix socket credentials: $have_ucred
1508 readline (interactive CLIs): $have_readline
1509 audio formats handlers: $audio_format_handlers
1510 id3 version2 support: $have_libid3tag
1511 filters: $(echo $filters)
1515 para_server: $build_server
1516 para_gui: $build_gui
1517 para_fade: $build_fade
1518 para_client: $build_client
1519 para_audiod: $build_audiod