]> git.tue.mpg.de Git - paraslash.git/commitdiff
build: Create section for para_filter.
authorAndre Noll <maan@systemlinux.org>
Sat, 14 Sep 2013 01:48:41 +0000 (01:48 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 10:57:05 +0000 (11:57 +0100)
Currently, the construction of $filters, $filter_errlist_objs and
$filter_cmdline_objs is spread out over configure.ac as each test
modifies these variables.

The code in configure.ac becomes easier to read if these variables
are set up in a separate section after all tests have been performed.

This patch also gets rid of filter_ldflags. Due to the previous
cleanups, it only contained -lm which is now added in Makefile.in,
along with all other linker flags for para_filter.

Makefile.in
configure.ac

index 6cd05d93d14eb384f13774b7d48ecd832dc88be2..8f42f14820fe45eb1acd40ae0151496b6ea1e3f5 100644 (file)
@@ -280,6 +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_server \
 para_client \
 para_audiod \
@@ -330,7 +331,7 @@ para_recv: $(recv_objs)
 
 para_filter: $(filter_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
-       $(Q) $(CC) $(filter_objs) -o $@ @filter_ldflags@ $(LDFLAGS)
+       $(Q) $(CC) $(filter_objs) -o $@ $(LDFLAGS)
 
 para_client: $(client_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
index 68fed0bbbdacc2c24f4a4c2dab7ea04bfc3ce761..9f63bc1043c66e2b1046d2c606bf95736f475e51 100644 (file)
@@ -124,45 +124,6 @@ recv_errlist_objs="
 
 recv_ldflags=""
 
-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="audioc"
 audioc_errlist_objs="
        audioc
@@ -614,12 +575,10 @@ if test "$have_vorbis" = "yes" || \
 fi
 if test "$have_vorbis" = "yes"; then
        AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
-       filters="$filters oggdec"
        vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile"
        AC_SUBST(vorbis_ldflags)
 
        server_errlist_objs="$server_errlist_objs ogg_afh"
-       filter_errlist_objs="$filter_errlist_objs oggdec_filter"
        audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
        play_errlist_objs="$play_errlist_objs oggdec_filter ogg_afh"
        afh_errlist_objs="$afh_errlist_objs ogg_afh"
@@ -634,10 +593,8 @@ if test "$have_speex" = "yes"; then
        speex_ldflags="$speex_libs -lspeex"
        AC_SUBST(speex_ldflags)
 
-       filters="$filters spxdec"
 
        server_errlist_objs="$server_errlist_objs spx_afh spx_common"
-       filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
        audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
        play_errlist_objs="$play_errlist_objs spxdec_filter spx_afh spx_common"
        afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
@@ -654,10 +611,8 @@ if test "$have_opus" = "yes"; then
        opus_ldflags="$opus_libs -lopus"
        AC_SUBST(opus_ldflags)
 
-       filters="$filters opusdec"
 
        server_errlist_objs="$server_errlist_objs opus_afh opus_common"
-       filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
        audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
        afh_errlist_objs="$afh_errlist_objs opus_afh opus_common"
        play_errlist_objs="$play_errlist_objs opusdec_filter opus_afh opus_common"
@@ -696,7 +651,6 @@ if test "$have_faad" = "yes"; then
        faad_ldflags="$faad_libs -lfaad"
        AC_SUBST(faad_ldflags)
 
-       filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
        afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
        audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
        play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
@@ -705,9 +659,6 @@ if test "$have_faad" = "yes"; then
 
        audiod_audio_formats="$audiod_audio_formats aac"
        audio_format_handlers="$audio_format_handlers aac"
-       filters="$filters aacdec"
-else
-       AC_MSG_WARN([no aac support in para_audiod/para_filter])
 fi
 CPPFLAGS="$OLD_CPPFLAGS"
 LDFLAGS="$OLD_LDFLAGS"
@@ -741,14 +692,11 @@ if test "$have_mad" = "yes"; then
        AC_SUBST(mad_cppflags)
        mad_ldflags="$mad_libs -lmad"
        AC_SUBST(mad_ldflags)
-       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"
        audiod_audio_formats="$audiod_audio_formats mp3"
-       filters="$filters mp3dec"
 else
        AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
 fi
@@ -816,13 +764,11 @@ if test "$have_flac" = "yes"; then
        flac_ldflags="$flac_libs -lFLAC"
        AC_SUBST(flac_ldflags)
 
-       filter_errlist_objs="$filter_errlist_objs flacdec_filter"
        audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
        play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
        afh_errlist_objs="$afh_errlist_objs flac_afh"
        server_errlist_objs="$server_errlist_objs flac_afh"
        recv_errlist_objs="$recv_errlist_objs flac_afh"
-       filters="$filters flacdec"
        audio_format_handlers="$audio_format_handlers flac"
        audiod_audio_formats="$audiod_audio_formats flac"
 else
@@ -1072,13 +1018,10 @@ if test "$have_samplerate" = "yes"; then
        samplerate_ldflags="$samplerate_libs -lsamplerate"
        AC_SUBST(samplerate_ldflags)
 
-       filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
-       filter_cmdline_objs="$filter_cmdline_objs resample_filter"
        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"
-       filters="$filters resample"
 else
        AC_MSG_WARN([no resample support in para_audiod/para_filter])
 fi
@@ -1276,6 +1219,77 @@ else
        build_gui="no"
        AC_MSG_WARN([no curses lib, cannot build para_gui])
 fi
+######################################################################## filter
+filters="
+       compress
+       wav
+       amp
+       fecdec
+       wmadec
+       prebuffer
+"
+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
+       net
+"
+filter_cmdline_objs="
+       filter
+       compress_filter
+       amp_filter
+       prebuffer_filter
+"
+
+if test "$have_vorbis" = "yes"; then
+       filters="$filters oggdec"
+       filter_errlist_objs="$filter_errlist_objs oggdec_filter"
+fi
+if test "$have_speex" = "yes"; then
+       filters="$filters spxdec"
+       filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
+fi
+if test "$have_opus" = "yes"; then
+       filters="$filters opusdec"
+       filter_errlist_objs="$filter_errlist_objs opusdec_filter opus_common"
+fi
+if test "$have_faad" = "yes"; then
+       filter_errlist_objs="$filter_errlist_objs aacdec_filter aac_common"
+       filters="$filters aacdec"
+fi
+if test "$have_mad" = "yes"; then
+       filter_cmdline_objs="$filter_cmdline_objs mp3dec_filter"
+       filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
+       filters="$filters mp3dec"
+fi
+if test "$have_flac" = "yes"; then
+       filter_errlist_objs="$filter_errlist_objs flacdec_filter"
+       filters="$filters flacdec"
+fi
+if test "$have_samplerate" = "yes"; then
+       filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
+       filter_cmdline_objs="$filter_cmdline_objs resample_filter"
+       filters="$filters resample"
+fi
+
 ############################################################# error2.h
 # these are always built
 all_errlist_objs="
@@ -1367,7 +1381,6 @@ AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs),
        errors used by para_recv)
 
 AC_SUBST(filter_objs, add_dot_o($filter_objs))
-AC_SUBST(filter_ldflags, $filter_ldflags)
 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
        objlist_to_errlist($filter_errlist_objs), errors used by para_filter)