])
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
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