e2fba306dcf5e453d82890e1683e8ea0691e8b9f
[paraslash.git] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.60)
5
6
7 AC_INIT(paraslash, [git], maan@systemlinux.org)
8 AC_CONFIG_HEADER([config.h])
9
10 AC_PATH_PROG(UNAMEPATH, uname, no)
11 if test "$UNAMEPATH" = "no"; then
12 AC_MSG_ERROR(unable to determine system type)
13 fi
14 AC_MSG_CHECKING(os type)
15 OSTYPE="`$UNAMEPATH -s`"
16 AC_MSG_RESULT("$OSTYPE")
17
18 if test "$OSTYPE" = "SunOS"; then
19 # needed on SunOS for socket magic
20 arch_cppflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
21 AC_SUBST(arch_cppflags)
22 fi
23
24 AC_C_BIGENDIAN()
25
26 AC_PROG_CC
27 AC_PROG_CPP
28 AC_PROG_INSTALL
29 AC_REPLACE_FNMATCH
30
31 AC_HEADER_DIRENT
32 AC_HEADER_STDC
33 AC_HEADER_SYS_WAIT
34 AC_HEADER_STDBOOL
35 AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h limits.h netdb.h netinet/in.h \
36 stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h sys/un.h \
37 sys/ipc.h unistd.h utime.h stddef.h],
38 [], [AC_MSG_ERROR([$ac_header not found])])
39
40 # Checks for typedefs, structures, and compiler characteristics.
41 AC_C_CONST
42 AC_C_INLINE
43 AC_TYPE_OFF_T
44 AC_TYPE_PID_T
45 AC_TYPE_SIZE_T
46 AC_HEADER_TIME
47 AC_STRUCT_TM
48 AC_TYPE_INT8_T
49 AC_TYPE_INT16_T
50 AC_TYPE_INT32_T
51 AC_TYPE_INT64_T
52 AC_TYPE_MODE_T
53 AC_TYPE_SSIZE_T
54 AC_TYPE_UID_T
55 AC_TYPE_UINT8_T
56 AC_TYPE_UINT16_T
57 AC_TYPE_UINT32_T
58 AC_TYPE_UINT64_T
59
60 # Checks for library functions.
61 AC_FUNC_FORK
62 AC_PROG_GCC_TRADITIONAL
63 AC_FUNC_MALLOC
64 AC_FUNC_MEMCMP
65 AC_FUNC_MKTIME
66 AC_FUNC_MMAP
67 AC_FUNC_REALLOC
68 AC_FUNC_SELECT_ARGTYPES
69 AC_TYPE_SIGNAL
70 AC_FUNC_STAT
71 AC_FUNC_STRFTIME
72 AC_FUNC_VPRINTF
73 AC_FUNC_CLOSEDIR_VOID
74 AC_FUNC_LSTAT
75
76 AC_CHECK_FUNCS([atexit dup2 memchr memmove memset \
77 regcomp select strchr strdup strerror strstr strtol uname \
78 fchdir gettimeofday localtime_r munmap strcasecmp strcspn \
79 strncasecmp strrchr strspn alarm mkdir inet_ntoa socket], [],
80 [AC_MSG_ERROR([function not found, cannot live without it])])
81
82 cmdline_dir="cmdline"
83 AC_SUBST(cmdline_dir)
84 AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
85
86
87 all_errlist_objs="server mp3_afh afh_common vss command net string signal time
88 daemon stat http_send close_on_fork ipc acl afh fade amp_filter
89 dccp_send fd user_list chunk_queue afs aft mood score attribute blob ringbuffer
90 playlist sched audiod grab_client filter_common wav_filter compress_filter
91 http_recv dccp_recv recv_common write_common file_write audiod_command
92 client_common recv stdout filter stdin audioc write client exec send_common ggo
93 udp_recv udp_send color fec fecdec_filter prebuffer_filter mm
94 server_command_list afs_command_list audiod_command_list bitstream imdct wma_afh
95 wma_common wmadec_filter buffer_tree crypt_common
96 "
97
98 executables="recv filter audioc write client afh audiod"
99
100 recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv)"
101
102 recv_errlist_objs="http_recv recv_common recv time string net dccp_recv
103 fd sched stdout ggo udp_recv fec buffer_tree"
104 recv_ldflags=""
105
106 filter_cmdline_objs="add_cmdline(filter compress_filter amp_filter prebuffer_filter)"
107 filter_errlist_objs="filter_common wav_filter compress_filter filter string
108 stdin stdout sched fd amp_filter ggo fecdec_filter fec
109 prebuffer_filter time bitstream imdct wma_common wmadec_filter buffer_tree"
110 filter_ldflags="-lm"
111 filters=" compress wav amp fecdec wmadec prebuffer"
112
113 audioc_cmdline_objs="add_cmdline(audioc)"
114 audioc_errlist_objs="audioc string net fd"
115 audioc_ldflags=""
116
117 audiod_cmdline_objs="add_cmdline(audiod compress_filter http_recv dccp_recv file_write client amp_filter udp_recv prebuffer_filter)"
118 audiod_errlist_objs="audiod signal string daemon stat net crypt_common
119 time grab_client filter_common wav_filter compress_filter amp_filter http_recv dccp_recv
120 recv_common fd sched write_common file_write audiod_command fecdec_filter
121 client_common ggo udp_recv color fec prebuffer_filter audiod_command_list
122 bitstream imdct wma_common wmadec_filter buffer_tree"
123 audiod_ldflags="-lm"
124 audiod_audio_formats="wma"
125
126 afh_cmdline_objs="add_cmdline(afh)"
127 afh_errlist_objs="afh string fd mp3_afh afh_common time wma_afh wma_common"
128 afh_ldflags=""
129
130 server_cmdline_objs="add_cmdline(server)"
131 server_errlist_objs="server afh_common mp3_afh vss command net string signal
132 time daemon http_send close_on_fork mm crypt_common
133 ipc dccp_send fd user_list chunk_queue afs aft mood score attribute
134 blob playlist sched acl send_common udp_send color fec
135 server_command_list afs_command_list wma_afh wma_common"
136 server_ldflags=""
137 server_audio_formats="mp3 wma"
138
139 write_cmdline_objs="add_cmdline(write file_write)"
140 write_errlist_objs="write write_common file_write time fd string sched stdin
141 buffer_tree ggo"
142 write_ldflags=""
143 writers=" file"
144 default_writer="FILE_WRITE"
145
146 client_cmdline_objs="add_cmdline(client)"
147 client_errlist_objs="client net string fd sched stdin stdout time
148 client_common buffer_tree crypt_common"
149 client_ldflags=""
150
151 gui_cmdline_objs="add_cmdline(gui)"
152 gui_errlist_objs="exec signal string stat ringbuffer fd"
153 gui_other_objs="gui gui_theme"
154 gui_objs="$gui_cmdline_objs $gui_errlist_objs $gui_other_objs"
155
156 fade_cmdline_objs="add_cmdline(fade)"
157 fade_errlist_objs="fade exec string fd"
158
159
160 ########################################################################### snprintf
161 # ===========================================================================
162 # http://www.nongnu.org/autoconf-archive/ax_func_snprintf.html
163 # ===========================================================================
164 #
165 # SYNOPSIS
166 #
167 # AX_FUNC_SNPRINTF
168 #
169 # DESCRIPTION
170 #
171 # Checks for a fully C99 compliant snprintf, in particular checks whether
172 # it does bounds checking and returns the correct string length; does the
173 # same check for vsnprintf. If no working snprintf or vsnprintf is found,
174 # it prints an error message and aborts.
175 #
176 # LICENSE
177 #
178 # Copyright (c) 2008 Ruediger Kuhlmann <info@ruediger-kuhlmann.de>
179 #
180 # Copying and distribution of this file, with or without modification, are
181 # permitted in any medium without royalty provided the copyright notice
182 # and this notice are preserved.
183
184 AU_ALIAS([AC_FUNC_SNPRINTF], [AX_FUNC_SNPRINTF])
185 AC_DEFUN([AX_FUNC_SNPRINTF],
186 [AC_CHECK_FUNCS(snprintf vsnprintf)
187 AC_MSG_CHECKING(for working snprintf)
188 AC_CACHE_VAL(ac_cv_have_working_snprintf,
189 [AC_TRY_RUN(
190 [#include <stdio.h>
191
192 int main(void)
193 {
194 char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
195 char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
196 int i;
197 i = snprintf (bufs, 2, "%s", "111");
198 if (strcmp (bufs, "1")) exit (1);
199 if (i != 3) exit (1);
200 i = snprintf (bufd, 2, "%d", 111);
201 if (strcmp (bufd, "1")) exit (1);
202 if (i != 3) exit (1);
203 exit(0);
204 }], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)])
205 AC_MSG_RESULT([$ac_cv_have_working_snprintf])
206 AC_MSG_CHECKING(for working vsnprintf)
207 AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
208 [AC_TRY_RUN(
209 [#include <stdio.h>
210 #include <stdarg.h>
211
212 int my_vsnprintf (char *buf, const char *tmpl, ...)
213 {
214 int i;
215 va_list args;
216 va_start (args, tmpl);
217 i = vsnprintf (buf, 2, tmpl, args);
218 va_end (args);
219 return i;
220 }
221
222 int main(void)
223 {
224 char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
225 char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
226 int i;
227 i = my_vsnprintf (bufs, "%s", "111");
228 if (strcmp (bufs, "1")) exit (1);
229 if (i != 3) exit (1);
230 i = my_vsnprintf (bufd, "%d", 111);
231 if (strcmp (bufd, "1")) exit (1);
232 if (i != 3) exit (1);
233 exit(0);
234 }], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)])
235 AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
236 if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
237 AC_MSG_ERROR([fatal: buggy snprintf() detected])
238 fi])
239 AX_FUNC_SNPRINTF()
240 ########################################################################### osl
241 have_osl=yes
242 OLD_CPPFLAGS="$CPPFLAGS"
243 OLD_LD_FLAGS="$LDFLAGS"
244 OLD_LIBS="$LIBS"
245 AC_ARG_WITH(osl_headers, [AC_HELP_STRING(--with-osl-headers=dir,
246 [look for osl.h also in dir])])
247 if test -n "$with_osl_headers"; then
248 osl_cppflags="-I$with_osl_headers"
249 CPPFLAGS="$CPPFLAGS $osl_cppflags"
250 fi
251 AC_ARG_WITH(osl_libs, [AC_HELP_STRING(--with-osl-libs=dir,
252 [look for libosl also in dir])])
253 if test -n "$with_osl_libs"; then
254 osl_libs="-L$with_osl_libs"
255 LDFLAGS="$LDFLAGS $osl_libs"
256 fi
257
258 AC_CHECK_HEADER(osl.h, [], have_osl=no)
259 AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no)
260 if test "$have_osl" = "no"; then
261 AC_MSG_WARN([libosl not found, can not build para_server.
262 Download libosl at
263 http://systemlinux.org/~maan/osl
264 or execute
265 git clone git://git.tuebingen.mpg.de/osl
266 ])
267 else
268 extras="$extras server"
269 executables="$executables server"
270 AC_SUBST(osl_cppflags)
271 server_ldflags="$server_ldflags $osl_libs -losl"
272 fi
273 CPPFLAGS="$OLD_CPPFLAGS"
274 LDFLAGS="$OLD_LDFLAGS"
275 LIBS="$OLD_LIBS"
276 ########################################################################### crypto
277 AC_ARG_ENABLE(cryptolib, [AS_HELP_STRING(--enable-cryptolib=lib, [
278 Force using crypto library "lib". This package requires either
279 openssl or libgcrypt being installed. Possible values for "lib"
280 are thus "openssl" and "gcrypt". If this option is not given,
281 openssl is tried first. If openssl was not found, gcrypt is
282 tried next.])])
283
284 case "$enable_cryptolib" in
285 "openssl") check_openssl="yes"; check_gcrypt="no";;
286 "gcrypt") check_openssl="no"; check_gcrypt="yes";;
287 "") check_openssl="yes"; check_gcrypt="yes";;
288 *) AC_MSG_ERROR([invalid value "$enable_cryptolib" for --enable-cryptolib]);;
289 esac
290 ###################################################################### openssl
291 if test "$check_openssl" = "yes"; then
292 OLD_CPPFLAGS="$CPPFLAGS"
293 OLD_LD_FLAGS="$LDFLAGS"
294 OLD_LIBS="$LIBS"
295 have_openssl="yes"
296 AC_ARG_WITH(openssl_headers, [AC_HELP_STRING(--with-openssl-headers=dir,
297 [look for openssl headers also in dir])])
298 if test -n "$with_openssl_headers"; then
299 openssl_cppflags="-I$with_openssl_headers"
300 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
301 fi
302 AC_ARG_WITH(openssl_libs, [AC_HELP_STRING(--with-openssl-libs=dir,
303 [look for openssl libraries also in dir])])
304 if test -n "$with_openssl_libs"; then
305 openssl_libs="-L$with_openssl_libs"
306 LDFLAGS="$LDFLAGS $openssl_libs"
307 fi
308 AC_CHECK_HEADER(openssl/ssl.h, [], [have_openssl="no"])
309 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
310 if test "$have_openssl" = "no" -a -z "$with_openssl_headers$with_openssl_libs"; then
311 # try harder: openssl is sometimes installed in /usr/local/ssl
312 openssl_cppflags="-I/usr/local/ssl/include"
313 CPPFLAGS="$CPPFLAGS $openssl_cppflags"
314 openssl_libs="-L/usr/local/ssl/lib"
315 LDFLAGS="$LDFLAGS $openssl_libs"
316 # clear cache
317 unset ac_cv_header_openssl_ssl_h 2> /dev/null
318 unset ac_cv_lib_crypto_RAND_bytes 2> /dev/null
319 AC_CHECK_HEADER(openssl/ssl.h, [have_openssl="yes"], [])
320 if test "$have_openssl" = "yes"; then
321 AC_CHECK_LIB([crypto], [RAND_bytes], [], [have_openssl="no"])
322 fi
323 fi
324 if test "$have_openssl" = "yes"; then
325 AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support])
326 AC_SUBST(openssl_cppflags)
327 openssl_libs="$openssl_libs -lssl -lcrypto"
328 server_ldflags="$server_ldflags $openssl_libs"
329 client_ldflags="$client_ldflags $openssl_libs"
330 audiod_ldflags="$audiod_ldflags $openssl_libs"
331
332 all_errlist_objs="$all_errlist_objs crypt"
333 server_errlist_objs="$server_errlist_objs crypt"
334 client_errlist_objs="$client_errlist_objs crypt"
335 audiod_errlist_objs="$audiod_errlist_objs crypt"
336
337 check_gcrypt="no"
338 else
339 AC_MSG_WARN([openssl libraries not found])
340 fi
341 CPPFLAGS="$OLD_CPPFLAGS"
342 LDFLAGS="$OLD_LDFLAGS"
343 LIBS="$OLD_LIBS"
344 else
345 have_openssl="no"
346 fi
347 ########################################################################### gcrypt
348 if test "$check_gcrypt" = "yes"; then
349 OLD_CPPFLAGS="$CPPFLAGS"
350 OLD_LD_FLAGS="$LDFLAGS"
351 OLD_LIBS="$LIBS"
352 have_gcrypt="yes"
353 AC_ARG_WITH(gcrypt_headers, [AC_HELP_STRING(--with-gcrypt-headers=dir,
354 [look for gcrypt headers also in dir])])
355 if test -n "$with_gcrypt_headers"; then
356 gcrypt_cppflags="-I$with_gcrypt_headers"
357 CPPFLAGS="$CPPFLAGS $gcrypt_cppflags"
358 fi
359 AC_ARG_WITH(gcrypt_libs, [AC_HELP_STRING(--with-gcrypt-libs=dir,
360 [look for libgcrypt also in dir])])
361 if test -n "$with_gcrypt_libs"; then
362 gcrypt_libs="-L$with_gcrypt_libs"
363 LDFLAGS="$LDFLAGS $gcrypt_libs"
364 fi
365 AC_CHECK_HEADER(gcrypt.h, [], [have_gcrypt="no"])
366 AC_CHECK_LIB([gcrypt], [gcry_randomize], [], [have_gcrypt="no"])
367 if test "$have_gcrypt" = "yes"; then
368 AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support])
369 AC_SUBST(gcrypt_cppflags)
370 gcrypt_libs="$gcrypt_libs -lgcrypt"
371 server_ldflags="$server_ldflags $gcrypt_libs"
372 client_ldflags="$client_ldflags $gcrypt_libs"
373 audiod_ldflags="$audiod_ldflags $gcrypt_libs"
374
375 all_errlist_objs="$all_errlist_objs gcrypt"
376 server_errlist_objs="$server_errlist_objs gcrypt"
377 client_errlist_objs="$client_errlist_objs gcrypt"
378 audiod_errlist_objs="$audiod_errlist_objs gcrypt"
379 else
380 AC_MSG_WARN([grypt library not found])
381 fi
382 CPPFLAGS="$OLD_CPPFLAGS"
383 LDFLAGS="$OLD_LDFLAGS"
384 LIBS="$OLD_LIBS"
385 else
386 have_gcrypt="no"
387 fi
388 ###########################################################################
389 if test "$have_openssl" = "no" -a "$have_gcrypt" = "no"; then
390 AC_MSG_ERROR([neither openssl nor gcrypt usable])
391 fi
392 ########################################################################### libsocket
393 AC_CHECK_LIB([c], [socket],
394 [socket_lib=],
395 [socket_lib="-lsocket"]
396 )
397 server_ldflags="$server_ldflags $socket_lib"
398 client_ldflags="$client_ldflags $socket_lib"
399 audioc_ldflags="$audioc_ldflags $socket_lib"
400 audiod_ldflags="$audiod_ldflags $socket_lib"
401 recv_ldflags="$recv_ldflags $socket_lib"
402 AC_SEARCH_LIBS([connect],[socket],[],[
403 AC_MSG_ERROR([Fatal: Did not find connect().])
404 ],[])
405 ########################################################################### libnsl
406 AC_CHECK_LIB([c], [gethostbyname],
407 [nsl_lib=],
408 [nsl_lib="-lnsl"]
409 )
410 server_ldflags="$server_ldflags $nsl_lib"
411 client_ldflags="$client_ldflags $nsl_lib"
412 audioc_ldflags="$audioc_ldflags $nsl_lib"
413 recv_ldflags="$recv_ldflags $nsl_lib"
414 AC_SEARCH_LIBS([inet_ntoa],[nsl],[],[
415 AC_MSG_ERROR([Fatal: Did not find inet_ntoa().])
416 ],[])
417 ########################################################################### ucred
418 AC_MSG_CHECKING(for struct ucred)
419 AC_TRY_LINK([
420 #define _GNU_SOURCE
421 #include <sys/types.h>
422 #include <sys/socket.h>
423 ],[
424 struct ucred sucred; sucred.pid=0;
425 ],[have_ucred=yes],[have_ucred=no])
426 AC_MSG_RESULT($have_ucred)
427 if test ${have_ucred} = yes; then
428 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
429 fi
430
431 ########################################################################### curses
432 have_curses="yes"
433 OLD_CPPFLAGS="$CPPFLAGS"
434 OLD_LD_FLAGS="$LDFLAGS"
435 OLD_LIBS="$LIBS"
436 AC_ARG_WITH(curses_headers, [AC_HELP_STRING(--with-curses-headers=dir,
437 [look for curses.h also in dir])])
438 if test -n "$with_curses_headers"; then
439 curses_cppflags="-I$with_curses_headers"
440 CPPFLAGS="$CPPFLAGS $curses_cppflags"
441 fi
442 AC_ARG_WITH(curses_libs, [AC_HELP_STRING(--with-curses-libs=dir,
443 [look for libcurses also in dir])])
444 if test -n "$with_curses_libs"; then
445 curses_libs="-L$with_curses_libs"
446 LDFLAGS="$LDFLAGS $curses_libs"
447 fi
448 AC_CHECK_HEADER(curses.h, [], [
449 have_curses="no"
450 ])
451 AC_CHECK_LIB([curses], [initscr], [], [
452 have_curses="no"
453 ])
454 if test "$have_curses" = "yes"; then
455 AC_SUBST(curses_cppflags)
456 AC_DEFINE(HAVE_NCURSES, 1, [define to 1 to turn on curses support])
457 extras="$extras gui"
458 executables="$executables gui"
459 else
460 AC_MSG_WARN([cannot build para_gui])
461 fi
462 CPPFLAGS="$OLD_CPPFLAGS"
463 LDFLAGS="$OLD_LDFLAGS"
464 LIBS="$OLD_LIBS"
465
466 ########################################################################### ip_mreqn
467 AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast))
468 AC_TRY_LINK([
469 #include <netdb.h>
470 #include <net/if.h>
471 ],[
472 struct ip_mreqn mn;
473 mn.imr_ifindex = 0;
474 ],[have_ip_mreqn=yes],[have_ip_mreqn=no])
475 AC_MSG_RESULT($have_ip_mreqn)
476 if test ${have_ip_mreqn} = yes; then
477 AC_DEFINE(HAVE_IP_MREQN, 1, define to 1 you have struct ip_mreqn)
478 fi
479 ########################################################################### osx
480
481 AC_MSG_CHECKING(for CoreAudio (MacOs))
482 AC_TRY_LINK([
483 #include <CoreAudio/CoreAudio.h>
484 ],[
485 AudioDeviceID id;
486 ],[have_core_audio=yes],[have_core_audio=no])
487 AC_MSG_RESULT($have_core_audio)
488 if test ${have_core_audio} = yes; then
489 f1="-framework CoreAudio"
490 f2="-framework AudioToolbox"
491 f3="-framework AudioUnit"
492 f4="-framework CoreServices"
493 f="$f1 $f2 $f3 $f4"
494
495 all_errlist_objs="$all_errlist_objs osx_write"
496 audiod_errlist_objs="$audiod_errlist_objs osx_write"
497 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
498 audiod_ldflags="$audiod_ldflags $f"
499
500 write_errlist_objs="$write_errlist_objs osx_write"
501 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
502 write_ldflags="$write_ldflags $f"
503 writers="$writers osx"
504 default_writer="OSX_WRITE"
505 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
506 fi
507 ########################################################### ogg/vorbis/speex
508 have_ogg="yes"
509 OLD_CPPFLAGS="$CPPFLAGS"
510 OLD_LD_FLAGS="$LDFLAGS"
511 OLD_LIBS="$LIBS"
512 AC_ARG_WITH(ogg_headers, [AC_HELP_STRING(--with-ogg-headers=dir,
513 [look for ogg headers also in dir])])
514 AC_ARG_WITH(ogg_libs, [AC_HELP_STRING(--with-ogg-libs=dir,
515 [look for ogg libs also in dir])])
516 AC_ARG_WITH(vorbis_headers, [AC_HELP_STRING(--with-vorbis-headers=dir,
517 [look for vorbis headers also in dir])])
518 AC_ARG_WITH(vorbis_libs, [AC_HELP_STRING(--with-vorbis-libs=dir,
519 [look for vorbis libs also in dir])])
520 AC_ARG_WITH(speex_headers, [AC_HELP_STRING(--with-speex-headers=dir,
521 [look for speex headers also in dir])])
522 AC_ARG_WITH(speex_libs, [AC_HELP_STRING(--with-speex-libs=dir,
523 [look for speex libs also in dir])])
524
525 if test -n "$with_ogg_headers"; then
526 ogg_cppflags="-I$with_ogg_headers"
527 CPPFLAGS="$CPPFLAGS $ogg_cppflags"
528 fi
529 if test -n "$with_ogg_libs"; then
530 ogg_libs="-L$with_ogg_libs"
531 LDFLAGS="$LDFLAGS $ogg_libs"
532 fi
533 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
534 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
535
536 have_vorbis="yes"
537 have_speex="yes"
538 if test "$have_ogg" = "yes"; then
539 # vorbis
540 if test -n "$with_vorbis_headers"; then
541 vorbis_cppflags="-I$with_vorbis_headers"
542 CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
543 fi
544 if test -n "$with_vorbis_libs"; then
545 vorbis_libs="-L$with_vorbis_libs"
546 LDFLAGS="$LDFLAGS $vorbis_libs"
547 fi
548 AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
549 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
550
551 # speex
552 if test -n "$with_speex_headers"; then
553 speex_cppflags="-I$with_speex_headers"
554 CPPFLAGS="$CPPFLAGS $speex_cppflags"
555 fi
556 if test -n "$with_speex_libs"; then
557 speex_libs="-L$with_speex_libs"
558 LDFLAGS="$LDFLAGS $speex_libs"
559 fi
560 AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
561 AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
562 else
563 have_vorbis="no"
564 have_speex="no"
565 fi
566
567 msg="support in para_server/para_filter/para_afh"
568 if test "$have_vorbis" = "yes" || test "$have_speex" = "yes"; then
569 AC_SUBST(ogg_cppflags)
570 ogg_libs="$ogg_libs -logg"
571 if test "$OSTYPE" = "Darwin"; then
572 ogg_libs="-Wl,-bind_at_load $ogg_libs"
573 fi
574 server_ldflags="$server_ldflags $ogg_libs"
575 filter_ldflags="$filter_ldflags $ogg_libs"
576 audiod_ldflags="$audiod_ldflags $ogg_libs"
577 afh_ldflags="$afh_ldflags $ogg_libs"
578 all_errlist_objs="$all_errlist_objs ogg_afh_common"
579 afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
580 server_errlist_objs="$server_errlist_objs ogg_afh_common"
581 else
582 AC_MSG_WARN([vorbis/speex require ogg])
583 fi
584 if test "$have_vorbis" = "yes"; then
585 all_errlist_objs="$all_errlist_objs oggdec_filter ogg_afh"
586 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
587 filters="$filters oggdec"
588 vorbis_libs="-lvorbis -lvorbisfile"
589 server_ldflags="$server_ldflags $vorbis_libs"
590 filter_ldflags="$filter_ldflags $vorbis_libs"
591 audiod_ldflags="$audiod_ldflags $vorbis_libs"
592 afh_ldflags="$afh_ldflags $vorbis_libs"
593
594 server_errlist_objs="$server_errlist_objs ogg_afh"
595 filter_errlist_objs="$filter_errlist_objs oggdec_filter"
596 audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
597 afh_errlist_objs="$afh_errlist_objs ogg_afh"
598
599 audiod_audio_formats="$audiod_audio_formats ogg"
600 server_audio_formats="$server_audio_formats ogg"
601 else
602 AC_MSG_WARN([no ogg/vorbis $msg])
603 fi
604 if test "$have_speex" = "yes"; then
605 all_errlist_objs="$all_errlist_objs spxdec_filter spx_afh spx_common"
606 AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
607 filters="$filters spxdec"
608 speex_libs="-lspeex"
609 server_ldflags="$server_ldflags $speex_libs"
610 filter_ldflags="$filter_ldflags $speex_libs"
611 audiod_ldflags="$audiod_ldflags $speex_libs"
612 afh_ldflags="$afh_ldflags $speex_libs"
613
614 server_errlist_objs="$server_errlist_objs spx_afh spx_common"
615 filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
616 audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
617 afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
618
619 audiod_audio_formats="$audiod_audio_formats spx"
620 server_audio_formats="$server_audio_formats spx"
621 else
622 AC_MSG_WARN([no ogg/speex $msg])
623 fi
624 CPPFLAGS="$OLD_CPPFLAGS"
625 LDFLAGS="$OLD_LDFLAGS"
626 LIBS="$OLD_LIBS"
627 ########################################################################### faad
628 have_faad=yes
629 OLD_CPPFLAGS="$CPPFLAGS"
630 OLD_LD_FLAGS="$LDFLAGS"
631 OLD_LIBS="$LIBS"
632 AC_ARG_WITH(faad_headers, [AC_HELP_STRING(--with-faad-headers=dir,
633 [look for neaacdec.h also in dir])])
634 if test -n "$with_faad_headers"; then
635 faad_cppflags="-I$with_faad_headers"
636 CPPFLAGS="$CPPFLAGS $faad_cppflags"
637 fi
638 AC_ARG_WITH(faad_libs, [AC_HELP_STRING(--with-faad-libs=dir,
639 [look for libfaad also in dir])])
640 if test -n "$with_faad_libs"; then
641 faad_libs="-L$with_faad_libs"
642 LDFLAGS="$LDFLAGS $faad_libs"
643 fi
644 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
645 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
646 if test "$have_faad" = "yes"; then
647 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
648 all_errlist_objs="$all_errlist_objs aac_common aacdec_filter aac_afh"
649 filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
650 afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
651 audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
652 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
653 server_ldflags="$server_ldflags $faad_libs -lfaad"
654 filter_ldflags="$filter_ldflags $faad_libs -lfaad"
655 audiod_ldflags="$audiod_ldflags $faad_libs -lfaad"
656 afh_ldflags="$afh_ldflags $faad_libs -lfaad"
657 audiod_audio_formats="$audiod_audio_formats aac"
658 server_audio_formats="$server_audio_formats aac"
659 filters="$filters aacdec"
660 AC_SUBST(faad_cppflags)
661 else
662 AC_MSG_WARN([no aac support in para_audiod/para_filter])
663 fi
664 CPPFLAGS="$OLD_CPPFLAGS"
665 LDFLAGS="$OLD_LDFLAGS"
666 LIBS="$OLD_LIBS"
667 ########################################################################### mad
668 have_mad="yes"
669 OLD_CPPFLAGS="$CPPFLAGS"
670 OLD_LD_FLAGS="$LDFLAGS"
671 OLD_LIBS="$LIBS"
672
673 AC_ARG_WITH(mad_headers, [AC_HELP_STRING(--with-mad-headers=dir,
674 [look for mad.h also in dir])])
675 if test -n "$with_mad_headers"; then
676 mad_cppflags="-I$with_mad_headers"
677 CPPFLAGS="$CPPFLAGS $mad_cppflags"
678 fi
679 AC_ARG_WITH(mad_libs, [AC_HELP_STRING(--with-mad-libs=dir,
680 [look for libmad also in dir])])
681 if test -n "$with_mad_libs"; then
682 mad_libs="-L$with_mad_libs"
683 LDFLAGS="$LDFLAGS $mad_libs"
684 fi
685 AC_CHECK_HEADERS([mad.h], [], [
686 have_mad="no"
687 ])
688 AC_CHECK_LIB([mad], [mad_stream_init], [], [
689 have_mad="no"
690 ])
691 if test "$have_mad" = "yes"; then
692 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
693 filter_cmdline_objs="$filter_cmdline_objs add_cmdline(mp3dec_filter)"
694 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(mp3dec_filter)"
695 all_errlist_objs="$all_errlist_objs mp3dec_filter"
696 filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
697 audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
698 filter_ldflags="$filter_ldflags $mad_libs -lmad"
699 audiod_ldflags="$audiod_ldflags $mad_libs -lmad"
700 audiod_audio_formats="$audiod_audio_formats mp3"
701 filters="$filters mp3dec"
702 AC_SUBST(mad_cppflags)
703 else
704 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
705 fi
706 CPPFLAGS="$OLD_CPPFLAGS"
707 LDFLAGS="$OLD_LDFLAGS"
708 LIBS="$OLD_LIBS"
709 ###################################################################### libid3tag
710 AC_MSG_CHECKING(for libid3tag)
711 AC_TRY_LINK([
712 #include <id3tag.h>
713 ],[
714 struct id3_tag t = {.flags = 0};
715 ],[have_libid3tag=yes],[have_libid3tag=no])
716 AC_MSG_RESULT($have_libid3tag)
717 if test ${have_libid3tag} = yes; then
718 AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
719 server_ldflags="$server_ldflags -lid3tag"
720 afh_ldflags="$afh_ldflags -lid3tag"
721 else
722 AC_MSG_WARN([no support for id3v2 tags])
723 fi
724 ########################################################################### oss
725 OLD_CPPFLAGS="$CPPFLAGS"
726 OLD_LD_FLAGS="$LDFLAGS"
727 OLD_LIBS="$LIBS"
728
729 have_oss="yes"
730 msg="=> will not build para_fade/oss writer"
731
732 AC_CHECK_HEADER(sys/soundcard.h, [
733 extras="$extras fade"
734 executables="$executables fade"
735 all_errlist_objs="$all_errlist_objs oss_write"
736 audiod_errlist_objs="$audiod_errlist_objs oss_write"
737 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(oss_write)"
738
739 write_errlist_objs="$write_errlist_objs oss_write"
740 write_cmdline_objs="$write_cmdline_objs add_cmdline(oss_write)"
741 writers="$writers oss"
742 default_writer="OSS_WRITE"
743 AC_CHECK_LIB(ossaudio, _oss_ioctl, [
744 audiod_ldflags="$audiod_ldflags -lossaudio"
745 write_ldflags="$write_ldflags -lossaudio"
746 fade_ldflags="$write_ldflags -lossaudio"
747 ]
748 )
749 ],
750 [
751 have_oss="no"
752 AC_MSG_WARN([no sys/soundcard.h $msg])
753 ]
754 )
755 CPPFLAGS="$OLD_CPPFLAGS"
756 LDFLAGS="$OLD_LDFLAGS"
757 LIBS="$OLD_LIBS"
758
759 ########################################################################### alsa
760 OLD_CPPFLAGS="$CPPFLAGS"
761 OLD_LD_FLAGS="$LDFLAGS"
762 OLD_LIBS="$LIBS"
763
764 msg="=> no alsa support for para_audiod/para_write"
765 if test "$OSTYPE" != "Linux"; then
766 have_alsa="no"
767 else
768 have_alsa="yes"
769 fi
770 if test "$have_alsa" = "yes"; then
771 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
772 have_alsa="no"
773 AC_MSG_WARN([no alsa/asoundlib $msg])
774 ])
775 fi
776
777 if test "$have_alsa" = "yes"; then
778 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
779 have_alsa="no"
780 AC_MSG_WARN([no libasound $msg])
781 ])
782 fi
783
784 if test "$have_alsa" = "yes"; then
785 all_errlist_objs="$all_errlist_objs alsa_write"
786 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
787 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(alsa_write)"
788 audiod_ldflags="$audiod_ldflags -lasound"
789
790 write_errlist_objs="$write_errlist_objs alsa_write"
791 write_cmdline_objs="$write_cmdline_objs add_cmdline(alsa_write)"
792 write_ldflags="$write_ldflags -lasound"
793 writers="$writers alsa"
794 default_writer="ALSA_WRITE"
795 fi
796
797 CPPFLAGS="$OLD_CPPFLAGS"
798 LDFLAGS="$OLD_LDFLAGS"
799 LIBS="$OLD_LIBS"
800 ########################################################################### libao
801 OLD_CPPFLAGS="$CPPFLAGS"
802 OLD_LD_FLAGS="$LDFLAGS"
803 OLD_LIBS="$LIBS"
804
805 have_ao="yes"
806 AC_ARG_WITH(ao_headers, [AC_HELP_STRING(--with-ao-headers=dir,
807 [look for ao/ao.h also in dir])])
808 if test -n "$with_ao_headers"; then
809 ao_cppflags="-I$with_ao_headers"
810 CPPFLAGS="$CPPFLAGS $ao_cppflags"
811 fi
812 AC_ARG_WITH(ao_libs, [AC_HELP_STRING(--with-ao-libs=dir,
813 [look for libao also in dir])])
814 if test -n "$with_ao_libs"; then
815 ao_libs="-L$with_ao_libs"
816 LDFLAGS="$LDFLAGS $ao_libs"
817 fi
818 msg="no libao support for para_audiod/para_write"
819 AC_CHECK_HEADERS([ao/ao.h], [
820 ], [
821 have_ao="no"
822 AC_MSG_WARN([ao.h not found, $msg])
823 ])
824 if test "$have_ao" = "yes"; then
825 AC_CHECK_LIB([ao], [ao_initialize], [], [
826 have_ao="no"
827 AC_MSG_WARN([ao lib not found or not working, $msg])
828 ])
829 fi
830 if test "$have_ao" = "yes"; then
831 AC_CHECK_HEADERS([pthread.h], [
832 ], [
833 have_ao="no"
834 AC_MSG_WARN([pthread.h not found, $msg])
835 ])
836 fi
837 if test "$have_ao" = "yes"; then
838 AC_CHECK_LIB([pthread], [pthread_create], [], [
839 have_ao="no"
840 AC_MSG_WARN([pthread lib not found or not working, $msg])
841 ])
842 fi
843 if test "$have_ao" = "yes"; then
844 all_errlist_objs="$all_errlist_objs ao_write"
845 audiod_errlist_objs="$audiod_errlist_objs ao_write"
846 audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(ao_write)"
847 audiod_ldflags="$audiod_ldflags -lao -lpthread"
848
849 write_errlist_objs="$write_errlist_objs ao_write"
850 write_cmdline_objs="$write_cmdline_objs add_cmdline(ao_write)"
851 write_ldflags="$write_ldflags $ao_libs -lao -lpthread"
852 writers="$writers ao"
853 AC_SUBST(ao_cppflags)
854 fi
855
856 CPPFLAGS="$OLD_CPPFLAGS"
857 LDFLAGS="$OLD_LDFLAGS"
858 LIBS="$OLD_LIBS"
859
860
861
862 AC_SUBST(install_sh, [$INSTALL])
863 AC_CONFIG_FILES([Makefile])
864
865
866 AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
867 AC_DEFUN([add_para],[$(for i in $@; do printf "para_$i "; done)])
868 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) }])
869 ############################################################# error2.h
870 AC_MSG_NOTICE(creating error2.h)
871 for i in $executables; do
872 echo "$i: "
873 eval echo \$${i}_errlist_objs
874 done | ./error2.pl > error2.h
875 for obj in $all_errlist_objs; do
876 SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
877 done
878 AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
879 [enum {$SS NUM_SS}],
880 [list of all objects that use the paraslash error facility]
881 )
882
883 ################################################################## status items
884
885 status_items="basename status num_played mtime bitrate frequency file_size
886 status_flags format score techinfo afs_mode
887 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
888 offset seconds_total stream_start current_time audiod_uptime image_id
889 lyrics_id duration directory lyrics_name image_name path hash channels
890 last_played num_chunks chunk_time amplification artist title year album
891 comment"
892
893 result=
894 for i in $status_items; do
895 result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), "
896 done
897 AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result],
898 [enum of all status items])
899
900 result=
901 for i in $status_items; do
902 result="$result \"$i\", "
903 done
904 AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result],
905 [char * array of all status items])
906
907 AC_DEFINE_UNQUOTED(SERVER_AUDIO_FORMATS, "$server_audio_formats",
908 [formats supported by para_server and para_afh])
909
910 AC_SUBST(executables, add_para($executables))
911
912 recv_objs="$recv_cmdline_objs $recv_errlist_objs"
913 filter_objs="$filter_cmdline_objs $filter_errlist_objs"
914 audiod_objs="$audiod_cmdline_objs $audiod_errlist_objs"
915 server_objs="$server_cmdline_objs $server_errlist_objs"
916 write_objs="$write_cmdline_objs $write_errlist_objs"
917 client_objs="$client_cmdline_objs $client_errlist_objs"
918 audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs"
919 afh_objs="$afh_cmdline_objs $afh_errlist_objs"
920 fade_objs="$fade_cmdline_objs $fade_errlist_objs"
921
922 AC_SUBST(recv_objs, add_dot_o($recv_objs))
923 AC_SUBST(recv_ldflags, $recv_ldflags)
924 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
925 errors used by para_recv)
926
927 AC_SUBST(filter_objs, add_dot_o($filter_objs))
928 AC_SUBST(filter_ldflags, $filter_ldflags)
929 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
930 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
931
932 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
933 AC_SUBST(audiod_ldflags, $audiod_ldflags)
934 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
935 errors used by para_audiod)
936
937 AC_SUBST(server_objs, add_dot_o($server_objs))
938 AC_SUBST(server_ldflags, $server_ldflags)
939 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
940 objlist_to_errlist($server_errlist_objs), errors used by para_server)
941
942 AC_SUBST(afh_objs, add_dot_o($afh_objs))
943 AC_SUBST(afh_ldflags, $afh_ldflags)
944 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
945 objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
946
947 AC_SUBST(write_objs, add_dot_o($write_objs))
948 AC_SUBST(write_ldflags, $write_ldflags)
949 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
950 objlist_to_errlist($write_errlist_objs), errors used by para_write)
951
952 AC_SUBST(client_objs, add_dot_o($client_objs))
953 AC_SUBST(client_ldflags, $client_ldflags)
954 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
955 objlist_to_errlist($client_errlist_objs), errors used by para_client)
956
957 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
958 AC_SUBST(audioc_ldflags, $audioc_ldflags)
959 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
960 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
961
962 AC_SUBST(gui_objs, add_dot_o($gui_objs))
963 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
964 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
965
966 AC_SUBST(fade_objs, add_dot_o($fade_objs))
967 AC_SUBST(fade_ldflags, $fade_ldflags)
968 AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
969 objlist_to_errlist($fade_errlist_objs), errors used by para_fade)
970
971
972 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
973 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
974 enum of supported filters)
975 inits="$(for i in $filters; do printf 'extern void '$i'_filter_init(struct filter *f); '; done)"
976 AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported filters)
977 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
978 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
979
980 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
981 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
982 enum of supported writers)
983 AC_DEFINE_UNQUOTED(DEFAULT_WRITER, $default_writer, use this writer if none was specified)
984 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
985 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
986 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
987 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
988 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
989 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
990
991 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
992 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
993 enum of audio formats supported by audiod)
994 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
995 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
996
997 AC_OUTPUT
998 AC_MSG_NOTICE([
999 paraslash configuration:
1000 ~~~~~~~~~~~~~~~~~~~~~~~~
1001 unix socket credentials: $have_ucred
1002 audio formats supported by para_server/para_afh: $server_audio_formats
1003 id3 version2 support: $have_libid3tag
1004 filters supported by para_audiod/para_filter: $filters
1005 writers supported by para_audiod/para_write: $writers
1006 optional executables: $extras
1007 ])