diff options
| author | tjg <tjg> | 1999-05-06 12:51:02 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:15 +0100 |
| commit | e31674ab5e74c382894c02450481f303cb3fe39a (patch) | |
| tree | 223b8a09d37bac0ea11433aea0cc8b545538f3db | |
| parent | 87c0174c7a427402c02f55e034a048a07f34820b (diff) | |
1993-05-06
Portability: tgetent() might be in -lncurses instead of -ltermcap.
| -rw-r--r-- | acinclude.m4 | 11 | ||||
| -rw-r--r-- | configure.ac | 15 |
2 files changed, 21 insertions, 5 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 3516928..814bae2 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -204,3 +204,14 @@ main() { yes) AC_DEFINE(HAVE_FIFO) ;; esac ]) + +dnl Where is tgetent()? +AC_DEFUN(RC_LIB_TGETENT, [ + AC_CHECK_LIB(termcap, tgetent, + rc_lib_tgetent=-ltermcap, + AC_CHECK_LIB(ncurses, tgetent, + rc_lib_tgetent=-lncurses, + AC_MSG_ERROR(tgetent not found) + ) + ) +]) diff --git a/configure.ac b/configure.ac index cabb415..90b498d 100644 --- a/configure.ac +++ b/configure.ac @@ -174,19 +174,24 @@ AC_ARG_WITH(editline, [ --with-editline Simmule Turner's line editing], AC_DEFINE(EDITLINE) LIBS="$LIBS -ledit", AC_MSG_ERROR(editline library not found))) +if test "${with_vrl+set}" = set -o "${with_readline+set}" = set; then + RC_LIB_TGETENT + echo "found tgetent in $rc_lib_tgetent" +fi + AC_ARG_WITH(vrl, [ --with-vrl Gert-Jan Vons's line editing], AC_CHECK_LIB(vrl, readline, - AC_DEFINE(EDITLINE) LIBS="$LIBS -lvrl -ltermcap", - AC_MSG_ERROR(vrl library not found), -ltermcap)) + AC_DEFINE(EDITLINE) LIBS="$LIBS -lvrl $rc_lib_tgetent", + AC_MSG_ERROR(vrl library not found), $rc_lib_tgetent)) dnl There are (at least) two incompatible versions of readline, and we dnl need to know which one we are using. We don't support readline 2.0. AC_ARG_WITH(readline, [ --with-readline Bloated GNU line editing], [ AC_CHECK_LIB(readline, readline, [ AC_DEFINE(READLINE) - LIBS="$LIBS -lreadline -ltermcap" - AC_CHECK_LIB(readline, _rl_clean_up_for_exit, , AC_DEFINE(READLINE_OLD), -ltermcap) - ], AC_MSG_ERROR(readline library not found), -ltermcap) + LIBS="$LIBS -lreadline $rc_lib_tgetent" + AC_CHECK_LIB(readline, _rl_clean_up_for_exit, , AC_DEFINE(READLINE_OLD), $rc_lib_tgetent) + ], AC_MSG_ERROR(readline library not found), $rc_lib_tgetent) ]) AM_CONDITIONAL(AMC_READLINE, test "${with_readline+set}" = set) |