AC_CONFIG_FILES([Makefile])
AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
+AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
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) }])
AC_PATH_PROG(UNAMEPATH, uname, no)
if test "$UNAMEPATH" = "no"; then
strncasecmp strrchr strspn alarm mkdir inet_ntoa socket], [],
[AC_MSG_ERROR([function not found, cannot live without it])])
-AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
-
-
executables="recv filter audioc write afh play"
audio_format_handlers="mp3 wma"
-recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv afh_recv)"
+recv_cmdline_objs="
+ recv
+ http_recv
+ dccp_recv
+ udp_recv
+ afh_recv
+"
recv_errlist_objs="
http_recv recv_common recv time string net dccp_recv fd
recv_ldflags=""
-filter_cmdline_objs="add_cmdline(filter compress_filter amp_filter prebuffer_filter)"
+filter_cmdline_objs="
+ filter
+ compress_filter
+ amp_filter
+ prebuffer_filter
+"
filter_errlist_objs="filter_common wav_filter compress_filter filter string
stdin stdout sched fd amp_filter ggo fecdec_filter fec version
prebuffer_filter time bitstream imdct wma_common wmadec_filter buffer_tree"
filter_ldflags="-lm"
filters=" compress wav amp fecdec wmadec prebuffer"
-audioc_cmdline_objs="add_cmdline(audioc)"
+audioc_cmdline_objs="audioc"
audioc_errlist_objs="
audioc
string
"
audioc_ldflags=""
-afh_cmdline_objs="add_cmdline(afh)"
+afh_cmdline_objs="afh"
afh_errlist_objs="afh string fd mp3_afh afh_common time wma_afh wma_common
version ggo"
afh_ldflags=""
-write_cmdline_objs="add_cmdline(write file_write)"
+write_cmdline_objs="write file_write"
write_errlist_objs="write write_common file_write time fd string sched stdin
buffer_tree ggo check_wav version"
write_ldflags=""
writers=" file"
default_writer="FILE_WRITE"
-gui_cmdline_objs="add_cmdline(gui)"
+gui_cmdline_objs="gui"
gui_errlist_objs="
exec
signal
version
ggo
"
-gui_objs="$gui_cmdline_objs $gui_errlist_objs"
play_errlist_objs="play fd sched ggo buffer_tree time string net
afh_recv afh_common
wma_afh wma_common mp3_afh
write_common file_write
version
"
-play_cmdline_objs="add_cmdline(http_recv dccp_recv udp_recv afh_recv compress_filter amp_filter prebuffer_filter file_write play)"
+play_cmdline_objs="
+ http_recv
+ dccp_recv
+ udp_recv
+ afh_recv
+ compress_filter
+ amp_filter
+ prebuffer_filter
+ file_write
+ play
+"
play_ldflags="-lm"
################################################################## clock_gettime
clock_gettime_lib=
])
if test "$have_mad" = "yes"; then
AC_DEFINE(HAVE_MAD, 1, define to 1 if you want to build the mp3dec filter)
- filter_cmdline_objs="$filter_cmdline_objs add_cmdline(mp3dec_filter)"
- audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(mp3dec_filter)"
- play_cmdline_objs="$play_cmdline_objs add_cmdline(mp3dec_filter)"
+ filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
+ audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
+ play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
play_errlist_objs="$play_errlist_objs mp3dec_filter"
AC_CHECK_HEADER(sys/soundcard.h, [
audiod_errlist_objs="$audiod_errlist_objs oss_write"
play_errlist_objs="$play_errlist_objs oss_write"
- audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(oss_write)"
- play_cmdline_objs="$play_cmdline_objs add_cmdline(oss_write)"
+ audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
+ play_cmdline_objs="$play_cmdline_objs oss_write"
write_errlist_objs="$write_errlist_objs oss_write"
- write_cmdline_objs="$write_cmdline_objs add_cmdline(oss_write)"
+ write_cmdline_objs="$write_cmdline_objs oss_write"
fade_errlist_objs="$fade_errlist_objs oss_mix"
writers="$writers oss"
if test "$have_alsa" = "yes"; then
audiod_errlist_objs="$audiod_errlist_objs alsa_write"
- audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(alsa_write)"
+ audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
audiod_ldflags="$audiod_ldflags -lasound"
play_errlist_objs="$play_errlist_objs alsa_write"
- play_cmdline_objs="$play_cmdline_objs add_cmdline(alsa_write)"
+ play_cmdline_objs="$play_cmdline_objs alsa_write"
play_ldflags="$play_ldflags -lasound"
write_errlist_objs="$write_errlist_objs alsa_write"
- write_cmdline_objs="$write_cmdline_objs add_cmdline(alsa_write)"
+ write_cmdline_objs="$write_cmdline_objs alsa_write"
write_ldflags="$write_ldflags -lasound"
fade_errlist_objs="$fade_errlist_objs alsa_mix"
fade_ldflags="$fade_ldflags -lasound"
build_fade="yes"
executables="$executables fade"
fade_errlist_objs="$fade_errlist_objs fade exec string fd version ggo"
- fade_cmdline_objs="add_cmdline(fade)"
- fade_objs="$fade_cmdline_objs $fade_errlist_objs"
+ fade_cmdline_objs="fade"
+ fade_objs="add_cmdline($fade_cmdline_objs) $fade_errlist_objs"
AC_SUBST(fade_objs, add_dot_o($fade_objs))
AC_SUBST(fade_ldflags, $fade_ldflags)
AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
fi
if test "$have_ao" = "yes"; then
audiod_errlist_objs="$audiod_errlist_objs ao_write"
- audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(ao_write)"
+ audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
audiod_ldflags="$audiod_ldflags -lao -lpthread"
play_errlist_objs="$play_errlist_objs ao_write"
- play_cmdline_objs="$play_cmdline_objs add_cmdline(ao_write)"
+ play_cmdline_objs="$play_cmdline_objs ao_write"
play_ldflags="$play_ldflags -lao -lpthread"
write_errlist_objs="$write_errlist_objs ao_write"
- write_cmdline_objs="$write_cmdline_objs add_cmdline(ao_write)"
+ write_cmdline_objs="$write_cmdline_objs ao_write"
write_ldflags="$write_ldflags $ao_libs -lao -lpthread"
writers="$writers ao"
AC_SUBST(ao_cppflags)
if test "$have_samplerate" = "yes"; then
filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
- filter_cmdline_objs="$filter_cmdline_objs add_cmdline(resample_filter)"
+ filter_cmdline_objs="$filter_cmdline_objs resample_filter"
audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
- audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(resample_filter)"
+ audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
play_errlist_objs="$play_errlist_objs resample_filter check_wav"
- play_cmdline_objs="$play_cmdline_objs add_cmdline(resample_filter)"
+ play_cmdline_objs="$play_cmdline_objs resample_filter"
filter_ldflags="$filter_ldflags $samplerate_libs -lsamplerate"
audiod_ldflags="$audiod_ldflags $samplerate_libs -lsamplerate"
play_ldflags="$play_ldflags $samplerate_libs -lsamplerate"
build_server="yes"
executables="$executables server"
- server_cmdline_objs="add_cmdline(server)"
+ server_cmdline_objs="server"
server_errlist_objs="$server_errlist_objs
server
afh_common
if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
build_client="yes"
executables="$executables client"
- client_cmdline_objs="add_cmdline(client)"
+ client_cmdline_objs="client"
client_errlist_objs="$client_errlist_objs
client
net
build_audiod="yes"
executables="$executables audiod"
audiod_cmdline_objs="$audiod_cmdline_objs
- add_cmdline(audiod compress_filter http_recv dccp_recv file_write client amp_filter udp_recv prebuffer_filter)"
+ audiod
+ compress_filter
+ http_recv
+ dccp_recv
+ file_write
+ client
+ amp_filter
+ udp_recv
+ prebuffer_filter
+ "
audiod_errlist_objs="$audiod_errlist_objs
audiod
signal
AC_SUBST(executables)
-recv_objs="$recv_cmdline_objs $recv_errlist_objs"
-filter_objs="$filter_cmdline_objs $filter_errlist_objs"
-audiod_objs="$audiod_cmdline_objs $audiod_errlist_objs"
-server_objs="$server_cmdline_objs $server_errlist_objs"
-write_objs="$write_cmdline_objs $write_errlist_objs"
-client_objs="$client_cmdline_objs $client_errlist_objs"
-audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs"
-afh_objs="$afh_cmdline_objs $afh_errlist_objs"
-play_objs="$play_cmdline_objs $play_errlist_objs"
-
+recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs"
+filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
+audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
+server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
+write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs"
+client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs"
+audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
+afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
+play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
+gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
AC_SUBST(recv_objs, add_dot_o($recv_objs))
AC_SUBST(recv_ldflags, $recv_ldflags)