oss_ldflags := @oss_ldflags@
alsa_ldflags := @alsa_ldflags@
ao_ldflags := @ao_ldflags@
+readline_ldflags := @readline_ldflags@
build_date := $(shell date)
uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS")
para_recv para_afh para_play para_server: LDFLAGS += $(id3tag_ldflags)
para_audiod para_filter para_play: LDFLAGS += $(mad_ldflags)
para_write para_play para_audiod: LDFLAGS += $(ao_ldflags)
+para_client para_audioc para_play : LDFLAGS += $(readline_ldflags)
para_write \
para_play \
fi
if test "$have_readline" = "yes"; then
- readline_libs="$readline_libs -lreadline"
+ readline_ldflags="$readline_libs -lreadline"
AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
if test "$have_readline" = "no"; then # try with -lcurses
# clear cache
unset ac_cv_search_rl_free_keymap 2> /dev/null
AC_SEARCH_LIBS([rl_free_keymap], [readline], [
have_readline=yes
- readline_libs="$readline_libs -lcurses"
+ readline_ldflags="$readline_ldflags -lcurses"
], [], [-lcurses])
fi
if test "$have_readline" = "no"; then # try with -ltermcap
unset ac_cv_search_rl_free_keymap 2> /dev/null
AC_SEARCH_LIBS([rl_free_keymap], [readline], [
have_readline=yes
- readline_libs="$readline_libs -ltermcap"
+ readline_ldflags="$readline_ldflags -ltermcap"
], [], [-ltermcap])
fi
fi
if test "$have_readline" = "yes"; then
+ AC_SUBST(readline_cppflags)
+ AC_SUBST(readline_ldflags)
client_errlist_objs="$client_errlist_objs interactive"
- client_ldflags="$client_ldflags $readline_libs"
audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
- audioc_ldflags="$audioc_ldflags $readline_libs"
play_errlist_objs="$play_errlist_objs interactive"
- play_ldflags="$play_ldflags $readline_libs"
- AC_SUBST(readline_cppflags)
AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
else
AC_MSG_WARN([libreadline not found or unusable])