]> git.tuebingen.mpg.de Git - paraslash.git/blob - configure.ac
98d75c78501e3d22ed934c5395c0c65c96dcd178
[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 STASH_FLAGS
358 LIB_ARG_WITH([oss], [])
359 AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=yes], [HAVE_OSS=no])
360 AC_CHECK_LIB(ossaudio, _oss_ioctl, [oss_ldflags="$oss_ldflags -lossaudio"], [])
361 LIB_SUBST_FLAGS(oss)
362 UNSTASH_FLAGS
363 ########################################################################### alsa
364 STASH_FLAGS
365 LIB_ARG_WITH([alsa], [-lasound])
366 HAVE_ALSA=yes
367 AC_CHECK_HEADER(alsa/asoundlib.h, [], HAVE_ALSA=no)
368 AC_CHECK_LIB([asound], [snd_pcm_open], [], HAVE_ALSA=no)
369 LIB_SUBST_FLAGS(alsa)
370 UNSTASH_FLAGS
371 ######################################################################### pthread
372 STASH_FLAGS
373 LIB_ARG_WITH([pthread], [-lpthread])
374 HAVE_PTHREAD=yes
375 AC_CHECK_HEADER(pthread.h, [], HAVE_PTHREAD=no)
376 AC_CHECK_LIB([pthread], [pthread_create], [], HAVE_PTHREAD=no)
377 LIB_SUBST_FLAGS(pthread)
378 UNSTASH_FLAGS
379 ########################################################################### libao
380 STASH_FLAGS
381 LIB_ARG_WITH([ao], [-lao])
382 HAVE_AO=yes
383 AC_CHECK_HEADER(ao/ao.h, [], HAVE_AO=no)
384 AC_CHECK_LIB([ao], [ao_initialize], [], HAVE_AO=no)
385 LIB_SUBST_FLAGS(ao)
386 UNSTASH_FLAGS
387 AC_DEFUN([NEED_AO_OBJECTS], [{ test $HAVE_AO = yes -a $HAVE_PTHREAD = yes; }])
388 ############################################################# readline
389 OLD_CPPFLAGS="$CPPFLAGS"
390 OLD_LDFLAGS="$LDFLAGS"
391 OLD_LIBS="$LIBS"
392
393 have_readline="yes"
394 AC_ARG_WITH(readline_headers, [AS_HELP_STRING(--with-readline-headers=dir,
395         [look for libreadline header files also in dir])])
396 if test -n "$with_readline_headers"; then
397         readline_cppflags="-I$with_readline_headers"
398         CPPFLAGS="$CPPFLAGS $readline_cppflags"
399 fi
400
401 AC_ARG_WITH(readline_libs, [AS_HELP_STRING(--with-readline-libs=dir,
402         [look for readline library also in dir])])
403 if test -n "$with_readline_libs"; then
404         readline_libs="-L$with_readline_libs"
405         LDFLAGS="$LDFLAGS $readline_libs"
406 fi
407 msg="no interactive cli support"
408 AC_CHECK_HEADERS([readline/readline.h], [
409         ], [
410         have_readline="no"
411         AC_MSG_WARN([readline/readline.h not found, $msg])
412 ])
413
414 if test "$have_readline" = "yes"; then
415         readline_ldflags="$readline_libs"
416         AC_SEARCH_LIBS([rl_free_keymap], [readline], [
417                 readline_ldflags="$readline_ldflags -lreadline"
418         ], [have_readline="no"])
419         if test "$have_readline" = "no"; then # try with -lcurses
420                 # clear cache
421                 AC_MSG_NOTICE([trying again with -lcurses])
422                 unset ac_cv_search_rl_free_keymap 2> /dev/null
423                 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
424                         have_readline=yes
425                         readline_ldflags="$readline_ldflags -lreadline -lcurses"
426                 ], [], [-lcurses])
427         fi
428         if test "$have_readline" = "no"; then # try with -ltermcap
429                 # clear cache
430                 AC_MSG_NOTICE([trying again with -ltermcap])
431                 unset ac_cv_search_rl_free_keymap 2> /dev/null
432                 AC_SEARCH_LIBS([rl_free_keymap], [readline], [
433                         have_readline=yes
434                         readline_ldflags="$readline_ldflags -lreadline -ltermcap"
435                 ], [], [-ltermcap])
436         fi
437 fi
438
439 if test "$have_readline" = "yes"; then
440         AC_CHECK_DECL(
441                 [rl_free_keymap],
442                 [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)],
443                 [],
444                 [
445                         #include <stdio.h>
446                         #include <readline/readline.h>
447                 ]
448         )
449         AC_SUBST(readline_cppflags)
450         AC_SUBST(readline_ldflags)
451         AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
452 else
453         AC_MSG_WARN([libreadline not found or unusable])
454 fi
455 CPPFLAGS="$OLD_CPPFLAGS"
456 LDFLAGS="$OLD_LDFLAGS"
457 LIBS="$OLD_LIBS"
458 ############################################################# libsamplerate
459 STASH_FLAGS
460 LIB_ARG_WITH([samplerate], [-lsamplerate])
461 HAVE_SAMPLERATE=yes
462 AC_CHECK_HEADER(samplerate.h, [], HAVE_SAMPLERATE=no)
463 AC_CHECK_LIB([samplerate], [src_process], [], HAVE_SAMPLERATE=no)
464 LIB_SUBST_FLAGS(samplerate)
465 UNSTASH_FLAGS
466 ######################################################################### server
467 if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes; then
468         build_server="yes"
469         executables="$executables server"
470         server_cmdline_objs="server"
471         server_errlist_objs="
472                 server
473                 afh_common
474                 mp3_afh
475                 vss
476                 command
477                 net
478                 string
479                 signal
480                 time
481                 daemon
482                 http_send
483                 close_on_fork
484                 mm
485                 crypt_common
486                 ipc
487                 dccp_send
488                 fd
489                 user_list
490                 chunk_queue
491                 afs
492                 aft
493                 mood
494                 score
495                 attribute
496                 blob
497                 playlist
498                 sched
499                 acl
500                 send_common
501                 udp_send
502                 color
503                 fec
504                 wma_afh
505                 wma_common
506                 sideband
507                 version
508                 ggo
509         "
510         if test "$CRYPTOLIB" = openssl; then
511                 server_errlist_objs="$server_errlist_objs crypt"
512         else
513                 server_errlist_objs="$server_errlist_objs gcrypt"
514         fi
515         NEED_OGG_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh_common"
516         NEED_VORBIS_OBJECTS() && server_errlist_objs="$server_errlist_objs ogg_afh"
517         NEED_SPEEX_OBJECTS() && server_errlist_objs="$server_errlist_objs spx_afh spx_common"
518         NEED_OPUS_OBJECTS() && server_errlist_objs="$server_errlist_objs opus_afh opus_common"
519         NEED_FLAC_OBJECTS && server_errlist_objs="$server_errlist_objs flac_afh"
520         test $HAVE_FAAD = yes && server_errlist_objs="$server_errlist_objs aac_afh aac_common"
521         server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
522         AC_SUBST(server_objs, add_dot_o($server_objs))
523         AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
524                 objlist_to_errlist($server_errlist_objs), errors used by para_server)
525 else
526         build_server="no"
527 fi
528 ############################################################# client
529 if test -n "$CRYPTOLIB"; then
530         build_client="yes"
531         executables="$executables client"
532         client_cmdline_objs="client"
533         client_errlist_objs="
534                 client
535                 net
536                 string
537                 fd
538                 sched
539                 stdin
540                 stdout
541                 time
542                 sideband
543                 client_common
544                 buffer_tree
545                 crypt_common
546                 version
547                 ggo
548         "
549         if test "$CRYPTOLIB" = openssl; then
550                 client_errlist_objs="$client_errlist_objs crypt"
551         else
552                 client_errlist_objs="$client_errlist_objs gcrypt"
553         fi
554         if test "$have_readline" = "yes"; then
555                 client_errlist_objs="$client_errlist_objs interactive"
556         fi
557         client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
558         AC_SUBST(client_objs, add_dot_o($client_objs))
559         AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
560                 objlist_to_errlist($client_errlist_objs), errors used by para_client)
561 else
562         build_client="no"
563 fi
564 ############################################################# audiod
565 if test -n "$CRYPTOLIB"; then
566         build_audiod="yes"
567         executables="$executables audiod"
568         audiod_audio_formats="wma"
569         audiod_cmdline_objs="$audiod_cmdline_objs
570                 audiod
571                 compress_filter
572                 http_recv
573                 dccp_recv
574                 file_write
575                 client
576                 amp_filter
577                 udp_recv
578                 prebuffer_filter
579                 sync_filter
580         "
581         audiod_errlist_objs="$audiod_errlist_objs
582                 audiod
583                 signal
584                 string
585                 daemon
586                 stat
587                 net
588                 crypt_common
589                 sideband
590                 time
591                 grab_client
592                 filter_common
593                 wav_filter
594                 compress_filter
595                 amp_filter
596                 http_recv
597                 dccp_recv
598                 recv_common
599                 fd
600                 sched
601                 write_common
602                 file_write
603                 audiod_command
604                 fecdec_filter
605                 client_common
606                 ggo
607                 udp_recv
608                 color
609                 fec
610                 prebuffer_filter
611                 version
612                 bitstream
613                 imdct
614                 wma_common
615                 wmadec_filter
616                 buffer_tree
617                 sync_filter
618         "
619         if test "$CRYPTOLIB" = openssl; then
620                 audiod_errlist_objs="$audiod_errlist_objs crypt"
621         else
622                 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
623         fi
624         if test "$have_core_audio" = "yes"; then
625                 audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
626                 audiod_cmdline_objs="$audiod_cmdline_objs osx_write"
627         fi
628         NEED_VORBIS_OBJECTS && {
629                 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
630                 audiod_audio_formats="$audiod_audio_formats ogg"
631         }
632         NEED_SPEEX_OBJECTS && {
633                 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
634                 audiod_audio_formats="$audiod_audio_formats spx"
635         }
636         NEED_OPUS_OBJECTS && {
637                 audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
638                 audiod_audio_formats="$audiod_audio_formats opus"
639         }
640         NEED_FLAC_OBJECTS && {
641                 audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
642                 audiod_audio_formats="$audiod_audio_formats flac"
643         }
644         if test $HAVE_FAAD = yes; then
645                 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
646                 audiod_audio_formats="$audiod_audio_formats aac"
647         fi
648         if test $HAVE_MAD = yes; then
649                 audiod_audio_formats="$audiod_audio_formats mp3"
650                 audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
651                 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
652         fi
653         if test $HAVE_OSS = yes; then
654                 audiod_errlist_objs="$audiod_errlist_objs oss_write"
655                 audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
656         fi
657         if test $HAVE_ALSA = yes; then
658                 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
659                 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
660         fi
661         NEED_AO_OBJECTS && {
662                 audiod_errlist_objs="$audiod_errlist_objs ao_write"
663                 audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
664         }
665         if test $HAVE_SAMPLERATE = yes; then
666                 audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
667                 audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
668         fi
669         audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
670         AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
671         AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
672                 errors used by para_audiod)
673
674         enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
675         AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
676                 enum of audio formats supported by audiod)
677         names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
678         AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
679 else
680         build_audiod="no"
681 fi
682 ########################################################################### fade
683 if test $HAVE_OSS = yes -o $HAVE_ALSA = yes; then
684         build_fade="yes"
685         executables="$executables fade"
686         fade_cmdline_objs="fade"
687         fade_errlist_objs="fade exec string fd version ggo"
688         if test $HAVE_OSS = yes; then
689                 fade_errlist_objs="$fade_errlist_objs oss_mix"
690                 mixers="${mixers}oss "
691                 default_mixer="OSS_MIX"
692         fi
693         if test $HAVE_ALSA = yes; then
694                 fade_errlist_objs="$fade_errlist_objs alsa_mix"
695                 mixers="${mixers}alsa "
696                 default_mixer="ALSA_MIX"
697         fi
698         fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
699         AC_SUBST(fade_objs, add_dot_o($fade_objs))
700         AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
701                 objlist_to_errlist($fade_errlist_objs),
702                 errors used by para_fade)
703         enum="$(
704                 for i in $mixers; do
705                         printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
706                 done
707         )"
708         AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
709                 enum of supported mixers)
710         AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
711                 use this mixer if none was specified)
712         names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
713         AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
714         inits="$(
715                 for i in $mixers; do
716                         printf 'extern void '$i'_mix_init(struct mixer *); '
717                 done
718         )"
719         AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
720                 init functions of the supported mixers)
721         array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
722         AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
723 else
724         build_fade="no"
725         AC_MSG_WARN([no mixer support])
726 fi
727 ########################################################################### gui
728 if test "$have_curses" = "yes"; then
729         build_gui="yes"
730         executables="$executables gui"
731         gui_cmdline_objs="gui"
732         gui_errlist_objs="
733                 exec
734                 signal
735                 string
736                 stat
737                 ringbuffer
738                 fd
739                 gui
740                 gui_theme
741                 time
742                 sched
743                 version
744                 ggo
745         "
746         gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
747         AC_SUBST(gui_objs, add_dot_o($gui_objs))
748         AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
749                 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
750 else
751         build_gui="no"
752         AC_MSG_WARN([no curses lib, cannot build para_gui])
753 fi
754 ######################################################################## filter
755 filters="
756         compress
757         wav
758         amp
759         fecdec
760         wmadec
761         prebuffer
762         sync
763 "
764 filter_errlist_objs="
765         filter_common
766         wav_filter
767         compress_filter
768         filter
769         string
770         stdin
771         stdout
772         sched
773         fd
774         amp_filter
775         ggo
776         fecdec_filter
777         fec
778         version
779         prebuffer_filter
780         time
781         bitstream
782         imdct
783         wma_common
784         wmadec_filter
785         buffer_tree
786         net
787         sync_filter
788 "
789 filter_cmdline_objs="
790         filter
791         compress_filter
792         amp_filter
793         prebuffer_filter
794         sync_filter
795 "
796 NEED_VORBIS_OBJECTS && {
797         filters="$filters oggdec"
798         filter_errlist_objs="$filter_errlist_objs oggdec_filter"
799 }
800 NEED_SPEEX_OBJECTS && {
801         filters="$filters spxdec"
802         filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
803 }
804 NEED_OPUS_OBJECTS && {
805         filters="$filters opusdec"
806         filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
807 }
808 NEED_FLAC_OBJECTS && {
809         filter_errlist_objs="$filter_errlist_objs flacdec_filter"
810         filters="$filters flacdec"
811 }
812 if test $HAVE_FAAD = yes; then
813         filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
814         filters="$filters aacdec"
815 fi
816 if test $HAVE_MAD = yes; then
817         filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
818         filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
819         filters="$filters mp3dec"
820 fi
821 if test $HAVE_SAMPLERATE = yes; then
822         filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
823         filter_cmdline_objs="$filter_cmdline_objs resample_filter"
824         filters="$filters resample"
825 fi
826 filters="$(echo $filters)"
827 AC_SUBST(filters)
828 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
829
830 AC_SUBST(filter_objs, add_dot_o($filter_objs))
831 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
832         objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
833
834 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
835 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
836         enum of supported filters)
837 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
838 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
839 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
840 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
841 ########################################################################## recv
842 recv_cmdline_objs="
843         recv
844         http_recv
845         dccp_recv
846         udp_recv
847         afh_recv
848 "
849
850 recv_errlist_objs="
851         http_recv
852         recv_common
853         recv
854         time
855         string
856         net
857         dccp_recv
858         fd
859         sched
860         stdout
861         ggo
862         udp_recv
863         buffer_tree
864         afh_recv
865         afh_common
866         wma_afh
867         wma_common
868         mp3_afh
869         version
870 "
871 NEED_OGG_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
872 NEED_VORBIS_OBJECTS && recv_errlist_objs="$recv_errlist_objs ogg_afh"
873 NEED_SPEEX_OBJECTS && recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
874 NEED_OPUS_OBJECTS && recv_errlist_objs="$recv_errlist_objs opus_afh opus_common"
875 NEED_FLAC_OBJECTS && recv_errlist_objs="$recv_errlist_objs flac_afh"
876
877 if test $HAVE_FAAD = yes; then
878         recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
879 fi
880 recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
881 AC_SUBST(receivers, "http dccp udp afh")
882 AC_SUBST(recv_objs, add_dot_o($recv_objs))
883 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
884         errors used by para_recv)
885 ########################################################################### afh
886 audio_format_handlers="mp3 wma"
887 afh_cmdline_objs="afh"
888 afh_errlist_objs="
889         afh
890         string
891         fd
892         mp3_afh
893         afh_common
894         time
895         wma_afh
896         wma_common
897         version
898         ggo
899 "
900 NEED_OGG_OBJECTS && afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
901 NEED_VORBIS_OBJECTS && {
902         afh_errlist_objs="$afh_errlist_objs ogg_afh"
903         audio_format_handlers="$audio_format_handlers ogg"
904 }
905 NEED_SPEEX_OBJECTS && {
906         afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
907         audio_format_handlers="$audio_format_handlers spx"
908 }
909 NEED_OPUS_OBJECTS && {
910         afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
911         audio_format_handlers="$audio_format_handlers opus"
912 }
913 NEED_FLAC_OBJECTS && {
914         afh_errlist_objs="$afh_errlist_objs flac_afh"
915         audio_format_handlers="$audio_format_handlers flac"
916 }
917 if test $HAVE_FAAD = yes; then
918         afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
919         audio_format_handlers="$audio_format_handlers aac"
920 fi
921
922 afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
923
924 AC_SUBST(afh_objs, add_dot_o($afh_objs))
925 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
926         objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
927 ########################################################################## play
928 play_errlist_objs="
929         play
930         fd
931         sched
932         ggo
933         buffer_tree
934         time
935         string
936         net
937         afh_recv
938         afh_common
939         wma_afh
940         wma_common
941         mp3_afh
942         recv_common
943         udp_recv
944         http_recv
945         dccp_recv
946         filter_common
947         fec
948         bitstream
949         imdct
950         wav_filter
951         compress_filter
952         amp_filter
953         prebuffer_filter
954         fecdec_filter
955         wmadec_filter
956         write_common
957         file_write
958         version
959         sync_filter
960 "
961 play_cmdline_objs="
962         http_recv
963         dccp_recv
964         udp_recv
965         afh_recv
966         compress_filter
967         amp_filter
968         prebuffer_filter
969         file_write
970         play
971         sync_filter
972 "
973 if test "$have_core_audio" = "yes"; then
974         play_errlist_objs="$play_errlist_objs osx_write ipc"
975         play_cmdline_objs="$play_cmdline_objs osx_write"
976 fi
977 NEED_OGG_OBJECTS && play_errlist_objs="$play_errlist_objs ogg_afh_common"
978 NEED_VORBIS_OBJECTS && {
979         play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
980 }
981 NEED_SPEEX_OBJECTS && {
982         play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
983 }
984 NEED_OPUS_OBJECTS &&
985         play_errlist_objs="$play_errlist_objs
986                 opusdec_filter
987                 opus_afh
988                 opus_common
989         "
990 NEED_FLAC_OBJECTS && {
991         play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
992 }
993 if test $HAVE_FAAD = yes; then
994         play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
995 fi
996 if test $HAVE_MAD = yes; then
997         play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
998         play_errlist_objs="$play_errlist_objs mp3dec_filter"
999 fi
1000 if test $HAVE_OSS = yes; then
1001         play_errlist_objs="$play_errlist_objs oss_write"
1002         play_cmdline_objs="$play_cmdline_objs oss_write"
1003 fi
1004 if test $HAVE_ALSA = yes; then
1005         play_errlist_objs="$play_errlist_objs alsa_write"
1006         play_cmdline_objs="$play_cmdline_objs alsa_write"
1007 fi
1008 NEED_AO_OBJECTS && {
1009         play_errlist_objs="$play_errlist_objs ao_write"
1010         play_cmdline_objs="$play_cmdline_objs ao_write"
1011 }
1012 if test "$have_readline" = "yes"; then
1013         play_errlist_objs="$play_errlist_objs interactive"
1014 fi
1015 if test $HAVE_SAMPLERATE = yes; then
1016         play_errlist_objs="$play_errlist_objs resample_filter check_wav"
1017         play_cmdline_objs="$play_cmdline_objs resample_filter"
1018 fi
1019
1020 play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
1021 AC_SUBST(play_objs, add_dot_o($play_objs))
1022 AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
1023         objlist_to_errlist($play_errlist_objs), errors used by para_play)
1024 ######################################################################### write
1025 write_cmdline_objs="
1026         write
1027         file_write
1028 "
1029 write_errlist_objs="
1030         write
1031         write_common
1032         file_write
1033         time
1034         fd
1035         string
1036         sched
1037         stdin
1038         buffer_tree
1039         ggo
1040         check_wav
1041         version
1042 "
1043 writers="file"
1044 default_writer="FILE_WRITE"
1045
1046 if test "$have_core_audio" = "yes"; then
1047         write_errlist_objs="$write_errlist_objs osx_write ipc"
1048         write_cmdline_objs="$write_cmdline_objs osx_write"
1049         writers="$writers osx"
1050         default_writer="OSX_WRITE"
1051 fi
1052 NEED_AO_OBJECTS && {
1053         write_errlist_objs="$write_errlist_objs ao_write"
1054         write_cmdline_objs="$write_cmdline_objs ao_write"
1055         writers="$writers ao"
1056         default_writer="AO_WRITE"
1057 }
1058 if test $HAVE_OSS = yes; then
1059         write_errlist_objs="$write_errlist_objs oss_write"
1060         write_cmdline_objs="$write_cmdline_objs oss_write"
1061         writers="$writers oss"
1062         default_writer="OSS_WRITE"
1063 fi
1064 if test $HAVE_ALSA = yes; then
1065         write_errlist_objs="$write_errlist_objs alsa_write"
1066         write_cmdline_objs="$write_cmdline_objs alsa_write"
1067         writers="$writers alsa"
1068         default_writer="ALSA_WRITE"
1069 fi
1070 AC_SUBST(writers)
1071 write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
1072 AC_SUBST(write_objs, add_dot_o($write_objs))
1073 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
1074         objlist_to_errlist($write_errlist_objs), errors used by para_write)
1075 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
1076 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
1077         enum of supported writers)
1078 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
1079 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
1080 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
1081 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
1082 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
1083 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
1084 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
1085 ######################################################################## audioc
1086 audioc_cmdline_objs="audioc"
1087 audioc_errlist_objs="
1088         audioc
1089         string
1090         net
1091         fd
1092         version
1093         ggo
1094 "
1095 if test "$have_readline" = "yes"; then
1096         audioc_errlist_objs="$audioc_errlist_objs
1097                 buffer_tree
1098                 interactive
1099                 sched
1100                 time
1101         "
1102 fi
1103 audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
1104 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
1105 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
1106         objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
1107 ############################################################# error2.h
1108 # these are always built
1109 all_errlist_objs="
1110         $recv_errlist_objs
1111         $filter_errlist_objs
1112         $audioc_errlist_objs
1113         $write_errlist_objs
1114         $afh_errlist_objs
1115         $play_errlist_objs
1116 "
1117
1118 # optional executables
1119 if test "$build_server" = "yes"; then
1120         all_errlist_objs="$all_errlist_objs $server_errlist_objs"
1121 fi
1122 if test "$build_gui" = "yes"; then
1123         all_errlist_objs="$all_errlist_objs $gui_errlist_objs"
1124 fi
1125 if test "$build_fade" = "yes"; then
1126         all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
1127 fi
1128 if test "$build_client" = "yes"; then
1129         all_errlist_objs="$all_errlist_objs $client_errlist_objs"
1130 fi
1131 if test "$build_audiod" = "yes"; then
1132         all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
1133 fi
1134
1135 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
1136
1137 object_executable_matrix=
1138 for i in $executables; do
1139         eval objs=\$${i}_errlist_objs
1140         object_executable_matrix="$object_executable_matrix $i: $objs"
1141 done
1142 # use echo to replace newlines by space
1143 AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix))
1144
1145 SS=$(for obj in $all_errlist_objs; do
1146         printf '%s' " SS_$obj,"; done | tr 'a-z' 'A-Z')
1147 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
1148         [enum {$SS NUM_SS}],
1149         [list of all objects that use the paraslash error facility]
1150 )
1151 ################################################################## status items
1152
1153 status_items="basename status num_played mtime bitrate frequency file_size
1154 status_flags format score techinfo afs_mode
1155 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
1156 offset seconds_total stream_start current_time audiod_uptime image_id
1157 lyrics_id duration directory lyrics_name image_name path hash channels
1158 last_played num_chunks chunk_time amplification artist title year album
1159 comment"
1160
1161 result=
1162 for i in $status_items; do
1163         result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
1164 done
1165 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
1166         [enum of all status items])
1167
1168 result=
1169 for i in $status_items; do
1170         result="$result \"$i\", "
1171 done
1172 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
1173         [char * array of all status items])
1174
1175 AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
1176         [formats supported by para_server and para_afh])
1177
1178 AC_SUBST(executables)
1179
1180 AC_OUTPUT
1181 AC_MSG_NOTICE([
1182 paraslash configuration:
1183 ~~~~~~~~~~~~~~~~~~~~~~~~
1184 crypto lib: ${CRYPTOLIB:-[none]}
1185 unix socket credentials: $have_ucred
1186 readline (interactive CLIs): $have_readline
1187 audio formats handlers: $audio_format_handlers
1188 id3 version 2 support: $HAVE_ID3TAG
1189 filters: $filters
1190 writers: $writers
1191
1192 para_fade: $build_fade
1193 para_server: $build_server
1194 para_gui: $build_gui
1195 para_fade: $build_fade
1196 para_client: $build_client
1197 para_audiod: $build_audiod
1198 ])