This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] sim: erc32: fix linking against local readline on modern (ncurses) systems
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 30 Dec 2011 14:18:42 +0400
- Subject: Re: [PATCH] sim: erc32: fix linking against local readline on modern (ncurses) systems
- References: <1325238201-7982-1-git-send-email-vapier@gentoo.org>
> 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