From: Bruno Haible Date: Mon, 9 Jan 2006 21:42:56 +0000 (+0000) Subject: 2005-08-12: Look for ncurses first. X-Git-Tag: cvs-readonly~2661 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=9ac9f20ff501e03416099faadaaadc96c9c27db0;p=gnulib.git 2005-08-12: Look for ncurses first. --- diff --git a/m4/readline.m4 b/m4/readline.m4 index 3082d1bf6..8c2d9d243 100644 --- a/m4/readline.m4 +++ b/m4/readline.m4 @@ -1,4 +1,4 @@ -# readline.m4 serial 2 +# readline.m4 serial 3 dnl Copyright (C) 2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -29,7 +29,12 @@ AC_DEFUN([gl_FUNC_READLINE], AC_CACHE_CHECK(for readline, gl_cv_lib_readline, [ gl_cv_lib_readline=no am_save_LIBS="$LIBS" - for extra_lib in "" termcap curses ncurses; do + dnl On some systems, -lreadline doesn't link without an additional + dnl -lncurses or -ltermcap. + dnl Try -lncurses before -ltermcap, because libtermcap is unsecure + dnl by design and obsolete since 1994. Try -lcurses last, because + dnl libcurses is unusable on some old Unices. + for extra_lib in "" ncurses termcap curses; do LIBS="$am_save_LIBS $LIBREADLINE" if test -n "$extra_lib"; then LIBS="$LIBS -l$extra_lib"