Simon Josefsson wrote: > I installed the patch below. It builds on the same platforms, but now > finds the readline library properly on Fedora too. > ... > checking for readline... yes > checking how to link with libreadline... -lreadline -ltermcap
This is a problem because libtermcap is unsecure by design. (It has APIs where the caller must allocate a buffer and doesn't tell the callee how large the buffer is.) Therefore libncurses is to be preferred over libtermcap. If you leave the macro as is, it will lead to rpms of some packages that force users to install the termcap rpm. I installed this patch. Bruno 2005-08-12 Bruno Haible <[EMAIL PROTECTED]> * readline.m4 (gl_FUNC_READLINE): Look for ncurses first. *** readline.m4 12 Aug 2005 08:03:21 -0000 1.3 --- readline.m4 12 Aug 2005 11:39:00 -0000 *************** *** 1,4 **** ! # readline.m4 serial 2 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, --- 1,4 ---- ! # 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,35 **** 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 LIBS="$am_save_LIBS $LIBREADLINE" if test -n "$extra_lib"; then LIBS="$LIBS -l$extra_lib" --- 29,40 ---- AC_CACHE_CHECK(for readline, gl_cv_lib_readline, [ gl_cv_lib_readline=no am_save_LIBS="$LIBS" ! 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" _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib