From: Andre Noll Date: Sat, 14 Sep 2013 03:05:10 +0000 (+0000) Subject: build: Move relevant parts to server section. X-Git-Tag: v0.5.1~1^2~21 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=0c86265181e1cc1fa3026d5796767376d8aed15c;hp=75590418248e30acbc316e58b2398d54b2f09569 build: Move relevant parts to server section. Currently $server_errlist_objs is updated whenever a feature that affects para_server was detected. This mix of feature detection and build options is hard to maintain and error-prone, so let's move the definition of $server_errlist_objs to the already existing section for para_server. The patch also kills the unused @server_ldflags@ output variable. --- diff --git a/Makefile.in b/Makefile.in index 9af3ac47..ecfc0249 100644 --- a/Makefile.in +++ b/Makefile.in @@ -355,7 +355,7 @@ para_fade: $(fade_objs) para_server: $(server_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(server_objs) @server_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(server_objs) $(LDFLAGS) para_write: $(write_objs) @[ -z "$(Q)" ] || echo 'LD $@' diff --git a/configure.ac b/configure.ac index a4daca8f..06ce1c34 100644 --- a/configure.ac +++ b/configure.ac @@ -193,7 +193,6 @@ if test "$check_openssl" = "yes"; then openssl_ldflags="$openssl_libs -lssl -lcrypto" AC_SUBST(openssl_ldflags) - server_errlist_objs="$server_errlist_objs crypt" client_errlist_objs="$client_errlist_objs crypt" audiod_errlist_objs="$audiod_errlist_objs crypt" @@ -233,7 +232,6 @@ if test "$check_gcrypt" = "yes"; then gcrypt_ldflags="$gcrypt_libs -lgcrypt" AC_SUBST(gcrypt_ldflags) - server_errlist_objs="$server_errlist_objs gcrypt" client_errlist_objs="$client_errlist_objs gcrypt" audiod_errlist_objs="$audiod_errlist_objs gcrypt" else @@ -437,14 +435,12 @@ if test "$have_vorbis" = "yes" || \ ogg_ldflags="-Wl,-bind_at_load $ogg_ldflags" fi AC_SUBST(ogg_ldflags) - server_errlist_objs="$server_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) vorbis_ldflags="$vorbis_libs -lvorbis -lvorbisfile" AC_SUBST(vorbis_ldflags) - server_errlist_objs="$server_errlist_objs ogg_afh" audiod_errlist_objs="$audiod_errlist_objs oggdec_filter" audiod_audio_formats="$audiod_audio_formats ogg" @@ -457,7 +453,6 @@ if test "$have_speex" = "yes"; then AC_SUBST(speex_ldflags) - server_errlist_objs="$server_errlist_objs spx_afh spx_common" audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common" audiod_audio_formats="$audiod_audio_formats spx" @@ -472,7 +467,6 @@ if test "$have_opus" = "yes"; then AC_SUBST(opus_ldflags) - server_errlist_objs="$server_errlist_objs opus_afh opus_common" audiod_errlist_objs="$audiod_errlist_objs opusdec_filter opus_common" audiod_audio_formats="$audiod_audio_formats opus" @@ -509,7 +503,6 @@ if test "$have_faad" = "yes"; then AC_SUBST(faad_ldflags) audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common" - server_errlist_objs="$server_errlist_objs aac_afh aac_common" audiod_audio_formats="$audiod_audio_formats aac" audio_format_handlers="$audio_format_handlers aac" @@ -617,7 +610,6 @@ if test "$have_flac" = "yes"; then AC_SUBST(flac_ldflags) audiod_errlist_objs="$audiod_errlist_objs flacdec_filter" - server_errlist_objs="$server_errlist_objs flac_afh" audio_format_handlers="$audio_format_handlers flac" audiod_audio_formats="$audiod_audio_formats flac" else @@ -862,7 +854,7 @@ if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \ build_server="yes" executables="$executables server" server_cmdline_objs="server" - server_errlist_objs="$server_errlist_objs + server_errlist_objs=" server afh_common mp3_afh @@ -901,6 +893,36 @@ if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \ version ggo " + if test "$have_openssl" = "yes"; then + server_errlist_objs="$server_errlist_objs crypt" + fi + if test "$have_gcrypt" = "yes"; then + server_errlist_objs="$server_errlist_objs gcrypt" + fi + if test "$have_vorbis" = "yes" || \ + test "$have_speex" = "yes" || \ + test "$have_opus" = "yes"; then + server_errlist_objs="$server_errlist_objs ogg_afh_common" + fi + if test "$have_vorbis" = "yes"; then + server_errlist_objs="$server_errlist_objs ogg_afh" + fi + if test "$have_speex" = "yes"; then + server_errlist_objs="$server_errlist_objs spx_afh spx_common" + fi + if test "$have_opus" = "yes"; then + server_errlist_objs="$server_errlist_objs opus_afh opus_common" + fi + if test "$have_faad" = "yes"; then + server_errlist_objs="$server_errlist_objs aac_afh aac_common" + fi + if test "$have_flac" = "yes"; then + server_errlist_objs="$server_errlist_objs flac_afh" + fi + server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs" + AC_SUBST(server_objs, add_dot_o($server_objs)) + AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS, + objlist_to_errlist($server_errlist_objs), errors used by para_server) else build_server="no" fi @@ -1464,7 +1486,6 @@ AC_SUBST(executables) 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" client_objs="add_cmdline($client_cmdline_objs) $client_errlist_objs" AC_SUBST(filter_objs, add_dot_o($filter_objs)) @@ -1476,11 +1497,6 @@ 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(server_objs, add_dot_o($server_objs)) -AC_SUBST(server_ldflags, $server_ldflags) -AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS, - objlist_to_errlist($server_errlist_objs), errors used by para_server) - AC_SUBST(client_objs, add_dot_o($client_objs)) AC_SUBST(client_ldflags, $client_ldflags) AC_DEFINE_UNQUOTED(INIT_CLIENT_ERRLISTS,