add --with-oggvorbis-libs and --with-oggvorbis-headers options for configure
[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 AC_MSG_CHECKING(for struct ucred)
151 AC_TRY_LINK([
152 #include <sys/types.h>
153 #include <sys/socket.h>
154 ],[
155 struct ucred sucred; sucred.pid=0;
156 ],[have_ucred=yes],[have_ucred=no])
157 AC_MSG_RESULT($have_ucred)
158 if test ${have_ucred} = yes; then
159 AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
160 fi
161
162 ########################################################################### osx
163
164 AC_MSG_CHECKING(for CoreAudio (MacOs))
165 AC_TRY_LINK([
166 #include <CoreAudio/CoreAudio.h>
167 ],[
168 AudioDeviceID id;
169 ],[have_core_audio=yes],[have_core_audio=no])
170 AC_MSG_RESULT($have_core_audio)
171 if test ${have_core_audio} = yes; then
172 f1="-framework CoreAudio"
173 f2="-framework AudioToolbox"
174 f3="-framework AudioUnit"
175 f4="-framework CoreServices"
176 f="$f1 $f2 $f3 $f4"
177 audiod_errlist_objs="$audiod_errlist_objs osx_write"
178 audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
179 audiod_ldflags="$audiod_ldflags $f"
180
181 write_errlist_objs="$write_errlist_objs osx_write"
182 write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
183 write_ldflags="$write_ldflags $f"
184 writers="$writers osx"
185 AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
186 fi
187 ########################################################################### gtk2
188 pkg_modules="gtk+-2.0 >= 2.0.0"
189 build_para_krell="yes"
190 PKG_CHECK_MODULES(GTK, [$pkg_modules], [], [build_para_krell="no"])
191 AC_CHECK_HEADER(gkrellm2/gkrellm.h, [], [build_para_krell="no"])
192 if test build_para_krell = "yes"; then
193 AC_SUBST(GTK_CFLAGS)
194 AC_SUBST(GTK_LIBS)
195 extras="$extras para_krell.so"
196 else
197 AC_MSG_WARN([can not build para_krell])
198 fi
199 ########################################################################### sdl
200 # FIXME
201 AC_CHECK_LIB([SDL_image], [SDL_Init], [extras="$extras para_sdl_gui"], [
202 AC_MSG_WARN([libSDL_image not found, cannot build para_sdl_gui])
203 ])
204 AC_CHECK_HEADER(SDL/SDL.h, [],
205 [AC_MSG_WARN([SDL/SDL.h not found])])
206
207 ########################################################################### mysql
208 have_mysql="yes"
209 OLD_CPPFLAGS="$CPPFLAGS"
210 OLD_LD_FLAGS="$LDFLAGS"
211 OLD_LIBS="$LIBS"
212 AC_ARG_WITH(mysql_headers, [AC_HELP_STRING(--with-mysql-headers=dir,
213 [look for mysql.h also in dir])])
214 if test -n "$with_mysql_headers"; then
215 mysql_cppflags="-I$with_mysql_headers"
216 CPPFLAGS="$CPPFLAGS $mysql_cppflags"
217 fi
218 AC_ARG_WITH(mysql_libs, [AC_HELP_STRING(--with-mysql-libs=dir,
219 [look for libmysqlclient also in dir])])
220 if test -n "$with_mysql_libs"; then
221 mysql_libs="-L$with_mysql_libs"
222 LDFLAGS="$LDFLAGS $mysql_libs"
223 fi
224 AC_CHECK_HEADER(mysql/mysql.h, [], [
225 have_mysql="no"
226 ])
227 AC_CHECK_LIB([mysqlclient], [mysql_init], [], [
228 have_mysql="no"
229 ])
230 if test "$have_mysql" = "yes"; then
231 selectors="$selectors mysql"
232 server_ldflags="$server_ldflags $mysql_libs -lmysqlclient"
233 server_errlist_objs="$server_errlist_objs mysql_selector"
234 AC_SUBST(mysql_cppflags)
235 AC_SUBST(mysql_libs)
236 AC_DEFINE(HAVE_MYSQL, 1, [define to 1 to turn on mysql support])
237 else
238 AC_MSG_WARN([cannot build mysql-based audio file selector])
239 fi
240 CPPFLAGS="$OLD_CPPFLAGS"
241 LDFLAGS="$OLD_LDFLAGS"
242 LIBS="$OLD_LIBS"
243 ########################################################################### ogg
244 have_ogg="yes"
245 OLD_CPPFLAGS="$CPPFLAGS"
246 OLD_LD_FLAGS="$LDFLAGS"
247 OLD_LIBS="$LIBS"
248 AC_ARG_WITH(oggvorbis_headers, [AC_HELP_STRING(--with-oggvorbis-headers=dir,
249 [look for vorbis/codec.h also in dir])])
250 if test -n "$with_oggvorbis_headers"; then
251 oggvorbis_cppflags="-I$with_oggvorbis_headers"
252 CPPFLAGS="$CPPFLAGS $oggvorbis_cppflags"
253 fi
254 AC_ARG_WITH(oggvorbis_libs, [AC_HELP_STRING(--with-oggvorbis-libs=dir,
255 [look for oggvorbis libs also in dir])])
256 if test -n "$with_oggvorbis_libs"; then
257 oggvorbis_libs="-L$with_oggvorbis_libs"
258 LDFLAGS="$LDFLAGS $oggvorbis_libs"
259 fi
260
261 AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
262 AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_ogg="no" ])
263 AC_CHECK_HEADERS([ogg/ogg.h vorbis/codec.h], [], [ have_ogg="no" ])
264 if test "$have_ogg" = "yes"; then
265 AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg vorbis support)
266 filters="$filters oggdec"
267 server_ldflags="$server_ldflags $oggvorbis_libs -logg -lvorbis -lvorbisfile"
268 filter_ldflags="$filter_ldflags $oggvorbis_libs -lvorbis -lvorbisfile"
269 audiod_ldflags="$audiod_ldflags $oggvorbis_libs -lvorbis -lvorbisfile"
270
271 filter_cmdline_objs="$filter_cmdline_objs oggdec_filter.cmdline"
272 audiod_cmdline_objs="$audiod_cmdline_objs oggdec_filter.cmdline"
273
274 server_errlist_objs="$server_errlist_objs ogg_afh"
275 filter_errlist_objs="$filter_errlist_objs oggdec"
276 audiod_errlist_objs="$audiod_errlist_objs oggdec"
277
278 audiod_audio_formats="ogg"
279 server_audio_formats="$server_audio_formats ogg"
280 filter_filters="$filter_filters oggdec"
281 AC_SUBST(oggvorbis_cppflags)
282 AC_SUBST(oggvorbis_libs)
283 else
284 AC_MSG_WARN([no ogg vorbis support in para_server/para_filter])
285 fi
286 CPPFLAGS="$OLD_CPPFLAGS"
287 LDFLAGS="$OLD_LDFLAGS"
288 LIBS="$OLD_LIBS"
289 ########################################################################### faad
290 have_faad=yes
291 OLD_CPPFLAGS="$CPPFLAGS"
292 OLD_LD_FLAGS="$LDFLAGS"
293 OLD_LIBS="$LIBS"
294 AC_ARG_WITH(faad_headers, [AC_HELP_STRING(--with-faad-headers=dir,
295 [look for neaacdec.h also in dir])])
296 if test -n "$with_faad_headers"; then
297 faad_cppflags="-I$with_faad_headers"
298 CPPFLAGS="$CPPFLAGS $faad_cppflags"
299 fi
300 AC_ARG_WITH(faad_libs, [AC_HELP_STRING(--with-faad-libs=dir,
301 [look for libfaad also in dir])])
302 if test -n "$with_faad_libs"; then
303 faad_libs="-L$with_faad_libs"
304 LDFLAGS="$LDFLAGS $faad_libs"
305 fi
306 AC_CHECK_HEADER(neaacdec.h, [], have_faad=no)
307 AC_CHECK_LIB([faad], [NeAACDecOpen], [], have_faad=no)
308 if test "$have_faad" = "yes"; then
309 AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
310 filter_errlist_objs="$filter_errlist_objs aacdec aac_common"
311 filter_filters="$filter_filters aacdec"
312 audiod_errlist_objs="$audiod_errlist_objs aacdec aac_common"
313 server_errlist_objs="$server_errlist_objs aac_afh aac_common"
314 server_ldflags="$server_ldflags $faad_libs -lfaad"
315 filter_ldflags="$filter_ldflags $faad_libs -lfaad"
316 audiod_ldflags="$audiod_ldflags $faad_libs -lfaad"
317 audiod_audio_formats="$audiod_audio_formats aac"
318 server_audio_formats="$server_audio_formats aac"
319 filters="$filters aacdec"
320 AC_SUBST(faad_cppflags)
321 AC_SUBST(faad_libs)
322 else
323 AC_MSG_WARN([no aac support in para_audiod/para_filter])
324 fi
325 CPPFLAGS="$OLD_CPPFLAGS"
326 LDFLAGS="$OLD_LDFLAGS"
327 LIBS="$OLD_LIBS"
328 ########################################################################### mad
329 have_mad="yes"
330 OLD_CPPFLAGS="$CPPFLAGS"
331 OLD_LD_FLAGS="$LDFLAGS"
332 OLD_LIBS="$LIBS"
333
334 AC_ARG_WITH(mad_headers, [AC_HELP_STRING(--with-mad-headers=dir,
335 [look for mad.h also in dir])])
336 if test -n "$with_mad_headers"; then
337 mad_cppflags="-I$with_mad_headers"
338 CPPFLAGS="$CPPFLAGS $mad_cppflags"
339 fi
340 AC_ARG_WITH(mad_libs, [AC_HELP_STRING(--with-mad-libs=dir,
341 [look for libmad also in dir])])
342 if test -n "$with_mad_libs"; then
343 mad_libs="-L$with_mad_libs"
344 LDFLAGS="$LDFLAGS $mad_libs"
345 fi
346 AC_CHECK_HEADERS([mad.h], [], [
347 have_mad="no"
348 ])
349 AC_CHECK_LIB([mad], [mad_stream_init], [], [
350 have_mad="no"
351 ])
352 if test "$have_mad" = "yes"; then
353 AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
354 filter_errlist_objs="$filter_errlist_objs mp3dec"
355 audiod_errlist_objs="$audiod_errlist_objs mp3dec"
356 filter_ldflags="$filter_ldflags $mad_libs -lmad"
357 audiod_ldflags="$audiod_ldflags $mad_libs -lmad"
358 audiod_audio_formats="$audiod_audio_formats mp3"
359 filters="$filters mp3dec"
360 AC_SUBST(mad_cppflags)
361 AC_SUBST(mad_libs)
362 else
363 AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
364 fi
365 if test -n "$audiod_audio_formats"; then
366 extras="$extras para_audiod"
367 else
368 AC_MSG_WARN([can not build para_audiod (no supported audio formats)])
369 fi
370 CPPFLAGS="$OLD_CPPFLAGS"
371 LDFLAGS="$OLD_LDFLAGS"
372 LIBS="$OLD_LIBS"
373 ########################################################################### alsa
374 have_alsa="yes"
375 OLD_CPPFLAGS="$CPPFLAGS"
376 OLD_LD_FLAGS="$LDFLAGS"
377 OLD_LIBS="$LIBS"
378 msg="=> no alsa support for para_audiod/para_write"
379 AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
380 AC_MSG_WARN([no alsa/asoundlib $msg])
381 have_alsa="no"
382 ])
383 AC_CHECK_LIB([asound], [snd_pcm_open], [], [
384 AC_MSG_WARN([no libasound $msg])
385 have_alsa="no"
386 ])
387 if test "$have_alsa" = "yes"; then
388 audiod_errlist_objs="$audiod_errlist_objs alsa_write"
389 audiod_cmdline_objs="$audiod_cmdline_objs alsa_write.cmdline"
390 audiod_ldflags="$audiod_ldflags -lasound"
391
392 write_errlist_objs="$write_errlist_objs alsa_write"
393 write_cmdline_objs="$write_cmdline_objs alsa_write.cmdline"
394 write_ldflags="$write_ldflags -lasound"
395 writers="$writers alsa"
396 fi
397 CPPFLAGS="$OLD_CPPFLAGS"
398 LDFLAGS="$OLD_LDFLAGS"
399 LIBS="$OLD_LIBS"
400 ########################################################################### ortp
401 have_ortp="yes"
402 OLD_CPPFLAGS="$CPPFLAGS"
403 OLD_LD_FLAGS="$LDFLAGS"
404 OLD_LIBS="$LIBS"
405 AC_ARG_WITH(ortp_headers, [AC_HELP_STRING(--with-ortp-headers=dir,
406 [look for ortp/ortp.h also in dir])])
407 if test -n "$with_ortp_headers"; then
408 ortp_cppflags="-I$with_ortp_headers"
409 CPPFLAGS="$CPPFLAGS $ortp_cppflags"
410 fi
411 AC_ARG_WITH(ortp_libs, [AC_HELP_STRING(--with-ortp-libs=dir,
412 [look for libortp also in dir])])
413 if test -n "$with_ortp_libs"; then
414 ortp_libs="-L$with_ortp_libs"
415 LDFLAGS="$LDFLAGS $ortp_libs"
416 fi
417 AC_CHECK_HEADERS([ortp/ortp.h], [], [have_ortp="no"])
418 AC_CHECK_LIB([ortp], [ortp_init], [], [have_ortp="no"])
419 if test "$have_ortp" = "yes"; then
420 recv_cmdline_objs="$recv_cmdline_objs ortp_recv.cmdline"
421 recv_errlist_objs="$recv_errlist_objs ortp_recv"
422
423 audiod_cmdline_objs="$audiod_cmdline_objs ortp_recv.cmdline"
424 audiod_errlist_objs="$audiod_errlist_objs ortp_recv"
425
426 server_errlist_objs="$server_errlist_objs ortp_send"
427
428 recv_ldflags="$recv_ldflags $ortp_libs -lortp"
429 server_ldflags="$server_ldflags $ortp_libs -lortp"
430 audiod_ldflags="$audiod_ldflags $ortp_libs -lortp"
431
432 receivers="$receivers ortp"
433 senders="$senders ortp"
434 AC_DEFINE(HAVE_ORTP, 1, [define to 1 to turn on ortp support])
435 AC_SUBST(ortp_cppflags)
436 AC_SUBST(ortp_libs)
437 else
438 AC_MSG_NOTICE([deactivating ortp sender/receiver])
439 fi
440 CPPFLAGS="$OLD_CPPFLAGS"
441 LDFLAGS="$OLD_LDFLAGS"
442 LIBS="$OLD_LIBS"
443 ########################################################################### zmw
444 build_slider="yes"
445 OLD_CPPFLAGS="$CPPFLAGS"
446 OLD_LD_FLAGS="$LDFLAGS"
447 OLD_LIBS="$LIBS"
448 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.4], [], [build_slider="no"])
449 CPPFLAGS="$GTK_CFLAGS $GLIB_CFLAGS"
450 LDFLAGS="$LDFLAGS $GTK_LIBS"
451 AC_CHECK_HEADERS([zmw/zmw.h], [], [build_slider="no"])
452 AC_CHECK_LIB([zmw], [zmw_init], [], [build_slider="no"])
453 if test "$build_slider" = "no"; then
454 AC_MSG_WARN([will not build para_slider])
455 else
456 extras="$extras para_slider"
457 fi
458 CPPFLAGS="$OLD_CPPFLAGS"
459 LDFLAGS="$OLD_LDFLAGS"
460 LIBS="$OLD_LIBS"
461
462
463
464
465
466 AC_SUBST(extra_binaries, [$extras])
467 AC_SUBST(extra_filter_objs, [$extra_filter_objs])
468 AC_SUBST(extra_filter_libs, [$extra_filter_libs])
469 AC_SUBST(install_sh, [$INSTALL])
470 AC_CONFIG_FILES([Makefile])
471
472
473
474 AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
475 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) }])
476
477 recv_objs="$recv_cmdline_objs $recv_errlist_objs"
478 filter_objs="$filter_cmdline_objs $filter_errlist_objs"
479 audiod_objs="$audiod_cmdline_objs $audiod_errlist_objs"
480 server_objs="$server_cmdline_objs $server_errlist_objs"
481 write_objs="$write_cmdline_objs $write_errlist_objs"
482 client_objs="$client_cmdline_objs $client_errlist_objs"
483 audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs"
484
485 AC_SUBST(recv_objs, add_dot_o($recv_objs))
486 AC_SUBST(recv_ldflags, $recv_ldflags)
487 AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
488 errors used by para_recv)
489
490 AC_SUBST(filter_objs, add_dot_o($filter_objs))
491 AC_SUBST(filter_ldflags, $filter_ldflags)
492 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
493 objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
494
495 AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
496 AC_SUBST(audiod_ldflags, $audiod_ldflags)
497 AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
498 errors used by para_audiod)
499
500 AC_SUBST(server_objs, add_dot_o($server_objs))
501 AC_SUBST(server_ldflags, $server_ldflags)
502 AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
503 objlist_to_errlist($server_errlist_objs), errors used by para_server)
504
505 AC_SUBST(write_objs, add_dot_o($write_objs))
506 AC_SUBST(write_ldflags, $write_ldflags)
507 AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
508 objlist_to_errlist($write_errlist_objs), errors used by para_write)
509
510 AC_SUBST(client_objs, add_dot_o($client_objs))
511 AC_SUBST(client_ldflags, $client_ldflags)
512 AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,
513 objlist_to_errlist($client_errlist_objs), errors used by para_client)
514
515 AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
516 AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
517 objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
518
519 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
520 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
521 enum of supported writers)
522 names="$(for i in $writers; do printf \"$i\",' ' ; done)"
523 AC_DEFINE_UNQUOTED(WRITER_NAMES, $names, supported writer names)
524 inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer *); '; done)"
525 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
526 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
527 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
528 enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
529 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
530 enum of audio formats supported by audiod)
531 names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
532 AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
533
534 gui_cmdline_objs="gui.cmdline"
535 gui_errlist_objs="exec close_on_fork signal string stat ringbuffer fd"
536 gui_other_objs="gui gui_common gui_theme"
537 gui_objs="$gui_cmdline_objs $gui_errlist_objs $gui_other_objs"
538 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
539 objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
540 AC_SUBST(gui_objs, add_dot_o($gui_objs))
541
542 AC_OUTPUT
543 AC_MSG_NOTICE([creating Makefile.deps])
544 gcc -MM -MG $mysql_cppflags $faad_cppflags $mad_cppflags $ortp_cppflags $oggvorbis_cppflags *.c > Makefile.deps
545 AC_MSG_NOTICE([
546 paraslash configuration:
547 ~~~~~~~~~~~~~~~~~~~~~~~~
548 unix socket credentials: $have_ucred
549 audio file selectors supported by para_server: $selectors
550 audio formats supported by para_server: $server_audio_formats
551 senders supported by para_server/para_send: $senders
552 receivers supported by para_audiod/para_recv: $receivers
553 filters supported by para_audiod/para_filter: $filters
554 writers supported by para_audiod/para_write: $writers
555 optional executables: $extras
556 ])