[RFA] Add dependency of gdb on tcl/tk libraries

John R. Moore jmoore@redhat.com
Thu Apr 12 15:04:00 GMT 2001


After noticing that a change in the tcl doesn't force gdb
to re-link, I'm proposing the following patch:

This was tested on linux-2.2.16-22 using the gcc-2.97.

2001-04-12  John R. Moore  <jmoore@redhat.com>

	* configure.in: Added dependency of gdb on tcl/tk libraries.
	* Makefile.in: Likewise.
	* configure: Regenerated with the above using autoconf.

Index: gdb/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.78
diff -p -u -r1.78 Makefile.in
--- gdb/Makefile.in	2001/04/11 22:39:07	1.78
+++ gdb/Makefile.in	2001/04/12 21:29:59
@@ -229,7 +229,7 @@ LIB_INSTALL_DIR = $(libdir)
 LIB_RUNTIME_DIR = $(libdir)
 TCL = @TCL_LD_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@
 TCL_CFLAGS = @TCLHDIR@
-TCL_DEPS =
+TCL_DEPS = @TCL_DEPS@
 GDBTKLIBS = @GDBTKLIBS@
 # Extra flags that the GDBTK files need:
 GDBTK_CFLAGS = @GDBTK_CFLAGS@
@@ -237,7 +237,7 @@ GDBTK_CFLAGS = @GDBTK_CFLAGS@
 # Where is the TK library?  Typically in ../tk.
 TK = @TK_BUILD_LIB_SPEC@
 TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@
-TK_DEPS =
+TK_DEPS = @TK_DEPS@

 # Where is Itcl?  Typically in ../itcl/itcl.
 ITCL_CFLAGS = @ITCLHDIR@
Index: gdb/configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.63
diff -p -u -r1.63 configure.in
--- gdb/configure.in	2001/03/31 18:09:02	1.63
+++ gdb/configure.in	2001/04/12 21:30:11
@@ -913,6 +913,19 @@ if test "${enable_gdbtk}" = "yes"; then
 	CY_AC_LOAD_TCLCONFIG
 	CY_AC_PATH_TKCONFIG

+	# now look for Tcl library stuff
+
+	case "${host}" in
+	*-*-cygwin*)
+	    tcldir=../tcl/win/
+	    ;;
+	*)
+	    tcldir=../tcl/unix/
+	    ;;
+	esac
+
+	TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
+
 	# If $no_tk is nonempty, then we can't do Tk, and there is no
 	# point to doing Tcl.
 	if test -z "${no_tk}"; then
@@ -923,6 +936,20 @@ if test "${enable_gdbtk}" = "yes"; then
 	   CY_AC_PATH_ITKH
 	   CY_AC_PATH_TIXH

+
+	   # now look for Tk library stuff
+
+	   case "${host}" in
+	   *-*-cygwin*)
+	       tkdir=../tk/win/
+	       ;;
+	   *)
+	       tkdir=../tk/unix/
+	       ;;
+	   esac
+
+	   TK_DEPS="${tkdir}${TK_LIB_FILE}"
+
 	   # now look for Itcl library stuff

 	   CY_AC_PATH_ITCLCONFIG
@@ -1010,6 +1037,8 @@ fi
 AC_SUBST(X_CFLAGS)
 AC_SUBST(X_LDFLAGS)
 AC_SUBST(X_LIBS)
+AC_SUBST(TCL_DEPS)
+AC_SUBST(TK_DEPS)
 AC_SUBST(ITCLLIB)
 AC_SUBST(ITCL_DEPS)
 AC_SUBST(ITKLIB)
Index: gdb/configure
===================================================================
RCS file: /cvs/src/src/gdb/configure,v
retrieving revision 1.61
diff -p -u -r1.61 configure
--- gdb/configure	2001/03/31 18:09:02	1.61
+++ gdb/configure	2001/04/12 21:31:08
@@ -7106,6 +7106,19 @@ fi



+	# now look for Tcl library stuff
+
+	case "${host}" in
+	*-*-cygwin*)
+	    tcldir=../tcl/win/
+	    ;;
+	*)
+	    tcldir=../tcl/unix/
+	    ;;
+	esac
+
+	TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
+
 	# If $no_tk is nonempty, then we can't do Tk, and there is no
 	# point to doing Tcl.
 	if test -z "${no_tk}"; then
@@ -7137,7 +7150,7 @@ fi

 no_tcl=true
 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:7141: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:7154: 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"
@@ -7203,17 +7216,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:7207: checking for tclInt.h" >&5
+echo "configure:7220: 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
-#line 7212 "configure"
+#line 7225 "configure"
 #include "confdefs.h"
 #include <tclInt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7230: \"$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*
@@ -7273,7 +7286,7 @@ fi
 #
 no_tk=true
 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:7277: checking for Tk private headers" >&5
+echo "configure:7290: 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"
@@ -7339,17 +7352,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:7343: checking for tk.h" >&5
+echo "configure:7356: 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
-#line 7348 "configure"
+#line 7361 "configure"
 #include "confdefs.h"
 #include <tk.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7366: \"$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*
@@ -7395,7 +7408,7 @@ fi


 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7399: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:7412: 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 ${srcdir}/../itcl/itcl; do
     if test -f $i/generic/itcl.h ; then
@@ -7418,7 +7431,7 @@ fi


 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7422: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:7435: checking for Itk private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_itkh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
     if test -f $i/generic/itk.h ; then
@@ -7441,7 +7454,7 @@ fi


 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7445: checking for Tix private headers. srcdir=${srcdir}" >&5
+echo "configure:7458: 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
@@ -7460,6 +7473,20 @@ fi



+
+	   # now look for Tk library stuff
+
+	   case "${host}" in
+	   *-*-cygwin*)
+	       tkdir=../tk/win/
+	       ;;
+	   *)
+	       tkdir=../tk/unix/
+	       ;;
+	   esac
+
+	   TK_DEPS="${tkdir}${TK_LIB_FILE}"
+
 	   # now look for Itcl library stuff


@@ -7479,7 +7506,7 @@ if test "${with_itclconfig+set}" = set;
 fi

   echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:7483: checking for Itcl configuration" >&5
+echo "configure:7510: checking for Itcl configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7591,7 +7618,7 @@ if test "${with_itkconfig+set}" = set; t
 fi

   echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:7595: checking for Itk configuration" >&5
+echo "configure:7622: checking for Itk configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7703,7 +7730,7 @@ if test "${with_tixconfig+set}" = set; t
 fi

   echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
-echo "configure:7707: checking for Tix configuration" >&5
+echo "configure:7734: checking for Tix configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7838,12 +7865,14 @@ fi



+
+
 # If we find X, set shell vars x_includes and x_libraries to the
 # paths, otherwise set no_x=yes.
 # 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:7847: checking for X" >&5
+echo "configure:7876: checking for X" >&5

 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -7905,12 +7934,12 @@ if test "$ac_x_includes" = NO; then

   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 7909 "configure"
+#line 7938 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7943: \"$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*
@@ -7979,14 +8008,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7983 "configure"
+#line 8012 "configure"
 #include "confdefs.h"

 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:7990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8019: \"$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.
@@ -8326,7 +8355,7 @@ fi


 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:8330: checking whether ln -s works" >&5
+echo "configure:8359: 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
@@ -8350,12 +8379,12 @@ fi


 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:8354: checking for Cygwin environment" >&5
+echo "configure:8383: checking for Cygwin environment" >&5
 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8359 "configure"
+#line 8388 "configure"
 #include "confdefs.h"

 int main() {
@@ -8366,7 +8395,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:8370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -8383,19 +8412,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:8387: checking for mingw32 environment" >&5
+echo "configure:8416: checking for mingw32 environment" >&5
 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8392 "configure"
+#line 8421 "configure"
 #include "confdefs.h"

 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:8399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -8414,7 +8443,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=y


 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:8418: checking for executable suffix" >&5
+echo "configure:8447: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8424,7 +8453,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:8428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:8457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj) ;;
@@ -8689,6 +8718,8 @@ s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SP
 s%@X_CFLAGS@%$X_CFLAGS%g
 s%@X_LDFLAGS@%$X_LDFLAGS%g
 s%@X_LIBS@%$X_LIBS%g
+s%@TCL_DEPS@%$TCL_DEPS%g
+s%@TK_DEPS@%$TK_DEPS%g
 s%@ITCLLIB@%$ITCLLIB%g
 s%@ITCL_DEPS@%$ITCL_DEPS%g
 s%@ITKLIB@%$ITKLIB%g



More information about the Gdb-patches mailing list