]> git.tue.mpg.de Git - paraslash.git/commitdiff
build: Create section for para_play.
authorAndre Noll <maan@systemlinux.org>
Sat, 14 Sep 2013 02:35:14 +0000 (02:35 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 10:57:19 +0000 (11:57 +0100)
This moves all parts related to para_play to a separate section
at the bottom of configure.ac and gets rid of the output variable
@play_ldflags@ in favor of a simple LDFLAGS setting.

Makefile.in
configure.ac

index 4b522b05a24da081c6018f927a92d4cb55c095cc..ea55b143d689a11be28b9f8a22f2858f5b3425b0 100644 (file)
@@ -280,7 +280,7 @@ para_write para_play para_audiod: LDFLAGS += $(ao_ldflags) $(core_audio_ldflags)
 para_client para_audioc para_play : LDFLAGS += $(readline_ldflags)
 para_server: LDFLAGS += $(osl_ldflags)
 para_gui: LDFLAGS += $(curses_ldflags)
-para_filter: LDFLAGS += -lm
+para_filter para_play: LDFLAGS += -lm
 para_server \
 para_client \
 para_audiod \
@@ -367,7 +367,7 @@ para_afh: $(afh_objs)
 
 para_play: $(play_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
-       $(Q) $(CC) -o $@ $(play_objs) @play_ldflags@ $(LDFLAGS)
+       $(Q) $(CC) -o $@ $(play_objs) $(LDFLAGS)
 
 clean:
        @[ -z "$(Q)" ] || echo 'CLEAN'
index e7147ec5b653ec8e75f5ddc2d33954d157d32720..3d85f30c49dc906327c6a9362c5e6d15f238c067 100644 (file)
@@ -125,50 +125,6 @@ write_ldflags=""
 writers="file"
 default_writer="FILE_WRITE"
 
-play_errlist_objs="
-       play
-       fd
-       sched
-       ggo
-       buffer_tree
-       time
-       string
-       net
-       afh_recv
-       afh_common
-       wma_afh
-       wma_common
-       mp3_afh
-       recv_common
-       udp_recv
-       http_recv
-       dccp_recv
-       filter_common
-       fec
-       bitstream
-       imdct
-       wav_filter
-       compress_filter
-       amp_filter
-       prebuffer_filter
-       fecdec_filter
-       wmadec_filter
-       write_common
-       file_write
-       version
-"
-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=
 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
@@ -423,9 +379,6 @@ if test ${have_core_audio} = yes; then
        audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
        audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
 
-       play_errlist_objs="$play_errlist_objs osx_write ipc"
-       play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
-
        write_errlist_objs="$write_errlist_objs osx_write ipc"
        write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
        writers="$writers osx"
@@ -522,7 +475,6 @@ if test "$have_vorbis" = "yes" || \
        fi
        AC_SUBST(ogg_ldflags)
        server_errlist_objs="$server_errlist_objs ogg_afh_common"
-       play_errlist_objs="$play_errlist_objs ogg_afh_common"
 fi
 if test "$have_vorbis" = "yes"; then
        AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
@@ -531,7 +483,6 @@ if test "$have_vorbis" = "yes"; then
 
        server_errlist_objs="$server_errlist_objs ogg_afh"
        audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
-       play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
 
        audiod_audio_formats="$audiod_audio_formats ogg"
        audio_format_handlers="$audio_format_handlers ogg"
@@ -545,7 +496,6 @@ if test "$have_speex" = "yes"; then
 
        server_errlist_objs="$server_errlist_objs spx_afh spx_common"
        audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
-       play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
 
        audiod_audio_formats="$audiod_audio_formats spx"
        audio_format_handlers="$audio_format_handlers spx"
@@ -561,7 +511,6 @@ if test "$have_opus" = "yes"; then
 
        server_errlist_objs="$server_errlist_objs opus_afh opus_common"
        audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
-       play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
 
        audiod_audio_formats="$audiod_audio_formats opus"
        audio_format_handlers="$audio_format_handlers opus"
@@ -597,7 +546,6 @@ if test "$have_faad" = "yes"; then
        AC_SUBST(faad_ldflags)
 
        audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
-       play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
        server_errlist_objs="$server_errlist_objs aac_afh aac_common"
 
        audiod_audio_formats="$audiod_audio_formats aac"
@@ -636,9 +584,7 @@ if test "$have_mad" = "yes"; then
        mad_ldflags="$mad_libs -lmad"
        AC_SUBST(mad_ldflags)
        audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
-       play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
        audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
-       play_errlist_objs="$play_errlist_objs mp3dec_filter"
        audiod_audio_formats="$audiod_audio_formats mp3"
 else
        AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
@@ -708,7 +654,6 @@ if test "$have_flac" = "yes"; then
        AC_SUBST(flac_ldflags)
 
        audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
-       play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
        server_errlist_objs="$server_errlist_objs flac_afh"
        audio_format_handlers="$audio_format_handlers flac"
        audiod_audio_formats="$audiod_audio_formats flac"
@@ -728,9 +673,7 @@ msg="=> will not build oss writer"
 
 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 oss_write"
-       play_cmdline_objs="$play_cmdline_objs oss_write"
 
        write_errlist_objs="$write_errlist_objs oss_write"
        write_cmdline_objs="$write_cmdline_objs oss_write"
@@ -786,8 +729,6 @@ if test "$have_alsa" = "yes"; then
        AC_SUBST(alsa_ldflags)
        audiod_errlist_objs="$audiod_errlist_objs alsa_write"
        audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
-       play_errlist_objs="$play_errlist_objs alsa_write"
-       play_cmdline_objs="$play_cmdline_objs alsa_write"
 
        write_errlist_objs="$write_errlist_objs alsa_write"
        write_cmdline_objs="$write_cmdline_objs alsa_write"
@@ -853,9 +794,6 @@ if test "$have_ao" = "yes"; then
        audiod_errlist_objs="$audiod_errlist_objs ao_write"
        audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
 
-       play_errlist_objs="$play_errlist_objs ao_write"
-       play_cmdline_objs="$play_cmdline_objs ao_write"
-
        write_errlist_objs="$write_errlist_objs ao_write"
        write_cmdline_objs="$write_cmdline_objs ao_write"
        writers="$writers ao"
@@ -924,7 +862,6 @@ if test "$have_readline" = "yes"; then
        AC_SUBST(readline_ldflags)
        client_errlist_objs="$client_errlist_objs interactive"
        audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
-       play_errlist_objs="$play_errlist_objs interactive"
        AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
 else
        AC_MSG_WARN([libreadline not found or unusable])
@@ -961,8 +898,6 @@ if test "$have_samplerate" = "yes"; then
 
        audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
        audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
-       play_errlist_objs="$play_errlist_objs resample_filter check_wav"
-       play_cmdline_objs="$play_cmdline_objs resample_filter"
 else
        AC_MSG_WARN([no resample support in para_audiod/para_filter])
 fi
@@ -1324,6 +1259,102 @@ afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
 AC_SUBST(afh_objs, add_dot_o($afh_objs))
 AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
        objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
+########################################################################## play
+play_errlist_objs="
+       play
+       fd
+       sched
+       ggo
+       buffer_tree
+       time
+       string
+       net
+       afh_recv
+       afh_common
+       wma_afh
+       wma_common
+       mp3_afh
+       recv_common
+       udp_recv
+       http_recv
+       dccp_recv
+       filter_common
+       fec
+       bitstream
+       imdct
+       wav_filter
+       compress_filter
+       amp_filter
+       prebuffer_filter
+       fecdec_filter
+       wmadec_filter
+       write_common
+       file_write
+       version
+"
+play_cmdline_objs="
+       http_recv
+       dccp_recv
+       udp_recv
+       afh_recv
+       compress_filter
+       amp_filter
+       prebuffer_filter
+       file_write
+       play
+"
+if test "$have_core_audio" = "yes"; then
+       play_errlist_objs="$play_errlist_objs osx_write ipc"
+       play_cmdline_objs="$play_cmdline_objs osx_write.cmdline"
+fi
+if test "$have_vorbis" = "yes" || \
+               test "$have_speex" = "yes" || \
+               test "$have_opus" = "yes"; then
+       play_errlist_objs="$play_errlist_objs ogg_afh_common"
+fi
+if test "$have_vorbis" = "yes"; then
+       play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
+fi
+if test "$have_speex" = "yes"; then
+       play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
+fi
+if test "$have_opus" = "yes"; then
+       play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
+fi
+if test "$have_faad" = "yes"; then
+       play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
+fi
+if test "$have_mad" = "yes"; then
+       play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
+       play_errlist_objs="$play_errlist_objs mp3dec_filter"
+fi
+if test "$have_flac" = "yes"; then
+       play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
+fi
+if test "$have_oss" = "yes"; then
+       play_errlist_objs="$play_errlist_objs oss_write"
+       play_cmdline_objs="$play_cmdline_objs oss_write"
+fi
+if test "$have_alsa" = "yes"; then
+       play_errlist_objs="$play_errlist_objs alsa_write"
+       play_cmdline_objs="$play_cmdline_objs alsa_write"
+fi
+if test "$have_ao" = "yes"; then
+       play_errlist_objs="$play_errlist_objs ao_write"
+       play_cmdline_objs="$play_cmdline_objs ao_write"
+fi
+if test "$have_readline" = "yes"; then
+       play_errlist_objs="$play_errlist_objs interactive"
+fi
+if test "$have_samplerate" = "yes"; then
+       play_errlist_objs="$play_errlist_objs resample_filter check_wav"
+       play_cmdline_objs="$play_cmdline_objs resample_filter"
+fi
+
+play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
+AC_SUBST(play_objs, add_dot_o($play_objs))
+AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
+       objlist_to_errlist($play_errlist_objs), errors used by para_play)
 ############################################################# error2.h
 # these are always built
 all_errlist_objs="
@@ -1404,8 +1435,6 @@ 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"
-play_objs="add_cmdline($play_cmdline_objs) $play_errlist_objs"
-gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
 
 AC_SUBST(filter_objs, add_dot_o($filter_objs))
 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
@@ -1440,11 +1469,6 @@ AC_SUBST(gui_objs, add_dot_o($gui_objs))
 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
        objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
 
-AC_SUBST(play_objs, add_dot_o($play_objs))
-AC_SUBST(play_ldflags, $play_ldflags)
-AC_DEFINE_UNQUOTED(INIT_PLAY_ERRLISTS,
-       objlist_to_errlist($play_errlist_objs), errors used by para_play)
-
 enum="$(for i in $filters; do printf "${i}_FILTER, " | tr '[a-z]' '[A-Z]'; done)"
 AC_DEFINE_UNQUOTED(FILTER_ENUM, $enum NUM_SUPPORTED_FILTERS,
        enum of supported filters)