]> git.tue.mpg.de Git - paraslash.git/commitdiff
build: Move relevant parts to audiod section.
authorAndre Noll <maan@systemlinux.org>
Sat, 14 Sep 2013 03:35:36 +0000 (03:35 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 10:57:20 +0000 (11:57 +0100)
All of this should be in the audiod section, so move it there. Due
to the cleanups of the previous patches the @audiod_ldflags@ output
variable contained only -lm. Get rid of it by adding -lm to LDFLAGS.

Makefile.in
configure.ac

index 89eb5bf2b406f9068dd4622cb248f2aad6fa5d38..dd964bca66ceffd7733e740ceb56e9d674ca3947 100644 (file)
@@ -280,7 +280,6 @@ 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 para_play: LDFLAGS += -lm
 para_server \
 para_client \
 para_audiod \
@@ -293,7 +292,8 @@ para_filter \
 para_play \
 : LDFLAGS += \
        $(mad_ldflags) \
-       $(samplerate_ldflags)
+       $(samplerate_ldflags) \
+       -lm
 
 para_write \
 para_play \
@@ -343,7 +343,7 @@ para_gui: $(gui_objs)
 
 para_audiod: $(audiod_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
-       $(Q) $(CC) -o $@ $(audiod_objs) @audiod_ldflags@ $(LDFLAGS)
+       $(Q) $(CC) -o $@ $(audiod_objs) $(LDFLAGS)
 
 para_audioc: $(audioc_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
index 8ac2b2a5549192a255665908c9d0be8953bc67a5..abf8c071b8a53091ec3c263576fa9f6fae5a74cd 100644 (file)
@@ -193,8 +193,6 @@ if test "$check_openssl" = "yes"; then
                openssl_ldflags="$openssl_libs -lssl -lcrypto"
                AC_SUBST(openssl_ldflags)
 
-               audiod_errlist_objs="$audiod_errlist_objs crypt"
-
                check_gcrypt="no"
        else
                AC_MSG_WARN([openssl libraries not found])
@@ -230,8 +228,6 @@ if test "$check_gcrypt" = "yes"; then
                AC_SUBST(gcrypt_cppflags)
                gcrypt_ldflags="$gcrypt_libs -lgcrypt"
                AC_SUBST(gcrypt_ldflags)
-
-               audiod_errlist_objs="$audiod_errlist_objs gcrypt"
        else
                AC_MSG_WARN([gcrypt library not found])
        fi
@@ -338,10 +334,6 @@ if test ${have_core_audio} = yes; then
        f4="-framework CoreServices"
        core_audio_ldflags="$f1 $f2 $f3 $f4"
        AC_SUBST(core_audio_ldflags)
-
-       audiod_errlist_objs="$audiod_errlist_objs osx_write ipc"
-       audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
-
        AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X)
 fi
 ####################################################### ogg/vorbis/speex/opus
@@ -438,10 +430,6 @@ if test "$have_vorbis" = "yes"; then
        AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
        vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile"
        AC_SUBST(vorbis_ldflags)
-
-       audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
-
-       audiod_audio_formats="$audiod_audio_formats ogg"
        audio_format_handlers="$audio_format_handlers ogg"
 fi
 if test "$have_speex" = "yes"; then
@@ -449,11 +437,6 @@ if test "$have_speex" = "yes"; then
        AC_SUBST(speex_cppflags)
        speex_ldflags="$speex_libs -lspeex"
        AC_SUBST(speex_ldflags)
-
-
-       audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
-
-       audiod_audio_formats="$audiod_audio_formats spx"
        audio_format_handlers="$audio_format_handlers spx"
 else
        AC_MSG_WARN([no ogg/speex $msg])
@@ -463,11 +446,6 @@ if test "$have_opus" = "yes"; then
        AC_SUBST(opus_cppflags)
        opus_ldflags="$opus_libs -lopus"
        AC_SUBST(opus_ldflags)
-
-
-       audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
-
-       audiod_audio_formats="$audiod_audio_formats opus"
        audio_format_handlers="$audio_format_handlers opus"
 else
        AC_MSG_WARN([no ogg/opus $msg])
@@ -500,9 +478,6 @@ if test "$have_faad" = "yes"; then
        faad_ldflags="$faad_libs -lfaad"
        AC_SUBST(faad_ldflags)
 
-       audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
-
-       audiod_audio_formats="$audiod_audio_formats aac"
        audio_format_handlers="$audio_format_handlers aac"
 fi
 CPPFLAGS="$OLD_CPPFLAGS"
@@ -537,9 +512,6 @@ if test "$have_mad" = "yes"; then
        AC_SUBST(mad_cppflags)
        mad_ldflags="$mad_libs -lmad"
        AC_SUBST(mad_ldflags)
-       audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
-       audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
-       audiod_audio_formats="$audiod_audio_formats mp3"
 else
        AC_MSG_WARN([no mp3dec support in para_audiod/para_filter])
 fi
@@ -606,10 +578,7 @@ if test "$have_flac" = "yes"; then
        AC_SUBST(flac_cppflags)
        flac_ldflags="$flac_libs -lFLAC"
        AC_SUBST(flac_ldflags)
-
-       audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
        audio_format_handlers="$audio_format_handlers flac"
-       audiod_audio_formats="$audiod_audio_formats flac"
 else
        AC_MSG_WARN([no flac support in para_audiod/para_filter/para_afh/para_server])
 fi
@@ -625,9 +594,6 @@ have_oss="yes"
 msg="=> will not build oss writer"
 
 AC_CHECK_HEADER(sys/soundcard.h, [
-       audiod_errlist_objs="$audiod_errlist_objs oss_write"
-       audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
-
        fade_errlist_objs="$fade_errlist_objs oss_mix"
 
        mixers="${mixers}oss "
@@ -676,9 +642,6 @@ fi
 if test "$have_alsa" = "yes"; then
        alsa_ldflags="-lasound"
        AC_SUBST(alsa_ldflags)
-       audiod_errlist_objs="$audiod_errlist_objs alsa_write"
-       audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
-
        fade_errlist_objs="$fade_errlist_objs alsa_mix"
 
        mixers="${mixers}alsa "
@@ -735,10 +698,6 @@ if test "$have_ao" = "yes"; then
        AC_SUBST(ao_cppflags)
        ao_ldflags="$ao_libs -lao -lpthread"
        AC_SUBST(ao_ldflags)
-
-       audiod_errlist_objs="$audiod_errlist_objs ao_write"
-       audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
-
 fi
 
 CPPFLAGS="$OLD_CPPFLAGS"
@@ -836,9 +795,6 @@ if test "$have_samplerate" = "yes"; then
        AC_SUBST(samplerate_cppflags)
        samplerate_ldflags="$samplerate_libs -lsamplerate"
        AC_SUBST(samplerate_ldflags)
-
-       audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
-       audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
 else
        AC_MSG_WARN([no resample support in para_audiod/para_filter])
 fi
@@ -965,6 +921,7 @@ fi
 if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
        build_audiod="yes"
        executables="$executables audiod"
+       audiod_audio_formats="wma"
        audiod_cmdline_objs="$audiod_cmdline_objs
                audiod
                compress_filter
@@ -1013,8 +970,67 @@ if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
                wmadec_filter
                buffer_tree
        "
-       audiod_ldflags="$audiod_ldflags -lm"
-       audiod_audio_formats="$audiod_audio_formats wma"
+       if test "$have_openssl" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs crypt"
+       fi
+       if test "$have_gcrypt" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs gcrypt"
+       fi
+       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"
+       fi
+       if test "$have_vorbis" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
+               audiod_audio_formats="$audiod_audio_formats ogg"
+       fi
+       if test "$have_speex" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
+               audiod_audio_formats="$audiod_audio_formats spx"
+       fi
+       if test "$have_opus" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common"
+               audiod_audio_formats="$audiod_audio_formats opus"
+       fi
+       if test "$have_faad" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
+               audiod_audio_formats="$audiod_audio_formats aac"
+       fi
+       if test "$have_mad" = "yes"; then
+               audiod_audio_formats="$audiod_audio_formats mp3"
+               audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
+               audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
+       fi
+       if test "$have_flac" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
+               audiod_audio_formats="$audiod_audio_formats flac"
+       fi
+       if test "$have_oss" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs oss_write"
+               audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
+       fi
+       if test "$have_alsa" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs alsa_write"
+               audiod_cmdline_objs="$audiod_cmdline_objs alsa_write"
+       fi
+       if test "$have_ao" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs ao_write"
+               audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
+       fi
+       if test "$have_samplerate" = "yes"; then
+               audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
+               audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
+       fi
+       audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
+       AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
+       AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
+               errors used by para_audiod)
+
+       enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
+       AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
+               enum of audio formats supported by audiod)
+       names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
+       AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
 else
        build_audiod="no"
 fi
@@ -1496,17 +1512,11 @@ AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers",
 AC_SUBST(executables)
 
 filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs"
-audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
 
 AC_SUBST(filter_objs, add_dot_o($filter_objs))
 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
        objlist_to_errlist($filter_errlist_objs), errors used by para_filter)
 
-AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
-AC_SUBST(audiod_ldflags, $audiod_ldflags)
-AC_DEFINE_UNQUOTED(INIT_AUDIOD_ERRLISTS, objlist_to_errlist($audiod_errlist_objs),
-       errors used by para_audiod)
-
 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)
@@ -1519,12 +1529,6 @@ AC_DEFINE_UNQUOTED(DECLARE_FILTER_INITS, $inits, init functions of the supported
 array="$(for i in $filters; do printf '{.name = "'$i'", .init = '$i'_filter_init},'; done)"
 AC_DEFINE_UNQUOTED(FILTER_ARRAY, $array, array of supported filters)
 
-enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
-AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMATS_ENUM, $enum NUM_AUDIO_FORMATS,
-       enum of audio formats supported by audiod)
-names="$(for i in $audiod_audio_formats; do printf \"$i\",' ' ; done)"
-AC_DEFINE_UNQUOTED(AUDIOD_AUDIO_FORMAT_ARRAY, $names, array of audio formats supported by audiod)
-
 AC_OUTPUT
 AC_MSG_NOTICE([
 paraslash configuration: