From: kseitz Date: Wed, 19 Sep 2001 18:10:37 +0000 (+0000) Subject: * library/main.tcl: Append iwidgets library path, if needed. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d2e7d3b3258b829d1c87a162e8e2c1dcce5c52a5;p=pf3gnuchains%2Fsourceware.git * library/main.tcl: Append iwidgets library path, if needed. * generic/gdbtk.c (gdbtk_init): Add TCLLIBPATH to iwidgets package index. Define IWIDGETS_LIBRARY in interpreter so that we can add this path to the auto_path at the right time later. --- diff --git a/gdb/gdbtk/generic/gdbtk.c b/gdb/gdbtk/generic/gdbtk.c index 1c787fa628..6c9bc6f455 100644 --- a/gdb/gdbtk/generic/gdbtk.c +++ b/gdb/gdbtk/generic/gdbtk.c @@ -434,7 +434,18 @@ gdbtk_init (argv0) \ if {![info exists env(GDBTK_LIBRARY)]} {\n\ set env(GDBTK_LIBRARY) [file join $srcDir gdb gdbtk library]\n\ - }\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 iwidgets3.0.0 generic]\n"; Tcl_Obj *commandObj; diff --git a/gdb/gdbtk/library/main.tcl b/gdb/gdbtk/library/main.tcl index 1b1860c689..90edbfcd80 100644 --- a/gdb/gdbtk/library/main.tcl +++ b/gdb/gdbtk/library/main.tcl @@ -58,6 +58,11 @@ namespace import itcl::* namespace import debug::* +# Setup iwidgets path, if needed +if {[info exists IWIDGETS_LIBRARY]} { + lappend auto_path $IWIDGETS_LIBRARY +} + if {[catch {package require Iwidgets 3.0} errMsg]} { set msg "Could not find the Iwidgets libraries.\n\nGot nameofexec: [info nameofexecutable]\nError(s) were: \n$errMsg"