aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-12-31 07:06:47 +0000
committerMike Frysinger <vapier@gentoo.org>2011-12-31 07:06:47 +0000
commitb909d38dfa0fd09dcbcead07b61e5ba3fedd6f7a (patch)
tree9e5596d4838955e04968e414bdafffc7cb7117f4 /sim/erc32/configure.ac
parent*** empty log message *** (diff)
downloadbinutils-gdb-b909d38dfa0fd09dcbcead07b61e5ba3fedd6f7a.tar.gz
binutils-gdb-b909d38dfa0fd09dcbcead07b61e5ba3fedd6f7a.tar.bz2
binutils-gdb-b909d38dfa0fd09dcbcead07b61e5ba3fedd6f7a.zip
sim: erc32: fix linking against local readline on modern (ncurses) systems
The current erc32 configure script only searches for -ltermcap to provide any termcap funcs (which readlines needs). When building against a local readline (which is static), we hit link failures like so: gcc ...-I/-D flags... -o sis \ sis.o exec.o erc32.o func.o help.o float.o \ ../../bfd/libbfd.a ../../opcodes/libopcodes.a \ ../../libiberty/libiberty.a -lz -lnsl \ ../../readline/libreadline.a -lm ../../readline/libreadline.a(display.o): In function 'cr': .../readline/display.c:2486: undefined reference to 'tputs' collect2: ld returned 1 exit status make[2]: *** [sis] Error 1 Use AC_SEARCH_LIBS from gdb's configure.ac as suggested by Joel Brobecker to check for additional termcap providers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/erc32/configure.ac')
-rw-r--r--sim/erc32/configure.ac4
1 files changed, 3 insertions, 1 deletions
diff --git a/sim/erc32/configure.ac b/sim/erc32/configure.ac
index 5a43b5eb50d..bc460917784 100644
--- a/sim/erc32/configure.ac
+++ b/sim/erc32/configure.ac
@@ -17,7 +17,9 @@ lose
if test x$sim_cv_os_cygwin = xyes; then
TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
else
- AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="")
+ # Keep in sync with gdb's configure.ac list.
+ AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses],
+ [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""])
fi
AC_SUBST(TERMCAP)