From b177bf844c9c8e3ca0454ae78d5af6771d8c660e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 29 Apr 1998 04:17:25 +0000 Subject: [PATCH] * Makefile.in (GDBTKLIBS): New macro. (INSTALLED_LIBS): Include GDBTKLIBS. (CLIBS): Likewise. * configure: Rebuilt. * configure.in: Put Tcl/Tk libs into GDBTKLIBS, not LIBS. (GDBTKLIBS): AC_SUBST. --- gdb/ChangeLog | 7 ++++++ gdb/Makefile.in | 5 ++-- gdb/configure | 59 ++++++++++++++++++++++++++---------------------- gdb/configure.in | 8 +++++-- 4 files changed, 48 insertions(+), 31 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3fe0b36a886..b12a3e19bf9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ Tue Apr 28 19:41:33 1998 Tom Tromey + * Makefile.in (GDBTKLIBS): New macro. + (INSTALLED_LIBS): Include GDBTKLIBS. + (CLIBS): Likewise. + * configure: Rebuilt. + * configure.in: Put Tcl/Tk libs into GDBTKLIBS, not LIBS. + (GDBTKLIBS): AC_SUBST. + * tracepoint.c (memrange_cmp): Another typo fix; `memrbnge' -> `memrange'. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 40b290f3a18..819dd3a819b 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -138,6 +138,7 @@ LIB_RUNTIME_DIR = $(libdir) TCL = @TCL_LD_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@ TCL_CFLAGS = @TCLHDIR@ TCL_DEPS = +GDBTKLIBS = @GDBTKLIBS@ # Where is the TK library? Typically in ../tk. TK = @TK_BUILD_LIB_SPEC@ @@ -245,10 +246,10 @@ REGEX1 = gnu-regex.o # If you have the Cygnus libraries installed, # you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS=' INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \ - $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) @LIBS@ \ + $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ -lmmalloc -lintl -liberty CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \ - $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) @LIBS@ \ + $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ $(MMALLOC) $(LIBIBERTY) $(WIN32LIBS) CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \ $(OPCODES) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) @CONFIG_DEPS@ diff --git a/gdb/configure b/gdb/configure index 56775280a77..05e8e395dce 100755 --- a/gdb/configure +++ b/gdb/configure @@ -4337,6 +4337,7 @@ fi configdir="unix" +GDBTKLIBS= if test "${enable_gdbtk}" = "yes"; then @@ -4356,7 +4357,7 @@ if test "${with_tclconfig+set}" = set; then fi echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 -echo "configure:4360: checking for Tcl configuration" >&5 +echo "configure:4361: 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 @@ -4464,7 +4465,7 @@ if test "${with_tkconfig+set}" = set; then fi echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 -echo "configure:4468: checking for Tk configuration" >&5 +echo "configure:4469: 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 @@ -4560,7 +4561,7 @@ fi no_tcl=true echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 -echo "configure:4564: checking for Tcl private headers. dir=${configdir}" >&5 +echo "configure:4565: 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" @@ -4626,17 +4627,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:4630: checking for tclInt.h" >&5 +echo "configure:4631: 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:4640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4696,7 +4697,7 @@ fi # no_tk=true echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 -echo "configure:4700: checking for Tk private headers" >&5 +echo "configure:4701: 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" @@ -4762,17 +4763,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:4766: checking for tk.h" >&5 +echo "configure:4767: 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:4776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4818,7 +4819,7 @@ fi echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:4822: checking for Itcl private headers. srcdir=${srcdir}" >&5 +echo "configure:4823: 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 @@ -4841,7 +4842,7 @@ fi echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:4845: checking for Tix private headers. srcdir=${srcdir}" >&5 +echo "configure:4846: 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 @@ -4905,8 +4906,10 @@ fi fi # Yes, the ordering seems wrong here. But it isn't. # TK_LIBS is the list of libraries that need to be linked - # after Tcl/Tk. - LIBS="${LIBS} ${TCL_LIBS} ${TK_LIBS}" + # after Tcl/Tk. Note that this isn't put into LIBS. If it + # were in LIBS then any link tests after this point would + # try to include things like `$(LIBGUI)', which wouldn't work. + GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" CONFIG_OBS="${CONFIG_OBS} gdbtk.o" if test x$gdb_cv_os_cygwin32 = xyes; then @@ -4924,6 +4927,7 @@ fi + # end-sanitize-gdbtk # If we find X, set shell vars x_includes and x_libraries to the @@ -4931,7 +4935,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:4935: checking for X" >&5 +echo "configure:4939: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4993,12 +4997,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:5002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5067,14 +5071,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; then +if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5337,7 +5341,7 @@ links="${links} nm.h" fi # start-sanitize-gdbtk echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:5341: checking whether ln -s works" >&5 +echo "configure:5345: 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 @@ -5372,19 +5376,19 @@ fi echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 -echo "configure:5376: checking for Cygwin32 environment" >&5 +echo "configure:5380: checking for Cygwin32 environment" >&5 if eval "test \"`echo '$''{'am_cv_cygwin32'+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:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_cygwin32=yes else @@ -5401,19 +5405,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 CYGWIN32= test "$am_cv_cygwin32" = yes && CYGWIN32=yes echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 -echo "configure:5405: checking for Mingw32 environment" >&5 +echo "configure:5409: 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:5421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_mingw32=yes else @@ -5432,7 +5436,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:5436: checking for executable suffix" >&5 +echo "configure:5440: checking for executable suffix" >&5 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5685,6 +5689,7 @@ s%@X_LDFLAGS@%$X_LDFLAGS%g s%@X_LIBS@%$X_LIBS%g s%@TIXLIB@%$TIXLIB%g s%@TIX_DEPS@%$TIX_DEPS%g +s%@GDBTKLIBS@%$GDBTKLIBS%g s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g s%@CONFIG_OBS@%$CONFIG_OBS%g s%@CONFIG_DEPS@%$CONFIG_DEPS%g diff --git a/gdb/configure.in b/gdb/configure.in index b1e19cf3afc..73e73879b26 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -356,6 +356,7 @@ fi configdir="unix" +GDBTKLIBS= if test "${enable_gdbtk}" = "yes"; then CY_AC_PATH_TCLCONFIG @@ -417,8 +418,10 @@ if test "${enable_gdbtk}" = "yes"; then fi # Yes, the ordering seems wrong here. But it isn't. # TK_LIBS is the list of libraries that need to be linked - # after Tcl/Tk. - LIBS="${LIBS} ${TCL_LIBS} ${TK_LIBS}" + # after Tcl/Tk. Note that this isn't put into LIBS. If it + # were in LIBS then any link tests after this point would + # try to include things like `$(LIBGUI)', which wouldn't work. + GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" CONFIG_OBS="${CONFIG_OBS} gdbtk.o" if test x$gdb_cv_os_cygwin32 = xyes; then @@ -436,6 +439,7 @@ AC_SUBST(X_LDFLAGS) AC_SUBST(X_LIBS) AC_SUBST(TIXLIB) AC_SUBST(TIX_DEPS) +AC_SUBST(GDBTKLIBS) # end-sanitize-gdbtk AC_PATH_X -- 2.30.2