This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Use system Tcl et al


Hi,

At long last, I have committed the patches necessary to build Insight using system-installed versions of Tcl, Tk, Itcl, Itk, and Iwidgets.

I have tried to support building using in-tree tcl as well, and if they are present, they will be used over the system-supplied one. Aside from all the configury hacking, the biggest difference between the older insight and the newer one is Itcl. We must have Itcl/Itk 3.3/Iwidgets 4.0.1 -- these versions use TEA so we can simply "package require" them. We no longer link against them directly.

Unfortunately, this isn't perfect (yet). In fact, it's probably far from it. I've really had to hack at the startup sequence and a bunch of other things. I'm sure there are problems that I haven't even seen yet.

The biggest problems/issues so far:

1) Using in-tree tcl, tk, itcl, you cannot run insight from the build directory. Don't know why yet, it just exits with an exception from gdb_loc. I have not investigated. Note: This does not happen when using installed tcl and friends (which is the way I plan to use it from now on).

2) I have not tested cygwin a lot [and mingw at all]. I hope to investigate this more fully now that the initial support is in. You *must* use in-tree Tcl/Tk/Itcl for Cygwin, since the 3.2 package of Itcl that is distributed with Cygwin does not support the Tcl Extension Architecture.

3) Fedora 9 uses Tcl/Tk 8.5 and Itcl/Itk 3.4. There is a problem with the combobox package. I'm not sure what's going on here, but let's just say it doesn't "work". It builds, but it doesn't run. If you don't want to help figure out why, use the in-tree Tcl/Tk/Itcl.

4) I haven't tried the testsuite yet. [I know, that's bad. Probably very bad, but I'll address that in time.]

If there are any problems, send a note to this list, and I will try to get to it as quickly as I can. Please do not file bug reports on this stuff yet.

On my task list for the coming weeks:

o Get cygwin working (better?)
o Check testsuite
o Change insight CVS module to not include tcl/tk/itcl (probably add an "insight+tcl" module)
o Change the snapshots to post the code sans tcl. Probably put tarballs for the in-tree tcl, tk, itcl in case someone wants to use/download them.


Well, there it is. [Have at it, Tom!]

Keith

ChangeLog
2008-08-02  Keith Seitz  <keiths@redhat.com>

* generic/gdbtk-cmds.c: Don't include itcl.h.
* generic/gdbtk-hooks.c: Likewise.
* generic/gdbtk.c: Include tcl.h and tk.h instead of itcl.h
and itk.h.
(gdbtk_init): Rewrite to accommodate using a system-provided
Tcl, Tk, Itcl, Itk.
(gdbtk_source_start_file) [!_WIN32]: Don't call error() when
we fail to source the start file. Just dump the message to stderr.
Throw an exception indicating the failure.
* library/ehandler.itb (GDBEventHander::dispatch): "itcl_info" is
deprecated: use "itcl::find objects" instead.
* library/managedwin.itb (window_instance): Ditto.
(restart): Ditto.
(shutdown): Ditto.
(_open): Ditto.
(find): Ditto.
* library/globalpref.itb (_build_win): Don't pass config arguments
for libgui widgets to the constructor. Configure the widget after
creation.
* library/srcpref.itb (_build_win): Ditto.
* library/main.tcl: Update Tcl, Tk, Itcl, Itk, and Iwidgets (just
added to this loop) version requirements.
No need to initialize Iwidgets separately.
* plugins/Make-rules (TCLHDIR): Renamed to TCL_INCLUDES. Change
all references.
(TCL_BUILD_LIB_SPEC): Renamed to TCL_LIBRARY. Change all references.
* plugins/acinclude.m4: Include the standard tcl.m4 instead
of the sourceware-derived one.
* plugins/configure.ac: Use Tcl's standard SC_* macros instead of
the sourceware-derived CYG_AC_* macros.
Add logic to deal with using a system-supplied Tcl/Tk.
* plugins/configure: Regenerated.
* plugins/Makefile.in: Regenerated.
Index: generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.101
diff -u -p -r1.101 gdbtk-cmds.c
--- generic/gdbtk-cmds.c	14 Jul 2008 23:43:36 -0000	1.101
+++ generic/gdbtk-cmds.c	2 Aug 2008 21:46:55 -0000
@@ -48,7 +48,6 @@
    but gdb uses stdarg.h, so make sure HAS_STDARG is defined.  */
 #define HAS_STDARG 1
 
-#include <itcl.h>
 #include <tcl.h>
 #include <tk.h>
 
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.44
diff -u -p -r1.44 gdbtk-hooks.c
--- generic/gdbtk-hooks.c	25 Jul 2008 16:12:03 -0000	1.44
+++ generic/gdbtk-hooks.c	2 Aug 2008 21:46:55 -0000
@@ -43,7 +43,6 @@
    but gdb uses stdarg.h, so make sure HAS_STDARG is defined.  */
 #define HAS_STDARG 1
 
-#include <itcl.h>
 #include <tcl.h>
 #include <tk.h>
 #include "guitcl.h"
Index: generic/gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.46
diff -u -p -r1.46 gdbtk.c
--- generic/gdbtk.c	3 Mar 2008 23:25:03 -0000	1.46
+++ generic/gdbtk.c	2 Aug 2008 21:46:55 -0000
@@ -1,5 +1,5 @@
 /* Startup code for Insight
-   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2006
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2006, 2008
    Free Software Foundation, Inc.
 
    Written by Stu Grossman <grossman@cygnus.com> of Cygnus Support.
@@ -42,8 +42,8 @@
    but gdb uses stdarg.h, so make sure HAS_STDARG is defined.  */
 #define HAS_STDARG 1
 
-#include <itcl.h>
-#include <itk.h>
+#include <tcl.h>
+#include <tk.h>
 #include "guitcl.h"
 #include "gdbtk.h"
 
@@ -367,6 +367,8 @@ gdbtk_init (void)
   int element_count;
   const char **exec_path;
   CONST char *internal_exec_name;
+  Tcl_Obj *command_obj;
+  int running_from_builddir;
 
   old_chain = make_cleanup (cleanup_init, 0);
 
@@ -381,119 +383,117 @@ gdbtk_init (void)
   if (!gdbtk_interp)
     error ("Tcl_CreateInterp failed");
 
-  /* We need to check if we are being run from
-     a bin directory, if not then we may have to
-     set some environment variables. */
+  /* Set up some globals used by gdb to pass info to gdbtk
+     for start up options and the like */
+  xasprintf (&s, "%d", inhibit_gdbinit);
+  Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "inhibit_prefs", s, TCL_GLOBAL_ONLY);
+  free(s);
+   
+  /* Note: Tcl_SetVar2() treats the value as read-only (making a
+     copy).  Unfortunately it does not mark the parameter as
+     ``const''. */
+  Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "host_name", (char*) host_name, TCL_GLOBAL_ONLY);
+  Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "target_name", (char*) target_name, TCL_GLOBAL_ONLY);
+  {
+#ifdef __CYGWIN
+    char *srcdir = (char *) alloca (cygwin_posix_to_win32_path_list_buf_size (SRC_DIR));
+    cygwin_posix_to_win32_path_list (SRC_DIR, srcdir);
+#else /* !__CYGWIN */
+    char *srcdir = SRC_DIR;
+#endif /* !__CYGWIN */
+    Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "srcdir", srcdir, TCL_GLOBAL_ONLY);
+  }
+
+  /* This is really lame, but necessary. We need to set the path to our
+     library sources in the global GDBTK_LIBRARY. This was only necessary
+     for running from the build dir, but when using a system-supplied
+     Tcl/Tk/Itcl, we cannot rely on the user installing Insight into
+     the same tcl library directory. */
 
   internal_exec_name = Tcl_GetNameOfExecutable ();
 
   Tcl_SplitPath ((char *) internal_exec_name, &element_count, &exec_path);
+  if (strcmp (exec_path[element_count - 2], "bin") == 0)
+    running_from_builddir = 0;
+  else
+    running_from_builddir = 1;
+  Tcl_Free ((char *) exec_path);
+
+  /* This seems really complicated, and that's because it is.
+     We would like to preserve the following ways of running
+     Insight (and having it work, of course):
+
+     1. Installed using installed Tcl et al
+     2. From build directory using installed Tcl et al
+     3. Installed using Tcl et al from the build tree
+     4. From build directory using Tcl et al from the build tree
+
+     When running from the builddir (nos. 2,4), we set all the
+     *_LIBRARY variables manually to point at the proper locations in
+     the source tree. (When Tcl et al are installed, their
+     corresponding variables get set incorrectly, but tcl_findLibrary
+     will still find the correct installed versions.)
+
+     When not running from the build directory, we must set GDBTK_LIBRARY,
+     just in case we are running from a non-standard install directory
+     (i.e., Tcl and Insight were installed into two different
+     install directories). One snafu: we use libgui's Paths
+     environment variable to do this, so we cannot actually
+     set GDBTK_LIBRARY until libgui is initialized. */
 
-  if (strcmp (exec_path[element_count - 2], "bin") != 0)
+  if (running_from_builddir)
     {
       /* We check to see if TCL_LIBRARY, TK_LIBRARY,
-	 ITCL_LIBRARY, ITK_LIBRARY, TIX_LIBRARY and maybe
-	 a couple other environment variables have been
-	 set (we don't want to override the User's settings).
-	 If the *_LIBRARY variable is not set, point it at
-	 the source directory. */
+	 ITCL_LIBRARY, ITK_LIBRARY, and maybe a couple other
+	 environment variables have been set (we don't want
+	 to override the User's settings).
 
-      static char set_libs_path_script[] = "\
-	  set srcDir [file dirname [file dirname $env(TCL_LIBRARY)]];\n\
+	 If the *_LIBRARY variable is is not set, point it at
+	 the source directory. */
+      static char set_lib_paths_script[] = "\
+          set srcDir [file dirname $GDBStartup(srcdir)]\n\
+          if {![info exists env(TCL_LIBRARY)]} {\n\
+              set env(TCL_LIBRARY) [file join $srcDir tcl library]\n\
+          }\n\
 \
-	  if {![info exists env(TK_LIBRARY)]} {\n\
-	      set env(TK_LIBRARY) [file join $srcDir tk library]\n\
-	  }\n\
+          if {![info exists env(TK_LIBRARY)]} {\n\
+              set env(TK_LIBRARY) [file join $srcDir tk library]\n\
+          }\n\
 \
-	  if {![info exists env(ITCL_LIBRARY)]} {\n\
-	      set env(ITCL_LIBRARY) [file join $srcDir itcl itcl library]\n\
-	  }\n\
+          if {![info exists env(ITCL_LIBRARY)]} {\n\
+              set env(ITCL_LIBRARY) [file join $srcDir itcl itcl library]\n\
+          }\n\
 \
-	  if {![info exists env(ITK_LIBRARY)]} {\n\
-	      set env(ITK_LIBRARY) [file join $srcDir itcl itk library]\n\
-	  }\n\
+          if {![info exists env(ITK_LIBRARY)]} {\n\
+              set env(ITK_LIBRARY) [file join $srcDir itcl itk library]\n\
+          }\n\
 \
-	  if {![info exists env(IWIDGETS_LIBRARY)]} {\n\
-	      set env(IWIDGETS_LIBRARY)\
+          if {![info exists env(IWIDGETS_LIBRARY)]} {\n\
+              set env(IWIDGETS_LIBRARY) \
                      [file join $srcDir itcl iwidgets generic]\n\
-	  }\n\
+          }\n\
 \
 	  if {![info exists env(GDBTK_LIBRARY)]} {\n\
-	      set env(GDBTK_LIBRARY) [file join $srcDir gdb gdbtk library]\n\
+	      set env(GDBTK_LIBRARY) [file join $GDBStartup(srcdir) gdbtk library]\n\
 	  }\n\
 \
-          # Append the directory with the itcl pkg index\n\
-          if {[info exists env(TCLLIBPATH)]} {\n\
-            append env(TCLLIBPATH) :[file joing $srcDir itcl]\n\
-          } else {\n\
-            set env(TCLLIBPATH) [file join $srcDir itcl]\n\
-          }\n\
-\
-          # We also need to append the iwidgets library path.\n\
-          # Unfortunately, there is no IWIDGETS_LIBRARY.\n\
-          set IWIDGETS_LIBRARY [file join $srcDir itcl iwidgets generic]\n";
-
-      Tcl_Obj *commandObj;
-
-      /* Before we can run our script we must set TCL_LIBRARY. */
-      if (Tcl_GetVar2 (gdbtk_interp, "env", "TCL_LIBRARY", TCL_GLOBAL_ONLY) == NULL)
-	{
-	  int i, count;
-	  char *src_dir = SRC_DIR;
-	  const char **src_path;
-	  const char **lib_path;
-	  Tcl_DString lib_dstring;
-
-	  Tcl_DStringInit (&lib_dstring);
-
-#ifdef __CYGWIN__
-	  /* SRC_DIR from configure is a posix path. Tcl really needs a
-	     windows path. */
-	  src_dir = (char *) alloca (cygwin_posix_to_win32_path_list_buf_size (SRC_DIR));
-	  cygwin_posix_to_win32_path_list (SRC_DIR, src_dir);
-#endif
-	  Tcl_SplitPath (src_dir, &count, &src_path);
-
-	  /* Append tcl/library to src_dir (src_dir=/foo/bar/gdb) */
-	  lib_path = (const char **) alloca ((count + 2) * sizeof (char *));
-	  for (i = 0; i < count - 1; i++)
-	    lib_path[i] = src_path[i];
-	  lib_path[i++] = "tcl";
-	  lib_path[i++] = "library";
-	  Tcl_JoinPath (i, lib_path, &lib_dstring);
-
-	  /* Set TCL_LIBRARY */
-	  Tcl_SetVar2 (gdbtk_interp, "env", "TCL_LIBRARY",
-		       Tcl_DStringValue (&lib_dstring) , TCL_GLOBAL_ONLY);
-	  Tcl_DStringFree (&lib_dstring);
-	  Tcl_Free ((char *) src_path);
-	}
-
-      commandObj = Tcl_NewStringObj (set_libs_path_script, -1);
-      Tcl_IncrRefCount (commandObj);
-      Tcl_EvalObj (gdbtk_interp, commandObj);
-      Tcl_DecrRefCount (commandObj);
+          # Append the directory with the itcl/itk/iwidgets pkg indexes\n\
+          set startDir [file dirname [file dirname [info nameofexecutable]]]\n\
+          lappend ::auto_path [file join $startDir itcl itcl]\n\
+          lappend ::auto_path [file join $startDir itcl itk]\n\
+          lappend ::auto_path [file join $startDir itcl iwidgets]\n";
+
+      command_obj = Tcl_NewStringObj (set_lib_paths_script, -1);
+      Tcl_IncrRefCount (command_obj);
+      Tcl_EvalObj (gdbtk_interp, command_obj);
+      Tcl_DecrRefCount (command_obj);
     }
 
-  Tcl_Free ((char *) exec_path);
+  make_final_cleanup (gdbtk_cleanup, NULL);
 
   if (Tcl_Init (gdbtk_interp) != TCL_OK)
     error ("Tcl_Init failed: %s", gdbtk_interp->result);
 
-  /* Set up some globals used by gdb to pass info to gdbtk
-     for start up options and the like */
-  xasprintf (&s, "%d", inhibit_gdbinit);
-  Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "inhibit_prefs", s, TCL_GLOBAL_ONLY);
-  free(s);
-   
-  /* Note: Tcl_SetVar2() treats the value as read-only (making a
-     copy).  Unfortunately it does not mark the parameter as
-     ``const''. */
-  Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "host_name", (char*) host_name, TCL_GLOBAL_ONLY);
-  Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "target_name", (char*) target_name, TCL_GLOBAL_ONLY);
-
-  make_final_cleanup (gdbtk_cleanup, NULL);
-
   /* Initialize the Paths variable.  */
   if (ide_initialize_paths (gdbtk_interp, "") != TCL_OK)
     error ("ide_initialize_paths failed: %s", gdbtk_interp->result);
@@ -501,21 +501,27 @@ gdbtk_init (void)
   if (Tk_Init (gdbtk_interp) != TCL_OK)
     error ("Tk_Init failed: %s", gdbtk_interp->result);
 
-  if (Itcl_Init (gdbtk_interp) == TCL_ERROR)
-    error ("Itcl_Init failed: %s", gdbtk_interp->result);
-  Tcl_StaticPackage (gdbtk_interp, "Itcl", Itcl_Init,
-		     (Tcl_PackageInitProc *) NULL);
-
-  if (Itk_Init (gdbtk_interp) == TCL_ERROR)
-    error ("Itk_Init failed: %s", gdbtk_interp->result);
-  Tcl_StaticPackage (gdbtk_interp, "Itk", Itk_Init,
-		     (Tcl_PackageInitProc *) NULL);
-
   if (Tktable_Init (gdbtk_interp) != TCL_OK)
     error ("Tktable_Init failed: %s", gdbtk_interp->result);
 
   Tcl_StaticPackage (gdbtk_interp, "Tktable", Tktable_Init,
 		     (Tcl_PackageInitProc *) NULL);
+
+  /* If we are not running from the build directory,
+     initialize GDBTK_LIBRARY. See comments above. */
+  if (!running_from_builddir)
+    {
+      static char set_gdbtk_library_script[] = "\
+	  if {![info exists env(GDBTK_LIBRARY)]} {\n\
+	      set env(GDBTK_LIBRARY) [file join [file dirname [file dirname $Paths(guidir)]] insight1.0]\n\
+	  }\n";
+
+      command_obj = Tcl_NewStringObj (set_gdbtk_library_script, -1);
+      Tcl_IncrRefCount (command_obj);
+      Tcl_EvalObj (gdbtk_interp, command_obj);
+      Tcl_DecrRefCount (command_obj);
+    }
+
   /*
    * These are the commands to do some Windows Specific stuff...
    */
@@ -620,6 +626,7 @@ gdbtk_find_main";
     
   if (Tcl_GlobalEval (gdbtk_interp, (char *) script) != TCL_OK)
     {
+      struct gdb_exception e;
       const char *msg;
 
       /* Force errorInfo to be set up propertly.  */
@@ -631,18 +638,18 @@ gdbtk_find_main";
 	 If GDB wasn't started from the DOS prompt, the user won't
 	 get to see the failure reason.  */
       MessageBox (NULL, msg, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL);
-      {
-        struct gdb_exception e;
-        e.reason  = RETURN_ERROR;
-        e.error   = GENERIC_ERROR;
-        e.message = msg;
-        throw_exception (e);
-      }
 #else
-      /* FIXME: cagney/2002-04-17: Wonder what the lifetime of
-	 ``msg'' is - does it need a cleanup?  */
-      error ("%s", msg);
+      /* gdb_stdout is already pointing to OUR stdout, so we cannot
+	 use *_[un]filtered here. Since we're "throwing" an exception
+         which should cause us to exit, just print out the error
+         to stderr. */
+      fputs (msg, stderr);
 #endif
+
+      e.reason  = RETURN_ERROR;
+      e.error   = GENERIC_ERROR;
+      e.message = msg;
+      throw_exception (e);
     }
 
   /* Now source in the filename provided by the --tclcommand option.
Index: library/ehandler.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/ehandler.itb,v
retrieving revision 1.3
diff -u -p -r1.3 ehandler.itb
--- library/ehandler.itb	23 Dec 2005 18:26:50 -0000	1.3
+++ library/ehandler.itb	2 Aug 2008 21:46:55 -0000
@@ -22,7 +22,7 @@ itcl::body GDBEventHandler::dispatch {ev
   set handler [$event handler]
 
   # invoke event handlers
-  foreach w [itcl_info objects -isa GDBEventHandler] {
+  foreach w [itcl::find objects -isa GDBEventHandler] {
     dbug I "posting event \"$handler\" to \"$w\""
     if {[catch {$w $handler $event}]} {
       dbug E "On $handler event, $w errored:\n$::errorInfo"
Index: library/globalpref.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/globalpref.itb,v
retrieving revision 1.15
diff -u -p -r1.15 globalpref.itb
--- library/globalpref.itb	9 Feb 2008 01:23:42 -0000	1.15
+++ library/globalpref.itb	2 Aug 2008 21:46:55 -0000
@@ -173,7 +173,8 @@ itcl::body GlobalPref::_build_win {} {
     if {[winfo exists .c]} { destroy .c }
   }
   
-  Labelledframe $frame.d -text "Fonts"
+  set f [Labelledframe $frame.d]
+  $f configure -text "Fonts"
   set f [$frame.d get_frame]
 
   _make_font_item $f fixed "Fixed Font:" $font_cache
Index: library/main.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/main.tcl,v
retrieving revision 1.18
diff -u -p -r1.18 main.tcl
--- library/main.tcl	9 Feb 2008 01:23:42 -0000	1.18
+++ library/main.tcl	2 Aug 2008 21:46:55 -0000
@@ -53,11 +53,10 @@ if {[info exists auto_path]} {
   }
 }
 
-
 # Require the packages we need.  Most are loaded already, but this will catch 
 # any odd errors... :
 
-foreach p {{Tcl 8.0} {Tk 8.0} {Itcl 3.0} {Itk 3.0} {Gdbtk 1.0} {combobox 2.2} {debug 1.0}} {
+foreach p {{Tcl 8.4} {Tk 8.4} {Itcl 3.3} {Itk 3.3} {Iwidgets 4.0} {Gdbtk 1.0} {combobox 2.2} {debug 1.0}} {
   if {[catch {package require [lindex $p 0] [lindex $p 1]} msg]} {
     if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
       if {$::tcl_platform(platform) != "windows"} {
@@ -74,21 +73,6 @@ foreach p {{Tcl 8.0} {Tk 8.0} {Itcl 3.0}
 namespace import itcl::*
 namespace import debug::*
 
-# Finally, load Iwidgets
-if {[info exists IWIDGETS_LIBRARY]} {
-  lappend auto_path $IWIDGETS_LIBRARY
-}
-if {[catch {package require Iwidgets} msg]} {
-  if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
-    if {$::tcl_platform(platform) != "windows"} {
-      puts stderr "Error: $msg"
-    }
-    catch {tk_messageBox -title Error -message $msg -icon error -type ok}
-  }
-  exit -1
-}
-
-
 # Environment variables controlling debugging:
 # GDBTK_TRACE
 #	unset or 0	no tracing
Index: library/managedwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/managedwin.itb,v
retrieving revision 1.30
diff -u -p -r1.30 managedwin.itb
--- library/managedwin.itb	9 Feb 2008 01:23:42 -0000	1.30
+++ library/managedwin.itb	2 Aug 2008 21:46:56 -0000
@@ -75,7 +75,7 @@ itcl::body ManagedWin::window_name {wnam
 # ------------------------------------------------------------
 itcl::body ManagedWin::window_instance {ins} {
   set win_instance $ins
-  foreach obj [itcl_info objects -isa ManagedWin] {
+  foreach obj [itcl::find objects -isa ManagedWin] {
     debug "$obj ManagedWin::_wname"
     $obj window_name ""
   }
@@ -133,7 +133,7 @@ itcl::body ManagedWin::restart {} {
   after idle gdbtk_idle
   
   # call the reconfig method for each object
-  foreach obj [itcl_info objects -isa ManagedWin] {
+  foreach obj [itcl::find objects -isa ManagedWin] {
     if {[catch {$obj reconfig} msg]} {
       dbug W "reconfig failed for $obj - $msg"
     } 
@@ -147,7 +147,7 @@ itcl::body ManagedWin::restart {} {
 # ------------------------------------------------------------------
 itcl::body ManagedWin::shutdown {} {
   set activeWins {}
-  foreach win [itcl_info objects -isa ManagedWin] {
+  foreach win [itcl::find objects -isa ManagedWin] {
     if {![$win isa ModalDialog] && ![$win _ignore_on_save]} {
       set g [wm geometry [winfo toplevel [namespace tail $win]]]
       pref setd gdb/geometry/[namespace tail $win] $g
@@ -220,7 +220,7 @@ itcl::body ManagedWin::_open { class arg
 
   if {!$force} {
     # check all windows for one of this type
-    foreach obj [itcl_info objects -isa ManagedWin] {
+    foreach obj [itcl::find objects -isa ManagedWin] {
       if {[$obj isa $class]} {
 	$obj reveal
 	return $obj
@@ -363,7 +363,7 @@ itcl::body ManagedWin::_create { class a
 itcl::body ManagedWin::find { win } {
   debug "$win"
   set res ""
-  foreach obj [itcl_info objects -isa ManagedWin] {
+  foreach obj [itcl::find objects -isa ManagedWin] {
     if {[$obj isa $win]} {
       lappend res $obj
     }
Index: library/srcpref.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcpref.itb,v
retrieving revision 1.10
diff -u -p -r1.10 srcpref.itb
--- library/srcpref.itb	23 Dec 2005 18:26:50 -0000	1.10
+++ library/srcpref.itb	2 Aug 2008 21:46:56 -0000
@@ -1,5 +1,5 @@
 # Source preferences dialog for Insight.
-# Copyright (C) 1998, 1999, 2002, 2003 Red Hat
+# Copyright (C) 1998, 1999, 2002, 2003, 2008 Red Hat
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -49,7 +49,8 @@ itcl::body SrcPref::_build_win {} {
   set f $itk_interior.f.a
 
   # Colors frame
-  Labelledframe $f.colors -anchor nw -text {Colors}
+  set a [Labelledframe $f.colors]
+  $a configure -anchor nw -text {Colors}
   set w [$f.colors get_frame]
 
   set color [pref get gdb/src/PC_TAG]
@@ -100,7 +101,8 @@ itcl::body SrcPref::_build_win {} {
   frame $f.rmv
 
   # Debug Mode frame
-  Labelledframe $f.rmv.mode -anchor nw -text "Mouse Button-1 Behavior"
+  set a [Labelledframe $f.rmv.mode]
+  $a configure -anchor nw -text "Mouse Button-1 Behavior"
   set w [$f.rmv.mode get_frame]
 
   if {[pref get gdb/mode]} {
@@ -118,7 +120,8 @@ itcl::body SrcPref::_build_win {} {
   pack $w.async $w.sync -side top
 
   # Variable Balloons
-  Labelledframe $f.rmv.var -anchor nw -text "Variable Balloons"
+  set a [Labelledframe $f.rmv.var]
+  $a configure -anchor nw -text "Variable Balloons"
   set w [$f.rmv.var get_frame]
   set var _new(gdb/src/variableBalloons)
   radiobutton $w.var_on -text "On " -variable [scope $var] -value 1
Index: plugins/Make-rules
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/plugins/Make-rules,v
retrieving revision 1.2
diff -u -p -r1.2 Make-rules
--- plugins/Make-rules	26 Jul 2007 13:05:35 -0000	1.2
+++ plugins/Make-rules	2 Aug 2008 21:46:56 -0000
@@ -35,8 +35,8 @@ TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
 TCL_SHLIB_LD = @TCL_SHLIB_LD@
 TCL_DBGX = @TCL_DBGX@
 TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
-TCL_INCLUDES = @TCLHDIR@
-TCL_BUILD_LIB_SPEC = @TCL_BUILD_LIB_SPEC@
+TCL_INCLUDES = @TCL_INCLUDES@
+TCL_LIBRARY = @TCL_LIBRARY@
 
 mkinstalldirs = $(srcdir)/../../../../mkinstalldirs
 INSTALL = @INSTALL@
@@ -62,7 +62,7 @@ else
 ALL_TARGETS = $(PLUGIN_MODULE) $(GENERIC_TARGETS) $(PLUGIN_TARGETS)
 endif
 
-GENERIC_SHLIB_LIBS = $(TCL_BUILD_LIB_SPEC)
+GENERIC_SHLIB_LIBS = $(TCL_LIBRARY)
 CYGWIN_DLL_LIBS = $(PLUGIN_CYGWIN_LIBS) @LIBCYGWIN_A@
 ALL_SHLIB_LIBS = $(GENERIC_SHLIB_LIBS) $(PLUGIN_SHLIB_LIBS)
 
Index: plugins/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/plugins/Makefile.in,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile.in
--- plugins/Makefile.in	29 Sep 2006 04:47:41 -0000	1.3
+++ plugins/Makefile.in	2 Aug 2008 21:46:56 -0000
@@ -46,7 +46,7 @@ DIST_COMMON = $(srcdir)/../../../config.
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/../../../config/acinclude.m4 \
+	$(top_srcdir)/../../../config/tcl.m4 \
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -79,7 +79,6 @@ AWK = @AWK@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
-CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -88,7 +87,6 @@ DLLTOOL = @DLLTOOL@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
-EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -116,35 +114,31 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-TCLCONFIG = @TCLCONFIG@
-TCLHDIR = @TCLHDIR@
 TCL_BIN_DIR = @TCL_BIN_DIR@
-TCL_BUILD_LIB_SPEC = @TCL_BUILD_LIB_SPEC@
-TCL_CFLAGS = @TCL_CFLAGS@
 TCL_DBGX = @TCL_DBGX@
-TCL_DEFS = @TCL_DEFS@
-TCL_LD_FLAGS = @TCL_LD_FLAGS@
-TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@
-TCL_LIBS = @TCL_LIBS@
+TCL_INCLUDES = @TCL_INCLUDES@
+TCL_LIBRARY = @TCL_LIBRARY@
 TCL_LIB_FILE = @TCL_LIB_FILE@
-TCL_LIB_FULL_PATH = @TCL_LIB_FULL_PATH@
+TCL_LIB_FLAG = @TCL_LIB_FLAG@
 TCL_LIB_SPEC = @TCL_LIB_SPEC@
-TCL_RANLIB = @TCL_RANLIB@
+TCL_PATCH_LEVEL = @TCL_PATCH_LEVEL@
 TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
 TCL_SHLIB_LD = @TCL_SHLIB_LD@
 TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
-TKCONFIG = @TKCONFIG@
-TKHDIR = @TKHDIR@
-TK_BUILD_INCLUDES = @TK_BUILD_INCLUDES@
-TK_BUILD_LIB_SPEC = @TK_BUILD_LIB_SPEC@
-TK_DEFS = @TK_DEFS@
-TK_LIBS = @TK_LIBS@
+TCL_SRC_DIR = @TCL_SRC_DIR@
+TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
+TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@
+TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
+TCL_VERSION = @TCL_VERSION@
+TK_BIN_DIR = @TK_BIN_DIR@
 TK_LIB_FILE = @TK_LIB_FILE@
-TK_LIB_FULL_PATH = @TK_LIB_FULL_PATH@
+TK_LIB_FLAG = @TK_LIB_FLAG@
 TK_LIB_SPEC = @TK_LIB_SPEC@
+TK_SRC_DIR = @TK_SRC_DIR@
+TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@
+TK_STUB_LIB_FLAG = @TK_STUB_LIB_FLAG@
+TK_STUB_LIB_SPEC = @TK_STUB_LIB_SPEC@
 TK_VERSION = @TK_VERSION@
-TK_XINCLUDES = @TK_XINCLUDES@
-TK_XLIBSW = @TK_XLIBSW@
 VERSION = @VERSION@
 ac_ct_AS = @ac_ct_AS@
 ac_ct_CC = @ac_ct_CC@
Index: plugins/acinclude.m4
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/plugins/acinclude.m4,v
retrieving revision 1.1
diff -u -p -r1.1 acinclude.m4
--- plugins/acinclude.m4	14 Aug 2002 18:06:06 -0000	1.1
+++ plugins/acinclude.m4	2 Aug 2008 21:46:56 -0000
@@ -1 +1 @@
-"sinclude(../../../config/acinclude.m4)"
+"sinclude(../../../config/tcl.m4)"
Index: plugins/configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/plugins/configure.ac,v
retrieving revision 1.1
diff -u -p -r1.1 configure.ac
--- plugins/configure.ac	13 Jan 2005 22:30:57 -0000	1.1
+++ plugins/configure.ac	2 Aug 2008 21:46:56 -0000
@@ -9,13 +9,31 @@ AC_OBJEXT
 AC_EXEEXT
 
 # Find Tcl, Tk, etc
-CYG_AC_PATH_TCLCONFIG
-CYG_AC_LOAD_TCLCONFIG
-CYG_AC_PATH_TKCONFIG
-CYG_AC_LOAD_TKCONFIG
-CYG_AC_PATH_TCLH
-CYG_AC_PATH_TKH
+SC_PATH_TCLCONFIG
+SC_LOAD_TCLCONFIG
+SC_PATH_TKCONFIG
+SC_LOAD_TKCONFIG
+
+# Special in-tree hackery
+here=`pwd`
+cd ${srcdir}/../../..
+topdir=`pwd`
+cd ${here}
+
+if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
+  TCL_INCLUDES="-I${TCL_SRC_DIR}/generic"
+  TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
+else
+  TCL_INCLUDES="${TCL_INCLUDE_SPEC}"
+  TCL_LIBRARY="${TCL_LIB_SPEC}"
+fi
+
 AC_SUBST(TCL_DBGX)
+AC_SUBST(TCL_SHLIB_CFLAGS)
+AC_SUBST(TCL_SHLIB_LD)
+AC_SUBST(TCL_SHLIB_SUFFIX)
+AC_SUBST(TCL_INCLUDES)
+AC_SUBST(TCL_LIBRARY)
 
 # Make sure TCL_SHLIB_SUFFIX is set
 if test x$TCL_SHLIB_SUFFIX = x ; then

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]