build: Convert libsamplerate detection to new macros.
[paraslash.git] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.61])
5
6 AC_INIT([paraslash], [m4_esyscmd_s(./GIT-VERSION-GEN)],
7 [maan@tuebingen.mpg.de], [], [http://people.tuebingen.mpg.de/maan/paraslash/])
8 AC_CONFIG_HEADERS([config.h])
9
10 AC_CONFIG_FILES([Makefile])
11 AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
12 AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
13 AC_DEFUN([make_errlist_defines], \
14 $(for i in $@; do \
15 printf "DEFINE_ERRLIST($(echo $i | tr 'a-z' 'A-Z'));"; \
16 done) \
17 )
18 AC_DEFUN([make_para_errlists], \
19 $(for i in $@; do \
20 printf "PARA_ERRLIST($(echo $i | tr 'a-z' 'A-Z')), "; \
21 done) \
22 )
23 AC_DEFUN([objlist_to_errlist],[ \
24 make_errlist_defines($@) \
25 [const char **para_errlist[[]]] = {make_para_errlists($@)} \
26 ])
27 AC_DEFUN([LIB_ARG_WITH], [
28 AC_ARG_WITH($1-headers, [AS_HELP_STRING(--with-$1-headers=dir,
29 [look for $1 headers in dir])])
30 AC_ARG_WITH($1-libs, [AS_HELP_STRING(--with-$1-libs=dir,
31 [look for $1 libraries in dir])])
32 if test -n "$with_$1_headers"; then
33 $1_cppflags="-I$with_$1_headers"
34 CPPFLAGS="$CPPFLAGS $$1_cppflags"
35 fi
36 if test -n "$with_$1_libs"; then
37 $1_ldflags="-L$with_$1_libs $2"
38 else
39 $1_ldflags="$2"
40 fi
41 LDFLAGS="$LDFLAGS $$1_ldflags"
42 ])
43
44 AC_DEFUN([STASH_FLAGS], [
45 OLD_CPPFLAGS="$CPPFLAGS"
46 OLD_LDFLAGS="$LDFLAGS"
47 OLD_LIBS="$LIBS"
48 ])
49
50 AC_DEFUN([UNSTASH_FLAGS], [
51 CPPFLAGS="$OLD_CPPFLAGS"
52 LDFLAGS="$OLD_LDFLAGS"
53 LIBS="$OLD_LIBS"
54 ])
55 AC_DEFUN([LIB_SUBST_FLAGS], [
56 if test "$HAVE_[]m4_toupper([$1])" == 'yes'; then
57 AC_DEFINE(HAVE_[]m4_toupper([$1]), 1,
58 define to 1 to turn on $1 support)
59 else
60 $1_cppflags=
61 $1_ldflags=
62 fi
63 AC_SUBST(HAVE_[]m4_toupper([$1]))
64 AC_SUBST($1_cppflags)
65 AC_SUBST($1_ldflags)
66 ])
67
68 AC_PATH_PROG(UNAMEPATH, uname, no)
69 if test "$UNAMEPATH" = "no"; then
70 AC_MSG_ERROR(unable to determine system type)
71 fi
72 AC_MSG_CHECKING(os type)
73 OSTYPE="`$UNAMEPATH -s`"
74 AC_MSG_RESULT("$OSTYPE")
75
76 if test "$OSTYPE" = "SunOS"; then
77 # needed on SunOS for socket magic
78 arch_cppflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
79 AC_SUBST(arch_cppflags)
80 fi
81
82 AC_C_BIGENDIAN()
83
84 AC_PATH_PROG([gengetopt], [gengetopt])
85 test -z "$gengetopt" && AC_MSG_ERROR(
86 [gengetopt is required to build this package])
87
88 AC_PATH_PROG([help2man], [help2man])
89 test -z "$help2man" && AC_MSG_ERROR(
90 [help2man is required to build this package])
91
92 AC_PATH_PROG([install], [install])
93 test -z "$install" && AC_MSG_ERROR(
94 [The install program is required to build this package])
95
96 AC_PROG_CC
97 AC_PROG_CPP
98
99 executables="recv filter audioc write afh play"
100 ################################################################## clock_gettime
101 clock_gettime_lib=
102 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
103 AC_CHECK_LIB([rt], [clock_gettime], [clock_gettime_lib=rt], [], [])
104 ])
105 if test -n "$clock_gettime_lib"; then
106 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [
107 define to 1 if clock_gettime() is supported])
108 fi
109 if test "$clock_gettime_lib" = "rt"; then
110 AC_SUBST(clock_gettime_ldflags, -lrt)
111 fi
112
113 ########################################################################### osl
114 STASH_FLAGS
115 LIB_ARG_WITH([osl], [-losl])
116 HAVE_OSL=yes
117 AC_CHECK_HEADER(osl.h, [], [HAVE_OSL=no])
118 AC_CHECK_LIB([osl], [osl_open_table], [], [HAVE_OSL=no])
119 LIB_SUBST_FLAGS(osl)
120 UNSTASH_FLAGS
121 ######################################################################## openssl
122 STASH_FLAGS
123 HAVE_OPENSSL=yes
124 LIB_ARG_WITH([openssl], [-lssl -lcrypto])
125 AC_CHECK_HEADER(openssl/ssl.h, [], [HAVE_OPENSSL=no])
126 AC_CHECK_LIB([crypto], [RAND_bytes], [], [HAVE_OPENSSL=no])
127 LIB_SUBST_FLAGS(openssl)
128 UNSTASH_FLAGS
129 ######################################################################### gcrypt
130 STASH_FLAGS
131 HAVE_GCRYPT=yes
132 LIB_ARG_WITH([gcrypt], [-lgcrypt])
133 AC_CHECK_HEADER(gcrypt.h, [], [HAVE_GCRYPT=no])
134 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [HAVE_GCRYPT=no])
135 LIB_SUBST_FLAGS(gcrypt)
136 UNSTASH_FLAGS
137 ######################################################################### crypto
138 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
139 Force using crypto library "lib". This package requires either
140 openssl or libgcrypt being installed. Possible values for "lib"
141 are thus "openssl" and "gcrypt". If this option is not given,
142 openssl is tried first. If openssl was not found, gcrypt is
143 tried next.])])
144
145 CRYPTOLIB="$enable_cryptolib"
146 case "$enable_cryptolib" in
147 "openssl")
148 test $HAVE_OPENSSL = no && AC_MSG_ERROR(openssl not found)
149 crypto_ldflags="$openssl_ldflags"
150 ;;
151 "gcrypt")
152 test $HAVE_GCRYPT = no && AC_MSG_ERROR(gcrypt not found)
153 crypto_ldflags="$gcrypt_ldflags"
154 ;;
155 "")
156 crypto_ldflags=
157 if test $HAVE_GCRYPT = yes; then
158 CRYPTOLIB=gcrypt
159 crypto_ldflags="$gcrypt_ldflags"
160 fi
161 if test $HAVE_OPENSSL = yes; then
162 CRYPTOLIB=openssl
163 crypto_ldflags="$openssl_ldflags"
164 fi
165 ;;
166 *)
167 AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib])
168 ;;
169 esac
170 AC_SUBST(crypto_ldflags)
171 ########################################################################### libsocket
172 AC_CHECK_LIB([c], [socket],
173 [socket_ldlflags=],
174 [socket_ldflags="-lsocket"]
175 )
176 AC_SUBST(socket_ldflags)
177 ########################################################################### libnsl
178 AC_CHECK_LIB([c], [gethostbyname],
179 [nsl_ldflags=],
180 [nsl_ldflags="-lnsl"]
181 )
182 AC_SUBST(nsl_ldflags)
183 ########################################################################### ucred
184 AC_MSG_CHECKING(for struct ucred)
185 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
186 #define _GNU_SOURCE
187 #include <sys/types.h>
188 #include <sys/socket.h>
189 ]], [[
190 struct ucred sucred; sucred.pid=0;
191 ]])],[have_ucred=yes],[have_ucred=no])
192 AC_MSG_RESULT($have_ucred)
193 if test ${have_ucred} = yes; then
194 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
195 fi
196 ########################################################################### gengetopt
197 echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
198 AC_CHECK_DECL(
199 [gengetopt_args_info_description],
200 [ggo_descriptions_declared=yes],
201 [ggo_descriptions_declared=no],
202 [#include "conftest-ggo.h"]
203 )
204 AC_SUBST(ggo_descriptions_declared)
205 ########################################################################### curses
206 have_curses="yes"
207 OLD_CPPFLAGS="$CPPFLAGS"
208 OLD_LDFLAGS="$LDFLAGS"
209 OLD_LIBS="$LIBS"
210 AC_ARG_WITH(curses_headers, [AS_HELP_STRING(--with-curses-headers=dir,
211 [look for curses.h also in dir])])
212 if test -n "$with_curses_headers"; then
213 curses_cppflags="-I$with_curses_headers"
214 CPPFLAGS="$CPPFLAGS $curses_cppflags"
215 fi
216 AC_ARG_WITH(curses_libs, [AS_HELP_STRING(--with-curses-libs=dir,
217 [look for libcurses also in dir])])
218 if test -n "$with_curses_libs"; then
219 curses_libs="-L$with_curses_libs"
220 LDFLAGS="$LDFLAGS $curses_libs"
221 fi
222 AC_CHECK_HEADER(curses.h, [], [
223 have_curses="no"
224 ])
225 curses_ldflags="$curses_libs"
226 AC_CHECK_LIB([ncursesw], [initscr],
227 [curses_ldflags="$curses_libs -lncursesw"], [
228 AC_CHECK_LIB([curses], [initscr],
229 [curses_ldflags="$curses_libs -lcurses"],
230 [have_curses="no"]
231 )
232 ]
233 )
234 AC_SUBST(curses_cppflags)
235 AC_SUBST(curses_ldflags)
236 CPPFLAGS="$OLD_CPPFLAGS"
237 LDFLAGS="$OLD_LDFLAGS"
238 LIBS="$OLD_LIBS"
239 ########################################################################### ip_mreqn
240 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
241 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
242 #include <netdb.h>
243 #include <net/if.h>
244 ]], [[
245 struct ip_mreqn mn;
246 mn.imr_ifindex = 0;
247 ]])],[have_ip_mreqn=yes],[have_ip_mreqn=no])
248 AC_MSG_RESULT($have_ip_mreqn)
249 if test ${have_ip_mreqn} = yes; then
250 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
251 fi
252 ########################################################################### osx
253
254 AC_MSG_CHECKING(for CoreAudio (MacOs))
255 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
256 #include <CoreAudio/CoreAudio.h>
257 ]], [[
258 AudioDeviceID id;
259 ]])],[have_core_audio=yes],[have_core_audio=no])
260 AC_MSG_RESULT($have_core_audio)
261 if test ${have_core_audio} = yes; then
262 f1="-framework CoreAudio"
263 f2="-framework AudioToolbox"
264 f3="-framework AudioUnit"
265 f4="-framework CoreServices"
266 core_audio_ldflags="$f1 $f2 $f3 $f4"
267 AC_SUBST(core_audio_ldflags)
268 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
269 fi
270 ########################################################################### ogg
271 STASH_FLAGS
272 LIB_ARG_WITH([ogg], [-logg])
273 HAVE_OGG=yes
274 AC_CHECK_HEADERS([ogg/ogg.h], [], [HAVE_OGG=no])
275 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [HAVE_OGG=no])
276 LIB_SUBST_FLAGS(ogg)
277 UNSTASH_FLAGS
278 ######################################################################### vorbis
279 STASH_FLAGS
280 LIB_ARG_WITH([vorbis], [-lvorbis -lvorbisfile])
281 HAVE_VORBIS=yes
282 AC_CHECK_HEADERS([vorbis/codec.h], [], [HAVE_VORBIS=no])
283 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [HAVE_VORBIS=no])
284 LIB_SUBST_FLAGS(vorbis)
285 UNSTASH_FLAGS
286 ######################################################################### speex
287 STASH_FLAGS
288 LIB_ARG_WITH([speex], [-lspeex])
289 HAVE_SPEEX=yes
290 AC_CHECK_HEADERS([speex/speex.h], [], [HAVE_SPEEX=no])
291 AC_CHECK_LIB([speex], [speex_decoder_init], [], [HAVE_SPEEX=no])
292 LIB_SUBST_FLAGS(speex)
293 UNSTASH_FLAGS
294 ######################################################################### opus
295 STASH_FLAGS
296 LIB_ARG_WITH([opus], [-lopus])
297 HAVE_OPUS=yes
298 AC_CHECK_HEADERS([opus/opus.h], [], [HAVE_OPUS=no])
299 AC_CHECK_LIB([opus], [opus_multistream_decode], [], [HAVE_OPUS=no])
300 LIB_SUBST_FLAGS(opus)
301 UNSTASH_FLAGS
302 ########################################################################### flac
303 STASH_FLAGS
304 LIB_ARG_WITH([flac], [-lFLAC -lm])
305 HAVE_FLAC=yes
306 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], HAVE_FLAC=no)
307 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], HAVE_FLAC=no)
308 LIB_SUBST_FLAGS(flac)
309 UNSTASH_FLAGS
310
311 # some helper functions for codecs which use the ogg container format
312 AC_DEFUN([NEED_OGG_OBJECTS], [{
313 test "$HAVE_OGG" = 'yes' -a \( \
314 "$HAVE_VORBIS" = 'yes' \
315 -o "$HAVE_SPEEX" = 'yes' \
316 -o "$HAVE_OPUS" = 'yes' \
317 -o "$HAVE_FLAC" = 'yes' \
318 \)
319 }])
320 AC_DEFUN([NEED_VORBIS_OBJECTS], [{
321 test "$HAVE_OGG" = 'yes' -a "$HAVE_VORBIS" = 'yes'
322 }])
323 AC_DEFUN([NEED_SPEEX_OBJECTS], [{
324 test "$HAVE_OGG" = 'yes' -a "$HAVE_SPEEX" = 'yes'
325 }])
326 AC_DEFUN([NEED_OPUS_OBJECTS], [{
327 test "$HAVE_OGG" = 'yes' -a "$HAVE_OPUS" = 'yes'
328 }])
329 AC_DEFUN([NEED_FLAC_OBJECTS], [{
330 test "$HAVE_OGG" = 'yes' -a "$HAVE_FLAC" = 'yes'
331 }])
332 ########################################################################### faad
333 STASH_FLAGS
334 LIB_ARG_WITH([faad], [-lfaad])
335 HAVE_FAAD=yes
336 AC_CHECK_HEADER(neaacdec.h, [], HAVE_FAAD=no)
337 AC_CHECK_LIB([faad], [NeAACDecOpen], [], HAVE_FAAD=no)
338 LIB_SUBST_FLAGS(faad)
339 UNSTASH_FLAGS
340 ########################################################################### mad
341 STASH_FLAGS
342 LIB_ARG_WITH([mad], [-lmad])
343 HAVE_MAD=yes
344 AC_CHECK_HEADER(mad.h, [], HAVE_MAD=no)
345 AC_CHECK_LIB([mad], [mad_stream_init], [], HAVE_MAD=no)
346 LIB_SUBST_FLAGS(mad)
347 UNSTASH_FLAGS
348 ###################################################################### libid3tag
349 STASH_FLAGS
350 LIB_ARG_WITH([id3tag], [-lid3tag -lz])
351 HAVE_ID3TAG=yes
352 AC_CHECK_HEADER(id3tag.h, [], HAVE_ID3TAG=no)
353 AC_CHECK_LIB([id3tag], [id3_file_fdopen], [], HAVE_ID3TAG=no)
354 LIB_SUBST_FLAGS(id3tag)
355 UNSTASH_FLAGS
356 ########################################################################### oss
357 OLD_CPPFLAGS="$CPPFLAGS"
358 OLD_LDFLAGS="$LDFLAGS"
359 OLD_LIBS="$LIBS"
360
361 have_oss="yes"
362 msg="=> will not build oss writer"
363
364 AC_CHECK_HEADER(sys/soundcard.h, [
365 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
366 oss_ldflags="-lossaudio"
367 AC_SUBST(oss_ldflags)
368 ]
369 )
370 ],
371 [
372 have_oss="no"
373 AC_MSG_WARN([no sys/soundcard.h $msg])
374 ]
375 )
376 CPPFLAGS="$OLD_CPPFLAGS"
377 LDFLAGS="$OLD_LDFLAGS"
378 LIBS="$OLD_LIBS"
379
380 ########################################################################### alsa
381 STASH_FLAGS
382 LIB_ARG_WITH([alsa], [-lasound])
383 HAVE_ALSA=yes
384 AC_CHECK_HEADER(alsa/asoundlib.h, [], HAVE_ALSA=no)
385 AC_CHECK_LIB([asound], [snd_pcm_open], [], HAVE_ALSA=no)
386 LIB_SUBST_FLAGS(alsa)
387 UNSTASH_FLAGS
388 ######################################################################### pthread
389 STASH_FLAGS
390 LIB_ARG_WITH([pthread], [-lpthread])
391 HAVE_PTHREAD=yes
392 AC_CHECK_HEADER(pthread.h, [], HAVE_PTHREAD=no)
393 AC_CHECK_LIB([pthread], [pthread_create], [], HAVE_PTHREAD=no)
394 LIB_SUBST_FLAGS(pthread)
395 UNSTASH_FLAGS
396 ########################################################################### libao
397 STASH_FLAGS
398 LIB_ARG_WITH([ao], [-lao])
399 HAVE_AO=yes
400 AC_CHECK_HEADER(ao/ao.h, [], HAVE_AO=no)
401 AC_CHECK_LIB([ao], [ao_initialize], [], HAVE_AO=no)
402 LIB_SUBST_FLAGS(ao)
403 UNSTASH_FLAGS
404 AC_DEFUN([NEED_AO_OBJECTS], [{ test $HAVE_AO = yes -a $HAVE_PTHREAD = yes; }])
405 ############################################################# readline
406 OLD_CPPFLAGS="$CPPFLAGS"
407 OLD_LDFLAGS="$LDFLAGS"
408 OLD_LIBS="$LIBS"
409
410 have_readline="yes"
411 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
412 [look for libreadline header files also in dir])])
413 if test -n "$with_readline_headers"; then
414 readline_cppflags="-I$with_readline_headers"
415 CPPFLAGS="$CPPFLAGS $readline_cppflags"
416 fi
417
418 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
419 [look for readline library also in dir])])
420 if test -n "$with_readline_libs"; then
421 readline_libs="-L$with_readline_libs"
422 LDFLAGS="$LDFLAGS $readline_libs"
423 fi
424 msg="no interactive cli support"
425 AC_CHECK_HEADERS([readline/readline.h], [
426 ], [
427 have_readline="no"
428 AC_MSG_WARN([readline/readline.h not found, $msg])
429 ])
430
431 if test "$have_readline" = "yes"; then
432 readline_ldflags="$readline_libs"
433 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
434 readline_ldflags="$readline_ldflags -lreadline"
435 ], [have_readline="no"])
436 if test "$have_readline" = "no"; then # try with -lcurses
437 # clear cache
438 AC_MSG_NOTICE([trying again with -lcurses])
439 unset ac_cv_search_rl_free_keymap 2> /dev/null
440 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
441 have_readline=yes
442 readline_ldflags="$readline_ldflags -lreadline -lcurses"
443 ], [], [-lcurses])
444 fi
445 if test "$have_readline" = "no"; then # try with -ltermcap
446 # clear cache
447 AC_MSG_NOTICE([trying again with -ltermcap])
448 unset ac_cv_search_rl_free_keymap 2> /dev/null
449 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
450 have_readline=yes
451 readline_ldflags="$readline_ldflags -lreadline -ltermcap"
452 ], [], [-ltermcap])
453 fi
454 fi
455
456 if test "$have_readline" = "yes"; then
457 AC_CHECK_DECL(
458 [rl_free_keymap],
459 [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)],
460 [],
461 [
462 #include <stdio.h>
463 #include <readline/readline.h>
464 ]
465 )
466 AC_SUBST(readline_cppflags)
467 AC_SUBST(readline_ldflags)
468 AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
469 else
470 AC_MSG_WARN([libreadline not found or unusable])
471 fi
472 CPPFLAGS="$OLD_CPPFLAGS"
473 LDFLAGS="$OLD_LDFLAGS"
474 LIBS="$OLD_LIBS"
475 ############################################################# libsamplerate
476 STASH_FLAGS
477 LIB_ARG_WITH([samplerate], [-lsamplerate])
478 HAVE_SAMPLERATE=yes
479 AC_CHECK_HEADER(samplerate.h, [], HAVE_SAMPLERATE=no)
480 AC_CHECK_LIB([samplerate], [src_process], [], HAVE_SAMPLERATE=no)
481 LIB_SUBST_FLAGS(samplerate)
482 UNSTASH_FLAGS
483 ######################################################################### server
484 if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes; then
485 build_server="yes"
486 executables="$executables server"
487 server_cmdline_objs="server"
488 server_errlist_objs="
489 server
490 afh_common
491 mp3_afh
492 vss
493 command
494 net
495 string
496 signal
497 time
498 daemon
499 http_send
500 close_on_fork
501 mm
502 crypt_common
503 ipc
504 dccp_send
505 fd
506 user_list
507 chunk_queue
508 afs
509 aft
510 mood
511 score
512 attribute
513 blob
514 playlist
515 sched
516 acl
517 send_common
518 udp_send
519 color
520 fec
521 wma_afh
522 wma_common
523 sideband
524 version
525 ggo
526 "
527 if test "$CRYPTOLIB" = openssl; then
528 server_errlist_objs="$server_errlist_objs crypt"
529 else
530 server_errlist_objs="$server_errlist_objs gcrypt"
531 fi
532 NEED_OGG_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh_common"
533 NEED_VORBIS_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh"
534 NEED_SPEEX_OBJECTS() && server_errlist_objs="$server_errlist_objs spx_afh spx_common"
535 NEED_OPUS_OBJECTS() && server_errlist_objs="$server_errlist_objs opus_afh opus_common"
536 NEED_FLAC_OBJECTS && server_errlist_objs="$server_errlist_objs flac_afh"
537 test $HAVE_FAAD = yes && server_errlist_objs="$server_errlist_objs aac_afh aac_common"
538 server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
539 AC_SUBST(server_objs, add_dot_o($server_objs))
540 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
541 objlist_to_errlist($server_errlist_objs), errors used by para_server)
542 else
543 build_server="no"
544 fi
545 ############################################################# client
546 if test -n "$CRYPTOLIB"; then
547 build_client="yes"
548 executables="$executables client"
549 client_cmdline_objs="client"
550 client_errlist_objs="
551 client
552 net
553 string
554 fd
555 sched
556 stdin
557 stdout
558 time
559 sideband
560 client_common
561 buffer_tree
562 crypt_common
563 version
564 ggo
565 "
566 if test "$CRYPTOLIB" = openssl; then
567 client_errlist_objs="$client_errlist_objs crypt"
568 else
569 client_errlist_objs="$client_errlist_objs gcrypt"
570 fi
571 if test "$have_readline" = "yes"; then
572 client_errlist_objs="$client_errlist_objs interactive"
573 fi
574 client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
575 AC_SUBST(client_objs, add_dot_o($client_objs))
576 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
577 objlist_to_errlist($client_errlist_objs), errors used by para_client)
578 else
579 build_client="no"
580 fi
581 ############################################################# audiod
582 if test -n "$CRYPTOLIB"; then
583 build_audiod="yes"
584 executables="$executables audiod"
585 audiod_audio_formats="wma"
586 audiod_cmdline_objs="$audiod_cmdline_objs
587 audiod
588 compress_filter
589 http_recv
590 dccp_recv
591 file_write
592 client
593 amp_filter
594 udp_recv
595 prebuffer_filter
596 sync_filter
597 "
598 audiod_errlist_objs="$audiod_errlist_objs
599 audiod
600 signal
601 string
602 daemon
603 stat
604 net
605 crypt_common
606 sideband
607 time
608 grab_client
609 filter_common
610 wav_filter
611 compress_filter
612 amp_filter
613 http_recv
614 dccp_recv
615 recv_common
616 fd
617 sched
618 write_common
619 file_write
620 audiod_command
621 fecdec_filter
622 client_common
623 ggo
624 udp_recv
625 color
626 fec
627 prebuffer_filter
628 version
629 bitstream
630 imdct
631 wma_common
632 wmadec_filter
633 buffer_tree
634 sync_filter
635 "
636 if test "$CRYPTOLIB" = openssl; then
637 audiod_errlist_objs="$audiod_errlist_objs crypt"
638 else
639 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
640 fi
641 if test "$have_core_audio" = "yes"; then
642 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
643 audiod_cmdline_objs="$audiod_cmdline_objs osx_write"
644 fi
645 NEED_VORBIS_OBJECTS && {
646 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
647 audiod_audio_formats="$audiod_audio_formats ogg"
648 }
649 NEED_SPEEX_OBJECTS && {
650 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
651 audiod_audio_formats="$audiod_audio_formats spx"
652 }
653 NEED_OPUS_OBJECTS && {
654 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
655 audiod_audio_formats="$audiod_audio_formats opus"
656 }
657 NEED_FLAC_OBJECTS && {
658 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
659 audiod_audio_formats="$audiod_audio_formats flac"
660 }
661 if test $HAVE_FAAD = yes; then
662 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
663 audiod_audio_formats="$audiod_audio_formats aac"
664 fi
665 if test $HAVE_MAD = yes; then
666 audiod_audio_formats="$audiod_audio_formats mp3"
667 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
668 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
669 fi
670 if test "$have_oss" = "yes"; then
671 audiod_errlist_objs="$audiod_errlist_objs oss_write"
672 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
673 fi
674 if test $HAVE_ALSA = yes; then
675 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
676 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
677 fi
678 NEED_AO_OBJECTS && {
679 audiod_errlist_objs="$audiod_errlist_objs ao_write"
680 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
681 }
682 if test $HAVE_SAMPLERATE = yes; then
683 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
684 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
685 fi
686 audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
687 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
688 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
689 errors used by para_audiod)
690
691 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
692 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
693 enum of audio formats supported by audiod)
694 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
695 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
696 else
697 build_audiod="no"
698 fi
699 ########################################################################### fade
700 if test "$have_oss" = "yes" -o $HAVE_ALSA = yes; then
701 build_fade="yes"
702 executables="$executables fade"
703 fade_cmdline_objs="fade"
704 fade_errlist_objs="fade exec string fd version ggo"
705 if test "$have_oss" = "yes"; then
706 fade_errlist_objs="$fade_errlist_objs oss_mix"
707 mixers="${mixers}oss "
708 default_mixer="OSS_MIX"
709 fi
710 if test $HAVE_ALSA = yes; then
711 fade_errlist_objs="$fade_errlist_objs alsa_mix"
712 mixers="${mixers}alsa "
713 default_mixer="ALSA_MIX"
714 fi
715 fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
716 AC_SUBST(fade_objs, add_dot_o($fade_objs))
717 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
718 objlist_to_errlist($fade_errlist_objs),
719 errors used by para_fade)
720 enum="$(
721 for i in $mixers; do
722 printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
723 done
724 )"
725 AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
726 enum of supported mixers)
727 AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
728 use this mixer if none was specified)
729 names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
730 AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
731 inits="$(
732 for i in $mixers; do
733 printf 'extern void '$i'_mix_init(struct mixer *); '
734 done
735 )"
736 AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
737 init functions of the supported mixers)
738 array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
739 AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
740 else
741 build_fade="no"
742 AC_MSG_WARN([no mixer support])
743 fi
744 ########################################################################### gui
745 if test "$have_curses" = "yes"; then
746 build_gui="yes"
747 executables="$executables gui"
748 gui_cmdline_objs="gui"
749 gui_errlist_objs="
750 exec
751 signal
752 string
753 stat
754 ringbuffer
755 fd
756 gui
757 gui_theme
758 time
759 sched
760 version
761 ggo
762 "
763 gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
764 AC_SUBST(gui_objs, add_dot_o($gui_objs))
765 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
766 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
767 else
768 build_gui="no"
769 AC_MSG_WARN([no curses lib, cannot build para_gui])
770 fi
771 ######################################################################## filter
772 filters="
773 compress
774 wav
775 amp
776 fecdec
777 wmadec
778 prebuffer
779 sync
780 "
781 filter_errlist_objs="
782 filter_common
783 wav_filter
784 compress_filter
785 filter
786 string
787 stdin
788 stdout
789 sched
790 fd
791 amp_filter
792 ggo
793 fecdec_filter
794 fec
795 version
796 prebuffer_filter
797 time
798 bitstream
799 imdct
800 wma_common
801 wmadec_filter
802 buffer_tree
803 net
804 sync_filter
805 "
806 filter_cmdline_objs="
807 filter
808 compress_filter
809 amp_filter
810 prebuffer_filter
811 sync_filter
812 "
813 NEED_VORBIS_OBJECTS && {
814 filters="$filters oggdec"
815 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
816 }
817 NEED_SPEEX_OBJECTS && {
818 filters="$filters spxdec"
819 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
820 }
821 NEED_OPUS_OBJECTS && {
822 filters="$filters opusdec"
823 filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
824 }
825 NEED_FLAC_OBJECTS && {
826 filter_errlist_objs="$filter_errlist_objs flacdec_filter"
827 filters="$filters flacdec"
828 }
829 if test $HAVE_FAAD = yes; then
830 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
831 filters="$filters aacdec"
832 fi
833 if test $HAVE_MAD = yes; then
834 filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
835 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
836 filters="$filters mp3dec"
837 fi
838 if test $HAVE_SAMPLERATE = yes; then
839 filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
840 filter_cmdline_objs="$filter_cmdline_objs resample_filter"
841 filters="$filters resample"
842 fi
843 filters="$(echo $filters)"
844 AC_SUBST(filters)
845 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
846
847 AC_SUBST(filter_objs, add_dot_o($filter_objs))
848 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
849 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
850
851 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
852 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
853 enum of supported filters)
854 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
855 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
856 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
857 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
858 ########################################################################## recv
859 recv_cmdline_objs="
860 recv
861 http_recv
862 dccp_recv
863 udp_recv
864 afh_recv
865 "
866
867 recv_errlist_objs="
868 http_recv
869 recv_common
870 recv
871 time
872 string
873 net
874 dccp_recv
875 fd
876 sched
877 stdout
878 ggo
879 udp_recv
880 buffer_tree
881 afh_recv
882 afh_common
883 wma_afh
884 wma_common
885 mp3_afh
886 version
887 "
888 NEED_OGG_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
889 NEED_VORBIS_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh"
890 NEED_SPEEX_OBJECTS && recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
891 NEED_OPUS_OBJECTS && recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
892 NEED_FLAC_OBJECTS && recv_errlist_objs="$recv_errlist_objs flac_afh"
893
894 if test $HAVE_FAAD = yes; then
895 recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
896 fi
897 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
898 AC_SUBST(receivers, "http dccp udp afh")
899 AC_SUBST(recv_objs, add_dot_o($recv_objs))
900 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
901 errors used by para_recv)
902 ########################################################################### afh
903 audio_format_handlers="mp3 wma"
904 afh_cmdline_objs="afh"
905 afh_errlist_objs="
906 afh
907 string
908 fd
909 mp3_afh
910 afh_common
911 time
912 wma_afh
913 wma_common
914 version
915 ggo
916 "
917 NEED_OGG_OBJECTS && afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
918 NEED_VORBIS_OBJECTS && {
919 afh_errlist_objs="$afh_errlist_objs ogg_afh"
920 audio_format_handlers="$audio_format_handlers ogg"
921 }
922 NEED_SPEEX_OBJECTS && {
923 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
924 audio_format_handlers="$audio_format_handlers spx"
925 }
926 NEED_OPUS_OBJECTS && {
927 afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
928 audio_format_handlers="$audio_format_handlers opus"
929 }
930 NEED_FLAC_OBJECTS && {
931 afh_errlist_objs="$afh_errlist_objs flac_afh"
932 audio_format_handlers="$audio_format_handlers flac"
933 }
934 if test $HAVE_FAAD = yes; then
935 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
936 audio_format_handlers="$audio_format_handlers aac"
937 fi
938
939 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
940
941 AC_SUBST(afh_objs, add_dot_o($afh_objs))
942 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
943 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
944 ########################################################################## play
945 play_errlist_objs="
946 play
947 fd
948 sched
949 ggo
950 buffer_tree
951 time
952 string
953 net
954 afh_recv
955 afh_common
956 wma_afh
957 wma_common
958 mp3_afh
959 recv_common
960 udp_recv
961 http_recv
962 dccp_recv
963 filter_common
964 fec
965 bitstream
966 imdct
967 wav_filter
968 compress_filter
969 amp_filter
970 prebuffer_filter
971 fecdec_filter
972 wmadec_filter
973 write_common
974 file_write
975 version
976 sync_filter
977 "
978 play_cmdline_objs="
979 http_recv
980 dccp_recv
981 udp_recv
982 afh_recv
983 compress_filter
984 amp_filter
985 prebuffer_filter
986 file_write
987 play
988 sync_filter
989 "
990 if test "$have_core_audio" = "yes"; then
991 play_errlist_objs="$play_errlist_objs osx_write ipc"
992 play_cmdline_objs="$play_cmdline_objs osx_write"
993 fi
994 NEED_OGG_OBJECTS && play_errlist_objs="$play_errlist_objs ogg_afh_common"
995 NEED_VORBIS_OBJECTS && {
996 play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
997 }
998 NEED_SPEEX_OBJECTS && {
999 play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
1000 }
1001 NEED_OPUS_OBJECTS &&
1002 play_errlist_objs="$play_errlist_objs
1003 opusdec_filter
1004 opus_afh
1005 opus_common
1006 "
1007 NEED_FLAC_OBJECTS && {
1008 play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
1009 }
1010 if test $HAVE_FAAD = yes; then
1011 play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
1012 fi
1013 if test $HAVE_MAD = yes; then
1014 play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
1015 play_errlist_objs="$play_errlist_objs mp3dec_filter"
1016 fi
1017 if test "$have_oss" = "yes"; then
1018 play_errlist_objs="$play_errlist_objs oss_write"
1019 play_cmdline_objs="$play_cmdline_objs oss_write"
1020 fi
1021 if test $HAVE_ALSA = yes; then
1022 play_errlist_objs="$play_errlist_objs alsa_write"
1023 play_cmdline_objs="$play_cmdline_objs alsa_write"
1024 fi
1025 NEED_AO_OBJECTS && {
1026 play_errlist_objs="$play_errlist_objs ao_write"
1027 play_cmdline_objs="$play_cmdline_objs ao_write"
1028 }
1029 if test "$have_readline" = "yes"; then
1030 play_errlist_objs="$play_errlist_objs interactive"
1031 fi
1032 if test $HAVE_SAMPLERATE = yes; then
1033 play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1034 play_cmdline_objs="$play_cmdline_objs resample_filter"
1035 fi
1036
1037 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1038 AC_SUBST(play_objs, add_dot_o($play_objs))
1039 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1040 objlist_to_errlist($play_errlist_objs), errors used by para_play)
1041 ######################################################################### write
1042 write_cmdline_objs="
1043 write
1044 file_write
1045 "
1046 write_errlist_objs="
1047 write
1048 write_common
1049 file_write
1050 time
1051 fd
1052 string
1053 sched
1054 stdin
1055 buffer_tree
1056 ggo
1057 check_wav
1058 version
1059 "
1060 writers="file"
1061 default_writer="FILE_WRITE"
1062
1063 if test "$have_core_audio" = "yes"; then
1064 write_errlist_objs="$write_errlist_objs osx_write ipc"
1065 write_cmdline_objs="$write_cmdline_objs osx_write"
1066 writers="$writers osx"
1067 default_writer="OSX_WRITE"
1068 fi
1069 NEED_AO_OBJECTS && {
1070 write_errlist_objs="$write_errlist_objs ao_write"
1071 write_cmdline_objs="$write_cmdline_objs ao_write"
1072 writers="$writers ao"
1073 default_writer="AO_WRITE"
1074 }
1075 if test "$have_oss" = "yes"; then
1076 write_errlist_objs="$write_errlist_objs oss_write"
1077 write_cmdline_objs="$write_cmdline_objs oss_write"
1078 writers="$writers oss"
1079 default_writer="OSS_WRITE"
1080 fi
1081 if test $HAVE_ALSA = yes; then
1082 write_errlist_objs="$write_errlist_objs alsa_write"
1083 write_cmdline_objs="$write_cmdline_objs alsa_write"
1084 writers="$writers alsa"
1085 default_writer="ALSA_WRITE"
1086 fi
1087 AC_SUBST(writers)
1088 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1089 AC_SUBST(write_objs, add_dot_o($write_objs))
1090 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1091 objlist_to_errlist($write_errlist_objs), errors used by para_write)
1092 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1093 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1094 enum of supported writers)
1095 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1096 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1097 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1098 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1099 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1100 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1101 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1102 ######################################################################## audioc
1103 audioc_cmdline_objs="audioc"
1104 audioc_errlist_objs="
1105 audioc
1106 string
1107 net
1108 fd
1109 version
1110 ggo
1111 "
1112 if test "$have_readline" = "yes"; then
1113 audioc_errlist_objs="$audioc_errlist_objs
1114 buffer_tree
1115 interactive
1116 sched
1117 time
1118 "
1119 fi
1120 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1121 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1122 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1123 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1124 ############################################################# error2.h
1125 # these are always built
1126 all_errlist_objs="
1127 $recv_errlist_objs
1128 $filter_errlist_objs
1129 $audioc_errlist_objs
1130 $write_errlist_objs
1131 $afh_errlist_objs
1132 $play_errlist_objs
1133 "
1134
1135 # optional executables
1136 if test "$build_server" = "yes"; then
1137 all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1138 fi
1139 if test "$build_gui" = "yes"; then
1140 all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1141 fi
1142 if test "$build_fade" = "yes"; then
1143 all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1144 fi
1145 if test "$build_client" = "yes"; then
1146 all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1147 fi
1148 if test "$build_audiod" = "yes"; then
1149 all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1150 fi
1151
1152 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1153
1154 object_executable_matrix=
1155 for i in $executables; do
1156 eval objs=\$${i}_errlist_objs
1157 object_executable_matrix="$object_executable_matrix $i: $objs"
1158 done
1159 # use echo to replace newlines by space
1160 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1161
1162 SS=$(for obj in $all_errlist_objs; do
1163 printf '%s' " SS_$obj,"; done | tr 'a-z' 'A-Z')
1164 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1165 [enum {$SS NUM_SS}],
1166 [list of all objects that use the paraslash error facility]
1167 )
1168 ################################################################## status items
1169
1170 status_items="basename status num_played mtime bitrate frequency file_size
1171 status_flags format score techinfo afs_mode
1172 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1173 offset seconds_total stream_start current_time audiod_uptime image_id
1174 lyrics_id duration directory lyrics_name image_name path hash channels
1175 last_played num_chunks chunk_time amplification artist title year album
1176 comment"
1177
1178 result=
1179 for i in $status_items; do
1180 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1181 done
1182 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1183 [enum of all status items])
1184
1185 result=
1186 for i in $status_items; do
1187 result="$result \"$i\", "
1188 done
1189 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1190 [char * array of all status items])
1191
1192 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1193 [formats supported by para_server and para_afh])
1194
1195 AC_SUBST(executables)
1196
1197 AC_OUTPUT
1198 AC_MSG_NOTICE([
1199 paraslash configuration:
1200 ~~~~~~~~~~~~~~~~~~~~~~~~
1201 crypto lib: ${CRYPTOLIB:-[none]}
1202 unix socket credentials: $have_ucred
1203 readline (interactive CLIs): $have_readline
1204 audio formats handlers: $audio_format_handlers
1205 id3 version 2 support: $HAVE_ID3TAG
1206 filters: $filters
1207 writers: $writers
1208
1209 para_fade: $build_fade
1210 para_server: $build_server
1211 para_gui: $build_gui
1212 para_fade: $build_fade
1213 para_client: $build_client
1214 para_audiod: $build_audiod
1215 ])