2 # Process this file with autoconf to produce a configure script.
7 AC_INIT([paraslash],[git],[maan@systemlinux.org])
8 AC_CONFIG_HEADER([config.h])
10 AC_SUBST(install_sh, [$INSTALL])
11 AC_CONFIG_FILES([Makefile])
12 AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
13 AC_DEFUN([add_para],[$(for i in $@; do printf "para_$i "; done)])
14 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) }])
15 AC_PATH_PROG(UNAMEPATH, uname, no)
16 if test "$UNAMEPATH" = "no"; then
17 AC_MSG_ERROR(unable to determine system type)
19 AC_MSG_CHECKING(os type)
20 OSTYPE="`$UNAMEPATH -s`"
21 AC_MSG_RESULT("$OSTYPE")
23 if test "$OSTYPE" = "SunOS"; then
24 # needed on SunOS for socket magic
25 arch_cppflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
26 AC_SUBST(arch_cppflags)
31 AC_PATH_PROG([gengetopt], [gengetopt])
32 test -z "$gengetopt" && AC_MSG_ERROR(
33 [gengetopt is required to build this package])
35 AC_PATH_PROG([help2man], [help2man])
36 test -z "$help2man" && AC_MSG_ERROR(
37 [help2man 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
81 AC_FUNC_SELECT_ARGTYPES
88 AC_CHECK_FUNCS([atexit dup2 memchr memmove memset \
89 regcomp select strchr strdup strerror strstr strtol uname \
90 fchdir gettimeofday localtime_r munmap strcasecmp strcspn \
91 strncasecmp strrchr strspn alarm mkdir inet_ntoa socket], [],
92 [AC_MSG_ERROR([function not found, cannot live without it])])
94 AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
97 all_errlist_objs="mp3_afh afh_common net string signal time daemon
98 stat afh amp_filter fd ringbuffer sched audiod
99 grab_client filter_common wav_filter compress_filter http_recv
100 dccp_recv recv_common write_common file_write audiod_command
101 client_common recv stdout filter stdin audioc write client
102 exec send_common ggo udp_recv color fec fecdec_filter
103 prebuffer_filter bitstream imdct
104 wma_afh wma_common wmadec_filter buffer_tree crypt_common
105 gui gui_theme sideband afh_recv"
106 executables="recv filter audioc write client afh audiod"
108 recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv afh_recv)"
111 http_recv recv_common recv time string net dccp_recv fd
112 sched stdout ggo udp_recv buffer_tree afh_recv afh_common
113 wma_afh wma_common mp3_afh
118 filter_cmdline_objs="add_cmdline(filter compress_filter amp_filter prebuffer_filter)"
119 filter_errlist_objs="filter_common wav_filter compress_filter filter string
120 stdin stdout sched fd amp_filter ggo fecdec_filter fec
121 prebuffer_filter time bitstream imdct wma_common wmadec_filter buffer_tree"
123 filters=" compress wav amp fecdec wmadec prebuffer"
125 audioc_cmdline_objs="add_cmdline(audioc)"
126 audioc_errlist_objs="audioc string net fd"
129 audiod_cmdline_objs="add_cmdline(audiod compress_filter http_recv dccp_recv file_write client amp_filter udp_recv prebuffer_filter)"
130 audiod_errlist_objs="audiod signal string daemon stat net crypt_common sideband
131 time grab_client filter_common wav_filter compress_filter amp_filter http_recv dccp_recv
132 recv_common fd sched write_common file_write audiod_command fecdec_filter
133 client_common ggo udp_recv color fec prebuffer_filter
134 bitstream imdct wma_common wmadec_filter buffer_tree"
136 audiod_audio_formats="wma"
138 afh_cmdline_objs="add_cmdline(afh)"
139 afh_errlist_objs="afh string fd mp3_afh afh_common time wma_afh wma_common"
142 write_cmdline_objs="add_cmdline(write file_write)"
143 write_errlist_objs="write write_common file_write time fd string sched stdin
147 default_writer="FILE_WRITE"
149 client_cmdline_objs="add_cmdline(client)"
150 client_errlist_objs="client net string fd sched stdin stdout time sideband
151 client_common buffer_tree crypt_common"
154 gui_cmdline_objs="add_cmdline(gui)"
155 gui_errlist_objs="exec signal string stat ringbuffer fd gui gui_theme"
156 gui_objs="$gui_cmdline_objs $gui_errlist_objs"
157 ########################################################################### snprintf
158 # ===========================================================================
159 # http://www.nongnu.org/autoconf-archive/ax_func_snprintf.html
160 # ===========================================================================
168 # Checks for a fully C99 compliant snprintf, in particular checks whether
169 # it does bounds checking and returns the correct string length; does the
170 # same check for vsnprintf. If no working snprintf or vsnprintf is found,
171 # it prints an error message and aborts.
175 # Copyright (c) 2008 Ruediger Kuhlmann <info@ruediger-kuhlmann.de>
177 # Copying and distribution of this file, with or without modification, are
178 # permitted in any medium without royalty provided the copyright notice
179 # and this notice are preserved.
181 AU_ALIAS([AC_FUNC_SNPRINTF], [AX_FUNC_SNPRINTF])
182 AC_DEFUN([AX_FUNC_SNPRINTF],
183 [AC_CHECK_FUNCS(snprintf vsnprintf)
184 AC_MSG_CHECKING(for working snprintf)
185 AC_CACHE_VAL(ac_cv_have_working_snprintf,
186 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
191 char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
192 char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
194 i = snprintf (bufs, 2, "%s", "111");
195 if (strcmp (bufs, "1")) exit (1);
196 if (i != 3) exit (1);
197 i = snprintf (bufd, 2, "%d", 111);
198 if (strcmp (bufd, "1")) exit (1);
199 if (i != 3) exit (1);
201 }]])],[ac_cv_have_working_snprintf=yes],
202 [ac_cv_have_working_snprintf=no],[ac_cv_have_working_snprintf=cross])])
203 AC_MSG_RESULT([$ac_cv_have_working_snprintf])
204 AC_MSG_CHECKING(for working vsnprintf)
205 AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
206 [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
209 int my_vsnprintf (char *buf, const char *tmpl, ...)
213 va_start (args, tmpl);
214 i = vsnprintf (buf, 2, tmpl, args);
221 char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
222 char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
224 i = my_vsnprintf (bufs, "%s", "111");
225 if (strcmp (bufs, "1")) exit (1);
226 if (i != 3) exit (1);
227 i = my_vsnprintf (bufd, "%d", 111);
228 if (strcmp (bufd, "1")) exit (1);
229 if (i != 3) exit (1);
231 }]])],[ac_cv_have_working_vsnprintf=yes],
232 [ac_cv_have_working_vsnprintf=no],[ac_cv_have_working_vsnprintf=cross])])
233 AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
234 if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
235 AC_MSG_ERROR([fatal: buggy snprintf() detected])
238 ########################################################################### osl
240 OLD_CPPFLAGS="$CPPFLAGS"
241 OLD_LD_FLAGS="$LDFLAGS"
243 AC_ARG_WITH(osl_headers, [AS_HELP_STRING(--with-osl-headers=dir,
244 [look for osl.h also in dir])])
245 if test -n "$with_osl_headers"; then
246 osl_cppflags="-I$with_osl_headers"
247 CPPFLAGS="$CPPFLAGS $osl_cppflags"
249 AC_ARG_WITH(osl_libs, [AS_HELP_STRING(--with-osl-libs=dir,
250 [look for libosl also in dir])])
251 if test -n "$with_osl_libs"; then
252 osl_libs="-L$with_osl_libs"
253 LDFLAGS="$LDFLAGS $osl_libs"
256 AC_CHECK_HEADER(osl.h, [], have_osl=no)
257 AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no)
258 if test "$have_osl" = "no"; then
259 AC_MSG_WARN([libosl not found, can not build para_server.
261 http://systemlinux.org/~maan/osl
263 git clone git://git.tuebingen.mpg.de/osl
266 extras="$extras server"
267 executables="$executables server"
268 server_cmdline_objs="add_cmdline(server)"
269 server_errlist_objs="server afh_common mp3_afh vss command net
270 string signal time daemon http_send close_on_fork mm
271 crypt_common ipc dccp_send fd user_list chunk_queue
272 afs aft mood score attribute blob playlist sched acl
273 send_common udp_send color fec wma_afh wma_common sideband"
274 all_errlist_objs="$all_errlist_objs server vss command
275 http_send close_on_fork mm ipc dccp_send user_list
276 chunk_queue afs aft mood score attribute blob playlist
280 server_audio_formats="mp3 wma"
281 AC_SUBST(osl_cppflags)
282 server_ldflags="$server_ldflags $osl_libs -losl"
284 CPPFLAGS="$OLD_CPPFLAGS"
285 LDFLAGS="$OLD_LDFLAGS"
287 ########################################################################### crypto
288 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
289 Force using crypto library "lib". This package requires either
290 openssl or libgcrypt being installed. Possible values for "lib"
291 are thus "openssl" and "gcrypt". If this option is not given,
292 openssl is tried first. If openssl was not found, gcrypt is
295 case "$enable_cryptolib" in
296 "openssl") check_openssl="yes"; check_gcrypt="no";;
297 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
298 "") check_openssl="yes"; check_gcrypt="yes";;
299 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
301 ###################################################################### openssl
302 if test "$check_openssl" = "yes"; then
303 OLD_CPPFLAGS="$CPPFLAGS"
304 OLD_LD_FLAGS="$LDFLAGS"
307 AC_ARG_WITH(openssl_headers, [AS_HELP_STRING(--with-openssl-headers=dir,
308 [look for openssl headers also in dir])])
309 if test -n "$with_openssl_headers"; then
310 openssl_cppflags="-I$with_openssl_headers"
311 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
313 AC_ARG_WITH(openssl_libs, [AS_HELP_STRING(--with-openssl-libs=dir,
314 [look for openssl libraries also in dir])])
315 if test -n "$with_openssl_libs"; then
316 openssl_libs="-L$with_openssl_libs"
317 LDFLAGS="$LDFLAGS $openssl_libs"
319 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
320 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
321 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
322 # try harder: openssl is sometimes installed in /usr/local/ssl
323 openssl_cppflags="-I/usr/local/ssl/include"
324 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
325 openssl_libs="-L/usr/local/ssl/lib"
326 LDFLAGS="$LDFLAGS $openssl_libs"
328 unset ac_cv_header_openssl_ssl_h 2> /dev/null
329 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
330 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
331 if test "$have_openssl" = "yes"; then
332 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
335 if test "$have_openssl" = "yes"; then
336 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
337 AC_SUBST(openssl_cppflags)
338 openssl_libs="$openssl_libs -lssl -lcrypto"
339 server_ldflags="$server_ldflags $openssl_libs"
340 client_ldflags="$client_ldflags $openssl_libs"
341 audiod_ldflags="$audiod_ldflags $openssl_libs"
343 all_errlist_objs="$all_errlist_objs crypt"
344 server_errlist_objs="$server_errlist_objs crypt"
345 client_errlist_objs="$client_errlist_objs crypt"
346 audiod_errlist_objs="$audiod_errlist_objs crypt"
350 AC_MSG_WARN([openssl libraries not found])
352 CPPFLAGS="$OLD_CPPFLAGS"
353 LDFLAGS="$OLD_LDFLAGS"
358 ########################################################################### gcrypt
359 if test "$check_gcrypt" = "yes"; then
360 OLD_CPPFLAGS="$CPPFLAGS"
361 OLD_LD_FLAGS="$LDFLAGS"
364 AC_ARG_WITH(gcrypt_headers, [AS_HELP_STRING(--with-gcrypt-headers=dir,
365 [look for gcrypt headers also in dir])])
366 if test -n "$with_gcrypt_headers"; then
367 gcrypt_cppflags="-I$with_gcrypt_headers"
368 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
370 AC_ARG_WITH(gcrypt_libs, [AS_HELP_STRING(--with-gcrypt-libs=dir,
371 [look for libgcrypt also in dir])])
372 if test -n "$with_gcrypt_libs"; then
373 gcrypt_libs="-L$with_gcrypt_libs"
374 LDFLAGS="$LDFLAGS $gcrypt_libs"
376 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
377 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
378 if test "$have_gcrypt" = "yes"; then
379 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
380 AC_SUBST(gcrypt_cppflags)
381 gcrypt_libs="$gcrypt_libs -lgcrypt"
382 server_ldflags="$server_ldflags $gcrypt_libs"
383 client_ldflags="$client_ldflags $gcrypt_libs"
384 audiod_ldflags="$audiod_ldflags $gcrypt_libs"
386 all_errlist_objs="$all_errlist_objs gcrypt"
387 server_errlist_objs="$server_errlist_objs gcrypt"
388 client_errlist_objs="$client_errlist_objs gcrypt"
389 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
391 AC_MSG_WARN([gcrypt library not found])
393 CPPFLAGS="$OLD_CPPFLAGS"
394 LDFLAGS="$OLD_LDFLAGS"
399 ###########################################################################
400 if test "$have_openssl" = "no" -a "$have_gcrypt" = "no"; then
401 AC_MSG_ERROR([neither openssl nor gcrypt usable])
403 ########################################################################### libsocket
404 AC_CHECK_LIB([c], [socket],
406 [socket_lib="-lsocket"]
408 server_ldflags="$server_ldflags $socket_lib"
409 client_ldflags="$client_ldflags $socket_lib"
410 audioc_ldflags="$audioc_ldflags $socket_lib"
411 audiod_ldflags="$audiod_ldflags $socket_lib"
412 recv_ldflags="$recv_ldflags $socket_lib"
413 AC_SEARCH_LIBS([connect],[socket],[],[
414 AC_MSG_ERROR([Fatal: Did not find connect().])
416 ########################################################################### libnsl
417 AC_CHECK_LIB([c], [gethostbyname],
421 server_ldflags="$server_ldflags $nsl_lib"
422 client_ldflags="$client_ldflags $nsl_lib"
423 audioc_ldflags="$audioc_ldflags $nsl_lib"
424 recv_ldflags="$recv_ldflags $nsl_lib"
425 AC_SEARCH_LIBS([inet_ntoa],[nsl],[],[
426 AC_MSG_ERROR([Fatal: Did not find inet_ntoa().])
428 ########################################################################### ucred
429 AC_MSG_CHECKING(for struct ucred)
430 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
432 #include <sys/types.h>
433 #include <sys/socket.h>
435 struct ucred sucred; sucred.pid=0;
436 ]])],[have_ucred=yes],[have_ucred=no])
437 AC_MSG_RESULT($have_ucred)
438 if test ${have_ucred} = yes; then
439 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
442 ########################################################################### curses
444 OLD_CPPFLAGS="$CPPFLAGS"
445 OLD_LD_FLAGS="$LDFLAGS"
447 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
448 [look for curses.h also in dir])])
449 if test -n "$with_curses_headers"; then
450 curses_cppflags="-I$with_curses_headers"
451 CPPFLAGS="$CPPFLAGS $curses_cppflags"
453 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
454 [look for libcurses also in dir])])
455 if test -n "$with_curses_libs"; then
456 curses_libs="-L$with_curses_libs"
457 LDFLAGS="$LDFLAGS $curses_libs"
459 AC_CHECK_HEADER(curses.h, [], [
462 AC_CHECK_LIB([curses], [initscr], [], [
465 if test "$have_curses" = "yes"; then
466 AC_SUBST(curses_cppflags)
467 AC_DEFINE(HAVE_NCURSES, 1, [define to 1 to turn on curses support])
469 executables="$executables gui"
471 AC_MSG_WARN([cannot build para_gui])
473 CPPFLAGS="$OLD_CPPFLAGS"
474 LDFLAGS="$OLD_LDFLAGS"
477 ########################################################################### ip_mreqn
478 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
479 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
485 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
486 AC_MSG_RESULT($have_ip_mreqn)
487 if test ${have_ip_mreqn} = yes; then
488 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
490 ########################################################################### osx
492 AC_MSG_CHECKING(for CoreAudio (MacOs))
493 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
494 #include <CoreAudio/CoreAudio.h>
497 ]])],[have_core_audio=yes],[have_core_audio=no])
498 AC_MSG_RESULT($have_core_audio)
499 if test ${have_core_audio} = yes; then
500 f1="-framework CoreAudio"
501 f2="-framework AudioToolbox"
502 f3="-framework AudioUnit"
503 f4="-framework CoreServices"
506 all_errlist_objs="$all_errlist_objs osx_write"
507 # ipc is linked into para_server server and into the osx writer. If osl
508 # was not found, para_server will not be built and ipc has not yet been
509 # added to the list of all objects, so we must add it here.
510 if test "$have_osl" = "no"; then
511 all_errlist_objs="$all_errlist_objs ipc"
513 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
514 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
515 audiod_ldflags="$audiod_ldflags $f"
517 write_errlist_objs="$write_errlist_objs osx_write ipc"
518 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
519 write_ldflags="$write_ldflags $f"
520 writers="$writers osx"
521 default_writer="OSX_WRITE"
522 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
524 ########################################################### ogg/vorbis/speex
526 OLD_CPPFLAGS="$CPPFLAGS"
527 OLD_LD_FLAGS="$LDFLAGS"
529 AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir,
530 [look for ogg headers also in dir])])
531 AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir,
532 [look for ogg libs also in dir])])
533 AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir,
534 [look for vorbis headers also in dir])])
535 AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir,
536 [look for vorbis libs also in dir])])
537 AC_ARG_WITH(speex_headers, [AS_HELP_STRING(--with-speex-headers=dir,
538 [look for speex headers also in dir])])
539 AC_ARG_WITH(speex_libs, [AS_HELP_STRING(--with-speex-libs=dir,
540 [look for speex libs also in dir])])
542 if test -n "$with_ogg_headers"; then
543 ogg_cppflags="-I$with_ogg_headers"
544 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
546 if test -n "$with_ogg_libs"; then
547 ogg_libs="-L$with_ogg_libs"
548 LDFLAGS="$LDFLAGS $ogg_libs"
550 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
551 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
555 if test "$have_ogg" = "yes"; then
557 if test -n "$with_vorbis_headers"; then
558 vorbis_cppflags="-I$with_vorbis_headers"
559 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
561 if test -n "$with_vorbis_libs"; then
562 vorbis_libs="-L$with_vorbis_libs"
563 LDFLAGS="$LDFLAGS $vorbis_libs"
565 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
566 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
569 if test -n "$with_speex_headers"; then
570 speex_cppflags="-I$with_speex_headers"
571 CPPFLAGS="$CPPFLAGS $speex_cppflags"
573 if test -n "$with_speex_libs"; then
574 speex_libs="-L$with_speex_libs"
575 LDFLAGS="$LDFLAGS $speex_libs"
577 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
578 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
580 AC_MSG_WARN([vorbis/speex depend on libogg, which was not detected])
585 msg="support in para_server/para_filter/para_afh"
586 if test "$have_vorbis" = "yes" || test "$have_speex" = "yes"; then
587 AC_SUBST(ogg_cppflags)
588 ogg_libs="$ogg_libs -logg"
589 if test "$OSTYPE" = "Darwin"; then
590 ogg_libs="-Wl,-bind_at_load $ogg_libs"
592 server_ldflags="$server_ldflags $ogg_libs"
593 filter_ldflags="$filter_ldflags $ogg_libs"
594 audiod_ldflags="$audiod_ldflags $ogg_libs"
595 afh_ldflags="$afh_ldflags $ogg_libs"
596 recv_ldflags="$recv_ldflags $ogg_libs"
597 all_errlist_objs="$all_errlist_objs ogg_afh_common"
598 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
599 recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
600 server_errlist_objs="$server_errlist_objs ogg_afh_common"
602 if test "$have_vorbis" = "yes"; then
603 all_errlist_objs="$all_errlist_objs oggdec_filter ogg_afh"
604 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
605 filters="$filters oggdec"
606 vorbis_libs="-lvorbis -lvorbisfile"
607 server_ldflags="$server_ldflags $vorbis_libs"
608 filter_ldflags="$filter_ldflags $vorbis_libs"
609 audiod_ldflags="$audiod_ldflags $vorbis_libs"
610 afh_ldflags="$afh_ldflags $vorbis_libs"
611 recv_ldflags="$recv_ldflags $vorbis_libs"
613 server_errlist_objs="$server_errlist_objs ogg_afh"
614 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
615 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
616 afh_errlist_objs="$afh_errlist_objs ogg_afh"
617 recv_errlist_objs="$recv_errlist_objs ogg_afh"
619 audiod_audio_formats="$audiod_audio_formats ogg"
620 server_audio_formats="$server_audio_formats ogg"
622 AC_MSG_WARN([no ogg/vorbis $msg])
624 if test "$have_speex" = "yes"; then
625 all_errlist_objs="$all_errlist_objs spxdec_filter spx_afh spx_common"
626 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
627 filters="$filters spxdec"
629 server_ldflags="$server_ldflags $speex_libs"
630 filter_ldflags="$filter_ldflags $speex_libs"
631 audiod_ldflags="$audiod_ldflags $speex_libs"
632 afh_ldflags="$afh_ldflags $speex_libs"
633 recv_ldflags="$recv_ldflags $speex_libs"
635 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
636 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
637 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
638 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
639 recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
641 audiod_audio_formats="$audiod_audio_formats spx"
642 server_audio_formats="$server_audio_formats spx"
644 AC_MSG_WARN([no ogg/speex $msg])
646 CPPFLAGS="$OLD_CPPFLAGS"
647 LDFLAGS="$OLD_LDFLAGS"
649 ########################################################################### faad
651 OLD_CPPFLAGS="$CPPFLAGS"
652 OLD_LD_FLAGS="$LDFLAGS"
654 AC_ARG_WITH(faad_headers, [AS_HELP_STRING(--with-faad-headers=dir,
655 [look for neaacdec.h also in dir])])
656 if test -n "$with_faad_headers"; then
657 faad_cppflags="-I$with_faad_headers"
658 CPPFLAGS="$CPPFLAGS $faad_cppflags"
660 AC_ARG_WITH(faad_libs, [AS_HELP_STRING(--with-faad-libs=dir,
661 [look for libfaad also in dir])])
662 if test -n "$with_faad_libs"; then
663 faad_libs="-L$with_faad_libs"
664 LDFLAGS="$LDFLAGS $faad_libs"
666 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
667 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
668 if test "$have_faad" = "yes"; then
669 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
670 all_errlist_objs="$all_errlist_objs aac_common aacdec_filter aac_afh"
671 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
672 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
673 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
674 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
675 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
677 server_ldflags="$server_ldflags $faad_libs -lfaad"
678 filter_ldflags="$filter_ldflags $faad_libs -lfaad"
679 audiod_ldflags="$audiod_ldflags $faad_libs -lfaad"
680 afh_ldflags="$afh_ldflags $faad_libs -lfaad"
681 recv_ldflags="$afh_ldflags $faad_libs -lfaad"
683 audiod_audio_formats="$audiod_audio_formats aac"
684 server_audio_formats="$server_audio_formats aac"
685 filters="$filters aacdec"
686 AC_SUBST(faad_cppflags)
688 AC_MSG_WARN([no aac support in para_audiod/para_filter])
690 CPPFLAGS="$OLD_CPPFLAGS"
691 LDFLAGS="$OLD_LDFLAGS"
693 ########################################################################### mad
695 OLD_CPPFLAGS="$CPPFLAGS"
696 OLD_LD_FLAGS="$LDFLAGS"
699 AC_ARG_WITH(mad_headers, [AS_HELP_STRING(--with-mad-headers=dir,
700 [look for mad.h also in dir])])
701 if test -n "$with_mad_headers"; then
702 mad_cppflags="-I$with_mad_headers"
703 CPPFLAGS="$CPPFLAGS $mad_cppflags"
705 AC_ARG_WITH(mad_libs, [AS_HELP_STRING(--with-mad-libs=dir,
706 [look for libmad also in dir])])
707 if test -n "$with_mad_libs"; then
708 mad_libs="-L$with_mad_libs"
709 LDFLAGS="$LDFLAGS $mad_libs"
711 AC_CHECK_HEADERS([mad.h], [], [
714 AC_CHECK_LIB([mad], [mad_stream_init], [], [
717 if test "$have_mad" = "yes"; then
718 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
719 filter_cmdline_objs="$filter_cmdline_objs add_cmdline(mp3dec_filter)"
720 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(mp3dec_filter)"
721 all_errlist_objs="$all_errlist_objs mp3dec_filter"
722 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
723 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
724 filter_ldflags="$filter_ldflags $mad_libs -lmad"
725 audiod_ldflags="$audiod_ldflags $mad_libs -lmad"
726 audiod_audio_formats="$audiod_audio_formats mp3"
727 filters="$filters mp3dec"
728 AC_SUBST(mad_cppflags)
730 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
732 CPPFLAGS="$OLD_CPPFLAGS"
733 LDFLAGS="$OLD_LDFLAGS"
735 ###################################################################### libid3tag
736 OLD_CPPFLAGS="$CPPFLAGS"
737 OLD_LD_FLAGS="$LDFLAGS"
741 AC_ARG_WITH(id3tag_headers, [AS_HELP_STRING(--with-id3tag-headers=dir,
742 [look for id3tag header files also in dir])])
743 if test -n "$with_id3tag_headers"; then
744 id3tag_cppflags="-I$with_id3tag_headers"
745 CPPFLAGS="$CPPFLAGS $id3tag_cppflags"
747 AC_ARG_WITH(id3tag_libs, [AS_HELP_STRING(--with-id3tag-libs=dir,
748 [look for id3tag libs also in dir])])
749 if test -n "$with_id3tag_libs"; then
750 id3tag_libs="-L$with_id3tag_libs"
751 LDFLAGS="$LDFLAGS $id3tag_libs"
754 AC_MSG_CHECKING(for libid3tag)
755 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
758 struct id3_tag t = {.flags = 0};
759 ]])],[],[have_libid3tag=no])
760 AC_MSG_RESULT($have_libid3tag)
762 if test ${have_libid3tag} = yes; then
763 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
764 server_ldflags="$server_ldflags $id3tag_libs -lid3tag -lz"
765 afh_ldflags="$afh_ldflags $id3tag_libs -lid3tag -lz"
766 recv_ldflags="$recv_ldflags $id3tag_libs -lid3tag"
767 AC_SUBST(id3tag_cppflags)
769 AC_MSG_WARN([no support for id3v2 tags])
771 CPPFLAGS="$OLD_CPPFLAGS"
772 LDFLAGS="$OLD_LDFLAGS"
774 ########################################################################### flac
775 OLD_CPPFLAGS="$CPPFLAGS"
776 OLD_LD_FLAGS="$LDFLAGS"
780 AC_ARG_WITH(flac_headers, [AS_HELP_STRING(--with-flac-headers=dir,
781 [look for flac headers also in dir])])
782 if test -n "$with_flac_headers"; then
783 flac_cppflags="-I$with_flac_headers"
784 CPPFLAGS="$CPPFLAGS $flac_cppflags"
786 AC_ARG_WITH(flac_libs, [AS_HELP_STRING(--with-flac-libs=dir,
787 [look for flac libs also in dir])])
788 if test -n "$with_flac_libs"; then
789 flac_libs="-L$with_flac_libs"
790 LDFLAGS="$LDFLAGS $flac_libs"
792 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
793 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
794 if test "$have_flac" = "yes"; then
795 AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
796 all_errlist_objs="$all_errlist_objs flacdec_filter flac_afh"
797 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
798 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
799 afh_errlist_objs="$afh_errlist_objs flac_afh"
800 server_errlist_objs="$server_errlist_objs flac_afh"
801 recv_errlist_objs="$recv_errlist_objs flac_afh"
802 filter_ldflags="$filter_ldflags $flac_libs -lFLAC"
803 audiod_ldflags="$audiod_ldflags $flac_libs -lFLAC"
804 server_ldflags="$server_ldflags $flac_libs -lFLAC"
805 afh_ldflags="$afh_ldflags $flac_libs -lFLAC"
806 recv_ldflags="$afh_ldflags $flac_libs -lFLAC"
807 filters="$filters flacdec"
808 server_audio_formats="$server_audio_formats flac"
809 audiod_audio_formats="$audiod_audio_formats flac"
810 AC_SUBST(flac_cppflags)
812 AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
814 CPPFLAGS="$OLD_CPPFLAGS"
815 LDFLAGS="$OLD_LDFLAGS"
817 ########################################################################### oss
818 OLD_CPPFLAGS="$CPPFLAGS"
819 OLD_LD_FLAGS="$LDFLAGS"
823 msg="=> will not build oss writer"
825 AC_CHECK_HEADER(sys/soundcard.h, [
826 audiod_errlist_objs="$audiod_errlist_objs oss_write"
827 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(oss_write)"
828 write_errlist_objs="$write_errlist_objs oss_write"
829 write_cmdline_objs="$write_cmdline_objs add_cmdline(oss_write)"
830 fade_errlist_objs="$fade_errlist_objs oss_mix"
831 all_errlist_objs="$all_errlist_objs oss_write oss_mix"
833 writers="$writers oss"
834 default_writer="OSS_WRITE"
835 mixers="${mixers}oss "
836 default_mixer="OSS_MIX"
838 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
839 audiod_ldflags="$audiod_ldflags -lossaudio"
840 write_ldflags="$write_ldflags -lossaudio"
841 fade_ldflags="$fade_ldflags -lossaudio"
847 AC_MSG_WARN([no sys/soundcard.h $msg])
850 CPPFLAGS="$OLD_CPPFLAGS"
851 LDFLAGS="$OLD_LDFLAGS"
854 ########################################################################### alsa
855 OLD_CPPFLAGS="$CPPFLAGS"
856 OLD_LD_FLAGS="$LDFLAGS"
859 msg="=> no alsa support for para_audiod/para_write"
860 if test "$OSTYPE" != "Linux"; then
865 if test "$have_alsa" = "yes"; then
866 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
868 AC_MSG_WARN([no alsa/asoundlib $msg])
872 if test "$have_alsa" = "yes"; then
873 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
875 AC_MSG_WARN([no libasound $msg])
879 if test "$have_alsa" = "yes"; then
880 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
881 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(alsa_write)"
882 audiod_ldflags="$audiod_ldflags -lasound"
883 write_errlist_objs="$write_errlist_objs alsa_write"
884 write_cmdline_objs="$write_cmdline_objs add_cmdline(alsa_write)"
885 write_ldflags="$write_ldflags -lasound"
886 fade_errlist_objs="$fade_errlist_objs alsa_mix"
887 fade_ldflags="$fade_ldflags -lasound"
888 all_errlist_objs="$all_errlist_objs alsa_write alsa_mix"
890 writers="$writers alsa"
891 default_writer="ALSA_WRITE"
892 mixers="${mixers}alsa "
893 default_mixer="ALSA_MIX"
896 CPPFLAGS="$OLD_CPPFLAGS"
897 LDFLAGS="$OLD_LDFLAGS"
899 ########################################################################### fade
900 if test -n "$mixers"; then
901 extras="$extras fade"
902 executables="$executables fade"
903 all_errlist_objs="$all_errlist_objs fade"
904 fade_errlist_objs="$fade_errlist_objs fade exec string fd"
905 fade_cmdline_objs="add_cmdline(fade)"
906 fade_objs="$fade_cmdline_objs $fade_errlist_objs"
907 AC_SUBST(fade_objs, add_dot_o($fade_objs))
908 AC_SUBST(fade_ldflags, $fade_ldflags)
909 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
910 objlist_to_errlist($fade_errlist_objs),
911 errors used by para_fade)
914 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
917 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
918 enum of supported mixers)
919 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
920 use this mixer if none was specified)
921 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
922 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
925 printf 'extern void '$i'_mix_init(struct mixer *); '
928 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
929 init functions of the supported mixers)
930 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
931 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
932 mixer_summary="supported mixers:: $mixers, default: $default_mixer"
934 AC_MSG_WARN([no mixer support])
935 mixer_summary="para_fade: no"
937 ########################################################################### libao
938 OLD_CPPFLAGS="$CPPFLAGS"
939 OLD_LD_FLAGS="$LDFLAGS"
943 AC_ARG_WITH(ao_headers, [AS_HELP_STRING(--with-ao-headers=dir,
944 [look for ao/ao.h also in dir])])
945 if test -n "$with_ao_headers"; then
946 ao_cppflags="-I$with_ao_headers"
947 CPPFLAGS="$CPPFLAGS $ao_cppflags"
949 AC_ARG_WITH(ao_libs, [AS_HELP_STRING(--with-ao-libs=dir,
950 [look for libao also in dir])])
951 if test -n "$with_ao_libs"; then
952 ao_libs="-L$with_ao_libs"
953 LDFLAGS="$LDFLAGS $ao_libs"
955 msg="no libao support for para_audiod/para_write"
956 AC_CHECK_HEADERS([ao/ao.h], [
959 AC_MSG_WARN([ao.h not found, $msg])
961 if test "$have_ao" = "yes"; then
962 AC_CHECK_LIB([ao], [ao_initialize], [], [
964 AC_MSG_WARN([ao lib not found or not working, $msg])
967 if test "$have_ao" = "yes"; then
968 AC_CHECK_HEADERS([pthread.h], [
971 AC_MSG_WARN([pthread.h not found, $msg])
974 if test "$have_ao" = "yes"; then
975 AC_CHECK_LIB([pthread], [pthread_create], [], [
977 AC_MSG_WARN([pthread lib not found or not working, $msg])
980 if test "$have_ao" = "yes"; then
981 all_errlist_objs="$all_errlist_objs ao_write"
982 audiod_errlist_objs="$audiod_errlist_objs ao_write"
983 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(ao_write)"
984 audiod_ldflags="$audiod_ldflags -lao -lpthread"
986 write_errlist_objs="$write_errlist_objs ao_write"
987 write_cmdline_objs="$write_cmdline_objs add_cmdline(ao_write)"
988 write_ldflags="$write_ldflags $ao_libs -lao -lpthread"
989 writers="$writers ao"
990 AC_SUBST(ao_cppflags)
993 CPPFLAGS="$OLD_CPPFLAGS"
994 LDFLAGS="$OLD_LDFLAGS"
996 ############################################################# readline
997 OLD_CPPFLAGS="$CPPFLAGS"
998 OLD_LD_FLAGS="$LDFLAGS"
1002 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
1003 [look for libreadline header files also in dir])])
1004 if test -n "$with_readline_headers"; then
1005 readline_cppflags="-I$with_readline_headers"
1006 CPPFLAGS="$CPPFLAGS $readline_cppflags"
1009 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
1010 [look for readline library also in dir])])
1011 if test -n "$with_readline_libs"; then
1012 readline_libs="-L$with_readline_libs"
1013 LDFLAGS="$LDFLAGS $readline_libs"
1015 msg="no interactive cli support"
1016 AC_CHECK_HEADERS([readline/readline.h], [
1019 AC_MSG_WARN([readline/readline.h not found, $msg])
1021 if test "$have_readline" = "yes"; then
1022 readline_libs="$readline_libs -lreadline"
1023 AC_SEARCH_LIBS([rl_replace_line], [readline], [], [have_readline="no"])
1024 if test "$have_readline" = "no"; then # try with -lcurses
1026 AC_MSG_NOTICE([trying again with -lcurses])
1027 unset ac_cv_search_rl_replace_line 2> /dev/null
1028 AC_SEARCH_LIBS([rl_replace_line], [readline], [
1030 readline_libs="$readline_libs -lcurses"
1033 if test "$have_readline" = "no"; then # try with -ltermcap
1035 AC_MSG_NOTICE([trying again with -ltermcap])
1036 unset ac_cv_search_rl_replace_line 2> /dev/null
1037 AC_SEARCH_LIBS([rl_replace_line], [readline], [
1039 readline_libs="$readline_libs -ltermcap"
1044 if test "$have_readline" = "yes"; then
1045 all_errlist_objs="$all_errlist_objs interactive"
1046 client_errlist_objs="$client_errlist_objs interactive"
1047 client_ldflags="$client_ldflags $readline_libs"
1048 audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
1049 audioc_ldflags="$audioc_ldflags $readline_libs"
1050 AC_SUBST(readline_cppflags)
1051 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
1053 AC_MSG_WARN([libreadline not found or unusable])
1055 CPPFLAGS="$OLD_CPPFLAGS"
1056 LDFLAGS="$OLD_LDFLAGS"
1058 ############################################################# error2.h
1059 AC_MSG_NOTICE(creating error2.h)
1060 for i in $executables; do
1062 eval echo \$${i}_errlist_objs
1063 done | ./error2.pl > error2.h
1064 for obj in $all_errlist_objs; do
1065 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
1067 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1068 [enum {$SS NUM_SS}],
1069 [list of all objects that use the paraslash error facility]
1072 ################################################################## status items
1074 status_items="basename status num_played mtime bitrate frequency file_size
1075 status_flags format score techinfo afs_mode
1076 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1077 offset seconds_total stream_start current_time audiod_uptime image_id
1078 lyrics_id duration directory lyrics_name image_name path hash channels
1079 last_played num_chunks chunk_time amplification artist title year album
1083 for i in $status_items; do
1084 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1086 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1087 [enum of all status items])
1090 for i in $status_items; do
1091 result="$result \"$i\", "
1093 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1094 [char * array of all status items])
1096 AC_DEFINE_UNQUOTED(SERVER_AUDIO_FORMATS, "$server_audio_formats",
1097 [formats supported by para_server and para_afh])
1099 AC_SUBST(executables, add_para($executables))
1101 recv_objs="$recv_cmdline_objs $recv_errlist_objs"
1102 filter_objs="$filter_cmdline_objs $filter_errlist_objs"
1103 audiod_objs="$audiod_cmdline_objs $audiod_errlist_objs"
1104 server_objs="$server_cmdline_objs $server_errlist_objs"
1105 write_objs="$write_cmdline_objs $write_errlist_objs"
1106 client_objs="$client_cmdline_objs $client_errlist_objs"
1107 audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs"
1108 afh_objs="$afh_cmdline_objs $afh_errlist_objs"
1110 AC_SUBST(recv_objs, add_dot_o($recv_objs))
1111 AC_SUBST(recv_ldflags, $recv_ldflags)
1112 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
1113 errors used by para_recv)
1115 AC_SUBST(filter_objs, add_dot_o($filter_objs))
1116 AC_SUBST(filter_ldflags, $filter_ldflags)
1117 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
1118 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
1120 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
1121 AC_SUBST(audiod_ldflags, $audiod_ldflags)
1122 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
1123 errors used by para_audiod)
1125 AC_SUBST(server_objs, add_dot_o($server_objs))
1126 AC_SUBST(server_ldflags, $server_ldflags)
1127 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
1128 objlist_to_errlist($server_errlist_objs), errors used by para_server)
1130 AC_SUBST(afh_objs, add_dot_o($afh_objs))
1131 AC_SUBST(afh_ldflags, $afh_ldflags)
1132 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
1133 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
1135 AC_SUBST(write_objs, add_dot_o($write_objs))
1136 AC_SUBST(write_ldflags, $write_ldflags)
1137 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1138 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1140 AC_SUBST(client_objs, add_dot_o($client_objs))
1141 AC_SUBST(client_ldflags, $client_ldflags)
1142 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
1143 objlist_to_errlist($client_errlist_objs), errors used by para_client)
1145 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1146 AC_SUBST(audioc_ldflags, $audioc_ldflags)
1147 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1148 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1150 AC_SUBST(gui_objs, add_dot_o($gui_objs))
1151 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
1152 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
1154 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
1155 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
1156 enum of supported filters)
1157 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
1158 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
1159 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
1160 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
1162 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1163 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1164 enum of supported writers)
1165 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1166 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1167 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1168 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1169 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1170 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1171 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1173 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
1174 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
1175 enum of audio formats supported by audiod)
1176 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
1177 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
1181 paraslash configuration:
1182 ~~~~~~~~~~~~~~~~~~~~~~~~
1183 unix socket credentials: $have_ucred
1184 readline (interactive CLIs): $have_readline
1185 audio formats supported by para_server/para_afh: $server_audio_formats
1186 id3 version2 support: $have_libid3tag
1187 filters supported by para_audiod/para_filter: $filters
1188 writers supported by para_audiod/para_write: $writers
1189 optional executables: $extras