audiod: Make audio_formats[] dynamic
[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 ########################################################################### generic
11 AC_PROG_CC
12 AC_PROG_CPP
13 AC_PROG_INSTALL
14
15 AC_HEADER_DIRENT
16 AC_HEADER_STDC
17 AC_HEADER_SYS_WAIT
18 AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h \
19         string.h sys/socket.h sys/time.h sys/timeb.h sys/un.h sys/ipc.h unistd.h utime.h], \
20         [], [AC_MSG_ERROR([$ac_header not found])])
21
22 AC_CHECK_HEADER(linux/soundcard.h, [extras="$extras para_fade"], 
23         [AC_MSG_WARN([linux/soundcard.h not found, cannot build para_fade])])
24
25 # Checks for typedefs, structures, and compiler characteristics.
26 AC_C_CONST
27 AC_TYPE_OFF_T
28 AC_TYPE_PID_T
29 AC_TYPE_SIZE_T
30 AC_HEADER_TIME
31 AC_STRUCT_TM
32
33 # Checks for library functions.
34 AC_FUNC_FORK
35 AC_PROG_GCC_TRADITIONAL
36 AC_FUNC_MALLOC
37 AC_FUNC_MEMCMP
38 AC_FUNC_MKTIME
39 AC_FUNC_MMAP
40 AC_FUNC_REALLOC
41 AC_FUNC_SELECT_ARGTYPES
42 AC_TYPE_SIGNAL
43 AC_FUNC_STAT
44 AC_FUNC_STRFTIME
45 AC_FUNC_VPRINTF
46 AC_CHECK_FUNCS([atexit dup2 gethostbyname inet_ntoa memchr memmove memset \
47         regcomp select socket strchr strdup strerror strstr strtol uname], [], 
48         [AC_MSG_ERROR([function not found, cannot live without it])])
49 ########################################################################### curses
50 AC_CHECK_LIB([ncurses], [initscr], [], 
51         [AC_MSG_ERROR([libncurses not found])])
52
53 AC_CHECK_LIB([menu], [new_menu], [extras="$extras para_dbadm"],
54         [AC_MSG_WARN([libmenu not found,  cannot build para_dbadm])])
55
56
57 recv_cmdline_objs="recv.cmdline http_recv.cmdline dccp_recv.cmdline"
58 recv_errlist_objs="http_recv recv_common recv time string net dccp_recv
59         dccp fd sched stdout"
60 recv_ldflags=""
61
62 receivers=" http dccp"
63 senders=" http dccp"
64 selectors=" random playlist"
65
66 filter_cmdline_objs="filter.cmdline compress_filter.cmdline"
67 filter_errlist_objs="filter_chain wav compress filter string stdin stdout sched fd"
68 filter_ldflags=""
69 filters=" compress wav"
70
71 audioc_cmdline_objs="audioc.cmdline"
72 audioc_errlist_objs="audioc string net fd"
73
74 audiod_cmdline_objs="audiod.cmdline grab_client.cmdline compress_filter.cmdline
75         http_recv.cmdline dccp_recv.cmdline file_write.cmdline client.cmdline"
76 audiod_errlist_objs="audiod signal string daemon stat net
77         time grab_client filter_chain wav compress http_recv dccp dccp_recv
78         recv_common fd sched write_common file_write audiod_command crypt
79         client_common"
80 audiod_ldflags=""
81 audiod_audio_formats=""
82
83 server_cmdline_objs="server.cmdline"
84 server_errlist_objs="server mp3_afh afs command net string signal random_selector
85         time daemon stat crypt http_send db close_on_fork playlist_selector
86         ipc dccp dccp_send fd"
87 server_ldflags=""
88 server_audio_formats=" mp3"
89
90 write_cmdline_objs="write.cmdline file_write.cmdline"
91 write_errlist_objs="write write_common file_write time fd string sched stdin"
92 write_ldflags=""
93 writers=" file"
94
95 client_cmdline_objs="client.cmdline"
96 client_errlist_objs="client net string crypt fd sched stdin stdout client_common"
97 client_ldflags=""
98
99 ########################################################################### ssl
100 dnl @synopsis CHECK_SSL
101 dnl
102 dnl based on the follwing macro from the autoconf archive
103 dnl
104 dnl @category InstalledPackages
105 dnl @author Mark Ethan Trostler <trostler@juniper.net>
106 dnl @version 2003-01-28
107 dnl @license AllPermissive
108
109 AC_DEFUN([CHECK_SSL],
110 [
111         for ssldir in $1 /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do
112                 AC_MSG_CHECKING(for openssl in $ssldir)
113                 if test -f "$ssldir/include/openssl/ssl.h"; then
114                         found_ssl="yes"
115                         AC_MSG_RESULT(yes)
116                         SSL_CFLAGS="-I$ssldir/include/openssl"
117                         SSL_CPPFLAGS="-I$ssldir/include/openssl"
118                         break
119                 fi
120                 if test -f "$ssldir/include/ssl.h"; then
121                         found_ssl="yes";
122                         AC_MSG_RESULT(yes)
123                         SSL_CFLAGS="-I$ssldir/include/";
124                         SSL_CPPFLAGS="-I$ssldir/include/";
125                         break
126                 fi
127                 AC_MSG_RESULT(no)
128         done
129         if test x_$found_ssl != x_yes; then
130                 AC_MSG_ERROR(Cannot find ssl libraries)
131         else
132                 SSL_LIBS="-lssl -lcrypto";
133                 SSL_LDFLAGS="-L$ssldir/lib";
134         fi
135         AC_SUBST(SSL_CPPFLAGS)
136         AC_SUBST(SSL_CFLAGS)
137         AC_SUBST(SSL_LIBS)
138         AC_SUBST(SSL_LDFLAGS)
139 ])dnl
140
141 AC_ARG_ENABLE(ssldir, [AS_HELP_STRING(--enable-ssldir=path,
142         [Search for openssl also in path.])])
143 if test "$enable_ssldir" = "yes"; then enable_ssldir=""; fi
144 CHECK_SSL($enable_ssldir)
145 server_ldflags="$srver_ldflags $SSL_LDFLAGS $SSL_LIBS"
146 client_ldflags="$client_ldflags $SSL_LDFLAGS $SSL_LIBS"
147 audiod_ldflags="$audiod_ldflags $SSL_LDFLAGS $SSL_LIBS"
148
149 ########################################################################### ucred
150
151 AC_MSG_CHECKING(for struct ucred)
152 AC_TRY_LINK([
153         #include <sys/types.h>
154         #include <sys/socket.h>
155 ],[
156         struct ucred sucred; sucred.pid=0;
157 ],[have_ucred=yes],[have_ucred=no])
158 AC_MSG_RESULT($have_ucred)
159 if test ${have_ucred} = yes; then
160         AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
161 fi
162
163 ########################################################################### osx
164
165 AC_MSG_CHECKING(for CoreAudio (MacOs))
166 AC_TRY_LINK([
167         #include <CoreAudio/CoreAudio.h>
168 ],[
169         AudioDeviceID id;
170 ],[have_core_audio=yes],[have_core_audio=no])
171 AC_MSG_RESULT($have_core_audio)
172 if test ${have_core_audio} = yes; then
173         f1="-framework CoreAudio"
174         f2="-framework AudioToolbox"
175         f3="-framework AudioUnit"
176         f4="-framework CoreServices"
177         f="$f1 $f2 $f3 $f4"
178         audiod_errlist_objs="$audiod_errlist_objs osx_write"
179         audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
180         audiod_ldflags="$audiod_ldflags $f"
181
182         write_errlist_objs="$write_errlist_objs osx_write"
183         write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
184         write_ldflags="$write_ldflags $f"
185         writers="$writers osx"
186         AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
187 fi
188 ########################################################################### gtk2
189
190 pkg_modules="gtk+-2.0 >= 2.0.0"
191 build_para_krell="yes"
192 PKG_CHECK_MODULES(GTK, [$pkg_modules], [], [build_para_krell="no"])
193 AC_CHECK_HEADER(gkrellm2/gkrellm.h, [], [build_para_krell="no"])
194 if test build_para_krell = "yes"; then
195         AC_SUBST(GTK_CFLAGS)
196         AC_SUBST(GTK_LIBS)
197         extras="$extras para_krell.so"
198 else
199         AC_MSG_WARN([can not build para_krell])
200 fi
201
202 ########################################################################### sdl
203 # FIXME
204 AC_CHECK_LIB([SDL_image], [SDL_Init], [extras="$extras para_sdl_gui"], [
205         AC_MSG_WARN([libSDL_image not found, cannot build para_sdl_gui])
206 ])
207 AC_CHECK_HEADER(SDL/SDL.h, [], 
208         [AC_MSG_WARN([SDL/SDL.h not found])])
209
210 ########################################################################### mysql
211 have_mysql="yes"
212 OLD_CPPFLAGS="$CPPFLAGS"
213 OLD_LD_FLAGS="$LDFLAGS"
214 AC_ARG_WITH(mysql_headers, [AC_HELP_STRING(--with-mysql-headers=dir,
215         [look for mysql.h also in dir])])
216 if test -n "$with_mysql_headers"; then
217         mysql_cppflags="-I$with_mysql_headers"
218         CPPFLAGS="$CPPFLAGS $mysql_cppflags"
219 fi
220 AC_ARG_WITH(mysql_libs, [AC_HELP_STRING(--with-mysql-libs=dir,
221         [look for libmysqlclient also in dir])])
222 if test -n "$with_mysql_libs"; then
223         mysql_libs="-L$with_mysql_libs"
224         LDFLAGS="$LDFLAGS $mysql_libs"
225 fi
226 AC_CHECK_HEADER(mysql/mysql.h, [], [
227         have_mysql="no"
228 ])
229 AC_CHECK_LIB([mysqlclient], [mysql_init], [], [
230         have_mysql="no"
231 ])
232 if test "$have_mysql" = "yes"; then
233         selectors="$selectors mysql"
234         server_ldflags="$server_ldflags $mysql_libs -lmysqlclient"
235         server_errlist_objs="$server_errlist_objs mysql_selector"
236         AC_SUBST(mysql_cppflags)
237         AC_SUBST(mysql_libs)
238         AC_DEFINE(HAVE_MYSQL, 1, [define to 1 to turn on mysql support])
239 else
240         AC_MSG_WARN([cannot build mysql-based audio file selector])
241 fi
242 CPPFLAGS="$OLD_CPPFLAGS"
243 LDFLAGS="$OLD_LDFLAGS"
244 ########################################################################### ogg
245 have_ogg="yes"
246 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [
247         have_ogg="no"
248 ])
249 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [
250         have_ogg="no"
251 ])
252 AC_CHECK_HEADERS([ogg/ogg.h vorbis/codec.h], [], [
253         have_ogg="no"
254 ])
255 if test "$have_ogg" = "yes"; then
256         AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg vorbis support)
257         filters="$filters oggdec"
258         server_ldflags="$server_ldflags -logg -lvorbis -lvorbisfile"
259         filter_ldflags="$filter_ldflags -lvorbis -lvorbisfile"
260         audiod_ldflags="$audiod_ldflags -lvorbis -lvorbisfile"
261
262         filter_cmdline_objs="$filter_cmdline_objs oggdec_filter.cmdline"
263         audiod_cmdline_objs="$audiod_cmdline_objs oggdec_filter.cmdline"
264
265         server_errlist_objs="$server_errlist_objs ogg_afh"
266         filter_errlist_objs="$filter_errlist_objs oggdec"
267         audiod_errlist_objs="$audiod_errlist_objs oggdec"
268
269         audiod_audio_formats="ogg"
270         server_audio_formats="$server_audio_formats ogg"
271         filter_filters="$filter_filters oggdec"
272 else
273         AC_MSG_WARN([no ogg vorbis support in para_server/para_filter])
274 fi
275 ########################################################################### faad
276 have_faad=yes
277 OLD_CPPFLAGS="$CPPFLAGS"
278 OLD_LD_FLAGS="$LDFLAGS"
279 AC_ARG_WITH(faad_headers, [AC_HELP_STRING(--with-faad-headers=dir,
280         [look for neaacdec.h also in dir])])
281 if test -n "$with_faad_headers"; then
282         faad_cppflags="-I$with_faad_headers"
283         CPPFLAGS="$CPPFLAGS $faad_cppflags"
284 fi
285 AC_ARG_WITH(faad_libs, [AC_HELP_STRING(--with-faad-libs=dir,
286         [look for libfaad also in dir])])
287 if test -n "$with_faad_libs"; then
288         faad_libs="-L$with_faad_libs"
289         LDFLAGS="$LDFLAGS $faad_libs"
290 fi
291 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
292 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
293 if test "$have_faad" = "yes"; then
294         AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
295         filter_errlist_objs="$filter_errlist_objs aacdec aac_common"
296         filter_filters="$filter_filters aacdec"
297         audiod_errlist_objs="$audiod_errlist_objs aacdec aac_common"
298         server_errlist_objs="$server_errlist_objs aac_afh aac_common"
299         server_ldflags="$server_ldflags $faad_libs -lfaad"
300         filter_ldflags="$filter_ldflags $faad_libs -lfaad"
301         audiod_ldflags="$audiod_ldflags $faad_libs -lfaad"
302         audiod_audio_formats="$audiod_audio_formats aac"
303         server_audio_formats="$server_audio_formats aac"
304         filters="$filters aacdec"
305         AC_SUBST(faad_cppflags)
306         AC_SUBST(faad_libs)
307 else
308         AC_MSG_WARN([no aac support in para_audiod/para_filter])
309 fi
310 CPPFLAGS="$OLD_CPPFLAGS"
311 LDFLAGS="$OLD_LDFLAGS"
312 ########################################################################### mad
313 have_mad="yes"
314 OLD_CPPFLAGS="$CPPFLAGS"
315 OLD_LD_FLAGS="$LDFLAGS"
316 AC_ARG_WITH(mad_headers, [AC_HELP_STRING(--with-mad-headers=dir,
317         [look for mad.h also in dir])])
318 if test -n "$with_mad_headers"; then
319         mad_cppflags="-I$with_mad_headers"
320         CPPFLAGS="$CPPFLAGS $mad_cppflags"
321 fi
322 AC_ARG_WITH(mad_libs, [AC_HELP_STRING(--with-mad-libs=dir,
323         [look for libmad also in dir])])
324 if test -n "$with_mad_libs"; then
325         mad_libs="-L$with_mad_libs"
326         LDFLAGS="$LDFLAGS $mad_libs"
327 fi
328 AC_CHECK_HEADERS([mad.h], [], [
329         have_mad="no"
330 ])
331 AC_CHECK_LIB([mad], [mad_stream_init], [], [
332         have_mad="no"
333 ])
334 if test "$have_mad" = "yes"; then
335         AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
336         filter_errlist_objs="$filter_errlist_objs mp3dec"
337         audiod_errlist_objs="$audiod_errlist_objs mp3dec"
338         filter_ldflags="$filter_ldflags $mad_libs -lmad"
339         audiod_ldflags="$audiod_ldflags $mad_libs -lmad"
340         audiod_audio_formats="$audiod_audio_formats mp3"
341         filters="$filters mp3dec"
342         AC_SUBST(mad_cppflags)
343         AC_SUBST(mad_libs)
344 else
345         AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
346 fi
347 if test -n "$audiod_audio_formats"; then
348         extras="$extras para_audiod"
349 else
350         AC_MSG_WARN([can not build para_audiod (no supported audio formats)])
351 fi
352 CPPFLAGS="$OLD_CPPFLAGS"
353 LDFLAGS="$OLD_LDFLAGS"
354 ########################################################################### alsa
355 have_alsa="yes"
356 msg="=> no alsa support for para_audiod/para_write"
357 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
358         AC_MSG_WARN([no alsa/asoundlib $msg])
359         have_alsa="no"
360 ])
361 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
362         AC_MSG_WARN([no libasound $msg])
363         have_alsa="no"
364 ])
365 if test "$have_alsa" = "yes"; then
366         audiod_errlist_objs="$audiod_errlist_objs alsa_write"
367         audiod_cmdline_objs="$audiod_cmdline_objs alsa_write.cmdline"
368         audiod_ldflags="$audiod_ldflags -lasound"
369
370         write_errlist_objs="$write_errlist_objs alsa_write"
371         write_cmdline_objs="$write_cmdline_objs alsa_write.cmdline"
372         write_ldflags="$write_ldflags -lasound"
373         writers="$writers alsa"
374 fi
375 ########################################################################### ortp
376 have_ortp="yes"
377 OLD_CPPFLAGS="$CPPFLAGS"
378 OLD_LD_FLAGS="$LDFLAGS"
379 AC_ARG_WITH(ortp_headers, [AC_HELP_STRING(--with-ortp-headers=dir,
380         [look for ortp/ortp.h also in dir])])
381 if test -n "$with_ortp_headers"; then
382         ortp_cppflags="-I$with_ortp_headers"
383         CPPFLAGS="$CPPFLAGS $ortp_cppflags"
384 fi
385 AC_ARG_WITH(ortp_libs, [AC_HELP_STRING(--with-ortp-libs=dir,
386         [look for libortp also in dir])])
387 if test -n "$with_ortp_libs"; then
388         ortp_libs="-L$with_ortp_libs"
389         LDFLAGS="$LDFLAGS $ortp_libs"
390 fi
391 AC_CHECK_HEADERS([ortp/ortp.h], [], [have_ortp="no"])
392 AC_CHECK_LIB([ortp], [ortp_init], [], [have_ortp="no"])
393 if test "$have_ortp" = "yes"; then
394         recv_cmdline_objs="$recv_cmdline_objs ortp_recv.cmdline"
395         recv_errlist_objs="$recv_errlist_objs ortp_recv"
396
397         audiod_cmdline_objs="$audiod_cmdline_objs ortp_recv.cmdline"
398         audiod_errlist_objs="$audiod_errlist_objs ortp_recv"
399
400         server_errlist_objs="$server_errlist_objs ortp_send"
401
402         recv_ldflags="$recv_ldflags $ortp_libs -lortp"
403         server_ldflags="$server_ldflags $ortp_libs -lortp"
404         audiod_ldflags="$audiod_ldflags $ortp_libs -lortp"
405
406         receivers="$receivers ortp"
407         senders="$senders ortp"
408         AC_DEFINE(HAVE_ORTP, 1, [define to 1 to turn on ortp support])
409         AC_SUBST(ortp_cppflags)
410         AC_SUBST(ortp_libs)
411 else
412         AC_MSG_NOTICE([deactivating ortp sender/receiver])
413 fi
414 CPPFLAGS="$OLD_CPPFLAGS"
415 LDFLAGS="$OLD_LDFLAGS"
416 ########################################################################### zmw
417 slide="para_slider"
418 msg="can not build para_slider"
419 CPPFLAGS="$GTK_CFLAGS"
420 LDFLAGS="$LDFLAGS $GTK_LIBS"
421 AC_CHECK_HEADERS([zmw/zmw.h], [], [
422         AC_MSG_WARN([zero memory widget header files not found, $msg])
423         slide=""
424 ])
425 AC_CHECK_LIB([zmw], [zmw_init], [], [
426         AC_MSG_WARN([zero memory widget library not found, $msg])
427         slide=""
428 ])
429 extras="$extras $slide"
430
431
432
433
434
435 AC_SUBST(extra_binaries, [$extras])
436 AC_SUBST(extra_filter_objs, [$extra_filter_objs])
437 AC_SUBST(extra_filter_libs, [$extra_filter_libs])
438 AC_SUBST(install_sh, [$INSTALL])
439 AC_CONFIG_FILES([Makefile])
440
441
442
443 AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
444 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) }])
445
446 recv_objs="$recv_cmdline_objs $recv_errlist_objs"
447 filter_objs="$filter_cmdline_objs $filter_errlist_objs"
448 audiod_objs="$audiod_cmdline_objs $audiod_errlist_objs"
449 server_objs="$server_cmdline_objs $server_errlist_objs"
450 write_objs="$write_cmdline_objs $write_errlist_objs"
451 client_objs="$client_cmdline_objs $client_errlist_objs"
452 audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs"
453
454 AC_SUBST(recv_objs, add_dot_o($recv_objs))
455 AC_SUBST(recv_ldflags, $recv_ldflags)
456 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
457         errors used by para_recv)
458
459 AC_SUBST(filter_objs, add_dot_o($filter_objs))
460 AC_SUBST(filter_ldflags, $filter_ldflags)
461 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
462         objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
463
464 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
465 AC_SUBST(audiod_ldflags, $audiod_ldflags)
466 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
467         errors used by para_audiod)
468
469 AC_SUBST(server_objs, add_dot_o($server_objs))
470 AC_SUBST(server_ldflags, $server_ldflags)
471 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
472         objlist_to_errlist($server_errlist_objs), errors used by para_server)
473
474 AC_SUBST(write_objs, add_dot_o($write_objs))
475 AC_SUBST(write_ldflags, $write_ldflags)
476 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
477         objlist_to_errlist($write_errlist_objs), errors used by para_write)
478
479 AC_SUBST(client_objs, add_dot_o($client_objs))
480 AC_SUBST(client_ldflags, $client_ldflags)
481 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
482         objlist_to_errlist($client_errlist_objs), errors used by para_client)
483
484 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
485 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
486         objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
487
488 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
489 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
490         enum of supported writers)
491 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
492 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
493 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
494 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
495 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
496 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
497 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
498 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
499         enum of audio formats supported by audiod)
500 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
501 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
502
503 gui_cmdline_objs="gui.cmdline"
504 gui_errlist_objs="exec close_on_fork signal string stat ringbuffer fd"
505 gui_other_objs="gui gui_common gui_theme"
506 gui_objs="$gui_cmdline_objs $gui_errlist_objs $gui_other_objs"
507 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
508         objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
509 AC_SUBST(gui_objs, add_dot_o($gui_objs))
510
511 AC_OUTPUT
512 AC_MSG_NOTICE([creating Makefile.deps])
513 gcc -MM -MG $mysql_cppflags $faad_cppflags $mad_cppflags $ortp_cppflags *.c > Makefile.deps
514 AC_MSG_NOTICE([
515 paraslash configuration:
516 ~~~~~~~~~~~~~~~~~~~~~~~~
517 unix socket credentials: $have_ucred
518 audio file selectors supported by para_server: $selectors
519 audio formats supported by para_server: $server_audio_formats
520 senders supported by para_server/para_send: $senders
521 receivers supported by para_audiod/para_recv: $receivers
522 filters supported by para_audiod/para_filter: $filters
523 writers supported by para_audiod/para_write: $writers
524 ])