[PATCH] sim: erc32: fix linking against local readline on modern (ncurses) systems

Joel Brobecker brobecker@adacore.com
Fri Dec 30 10:39:00 GMT 2011


> 2011-12-30  Mike Frysinger  <vapier@gentoo.org>
> 
> 	* configure.ac: Change AC_CHECK_LIB to AC_SEARCH_LIBS, and add
> 	ncurses/curses to the library search list.
> 	* configure: Regenerated.
[...]
> -  AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="")
> +  AC_SEARCH_LIBS(tputs, ncurses curses termcap,
> +    [TERMCAP=$ac_cv_search_tputs], [TERMCAP=""])

Is this going to hurt on non-GNU/Linux systems? In particular,
you have chosen an order that is different from the order selected
in GDB:

    # These are the libraries checked by Readline.
    AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses])

On platform providing both termcap and curses, GDB will choose
termcap while the sim will likely choose termcap, and we'll end
up trying to link with both!

Can you try using the same check as in GDB? Do you have to check
for tputs, or does checking for tgetent have the same effect?
Otherwise, can you try at least checking the libraries in the same
order as in GDB?

-- 
Joel



More information about the Gdb-patches mailing list