summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/readline/config.m412
1 files changed, 11 insertions, 1 deletions
diff --git a/ext/readline/config.m4 b/ext/readline/config.m4
index 623eb8a852..2cb445b59a 100644
--- a/ext/readline/config.m4
+++ b/ext/readline/config.m4
@@ -18,7 +18,17 @@ AC_ARG_WITH(readline,
AC_MSG_ERROR(Please reinstall readline - I cannot find readline.h)
fi
AC_ADD_INCLUDE($READLINE_DIR/include)
- AC_ADD_LIBRARY(ncurses)
+
+ AC_CHECK_LIB(ncurses, tgetent, [
+ AC_ADD_LIBRARY(ncurses) ], [
+ AC_CHECK_LIB(termcap, tgetent, [
+ AC_ADD_LIBRARY(termcap)
+ ])
+ ])
+
+
+ AC_CHECK_LIB(tgetent, termcap)
+ AC_CHECK_LIB(tgetent, ncurses)
AC_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/lib)
AC_ADD_LIBRARY_WITH_PATH(readline, $READLINE_DIR/lib)