save_LIBS=$LIBS
LIBS="$LIBTERMCAP $LIBS"
AC_CHECK_LIB(readline, readline)
-if test "x${ac_cv_lib_readline_readline}" != "xyes"; then
+if test "x${ac_cv_lib_readline_readline}" = "xyes"; then
+ GINAC_RLVERSION
+else
GINAC_WARNING([I could not find libreadline (needed by ginsh).])
fi
GINSH_LIBS=$LIBS