From: Jason Molenda Date: Thu, 31 Dec 1998 01:30:52 +0000 (+0000) Subject: 1998-12-30 Jason Molenda (jsm@bugshack.cygnus.com) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=adcb1e06ef4856c844bb54f5931e0709edcaa005;p=binutils-gdb.git 1998-12-30 Jason Molenda (jsm@bugshack.cygnus.com) * utils.c: instead of "readline/readline.h". * configure.in (TERM_LIB): Search for the appropriate term library on the host system. * configure: Regenerated. * Makefile.in (TERMCAP): Set based on autoconf check. * config/*/*.mh: Don't override TERMCAP setting. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e6347c990d6..a80c2b4af0e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +1998-12-30 Jason Molenda (jsm@bugshack.cygnus.com) + + * utils.c: instead of "readline/readline.h". + + * configure.in (TERM_LIB): Search for the appropriate term library + on the host system. + * configure: Regenerated. + * Makefile.in (TERMCAP): Set based on autoconf check. + * config/*/*.mh: Don't override TERMCAP setting. + Wed Dec 30 17:23:14 1998 Mark Alexander * value.c (value_virtual_fn_field): Handle the situation where diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 6429fb06fc4..b345ca1a60a 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -59,7 +59,7 @@ WINDRES = @WINDRES@ # Flags that describe where you can find the termcap library. # This can be overridden in the host Makefile fragment file. -TERMCAP = -ltermcap +TERMCAP = @TERM_LIB@ # If you are compiling with GCC, make sure that either 1) You have the # fixed include files where GCC can reach them, or 2) You use the diff --git a/gdb/config/i386/i386aix.mh b/gdb/config/i386/i386aix.mh index 751f8136a32..cea05f0a3b2 100644 --- a/gdb/config/i386/i386aix.mh +++ b/gdb/config/i386/i386aix.mh @@ -6,7 +6,5 @@ XDEPFILES= NAT_FILE= nm-i386aix.h NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o i386aix-nat.o -TERMCAP=-lcurses - # Use gcc. Only coff output can be debugged CC=gcc diff --git a/gdb/config/i386/i386dgux.mh b/gdb/config/i386/i386dgux.mh index bc2cee2af73..e05ebcd8393 100644 --- a/gdb/config/i386/i386dgux.mh +++ b/gdb/config/i386/i386dgux.mh @@ -7,8 +7,3 @@ XM_CLIBS= -lsocket -lnsl NAT_FILE= nm-i386v4.h NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o i386v4-nat.o - -# SVR4 comes standard with terminfo, and in some implementations, the -# old termcap descriptions are incomplete. So ensure that we use the -# new terminfo interface and latest terminal descriptions. -TERMCAP=-lcurses diff --git a/gdb/config/i386/windows.mh b/gdb/config/i386/windows.mh index c72eae35f69..3933a6e0053 100644 --- a/gdb/config/i386/windows.mh +++ b/gdb/config/i386/windows.mh @@ -13,6 +13,5 @@ $(XDEPFILES): $(MAKE) $(FLAGS_TO_PASS) all ) XM_FILE=xm-windows.h -TERMCAP= MMALLOC= SER_HARDWIRE = diff --git a/gdb/config/m68k/dpx2.mh b/gdb/config/m68k/dpx2.mh index e03bdce23a3..4f22ed538ac 100644 --- a/gdb/config/m68k/dpx2.mh +++ b/gdb/config/m68k/dpx2.mh @@ -5,5 +5,3 @@ XDEPFILES= NAT_FILE= nm-dpx2.h NATDEPFILES= infptrace.o corelow.o core-aout.o inftarg.o dpx2-nat.o fork-child.o - -TERMCAP=-lcurses diff --git a/gdb/config/m68k/m68kv4.mh b/gdb/config/m68k/m68kv4.mh index 4e62bf72b5a..f2db3d97971 100644 --- a/gdb/config/m68k/m68kv4.mh +++ b/gdb/config/m68k/m68kv4.mh @@ -5,8 +5,3 @@ XDEPFILES= NAT_FILE= nm-sysv4.h NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o - -# SVR4 comes standard with terminfo, and in some implementations, the -# old termcap descriptions are incomplete. So ensure that we use the -# new terminfo interface and latest terminal descriptions. -TERMCAP=-ltermlib diff --git a/gdb/config/pa/hppahpux.mh b/gdb/config/pa/hppahpux.mh index 35e9cd77c31..1a4d102176a 100644 --- a/gdb/config/pa/hppahpux.mh +++ b/gdb/config/pa/hppahpux.mh @@ -1,10 +1,5 @@ # Host: Hewlett-Packard PA-RISC machine, running HPUX -# Some versions of HPUX (10.10 for example) have a libcurses.a that contains a broken -# select(), which if linked into gdb ahead of libc, will cause gdb to core dump on -# startup. As a workaround, always link libc first when using libcurses. -TERMCAP = -lc -lcurses - XM_FILE= xm-hppah.h XDEPFILES= ser-tcp.o diff --git a/gdb/config/powerpc/cygwin.mh b/gdb/config/powerpc/cygwin.mh index 9cc5ddfb961..0c257092e70 100644 --- a/gdb/config/powerpc/cygwin.mh +++ b/gdb/config/powerpc/cygwin.mh @@ -1,6 +1,5 @@ MH_CFLAGS= XM_FILE=xm-cygwin.h XDEP_FILES=ser-tcp.o -TERMCAP= NATDEPFILES=win32-nat.o XM_CLIBS=-lkernel32 diff --git a/gdb/config/powerpc/solaris.mh b/gdb/config/powerpc/solaris.mh index d733138f12f..7d3444e2b1b 100644 --- a/gdb/config/powerpc/solaris.mh +++ b/gdb/config/powerpc/solaris.mh @@ -7,11 +7,6 @@ XM_CLIBS= -lsocket -lnsl NAT_FILE= nm-solaris.h NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o -# SVR4 comes standard with terminfo, and in some implementations, the -# old termcap descriptions are incomplete. So ensure that we use the -# new terminfo interface and latest terminal descriptions. -TERMCAP=-ltermlib - # If you are compiling with Sun's compiler, add the -xs option to CC # (e.g. `make CC="cc -xs"'). # Sun's compilers require the -xs option to produce debug information diff --git a/gdb/config/sparc/sun4sol2.mh b/gdb/config/sparc/sun4sol2.mh index b24ce9ffbd1..468b362158b 100644 --- a/gdb/config/sparc/sun4sol2.mh +++ b/gdb/config/sparc/sun4sol2.mh @@ -7,11 +7,6 @@ XM_CLIBS= -lsocket -lnsl NAT_FILE= nm-sun4sol2.h NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o -# SVR4 comes standard with terminfo, and in some implementations, the -# old termcap descriptions are incomplete. So ensure that we use the -# new terminfo interface and latest terminal descriptions. -TERMCAP=-ltermlib - # If you are compiling with Sun's compiler, add the -xs option to CC # (e.g. `make CC="cc -xs"'). # Sun's compilers require the -xs option to produce debug information diff --git a/gdb/configure b/gdb/configure index a2847924ff0..8d310f80263 100755 --- a/gdb/configure +++ b/gdb/configure @@ -3970,14 +3970,223 @@ fi fi +TERM_LIB= +echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 +echo "configure:3976: checking for tgetent in -lncurses" >&5 +ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lncurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-lncurses +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 +echo "configure:4014: checking for tgetent in -ltermlib" >&5 +ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermlib $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-ltermlib +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 +echo "configure:4052: checking for tgetent in -ltermcap" >&5 +ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-ltermcap +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 +echo "configure:4090: checking for tgetent in -lcurses" >&5 +ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-lcurses +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 +echo "configure:4128: checking for tgetent in -lterminfo" >&5 +ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lterminfo $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-lterminfo +else + echo "$ac_t""no" 1>&6 +fi + +fi + +fi + +fi + +fi + + +if test "x$TERM_LIB" = x +then + { echo "configure: error: Could not find a term library" 1>&2; exit 1; } +fi + + + echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 -echo "configure:3976: checking for long long support in compiler" >&5 +echo "configure:4185: checking for long long support in compiler" >&5 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_c_long_long=yes else @@ -4009,7 +4218,7 @@ fi echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 -echo "configure:4013: checking for long long support in printf" >&5 +echo "configure:4222: checking for long long support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4017,7 +4226,7 @@ else gdb_cv_printf_has_long_long=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_long=yes else @@ -4055,19 +4264,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 -echo "configure:4059: checking for long double support in compiler" >&5 +echo "configure:4268: checking for long double support in compiler" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_double=yes else @@ -4089,7 +4298,7 @@ fi echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 -echo "configure:4093: checking for long double support in printf" >&5 +echo "configure:4302: checking for long double support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4097,7 +4306,7 @@ else gdb_cv_printf_has_long_double=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_double=yes else @@ -4131,7 +4340,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 -echo "configure:4135: checking for long double support in scanf" >&5 +echo "configure:4344: checking for long double support in scanf" >&5 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4139,7 +4348,7 @@ else gdb_cv_scanf_has_long_double=no else cat > conftest.$ac_ext < 3.14159 && f < 3.14160); } EOF -if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_scanf_has_long_double=yes else @@ -4175,17 +4384,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4179: checking for $ac_hdr" >&5 +echo "configure:4388: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4214,12 +4423,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4218: checking for $ac_func" >&5 +echo "configure:4427: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4267,7 +4476,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4271: checking for working mmap" >&5 +echo "configure:4480: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4275,7 +4484,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -4444,7 +4653,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then case ${host_os} in hpux*) echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 -echo "configure:4448: checking for HPUX/OSF thread support" >&5 +echo "configure:4657: checking for HPUX/OSF thread support" >&5 if test -f /usr/include/dce/cma_config.h ; then if test "$GCC" = "yes" ; then echo "$ac_t""yes" 1>&6 @@ -4463,7 +4672,7 @@ EOF ;; solaris*) echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 -echo "configure:4467: checking for Solaris thread debugging library" >&5 +echo "configure:4676: checking for Solaris thread debugging library" >&5 if test -f /usr/lib/libthread_db.so.1 ; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -4473,7 +4682,7 @@ EOF CONFIG_OBS="${CONFIG_OBS} sol-thread.o" CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4477: checking for dlopen in -ldl" >&5 +echo "configure:4686: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4481,7 +4690,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4524,17 +4733,17 @@ fi # all symbols visible in the dynamic symbol table. hold_ldflags=$LDFLAGS echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 -echo "configure:4528: checking for the ld -export-dynamic flag" >&5 +echo "configure:4737: checking for the ld -export-dynamic flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -4553,13 +4762,13 @@ rm -f conftest* # Sun randomly tweaked the prototypes in # at one point. echo $ac_n "checking if is old""... $ac_c" 1>&6 -echo "configure:4557: checking if is old" >&5 +echo "configure:4766: checking if is old" >&5 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4570,7 +4779,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_proc_service_is_old=no else @@ -4902,12 +5111,12 @@ fi # In the Cygwin environment, we need some additional flags. echo $ac_n "checking for cygwin""... $ac_c" 1>&6 -echo "configure:4906: checking for cygwin" >&5 +echo "configure:5115: checking for cygwin" >&5 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:4970: checking for Tcl configuration" >&5 +echo "configure:5179: checking for Tcl configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5074,7 +5283,7 @@ if test "${with_tkconfig+set}" = set; then fi echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 -echo "configure:5078: checking for Tk configuration" >&5 +echo "configure:5287: checking for Tk configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5170,7 +5379,7 @@ fi no_tcl=true echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 -echo "configure:5174: checking for Tcl private headers. dir=${configdir}" >&5 +echo "configure:5383: checking for Tcl private headers. dir=${configdir}" >&5 # Check whether --with-tclinclude or --without-tclinclude was given. if test "${with_tclinclude+set}" = set; then withval="$with_tclinclude" @@ -5236,17 +5445,17 @@ fi if test x"${ac_cv_c_tclh}" = x ; then ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 -echo "configure:5240: checking for tclInt.h" >&5 +echo "configure:5449: checking for tclInt.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5306,7 +5515,7 @@ fi # no_tk=true echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 -echo "configure:5310: checking for Tk private headers" >&5 +echo "configure:5519: checking for Tk private headers" >&5 # Check whether --with-tkinclude or --without-tkinclude was given. if test "${with_tkinclude+set}" = set; then withval="$with_tkinclude" @@ -5372,17 +5581,17 @@ fi if test x"${ac_cv_c_tkh}" = x ; then ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tk.h""... $ac_c" 1>&6 -echo "configure:5376: checking for tk.h" >&5 +echo "configure:5585: checking for tk.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5428,7 +5637,7 @@ fi echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:5432: checking for Itcl private headers. srcdir=${srcdir}" >&5 +echo "configure:5641: checking for Itcl private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_itclh}" = x ; then for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do if test -f $i/src/itcl.h ; then @@ -5451,7 +5660,7 @@ fi echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:5455: checking for Tix private headers. srcdir=${srcdir}" >&5 +echo "configure:5664: checking for Tix private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_tixh}" = x ; then for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do if test -f $i/generic/tix.h ; then @@ -5545,7 +5754,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:5549: checking for X" >&5 +echo "configure:5758: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5607,12 +5816,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5681,14 +5890,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5956,7 +6165,7 @@ links="${links} nm.h" fi # start-sanitize-gdbtk echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:5955: checking whether ln -s works" >&5 +echo "configure:6169: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5991,19 +6200,19 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:5990: checking for Cygwin environment" >&5 +echo "configure:6204: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'am_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_cygwin=yes else @@ -6020,19 +6229,19 @@ echo "$ac_t""$am_cv_cygwin" 1>&6 CYGWIN= test "$am_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 -echo "configure:6019: checking for Mingw32 environment" >&5 +echo "configure:6233: checking for Mingw32 environment" >&5 if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_mingw32=yes else @@ -6051,7 +6260,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:6050: checking for executable suffix" >&5 +echo "configure:6264: checking for executable suffix" >&5 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6260,6 +6469,7 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@AR@%$AR%g s%@YACC@%$YACC%g +s%@TERM_LIB@%$TERM_LIB%g s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g s%@WARN_CFLAGS@%$WARN_CFLAGS%g s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g diff --git a/gdb/configure.in b/gdb/configure.in index 3f00da94626..9f2a281305b 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -120,6 +120,21 @@ dnl under Solaris 2.6 because it is some funky empty library. dnl So only link in libw if we have to. AC_CHECK_LIB(c, wctype,: ,AC_CHECK_LIB(w, wctype)) +dnl Figure out which term library to use. +TERM_LIB= +AC_CHECK_LIB(ncurses, tgetent, TERM_LIB=-lncurses, + AC_CHECK_LIB(termlib, tgetent, TERM_LIB=-ltermlib, + AC_CHECK_LIB(termcap, tgetent, TERM_LIB=-ltermcap, + AC_CHECK_LIB(curses, tgetent, TERM_LIB=-lcurses, + AC_CHECK_LIB(terminfo, tgetent, TERM_LIB=-lterminfo))))) + +if test "x$TERM_LIB" = x +then + AC_MSG_ERROR(Could not find a term library, e.g. termcap or termlib!) +fi + +AC_SUBST(TERM_LIB) + dnl See if compiler supports "long long" type. AC_MSG_CHECKING(for long long support in compiler) diff --git a/gdb/utils.c b/gdb/utils.c index c5dd9a057fc..529c9027500 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "language.h" #include "annotate.h" -#include "readline/readline.h" +#include /* readline defines this. */ #undef savestring