]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - configure.ac
build: Move relevant parts to server section.
[paraslash.git] / configure.ac
index dc0dd0e08d2fcc02e0a5bbb34f0cecb4f8044e02..06ce1c34a8236f04f2465d18297ea024794a64b1 100644 (file)
@@ -92,17 +92,6 @@ AC_CHECK_FUNCS([atexit dup2 memchr memmove memset \
 executables="recv filter audioc write afh play"
 audio_format_handlers="mp3 wma"
 
-audioc_cmdline_objs="audioc"
-audioc_errlist_objs="
-       audioc
-       string
-       net
-       fd
-       version
-       ggo
-"
-audioc_ldflags=""
-
 ################################################################## clock_gettime
 clock_gettime_lib=
 AC_CHECK_LIB([c], [clock_gettime], [clock_gettime_lib=c], [
@@ -204,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"
 
@@ -244,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
@@ -448,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"
@@ -468,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"
@@ -483,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"
@@ -520,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"
@@ -628,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
@@ -824,7 +805,6 @@ if test "$have_readline" = "yes"; then
        AC_SUBST(readline_cppflags)
        AC_SUBST(readline_ldflags)
        client_errlist_objs="$client_errlist_objs interactive"
-       audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
        AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
 else
        AC_MSG_WARN([libreadline not found or unusable])
@@ -874,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
@@ -913,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
@@ -1378,6 +1388,28 @@ inits="$(for i in $writers; do printf 'extern void '$i'_write_init(struct writer
 AC_DEFINE_UNQUOTED(DECLARE_WRITER_INITS, $inits, init functions of the supported writers)
 array="$(for i in $writers; do printf '{.init = '$i'_write_init},'; done)"
 AC_DEFINE_UNQUOTED(WRITER_ARRAY, $array, array of supported writers)
+######################################################################## audioc
+audioc_cmdline_objs="audioc"
+audioc_errlist_objs="
+       audioc
+       string
+       net
+       fd
+       version
+       ggo
+"
+if test "$have_readline" = "yes"; then
+       audioc_errlist_objs="$audioc_errlist_objs
+               buffer_tree
+               interactive
+               sched
+               time
+       "
+fi
+audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
+AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
+AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
+       objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
 ############################################################# error2.h
 # these are always built
 all_errlist_objs="
@@ -1454,9 +1486,7 @@ 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"
-audioc_objs="add_cmdline($audioc_cmdline_objs) $audioc_errlist_objs"
 
 AC_SUBST(filter_objs, add_dot_o($filter_objs))
 AC_DEFINE_UNQUOTED(INIT_FILTER_ERRLISTS,
@@ -1467,21 +1497,11 @@ 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,
        objlist_to_errlist($client_errlist_objs), errors used by para_client)
 
-AC_SUBST(audioc_objs, add_dot_o($audioc_objs))
-AC_SUBST(audioc_ldflags, $audioc_ldflags)
-AC_DEFINE_UNQUOTED(INIT_AUDIOC_ERRLISTS,
-       objlist_to_errlist($audioc_errlist_objs), errors used by para_audioc)
-
 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)