X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=configure.ac;h=b12dc1815ca5c3245c8cebe80a018c23cf54930e;hp=e9d8d848366e081dd6c1133bbeb1daeebe1e325a;hb=b6c7050f63cb0fa16e9b0af4354e7cb065587d0b;hpb=fbe4b0468ed9dacd7f4c58be7559c50bf4661d87 diff --git a/configure.ac b/configure.ac index e9d8d848..b12dc181 100644 --- a/configure.ac +++ b/configure.ac @@ -101,9 +101,25 @@ recv_cmdline_objs=" " recv_errlist_objs=" - http_recv recv_common recv time string net dccp_recv fd - sched stdout ggo udp_recv buffer_tree afh_recv afh_common - wma_afh wma_common mp3_afh version + http_recv + recv_common + recv + time + string + net + dccp_recv + fd + sched + stdout + ggo + udp_recv + buffer_tree + afh_recv + afh_common + wma_afh + wma_common + mp3_afh + version " recv_ldflags="" @@ -114,11 +130,38 @@ filter_cmdline_objs=" 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_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" +filters=" + compress + wav + amp + fecdec + wmadec + prebuffer +" audioc_cmdline_objs="audioc" audioc_errlist_objs=" @@ -132,39 +175,72 @@ audioc_errlist_objs=" audioc_ldflags="" afh_cmdline_objs="afh" -afh_errlist_objs="afh string fd mp3_afh afh_common time wma_afh wma_common - version ggo" +afh_errlist_objs=" + afh + string + fd + mp3_afh + afh_common + time + wma_afh + wma_common + version + ggo +" afh_ldflags="" -write_cmdline_objs="write file_write" -write_errlist_objs="write write_common file_write time fd string sched stdin - buffer_tree ggo check_wav version" +write_cmdline_objs=" + write + file_write +" +write_errlist_objs=" + write + write_common + file_write + time + fd + string + sched + stdin + buffer_tree + ggo + check_wav + version +" write_ldflags="" -writers=" file" +writers="file" default_writer="FILE_WRITE" -gui_cmdline_objs="gui" -gui_errlist_objs=" - exec - signal - string - stat - ringbuffer +play_errlist_objs=" + play fd - gui - gui_theme - time - version + sched ggo -" -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 + 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=" @@ -400,27 +476,20 @@ fi AC_CHECK_HEADER(curses.h, [], [ have_curses="no" ]) -gui_ldflags="$curses_libs" +curses_ldflags="$curses_libs" AC_CHECK_LIB([ncursesw], [initscr], - [gui_ldflags="$curses_libs -lncursesw"], [ + [curses_ldflags="$curses_libs -lncursesw"], [ AC_CHECK_LIB([curses], [initscr], - [gui_ldflags="$curses_libs -lcurses"], + [curses_ldflags="$curses_libs -lcurses"], [have_curses="no"] ) ] ) -if test "$have_curses" = "yes"; then - AC_SUBST(curses_cppflags) - build_gui="yes" - executables="$executables gui" -else - build_gui="no" - AC_MSG_WARN([no curses lib, cannot build para_gui]) -fi +AC_SUBST(curses_cppflags) +AC_SUBST(curses_ldflags) CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS" LIBS="$OLD_LIBS" - ########################################################################### ip_mreqn AC_MSG_CHECKING(for struct ip_mreqn (UDPv4 multicast)) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @@ -549,16 +618,11 @@ if test "$have_vorbis" = "yes" || \ test "$have_speex" = "yes" || \ test "$have_opus" = "yes"; then AC_SUBST(ogg_cppflags) - ogg_libs="$ogg_libs -logg" + ogg_ldflags="$ogg_libs -logg" if test "$OSTYPE" = "Darwin"; then - ogg_libs="-Wl,-bind_at_load $ogg_libs" + ogg_ldflags="-Wl,-bind_at_load $ogg_ldflags" fi - server_ldflags="$server_ldflags $ogg_libs" - filter_ldflags="$filter_ldflags $ogg_libs" - audiod_ldflags="$audiod_ldflags $ogg_libs" - play_ldflags="$play_ldflags $ogg_libs" - afh_ldflags="$afh_ldflags $ogg_libs" - recv_ldflags="$recv_ldflags $ogg_libs" + AC_SUBST(ogg_ldflags) afh_errlist_objs="$afh_errlist_objs ogg_afh_common" recv_errlist_objs="$recv_errlist_objs ogg_afh_common" server_errlist_objs="$server_errlist_objs ogg_afh_common" @@ -567,13 +631,8 @@ 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_libs="-lvorbis -lvorbisfile" - server_ldflags="$server_ldflags $vorbis_libs" - filter_ldflags="$filter_ldflags $vorbis_libs" - audiod_ldflags="$audiod_ldflags $vorbis_libs" - play_ldflags="$play_ldflags $vorbis_libs" - afh_ldflags="$afh_ldflags $vorbis_libs" - recv_ldflags="$recv_ldflags $vorbis_libs" + 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" @@ -584,19 +643,14 @@ if test "$have_vorbis" = "yes"; then audiod_audio_formats="$audiod_audio_formats ogg" audio_format_handlers="$audio_format_handlers ogg" -else - AC_MSG_WARN([no ogg/vorbis $msg]) fi if test "$have_speex" = "yes"; then AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support) + AC_SUBST(speex_cppflags) + speex_ldflags="$speex_libs -lspeex" + AC_SUBST(speex_ldflags) + filters="$filters spxdec" - speex_libs="-lspeex" - server_ldflags="$server_ldflags $speex_libs" - filter_ldflags="$filter_ldflags $speex_libs" - audiod_ldflags="$audiod_ldflags $speex_libs" - play_ldflags="$play_ldflags $speex_libs" - afh_ldflags="$afh_ldflags $speex_libs" - recv_ldflags="$recv_ldflags $speex_libs" server_errlist_objs="$server_errlist_objs spx_afh spx_common" filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common" @@ -754,14 +808,8 @@ AC_MSG_RESULT($have_libid3tag) if test ${have_libid3tag} = yes; then AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag) - server_ldflags="$server_ldflags $id3tag_libs -lid3tag -lz" - afh_ldflags="$afh_ldflags $id3tag_libs -lid3tag -lz" - play_ldflags="$play_ldflags -lz" - recv_ldflags="$recv_ldflags $id3tag_libs -lid3tag" - play_ldflags="$play_ldflags $id3tag_libs -lid3tag" AC_SUBST(id3tag_cppflags) -else - AC_MSG_WARN([no support for id3v2 tags]) + AC_SUBST(id3tag_ldflags, "$id3tag_libs -lid3tag -lz") fi CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS" @@ -1239,9 +1287,30 @@ else AC_MSG_WARN([no mixer support]) mixer_summary="para_fade: no" fi +########################################################################### gui +if test "$have_curses" = "yes"; then + build_gui="yes" + executables="$executables gui" + gui_cmdline_objs="gui" + gui_errlist_objs=" + exec + signal + string + stat + ringbuffer + fd + gui + gui_theme + time + version + ggo + " + gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs" +else + build_gui="no" + AC_MSG_WARN([no curses lib, cannot build para_gui]) +fi ############################################################# error2.h -AC_MSG_NOTICE(creating error2.h) - # these are always built all_errlist_objs=" $recv_errlist_objs @@ -1271,10 +1340,14 @@ fi all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)" +object_executable_matrix= for i in $executables; do - echo "$i: " - eval echo \$${i}_errlist_objs -done | ./error2.pl > error2.h + eval objs=\$${i}_errlist_objs + object_executable_matrix="$object_executable_matrix $i: $objs" +done +# use echo to replace newlines by space +AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix)) + for obj in $all_errlist_objs; do SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z')," done @@ -1282,7 +1355,6 @@ AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM, [enum {$SS NUM_SS}], [list of all objects that use the paraslash error facility] ) - ################################################################## status items status_items="basename status num_played mtime bitrate frequency file_size @@ -1364,7 +1436,6 @@ 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_SUBST(gui_ldflags, $gui_ldflags) AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS, objlist_to_errlist($gui_errlist_objs), errors used by para_gui) @@ -1406,7 +1477,7 @@ unix socket credentials: $have_ucred readline (interactive CLIs): $have_readline audio formats handlers: $audio_format_handlers id3 version2 support: $have_libid3tag -filters: $filters +filters: $(echo $filters) writers: $writers $mixer_summary