From: Andre Noll Date: Tue, 22 Apr 2014 00:30:02 +0000 (+0200) Subject: Merge branch 't/rl_free_keymap' X-Git-Tag: v0.5.3~25 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=a731a7c6e78fb137268b42062d9fb08b4e49a2c8;hp=-c Merge branch 't/rl_free_keymap' Cooking since 2014-03-10. * t/rl_free_keymap: build: Check whether rl_free_keymap is declared. --- a731a7c6e78fb137268b42062d9fb08b4e49a2c8 diff --combined configure.ac index 07ecffdd,61ff547e..30bce8ee --- a/configure.ac +++ b/configure.ac @@@ -580,11 -580,7 +580,11 @@@ if test -n "$with_flac_libs"; the LDFLAGS="$LDFLAGS $flac_libs" fi AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no) -AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm) +AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], [ + # nope, try again with -logg + AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], + have_flac=no, -lm -logg) + ], -lm) if test "$have_flac" = "yes"; then AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter) AC_SUBST(flac_cppflags) @@@ -732,17 -728,15 +732,17 @@@ AC_CHECK_HEADERS([readline/readline.h] ]) if test "$have_readline" = "yes"; then - readline_ldflags="$readline_libs -lreadline" - AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"]) + readline_ldflags="$readline_libs" + AC_SEARCH_LIBS([rl_free_keymap], [readline], [ + readline_ldflags="$readline_ldflags -lreadline" + ], [have_readline="no"]) if test "$have_readline" = "no"; then # try with -lcurses # clear cache AC_MSG_NOTICE([trying again with -lcurses]) unset ac_cv_search_rl_free_keymap 2> /dev/null AC_SEARCH_LIBS([rl_free_keymap], [readline], [ have_readline=yes - readline_ldflags="$readline_ldflags -lcurses" + readline_ldflags="$readline_ldflags -lreadline -lcurses" ], [], [-lcurses]) fi if test "$have_readline" = "no"; then # try with -ltermcap @@@ -751,13 -745,21 +751,21 @@@ unset ac_cv_search_rl_free_keymap 2> /dev/null AC_SEARCH_LIBS([rl_free_keymap], [readline], [ have_readline=yes - readline_ldflags="$readline_ldflags -ltermcap" + readline_ldflags="$readline_ldflags -lreadline -ltermcap" ], [], [-ltermcap]) fi fi if test "$have_readline" = "yes"; then - : + AC_CHECK_DECL( + [rl_free_keymap], + [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)], + [], + [ + #include + #include + ] + ) AC_SUBST(readline_cppflags) AC_SUBST(readline_ldflags) AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support) @@@ -1178,8 -1180,6 +1186,8 @@@ if test "$have_samplerate" = "yes"; the filter_cmdline_objs="$filter_cmdline_objs resample_filter" filters="$filters resample" fi +filters="$(echo $filters)" +AC_SUBST(filters) filter_objs="add_cmdline($filter_cmdline_objs) $filter_errlist_objs" AC_SUBST(filter_objs, add_dot_o($filter_objs)) @@@ -1244,7 -1244,6 +1252,7 @@@ if test "$have_flac" = "yes"; the recv_errlist_objs="$recv_errlist_objs flac_afh" fi recv_objs="add_cmdline($recv_cmdline_objs) $recv_errlist_objs" +AC_SUBST(receivers, "http dccp udp afh") AC_SUBST(recv_objs, add_dot_o($recv_objs)) AC_DEFINE_UNQUOTED(INIT_RECV_ERRLISTS, objlist_to_errlist($recv_errlist_objs), errors used by para_recv) @@@ -1278,7 -1277,6 +1286,7 @@@ if test "$have_speex" = "yes"; the fi if test "$have_opus" = "yes"; then afh_errlist_objs="$afh_errlist_objs opus_afh opus_common" + audio_format_handlers="$audio_format_handlers opus" fi if test "$have_faad" = "yes"; then afh_errlist_objs="$afh_errlist_objs aac_common aac_afh" @@@ -1438,7 -1436,6 +1446,7 @@@ if test "$have_alsa" = "yes"; the writers="$writers alsa" default_writer="ALSA_WRITE" fi +AC_SUBST(writers) write_objs="add_cmdline($write_cmdline_objs) $write_errlist_objs" AC_SUBST(write_objs, add_dot_o($write_objs)) AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS, @@@ -1557,7 -1554,7 +1565,7 @@@ unix socket credentials: $have_ucre readline (interactive CLIs): $have_readline audio formats handlers: $audio_format_handlers id3 version2 support: $have_libid3tag -filters: $(echo $filters) +filters: $filters writers: $writers para_fade: $build_fade diff --combined interactive.c index ee953bf1,5e4a89b3..9f2b7195 --- a/interactive.c +++ b/interactive.c @@@ -1,5 -1,5 +1,5 @@@ /* - * Copyright (C) 2011-2013 Andre Noll + * Copyright (C) 2011-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@@ -227,6 -227,7 +227,7 @@@ static void wipe_bottom_line(void fprintf(i9ep->stderr_stream, "\r"); } + #ifndef RL_FREE_KEYMAP_DECLARED /** * Free all storage associated with a keymap. * @@@ -237,6 -238,7 +238,7 @@@ * \param keymap The keymap to deallocate. */ void rl_free_keymap(Keymap keymap); + #endif /** * Reset the terminal and save the in-memory command line history.