diff options
author | Keith Seitz <keiths@redhat.com> | 2002-09-24 22:42:36 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2002-09-24 22:42:36 +0000 |
commit | 5a88d945c95d8c15e31bf74fc9850b8c01fdeaec (patch) | |
tree | 63e9dde7c1e979d6e7664c336c67ed8291baa9ad | |
parent | c2e8768187b8a0373793db9afd305d89d09de3a3 (diff) | |
download | gdb-5a88d945c95d8c15e31bf74fc9850b8c01fdeaec.tar.gz |
import itcl 3.2.1ITCL_3_2_1
56 files changed, 7768 insertions, 4521 deletions
diff --git a/itcl/CHANGES b/itcl/CHANGES new file mode 100644 index 00000000000..b0cbdafe85d --- /dev/null +++ b/itcl/CHANGES @@ -0,0 +1,2041 @@ + + [incr Tcl] - CHANGE LOG +========================================================================== + ----------------------- CHANGES FROM itcl-1.5 -------------------------- +========================================================================== + + Release itcl-2.0 provides a new syntax for defining classes. The + new syntax is accessed using the new "itcl::class" command. For the + time being, the old syntax will be supported via the old "itcl_class" + command, but support for this will be phased out over time. + + Because both syntaxes are supported, the new version is "backward + compatible" with the previous itcl-1.5 release. However, there are + some semantic changes that may break existing scripts. These are + listed in detail in the section "INCOMPATIBLE CHANGES". + + + CATALOG OF NEW COMMANDS +-------------------------------------------------------------------------- + Following is a brief catalog of new commands available in this release. + + == Tcl with Namespaces ================================================= + + delete namespace name ?name...? + + Deletes one or more namespaces, destroying all commands, variables, + and child namespaces within it. + + + ensemble name { + option optName arglist body + option optName arglist body + ... + ensemble optName { + option subOptName arglist body + option subOptName arglist body + ... + } + } + + Adds options to an ensemble called "name". If the ensemble does + not already exist, it is created automatically. An "ensemble" is + a toplevel command that groups a collection of sub-commands. For + example, the usual Tcl "info" command is an ensemble with options + like "globals", "level", "tclversion", etc. + + Ensembles are good for two reasons. First, new options can be + integrated in without modifying any source code or "switch" + statements. For example, [incr Tcl] adds the "info classes" + and "info objects" commands simply by adding options to the + "info" ensemble. Second, error messages are generated automatically + by the ensemble mechanism. Try invoking "info" with no options + and see the result. + + Each option declaration is just like a Tcl proc declaration, + with an option name, arglist and body. Ensembles can also + contain sub-ensembles with more options. + + + import add name ?name...? ?-where pos...? + import all ?name? + import list ?importList? + import remove name ?name...? + + Used to manipulate the "import" list for the current namespace. + When one namespace imports another, it gains access to all of + its public commands/variables as if they were part of the + same namespace. In other words, one namespace can be integrated + seamlessly into another by adding it to the import list of the + other namespace. By default, each namespace imports its parent, + so most namespaces import the global scope in some fashion. + + The form "import list" is used to query or set the import list + for the current namespace. The form "import all" returns the + namespace search path that is consulted when commands/variables + are accessed. + + + info context + + Returns the current namespace context. The global namespace + context is reported here as "", so it is easy to build + namespace paths like this: + + set path "[info context]::name" + + + info namespace all ?pattern? + + Returns a list of namespaces found in the current namespace + context, whose names match an optional string pattern. This + includes children of the current namespace, and children of + all imported namespaces. + + + info namespace children ?name? + + Returns a list of child namespaces for namespace "name", + or for the current namespace if "name" is not specified. + + + info namespace parent ?name? + + Returns the parent namespace for namespace "name", or + for the current namespace if "name" is not specified. + + + info namespace qualifiers string + + Parses a string of the form "namesp::namesp::name", and returns + the leading "namesp::namesp" scope qualifiers. + + + info namespace tail string + + Parses a string of the form "namesp::namesp::name", and returns + the trailing "name" element. + + + info protection ?-command? ?-variable? name + + Returns the protection level for an element. By default, "name" + is treated as a command name, but the "-command" or "-variable" + flags can be used to request a specific treatment. + + + info which ?-command? ?-variable? ?-namespace? name + + Reports the full namespace path (e.g., "::namesp::namesp::name") + for an element. By default, "name" is treated as a command name, + but the "-command", "-variable" and "-namespace" flags can be + used to request a specific treatment. + + + namespace name ?-local? ?-enforced val? ?--? ?commands? + + This is the usual mechanism for creating a namespace and defining + elements within it. + + If namespace "name" does not exist, it is created automatically. + The namespace name may include a full namespace path (e.g., + "namesp::namesp::namesp"). During the search for this namespace, + all imported namespaces are consulted. If the "-local" flag is + specified, then the search is restricted to the local namespace; + this prevents against accidentally importing a namespace if the + intent is to create a child namespace. + + If the "-enforced" flag is specified, then "val" is treated as a + boolean value; if true, then command/variable enforcement is + turned on for this namespace. Each time a new command is + referenced within the namespace, Tcl automatically calls a + procedure: + + enforce_cmd <name> + + with the <name> of the command that is about to be executed. The + "enforce_cmd" proc can return an error, and access to that command + will be denied. It can return another command name, or a more + specific namespace path, and that command will be used instead. + Or it can return "", and command lookup will continue via the + normal namespace rules (i.e., in local scope, imported namespaces, + etc.). + + Each time a new variable is referenced within an enforced + namespace, Tcl automatically calls a procedure: + + enforce_var <name> + + with the <name> of a global variable that is being referenced. + The "enforce_var" proc can return an error, and access to that + variable will be denied. It can return another variable name, + or a more specific namespace path, and that variable will be + used instead. Or it can return "", and variable lookup will + continue via the normal namespace rules (i.e., in local scope, + imported namespaces, etc.). + + Note that command/variable enforcement done at the Tcl language + level can be slow. There is also a C language interface for + the same functionality, which offers much better performance. + + The namespace is first found and updated with whatever flags were + specified. After that, if a "commands" string was specified, it + is executed in the context of the namespace. + + + public command ?arg arg...? + protected command ?arg arg...? + private command ?arg arg...? + + These commands attach a particular protection level to whatever + commands or variables are created while executing the specified + command. They are used in conjunction with commands like + "proc" and "variable" to create public/protected/private elements. + + + scope string + code ?-namespace name? command ?arg arg ...? + @scope namespace value + + The "scope" command takes a string and encodes it into an "@scope" + declaration. The "code" command performs a similar function, + but accepts multiple arguments and is usually used to wrap up + code fragments. The "@scope" declaration keeps a value (like a + variable name or code fragment) together with its context + namespace. It can be executed like an ordinary command: + + set cmd {@scope :: puts} + $cmd "hello world!" + + or used as an ordinary variable name: + + set var {@scope :: auto_path} + lappend $var /usr/local/mylib + + The difference, however, is that an "@scope" value bypasses the + usual access protections and guarantees that values have the + proper scope. + + Ordinary variable names refer to variables in the global + namespace. Ordinary code fragments are usually interpreted + by extensions like Tk in the global namespace. The "scope" + and "code" commands are used to wrap up variable names and + code fragments to preserve the namespace context. For example: + + namespace foo { + private variable state 0 + private proc show_state {mesg} { + global state + puts "$mesg: $state" + } + + checkbutton .cb -text "Toggle" \ + -variable [scope state] \ + -command [code show_state "current state"] + + pack .cb + } + + In this example, the checkbutton is tied to the variable + "foo::state" and executes the command "foo::show_state" + whenever it is pressed. + + When a Tk widget uses commands and variables within a + namespace, these names should be wrapped up as scoped + values, as shown above. + + + variable name ?value? + Creates a variable called "name" and initializes it to an optional + value. This is normally used in conjunction with public, protected + and private commands to declare variables within a namespace: + + namespace foo { + public variable x 0 + private variable y 1 + } + + If the variable "name" already exists, it updated to have + the protection level that is currently active. + + + == Tk with Namespaces ================================================== + + bind... + + Recognizes and expands the following fields within command + strings: + + %q => Replaced with the fully-qualified access command + for the widget receiving the event. For example, + + namespace foo { + namespace bar { + button .b -text "Hello World!" + } + } + + The fully-qualified access command for this widget + is "::foo::bar::.b". The "%q" field should be used + instead of "%W" as the widget access command: + + bind Button <Key-Return> "%q flash; %q invoke" + + + %M => Replaced with the window path name of the mega-widget + containing the window receiving the event. For example, + if an "entryfield" mega-widget ".x" contains an entry + widget ".x.entry", bindings added to ".x.entry" will + replace "%M" with ".x". This allows generic bindings + to be added to component widgets which affect the + mega-widget as a whole. + + For this to work properly, mega-widget packages must + register their component widgets using Itk_SetMegaWidget(). + + + winfo command window + + Returns the fully-qualified access command for the widget "window". + This is equivalent to the "%q" field in bindings, and is useful + in procedures where the only the window name is known: + + foreach kid [winfo children $win] { + [winfo command $kid] configure -bg blue + } + + + winfo megawidget window + + Returns the window path name of the mega-widget containing "window" + as a component. This is equivalent to the "%M" field in bindings, + and is useful in procedures where only the component window name + is known. For this to work properly, mega-widget packages must + register their component widgets using Itk_SetMegaWidget(). + + + == [incr Tcl] ========================================================== + + delete class name ?name...? + + Deletes one or more object classes. Deleting a class also + causes all derived classes, and all objects belonging to the + class, to be deleted as well. + + + delete object name ?name...? + + Deletes one or more objects. If the access command for an + object resides in another namespace, then the full namespace + path should be used: + + delete object foo::bar::x + + + info classes ?pattern? + + Returns a list of all classes in the current namespace + whose names match an optional string pattern. + + + info objects ?-class className? ?-isa className? ?pattern? + + Returns a list of all objects whose names match an optional + string pattern. If the "-class" option is specified, then + the list is further restricted to those objects whose + most-specific class is "className". If the "-isa" option + is specified, then the list is further restricted to those + objects who belong to class "className". + + + itcl::class name { definition } + + Used to create define a new class "name". The "definition" + commands include: + + inherit baseClass ?baseClass...? + + constructor arglist ?init? body + destructor body + + method name ?arglist? ?body? + proc name ?arglist? ?body? + variable name ?init? ?config? + common name ?init? + + public command ?arg arg...? + protected command ?arg arg...? + private command ?arg arg...? + + Note that the constructor statement has changed to include an + optional "init" argument. This is an initialization statement + that can be used to call out base class constructors. If it + is not included, base classes are constructors are invoked + automatically without any arguments. + + The "variable" statement is now used to create object-specific + data members. The "common" statement is used to create "common" + variables, which are global within the class namespace. Both + types of variables can be designated public, protected or + private. + + + itcl::body class::func arglist body + + Used to define the body of a class member function outside of + the class definition. If "body" declarations are kept in a + separate file, they can be sourced again and again to test + changes as bugs are fixed. If an "arglist" is specified in + the class definition, then the "arglist" for the body definition + must have the same meaning. + + + itcl::configbody class::option body + + Similar to the "body" command, but used to define the configuration + code for a public variable. + + + itcl_class name { old-style-definition } \__ backward compatibility + itcl_info option ?arg arg...? / + + + == [incr Tk] =========================================================== + + itcl::class name { + ... + itk_option define -switch resName resClass initVal ?configCode? + } + + The "itk_option define" command is recognized at the level of + the class definition. It defines a new mega-widget option with + the given switch name and X11 resource database names. The + "initVal" is used as a last resort to initialize the option + if no other value can be queried from the X11 resource database. + If "configCode" is specified, it is executed whenever the option + is modified via the "configure" method. The "configCode" can + also be specified outside of the class definition via the + "itcl::configbody" command. + + + Methods provided by itk::Archetype base class: + + component + component name + component name command ?arg arg...? + + Used to query or access components within a mega-widget. With + no arguments, this returns a list of component widgets that + are accessible in the current scope. Note that component + widgets obey any public/protected/private access restriction + that is in force when the component is created. + + With one argument, this returns the window path name for a + component with the symbolic name "name". + + In any other case, the remaining arguments are invoked as a + method on the component with the symbolic name "name". + + + configure + configure option + configure option value ?-switch value...? + + Works just like the usual Tk configure method, but for mega-widgets. + Here options are really composite widget options. When set, they + trigger changes to many different internal components, and may + invoke many bits of "configCode" for options defined by "itk_option + define". However, there is only one value for the composite option. + + + cget option + + Works just like the usual Tk cget method, but for mega-widgets. + Returns the current value for a composite widget option. + + + itk_component add name {create-commands} ?{option-commands}? + + Adds a new mega-widget component with the symbolic name "name". + Invokes the "create-commands" to create the component, and + invokes "option-commands" to integrate its options into the + composite list. By default, no options are integrated. Options + may be added using the following commands: + + keep option ?option...? + ignore option ?option...? + rename oldswitch newswitch resname resclass + usual ?tag? + + + itk_component delete name ?name...? + + Deletes an existing mega-widget component with the symbolic + name "name". The component will still exist as a widget, + but it will no longer be accessible as a component for this + mega-widget. Any options associated with the component are + removed from the composite list. + + Note that you can destroy a component like any ordinary widget: + + destroy .foo.bar.b + + Components automatically detach themselves from their mega-widget + parent when destroyed, so "itk_component delete" is not used + very often. + + + itk_option add option ?option...? \__ class::option + itk_option remove option ?option...? / component.option + + Adds or removes an option from the composite option list for + a mega-widget. These commands cannot be used at the level of + the class definition; they must be invoked for a particular + mega-widget. They usually appear in the constructor for a + mega-widget class, to add or redefine options in components + created by a base class. For example, the base classes + itk::Toplevel and itk::Widget keep only the bare minimum + options for their "hull" component: -background and -cursor. + If you want your mega-widget to have a border around it, you + can add the hull options back in: + + itcl::class MyWidget { + inherit itk::Widget + + constructor {args} { + itk_option add hull.borderwidth hull.relief + } + } + + + itk_initialize ?option value option value...? + + Initializes the composite option list for a mega-widget. + This method should be invoked within the constructor for each + mega-widget class. It is usually included the end of the + constructor, below the component creation code. It integrates + all "itk_option" options defined in the current class into + the composite configuration list, and includes "-option value" + settings usually received as arguments to the constructor. + When this is executed in the most-specific class, it scans + through the composite option list and makes sure that all + options have been properly initialized. + + itk::usual tag ?commands? + + Used outside of a mega-widget class definition to declare + the "usual" option-handling commands for the mega-widget. + These commands suggest how the configuration options should + be handled if the mega-widget becomes a component of an even + larger mega-widget. They include commands like "keep" and + "rename". + + + INCOMPATIBLE CHANGES +-------------------------------------------------------------------------- + + >> Object construction/destruction now follows C++ model. + + In the previous release, object construction started at the + most-specific constructor. Base class constructors could + be called out explicitly within the body of a constructor. + If they were not, they were invoked implicitly when the + constructor finished executing. This led to a construction + model that was backward from C++, and contrary to what most + people expected. Destructors were backwards in a similar + manner. + + In the current release, object construction starts at the + least-specific class in the hierarchy, and proceeds to the + most-specific class. Therefore, each base class is fully + constructed before the derived class constructor is executed. + + Arguments are now passed to base class constructors through + an optional "initialization" statement. This statement is + included between the argument list and the body of the + constructor, so the syntax is reminiscent of C++: + + class Base { + constructor {x y} { + ...constructor body... + } + } + class Derived { + inherit Base + constructor {x y z} { + Base::constructor $x $y << "initialization" + } { + ...constructor body... + } + } + + Note that variables from the argument list (e.g., $x and $y) + can be referenced within the initialization statement. With + multiple inheritance, each of the base class constructors + can be called out individually. + + Object destruction is the exact opposite of construction. + It proceeds from most-specific to least-specific class. + + + >> All class methods are now implicitly virtual + + In the previous release, all method names were interpreted + with respect to the current class scope and its base classes. + If you wanted a method to act virtual, you had to explicitly + preface it with the "virtual" command each time you used it. + This proved to be error prone. + + In the new release, all methods are virtual by default. If + you invoke a method with a simple name, the most-specific + method with that name will be invoked, regardless of your + class scope: + + class Base { + constructor {} {show} + method show {} {puts "Base::show"} + } + class Derived { + inherit Base + constructor {} {show} + method show {} {puts "Derived::show"} + } + + The method "show" called out in the constructors for both of + these classes is virtual. When Base::constructor is executed + it finds the most-specific "show" method and prints + "Derived::show". When Derived::constructor is executed, it + finds the most-specific "show" method and prints "Derived::show" + again. + + If you want to invoke a particular method, you have to scope + it explicity: + + class Base { + constructor {} {Base::show} + method show {} {puts "Base::show"} + } + class Derived { + inherit Base + constructor {} {Derived::show} + method show {} {puts "Derived::show"} + } + + + >> Within class methods/procs the "global" command now refers to + variables within the class namespace. + + In the previous release, the "global" command was used to + access variables at the global scope. The "global" command + now refers to variables that are "global" within the current + namespace context. Within the scope of a class, this refers + to "global" class variables. Note that common data members + are global variables, but they can be accessed transparently, + without any special "global" declaration. You can also create + ordinary global variables within a class, but you will have to + declare them each time they are used with a "global" statement. + The new scheme will allow classes to have their own private + global variables (e.g., for interacting with widgets) without + flooding the global namespace. + + If you really want to access a variable at the "::" global + scope, use its complete path name: + + itcl::class Foo { + method getenv {name} { + global ::env + return $env($name) + } + } + + + >> "this" variable used to be included in every class scope + + In the previous release, each class scope included a separate + "this" variable containing the object name. There is now only + one "this" variable, kept in the most-specific class scope. + It can still be referenced as if it belongs to all classes, + e.g., "Base::this", "Derived::this". + + This change is probably not important to most applications. + But it did break my test suite, which expected to find many + different "this" variables coming back from the "info" command. + + + >> "this" variable now contains complete namespace path for the + object access command + + This change will break many scripts written for mega-widgets. + In the previous release, mega-widgets had a window name and an + access command name that were interchangeable. For example, + you would create a widget ".dialog" and configure it using + the ".dialog" command. Inside of this widget there was a + "this" variable containing the name ".dialog". + + In the current release, an object can exist in any namespace, + so the complete namespace path is a part of the object's + identity. Instead of just ".dialog", the "this" variable will + now contain a name like "::.dialog" or "::foo::.dialog". But + the window name is still just ".dialog". + + Scripts that used to use "$this" as a window name: + + wm title $this "Dialog" + + must now use the [incr Tk] "hull" component instead: + + wm title $itk_component(hull) "Dialog" + + If for some other reason you need the simple object name at the + end of the namespace path, you can get at it using the + "info namespace tail" command: + + set oldthis [info namespace tail $this] + + + >> "#auto" generated names now start with lower-case letter + + In the previous release, "#auto" could be used in place of + an object name to produce an automatically generated name: + + Toaster #auto -heat light + + The names were generated by adding a unique number onto the + class name: "Toaster0", "Toaster1", etc. + + The current release supports the same functionality, except + that the names generated are guaranteed to start with a + lowercase letter: "toaster0", "toaster1", etc. This helps + out in the mega-widget arena, where window names must start + with lowercase letters. + + + >> "config" argument used to allow multiple default values + + The magic "config" argument used to allow multiple default + values, which were simply concatenated into a single value + before processing. For example, in the previous release + you could say: + + itcl_class Foo { + method test {x y {config -foo 0 -bar 0}} { + ... + } + } + + and if the "test" method was used without extra configuration + arguments, they would default to "-foo 0 -bar 0". + + In the current release, you must make the default value for + a "config" argument a single string: + + itcl::class Foo { + method test {x y {config "-foo 0 -bar 0"}} { + ... + } + } + + >> "info class" now acts "virtual" + + In the previous release, the "info class" command would report + the current class context. In a base class method, it would + report the base class name, and in a derived class method, it + would report the derived class name. If you wanted to know + the most-specific class for an object, you would have to use + the "virtual" command explicitly: + + itcl_class Base { + method whatAmI {} { + return [virtual info class] + } + } + + The "info" command is now virtual by default, as long as an + object context is present. This means that you can drop the + "virtual" command: + + itcl::class Base { + method whatAmI {} { + return [info class] + } + } + + If you really want to know the current class scope, use the + "info context" command instead to query the current namespace + context. + + If an object context is not present (i.e., in the body of a + common class "proc"), the "info class" command reverts to + the current class context, the same as the "info context" command. + + + >> Library procedures "itcl_unload" and "itcl_reload" have been removed + + In the previous release, the library procedure "itcl_unload" + provided a way of deleting a class. You can now do the same + thing using the "delete class" command: + + delete class Toaster + + This deletes the specified class, all derived classes, and all + objects belonging to this class. If autoloading is set up, + you can reload a deleted class just by invoking its name. + The old "itcl_reload" function is now trivial: + + proc itcl_reload {class} { + delete class $class + $class + } + + + >> Class definition no longer recognizes ordinary Tcl commands. + + As an undocumented "feature" of the previous release, you could + include ordinary Tcl commands in the body of your class definition. + For example: + + itcl_class Foo { + ... + if {$somevar} { + public foo + } + } + + In the new release, only class definition commands are allowed + within the body of a class definition. You can, however, use Tcl + commands outside of the class definition to modify the class + definition as a string, and then define the class: + + set defn { + method test {} {return "test"} + } + if {$somevar} { + append defn "public variable foo" + } + class Foo $defn + + + IMPROVEMENTS +-------------------------------------------------------------------------- + + >> an object can be renamed by renaming its access command + + In the previous release, an object's identity was fixed when + it was created. In the new release, the object is tied + directly to its access command. If you rename the access + command, you have renamed the object. The "this" variable + automatically keeps in sync with name changes. If you delete + the access command, you automatically delete the object. + + Toaster new -heat light + rename new fred << rename Toaster + fred toast 2 + fred toast 1 + rename fred "" << delete Toaster + + + >> Bodies of methods, procs and public variables can be defined + outside of the class definition, and can be redefined on the fly. + + In the previous release, all of the code related to a class was + defined within the class definition. This kept everything + together in one place, but it made it difficult to get an overview + of the class interface. + + In the new release, bodies can be defined outside of the class + definition, perhaps in a separate file. When debugging, the + implementations can be fixed and sourced again and again, without + having to delete existing objects and classes. + + Use the "itcl::body" command to redefine the body of a class + method or proc. Use "itcl::configbody" to redefine the configuration + code associated with a public variable. For example: + + itcl::class Toaster { + constructor {args} { + eval configure $args + } + destructor { + if {$crumbs > 0} { + error "cannot destroy dirty toaster: clean first" + } + } + + method toast {nslices} + method clean {} + + public variable heat 3 + protected variable crumbs 0 + } + + itcl::body Toaster::toast {nslices} { + if {$nslices < 1 || $nslices > 2} { + error "bad number of slices: should be 1 or 2" + } + set crumbs [expr $crumbs+$heat*$nslices] + if {$crumbs >= 50} { + puts stderr "== FIRE! FIRE! ==" + } + } + + itcl::body Toaster::clean {} { + set crumbs 0 + } + + itcl::configbody Toaster::heat { + if {$heat < 1 || $heat > 5} { + error "invalid setting \"$heat\": should be 1-5" + } + } + + If an argument list is specified in the class definition, then + the same argument list must be used when the implementation is + redefined. The variable names can change, but the meaning of + the arguments must be the same. If you leave the argument + list out of the class definition, or if you include the "args" + argument, the argument list can change. + + + >> C procedures can be integrated into class definitions + + Any method body that is specified as "@symbol" is treated as a + reference to a C procedure with the symbolic name "symbol". + Symbolic names are established by registering C procedures + via the Itcl_RegisterC() procedure. This is usually done + when the interpreter starts up in the Tcl_AppInit() procedure: + + if (Itcl_RegisterC(interp, "foo", My_FooCmd) != TCL_OK) { + return TCL_ERROR; + } + + This registers a procedure My_FooCmd() with the symbolic name + "foo". It can be used as the implementation for a class method, + proc, or bit of configuration code simply by specifying "@foo" + in place of the Tcl code body. + + These C procedures are just like ordinary Tcl command handlers. + They take the usual arguments: + + int My_FooCmd(ClientData cdata, Tcl_Interp *interp, + int argc, char** argv) + { + ... + return TCL_OK; + } + + including the (argc,argv) arguments from the command line. But + before these procedures are invoked, the proper class scope is + established so that object data members can be accessed as if + they were ordinary variables via Tcl_GetVar() and Tcl_SetVar(). + + Look at the [incr Tk] base class itk::Archetype as an example + for integrating C code. + + + >> "#auto" can be buried within an object name: ".x.y.z.#auto" + + In the previous release, "#auto" was a keyword that could be + used in place of an object name. It can now be used as a + part of the object name, making it easier to generate automatic + names for mega-widgets. + + + >> Every object now has built-in "configure" and "cget" methods + that follow the Tk paradigm. For [incr Tk] widgets, they follow + the paradigm exactly. The ordinary [incr Tcl] objects, the + X11 resource values are missing. + + + >> There is no longer a built-in "delete" method, so classes can + define their own "delete" operations. + + Instead of "objName delete", use the new "delete object" command: + + Toaster fred -heat dark + delete object fred + + + >> All data members can be declared public, protected or private. + + Private data members can only be accessed in the class where + they are defined. Protected data members can be accessed in + the defining class and all derived classes. Public data members + can be accessed like protected data members, but are also + recognized as configuration options by the built-in "configure" + and "cget" methods. + + + >> In [incr Tk], options are now defined outside of the constructor, + at the level of the class definition. + + + >> In [incr Tk], configuration options belonging to components + created in a base class can be added or removed in derived + classes. + + The base classes "itk::Toplevel" and "itk::Widget" are now stripped + down to the bare minimum options. For example, if you want to add + "-width" and "-height" options for the hull component, do this using + the "itk_option" command in the body of the constructor: + + class MyWidget { + inherit itk::Widget + + constructor {args} { + itk_option add hull.widget hull.height + ... + } + } + + Options can be added and removed on-the-fly during normal operation, + but this is not recommended, since it could lead to a confusing + interface. + + + >> In [incr Tk], components can now be added or removed on-the-fly. + + The "itk_component" method now supports "add" and "delete" + operations that are used to add/delete components. + + + >> All [incr Tk] widgets can be destroyed like normal Tk widgets. + + If you destroy a component widget, for example, it will automatically + remove itself from its parent via "itk_component delete". Likewise, + when a parent widget is destroyed, it will automatically destroy + all component widgets. + + + >> In [incr Tk], the "itk::Archetype::component" method now provides + access to mega-widget components. + + In the previous [incr Tk] prototype, the "component" method had + a different syntax and only supported query operations. You can + now access an internal component via the "component" method using + its symbolic name: + + .dialog component hull configure -width 450 -height 500 + + This example accesses the "hull" component of the ".dialog" + mega-widget, and sets the width and height options. + +========================================================================== + ---------------------- RELEASE 2.0beta - 9/6/95 ------------------------ +========================================================================== + +9/8/95 (bug fix) + Fixed menus to work properly within namespaces. Menu library code + now recognizes the proper namespace context for all "-menu" options. + +9/8/95 (new feature) + Added "winfo command name" option to report the scoped access command + for a given window. + +9/8/95 (configuration changes) + - fixed "sed" invocation in iwidgets Makefile + - added configuration guesses for Tadpole Sparcbook + - added George Howlett's test for "gcc", so that "-fwritable-strings" + is added even if gcc is masquerading as "cc" + - fixed tcl/tk configure scripts to have default prefix "/usr/local/itcl" + or wherever itclsh/itkwish is installed + - fixed makefiles to use $(MAKE) instead of "make" + +9/9/95 (bug fix) + Protected references to obj->accessCmd to avoid seg faults when + an object is being destroyed. + +9/9/95 (new features) + Changed the syntax of the "namespace" command: + + namespace name ?-local? ?-hidden val? ?-enforced val? ?--? ?commands? + + Flags now follow the namespace name, and the "commands" body is + optional. The "-hidden" option allows a namespace to be hidden + during "info namespace all" queries. The "-enforced" option turns + command/variable enforcement on or off. + + Update "info namespaces all" command to allow for display of hidden + namespaces: info namespaces all ?-hidden? ?pattern? + +9/10/95 (bug fix) + Fixed "auto_mkindex" to work properly for procs defined within + namespaces. Added support for itcl::class, itcl::body and + itcl::configbody as well. Added tests for tclIndex file generation. + +9/11/95 (configuration changes) + Fixed makefiles to reference sources and libraries properly, so + it should be possible to build different object trees for + different platforms with "gmake". + +9/13/95 (configuration changes) + Added "AC_C_CROSS" to configure files, so configuration should work + properly on Solaris 2.4. + +9/13/95 (bug fix) + Changed option configuration to work synchronously, and added + "itk_initialize" command to initialize the configuration options + for each mega-widget class. The original behavior of handling + option changes via "do-when-idle" has been removed. + +9/13/95 (bug fix) + Changed all structure members called "namespace" to "namesp". + This allows the code to compile correctly under C++. + +9/13/95 (configuration changes) + - added support for "i[34]86:BSD/OS" in "config/config.guess" + - fixed "test" target for iwidgets + +9/13/95 (bug fix) + Fixed "global" command and other places where namespace paths + are parsed to allow for a single ":" in command/variable names. + +9/13/95 (bug fix) + Fixed a problem which caused class-based options to be lost when + a widget class was defined within a proc. + +9/14/95 (bug fix) + Fixed class access command so that when it is deleted, it + automatically destroys the class. This also fixed a seg fault + that occurred when an object's access command stomped on the + class access command. + +9/14/95 (enhancement) + Fixed "scope" command and the @scope facility so that null strings + can be passed around without all of the extra scoping info. + +========================================================================== + ----------------------- RELEASE 2.0b2 - 9/14/95 ------------------------ +========================================================================== + +9/15/95 (enhancement) + Changed error messages reported when a class method/proc gets the + wrong number of arguments to report the usage information, like: + {wrong # args: should be "obj foo x y ?arg arg...?"} + +9/18/95 (bug fix) + Fixed a seg fault that occurred when the "cget" method was called + with no args. + +9/18/95 (bug fix) + Fixed a bug that caused private variables in a base class to be + uninitialized, even if an initial value was specified in the + class definition. + +9/22/95 (configuration changes) + Added the "SHELL=/bin/sh" statement to the main makefile. This + fixes build problems on SGI machines. + +10/9/95 (paradigm shift) + Removed the implicit scoping from any facility that takes a command + or variable name. Implicit scoping made it difficult to pass a + command string or variable name into a wrapper proc and yet preserve + the scope that it came from. All scoping is now explicit. All + commands and variables are interpreted in the global "::" scope + unless they are wrapped in an "@scope" declaration. Commands can + be wrapped up like this: + + button .b -text "Push Me" -command [code .b configure -bg red] + + Variable names can be wrapped up like this: + + radiobutton .rb1 -text "Choice #1" -variable [scope mode] -value 1 + + The "code" and "scope" commands wrap up strings with an "@scope" + specification which preserves the namespace context. + +10/17/95 (paradigm shift) + Changed the "%C" option of the "bind" command to return a scoped + command of the form "@scope namespace widget" that can be used to + access the widget. "%C" should be used instead of the usual "%W" + window name when attempting to access the widget. Bindings should + be written like this: + + bind Entry <FocusIn> {%C configure -bg white} + bind Entry <FocusOut> {%C configure -bg gray} + + The command "%C" can be used to access the widget regardless which + namespace it belongs to. + +10/31/95 (enhancement) + Fixed "unknown" command to support a general facility for adding + unknown command handlers. The "unknown_handler" proc is used to + register new handlers. Each time an unknown command is encountered, + each of the handlers is invoked to attempt to handle the command. + If a handler returns "-code continue", control passes to the next + handler on the list. Handlers are invoked in the order opposite to + the way they were registered. Extensions can use this facility to + add their own handlers into the "unknown" scheme. + +11/7/95 (enhancement) + Added a "backward-compatibility" mode to [incr Tcl]. By default, + widget names can now be used as access commands in any namespace, + even if the widget access command exists in another namespace. + This emulates the normal Tk behavior that widgets are global resources + in the application that can be accessed anywhere. This behavior can + be disabled by setting the global variable "itcl_purist" to "1". When + this variable is set non-zero, care must be used to use "%C" or + "[winfo command %W]" as an access command when the widget is used + outside of the namespace that contains it. From the standpoint of + the object-oriented paradigm, the "purist" mode is better since it + supports encapsulation. The "backward-compatible" mode, however, + allows [incr Tcl] to work better with existing Tk applications and + extensions. + +11/22/95 (bug fix and enhancement) + Fixed the built-in "info" command for classes to include the "info + classes" and "info objects" queries. These were initially overlooked + in a hard-wired list of "info" queries. + + Fixed the ensemble facility in general to support unknown options + via an "@error" handler. Any option registered with the name "@error" + is treated as an error handler for the ensemble. Arguments passed + to the option include the ensemble name, the unknown option, and all + remaining arguments. For the built-in "info" command, the "@error" + handler passes any unknown options to the usual Tcl "info" command, + so all of the standard options are automatically available. + +11/23/95 (bug fix) + Fixed usual tkerror dialog to truncate error messages at 5 lines. + The usage information returned by an ensemble or itcl object can + be much longer, causing the "Stack Trace" button to get lost in + many cases. + +11/27/95 (bug fix) + Removed the constructor/destructor from the list of public methods + returned as usage information when an unknown method is encountered + on an object. + +12/2/95 (bug fix) + Fixed error reporting for object construction. Used to say + something like "object constructor x y z" which made it look + like a method invocation. Now says "class object x y z" which + looks more like the call that the user made to trigger the error. + +12/4/95 (bug fix) + Fixed class creation and object creation to avoid clobbering + existing commands with new class/object access commands. This + prevents all hell from breaking loose when a command like + "class set {...}" is invoked. + +12/6/95 (configuration changes) + Fixed parsing of namespace paths to use local storage instead of + assuming that strings are writable. This means that the + "-fwritable-strings" option is no longer necessary for GCC and + other compilers that store static strings in the program text + segment. This option has been removed from all "configure.in" + files. Linux users will no longer see core dumps on start-up. + +12/8/95 (bug fix) + Fixed "upvar" so that class data members can be accessed from + another calling procedure. This fixed a problem with using + "parray" from within class methods. + +12/9/95 (bug fix) + Fixed "@scope" variable references so that variables can be created + using "@scope" in any context and referenced later. + +12/9/95 (feature change) + Removed "-hidden" option from namespaces. It seemed to complicated + and quirky to explain on the man page. Instead, all parser + namespaces like "scope-parser" and "mkindex-parser" are grouped + into a "::tcl" namespace. This keeps them somewhat hidden even + without any special treatment. + +12/9/95 (minor enhancement) + Added "array" command to class definition parser, so it can be + used along with "set" to initialize common arrays. + +12/10/95 (paradigm shift) + Removed the "%C" pattern from the expansions recognized by the + "bind" command, in favor of the following scheme: + %W ........ name of widget receiving event + %M ........ name of mega-widget containing widget receiving event + %q ........ fully-qualified command name of widget receiving event + %Q ........ fully-qualified command name of mega-widget receiving event + Fixed "winfo command" to return the fully-qualified command name of + a widget (instead of a scoped access command) to be consistent with + the "%q" bind pattern. + +12/10/95 (bug fix) + Fixed Tk library code to use "%q" and "winfo command", so that the + default widget behaviors will work even in "itcl_purist" mode. + +12/11/95 (minor enhancement) + Added "winfo megawidget" query, which will return the name of the + mega-widget containing a specified component widget. In order for + this to work, a mega-widget package must use the procedure + Itcl_SetMegaWidget() to register each component as it is added + to a mega-widget. + +12/12/95 (bug fix) + Fixed Archetype base class to keep all options sorted in alphabetical + order. This way they can be reported back by the "configure" method + in alphabetical order. Options are now initialized by "itk_initialize" + in alphabetical order as well. + +12/12/95 (bug fix) + Fixed the Archetype base class to register each component widget with + Tk via Itk_SetMegaWidget(). This means that "winfo megawidget" and + "%Q" can be used to reference the containing mega-widget for any component. + +12/12/95 (bug fix) + Fixed the "configure" method in the Archetype base class so that when + an error is encountered while setting a configuration option, the option + is set back to its previous value. + +12/12/95 (bug fix) + Fixed the "itk_component add" method to find access commands for + components even if they are created in the global scope. Components + that are meant to be shared can be created using "uplevel #0". The + access command for this component will be installed in the global scope, + and therefore available to all other namespaces. + + Syntactic sugar like a "-global" option would be nice, but references + like $itk_component(...) must be substituted in the calling scope, and + it is not possible to get these properly substituted and still maintain + the boundaries around arguments. + +12/12/95 (bug fix) + Fixed Archetype base class to handle public/protected/private components + properly. The usual public/protected/private commands can be used in + conjunction with "itk_component add" to set the protection level of a + component. The protection level affects the action of the "component" + method. Public components are reported in any namespace, and are + accessible from any namespace. Protected components are accessible + within a base class and derived classes. Private components are + accessible only within the class where they are defined. This feature + can be used to keep unimportant components (such as frames) off of the + component list that a client would see. + +12/13/95 (enhancement) + Added "usual" and "ignore" commands for processing component widget + configuration options. The "usual" command finds the usual code fragment + for the widget class of the component, and executes it. The command + "itk::usual" can be used to register option code for new widget classes. + + The "ignore" command can be used to override previous "keep" and "rename" + commands. This is useful for removing options that the "usual" code + keeps or renames. + + Fixed the "itk_component add" command so that if the option handling code + is not specified, the "usual" command is invoked automatically. + +12/13/95 (bug fix) + Fixed the Archetype base class to handle the immutable Tk options + properly. Options like -class, -colormap, -screen and -visual can only + be set at creation time. The itk_option array is now properly + initialized to report their creation value. + +12/14/95 (bug fix) + Fixed "itk_option add" command to report errors properly for unknown + options. + +12/14/95 (bug fix) + Fixed "body" command to report errors properly for unknown functions. + +12/14/95 (bug fix) + Fixed a bug in the handling of TCL_GLOBAL_ONLY flag when looking up + class variables. Previously, this was ignored, so object-specific + variables could be accessed in a "global" context by Tk widgets. + This caused some strange behavior when object-specific variables + were used in conjunction with widget options like "-textvariable". + Tk widgets now properly interact with classes via global variables. + +12/14/95 (bug fix) + Fixed "auto_mkindex" to recognize procs within class definitions and + add them to the "tclIndex" file. + +12/15/95 (bug fix) + Fixed "body" command to find functions only in the specified class. + The bug caused a base class method to be redefined whenever a "body" + command was issued for a derived class if the method was not declared + in the derived class. Made a corresponding fix to the "configbody" + command for public variables. + +12/15/95 (enhancement) + Added the following commands to the class definition parser: bind, + scope and code. This allows generic class bindings to be included + in the body of a class definition. + +12/15/95 (enhancement) + Added "-clientdata" option in itk::Archetype base class so that + all widgets will have an extra field for client data. For application + developers, this may come in handy. + +12/16/95 (bug fix) + Fixed the itk::Archetype base class so that if "itk_option add" or + "itk_option remove" is called for ordinary class-based options before + "itk_initialize" (which normally integrates them in) it does not cause + a problem. + +12/17/95 (bug fix) + Fixed namespace resolution so that a command/variable with a + specific path like "itk::body" will not be found in another + imported namespace. For the import list to be followed, the + command name must be generic like "body". + +12/19/95 (configuration changes) + Changed from generic directories like "tcl" and "tk" to directory + names with version numbers like "tcl7.4" and "tk4.0". + +12/19/95 (bug fix) + Changed names like "itcl_library" and "itcl_purist" to "itcl::library" + and "itcl::purist". This makes more sense in the documentation, since + the underbar stuff is no longer needed with namespaces, and extension + writers are discouraged from using it. + +12/21/95 (bug fix) + Changed handling of argument lists for functions with Tcl or C + implementations. All argument lists are now treated as Tcl + argument specifications. For Tcl implementations, this determines + what arguments are available in the body of the procedure; for C + implementations, this merely gives the intended usage information + for the function (the C implementation may choose to ignore this + and do something else). This fix makes it easier to override + C implementations with Tcl procedure bodies. + +12/25/95 (bug fix) + Split the usual TCL_GLOBAL_ONLY flag into two meanings: TCL_GLOBAL_ONLY + now means "a global variable in the global namespace", and ITCL_GLOBAL_VAR + means "a global variable in the current namespace". This enhancement + fixes Tk (and many other extensions) which request global variables. + A plain variable name together with TCL_GLOBAL_ONLY is now interpreted + as an ordinary Tcl global variable, so the behavior is backward-compatible. + A scoped variable reference will work properly with namespaces. If + extension writers get more ambitious, they can start using the + ITCL_GLOBAL_VAR flag, which will make their extensions namespace-friendly. + +12/26/95 (bug fix) + Fixed "@scope" command so that extra arguments added at the end are + kept as proper list elements when added to the command string. This + makes sure that boundaries around Tcl words are not lost when the + scoped command is interpreted. + +12/28/95 (minor enhancement) + Added "config" method to the Archetype base class as an alias for + the usual "configure" method. Many Tk applications use "config" + as an abbreviation for "configure", so this fix improves compatibility + with other packages. + +12/28/95 (bug fix) + Fixed Itcl_SaveInterpState() and Itcl_RestoreInterpState() to + properly save/restore the interp state even for commands like + Tcl_SetCmd(), which are sloppy about setting the interpreter + result. This fixed bad memory references that were encountered + in enforced namespaces. + +12/28/95 (bug fix) + Fixed Itcl_DeleteNamesp() to allow variable traces to be fired + off properly when a namespace is destroyed. + +12/30/95 (bug fix) + Fixed the Archetype base class to do the "ignore" operation + properly for mega-widget options. A bug was causing a single + "ignore" request not only to eliminate the desired option, but + to eliminate options that were renamed to the "ignore" name + as well. + +========================================================================== + ------------------------ RELEASE 2.0 - 12/31/95 ------------------------ +========================================================================== + +1/2/96 (cleanup) + Fixed some compiler warnings reported by Christopher Hylands + (cxh@EECS.Berkeley.EDU) + +1/4/96 (cleanup) + Fixed the description of the last test in itk/tests/option.test. + +1/4/96 (cleanup) + Fixed code examples in man pages. Lines starting with "." now + start with the null character "\&", to avoid errors with troff. + +1/5/96 (bug fix) + Fixed a bug in tkMenuUnpost. Popup menus associated with something + other than a menubutton can now be unposted properly. + +1/10/96 (bug fix) + If an error occurs during construction, all destructors are now + invoked--even if an error is encountered. All destructor errors + are completely ignored. This fixed a core dump reported by + Christopher Hylands (cxh@EECS.Berkeley.EDU). + +2/5/96 (cleanup) + Fixed memory leaks reported by Forest Rouse (rouse@flash.icemcfd.com). + Also fixed a problem in Itcl_DeleteNamesp() with the way that + the variable cache was destroyed. This caused a core dump on Solaris + systems when a namespace was deleted. + +2/8/96 (cleanup) + Fixed itk tests to ignore any resources that the user might have + on the desktop (e.g., *background: red) + +2/11/96 (bug fix) + Fixed auto_mkindex so that the "proc" command accepts arglist and + body as optional arguments. Within class definitions, these + parameters may not be specified. Also, fixed the "source" command + so that it is ignored within the file being indexed. Otherwise, + it brought in program elements that confused the index. + +2/15/96 (bug fix) + Fixed the unknown command to save errorInfo and restore it before + invoking each handler. This fixed an irritating bug that caused + the first error message to be lost as "tkerror" was autoloaded. + +2/20/96 (bug fix) + Fixed a bug in variable lookup that allowed private/protected + variables to be set from outside the normal context. On initial + lookup variables were being passed over, but since they did not + appear to exist, they were being created. Variables are now + protected from being set or redeclared from an improper context. + +3/1/96 (enhancement) + Changed namespaces to import from their parent in "protected" + mode instead of "public" mode. This is a better default, since + it emphasizes the strong relationship between a parent and a + child. They can share variables that are hidden from anyone else. + +3/5/96 (bug fix) + Fixed the "info objects" to autoload any classes referenced by + "-isa" or "-class" that are not yet defined. + +3/12/96 (enhancement) + Fixed class parser to recognize commands at the global scope. + This makes it possible to embed normal Tcl commands like an + "if" statement within a class definition. It also makes it + easy to extend the class parser by defining procs in the + ::itcl::parser namespace. + +3/17/96 (enhancement) + Fixed "usual" command so that with no arguments, it returns a + list of all known tags. Each tag name can be used to query its + associated code. + +3/19/96 (enhancement) + Fixed the "configure" method for mega-widgets to include public + variables as configuration options. Normally, mega-widget + classes use "itk_option define" to define configuration options. + However, if a mega-widget includes an ordinary itcl class as + a base class, it should provide access to the base class options. + Public variables are now integrated into the composite option + list by "itk_initialize". + +4/2/96 (enhancement) + Added a "chain" command to the built-ins available in each class. + A command like "chain 1 2 3" invokes the next implementation of + the current method/proc found looking up the inheritance hierarchy + toward base classes. This can be used to invoke a base class method + in a generic way, without hard-coding the base class name. + +4/10/96 (bug fix) + Fixed "configure" operation for mega-widgets. Previously, if an + error was encountered during configuration, the value in itk_option + was set back to the previous value, but some parts of the mega-widget + might be left in a partially configured state. Now, if an error is + encountered and the option is set back to its previous value, the + change is propagated down to all parts, so the widget remains in a + consistent state. + +4/15/96 (bug fix) + Fixed a bug reported by Karel Zuiderveld (karel.zuiderveld@cv.ruu.nl) + related to virtual method selection in "itcl_methods.c". If for some + reason a method name was not found in the virtual table, the table + access caused a core dump. This is now fixed. + +5/13/96 (bug fix) + Fixed "itk_initialize" to recognize errors when executing the "config" + code associated with configuration options. Any error immediately + causes itk_initialize to abort, which usually aborts construction. + +5/13/96 (bug fix) + Fixed a bug in Itcl_SaveInterpState() and Itcl_RestoreInterpState() + which caused error information to get lost during object construction + when errors were encountered. The new iPtr->appendResult buffer was + being ignored, and results in this buffer were getting lost. + +6/1/96 (bug fix) + Changed the internal Interp and TkWindow data structures so that all + of the extra [incr Tcl] data members are at the bottom of the structure. + This should prevent errors when modules that have been compiled against + vanilla Tcl/Tk are dynamically loaded into [incr Tcl]. + +6/12/96 (enhancement) + Integrated changes for "itcl2.0+3" release by Karel Zuiderveld, + Jan Nijtmans and Vince Darley. This added support for tcl7.5/tk4.1, + dynamic loading, canvas improvements, and support for Macintosh + environments. Many thanks to these guys for all of their hard + work! + +6/22/96 (installation) + Changed the way things are installed: + - the startup file "init.itcl" is now called "itcl.tcl" + - the startup file "init.itk" is now called "itk.tcl" + - libraries, include files and man pages are now installed under + a special "itcl" directory to avoid conflicts with a vanilla + Tcl/Tk installation. For example, if your --prefix is set + to /usr/local, things would be installed as follows: + + /usr/local/bin ............ executables: + ish = tclsh with namespaces + iwish = wish with namespaces + itclwish = tclsh with namespaces and classes + itkwish = wish with namespaces and classes + + /usr/local/include/itcl ... include files + /usr/local/lib/itcl ....... libraries + /usr/local/man/itcl ....... manual pages + +6/24/96 (bug fix) + Fixed "itkwish" so that it requires the Iwidgets package automatically + during initialization. For all other shells, you must specifically + request Iwidgets with a statement like "package require Iwidgets" + +6/26/96 (bug fix) + Fixed Tk_CanvasTagsParseProc to avoid dumping core when an item + is configured with a null tag string. + +6/26/96 (bug fix) + Fixed PolygonToPoint() in tkCanvPoly.c so that invisible polygons + (with no outline and no fill) are still considered when picking + the closest item. Without this fix, programs like the "floor plan" + in the Tk widget demo will not work. + +6/26/96 (bug fix) + Fixed the [incr Widgets] "feedback" widget to do a full update on + each step. Without this, changes appear from time to time, but + the bar does not grow smoothly. + +6/26/96 (bug fix) + Fixed fileselectiondialog and fileselectionbox to update directory + list properly when "-directory" option is configured. + +6/28/96 (bug fix) + Fixed "itk_option define" to properly preserve a "config" code + body so that it can be released if it is redefined later. + +========================================================================== + ------------------------ RELEASE 2.1 - 6/28/96 ------------------------- +========================================================================== + +7/22/96 (bug fix) + Fixed C-level variable access so flags like ITCL_FIND_LOCAL_ONLY + can be passed into Tcl_GetVar() and Tcl_SetVar(). + +7/25/96 (bug fix) + Fixed the "notebook" widget in the [incr Widgets] set. The "index" + method now supports pattern matching and index names with spaces in + them. + +8/1/96 (bug fix) + Fixed destructor invocation so that if an object is being + destructed and you try to delete it again, it will report an + error. + +8/7/96 (bug fix) + Fixed the "inherit" command to make sure all names are really + valid classes. Previously, trying to inherit from a proc would + dump core. + +8/29/96 (enhancement) + Integrated with itcl2.1+2 (tcl7.5p1/tk4.1p1). + +9/1/96 (bug fix) + Fixed the Itcl_RegisterC() procedure so that the same name can be + registered more than once, as long as it has the same function + pointer. + +9/7/96 (bug fix) + Fixed a bug in method access for protected methods. There was a + problem when a base class defined a method, and a derived class + overloaded the method, and the method was accessed from the base + class namespace. Added function Itcl_CanAccessMethod() to check + for overloaded methods and allow access accordingly. + +9/13/96 (bug fix) + Fixed the Itcl_RestoreInterpState() procedure so that the "errorCode" + variable is restored properly. There was a problem when the + error code contained a list of elements. + +9/20/96 (bug fix) + Fixed a bug in the way namespaces were deleted. The hash table of + child namespaces was being traversed while elements within it were + being deleted. This caused a core dump when you tried to exit + the application with a command like "destroy .". + +9/28/96 (bug fix) + Fixed the way that errors are reported when a base class is constructed + with the wrong arguments. Previously, the error message showed the + object creation command like "wrong # args: should be Foo name val1 val2". + Now, it shows the base class constructor name, so it is more obvious + where the error is coming from. + +10/5/96 (bug fix) + Fixed a bug in constructor invocations. All base class constructors + are now invoked properly, even if a derived class does not have a + constructor. + +10/9/96 (enhancement) + Added proper support for safe interpreters. You can now use namespace + commands in a safe interpreter, and you can load Itcl as a safe package. + +10/11/96 (bug fix) + Fixed a core dump with "namespace foo {info locals}". The namespace + call frame was not being set up properly, so the local variable table + was garbage. Normally, you don't access local variables at the + namespace level. But now it is fixed. + +10/14/96 (bug fix) + Fixed the Itcl_RegisterC() procedure so that each interpreter has + its own list of symbolic function names. This avoids global data + and makes more sense for people using multiple interpreters. + +10/20/96 (bug fix) + Fixed variable lookup so that when you try to access a variable + like "::foo::x" inside of a procedure, you get an error instead + of a local variable named "::foo::x". Variables like this need + to be declared global. + +10/22/96 (enhancement) + Fixed the built-in "isa" method to autoload class definitions as + needed for each "isa" test. If a class is not defined and cannot + be autoloaded, it is an error. + +10/26/96 (enhancement) + Fixed "delete object" command so that objects can be deleted + using scoped values for the object name. + +10/29/96 (enhancement) + Integrated with itcl2.1+5 (tcl7.6/tk4.2). + +11/1/96 (porting) + Removed "plus" and "dash" patches to allow for porting to Windows95 + and Macintosh platforms. Simplified configuration and makefiles + for Unix platforms. + +11/4/96 (installation) + Fixed configuration and makefiles to support building in a + separate directory. There is a bug in "autoconf" which prevents + this from going smoothly. You have to copy all of the configure + scripts to a separate tree (e.g., using a tar file), and then build. + +11/5/96 (bug fix) + Fixed a bug in the way variables were reported by the built-in + "info" command for classes and objects. Private variables in + a base class were incorrectly reported as "<undefined>". They + are now reported properly. + +11/10/96 (bug fix) + Fixed the "this" variable so that if an object is deleted while it + is still in use, its name is properly reported as the null string. + +11/10/96 (bug fix) + Fixed the way namespaces are deleted so that the "::errorInfo" and + "::errorCode" variables remain intact until everything else has been + destroyed. These variables are needed if any errors are encountered + as an interpreter is being destroyed. + +11/11/96 (installation) + Split the "itclConfig.sh" file into separate "itclConfig.sh" and + "itkConfig.sh" files. + +11/11/96 (installation) + Fixed the package installation to conform to tcl7.6/tk4.2. The + pkgIndex.tcl files are now stored in the library directory for + each package. + +11/13/96 (enhancement) + Overhauled the scrolledcanvas widget. It is now about an order of + magnitude faster. + +11/14/96 (enhancement) + Overhauled the [incr Widgets] "catalog" demo. When you pick any + mega-widget class, the demo displays an example widget, the code + used to build it, the class hierarchy, and the man page. + +11/23/96 (bug fix) + Fixed the way the "inherit" command autoloads class definitions. + Previously, it invoked the class name as a command. Now, it uses + the "auto_load" command. + +11/23/96 (installation) + Fixed the "configure" files to use "mkinstalldirs" instead of "mkdir" + so that the entire distribution can be built in a separate directory + starting with a single "configure" file. Fixed the way the distribution + is created to make this patch for each new distribution. + +11/23/96 (installation) + Fixed the iwidgets installation so that the installed files (instead + of the source files) are chmod'd to have the proper permissions. + +11/29/96 (installation) + Fixed iwidgets (combobox, optionmenu, shell) so that they don't rely + on "tkwait visibility" before doing a grab. On the Macintosh, this + only works the first time a window is mapped. After that, this + command does not return control, even when a window is remapped. + +11/30/96 (bug fix) + Fixed "tk4.2/library/menu.tcl", moving a comment in a switch statement + above the default case into the default case. When the comment is + above the case, it is treated as a list element and a parsing error + occurs. You can trigger the error with a command like "tkMenuFind . x". + When the comment is inside the case, everything works fine. + +11/30/96 (bug fix) + Fixed a memory error that occured when an interpreter was destroyed. + One namespace (e.g., base class) caused another (e.g., derived class) + to be destroyed. Then the namespace was destroyed again later on. + Now, as we iteration through the safeCopy list, we check to make + sure the namespace still exists. + +11/30/96 (bug fix) + Fixed entryfield mega-widget to avoid using the "%s" state field + for key presses. It was using it to find out whether or not Control, + Shift, or Alt keys were being held down during a key press. But this + field confuses Alt with NumLock when you go between Unix and Windows + platforms. The entryfield appeared to be broken when NumLock was + turned on. Nothing is lost if we simply ignore it and let all + keypresses through. + +12/1/96 (installation) + Fixed the way that "pkgIndex.tcl" files are built for Itcl/Itk. + When you build with "--enable-shared", the package files load the + shared library, but when you build without, the package files + use {load "" Itcl} to get the static package. This lets you + do "package require" commands in slave interpreters, even if + things were built with static packages. + +12/1/96 (bug fix) + Fixed how namespaces are deleted when an interpreter is deleted. + Previously, namespaces were deleted after the assocData for the + interp. If any background errors occurred while the namespace + was being deleted, they caused seg faults later on. Now, the + global namespace is cleared (but not deleted) *before* deleting + the assocData. Any background errors are deleted, and the global + namespace is finally deleted at that point. + +12/2/96 (enhancement) JCI + Defined "tkOpenDocument" in tk.tcl so that Macintosh users can + double-click on an [incr Tcl] source file, and itkwish will be + invoked to execute it. + +12/2/96 (bug fix) + Fixed the entryfield widget so that characters like: " [ ] { } \ & + are substituted properly into the "%c" field when doing character + validation. + +12/2/96 (enhancement) **POTENTIAL INCOMPATIBILITY** + Changed the HTML parsing in the scrolledhtml widget to speed it up. + Also, changed the "-feedback" option so that it appends two numbers + on the end of the feedback command: the current position and the + maximum position. This frees the caller from having to figure out + the maximum position. + +12/2/96 (enhancement) + Added "-borderwidth", "-relief" and "-elementborderwidth" options + to the feedback widget, so you can control its appearance a little + better. + +========================================================================== + ------------------------ RELEASE 2.2 - 12/3/96 ------------------------- +========================================================================== + +12/12/96 (installation) + Fixed "iwidgets.tcl" initialization file to rely on the environment + variable IWIDGETS_LIBRARY (if it exists), and use the compiled-in + path as a last resort. That way, the user can override the iwidgets + library with an environment variable setting. + +12/12/96 (installation) + Fixed the "catalog" demo for [incr Widgets] to help support Windows3.1. + The code is now arranged to make it easy to translate between the + real demo names and DOS 8.3 file names. + +12/13/96 (bug fix) + Added a "usual" test for all of the [incr Widgets]. This checks to + make sure that there is a bit of "usual" code for each widget, that + the options in the "usual" code are valid, and that all of the + widgets mix together without errors. + +4/11/97 (enhancement) + Merged in patches for tcl7.6p2/tk4.2p2 (jingham) + +5/17/97 (bug fix) + Fixed itk::Toplevel to have the hull keep the -takefocus option. + This fixed a problem with the tab ring in iwidget dialogs. + +6/1/98 (complete rewrite) + Rewrote the entire package to work with Tcl8.0 namespaces and the + new byte code compiler. + +========================================================================== + ----------------------- RELEASE 3.0a1 - 6/16/98 ------------------------ +========================================================================== + +7/23/98 (bug fix) + Removed references to Tcl internal macros such as TclDecrRefCount. + This was causing problems under Windows, since those macros use + global variables that are not available outside of tcl80.dll. + +7/23/98 (bug fix) + Added my own definition of the assert macro. Since Tcl/Tk doesn't + use assert, the default version was causing build problems with + gcc. + +7/27/98 (configuration change) + Changed all "configure" scripts to rely on tclConfig.sh and tkConfig.sh + for compile options. + +7/27/98 (configuration change) + Changed the initialization process for Itcl/Itk. Both packages now + key off of tcl_library to find their initialization scripts. + +7/27/98 (configuration change) + Removed IWIDGETS_LIBRARY environment variable from the Iwidgets + package. If Iwidgets is installed properly, this variable is not + needed. + +7/29/98 (configuration change) + Added Scott Stanton's patch to the initialization process. The + last-ditch installation directory is no longer compiled into the + itcl sources. Instead, itcl searches for the installation directory + starting from $tcl_library. Also, if the variable itcl::library is + set before loading itcl, then itcl aborts the search and uses that + as its library directory. + +7/30/98 (Macintosh) + Added Jim Ingham's patches for the Mac. + +7/30/98 (configuration) + Fixed Makefiles for Iwidgets 2.2/3.0 to avoid a problem while + installing the demo images/html. The INSTALL_DATA program may + have a relative name (../../config/install-sh) so we must be + careful to "cd" into library, demos, etc., but not into other + directories below them. + +8/8/98 (bug fix) + Fixed "namespace import" to work with autoloading. If you + execute "namespace import iwidgets::*", the auto_import proc + will create stubs for all of the iwidgets commands. Executing + one of the stubs triggers autoloading for the appropriate command. + +8/10/98 (bug fix) + Integrated changes from Scriptics team to work seamlessly with + Tcl 8.0.3. + +8/10/98 (bug fix) + Fixed the iwidgets::optionmenu to work properly under Windows 95/NT. + Extended the "get" method in iwidgets3.0 so that you can query + existing elements from an optionmenu. + +========================================================================== + ------------------------ RELEASE 3.0 - 8/11/98 ------------------------- +========================================================================== + +8/16/98 (bug fix) + Fixed the windows pkgIndex.tcl files for Itcl and Itk to properly + load their .dll. Also fixed iwidgets/catalog to package require + Itcl, Itk, and to import ::itcl::* to get "class" defined. (BW) + +12/21/99 (bug fix) + Fixed tests for auto_mkindex to work properly outside of itkwish. + Tests now include "namespace import itcl::*" instead of assuming that + this behavior is built into the wish. + +4/18/00 (feature enhancement) + Fixed itcl::find to find classes and objects in *all* namespaces + in the interpreter. Until this fix, the itcl::find command would + report only the objects in the active namespace or the global + namespace. Being able to find classes/objects in all namespaces + makes debugging easier. Thanks to Chad Smith for pushing to make + this change happen. + +6/26/00 (bug fix) + Fixed Itcl_ClassVarResolver so that the formal parameters in a + method/proc take precedence over class data members. + +6/30/00 (bug fix) + Fixed all itcl/itk/iwidgets3.0.0 tests to run cleanly with the new + tcltest package. + +7/1/00 (bug fix) + Fixed "itk_component delete" so that the composite option list is + cleaned up whenever a component is deleted. For example, suppose + a component is the sole contributor of -font. When that component + is removed via "itk_component delete", the -font option goes away + as well. Also fixed the handling of the itk-delete-* binding for + the component. When the component is removed, the binding tag + is also removed by itk::remove_destroy_hook. + +7/5/00 (bug fix) + Fixed the check done during object creation to avoid clobbering + existing commands. Previously, itcl would look for any command-- + in the local *and* global namespace--that might be clobbered. + Now, it looks for commands only in the local namespace, since + those are the only ones that could truly be clobbered. + +7/5/00 (cleanup) + Removed obsolete Makefile/configure files in the various "unix" + directories. Makefiles and configure files now reside one level + above, in the standard TEA place. + +7/11/00 (stubs cleanup) <welch@ajubasolutions.com> + Fix the build so static links do not use the stubs library. + +8/1/00 (stubs cleanup) <davygrvy@ajubasolutions.com> + Added missing declarations for Itcl_InitStubs and Itk_InitStubs + and simplified how Itcl Stubs are set in Initialize() of itk_cmds.c + +8/1/00 (Makefile) <welch@ajubasolutions.com> + Added config/installFiles.tcl and changed the various Makefile.in + files to use this instead of install-sh. installFiles.tcl can + optimize out a copy if the target file is already up-to-date. + This eliminates conflicts from parallel builds on different platforms + where one build is zipping up the installed files while another platform + is copying platform-independent files (i.e., the iwidgets demos). + +8/4/00 (stubs cleanup) <davygrvy@ajubasolutions.com> + Fixed dll linkage problem with the prototypes of the 2 XX_InitStubs + functions use. I copied the core too literally. Stubs libraries are + always static, so there's no need to play games with __declspec on + windows. + +8/7/00 (stubs cleanup) <welch@ajubasolutions.com> + Cleaned up use of Itcl_InitStubs by Itk. Finally got it right after + much flailing about. itcl.h has the correct definitions, and + itclStubLib.c has the correct #ifdefs. + Also nuked extra definitions of itclStubsPtr from the itk_cmds.c file. + +8/17/00 (more stubs cleanup) <davygrvy@ajubasolutions.com> + Tcl_InitStubs in itcl/generic/itcl_cmds.c was using the TCL_VERSION macro + set by the tcl.h header. Changed it to be "8.1" instead as it doesn't + matter unless Itcl needs special/new features of the core it's header is + from. But it doesn't.. so hard code it for an 8.1 minimum to make the + Itcl library have a better version range with the core as specific + version tracking with the core isn't needed (at this time). + +========================================================================== + ------------------------ RELEASE 3.2 - 08/18/00 ------------------------ +========================================================================== + +9/22/00 (stubs cleanup) <davygrvy@ajubasolutions.com> + Itcl_InitStub prototype in itcl/generic/itcl.h was getting name mangled + by c++ compilers. Fixed with an 'extern "C"' appropriately applied. + +4/07/01 (bug fix) <davygrvy@pobox.com> + Tcl's internal header, tclInt.h, in 8.4a2 got a small change in the Command + structure that needed 2 changes in Itcl to resolve. 1) #if/#else/#endif blocks + added in itcl_class.c and itc_ensemble.c allowing Itcl to compile. 2) added + a global variable called itclCompatFlags that's sets a flag in Itcl_Init() + that will modify the logic around access to cmdPtr->flags/deleted. This + way, any core compile will yield a fully forward/backward compatible + binary (correct logic set at runtime). + +5/22/01 (bug fixes) <davygrvy@pobox.com> + makefile.vc lives again! Brought back from it's death to conquere windows + once again for users who prefer to avoid (or can't understand or get the tools + installed for) the TEA build system. + + Also, numerous fixes relating to Kevin Kenny's Tcl API mods for better CONST + support. The latest headers for Tcl where throwing warnings all over the place + about type errors. I fixed the sources, but haven't checked against older + headers yet.
\ No newline at end of file diff --git a/itcl/ChangeLog b/itcl/ChangeLog index 63348b3c65e..c6782351a3a 100644 --- a/itcl/ChangeLog +++ b/itcl/ChangeLog @@ -1,315 +1,606 @@ -2001-08-08 Mo DeJong <mdejong@redhat.com> - - * cygtcl.m4: Update from Tcl. - * itcl/configure: Regen. - * itk/configure: Regen. - -2001-08-06 Mo DeJong <mdejong@redhat.com> - - * cygtcl.m4: Update from Tcl. - * itcl/configure: Regen. - * itk/configure: Regen. - This update pulls in the library name changes so Itcl - uses the "rh" or "cyg" vendor prefix if set. - -2001-08-01 Mo DeJong <mdejong@redhat.com> - - * cygtcl.m4: Update from Tcl. - * itcl/configure: Regen. - * itcl/configure.in: Use TCL_TOOL_SHARED_LIB_LONGNAME - and TCL_TOOL_STATIC_LIB_LONGNAME to generate lib names. - * itk/configure: Regen. - * itk/configure.in: Use TCL_TOOL_SHARED_LIB_LONGNAME - and TCL_TOOL_STATIC_LIB_LONGNAME to generate lib names. - -2001-07-12 Mo DeJong <mdejong@redhat.com> - - * tcl.m4 (SC_MAKE_LIB): Add support for building with gcc - under Windows. Add POST_MAKE_LIB and POST_MAKE_STATIC_LIB - substitutions to deal with ranlib issues. - * itcl/Makefile.in: Subst POST_MAKE_LIB and POST_MAKE_STATIC_LIB - into lib and stub lib targets. - * itcl/configure: Regen. - * itcl/configure.in: Set ITCL_LIB_FILE to the static import lib - name when building a shared lib under Windows. Set itcl_LIB_FILE - to the dll name when building under Windows. Use unquoted - TCL_BUILD_STUB_LIB_SPEC in SHLIB_LD_LIBS. - * itk/Makefile.in: Subst POST_MAKE_LIB and POST_MAKE_STATIC_LIB - into lib and stub lib targets. - * itk/configure: Regen. - * itk/configure.in: Set ITK_LIB_FILE to the static import lib - name when building a shared lib under Windows. Set itk_LIB_FILE - to the dll name when building under Windows. Use unquoted - TCL_BUILD_STUB_LIB_SPEC in SHLIB_LD_LIBS. - -2001-07-11 Mo DeJong <mdejong@redhat.com> - - * cygtcl.m4: Update from Tcl. - * itcl/configure: Regen. - * itcl/configure.in: Use AC_CHECK_PROG to set CYGPATH - so that cross compiling works correctly. - * itk/configure: Regen. - * itk/configure.in: Use AC_CHECK_PROG to set CYGPATH - so that cross compiling works correctly. - -2001-07-11 Mo DeJong <mdejong@redhat.com> - - * Makefile.in: If an error is returned by the make - in a subdirectory exit from the parent make instead - of processing the next subdirectory. - -2001-06-22 Mo DeJong <mdejong@redhat.com> - - * cygtcl.m4: Update from Tcl. - * tcl.m4: Use $host to determine system type - instead of invoking uname. Add support for - mingw32 and windows32 host identifiers. - * itcl/configure: Regen. - * itcl/configure.in: Ditto. - * itk/configure: Regen. - * itk/configure.in: Ditto. - -2001-06-20 Mo DeJong <mdejong@redhat.com> - - * tcl.m4 (SC_ENABLE_GCC, SC_CONFIG_CFLAGS, SC_SERIAL_PORT, - SC_MISSING_POSIX_HEADERS, SC_PATH_X, SC_BLOCKING_STYLE, - SC_HAVE_VFORK, SC_TIME_HANLDER, SC_BUGGY_STRTOD, - SC_TCL_LINK_LIBS, SC_LIB_SPEC, SC_PUBLIC_TCL_HEADERS, - SC_PUBLIC_TK_HEADERS, SC_SIMPLE_EXEEXT, SC_PROG_TCLSH, - SC_PROG_WISH): - Remove unused macros. The Itcl version of tcl.m4 has - already diverged from the Tcl one. Since we need to - maintain this Itcl version separately, it should be - as simple as possible. - -2001-06-11 Mo DeJong <mdejong@redhat.com> - - * tcl.m4 (SC_ENABLE_SHARED): Configure with shared library - support when building under Windows. - * itcl/configure: Regen. - * itk/configure: Regen. - -2001-06-06 Mo DeJong <mdejong@redhat.com> - - * itk/aclocal.m4: Pull in ../../config/acinclude.m4 - so we can use the CYG_AC_PATH_ITCLCONFIG and - CYG_AC_LOAD_ITCLCONFIG macros. - * itk/configure: Regen. - * itk/configure.in: Call CYG_AC_PATH_ITCLCONFIG - and CYG_AC_LOAD_ITCLCONFIG to load the itclConfig.sh - config file. The existing configure script would - try to figure out lib file names by hand. - -2001-06-06 Mo DeJong <mdejong@redhat.com> - - * itk/configure: Regen. - * itk/configure.in: Use TCL_BUILD_STUB_LIB_SPEC in place - of TCL_BUILD_STUB_LIB_PATH. Use TK_BUILD_STUB_LIB_SPEC - in place of TK_STUB_LIB_SPEC since the tk stub lib - would not have been installed yet. - -2001-06-05 Mo DeJong <mdejong@redhat.com> - - * itcl/configure: Regen. - * itcl/configure.in: Use TCL_BUILD_STUB_LIB_PATH instead - of TCL_STUB_LIB_PATH since Tcl is not install yet. - * itk/configure: Regen. - * itk/configure.in: Use TCL_BUILD_STUB_LIB_PATH instead - of TCL_STUB_LIB_PATH since Tcl is not install yet. - -2001-06-05 Mo DeJong <mdejong@redhat.com> - - * cygtcl.m4: - * itcl/configure: - * itk/configure: Update from Tcl. +2001-09-06 David Gravereaux <davygrvy@pobox.com> -2001-06-01 Mo DeJong <mdejong@redhat.com> + * itcl/generic/itcl_util.c: Threading patch from "Haneef Mohammed" + <haneef@mindspringx.com>. + [Patch: 445670] - * cygtcl.m4: - * itcl/configure: - * itk/configure: Update from Tcl. + -=[ Incr Tcl/Tk 3.2.1 tagged as done. ]=- + +2001-06-22 David Gravereaux <davygrvy@pobox.com> + + * tcl.m4: Added support for MacOS X [#435256] + + * itk/win/makefile.vc: fixed a bad macro use in the genstubs target. + + * itk/generic/itk_cmds.c: Added Itk_SafeInit(). + + * itk/generic/itk.decls: + * itk/generic/itkDecls.h: + * itk/generic/itkStubInit.c: Needed to add Itk_SafeInit() to the Stubs table. + Regen'd Stubs table. -2001-06-01 Mo DeJong <mdejong@redhat.com> +2001-05-28 Andreas Kupries <andreas_kupries@users.sourceforge.net> - * itcl/configure: Regen. - * itcl/configure.in: Define ITCL_LIB_FILE and ITCL_STUB_LIB_FILE - before using them. - * itk/configure: Regen. - * itk/configure.in: Define ITK_LIB_FILE and ITK_STUB_LIB_FILE - before using them. - * itk/itkConfig.sh.in: Add ITK_STUB_LIB_FILE, ITK_BUILD_STUB_LIB_SPEC, - ITK_STUB_LIB_SPEC, and ITK_STUB_LIB_FULL_PATH variables. + * itcl/Makefile.in: + * itk/Makefile.in: + * iwidgets/Makefile.in: Fixed installation of manpages, added + invocations of "basename" to create the correct paths into the + installation directories. Fixes [#427118]. -2001-05-31 Mo DeJong <mdejong@redhat.com> +2001-05-25 davygrvy + * ChangeLog (new): + Auto-generated this from the output of `cvs log`. This will be the + day-to-day reference of per-commits. CHANGES will now be the digest + of the data in here. Just like how Tcl does it. Information from + iwidgets was not used. - * itcl/win/dllEntryPoint.c: Add #endif that was - accidently left out during the Itcl 3.0 -> 3.2 - merge process. + * itk/generic/itk.h: + * itk/generic/itkStubLib.c: + * itk/generic/itk_cmds.c: + added CONST to return type for Itk_InitStubs() to match what Kevin Kenny + is doing to Tcl. Along with a little lint cleaning regarding Stubs. -2001-05-30 Mo DeJong <mdejong@redhat.com> + * itcl/generic/itcl.h: + * itcl/generic/itclStubLib.c: + added CONST to return type for Itcl_InitStubs() to match what + Kevin Kenny is doing to Tcl + +2001-05-24 davygrvy + * README.vc.txt: + instructions how to use makefile.vc to build the package - * configure: Regen. - * tcl.m4 (SC_PATH_TCLCONFIG, SC_PATH_TKCONFIG): Check - in win subdirectory in addition to unix subdirectory for - tclConfig.sh and tkConfig.sh files. * itcl/configure: - * itk/configure: Regen. - * iwidgets3.0.0/configure: Regen. + * itcl/configure.in: + * itcl/itclConfig.sh.in: + * itk/configure: + * itk/configure.in: + * itk/itkConfig.sh.in: + Bug #427113 + +2001-05-23 davygrvy + * itcl/win/makefile.vc: + added missing quotes around include paths. -2001-05-30 Mo DeJong <mdejong@redhat.com> + * .cvsignore: + * configure: + * configure.in: + changed configure.in to the new iwidgets subdir. Removed the older + references to iwidgets3.0.0 and iwidgets2.2.0 + + * configure: + this could be useful. - * configure: Regen. - * tcl.m4 (SC_PATH_TCLCONFIG, SC_PATH_TKCONFIG): Generate - an error instead of a warning when config files cannot be found. + * itcl/.cvsignore: * itcl/configure: - * itk/configure: Regen. - * iwidgets3.0.0/configure: Regen. + * itcl/configure.in: + * itk/.cvsignore: + * itk/configure: + * itk/configure.in: + Updated patch level to 3.2.1 in prep for a release. -2001-05-29 Mo DeJong <mdejong@redhat.com> + * itcl/win/makefile.vc: + * itcl/win/rc/itcl.rc: + yet another rc problem repaired - * cygtcl.m4: Add from tcl module. - * itcl/aclocal.m4: Include cygtcl.m4. - * itcl/configure: Regen. - * itcl/configure.in: Fix --prefix variable. Use TCL_TOOL macros - to deal with path name portibility issues. - * itcl/itclConfig.sh.in: Add full path and stub lib vars. - * itk/aclocal.m4: Include cygtcl.m4. - * itk/configure: Regen. - * itk/configure.in: Fix --prefix variable. Use TCL_TOOL macros - to deal with path name portibility issues. - * iwidgets3.0.0/aclocal.m4: Include cygtcl.m4. - * iwidgets3.0.0/configure: Regen. + * itcl/win/makefile.vc: + rc problem repaired -2001-05-29 Mo DeJong <mdejong@redhat.com> +2001-05-22 davygrvy + * itcl/generic/itcl_objects.c: + * itcl/tests/interp.test: + patch #426205, self deleting class caused core dump. - * itk/configure: Regen. - * itk/configure.in: Adjust AC_CONFIG_AUX_DIR() - and fix --prefix and --exec-prefix variables. + * itk/generic/itk_archetype.c: + * itk/generic/itk_cmds.c: + Fix for Tcl_GetCommandName() now returning a CONST char * + from the changes Kevin Kenny is doing to the HEAD tcl code. + This hasn't been tested with older header files, yet. -2001-05-25 Mo DeJong <mdejong@redhat.com> + * config.vc: + * itcl/win/makefile.vc: + * itk/win/makefile.vc: + * itk/win/rc/itk.rc: + * makefile.vc: + makefile.vc actually works again. + + * itk/win/rc/cursor00.cur: + * itk/win/rc/cursor02.cur: + * itk/win/rc/cursor04.cur: + * itk/win/rc/cursor06.cur: + * itk/win/rc/cursor08.cur: + * itk/win/rc/cursor0a.cur: + * itk/win/rc/cursor0c.cur: + * itk/win/rc/cursor0e.cur: + * itk/win/rc/cursor10.cur: + * itk/win/rc/cursor12.cur: + * itk/win/rc/cursor14.cur: + * itk/win/rc/cursor16.cur: + * itk/win/rc/cursor18.cur: + * itk/win/rc/cursor1a.cur: + * itk/win/rc/cursor1c.cur: + * itk/win/rc/cursor1e.cur: + * itk/win/rc/cursor20.cur: + * itk/win/rc/cursor22.cur: + * itk/win/rc/cursor24.cur: + * itk/win/rc/cursor26.cur: + * itk/win/rc/cursor28.cur: + * itk/win/rc/cursor2a.cur: + * itk/win/rc/cursor2c.cur: + * itk/win/rc/cursor2e.cur: + * itk/win/rc/cursor30.cur: + * itk/win/rc/cursor32.cur: + * itk/win/rc/cursor34.cur: + * itk/win/rc/cursor36.cur: + * itk/win/rc/cursor38.cur: + * itk/win/rc/cursor3a.cur: + * itk/win/rc/cursor3c.cur: + * itk/win/rc/cursor3e.cur: + * itk/win/rc/cursor40.cur: + * itk/win/rc/cursor42.cur: + * itk/win/rc/cursor44.cur: + * itk/win/rc/cursor46.cur: + * itk/win/rc/cursor48.cur: + * itk/win/rc/cursor4a.cur: + * itk/win/rc/cursor4c.cur: + * itk/win/rc/cursor4e.cur: + * itk/win/rc/cursor50.cur: + * itk/win/rc/cursor52.cur: + * itk/win/rc/cursor54.cur: + * itk/win/rc/cursor56.cur: + * itk/win/rc/cursor58.cur: + * itk/win/rc/cursor5a.cur: + * itk/win/rc/cursor5c.cur: + * itk/win/rc/cursor5e.cur: + * itk/win/rc/cursor60.cur: + * itk/win/rc/cursor62.cur: + * itk/win/rc/cursor64.cur: + * itk/win/rc/cursor66.cur: + * itk/win/rc/cursor68.cur: + * itk/win/rc/cursor6a.cur: + * itk/win/rc/cursor6c.cur: + * itk/win/rc/cursor6e.cur: + * itk/win/rc/cursor70.cur: + * itk/win/rc/cursor72.cur: + * itk/win/rc/cursor74.cur: + * itk/win/rc/cursor76.cur: + * itk/win/rc/cursor78.cur: + * itk/win/rc/cursor7a.cur: + * itk/win/rc/cursor7c.cur: + * itk/win/rc/cursor7e.cur: + * itk/win/rc/cursor80.cur: + * itk/win/rc/cursor82.cur: + * itk/win/rc/cursor84.cur: + * itk/win/rc/cursor86.cur: + * itk/win/rc/cursor88.cur: + * itk/win/rc/cursor8a.cur: + * itk/win/rc/cursor8c.cur: + * itk/win/rc/cursor8e.cur: + * itk/win/rc/cursor90.cur: + * itk/win/rc/cursor92.cur: + * itk/win/rc/cursor94.cur: + * itk/win/rc/cursor96.cur: + * itk/win/rc/cursor98.cur: + * itk/win/rc/itkwish.rc: + * itk/win/winMain.c: + Removing of old cruft. itkwishXX.exe is no longer needed as itkXX.dll is a + pure extension and loads in a vanilla wish just fine. - * itcl/itcl/Makefile.in: - * itk/Makefile.in: - * iwidgets3.0.0/Makefile.in: Install cross - platform itk and itk files in @datadir@ (share). + * itcl/win/pkgIndex.tcl: + * itk/win/pkgIndex.tcl: + we'll auto gen these from the makefile -2001-05-24 Mo DeJong <mdejong@redhat.com> + * itcl/win/makefile.vc: + * itk/win/makefile.vc: + fixed include paths to make sure paths to itcl.h and itk.h in the source tree + are mentioned first to avoid a possible bug during building. - * itcl/configure: Regen. + * itcl/configure: * itcl/configure.in: - Use fully qualified srcdir, add ITCL_SRC_DIR_NATIVE variable. - Don't call the SC_PROG_TCLSH macro since it does not bootstrap. - Add itclConfig.sh back to configure.in, it was lost at some point. - * itk/configure: Regen. + * itk/configure: * itk/configure.in: - Use fully qualified srcdir, add ITK_SRC_DIR_NATIVE variable. - Don't call SC_PROG_TCLSH or SC_PROG_WISH macros since they - do not bootstrap. - Add itkConfig.sh back to configure.in, it was lost at some point. - * iwidgets3.0.0/configure: Regen. - * iwidgets3.0.0/configure.in: - Don't call the SC_PROG_TCLSH macro since it does not bootstrap. - -2001-05-24 Mo DeJong <mdejong@redhat.com> - - * tcl.m4 (SC_LIB_SPEC): Add note about broken - SC_LIB_SPEC macro. It does not effect us since - we only build static libs. - * itcl/configure: Regen. - * itcl/configure.in: Call AC_PROG_CC and not - SC_ENABLE_GCC since it break cross compiling. - * itk/configure: Regen. - * itk/configure.in: Ditto. - -2001-05-23 Mo DeJong <mdejong@redhat.com> - - * configure: Regen. - * tcl.m4: Default to building an unshared - version of the Itcl library. - * itcl/configure: Regen. - * itk/configure: Regen. - * iwidgets3.0.0/configure: Regen. - -2001-05-23 Mo DeJong <mdejong@redhat.com> - - * itcl/unix/aclocal.m4: - * itcl/unix/tcl.m4: - * itcl/win/aclocal.m4: - * itcl/win/tcl.m4: - * itk/unix/aclocal.m4: - * itk/unix/tcl.m4: - * itk/win/aclocal.m4: - * itk/win/tcl.m4: - Remove old autoconf files, they should - have been removed as part of the 3.0 -> 3.2 - transition. - -2001-05-23 Mo DeJong <mdejong@redhat.com> - - * config/installFile.tcl: Removed ill conceived - Tcl install script since it does not bootstrap. + patch #426203 + + * itk/win/makefile.vc: + Mostly working. Not fully tested, but lots closer. + + * itk/win/makefile.vc: + more closer, but not yet perfect. + + * itcl/generic/itcl_cmds.c: + * itcl/generic/itcl_methods.c: + Fix for Tcl_GetCommandName() now returning a CONST char * + from the changes Kevein Kenny is doing to the HEAD tcl code. + This hasn't been tested with older header files, yet. + + * itk/generic/itk_cmds.c: + Removed old reference to external ItkStubs structure. + Old cruft left from before Itk_InitStubs existed. + + * itcl/win/itcl.rc: + * itcl/win/rc/itcl.rc: + moving the resource script + + * itcl/win/rc/itcl.rc: + subtle changes. + + * itcl/win/itclsh.rc: + * itcl/win/tclAppInit.c: + Removing of old cruft. itclshXX.exe is no longer needed as itclXX.dll is a + pure extension and loads in a vanilla shell just fine. + + * itcl/generic/itcl_methods.c: + * itcl/generic/itcl_util.c: + removed #include "tclCompile.h"! + It wasn't needed. Those source files made no reference to anything in it. + + * itk/win/makefile.vc: + closer to perfection. + + * itk/win/rc/itk.rc: + This is now the resource script for the dll. + + * itcl/generic/itcl_methods.c: + whoops.. doh! + + * itk/win/dllEntryPoint.c: + Stubs bug logic fix. Same as itcl/win/dllEntryPoint.c. This help build a debug + version of itcl/itk from the standard tclstubXX.lib by removing the link + requirement to msvcrt.lib which should never have been there. + + * itcl/win/makefile.vc: + adapted for new location of itcl.rc + + * itk/win/rc/itk.rc: + subtle changes to infere the correct filename and support more + complete versioning info. + + * itcl/generic/itcl.h: + * itk/generic/itk.h: + changed RESOURCE_INCLUDED to RC_INVOKED. The windows resource + compiler to preset to define this already. + + * itcl/generic/itclInt.decls: + * itcl/generic/itclIntDecls.h: + * itcl/generic/itcl_class.c: + Fix for Itcl_ClassCmdResolver() not being of type Tcl_ResolveCmdProc with + the CONST type added to param 2 in the lastest headers. I haven't tested + this with an older tcl.h yet. Hopefully, this won't get messy. + + * itcl/win/makefile.vc: + small $(RCDIR) change. + + * itcl/generic/itcl_bicmds.c: + patch #426207, contextNs ptr can be NULL in Itcl_BiInfoClassCmd + ). + +2001-05-18 andreas_kupries + * itcl/generic/itcl_class.c: + [Fix 227811] Check for any command with the given name, not only + objects. + +2001-05-17 andreas_kupries + * itcl/generic/itcl_class.c: + * itcl/generic/itcl_cmds.c: + Fixed bug 227804. + +2001-05-11 andreas_kupries + * itk/generic/itk_archetype.c: + 2001-05-11 Andreas Kupries <a.kupries@westend.com> + + * itk/generic/itk_archetype.c: Fixed bug 227876. + + * itcl/generic/itcl_objects.c: + 2001-05-11 Andreas Kupries <a.kupries@westend.com> + + * itk/generic/itk_archetype.c: Fixed bug 227824 (and several duplicates). + + * itk/generic/itk_archetype.c: + 2001-05-11 Andreas Kupries <a.kupries@westend.com> + + * itk/generic/itk_archetype.c: Fixed bug 227814 + +2001-04-25 davygrvy + * pkg.vc: + moved the info about the iwidget version for makefile.vc + +2001-04-18 davygrvy + * itcl/win/dllEntryPoint.c: + whoops... removed C++ style comment from this .c file :) + +2001-04-14 davygrvy + * itcl/library/itcl.tcl: + Patch ID #227860 + + * rules.vc: + added an $Id$ keyword + + * .cvsignore: + just testing loginfo mailing... + + * .cvsignore: + only making a change to see the history file get an entry... + +2001-04-12 davygrvy + * itcl/win/makefile.vc: + progress is happening + +2001-04-08 davygrvy + * itcl/win/.cvsignore: + * itk/win/.cvsignore: + no need to have CVS bother itself with the build directories + + * itcl/win/makefile.vc: + a large rewrite + + * makefile.vc: + todays work progress. I'm not done yet. + + * itcl/generic/itcl_ensemble.c: + * itcl/generic/itcl_util.c: + Added mutex locking around the ItclPreservedList global hash table. This + appears to be the only work needed to support multithreading. + + * config.vc: + * pkg.vc: + * rules.vc: + new build files for VC++ compiles + + * .cvsignore: + ignore MSVC++ project artifacts + +2001-04-07 davygrvy + * itcl/win/dllEntryPoint.c: + a small windows specific fix against Tcl's Stubs library. + + * itcl/generic/itclInt.h: + * itcl/generic/itclStubLib.c: + * itcl/generic/itcl_class.c: + * itcl/generic/itcl_cmds.c: + * itcl/generic/itcl_ensemble.c: + 4/07/01 (bug fix) <davygrvy@pobox.com> + Tcl's internal header, tclInt.h, in 8.4a2 got a small change in the Command + structure that needed 2 changes in Itcl to resolve. 1) #if/#else/#endif blocks + added in itcl_class.c and itc_ensemble.c allowing Itcl to compile. 2) added + a global variable called itclCompatFlags that's sets a flag in Itcl_Init() + that will modify the logic around access to cmdPtr->flags/deleted. This + way, any core compile will yeild a fully forward/backward compatible + binary (correct logic set at runtime). + +2000-12-21 smithc + * itk/win/makefile.vc: + Patch #102914. + +2000-12-12 smithc + * itcl/generic/itcl_ensemble.c: + Patch #102774 + + * itcl/generic/itcl_class.c: + Patch #100274 + +2000-09-23 davidg + * CHANGES: + added a note about the 3.2 release + + * itcl/generic/itcl.h: + 9/22/00 (stubs cleanup) <davygrvy@ajubasolutions.com> + Itcl_InitStub prototype in itcl/generic/itcl.h was getting name mangled + by c++ compilers. Fixed with an 'extern "C"' appropriately applied. + +2000-08-18 davidg + * itcl/generic/itcl_cmds.c: + Tcl_InitStubs was using the TCL_VERSION macro set by the tcl.h header. + Changed it to be "8.1" instead as it doesn't matter unless Itcl needs + special/new features of the core it's header is from. But it doesn't.. so hard + code it for an 8.1 minimum. + +2000-08-07 welch + * itcl/Makefile.in: + * itcl/generic/itcl.h: + * itcl/generic/itclStubLib.c: + Final iteration, really, on getting Itcl_StubInit correctly set + up. + + * itk/generic/itk_cmds.c: + Removed redundant definitions of itclStubsPtr and + itclIntStubsPtr. + + * itcl/Makefile.in: + Added Itcl_InitStubs to the main Itcl library as well as the stubs + library for those applications (like Itk) that call Itcl_InitStub + but are linked against the main library. + + * CHANGES: + * CHANGES: + *** empty log message *** + +2000-08-04 davidg + * itcl/generic/itcl.decls: + * itcl/generic/itclDecls.h: + * itcl/generic/itclIntDecls.h: + * itcl/generic/itclStubInit.c: + * itk/generic/itk.decls: + * itk/generic/itkDecls.h: + * itk/generic/itkStubInit.c: + * itk/generic/itkStubLib.c: + added missing RCS $Id$ strings + + * itcl/generic/itcl.h: + * itcl/generic/itclStubLib.c: + * itk/generic/itk.h: + * itk/generic/itkStubLib.c: + yanked ugly linkage cruft from the StubLib functions. It's + always static. + +2000-08-02 davidg + * itk/generic/itk_cmds.c: + simplified how Itcl Stubs are set + + * itcl/generic/itcl.h: + * itk/generic/itk.h: + added missing Itcl_InitStubs and Itk_InitStubs declarations. + +2000-08-02 welch + * itk/generic/itkStubLib.c: + Fixed this new function + * itcl/Makefile.in: * itk/Makefile.in: - * iwidgets3.0.0/Makefile.in: Use @INSTALL@ instead - of installFile.tcl. - Don't remove man pages or html files before - installing. Don't chmod the installed files - since that will make a second call to make install - fail. + Changed this to use installFiles.tcl instead of install-sh -2001-05-17 Mo DeJong <mdejong@redhat.com> + * itcl/generic/itclStubLib.c: + Fix for new Itcl_InitStubs.c - Upgrade Itcl from 3.0 to 3.2. + * config/installFile.tcl: + Added a Tcl version of install-sh that avoids copying a file if + the target has the same size and date stamp as the source file already. + This helps parallel builds on different platforms avoid changing + files out from one another. + + * CHANGES: + *** empty log message *** + +2000-07-29 welch + * itcl/configure: + * itk/configure: + Ran autoconf + + * tcl.m4: + Fixed this with respect to recent changes in windows def of TCL_SRC_DIR + +2000-07-23 wart + * itcl/Makefile.in: + * itk/Makefile.in: + Use INSTALL_PROGRAM instead of INSTALL_DATA to install libraries so + they get execute permission on HPUX + +2000-07-14 welch + * itcl/configure: + * itk/configure: + Updated configure - * Makefile.in: - * aclocal.m4: Removed: - * configure: - * configure.in: - * license.terms: - * makefile.vc: - * tcl.m4: Added. * config/install-sh: - * config/installFile.tcl: Added. - * itcl/Makefile.in: Added. - * itcl/aclocal.m4: Added. - * itcl/configure: Added. - * itcl/configure.in: Added. - * itcl/pkgIndex.tcl: Added. - * itcl/pkgIndex.tcl.in: Added. - * itcl/doc/Resolvers.3: Removed. - * itcl/doc/find.n: - * itcl/doc/itcl_info.n: - * itcl/doc/itclvars.n: - * itcl/doc/scope.n: - * itcl/generic/itcl.decls: Added. - * itcl/generic/itcl.h: - * itcl/generic/itclDecls.h: Added. - * itcl/generic/itclInt.decls: Added. - * itcl/generic/itclInt.h: - * itcl/generic/itclIntDecls.h: Added. - * itcl/generic/itclStubInit.c: Added. - * itcl/generic/itclStubLib.c: Added. + Nuked debug echo statement + +2000-07-12 welch + * config/install-sh: + Added -f to MV command + + * CHANGES: + * Makefile.in: + Added some feedback to the top-level makefile loops + + * itcl/configure.in: + * itk/Makefile.in: + * itk/configure.in: + Disable stubs in the case of static builds. + +2000-07-07 csmith + * itcl/tests/info.test: + patch submitted by David Cuthbert, 7/7/00 + * itcl/generic/itcl_bicmds.c: + patch submitted by David Cuthbert, 7/7/00 to fix segfault caused by the + following code: + + itcl::class X { } + namespace eval X { info class } + +2000-07-06 mmc + * Makefile.in: + * README: + + Touched up README for itcl3.2 release. Fixed master Makefile to + avoid testing iwidgets2.2.0, which is an older release provided + only for backward-compatibility. Bug fixes and improvements are + made and tested in the newer iwidgets3.0.0 release. + + * CHANGES: + * itcl/generic/itcl.h: * itcl/generic/itcl_class.c: * itcl/generic/itcl_cmds.c: - * itcl/generic/itcl_ensemble.c: - * itcl/generic/itcl_linkage.c: - * itcl/generic/itcl_methods.c: - * itcl/generic/itcl_migrate.c: * itcl/generic/itcl_objects.c: - * itcl/generic/itcl_obsolete.c: - * itcl/generic/itcl_parse.c: - * itcl/generic/itcl_util.c: - * itcl/library/itcl.tcl: - * itcl/mac/MW_ItclHeader.pch: Added - * itcl/mac/itclMacLibrary.r: - * itcl/mac/pkgIndex.tcl: * itcl/tests/all: - * itcl/tests/all.tcl: Added. + * itcl/tests/all.tcl: + * itcl/tests/basic.test: + * itcl/tests/defs: + * itcl/tests/inherit.test: + * itcl/tests/methods.test: + * itcl/tests/namespace.test: + * itcl/unix/Makefile.in: + * itcl/unix/configure.in: + * itcl/unix/itclConfig.sh.in: + * itcl/unix/pkgIndex.tcl.in: + * itcl/unix/test.tcl: + * itk/Makefile.in: + * itk/generic/itk_archetype.c: + * itk/library/itk.tcl: + * itk/tests/all: + * itk/tests/all.tcl: + * itk/tests/defs: + * itk/tests/widget.test: + * itk/unix/Makefile.in: + * itk/unix/configure.in: + * itk/unix/itkConfig.sh: + * itk/unix/itkConfig.sh.in: + * itk/unix/pkgIndex.tcl.in: + + 6/26/00 (bug fix) + Fixed Itcl_ClassVarResolver so that the formal parameters in a + method/proc take precedence over class data members. + + 6/30/00 (bug fix) + Fixed all itcl/itk/iwidgets3.0.0 tests to run cleanly with the new + tcltest package. + + 7/1/00 (bug fix) + Fixed "itk_component delete" so that the composite option list is + cleaned up whenever a component is deleted. For example, suppose + a component is the sole contributor of -font. When that component + is removed via "itk_component delete", the -font option goes away + as well. Also fixed the handling of the itk-delete-* binding for + the component. When the component is removed, the binding tag + is also removed by itk::remove_destroy_hook. + + 7/5/00 (bug fix) + Fixed the check done during object creation to avoid clobbering + existing commands. Previously, itcl would look for any command-- + in the local *and* global namespace--that might be clobbered. + Now, it looks for commands only in the local namespace, since + those are the only ones that could truly be clobbered. + + 7/5/00 (cleanup) + Removed obsolete Makefile/configure files in the various "unix" + directories. Makefiles and configure files now reside one level + above, in the standard TEA place. + +2000-06-22 wart + * itcl/Makefile.in: + Added itclDecls.h to list of header files to install. + +2000-06-22 welch + * itk/Makefile.in: + Installing stub table tkDecls.h + + * itcl/Makefile.in: + Installing all header files, not just public ones. + +2000-06-16 matt + * itcl/generic/itcl_util.c: + Moved #ifndef NDEBUG inside Itcl_Assert routine otherwise it may not get inclued + BUT it is specified in the Stubs Table..... + +2000-06-06 wart + * itk/tests/all.tcl: + Added missing file for running test suite. + + * itcl/tests/all.tcl: + Added missing file for running test suite + +2000-06-01 wart + * itcl/Makefile.in: * itcl/tests/basic.test: * itcl/tests/body.test: * itcl/tests/chain.test: - * itcl/tests/defs: * itcl/tests/delete.test: * itcl/tests/ensemble.test: * itcl/tests/import.test: @@ -318,644 +609,634 @@ * itcl/tests/interp.test: * itcl/tests/local.test: * itcl/tests/methods.test: - * itcl/tests/mkindex.itcl: * itcl/tests/mkindex.test: * itcl/tests/namespace.test: * itcl/tests/protection.test: * itcl/tests/scope.test: - * itcl/tests/old/AAA.test: - * itcl/tests/old/Bar.tcl: - * itcl/tests/old/BarFoo.tcl: - * itcl/tests/old/Baz.tcl: - * itcl/tests/old/Foo.tcl: - * itcl/tests/old/FooBar.tcl: - * itcl/tests/old/Geek.tcl: - * itcl/tests/old/Mongrel.tcl: - * itcl/tests/old/VirtualErr.tcl: - * itcl/tests/old/all: - * itcl/tests/old/basic.test: - * itcl/tests/old/inherit.test: - * itcl/tests/old/testlib.tcl: - * itcl/tests/old/toaster.test: - * itcl/tests/old/uplevel.test: - * itcl/tests/old/upvar.test: - * itcl/tests/old/toasters/Appliance.tcl: - * itcl/tests/old/toasters/Hazard.tcl: - * itcl/tests/old/toasters/Outlet.tcl: - * itcl/tests/old/toasters/SmartToaster.tcl: - * itcl/tests/old/toasters/Toaster.tcl: - * itcl/tests/old/toasters/usualway.tcl: - * itcl/unix/Makefile.in: Removed. - * itcl/unix/confdefs.h: Removed. - * itcl/unix/config.log: Removed. - * itcl/unix/configure: Removed. - * itcl/unix/configure.in: Removed. - * itcl/unix/pkgIndex.tcl.in: Removed. - * itcl/win/Makefile.in: Removed. - * itcl/win/configure: Removed. - * itcl/win/configure.in: Removed. - * itcl/win/dllEntryPoint.c: - * itcl/win/itcl.rc: - * itcl/win/itclsh.rc: - * itcl/win/makefile.vc: - * itcl/win/pkgIndex.tcl: - * itk/Makefile.in: Added. - * itk/aclocal.m4: Added. - * itk/configure: Added. - * itk/configure.in: Added. - * itk/pkgIndex.tcl: Added. - * itk/pkgIndex.tcl.in: Added. - * itk/doc/Archetype.n: - * itk/doc/Toplevel.n: - * itk/doc/Widget.n: - * itk/doc/itk.n: - * itk/doc/itkvars.n: - * itk/doc/itkwish.1: - * itk/doc/usual.n: - * itk/generic/itk.decls: Added. - * itk/generic/itk.h: - * itk/generic/itkDecls.h: Added. - * itk/generic/itkStubInit.c: Added. - * itk/generic/itkStubLib.c: Added. - * itk/generic/itk_archetype.c: - * itk/generic/itk_cmds.c: - * itk/generic/itk_option.c: - * itk/generic/itk_util.c: - * itk/library/Archetype.itk: - * itk/library/Toplevel.itk: - * itk/library/Widget.itk: - * itk/library/itk.tcl: - * itk/mac/itkMacLibrary.r: - * itk/mac/pkgIndex.tcl: - * itk/tests/all: - * itk/tests/all.tcl: Added. - * itk/tests/defs: + * itk/Makefile.in: + * itk/configure: + * itk/configure.in: * itk/tests/interp.test: * itk/tests/option.test: * itk/tests/privacy.test: * itk/tests/public.test: * itk/tests/toplevel.test: * itk/tests/widget.test: - * itk/unix/Makefile.in: Removed. - * itk/unix/configure: Removed. - * itk/unix/configure.in: Removed. - * itk/unix/pkgIndex.tcl.in: Removed. - * itk/win/Makefile.in: Removed. - * itk/win/Makefile.in_first: Removed. - * itk/win/configure: Removed. - * itk/win/configure.in: Removed. - * itk/win/dllEntryPoint.c: - * itk/win/makefile.bc: - * itk/win/makefile.vc: - * itk/win/pkgIndex.tcl: - * itk/win/winMain.c: - * itk/win/rc/itk.rc: - * itk/win/rc/itkwish.rc: - * iwidgets3.0.0/CHANGES: - * iwidgets3.0.0/Makefile.in: Added. - * iwidgets3.0.0/README: - * iwidgets3.0.0/aclocal.m4: Added. - * iwidgets3.0.0/catalog: Removed. - * iwidgets3.0.0/configure: Added. - * iwidgets3.0.0/configure.in: Added. - * iwidgets3.0.0/iwidgets.tcl: Added. - * iwidgets3.0.0/iwidgets.tcl.in: Added. - * iwidgets3.0.0/pkgIndex.tcl: Added. - * iwidgets3.0.0/pkgIndex.tcl.in: Added. - * iwidgets3.0.0/demos/canvasprintbox: Added. - * iwidgets3.0.0/demos/catalog: Added. - * iwidgets3.0.0/demos/feedback: - * iwidgets3.0.0/demos/mainwindow: - * iwidgets3.0.0/demos/scopedobject: Added. - * iwidgets3.0.0/demos/shell: Added. - * iwidgets3.0.0/demos/watch: - * iwidgets3.0.0/demos/html/buttonbox.n.html: - * iwidgets3.0.0/demos/html/calendar.n.html: Added. - * iwidgets3.0.0/demos/html/canvasprintbox.n.html: - * iwidgets3.0.0/demos/html/canvasprintdialog.n.html: - * iwidgets3.0.0/demos/html/checkbox.n.html: Added. - * iwidgets3.0.0/demos/html/combobox.n.html: - * iwidgets3.0.0/demos/html/dateentry.n.html: Added. - * iwidgets3.0.0/demos/html/datefield.n.html: Added. - * iwidgets3.0.0/demos/html/dialog.n.html: - * iwidgets3.0.0/demos/html/dialogshell.n.html: - * iwidgets3.0.0/demos/html/disjointlistbox.n.html: Added. - * iwidgets3.0.0/demos/html/entryfield.n.html: - * iwidgets3.0.0/demos/html/extfileselectionbox.n.html: Added. - * iwidgets3.0.0/demos/html/extfileselectiondialog.n.html: Added. - * iwidgets3.0.0/demos/html/feedback.n.html: - * iwidgets3.0.0/demos/html/fileselectionbox.n.html: - * iwidgets3.0.0/demos/html/fileselectiondialog.n.html: - * iwidgets3.0.0/demos/html/finddialog.n.html: Added. - * iwidgets3.0.0/demos/html/hierarchy.n.html: Added. - * iwidgets3.0.0/demos/html/hyperhelp.n.html: - * iwidgets3.0.0/demos/html/iwidgets2.2.0UserCmds.html: Removed. - * iwidgets3.0.0/demos/html/iwidgets3.0.0UserCmds.html: Added. - * iwidgets3.0.0/demos/html/labeledframe.n.html: Added. - * iwidgets3.0.0/demos/html/labeledwidget.n.html: - * iwidgets3.0.0/demos/html/mainwindow.n.html: Added. - * iwidgets3.0.0/demos/html/menubar.n.html: - * iwidgets3.0.0/demos/html/messagebox.n.html: Added. - * iwidgets3.0.0/demos/html/messagedialog.n.html: - * iwidgets3.0.0/demos/html/notebook.n.html: - * iwidgets3.0.0/demos/html/optionmenu.n.html: - * iwidgets3.0.0/demos/html/panedwindow.n.html: - * iwidgets3.0.0/demos/html/promptdialog.n.html: - * iwidgets3.0.0/demos/html/pushbutton.n.html: - * iwidgets3.0.0/demos/html/radiobox.n.html: - * iwidgets3.0.0/demos/html/scopedobject.n.html: Added. - * iwidgets3.0.0/demos/html/scrolledcanvas.n.html: - * iwidgets3.0.0/demos/html/scrolledframe.n.html: - * iwidgets3.0.0/demos/html/scrolledhtml.n.html: - * iwidgets3.0.0/demos/html/scrolledlistbox.n.html: - * iwidgets3.0.0/demos/html/scrolledtext.n.html: - * iwidgets3.0.0/demos/html/selectionbox.n.html: - * iwidgets3.0.0/demos/html/selectiondialog.n.html: - * iwidgets3.0.0/demos/html/shell.n.html: - * iwidgets3.0.0/demos/html/spindate.n.html: - * iwidgets3.0.0/demos/html/spinint.n.html: - * iwidgets3.0.0/demos/html/spinner.n.html: - * iwidgets3.0.0/demos/html/spintime.n.html: - * iwidgets3.0.0/demos/html/tabnotebook.n.html: - * iwidgets3.0.0/demos/html/tabset.n.html: - * iwidgets3.0.0/demos/html/timeentry.n.html: Added. - * iwidgets3.0.0/demos/html/timefield.n.html: Added. - * iwidgets3.0.0/demos/html/toolbar.n.html: - * iwidgets3.0.0/demos/html/watch.n.html: Added. - * iwidgets3.0.0/doc/checkbox.n: - * iwidgets3.0.0/doc/entryfield.n: - * iwidgets3.0.0/doc/generateHtml.sh: Added. - * iwidgets3.0.0/doc/hierarchy.n: - * iwidgets3.0.0/doc/radiobox.n: - * iwidgets3.0.0/doc/scrolledlistbox.n: - * iwidgets3.0.0/doc/scrolledtext.n: - * iwidgets3.0.0/doc/toolbar.n: - * iwidgets3.0.0/generic/buttonbox.itk: - * iwidgets3.0.0/generic/calendar.itk: - * iwidgets3.0.0/generic/canvasprintbox.itk: - * iwidgets3.0.0/generic/checkbox.itk: - * iwidgets3.0.0/generic/colors.itcl: - * iwidgets3.0.0/generic/combobox.itk: - * iwidgets3.0.0/generic/dateentry.itk: - * iwidgets3.0.0/generic/datefield.itk: - * iwidgets3.0.0/generic/dialog.itk: - * iwidgets3.0.0/generic/dialogshell.itk: - * iwidgets3.0.0/generic/disjointlistbox.itk: - * iwidgets3.0.0/generic/entryfield.itk: - * iwidgets3.0.0/generic/extfileselectionbox.itk: - * iwidgets3.0.0/generic/extfileselectiondialog.itk: - * iwidgets3.0.0/generic/feedback.itk: - * iwidgets3.0.0/generic/fileselectionbox.itk: - * iwidgets3.0.0/generic/fileselectiondialog.itk: - * iwidgets3.0.0/generic/finddialog.itk: - * iwidgets3.0.0/generic/hierarchy.itk: - * iwidgets3.0.0/generic/hyperhelp.itk: - * iwidgets3.0.0/generic/labeledframe.itk: - * iwidgets3.0.0/generic/labeledwidget.itk: - * iwidgets3.0.0/generic/mainwindow.itk: - * iwidgets3.0.0/generic/menubar.itk: - * iwidgets3.0.0/generic/messagebox.itk: - * iwidgets3.0.0/generic/messagedialog.itk: - * iwidgets3.0.0/generic/notebook.itk: - * iwidgets3.0.0/generic/optionmenu.itk: - * iwidgets3.0.0/generic/pane.itk: - * iwidgets3.0.0/generic/panedwindow.itk: - * iwidgets3.0.0/generic/promptdialog.itk: - * iwidgets3.0.0/generic/pushbutton.itk: - * iwidgets3.0.0/generic/radiobox.itk: - * iwidgets3.0.0/generic/scrolledcanvas.itk: - * iwidgets3.0.0/generic/scrolledframe.itk: - * iwidgets3.0.0/generic/scrolledhtml.itk: - * iwidgets3.0.0/generic/scrolledlistbox.itk: - * iwidgets3.0.0/generic/scrolledtext.itk: - * iwidgets3.0.0/generic/scrolledwidget.itk: - * iwidgets3.0.0/generic/selectionbox.itk: - * iwidgets3.0.0/generic/selectiondialog.itk: - * iwidgets3.0.0/generic/shell.itk: - * iwidgets3.0.0/generic/spindate.itk: - * iwidgets3.0.0/generic/spinint.itk: - * iwidgets3.0.0/generic/spinner.itk: - * iwidgets3.0.0/generic/spintime.itk: - * iwidgets3.0.0/generic/tabnotebook.itk: - * iwidgets3.0.0/generic/tabset.itk: - * iwidgets3.0.0/generic/timeentry.itk: - * iwidgets3.0.0/generic/timefield.itk: - * iwidgets3.0.0/generic/toolbar.itk: - * iwidgets3.0.0/generic/watch.itk: - * iwidgets3.0.0/tests/all: - * iwidgets3.0.0/tests/all.tcl: Added. - * iwidgets3.0.0/tests/buttonbox.test: - * iwidgets3.0.0/tests/calendar.test: - * iwidgets3.0.0/tests/canvasprintbox.test: - * iwidgets3.0.0/tests/canvasprintdialog.test: - * iwidgets3.0.0/tests/checkbox.test: - * iwidgets3.0.0/tests/combobox.test: - * iwidgets3.0.0/tests/dateentry.test: - * iwidgets3.0.0/tests/datefield.test: - * iwidgets3.0.0/tests/defs: - * iwidgets3.0.0/tests/dialog.test: - * iwidgets3.0.0/tests/dialogshell.test: - * iwidgets3.0.0/tests/disjointlistbox.test: - * iwidgets3.0.0/tests/entryfield.test: - * iwidgets3.0.0/tests/extfileselectionbox.test: - * iwidgets3.0.0/tests/extfileselectiondialog.test: - * iwidgets3.0.0/tests/feedback.test: - * iwidgets3.0.0/tests/fileselectionbox.test: - * iwidgets3.0.0/tests/fileselectiondialog.test: - * iwidgets3.0.0/tests/finddialog.test: - * iwidgets3.0.0/tests/hierarchy.test: - * iwidgets3.0.0/tests/hyperhelp.test: - * iwidgets3.0.0/tests/labeledframe.test: - * iwidgets3.0.0/tests/labeledwidget.test: - * iwidgets3.0.0/tests/menubar.test: - * iwidgets3.0.0/tests/messagebox.test: - * iwidgets3.0.0/tests/messagedialog.test: - * iwidgets3.0.0/tests/notebook.test: - * iwidgets3.0.0/tests/optionmenu.test: - * iwidgets3.0.0/tests/panedwindow.test: - * iwidgets3.0.0/tests/promptdialog.test: - * iwidgets3.0.0/tests/pushbutton.test: - * iwidgets3.0.0/tests/radiobox.test: - * iwidgets3.0.0/tests/regexpfield.test: - * iwidgets3.0.0/tests/scrolledcanvas.test: - * iwidgets3.0.0/tests/scrolledframe.test: - * iwidgets3.0.0/tests/scrolledhtml.test: - * iwidgets3.0.0/tests/scrolledlistbox.test: - * iwidgets3.0.0/tests/scrolledtext.test: - * iwidgets3.0.0/tests/selectionbox.test: - * iwidgets3.0.0/tests/selectiondialog.test: - * iwidgets3.0.0/tests/shell.test: - * iwidgets3.0.0/tests/spindate.test: - * iwidgets3.0.0/tests/spinint.test: - * iwidgets3.0.0/tests/spinner.test: - * iwidgets3.0.0/tests/spintime.test: - * iwidgets3.0.0/tests/tabnotebook.test: - * iwidgets3.0.0/tests/tabset.test: - * iwidgets3.0.0/tests/timeentry.test: - * iwidgets3.0.0/tests/timefield.test: - * iwidgets3.0.0/tests/toolbar.test: - * iwidgets3.0.0/tests/usual.test: - * iwidgets3.0.0/tests/watch.test: - * iwidgets3.0.0/unix/Makefile.in: Removed. - * iwidgets3.0.0/unix/configure: Removed. - * iwidgets3.0.0/unix/configure.in: Removed. - * iwidgets3.0.0/unix/iwidgets.tcl.in: Removed. - * iwidgets3.0.0/unix/pkgIndex.tcl.in: Removed. - * iwidgets3.0.0/win/iwidgets.tcl: Added. - * iwidgets3.0.0/win/makefile.vc: Added. - * iwidgets3.0.0/win/pkgIndex.tcl: Added. - -2001-04-09 Mo DeJong <mdejong@redhat.com> - - * itcl/unix/aclocal.m4: Include tcl.m4. - * itcl/unix/configure: Regen. - * itcl/unix/configure.in: Call TCL_TOOL_PATH - to match use in win version. - * itcl/unix/tcl.m4: Add from tcl/unix. - * itcl/win/aclocal.m4: Include tcl.m4. - * itcl/win/configure: Regen. - * itcl/win/configure.in: Call TCL_TOOL_PATH for - TCL_BIN_DIR, TCL_SRC_DIR, TCL_BUILD_LIB_SPEC. - * itcl/win/tcl.m4: Add from tcl/win. - * itk/unix/aclocal.m4: Include tcl.m4. - * itk/unix/configure: Regen. - * itk/unix/configure.in: Call TCL_TOOL_PATH - to match use in win version. Remove - --with-cflags option. - * itk/unix/tcl.m4: Add from tcl/unix. - * itk/win/aclocal.m4: Include tcl.m4. - * itk/win/configure: Regen. - * itk/win/configure.in: Call TCL_TOOL_PATH for - ITK_SRC_DIR, TCL_BIN_DIR, TCL_SRC_DIR, TCL_BUILD_LIB_SPEC, - TCL_BUILD_STUB_LIB_SPEC, TK_BIN_DIR, TK_SRC_DIR, TK_BUILD_LIB_SPEC, - and ITCL_BIN_DIR. Remove --with-cflags option. - * itk/win/tcl.m4: Add from tcl/win. - -2001-04-05 Mo DeJong <mdejong@redhat.com> - - * itcl/win/Makefile.in: - * itk/win/Makefile.in: Remove code that depends on dumpexts.exe - since it was removed from Tcl. Building a .dll no longer - requires a .def file. - -2001-04-05 Mo DeJong <mdejong@redhat.com> - - * configure.in: Don't build iwidgets under Windows since there - is no build system in the win subdirectory. - * itcl/win/configure.in: - * itk/win/configure.in: Don't look for tclConfig.sh in the - ../unix directory, look in the win/ subdirectory instead. - Fix copy and paste error in --with argument. Add subst - of the TCL_BUILD_STUB_LIB_SPEC variable. - * configure: - * itcl/win/configure: - * itk/win/configure: Regen. + Tests modified to work with TEA Makefile. + +2000-04-19 mmc + * CHANGES: + * itcl/Makefile.in: + * itcl/configure: + * itcl/configure.in: + * itcl/doc/find.n: + * itcl/generic/itcl.h: + * itcl/generic/itcl_cmds.c: + * itcl/tests/basic.test: + * itcl/tests/body.test: + * itcl/tests/chain.test: + * itcl/tests/defs: + * itcl/tests/delete.test: + * itcl/tests/ensemble.test: + * itcl/tests/info.test: + * itcl/tests/inherit.test: + * itcl/tests/local.test: + * itcl/tests/methods.test: + * itcl/tests/mkindex.itcl: + * itcl/tests/namespace.test: + * itcl/tests/protection.test: + * itcl/tests/scope.test: + * itcl/tests/tclIndex: + * itcl/unix/configure.in: + * itk/Makefile.in: + * itk/configure: + * itk/configure.in: + * itk/tests/defs: + * itk/tests/option.test: + * itk/tests/widget.test: + * license.terms: + + - fixed itcl::find to find classes/objects in *all* namespaces + - fixed tests to run cleanly + +2000-03-28 csmith + * itcl/generic/itcl_cmds.c: + Patch for Ticket 4111, submitted by David Cuthbert: + + *** itcl3.1.0/itcl/generic/itcl_cmds.c.orig Tue Feb 1 16:37:53 2000 + --- itcl3.1.0/itcl/generic/itcl_cmds.c.new Tue Feb 1 + 16:38:06 2000 + *************** + *** 94,100 **** + static char safeInitScript[] = + "proc ::itcl::local {class name args} {\n\ + ! set ptr [uplevel eval [list $class $name] $args]\n\ + uplevel [list set itcl-local-$ptr $ptr]\n\ + set cmd [uplevel namespace which -command $ptr]\n\ + uplevel [list trace variable itcl-local-$ptr u \"::itcl::delete object $cmd; list\"]\n\ + + --- 94,100 ---- + static char safeInitScript[] = + "proc ::itcl::local {class name args} {\n\ + ! set ptr [uplevel [list $class $name] $args]\n\ + uplevel [list set itcl-local-$ptr $ptr]\n\ + set cmd [uplevel namespace which -command $ptr]\n\ + uplevel [list trace variable itcl-local-$ptr u \"::itcl::delete object $cmd; list\"]\n\ -2001-04-05 Mo DeJong <mdejong@redhat.com> + * itcl/library/itcl.tcl: + Patch for ticket 4111, submitted by David Cuthbert: + + *** itcl3.1.0/itcl/library/itcl.tcl.orig Tue Feb 1 16:38:24 2000 + --- itcl3.1.0/itcl/library/itcl.tcl.new Tue Feb 1 16:38:30 2000 + *************** + *** 27,33 **** + # alive until a procedure exits. + # ---------------------------------------------------------------------- + proc ::itcl::local {class name args} { + ! set ptr [uplevel eval [list $class $name] $args] + uplevel [list set itcl-local-$ptr $ptr] + set cmd [uplevel namespace which -command $ptr] + uplevel [list trace variable itcl-local-$ptr u \ + + --- 27,33 ---- + # alive until a procedure exits. + # ---------------------------------------------------------------------- + proc ::itcl::local {class name args} { + ! set ptr [uplevel [list $class $name] $args] + uplevel [list set itcl-local-$ptr $ptr] + set cmd [uplevel namespace which -command $ptr] + uplevel [list trace variable itcl-local-$ptr u \ + +2000-03-20 wart + * itk/configure: + * itk/configure.in: + Fixed typo in variable name - * itk/win/winMain.c: Replace calls - to TkConsoleCreate and TkConsoleInit - with call to Tk_CreateConsoleWindow. - The old methods were removed in - Tk 8.3 and replaced with a public API. +2000-03-17 wart + * itcl/Makefile.in: + * itk/Makefile.in: + * itk/configure: + * itk/configure.in: + Added TCL_EXTRA_CFLAGS to compile line to fix build problems on Irix -2001-03-27 Ian Roxborough <irox@redhat.com> +2000-02-04 wart + * itk/configure: + * itk/configure.in: + Fixed typo that was causing builds on CYGWIN_NT platforms not to pick up + the Tcl stub library (TCL_STUB_LIB_SPEC was not being substituted in the + Makefile) - * itcl/generic/itcl_cmds.c - * itcl/generic/itcl_ensemble.c - * itcl/generic/itcl_methods.c - * itcl/generic/itcl_obsolete.c - * itcl/generic/itcl_parse.c - * itcl/generic/itk_archetype.c: Tcl/Tk 8.3 support. - Call Tcl_EvalObj with only two parameter for Tcl8.3. +2000-01-28 wart + * itcl/configure: + * itcl/configure.in: + * itk/configure: + * itk/configure.in: + Fixed a few more places where the configure wasn't checking for cygwin on + Windows 95/98 -2000-01-26 DJ Delorie <dj@cygnus.com> +2000-01-24 wart + * itcl/configure: + * itk/configure: + Regenerated configure scripts to pick up changes to tcl.m4 - * itcl/win/dllEntryPoint.c (DllMain): Use _imp__ instead of __imp_ - * itk/win/dllEntryPoint.c (DllMain): ditto - * itcl/generic/itcl_methods.c (tclByteCodeType): ditto, but unused + * itcl/configure: + * itk/configure: + Regenerated configure scripts to pick up recent changes to tcl.m4 -1999-12-21 Mo DeJong <mdejong@cygnus.com> + * tcl.m4: + * tcl.m4: + Updated to reflect recent TEA changes - * itcl/generic/itcl_parse.c: Applied patch to fix - crash when tearing down the itcl::parser namespace. +2000-01-18 wart + * tcl.m4: + Updated to reflect recent TEA changes -1999-09-23 Ben Elliston <bje@cygnus.com> +2000-01-03 csmith + * itcl/unix/Makefile.in: + Patch submitted by Mo Dejong needed so Itcl will link to the Tcl libs + when Tcl is compiled with debugging on. - * itcl/unix/configure.in: Quoting fix for AC_EGREP_CPP. - * itcl/win/configure.in: Likewise. - * itk/unix/configure.in: Likewise. - * itk/win/configure.in: Likewise. - * itcl/unix/configure: Regenerate. - * itcl/win/configure: Likewise. - * itk/unix/configure: Likewise. - * itk/win/configure: Likewise. + * itcl/generic/itcl_parse.c: + Patch by Mo Dejong to fix a Windows NT/95 crashing problem where you can + build with debugging on, load the Itcl package, and press the X in the + upper right corner. Note that I'm unable to test this on Windows and + that this patch introduces a compiler warning. -1999-09-22 DJ Delorie <dj@cygnus.com> + * itcl/generic/itcl_parse.c: + Duuuuhhhh.... + + This is the patch from Mo Dejong regarding the Windows NT/95 crashing + problem. My previous checkin of itcl_parse.c did not include all of + the patch - got in a hurry. Disregard the compiler warning mentioned + in my previous checkin. - * itcl/win/Makefile.in (ITCL_LIB_DIR etc): use @dir@ form - * itk/win/Makefile.in (INSTALL_LIB_DIR etc): ditto + * itcl/tests/defs: + Patch submitted by Mo Dejong: needed to add "-force" option to the + namespace import command so fix a bug with 'make test'. -1999-07-13 Jonathan Larmour <jlarmour@cygnus.co.uk> + * itcl/generic/itcl_parse.c: + *** empty log message *** - * itcl/unix/configure.in: Workaround bug in autoconf 2.13 by adding - an extra AC_PROG_CPP before AC_EGREP_CPP - * itcl/win/configure.in: Likewise - * itk/unix/configure.in: Likewise - * itk/win/configure.in: Likewise - * itcl/unix/configure: regenerated - * itcl/win/configure: regenerated - * itk/unix/configure: regenerated - * itk/win/configure: regenerated +1999-11-24 wart + * itcl/configure: + * itk/configure: + regenerated configure scripts to pick up tcl.m4 changes -1999-06-16 Keith Seitz <keiths@cygnus.com> + * itcl/configure: + * itk/configure: + * tcl.m4: + tcl.m4: Updated to reflect recent TEA changes + + */configure: Regnereated with new tcl.m4 + + iwidgets2.2.0/Makefile.in: Don't copy nonexistent files - * itk/win/Makefile.in (install-man): Don't install *.3 -- there - are no manpages in this section. + * tcl.m4: + Updated to reflect recent TEA changes -1999-03-26 Martin Hunt <hunt@cygnus.com> +1999-09-21 wart + * itk/Makefile.in: + Itk now installs appropriate library files. - * iwidgets3.0.0/generic/scrolledwidget.itk - (iwidgets::Scrolledwidget::sbwidth): The default width of 15 - was incompatible with Windows. Change the default to "" and - only actually change the scrollbar width if someone changes - it to something else. +1999-09-20 wart + * itcl/configure: + * itcl/configure.in: + * itk/Makefile.in: + * itk/configure: + * itk/configure.in: + pkgIndex on Windows now looks in the correct directory for the + .dll files. -1999-03-22 James Ingham <jingham@cygnus.com> +1999-09-17 wart + * tcl.m4: + Updated to reflect recent changes - * itcl/unix/configure.in: Leave the LD_SEARCH_PATH off of - MAKE_LIBS. This loses on OSF with --enable-shared. - * itcl/unix/configure: regenerated - * itk/unix/configure.in: Leave the LD_SEARCH_PATH off of - MAKE_LIBS. This lses on OSF with --enable-shared. - * itk/unix/configure: regenerated +1999-09-15 wart + * itcl/configure: + * itcl/configure.in: + * itcl/pkgIndex.tcl.in: + * itk/configure: + * itk/configure.in: + * itk/pkgIndex.tcl.in: + Better pkgIndex.tcl files that should now work on solaris. + +1999-09-14 wart + * itcl/Makefile.in: + * itcl/configure: + * itcl/configure.in: + * itcl/mkIndex.tcl.in: + * itcl/pkgIndex.tcl.in: + * itk/Makefile.in: + * itk/configure: + * itk/configure.in: + * itk/mkIndex.tcl.in: + * itk/pkgIndex.tcl.in: + Fixed installation of pkgIndex.tcl file. We have to install a pre-made + pkgIndex.tcl file since pkg_mkIndex can't seem to make a usable one. + +1999-09-10 wart + * itk/Makefile.in: + Fixed bug when calling mkIndex.tcl for itk + + reduced amount of output from "make install" in iwidgets + + * itcl/Makefile.in: + * itk/Makefile.in: + Removed Makefiles rules to regenerate the configure scripts. This was + causing problems when building on Windows and Unix simultaneoulsy. + +1999-09-09 wart + * itcl/configure: + * itcl/configure.in: + * itk/configure: + * itk/configure.in: + configure scripts now look for tclsh82d.exe executable when searching + for valid tcl interpreter. + + * Makefile.in: + Added pkgIndex files for Iwidgets + + Top level Makefile should no longer loop endlessly if the configure went bad. + + * itcl/configure: + * itcl/configure.in: + * itk/configure: + * itk/configure.in: + * tcl.m4: + Look for tclsh82d.exe before tclsh82.exe. + + configure scripts for itcl and itk now use the tcl.m4 macro SC_PROG_TCLSH. -1999-03-18 Keith Seitz <keiths@cygnus.com> +1999-09-07 wart + * itcl/Makefile.in: + * itcl/configure: + * itcl/configure.in: + * itk/Makefile.in: + * itk/configure: + * itk/configure.in: + configure now searches for tclsh82 shell in exec-prefix, then prefix, then + relative to tclConfig.sh, then in the users path. - * iwidgets3.0.0/unix/Makefile.in (install-libraries): Don't bother with - making symlinks for other versions of iwidgets -- we don't use them. +1999-09-04 wart + * configure.in: + * itcl/Makefile.in: + * itcl/aclocal.m4: + * itcl/configure: + * itcl/configure.in: + * itcl/mkIndex.tcl.in: + * itk/Makefile.in: + * itk/aclocal.m4: + * itk/configure: + * itk/configure.in: + * itk/mkIndex.tcl.in: + * tcl.m4: + TEA changes. Itcl now uses the same Makefiles and configure scripts for + both Windows and Unix. + + Note that static shells are not yet done in this TEA implementation. -1999-03-03 James Ingham <jingham@cygnus.com> + * itcl/Makefile.in: + * itk/Makefile.in: + Temporarily removed pkg_mkIndex step from Makefile since it causes a + crash on Windows. - * iwidgets3.0.0/generic/labeledframe.itk (_reconfigure): Make sure - that the widget has not been destroyed while in the update - idletasks. FIXME - see if we can eliminate the need for this - update. +1999-08-21 matt + * itcl/unix/Makefile.in: + Fixed mismatch between configure script and makefile for stub + enabled builds - * iwidgets3.0.0/generic/labeledframe.itk (clientHandlesConfigure): - Added method to allow the user of the labeled frame to do the - reconfigure, so this can be batched up and reduce flashing. + * itk/unix/Makefile.in: + Fixed mismatch between conifgure script and Makefile for stub + enabled builds. -1999-03-02 DJ Delorie <dj@cygnus.com> +1999-06-28 hershey + * itk/unix/configure.in: + * itk/unix/itkConfig.sh: + remove version number from comments - * itk/win/configure.in: support cross compiling, fix syntax error - in BASELIBS. - * itk/win/configure: regenerate +1999-06-26 wart + * itcl/mac/itclMacLibrary.r: + * itcl/mac/pkgIndex.tcl: + * itcl/unix/configure.in: + * itk/mac/itkMacLibrary.r: + * itk/mac/pkgIndex.tcl: + * itk/unix/configure.in: + * itk/win/pkgIndex.tcl: + Version numbers changed from 3.0.1 to 3.1.0 -1999-03-02 Syd Polk <spolk@cygnus.com> +1999-05-25 redman + * itcl/generic/itcl.h: + * itcl/win/makefile.vc: + * itk/win/makefile.vc: + * itk/win/winMain.c: + * makefile.vc: + Fixed the use of Tcl & Tk stubs on Windows. + + Now the extra shells (itclsh31.exe and itkwish31.exe) are being + created and run properly. - * itk/win/configure.in: Generated incorrect library name for cygwin - build. - * itk/win/configure: Regenerate. + * itcl/generic/itcl_cmds.c: + * itcl/unix/Makefile.in: + * itcl/unix/configure.in: + * itcl/unix/itclConfig.sh.in: + * itk/generic/itk_cmds.c: + * itk/unix/Makefile.in: + * itk/unix/configure.in: + * itk/unix/itkConfig.sh: + * itk/unix/itkConfig.sh.in: + Fix the makefile and configure files, etc., for Unix + in order to compile with Tcl/Tk 8.1 with stubs. + + Builds itclsh and itkwish properly. -Fri Feb 26 12:48:01 1999 Geoffrey Noer <noer@cygnus.com> +1999-05-24 redman + * itcl/generic/itcl.decls: + * itcl/generic/itcl.h: + * itcl/generic/itclDecls.h: + * itcl/generic/itclInt.decls: + * itcl/generic/itclInt.h: + * itcl/generic/itclIntDecls.h: + * itcl/generic/itclStubInit.c: + * itcl/generic/itclStubLib.c: + * itcl/generic/itcl_cmds.c: + * itcl/generic/itcl_ensemble.c: + * itcl/tests/defs: + * itcl/tests/tclIndex: + * itcl/win/itcl.rc: + * itcl/win/makefile.vc: + * itcl/win/pkgIndex.tcl: + * itk/generic/itk.decls: + * itk/generic/itk.h: + * itk/generic/itkDecls.h: + * itk/generic/itkStubInit.c: + * itk/generic/itkStubLib.c: + * itk/generic/itk_cmds.c: + * itk/win/makefile.vc: + * itk/win/rc/itk.rc: + * makefile.vc: + Applied patches from David Gravereaux to update Itcl and Itk to + use Tcl/Tk 8.1 stubs and provide it's own stubs interface, on + Windows only. + + Changes have not been made to support I18N (if needed) or MT-safety. + + Version number has been changed to 3.1.0 (from 3.0.1) by + David to coincide with the shift to Tcl/Tk 8.1. + + Building of itclsh31.exe and iwish31.exe have been disabled + until someone else makes them work properly. Test suites + have been modified to work with tclsh81.exe instead. - * configure.in: Change "cygwin32*" check to "cygwin*". - * configure: Regenerate. - * itcl/win/configure.in: Change "cygwin32*" check to "cygwin*". - * itcl/win/configure: Regenerate. - * itk/win/configure.in: Change "cygwin32*" check to "cygwin*". - * itk/win/configure: Regenerate. +1999-02-05 stanton + * itk/unix/itkConfig.sh: + updated version to itcl3.0.1 -1999-02-24 James Ingham <jingham@cygnus.com> +1999-01-15 rjohnson + * itcl/tests/mkindex.itcl: + + Fixed typo in tcl file. - * iwidgets3.0.0/generic/labeledframe.itk: Make it derive from Widget - not Archetype (which was a BAD idea). Add an interposing frame so - you didn't have to much with the highlightthickness of the - MegaWidget itself. Doing this allows you to actually use the - labeledframe in derived classes. - * iwidgets3.0.0/generic/scrolledwidget.itk: Derive from labeledframe, - not labeledwidget. This way you can add a relief around the - label, which looks better for scrolled text, scrolled listboxes - and scrolled canvases. - * iwidgets3.0.0/generic scrolledcanvas.itk, scrolledlistbox.itk, - scrolledtext.itk: Pushed throught the changes needed to get the - derivation from labeledframe to work. +1998-10-29 stanton + * itcl/doc/itcl_info.n: + Cleaned up some out of date references to 2.2 syntax. + +1998-09-14 stanton + * itk/win/rc/cursor00.cur: + * itk/win/rc/cursor02.cur: + * itk/win/rc/cursor04.cur: + * itk/win/rc/cursor06.cur: + * itk/win/rc/cursor08.cur: + * itk/win/rc/cursor0a.cur: + * itk/win/rc/cursor0c.cur: + * itk/win/rc/cursor0e.cur: + * itk/win/rc/cursor10.cur: + * itk/win/rc/cursor12.cur: + * itk/win/rc/cursor14.cur: + * itk/win/rc/cursor16.cur: + * itk/win/rc/cursor18.cur: + * itk/win/rc/cursor1a.cur: + * itk/win/rc/cursor1c.cur: + * itk/win/rc/cursor1e.cur: + * itk/win/rc/cursor20.cur: + * itk/win/rc/cursor22.cur: + * itk/win/rc/cursor24.cur: + * itk/win/rc/cursor26.cur: + * itk/win/rc/cursor28.cur: + * itk/win/rc/cursor2a.cur: + * itk/win/rc/cursor2c.cur: + * itk/win/rc/cursor2e.cur: + * itk/win/rc/cursor30.cur: + * itk/win/rc/cursor32.cur: + * itk/win/rc/cursor34.cur: + * itk/win/rc/cursor36.cur: + * itk/win/rc/cursor38.cur: + * itk/win/rc/cursor3a.cur: + * itk/win/rc/cursor3c.cur: + * itk/win/rc/cursor3e.cur: + * itk/win/rc/cursor40.cur: + * itk/win/rc/cursor42.cur: + * itk/win/rc/cursor44.cur: + * itk/win/rc/cursor46.cur: + * itk/win/rc/cursor48.cur: + * itk/win/rc/cursor4a.cur: + * itk/win/rc/cursor4c.cur: + * itk/win/rc/cursor4e.cur: + * itk/win/rc/cursor50.cur: + * itk/win/rc/cursor52.cur: + * itk/win/rc/cursor54.cur: + * itk/win/rc/cursor56.cur: + * itk/win/rc/cursor58.cur: + * itk/win/rc/cursor5a.cur: + * itk/win/rc/cursor5c.cur: + * itk/win/rc/cursor5e.cur: + * itk/win/rc/cursor60.cur: + * itk/win/rc/cursor62.cur: + * itk/win/rc/cursor64.cur: + * itk/win/rc/cursor66.cur: + * itk/win/rc/cursor68.cur: + * itk/win/rc/cursor6a.cur: + * itk/win/rc/cursor6c.cur: + * itk/win/rc/cursor6e.cur: + * itk/win/rc/cursor70.cur: + * itk/win/rc/cursor72.cur: + * itk/win/rc/cursor74.cur: + * itk/win/rc/cursor76.cur: + * itk/win/rc/cursor78.cur: + * itk/win/rc/cursor7a.cur: + * itk/win/rc/cursor7c.cur: + * itk/win/rc/cursor7e.cur: + * itk/win/rc/cursor80.cur: + * itk/win/rc/cursor82.cur: + * itk/win/rc/cursor84.cur: + * itk/win/rc/cursor86.cur: + * itk/win/rc/cursor88.cur: + * itk/win/rc/cursor8a.cur: + * itk/win/rc/cursor8c.cur: + * itk/win/rc/cursor8e.cur: + * itk/win/rc/cursor90.cur: + * itk/win/rc/cursor92.cur: + * itk/win/rc/cursor94.cur: + * itk/win/rc/cursor96.cur: + * itk/win/rc/cursor98.cur: + * itk/win/rc/itk.ico: + Fixed binary files + +1998-09-08 stanton + * CHANGES: + *** empty log message *** + +1998-09-03 stanton + * CHANGES: + * README: + more changes + + * CHANGES: + * Makefile.in: + changes -1999-02-22 Syd Polk <spolk@cygnus.com> + * Makefile.in: + * Makefile.in: + * Makefile.in: + * Makefile.in: + * Makefile.in: + * Makefile.in: + * Makefile.in: + *** empty log message *** - * itcl/win/configure.in: Export ITCL_SH. - * itcl/win/configure: Regenerate. + * Makefile.in: + nothing - * itk/win/configure.in: Set all of the build components based on cygwin - vs. Visual C++. - Fix ITK_BUILD_LIB_SPEC, ITK_LIB_SPEC, ITK_LIB_FULL_PATH. - * itk/win/configure: Regenerate. + * CHANGES: + * Makefile.in: + changed back -1999-02-19 Syd Polk <spolk@cygnus.com> +1998-08-23 stanton + * itcl/doc/scope.n: + fixed section - * itk/win/rc/itk.rc: Fixed problem in .rc file that winres did not - like. +1998-08-20 welch + * itcl/generic/itcl.h: + Patchlevel 3.0.1 -1999-02-18 Syd Polk <spolk@cygnus.com> +1998-08-18 welch + * itk/win/pkgIndex.tcl: + Fixed loading .dll - * itcl/unix/Makefile.in: "make install" was failing - with itclConfig.sh. + * itcl/win/pkgIndex.tcl: + fixed loading .dll - * itcl/win/configure.in: Export ITCL_BUILD_LIB_SPEC and - ITCL_LIB_FULL_PATH. - * itcl/win/configure: Regnerate. - * itcl/win/Makefile.in: Minor corrections to dependencies. + * CHANGES: + *** empty log message *** - * itk/generic/itk_cmds.c: Fixed newline in constant. +1998-08-18 suresh + * itk/generic/itk_cmds.c: + Removed pedantic check for existance of "::itk" namespace. Changed code to + conditionally create the "::itk" namespace based on whether it already exists + or not. These changes were necessary to facilitate the wrapper dictating + where the [incr Tk] libraries are stored in a wrapped application via the + variable '::itk::library". - * itk/win/configure.in: Added AC_OBJEXT. - * itk/win/configure: Regenerated. +1998-08-12 welch + * itk/win/makefile.bc: + * itk/win/makefile.vc: + Fixes for tkConsole - * itk/win/Makefile.in: Added OBJEXT. Overhauled for MSVC - build. +1998-08-11 welch + * CHANGES: + * README: + * itcl/doc/class.n: + * itcl/doc/scope.n: + * itcl/generic/itcl.h: + * itcl/generic/itclInt.h: + * itcl/generic/itcl_bicmds.c: + * itcl/generic/itcl_class.c: + * itcl/generic/itcl_cmds.c: + * itcl/generic/itcl_methods.c: + * itcl/generic/itcl_objects.c: + * itcl/library/itcl.tcl: + * itcl/mac/itclMacApplication.r: + * itcl/mac/itclMacLibrary.r: + * itcl/mac/itclMacResource.r: + * itcl/mac/pkgIndex.tcl: + * itcl/mac/tclMacAppInit.c: + * itcl/tests/info.test: + * itcl/unix/Makefile.in: + * itcl/unix/configure.in: + * itcl/unix/tclAppInit.c: + * itcl/win/itcl.rc: + * itcl/win/itclsh.rc: + * itcl/win/makefile.vc: + * itcl/win/pkgIndex.tcl: + * itcl/win/tclAppInit.c: + * itk/doc/Toplevel.n: + * itk/generic/itk.h: + * itk/generic/itk_cmds.c: + * itk/mac/MW_ItkHeader.pch: + * itk/mac/itkMacApplication.r: + * itk/mac/itkMacLibrary.r: + * itk/mac/itkMacResource.r: + * itk/mac/pkgIndex.tcl: + * itk/mac/tclIndex: + * itk/mac/tkMacAppInit.c: + * itk/unix/Makefile.in: + * itk/unix/configure.in: + * itk/unix/tkAppInit.c: + * itk/win/makefile.vc: + * itk/win/pkgIndex.tcl: + * itk/win/rc/itk.rc: + * itk/win/rc/itkwish.rc: + * itk/win/winMain.c: + * makefile.vc: + 3.0 final from Michael -1999-02-18 James Ingham <jingham@cygnus.com> +1998-08-07 stanton + * itcl/generic/itcl_methods.c: + changed to reflect new CompiledLocal structure + changed to reflect changes in resolver api + changed to use TclInitCompiledLocals interface - * itcl/unix/Makefile.in itk/unix/Makefile.in: fix the install - target so it points to itclConfig.sh in the itcl or itk, rather - than in the itcl/unix or itk/unix directories. - * itcl/win/configure.in: use the ITCLCYGRC & ITCLCYGSHRC variables - in the name of the windres output file. - * itcl.rc: For some reason, windres is choking on STRINGIFY of the - Itcl version numbers. Some day we should figure out why. For - now, I just put in the version numbers by hand. + * itcl/generic/itclInt.h: + changed to reflect new resolver api -1999-02-10 Syd Polk <spolk@cygnus.com> + * itcl/generic/itcl_bicmds.c: + * itcl/generic/itcl_ensemble.c: + changed to reflect new CompiledLocal structure - * Makefile.in: Propogate make errors from subdirectories - back to the top level. + * itcl/generic/itcl_class.c: + changed to reflect changes in resolver api - * itcl/win/configure.in: Moved itclConfig.sh. Fixed problems - finding tclConfig.sh and tkConfig.sh. - Figure out all of the appropriate directories at this level - so that cygwin and msvc differences can be accounted for. - * itcl/win/configure: Regenerate. - * itcl/win/Makefile.in: Use OBJEXT. - Set build directories correctly. - Set -DDLL_BUILD, -DSTATIC_BUILD, and -DBUILD_itcl correctly. + * itcl/doc/scope.n: + fixed section name - * itk/win/configure.in: Moved itkConfig.sh. Look for itclConfig.sh - in new place. Fixed problems finding tclConfig.sh and tkConfig.sh. - * itk/win/configure: Regnerate. + * itcl/doc/scope.n: + *** empty log message *** - * itcl/generic/itcl_cmds.c (initScript): Fixed broken new line. + * itcl/generic/itcl_cmds.c: + * itcl/generic/itcl_util.c: + * itk/doc/Toplevel.n: + lint - * itcl/win/dllEntryPoint.c: DllMain was not setup correctly for - Microsoft. +1998-08-04 escoffon + * itcl/generic/itcl.h: + * itcl/generic/itclInt.h: + * itk/generic/itk.h: + EXPORT is now TCL_STORAGE_CLASS -1999-02-09 James Ingham <jingham@cygnus.com> +1998-07-29 escoffon + * itcl/generic/itcl.h: + added setting of EXPORT to DLLEXPORT if we are building the + itcl lib. - * itcl/itcl/unix/configure.in: - * itcl/itk/unix/configure.in: - LD_SEARCH_FLAGS should NOT be passed to the library build line. + * itk/generic/itk.h: + - dropped the EXPORT macro, it is now part of EXTERN + - added setting of EXPORT to DLLEXPORT if we are building the itk lib. - * itcl/itcl/unix/configure: - * itcl/itk/unix/configure: - regenerate. + * itcl/generic/itclInt.h: + - added setting of EXPORT to DLLEXPORT if we are building the itcl lib. + - use EXTERN instead of extern for Itcl_Assert - * itcl/itk/generic/itk_archetype.c: Put a few CYGNUS LOCAL markers - in around the 8.1 Fixups that I had left out. - -1992-02-08 Syd Polk <spolk@cygnus.com> - - * itcl/itcl/unix/configure.in: Moved itclConfig.sh.in up a level - so that building on Windows will work. - Added exporting of itclsh so that other parts of the build - tree can call it. - Added exporting of TCL_CFLAGS. - Added exporting of TCL_LIB_FULL_PATH. - Generate and export ITCL_LIB_FULL_PATH. - * itcl/itcl/unix/configure: Regenerated - * itcl/itcl/unix/Makefile.in: Use TCL_CFLAGS so that - -fwritable-strings is enabled. - Add dependency for TCL_LIB_FULL_PATH. - * itcl/itclConfig.sh.in: Moved from lower directory. - * itcl/itk/unix/configure.in: Moved itkConfig.sh.in up a level. - Added export of TCL_CFLAGS. - Added export of TCL_LIB_FULL_PATH, TK_LIB_FULL_PATH, - ITCL_LIB_FULL_PATH, and ITK_LIB_FULL_PATH. - * itcl/itk/unix/Makefile.in: Use TCL_CFLAGS so that - -fwritable-strings is enabled. - Add dependencies for TCL_LIB_FULL_PATH and TK_LIB_FULL_PATH. - * itcl/itk/unix/configure: Regenerated. - * itcl/itkConfig.sh.in: Moved from a lwoer directory. - * itcl/iwidgets3.0.0/configure.in: Look for itclConfig.sh and - itkConfig.sh in different places. - -1999-02-05 James Ingham <jingham@cygnus.com> - - * itcl/itk/generic/itk_archetype.c (Itk_ArchCompAddCmd): - * itcl/itcl/generic/itcl_cmds.c (Itcl_ProtectionCmd): - itcl/itcl/generic/itcl_ensemble.c (Itcl_EnsembleCmd): - itcl/itcl/generic/itcl_methods.c (Itcl_EvalMemberCode): - (Itcl_ConstructBase): - itcl/itcl/generic/itcl_obsolete.c (ItclOldClassCmd): - itcl/itcl/generic/itcl_parse.c (Itcl_ClassCmd): - (Itcl_ClassProtectionCmd): - Fix up calls to Tcl_EvalObj for Tcl8.1. - - * itcl/itcl/unix/configure.in: - * itcl/itk/unix/configure.in: - Pick up CFLAGS from AC_PROG_CC rather than hard coding them. - * itcl/itcl/unix/configure: - * itcl/itk/unix/configure: - regenerate. - -1999-01-30 Brendan Kehoe <brendan@cygnus.com> - - * Makefile.in (install-info info install-check): Add these null - rules, for the standard build process to work.. - -1999-01-28 James Ingham <jingham@cygnus.com> - - * itcl/itcl/unix/configure.in: Check the TCL_LIB_VERSIONS_OK - variable, and strip out dots if it is nodots. - * itcl/itk/unix/configure.in: Check the TCL_LIB_VERSIONS_OK - variable, and strip out dots if it is nodots. - * itcl/itcl/unix/configure: regenerate. - * itcl/itk/unix/configure: regenerate. - -1999-01-21 James Ingham <jingham@cygnus.com> - - * itcl/library/init.tcl (auto_import): Comment out this function. - It does not work, because it can not populate the source - namespace's export list. There is no easy way to fix this, and - since it is just an optimization over the original Tcl proc, we - will just use Tcl one for now. - -1999-01-20 James Ingham <jingham@cygnus.com> - - * itcl/library/init.tcl: updated to Itcl 3.0.1. Does not force - the addition of class to the auto_mkindex_parser namespace, but - uses the namespace import instead. - -1998-12-15 Martin M. Hunt <hunt@cygnus.com> - - * iwidgets3.0.0/generic/panedwindow.itk: Reverted back to original - distribution. The new panedwindow widget is now in libgui. - - * iwidgets3.0.0/generic/pane.itk: Reverted. - -1998-12-11 Martin M. Hunt <hunt@cygnus.com> - - * iwidgets3.0.0/generic/panedwindow.itk: Major changes to - support panes that are fixed (non-resizable). This allows - the panedwindow to be used as a more general purpose - container widget where individual parts may or may not be - resizable. - - * iwidgets3.0.0/generic/pane.itk (iwidgets::Pane): Added - -resizable option to support non-resizable panes. - -1998-12-08 Martin M. Hunt <hunt@cygnus.com> - - * iwidgets3.0.0/generic/panedwindow.itk: Major changes to - the default look and resizing method to be more modern, more - windows-like, and work better when widgets are placed in childsites. +1998-07-28 stanton + * itcl/generic/itcl_cmds.c: + * itk/generic/itk_cmds.c: + changed search order diff --git a/itcl/Makefile.in b/itcl/Makefile.in index c2c68aa43b1..557ae7461f2 100644 --- a/itcl/Makefile.in +++ b/itcl/Makefile.in @@ -33,7 +33,7 @@ all: done; test: - for dir in itcl itk iwidgets3.0.0 ; do \ + for dir in itcl itk ; do \ if test -d $$dir ; then \ echo "$$dir: $(MAKE) $@" ;\ if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ @@ -102,8 +102,6 @@ install-libraries: fi \ done; -install-info info install-check: - clean: for dir in $(subdirs) ; do \ if test -d $$dir ; then \ @@ -131,12 +129,10 @@ distclean: # to put the distribution. # -# CYGNUS LOCAL -#configure: configure.in -# autoconf -# for dir in $(subdirs) ; do \ -# if (cd $$dir; autoconf) ; then true ; else exit 1 ; fi ; \ -# done; -# END CYGNUS LOCAL +configure: configure.in + autoconf + for dir in $(subdirs) ; do \ + if (cd $$dir; autoconf) ; then true ; else exit 1 ; fi ; \ + done; # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/itcl/README b/itcl/README new file mode 100644 index 00000000000..94d4e189536 --- /dev/null +++ b/itcl/README @@ -0,0 +1,320 @@ +------------------------------------------------------------------------ + [incr Tcl] - version 3.2 for Tcl/Tk 8.0.3 and beyond +------------------------------------------------------------------------ + This is a bug-fix release in the itcl3.x series. + + As much as possible, I've tried to make itcl3.x backward-compatible + with earlier releases. The class definition syntax has not changed + at all from itcl2.2, and the old itcl1.x syntax is still supported. + But you'll notice changes related to the new namespace mechanism in + Tcl 8.0. For information on incompatibilities and porting to itcl3.x, + read the INCOMPATIBLE file in this directory, or check out the itcl + web site: + + http://www.tcltk.com/itcl/ + + Many people through the years have helped me with [incr Tcl] + development, and I thank them for their contributions. Please + read the acknowledgements section below. + + Send comments or suggestions to the [incr Tcl] mailing list + (itcl@scriptics.com) or directly to me (mmc@cadence.com). + If you want to subscribe to the mailing list, send a message + with the subject "subscribe" to "itcl-request@tcltk.com". + +======================================================================== + Copyright (c) 1993-1998 Lucent Technologies, Inc. + Copyright (c) 1998-2000 Cadence Design Systems, Inc. +======================================================================== + + OVERVIEW +------------------------------------------------------------------------ + - What is [incr Tcl]? + - Getting started + - Installation + - Integrating [incr Tcl] with other extensions + - Acknowledgements +------------------------------------------------------------------------ + + + What is [incr Tcl]? +------------------------------------------------------------------------ + [incr Tcl] is an object-oriented extension of the Tcl language. It + was created to support more structured programming in Tcl. Tcl scripts + that grow beyond a few thousand lines become extremely difficult to + maintain. This is because the building blocks of vanilla Tcl are + procedures and global variables, and all of these building blocks + must reside in a single global namespace. There is no support for + protection or encapsulation. + + [incr Tcl] introduces the notion of objects. Each object is a bag + of data with a set of procedures or "methods" that are used to + manipulate it. Objects are organized into "classes" with identical + characteristics, and classes can inherit functionality from one + another. This object-oriented paradigm adds another level of + organization on top of the basic variable/procedure elements, and + the resulting code is easier to understand and maintain. + + Among other things, [incr Tcl] can be used to create new widgets that + look and work like the usual Tk widgets, but are written entirely at + the Tcl language level (C code is optional). These "mega-widgets" + can be created using [incr Tk], a set of base classes which provide + the core mega-widget functionality. [incr Widgets] is a set of + high-level mega-widgets built using [incr Tk]. It has more than + 50 widget classes, and can be used right out of the box to create: + + - fileselectiondialog + - tabnotebook + - panedwindow + - scrolledhtml + - combobox + - optionmenu + - scrolledlistbox + - scrolledframe + - messagedialog + - and many others... + + Classes and/or related procedures can also be encapsulated in their + own "namespace". A namespace is a collection of commands, variables, + classes and other namespaces that is set apart from the usual global + scope. Elements within a namespace can be "private" or "protected", + so that access to them is restricted. An "import" command allows all + of the elements from one namespace to be integrated into another. + + Extension writers will immediately see the benefit of namespaces. + With vanilla Tcl, each extension must add its commands and variables + at the global scope. Extension writers are encouraged to add a unique + prefix to all of the names in their package, to avoid naming collisions. + Extensions can now sit in their own namespace of commands and variables, + and sensitive elements can be protected from accidental access. For + example, the current release of [incr Tcl] has a namespace "itcl" + for object-oriented support, a namespace "itk" for mega-widget + support, and a namespace "iwidgets" for the [incr Widgets] package. + Each of these namespaces has its own collection of commands and + variables. Developers can then pick and choose among the extensions, + and integrate the parts that they need for their application by + importing various namespaces at the global scope. + + + Getting started +------------------------------------------------------------------------ + If you're just getting started with [incr Tcl], check out these + useful resources: + + - FREE TUTORIAL on our web site: http://www.tcltk.com/itcl/ + + - BOOK: "[incr Tcl/Tk] from the Ground Up," by Chad Smith + (ISBN 0-07-212106-8) + + - BOOK: "Tcl/Tk Tools," edited by Mark Harrison + (ISBN 1-56592-218-2) + + Also, run the "catalog" demo to get an overview of the [incr Widgets] + package. On Windows and Macintosh systems, this is installed as one + of the executables. On Unix systems, this is installed in the + "lib/itcl/iwidgets3.0.0/demos" library directory. + + The file "iwidgets3.0.0/doc/iwidgets.ps" contains a tutorial + introduction to the [incr Widgets] package. The mega-widget classes + in [incr Widgets] show off most of the functionality in this release. + You can use them as a pattern to create your own widget classes. + + If you're a seasoned itcl professional, check the CHANGES file for a + summary of recent enhancements. Consult the man pages for detailed + information on particular commands. + + Check out our web site for the latest news: + + http://www.tcltk.com/itcl/ + + + Installation on Unix Systems +------------------------------------------------------------------------ + 1) Obtain this distribution from an archive site like this: + + ftp ftp.tcltk.com + cd pub/itcl + binary + get itcl3.2.tar.gz + quit + + + 2) Uncompress and untar the distribution: + + gunzip itcl3.2.tar.gz + tar xvf itcl3.2.tar + + + 3) Run the configuration script: + + cd itcl3.2 + ./configure + + or, for systems that don't recognize "#!" in shell scripts: + + cd itcl3.2 + /bin/sh ./configure + + The "configure" script finds the appropriate compiler flags and + generates new Makefiles from template files (Makefile.in). + + By default, the configuration script will set things up so + that everything is installed in "/usr/local". You can change + this by specifying a different "prefix" in the "configure" command: + + ./configure --prefix=/your/install/path + + If your Tcl installation is sitting somewhere other than right + next to this package, you may have to tell configure where to + find it: + + ./configure --with-tcl=/usr/local/tcl/lib + + If you like the gcc compiler and/or want to debug, you can add + those options as well: + + ./configure --enable-gcc --enable-symbols + + + 4) Build the libraries and the executables. From the toplevel + directory type: + + make all + + + 5) Install the libraries, executables, man pages and script files. + From the toplevel directory type: + + make install + + + 6) Use the final product: + + $ tclsh + % package require Itcl + % itcl::class Foo { method testing {} { return "testing!" } } + + If you don't like the itcl:: prefix, you can import the itcl + commands into the global namespace: + + % namespace import -force itcl::* + % class Foo { ... } + + Note that you'll find the same behavior with [incr Widgets]: + + $ wish + % package require Iwidgets + % iwidgets::optionmenu .om + % namespace import -force iwidgets::* + % optionmenu .om + + + Installation on Windows 95/98/NT +------------------------------------------------------------------------ + Follow the usual TEA instructions for building under Windows. + Requires Cygwin and Visual C++ 6.0. + + + Installation on Macintosh Systems +------------------------------------------------------------------------ + Many thanks to Jim Ingham for putting up Macintosh binaries for + various releases. Check out http://www.tcltk.com/itcl for downloads. + + + Integrating [incr Tcl] with other extensions +------------------------------------------------------------------------ + [incr Tcl] is now a pure extension to Tcl/Tk. Therefore, if you + build the Tcl/Tk core and this package with the "--enable-shared" + option, you can load [incr Tcl] into a vanilla tclsh, as follows: + + package require Itcl + + Similarly, you can load [incr Tcl] along with the [incr Tk] mega-widget + facility into a vanilla wish, as follows: + + package require Itk + + You can load [incr Tcl], [incr Tk], and the [incr Widgets] package + like this: + + package require Iwidgets + + If you require the earlier release of [incr Widgets] for some reason, + you can specify the version number: + + package require Iwidgets 2.2 + + Other packages should plug-and-play in the same fashion. + + >> NOTE: If you have any trouble with dynamic loading on UNIX + >> systems, you may need to set your LD_LIBRARY_PATH environment + >> variable to include the "lib" directory for your Tcl/Tk + >> installation. For example: + >> + >> LD_LIBRARY_PATH="/usr/local/tcl/lib:$LD_LIBRARY_PATH" + >> export LD_LIBRARY_PATH + + + Acknowledgements +------------------------------------------------------------------------ + Thanks to Chad Smith for writing an excellent, comprehensive + book "[incr Tcl/Tk] from the Ground Up," for many helpful bug + reports, and for nudging me along to fix things. + + Thanks to Matt Newman for providing the Tcl-only "tcl++" package + that helped so many people move forward while waiting for the + itcl3.0 release. + + Thanks to John Ousterhout and the Scriptics team for bundling this + package with their TclPro product. It's gratifying to see [incr Tcl] + accepted as a mainstream product. + + Thanks to Mark Ulferts, Sue Yockey, John Sigler, Bill Scott, Alfredo + Jahn, Bret Schuhmacher, Tako Schotanus and Kris Raney for building + the [incr Widgets] package. With a sketchy overview and a crappy + prototype of [incr Tk], they managed to build a nice set of mega-widgets. + Their initial designs helped me smooth out the rough spots in [incr Tk]. + Thanks especially to Mark Ulferts for keeping things up over the past + few years, and for streamlining the package for itcl3.0. + + Thanks to Jan Nijtmans, Karel Zuiderveld, and Vince Darley for helping + to keep up with Tcl/Tk releases, and for supporting the "plus" and + "dash" patches under [incr Tcl]. + + Thanks to Forest Rouse and ICEM CFD Engineering for integrating + [incr Tcl] into their Tcl/Tk compiler. This is a large undertaking, + and they have done an excellent job. + + Thanks to Alfredo Jahn and Bret Schuhmacher at WebNet for helping + to create the [incr Tcl] web site, and for maintaining the + [incr Tcl] mailing list for many years. + + Thanks to extension writers like Mark Diekhans (tclX) and Ioi Lam (Tix) + for making their packages compatible with [incr Tcl]. + + Thanks to George Howlett for teaching me how namespaces should really + work. He has been a constant source of inspiration, and has kept + a careful watch against many bad ideas. Jim Ingham fleshed out the + notion of explicit scoping, added many nice features to [incr Tk], + and has helped tremendously with porting. Lee Bernhard worked on + distributed systems with Iclient/Iserver, and also helped with porting. + Bill Scott, with a steady stream of bug reports, helped me understand + the questions that a typical user might have. He forced me to reinvent + the paradigm on more than one occasion. + + Thanks to all of the alpha-testers that helped me polish this release. + + Thanks to Mark Harrison for his enthusiasm and support. Due in + large part to his evangelism, I have been able to make [incr Tcl] + development a mainstream activity. + + And many thanks to my wife Maria and my children Maxwell and Katie + for putting up with all of this. + +--Michael +. . . . . . . . . . . . . . . . . ---_----------- + . . . . . . . . . | c a d e n c e | + Michael McLennan . --------------- + mmc@cadence.com . Cadence Design Systems, Inc. + phone: 610-398-6348 . 7535 Windsor Dr. Suite A-200 + fax: 610-530-7985 . Allentown, PA 18195 diff --git a/itcl/README.vc.txt b/itcl/README.vc.txt new file mode 100644 index 00000000000..7ff70605d93 --- /dev/null +++ b/itcl/README.vc.txt @@ -0,0 +1,65 @@ +------------------------------------------------------------------------
+ How to build [Incr Tcl/Tk] with Visual C++ and makefile.vc
+------------------------------------------------------------------------
+
+[The condition of this "new thing" is experimental. All non-functional
+aspects are a bug, not a feature.]
+
+1) Open config.vc into a text editor and fill in the required information
+ following the notes in the comments. The makefile.vc files should not
+ ever need editing. If they do need editing to build Itcl, it's a bug.
+
+2) There are a number of macros you can specify on the commandline to
+ effect the build. These are all optional. They're contained in
+ rules.vc, but here are the meanings:
+
+ DEBUG=(0|1)
+ Set to one for a symbols build. Defaults to non-symbols
+ when left out.
+ STATIC_BUILD=(0|1)
+ Will make a static library instead of a dll.
+ NOMSVCRT=(0|1)
+ Will reference libcmt(d).lib for the runtime when set to one.
+ This is zero by default unless STATIC_BUILD is set to one.
+ OUT_DIR=<someDir>
+ You may specify where the output binaries are placed. Defaults
+ to the build directory when not specified.
+
+Example commandlines:
+
+C:\itcl3.2.1> nmake -f makefile.vc
+
+ Builds Itcl and Itk full optimization and no symbols for a dll
+
+C:\itcl3.2.1> nmake -f makefile.vc DEBUG=1 OUT_DIR=c:\progra~1\tcl\lib\itcl3.2
+
+ Builds Itcl and Itk with debugging info for edit/continue (if vc6) and
+ places both DLLs in c:\progra~1\tcl\lib\itcl3.2 . I can see the obvious
+ bug with that now <shrug>. Darn. You could go into each directory
+ seperately instead or just replace 'makefile.vc' above with
+ 'itcl\win\makefile.vc' and specify OUT_DIR as you would like it.
+
+C:\itcl3.2.1> nmake -f makefile.vc STATIC_BUILD=1
+
+ Builds a static library of both Itcl and Itk instead of a DLL and the
+ static libcmt run-time.
+
+C:\itcl3.2.1> nmake -f makefile.vc STATIC_BUILD=1 NOMSVCRT=0
+
+ Same as above, but uses msvcrt. In TclPro, these were known with the 'x'
+ suffix.
+
+C:\itcl3.2.1> nmake -f makefile.vc STATIC_BUILD=0 NOMSVCRT=1
+
+ Invalid. Makes bloaty DLLs.
+
+C:\itcl3.2.1> nmake -f makefile.vc install
+
+ Installs to wherever INSTALLDIR was set in config.vc . At the moment,
+ this isn't an over-ride as the commandline macros are. Should I make
+ it an over-ride?
+
+Enjoy...
+--
+David Gravereaux <davygrvy@pobox.com>
+7:07 PM 5/23/2001
diff --git a/itcl/config.vc b/itcl/config.vc new file mode 100644 index 00000000000..357cc618940 --- /dev/null +++ b/itcl/config.vc @@ -0,0 +1,73 @@ +######################################################################
+#
+# Edit for your local configuration. This should be the only file
+# that needs editing to build [Incr Tcl/Tk].
+#
+# RCS: @(#) $Id$
+######################################################################
+
+# only affects the linker and resource compiler
+# pick from:
+# ALPHA|ARM|IX86|MIPS|MIPS16|MIPSR41XX|PPC|SH3|SH4
+#
+# Or set to IA64 to rearrange everything to use the Intel IA64 SDK.
+#
+MACHINE = IX86
+
+
+# are we MSVC++ version 5 or 6 ?
+#
+MSDEV_VER = 6
+
+# Where is MSVC++ located?
+#
+MSDEVROOT = C:\Dev\DevStudio60
+
+# Where is Tcl ?
+#
+TCLROOT = D:\tclpro_ws\tcl
+
+# Does the above path point to the Tcl install or sources ?
+#
+ISTCLINSTALL = 0
+
+# Where is Tk ? Only needed for a build from the sources.
+#
+!if $(ISTCLINSTALL) == 0
+TKROOT = D:\tclpro_ws\tk
+!endif
+
+# Where are we installing to? When TCLROOT is already the install, this
+# is bypassed.
+#
+!if $(ISTCLINSTALL) == 0
+INSTALLDIR = c:\progra~1\tcl
+!else
+INSTALLDIR = $(TCLROOT)
+!endif
+
+# What Tcl version are we grabbing ?
+#
+TCLMAJOR = 8
+TCLMINOR = 4
+
+TCL_VERSION = $(TCLMAJOR)$(TCLMINOR)
+TCL_DOTVERSION = $(TCLMAJOR).$(TCLMINOR)
+
+
+!if "$(MACHINE)" == "IA64"
+# untested logic path
+#
+vcvars = "c:\ia64sdk17\vcvars32.bat"
+!elseif $(MSDEV_VER) == 5
+vcvars = "$(MSDEVROOT)\vc\bin\vcvars32.bat"
+!elseif $(MSDEV_VER) == 6
+vcvars = "$(MSDEVROOT)\vc98\bin\vcvars32.bat"
+!endif
+
+rc32 = rc
+cc32 = cl
+link32 = link
+lib32 = lib
+cvtres32 = cvtres
+
diff --git a/itcl/config/installFile.tcl b/itcl/config/installFile.tcl new file mode 100755 index 00000000000..53c24392fba --- /dev/null +++ b/itcl/config/installFile.tcl @@ -0,0 +1,119 @@ +#!/bin/sh +# +# installFile.tcl - a Tcl version of install-sh +# that copies a file and preserves its permission bits. +# This also optimizes out installation of existing files +# that have the same size and time stamp as the source. +# +# \ +exec tclsh8.3 "$0" ${1+"$@"} + +set doCopy 0 ;# Rename files instead of copy +set doStrip 0 ;# Strip the symbols from installed copy +set verbose 0 +set src "" +set dst "" + +# Process command line arguments, compatible with install-sh + +for {set i 0} {$i < $argc} {incr i} { + set arg [lindex $argv $i] + switch -- $arg { + -c { + set doCopy 1 + } + -m { + incr i + # Assume UNIX standard "644", etc, so force Tcl to think octal + set permissions 0[lindex $argv $i] + } + -o { + incr i + set owner [lindex $argv $i] + } + -g { + incr i + set group [lindex $argv $i] + } + -s { + set doStrip 1 + } + -v { + set verbose 1 + } + default { + set src $arg + incr i + set dst [lindex $argv $i] + break + } + } +} +if {[string length $src] == 0} { + puts stderr "$argv0: no input file specified" + exit 1 +} +if {[string length $dst] == 0} { + puts stderr "$argv0: no destination file specified" + exit 1 +} + +# Compatibility with CYGNUS-style pathnames +regsub {^/(cygdrive)?/(.)/(.*)} $src {\2:/\3} src +regsub {^/(cygdrive)?/(.)/(.*)} $dst {\2:/\3} dst + +if {$verbose && $doStrip} { + puts stderr "Ignoring -s (strip) option for $dst" +} +if {[file isdirectory $dst]} { + set dst [file join $dst [file tail $src]] +} + +# Temporary file name + +set dsttmp [file join [file dirname $dst] #inst.[pid]#] + +# Optimize out install if the file already exists + +set actions "" +if {[file exists $dst] && + ([file mtime $src] == [file mtime $dst]) && + ([file size $src] == [file size $dst])} { + + # Looks like the same file, so don't bother to copy. + # Set dsttmp in case we still need to tweak mode, group, etc. + + set dsttmp $dst + lappend actions "already installed" +} else { + file copy -force $src $dsttmp + lappend actions copied +} + +# At this point "$dsttmp" is installed, but might not have the +# right permissions and may need to be renamed. + + +foreach attrName {owner group permissions} { + upvar 0 $attrName attr + + if {[info exists attr]} { + if {![catch {file attributes $dsttmp -$attrName} dstattr]} { + + # This system supports "$attrName" kind of attributes + + if {($attr != $dstattr)} { + file attributes $dsttmp -$attrName $attr + lappend actions "set $attrName to $attr" + } + } + } +} + +if {[string compare $dst $dsttmp] != 0} { + file rename -force $dsttmp $dst +} +if {$verbose} { + puts stderr "$dst: [join $actions ", "]" +} +exit 0 diff --git a/itcl/configure b/itcl/configure index 669b6450666..e1ee20c4026 100755 --- a/itcl/configure +++ b/itcl/configure @@ -29,7 +29,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -144,7 +143,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -315,11 +313,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -485,16 +478,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -533,56 +522,10 @@ else fi -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:563: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 +# RCS: $Id$ - -# Note, we don't use the files in the config subdirectory! ac_aux_dir= -for ac_dir in .. $srcdir/..; do +for ac_dir in config $srcdir/config; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -594,40 +537,13 @@ for ac_dir in .. $srcdir/..; do fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; } + { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:605: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi -# END CYGNUS LOCAL # ----------------------------------------------------------------------- # @@ -642,7 +558,7 @@ echo $ac_n "checking for prefix by $ac_c" 1>&6 # Extract the first word of "itclsh", so it can be a program name with args. set dummy itclsh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:646: checking for $ac_word" >&5 +echo "configure:562: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ITCLSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -680,7 +596,8 @@ fi fi -subdirs="itcl itk iwidgets3.0.0" +subdirs="itcl itk" + trap '' 1 2 15 @@ -827,12 +744,6 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@SET_MAKE@%$SET_MAKE%g s%@ITCLSH@%$ITCLSH%g s%@subdirs@%$subdirs%g @@ -967,7 +878,7 @@ if test "$no_recursion" != yes; then esac done - for ac_config_dir in itcl itk iwidgets3.0.0; do + for ac_config_dir in itcl itk; do # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. diff --git a/itcl/configure.in b/itcl/configure.in index 91cfa0b0dde..dd73de7e444 100644 --- a/itcl/configure.in +++ b/itcl/configure.in @@ -1,18 +1,12 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during [incr Tcl] -dnl installation to configure the system for the local environment. -dnl RCS: $Id$ - -# CYGNUS LOCAL -AC_PREREQ(2.5) +dnl installation to configure the system for the local environment. AC_INIT(itcl/generic/itcl.h) -AC_CANONICAL_HOST +# RCS: $Id$ -# Note, we don't use the files in the config subdirectory! -AC_CONFIG_AUX_DIR(..) -AC_PROG_MAKE_SET -# END CYGNUS LOCAL +AC_CONFIG_AUX_DIR(config) +AC_PREREQ(2.0) # ----------------------------------------------------------------------- # @@ -24,7 +18,8 @@ AC_PROG_MAKE_SET AC_PREFIX_DEFAULT(/usr/local) AC_PREFIX_PROGRAM(itclsh) -AC_CONFIG_SUBDIRS(itcl itk iwidgets3.0.0) +AC_CONFIG_SUBDIRS(itcl itk) + AC_OUTPUT(Makefile, chmod +x ${srcdir}/config/install-sh ${srcdir}/config/mkinstalldirs) diff --git a/itcl/itcl/Makefile.in b/itcl/itcl/Makefile.in index 1fb42d93e0c..3dce5accee2 100644 --- a/itcl/itcl/Makefile.in +++ b/itcl/itcl/Makefile.in @@ -115,9 +115,7 @@ GENERIC_HDRS= \ SAMPLE_NEW_VAR=@SAMPLE_NEW_VAR@ -# CYGNUS LOCAL -ITCL_LIBRARY = @datadir@/itcl$(VERSION) -# END CYGNUS LOCAL +ITCL_LIBRARY = $(prefix)/lib/itcl$(VERSION) ITCL_GENERIC_DIR_NATIVE = @ITCL_GENERIC_DIR_NATIVE@ ITCL_UNIX_DIR_NATIVE = @ITCL_UNIX_DIR_NATIVE@ @@ -157,9 +155,8 @@ pkgincludedir = $(includedir)/@PACKAGE@@VERSION@ top_builddir = . -# CYGNUS LOCAL -INSTALL = @INSTALL@ -# END CYGNUS LOCAL +#INSTALL = $(top_srcdir)/../config/install-sh -c +INSTALL = $(TCLSH_PROG) `@CYGPATH@ $(srcdir)/../config/installFile.tcl` -c INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -295,6 +292,7 @@ install-doc: doc @for i in $(srcdir)/doc/*.n; \ do \ echo "Installing $$i"; \ + rm -f $(mandir)/mann/`basename $$i`; \ $(INSTALL_DATA) $$i $(mandir)/mann ; \ done @@ -321,12 +319,12 @@ depend: $(itcl_LIB_FILE): $(itcl_OBJECTS) -rm -f $(itcl_LIB_FILE) @MAKE_LIB@ - @POST_MAKE_LIB@ + $(RANLIB) $(itcl_LIB_FILE) $(itclstub_LIB_FILE): $(itclstub_OBJECTS) -rm -f $(itclstub_LIB_FILE) @MAKE_STATIC_LIB@ - @POST_MAKE_STATIC_LIB@ + $(RANLIB) $(itclstub_LIB_FILE) #======================================================================== # We need to enumerate the list of .c to .o lines here. diff --git a/itcl/itcl/aclocal.m4 b/itcl/itcl/aclocal.m4 index 09bc09fa2b7..7ca9320395f 100644 --- a/itcl/itcl/aclocal.m4 +++ b/itcl/itcl/aclocal.m4 @@ -1,2 +1 @@ builtin(include,../tcl.m4) -builtin(include,../cygtcl.m4) diff --git a/itcl/itcl/configure b/itcl/itcl/configure index 31c237447c5..9e90aa4f47f 100755 --- a/itcl/itcl/configure +++ b/itcl/itcl/configure @@ -12,6 +12,8 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help + --enable-gcc allow use of gcc if available [--disable-gcc]" +ac_help="$ac_help --with-tcl directory containing tcl configuration (tclConfig.sh)" ac_help="$ac_help --enable-threads build with threads" @@ -36,7 +38,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -151,7 +152,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -322,11 +322,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -492,16 +487,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -540,9 +531,8 @@ else fi -# CYGNUS LOCAL ac_aux_dir= -for ac_dir in ../.. $srcdir/../..; do +for ac_dir in ../config $srcdir/../config; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -554,13 +544,12 @@ for ac_dir in ../.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in ../.. $srcdir/../.." 1>&2; exit 1; } + { echo "configure: error: can not find install-sh or install.sh in ../config $srcdir/../config" 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. -# END CYGNUS LOCAL #-------------------------------------------------------------------- # __CHANGE__ @@ -574,7 +563,7 @@ PACKAGE=itcl MAJOR_VERSION=3 MINOR_VERSION=2 -PATCHLEVEL=.0 +PATCHLEVEL=.1 VERSION=${MAJOR_VERSION}.${MINOR_VERSION} NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} @@ -612,11 +601,31 @@ fi # was not used. #-------------------------------------------------------------------- -# CYGNUS LOCAL -# Extract the first word of "gcc", so it can be a program name with args. + + # Check whether --enable-gcc or --disable-gcc was given. +if test "${enable_gcc+set}" = set; then + enableval="$enable_gcc" + ok=$enableval +else + ok=no +fi + + if test "$ok" = "yes"; then + CC=gcc + else + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) + CC=cl + ;; + *) + CC=${CC-cc} + ;; + esac + fi + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:620: checking for $ac_word" >&5 +echo "configure:629: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -646,7 +655,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:650: checking for $ac_word" >&5 +echo "configure:659: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -697,7 +706,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:701: checking for $ac_word" >&5 +echo "configure:710: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -729,7 +738,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -740,12 +749,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 744 "configure" +#line 753 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -771,12 +780,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:780: checking whether we are using GNU C" >&5 +echo "configure:789: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -785,7 +794,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -804,7 +813,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:808: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:817: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -835,7 +844,7 @@ else fi fi -# END CYGNUS LOCAL + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -848,7 +857,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:852: checking for a BSD compatible install" >&5 +echo "configure:861: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -906,7 +915,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' #-------------------------------------------------------------------- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:910: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:919: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -940,7 +949,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:944: checking for $ac_word" >&5 +echo "configure:953: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -973,12 +982,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:977: checking for Cygwin environment" >&5 +echo "configure:986: 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 982 "configure" +#line 991 "configure" #include "confdefs.h" int main() { @@ -989,7 +998,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -1011,13 +1020,13 @@ test "$ac_cv_cygwin" = yes && CYGWIN=yes #-------------------------------------------------------------------- echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1015: checking for object suffix" >&5 +echo "configure:1024: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1035,19 +1044,19 @@ OBJEXT=$ac_cv_objext ac_objext=$ac_cv_objext echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:1039: checking for mingw32 environment" >&5 +echo "configure:1048: 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 1044 "configure" +#line 1053 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:1051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -1066,7 +1075,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1070: checking for executable suffix" >&5 +echo "configure:1079: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1076,10 +1085,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1114,38 +1123,9 @@ ac_exeext=$EXEEXT # file for you. #-------------------------------------------------------------------- -case "${host}" in - *mingw32* | *windows32*) - # Extract the first word of "cygpath", so it can be a program name with args. -set dummy cygpath; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1123: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CYGPATH"; then - ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CYGPATH="cygpath -w" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" -fi -fi -CYGPATH="$ac_cv_prog_CYGPATH" -if test -n "$CYGPATH"; then - echo "$ac_t""$CYGPATH" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) + CYGPATH="cygpath -w" RELPATH=".. .. bin" ;; *) @@ -1161,16 +1141,12 @@ esac # Includes for this package #-------------------------------------------------------------------- -# CYGNUS LOCAL -srcdir=`cd ${srcdir} ; pwd` -ITCL_SRC_DIR_NATIVE=`${CYGPATH} ${srcdir}` -# END CYGNUS LOCAL ITCL_GENERIC_DIR_NATIVE=`${CYGPATH} ${srcdir}/generic` ITCL_WIN_DIR_NATIVE=`${CYGPATH} ${srcdir}/win` ITCL_UNIX_DIR_NATIVE=`${CYGPATH} ${srcdir}/unix` -case "${host}" in - *cygwin* | *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) ITCL_PLATFORM_DIR_NATIVE=${ITCL_WIN_DIR_NATIVE} ;; *) @@ -1206,7 +1182,7 @@ if test "${with_tcl+set}" = set; then fi echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 -echo "configure:1210: checking for Tcl configuration" >&5 +echo "configure:1186: 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 @@ -1234,10 +1210,6 @@ else ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi - if test -f "$i/win/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/win; pwd)` - break - fi done fi @@ -1260,11 +1232,7 @@ else if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break - fi - if test -f "$i/win/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/win; pwd)` - break - fi + fi done fi @@ -1273,7 +1241,7 @@ fi if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" - { echo "configure: error: Can't find Tcl configuration definitions" 1>&2; exit 1; } + echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 exit 0 else no_tcl= @@ -1284,7 +1252,7 @@ fi echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1288: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 +echo "configure:1256: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then echo "$ac_t""loading" 1>&6 @@ -1332,10 +1300,10 @@ echo "configure:1288: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 #SC_PUBLIC_TCL_HEADERS echo $ac_n "checking for Tcl private include files""... $ac_c" 1>&6 -echo "configure:1336: checking for Tcl private include files" >&5 +echo "configure:1304: checking for Tcl private include files" >&5 - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\" TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\" TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\" @@ -1387,8 +1355,8 @@ echo "configure:1336: checking for Tcl private include files" >&5 # your system. #-------------------------------------------------------------------- -case "${host}" in - *cygwin*| *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) cat >> confdefs.h <<\EOF #define BUILD_itcl 1 EOF @@ -1418,7 +1386,7 @@ esac echo $ac_n "checking for building with threads""... $ac_c" 1>&6 -echo "configure:1422: checking for building with threads" >&5 +echo "configure:1390: checking for building with threads" >&5 # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then enableval="$enable_threads" @@ -1439,13 +1407,13 @@ EOF EOF - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) echo "$ac_t""yes" 1>&6 ;; *) echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1449: checking for pthread_mutex_init in -lpthread" >&5 +echo "configure:1417: checking for pthread_mutex_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1453,7 +1421,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <<EOF -#line 1457 "configure" +#line 1425 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1464,7 +1432,7 @@ int main() { pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1436: \"$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 @@ -1510,26 +1478,22 @@ fi echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:1514: checking how to build libraries" >&5 +echo "configure:1482: checking how to build libraries" >&5 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else - tcl_ok=no + tcl_ok=yes fi -# CYGNUS LOCAL - case "${host}" in - *mingw32* | *windows32*) - # Default to shared build for Windows - if test "${enable_shared+set}" != set; then - tcl_ok=yes - fi - ;; - esac -# END CYGNUS LOCAL + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval + else + tcl_ok=yes + fi if test "$tcl_ok" = "yes" ; then echo "$ac_t""shared" 1>&6 @@ -1571,8 +1535,8 @@ SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS} #-------------------------------------------------------------------- - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) tcl_dbgx=d ;; *) @@ -1581,7 +1545,7 @@ SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS} esac echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:1585: checking for build with symbols" >&5 +echo "configure:1549: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -1636,20 +1600,15 @@ fi #-------------------------------------------------------------------- - case "${host}" in - *mingw32* | *windows32*) - if test "${CC}" = "cl"; then + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) + if test "${CC-cc}" = "cl"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$@_OBJECTS) " MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$@_OBJECTS) " - else - MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$@_OBJECTS) " - POST_MAKE_STATIC_LIB="\${RANLIB} \$@" - MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$@_OBJECTS) \${SHLIB_LDFLAGS} \$(LDFLAGS) \${SHLIB_LD_LIBS} -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)" fi ;; *) MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$@_OBJECTS)" - POST_MAKE_STATIC_LIB="\${RANLIB} \$@" MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" ;; esac @@ -1658,14 +1617,11 @@ fi MAKE_LIB=${MAKE_SHARED_LIB} else MAKE_LIB=${MAKE_STATIC_LIB} - POST_MAKE_LIB=${POST_MAKE_STATIC_LIB} fi - - #-------------------------------------------------------------------- @@ -1679,562 +1635,28 @@ eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}" # Shared libraries and static libraries have different names. #-------------------------------------------------------------------- -# CYGNUS LOCAL - -if test "${SHARED_BUILD}" = "1" ; then - # FIXME: Need to devise a TCL_TOOL macro to deal with this! - case "${host}" in - *cygwin* | *mingw32* | *windows32*) - SHLIB_LD_LIBS="${TCL_BUILD_STUB_LIB_SPEC} ${TCL_SHLIB_LD_LIBS}" - # Need to link to the .a or .lib not the .dll! - - libname=${PACKAGE} - suffix=${SHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32* | *cygwin*) - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITCL_SHLIB_FILE=$long_libname - - - libname=${PACKAGE} - suffix=${UNSHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - else - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - fi - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITCL_LIB_FILE=$long_libname - - ITCL_TARGET_FILE=${ITCL_SHLIB_FILE} - ;; - *) - SHLIB_LD_LIBS="${TCL_BUILD_LIB_SPEC}" - - libname=${PACKAGE} - suffix=${SHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32* | *cygwin*) - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITCL_LIB_FILE=$long_libname - - ITCL_TARGET_FILE=${ITCL_LIB_FILE} - ;; - esac -else - - libname=${PACKAGE} - suffix=${UNSHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - else - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - fi - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITCL_LIB_FILE=$long_libname - - ITCL_TARGET_FILE=${ITCL_LIB_FILE} -fi - - - libname=${PACKAGE}stub - suffix=${UNSHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - else - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - fi - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITCL_STUB_LIB_FILE=$long_libname - - - - - - - libname=${PACKAGE} - version=${VERSION} - - if test "$TCL_LIB_SUFFIX" = "" ; then - { echo "configure: error: The TCL_LIB_SUFFIX variable is not defined" 1>&2; exit 1; } - fi - - # If the . character is not allowed in lib name, remove it from version - if test "${TCL_LIB_VERSIONS_OK}" != "ok"; then - version=`echo $version | tr -d .` - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "short_libname=\"${TCL_VENDOR_PREFIX}${libname}${version}${TCL_LIB_SUFFIX}\"" - else - short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}${TCL_DBGX}" - fi - ;; - *) - short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}\${TCL_DBGX}" - ;; - esac - - ITCL_LIB_FLAG=$short_libname - - - libname=${PACKAGE}stub - version=${VERSION} - - if test "$TCL_LIB_SUFFIX" = "" ; then - { echo "configure: error: The TCL_LIB_SUFFIX variable is not defined" 1>&2; exit 1; } - fi - - # If the . character is not allowed in lib name, remove it from version - if test "${TCL_LIB_VERSIONS_OK}" != "ok"; then - version=`echo $version | tr -d .` - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "short_libname=\"${TCL_VENDOR_PREFIX}${libname}${version}${TCL_LIB_SUFFIX}\"" - else - short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}${TCL_DBGX}" - fi - ;; - *) - short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}\${TCL_DBGX}" - ;; - esac - - ITCL_STUB_LIB_FLAG=$short_libname - - - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - - val="`pwd`/${ITCL_LIB_FLAG}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITCL_BUILD_LIB_SPEC" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITCL_BUILD_LIB_SPEC=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITCL_BUILD_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITCL_BUILD_LIB_SPEC=$val - ;; - esac - - else - - val=`pwd` - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - dirname=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - dirname="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - dirname=$val - ;; - esac - - ITCL_BUILD_LIB_SPEC="-L${dirname} ${ITCL_LIB_FLAG}" - fi - ;; - *) - ITCL_BUILD_LIB_SPEC="-L`pwd` ${ITCL_LIB_FLAG}" - ;; - esac - - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - - val="`pwd`/${ITCL_STUB_LIB_FLAG}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITCL_BUILD_STUB_LIB_SPEC" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITCL_BUILD_STUB_LIB_SPEC=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITCL_BUILD_STUB_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITCL_BUILD_STUB_LIB_SPEC=$val - ;; - esac - - else - - val=`pwd` - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - dirname=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - dirname="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - dirname=$val - ;; - esac - - ITCL_BUILD_STUB_LIB_SPEC="-L${dirname} ${ITCL_STUB_LIB_FLAG}" - fi - ;; - *) - ITCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${ITCL_STUB_LIB_FLAG}" - ;; - esac - - - - - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - - val="${exec_prefix}/lib/${ITCL_LIB_FLAG}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITCL_LIB_SPEC" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITCL_LIB_SPEC=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITCL_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITCL_LIB_SPEC=$val - ;; - esac - - else - - val=${exec_prefix}/lib - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - dirname=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - dirname="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - dirname=$val - ;; - esac - - ITCL_LIB_SPEC="-L${dirname} ${ITCL_LIB_FLAG}" - fi - ;; - *) - ITCL_LIB_SPEC="-L${exec_prefix}/lib ${ITCL_LIB_FLAG}" - ;; - esac - - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - - val="${exec_prefix}/lib/${ITCL_STUB_LIB_FLAG}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITCL_STUB_LIB_SPEC" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITCL_STUB_LIB_SPEC=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITCL_STUB_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITCL_STUB_LIB_SPEC=$val - ;; - esac - - else - - val=${exec_prefix}/lib - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - dirname=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - dirname="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - dirname=$val - ;; - esac - - ITCL_STUB_LIB_SPEC="-L${dirname} ${ITCL_STUB_LIB_FLAG}" - fi - ;; - *) - ITCL_STUB_LIB_SPEC="-L${exec_prefix}/lib ${ITCL_STUB_LIB_FLAG}" - ;; - esac - - - - - - - val="`pwd`/${ITCL_LIB_FILE}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITCL_LIB_FULL_PATH" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITCL_LIB_FULL_PATH=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITCL_LIB_FULL_PATH="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITCL_LIB_FULL_PATH=$val - ;; - esac - - - - - val="`pwd`/${ITCL_STUB_LIB_FILE}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITCL_STUB_LIB_FULL_PATH" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITCL_STUB_LIB_FULL_PATH=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITCL_STUB_LIB_FULL_PATH="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS}" + eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}" + fi + eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" + ;; *) - # Default to a no-op under Unix or Cygwin gcc - ITCL_STUB_LIB_FULL_PATH=$val - ;; - esac - - - - - -itclstub_LIB_FILE=${ITCL_STUB_LIB_FILE} -itcl_LIB_FILE=${ITCL_TARGET_FILE} - -# END CYGNUS LOCAL + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="${TCL_BUILD_STUB_LIB_SPEC}" + eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}" + fi + eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" + ;; +esac #-------------------------------------------------------------------- # __CHANGE__ @@ -2267,38 +1689,42 @@ fi # versions have bugs in the pkg_mkIndex routine. #-------------------------------------------------------------------- -# CYGNUS LOCAL -# A Tcl shell is not available when bootstrapping! -# END CYGNUS LOCAL - -#-------------------------------------------------------------------- -# Finally, substitute all of the various values into the Makefile. -#-------------------------------------------------------------------- - -# CYGNUS LOCAL - -# Note: The itclConfig.sh file below is not included in the net release. -# We subst these variables to retain compatibility with the previous -# version of itclConfig.sh. - -ITCL_VERSION=${VERSION} - - -ITCL_MAJOR_VERSION=${MAJOR_VERSION} + echo $ac_n "checking for tclsh""... $ac_c" 1>&6 +echo "configure:1695: checking for tclsh" >&5 -ITCL_MINOR_VERSION=${MINOR_VERSION} - - -ITCL_RELEASE_LEVEL=${PATCHLEVEL} - - -ITCL_SRC_DIR=${ITCL_SRC_DIR_NATIVE} + if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` + for dir in $search_path ; do + for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \ + `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do + if test x"$ac_cv_path_tclsh" = x ; then + if test -f "$j" ; then + ac_cv_path_tclsh=$j + break + fi + fi + done + done + +fi -ITCL_SH=NONE + if test -f "$ac_cv_path_tclsh" ; then + TCLSH_PROG=$ac_cv_path_tclsh + echo "$ac_t""$TCLSH_PROG" 1>&6 + else + { echo "configure: error: No tclsh found in PATH: $search_path" 1>&2; exit 1; } + fi + +#-------------------------------------------------------------------- +# Finally, substitute all of the various values into the Makefile. +#-------------------------------------------------------------------- trap '' 1 2 15 cat > confcache <<\EOF @@ -2414,8 +1840,7 @@ ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile \ - itclConfig.sh \ - pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 + pkgIndex.tcl itclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF @@ -2500,25 +1925,10 @@ s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g s%@MAKE_LIB@%$MAKE_LIB%g s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g -s%@POST_MAKE_LIB@%$POST_MAKE_LIB%g -s%@POST_MAKE_STATIC_LIB@%$POST_MAKE_STATIC_LIB%g -s%@ITCL_LIB_FILE@%$ITCL_LIB_FILE%g -s%@ITCL_STUB_LIB_FILE@%$ITCL_STUB_LIB_FILE%g -s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g -s%@ITCL_BUILD_STUB_LIB_SPEC@%$ITCL_BUILD_STUB_LIB_SPEC%g -s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g -s%@ITCL_STUB_LIB_SPEC@%$ITCL_STUB_LIB_SPEC%g -s%@ITCL_LIB_FULL_PATH@%$ITCL_LIB_FULL_PATH%g -s%@ITCL_STUB_LIB_FULL_PATH@%$ITCL_STUB_LIB_FULL_PATH%g s%@itclstub_LIB_FILE@%$itclstub_LIB_FILE%g s%@itcl_LIB_FILE@%$itcl_LIB_FILE%g s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g -s%@ITCL_VERSION@%$ITCL_VERSION%g -s%@ITCL_MAJOR_VERSION@%$ITCL_MAJOR_VERSION%g -s%@ITCL_MINOR_VERSION@%$ITCL_MINOR_VERSION%g -s%@ITCL_RELEASE_LEVEL@%$ITCL_RELEASE_LEVEL%g -s%@ITCL_SRC_DIR@%$ITCL_SRC_DIR%g -s%@ITCL_SH@%$ITCL_SH%g +s%@TCLSH_PROG@%$TCLSH_PROG%g CEOF EOF @@ -2561,8 +1971,7 @@ EOF cat >> $CONFIG_STATUS <<EOF CONFIG_FILES=\${CONFIG_FILES-"Makefile \ - itclConfig.sh \ - pkgIndex.tcl"} + pkgIndex.tcl itclConfig.sh"} EOF cat >> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -2633,5 +2042,3 @@ chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -# END CYGNUS LOCAL diff --git a/itcl/itcl/configure.in b/itcl/itcl/configure.in index c33a8ffa904..b63ca4105be 100644 --- a/itcl/itcl/configure.in +++ b/itcl/itcl/configure.in @@ -13,9 +13,7 @@ #-------------------------------------------------------------------- AC_INIT(generic/itcl.h) -# CYGNUS LOCAL -AC_CONFIG_AUX_DIR(../..) -# END CYGNUS LOCAL +AC_CONFIG_AUX_DIR(../config) #-------------------------------------------------------------------- # __CHANGE__ @@ -29,7 +27,7 @@ PACKAGE=itcl MAJOR_VERSION=3 MINOR_VERSION=2 -PATCHLEVEL=.0 +PATCHLEVEL=.1 VERSION=${MAJOR_VERSION}.${MINOR_VERSION} NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} @@ -64,10 +62,7 @@ fi # was not used. #-------------------------------------------------------------------- -# CYGNUS LOCAL -dnl SC_ENABLE_GCC -AC_PROG_CC -# END CYGNUS LOCAL +SC_ENABLE_GCC AC_PROG_INSTALL #-------------------------------------------------------------------- @@ -112,8 +107,9 @@ AC_EXEEXT # file for you. #-------------------------------------------------------------------- -case "${host}" in - *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) + CYGPATH="cygpath -w" AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) RELPATH=".. .. bin" ;; @@ -130,16 +126,12 @@ AC_SUBST(RELPATH) # Includes for this package #-------------------------------------------------------------------- -# CYGNUS LOCAL -srcdir=`cd ${srcdir} ; pwd` -ITCL_SRC_DIR_NATIVE=`${CYGPATH} ${srcdir}` -# END CYGNUS LOCAL ITCL_GENERIC_DIR_NATIVE=`${CYGPATH} ${srcdir}/generic` ITCL_WIN_DIR_NATIVE=`${CYGPATH} ${srcdir}/win` ITCL_UNIX_DIR_NATIVE=`${CYGPATH} ${srcdir}/unix` -case "${host}" in - *cygwin* | *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) ITCL_PLATFORM_DIR_NATIVE=${ITCL_WIN_DIR_NATIVE} ;; *) @@ -192,8 +184,8 @@ SC_PRIVATE_TCL_HEADERS # your system. #-------------------------------------------------------------------- -case "${host}" in - *cygwin*| *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) AC_DEFINE(BUILD_itcl) CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch" PLATFORM_SOURCES='$(WIN_SOURCES)' @@ -291,56 +283,28 @@ eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}" # Shared libraries and static libraries have different names. #-------------------------------------------------------------------- -# CYGNUS LOCAL - -if test "${SHARED_BUILD}" = "1" ; then - # FIXME: Need to devise a TCL_TOOL macro to deal with this! - case "${host}" in - *cygwin* | *mingw32* | *windows32*) - SHLIB_LD_LIBS="${TCL_BUILD_STUB_LIB_SPEC} ${TCL_SHLIB_LD_LIBS}" - # Need to link to the .a or .lib not the .dll! - TCL_TOOL_SHARED_LIB_LONGNAME(ITCL_SHLIB_FILE, ${PACKAGE}, ${SHARED_LIB_SUFFIX}) - TCL_TOOL_STATIC_LIB_LONGNAME(ITCL_LIB_FILE, ${PACKAGE}, ${UNSHARED_LIB_SUFFIX}) - ITCL_TARGET_FILE=${ITCL_SHLIB_FILE} - ;; +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS}" + eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}" + fi + eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" + ;; *) - SHLIB_LD_LIBS="${TCL_BUILD_LIB_SPEC}" - TCL_TOOL_SHARED_LIB_LONGNAME(ITCL_LIB_FILE, ${PACKAGE}, ${SHARED_LIB_SUFFIX}) - ITCL_TARGET_FILE=${ITCL_LIB_FILE} - ;; - esac -else - TCL_TOOL_STATIC_LIB_LONGNAME(ITCL_LIB_FILE, ${PACKAGE}, ${UNSHARED_LIB_SUFFIX}) - ITCL_TARGET_FILE=${ITCL_LIB_FILE} -fi - -TCL_TOOL_STATIC_LIB_LONGNAME(ITCL_STUB_LIB_FILE, ${PACKAGE}stub, ${UNSHARED_LIB_SUFFIX}) - -AC_SUBST(ITCL_LIB_FILE) -AC_SUBST(ITCL_STUB_LIB_FILE) - -TCL_TOOL_LIB_SHORTNAME(ITCL_LIB_FLAG, ${PACKAGE}, ${VERSION}) -TCL_TOOL_LIB_SHORTNAME(ITCL_STUB_LIB_FLAG, ${PACKAGE}stub, ${VERSION}) - -TCL_TOOL_LIB_SPEC(ITCL_BUILD_LIB_SPEC, `pwd`, ${ITCL_LIB_FLAG}) -TCL_TOOL_LIB_SPEC(ITCL_BUILD_STUB_LIB_SPEC, `pwd`, ${ITCL_STUB_LIB_FLAG}) -AC_SUBST(ITCL_BUILD_LIB_SPEC) -AC_SUBST(ITCL_BUILD_STUB_LIB_SPEC) - -TCL_TOOL_LIB_SPEC(ITCL_LIB_SPEC, ${exec_prefix}/lib, ${ITCL_LIB_FLAG}) -TCL_TOOL_LIB_SPEC(ITCL_STUB_LIB_SPEC, ${exec_prefix}/lib, ${ITCL_STUB_LIB_FLAG}) -AC_SUBST(ITCL_LIB_SPEC) -AC_SUBST(ITCL_STUB_LIB_SPEC) - -TCL_TOOL_LIB_PATH(ITCL_LIB_FULL_PATH, `pwd`, ${ITCL_LIB_FILE}) -TCL_TOOL_LIB_PATH(ITCL_STUB_LIB_FULL_PATH, `pwd`, ${ITCL_STUB_LIB_FILE}) -AC_SUBST(ITCL_LIB_FULL_PATH) -AC_SUBST(ITCL_STUB_LIB_FULL_PATH) - -itclstub_LIB_FILE=${ITCL_STUB_LIB_FILE} -itcl_LIB_FILE=${ITCL_TARGET_FILE} - -# END CYGNUS LOCAL + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="${TCL_BUILD_STUB_LIB_SPEC}" + eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}" + fi + eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" + ;; +esac #-------------------------------------------------------------------- # __CHANGE__ @@ -368,42 +332,11 @@ AC_CACHE_VAL(ac_cv_itclstub_LIB_FILE, ac_cv_itclstub_LIB_FILE=${itclstub_LIB_FIL # versions have bugs in the pkg_mkIndex routine. #-------------------------------------------------------------------- -# CYGNUS LOCAL -# A Tcl shell is not available when bootstrapping! -dnl SC_PROG_TCLSH -# END CYGNUS LOCAL +SC_PROG_TCLSH #-------------------------------------------------------------------- # Finally, substitute all of the various values into the Makefile. #-------------------------------------------------------------------- -# CYGNUS LOCAL - -# Note: The itclConfig.sh file below is not included in the net release. -# We subst these variables to retain compatibility with the previous -# version of itclConfig.sh. - -ITCL_VERSION=${VERSION} -AC_SUBST(ITCL_VERSION) - -ITCL_MAJOR_VERSION=${MAJOR_VERSION} -AC_SUBST(ITCL_MAJOR_VERSION) - -ITCL_MINOR_VERSION=${MINOR_VERSION} -AC_SUBST(ITCL_MINOR_VERSION) - -ITCL_RELEASE_LEVEL=${PATCHLEVEL} -AC_SUBST(ITCL_RELEASE_LEVEL) - -ITCL_SRC_DIR=${ITCL_SRC_DIR_NATIVE} -AC_SUBST(ITCL_SRC_DIR) - -ITCL_SH=NONE -AC_SUBST(ITCL_SH) - - AC_OUTPUT([Makefile \ - itclConfig.sh \ - pkgIndex.tcl]) - -# END CYGNUS LOCAL + pkgIndex.tcl itclConfig.sh]) diff --git a/itcl/itcl/generic/itcl.h b/itcl/itcl/generic/itcl.h index 4e0ad39a2d6..529fdc47aee 100644 --- a/itcl/itcl/generic/itcl.h +++ b/itcl/itcl/generic/itcl.h @@ -66,10 +66,10 @@ #endif #define ITCL_VERSION "3.2" -#define ITCL_PATCH_LEVEL "3.2.0" +#define ITCL_PATCH_LEVEL "3.2.1" #define ITCL_MAJOR_VERSION 3 #define ITCL_MINOR_VERSION 2 -#define ITCL_RELEASE_LEVEL 0 +#define ITCL_RELEASE_LEVEL 1 /* * A special definition used to allow this header file to be included @@ -78,7 +78,7 @@ * and procedure declarations, that occur below. */ -#ifndef RESOURCE_INCLUDED +#ifndef RC_INVOKED /* * Protection levels: @@ -152,7 +152,10 @@ typedef struct Itcl_InterpState_ *Itcl_InterpState; #ifdef USE_ITCL_STUBS -char * Itcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, +#ifdef __cplusplus +extern "C" +#endif +CONST char * Itcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exact)); #else #define Itcl_InitStubs(interp, version, exact) \ @@ -164,7 +167,7 @@ char * Itcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, */ -#endif /* RESOURCE_INCLUDED */ +#endif /* RC_INVOKED */ #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT diff --git a/itcl/itcl/generic/itclInt.decls b/itcl/itcl/generic/itclInt.decls index 50d16764783..466af9ba2b3 100644 --- a/itcl/itcl/generic/itclInt.decls +++ b/itcl/itcl/generic/itclInt.decls @@ -152,7 +152,7 @@ declare 34 generic { int objc, Tcl_Obj *CONST objv[]) } declare 35 generic { - int Itcl_ClassCmdResolver (Tcl_Interp *interp, char* name, \ + int Itcl_ClassCmdResolver (Tcl_Interp *interp, CONST char* name, \ Tcl_Namespace *context, int flags, Tcl_Command *rPtr) } declare 36 generic { diff --git a/itcl/itcl/generic/itclInt.h b/itcl/itcl/generic/itclInt.h index a3bb712729e..6bde298972e 100644 --- a/itcl/itcl/generic/itclInt.h +++ b/itcl/itcl/generic/itclInt.h @@ -238,6 +238,13 @@ typedef struct ItclContext { Var localStorage[20]; /* default storage for compiled locals */ } ItclContext; +/* + * Compatibility flags. Used to support small "hacks". These are stored + * in the global variable named itclCompatFlags. + */ +#define ITCL_COMPAT_USECMDFLAGS 0x0001 /* Tcl8.4a1 introduced a different Command + * structure, and we need to adapt + * dynamically */ #include "itclIntDecls.h" diff --git a/itcl/itcl/generic/itclIntDecls.h b/itcl/itcl/generic/itclIntDecls.h index fa4989a80a9..9658a3e5694 100644 --- a/itcl/itcl/generic/itclIntDecls.h +++ b/itcl/itcl/generic/itclIntDecls.h @@ -150,7 +150,7 @@ EXTERN int Itcl_HandleClass _ANSI_ARGS_((ClientData clientData, Tcl_Obj *CONST objv[])); /* 35 */ EXTERN int Itcl_ClassCmdResolver _ANSI_ARGS_(( - Tcl_Interp * interp, char* name, + Tcl_Interp * interp, CONST char* name, Tcl_Namespace * context, int flags, Tcl_Command * rPtr)); /* 36 */ @@ -485,7 +485,7 @@ typedef struct ItclIntStubs { int (*itcl_DeleteClass) _ANSI_ARGS_((Tcl_Interp * interp, ItclClass * cdefnPtr)); /* 32 */ Tcl_Namespace* (*itcl_FindClassNamespace) _ANSI_ARGS_((Tcl_Interp* interp, char* path)); /* 33 */ int (*itcl_HandleClass) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 34 */ - int (*itcl_ClassCmdResolver) _ANSI_ARGS_((Tcl_Interp * interp, char* name, Tcl_Namespace * context, int flags, Tcl_Command * rPtr)); /* 35 */ + int (*itcl_ClassCmdResolver) _ANSI_ARGS_((Tcl_Interp * interp, CONST char* name, Tcl_Namespace * context, int flags, Tcl_Command * rPtr)); /* 35 */ int (*itcl_ClassVarResolver) _ANSI_ARGS_((Tcl_Interp * interp, char* name, Tcl_Namespace * context, int flags, Tcl_Var * rPtr)); /* 36 */ int (*itcl_ClassCompiledVarResolver) _ANSI_ARGS_((Tcl_Interp * interp, char* name, int length, Tcl_Namespace * context, Tcl_ResolvedVarInfo ** rPtr)); /* 37 */ void (*itcl_BuildVirtualTables) _ANSI_ARGS_((ItclClass* cdefnPtr)); /* 38 */ diff --git a/itcl/itcl/generic/itclStubLib.c b/itcl/itcl/generic/itclStubLib.c index 80fe17a2fe1..2888812882b 100644 --- a/itcl/itcl/generic/itclStubLib.c +++ b/itcl/itcl/generic/itclStubLib.c @@ -57,13 +57,13 @@ ItclIntStubs *itclIntStubsPtr; *---------------------------------------------------------------------- */ -char * +CONST char * Itcl_InitStubs (interp, version, exact) Tcl_Interp *interp; char *version; int exact; { - char *actualVersion; + CONST char *actualVersion; actualVersion = Tcl_PkgRequireEx(interp, "Itcl", version, exact, (ClientData *) &itclStubsPtr); diff --git a/itcl/itcl/generic/itcl_bicmds.c b/itcl/itcl/generic/itcl_bicmds.c index 0340dc8bc3d..a200f6508ba 100644 --- a/itcl/itcl/generic/itcl_bicmds.c +++ b/itcl/itcl/generic/itcl_bicmds.c @@ -847,7 +847,9 @@ Itcl_BiInfoClassCmd(dummy, interp, objc, objv) contextNs = contextClass->namesp; } - if (contextNs->parentPtr == activeNs) { + if (!contextNs) { + name = activeNs->fullName; + } else if (contextNs->parentPtr == activeNs) { name = contextNs->name; } else { name = contextNs->fullName; diff --git a/itcl/itcl/generic/itcl_class.c b/itcl/itcl/generic/itcl_class.c index 5661ad3f784..c3a332885a4 100644 --- a/itcl/itcl/generic/itcl_class.c +++ b/itcl/itcl/generic/itcl_class.c @@ -51,6 +51,8 @@ static void ItclFreeClass _ANSI_ARGS_((char* cdata)); static Tcl_Var ItclClassRuntimeVarResolver _ANSI_ARGS_(( Tcl_Interp *interp, Tcl_ResolvedVarInfo *vinfoPtr)); +extern int itclCompatFlags; + /* * ------------------------------------------------------------------------ @@ -294,12 +296,24 @@ Itcl_DeleteClass(interp, cdefnPtr) entry = Tcl_FirstHashEntry(&cdefnPtr->info->objects, &place); while (entry) { contextObj = (ItclObject*)Tcl_GetHashValue(entry); + if (contextObj->classDefn == cdefnPtr) { if (Itcl_DeleteObject(interp, contextObj) != TCL_OK) { cdPtr = cdefnPtr; goto deleteClassFail; } + + /* + * Fix 227804: Whenever an object to delete was found we + * have to reset the search to the beginning as the + * current entry in the search was deleted and accessing it + * is therefore not allowed anymore. + */ + + entry = Tcl_FirstHashEntry(&cdefnPtr->info->objects, &place); + continue; } + entry = Tcl_NextHashEntry(&place); } @@ -398,6 +412,15 @@ ItclDestroyClassNamesp(cdata) contextObj = (ItclObject*)Tcl_GetHashValue(entry); if (contextObj->classDefn == cdefnPtr) { Tcl_DeleteCommandFromToken(cdefnPtr->interp, contextObj->accessCmd); + /* + * Fix 227804: Whenever an object to delete was found we + * have to reset the search to the beginning as the + * current entry in the search was deleted and accessing it + * is therefore not allowed anymore. + */ + + entry = Tcl_FirstHashEntry(&cdefnPtr->info->objects, &place); + continue; } entry = Tcl_NextHashEntry(&place); } @@ -837,6 +860,8 @@ Itcl_HandleClass(clientData, interp, objc, objv) * incrementing a counter until a valid name is found. */ do { + Tcl_CmdInfo dummy; + sprintf(unique,"%.200s%d", cdefnPtr->name, cdefnPtr->unique++); unique[0] = tolower(unique[0]); @@ -847,10 +872,16 @@ Itcl_HandleClass(clientData, interp, objc, objv) Tcl_DStringAppend(&buffer, start+5, -1); objName = Tcl_DStringValue(&buffer); - if (Itcl_FindObject(interp, objName, &newObj) != TCL_OK) { + + /* + * [Fix 227811] Check for any command with the + * given name, not only objects. + */ + + if (Tcl_GetCommandInfo (interp, objName, &dummy) == 0) { break; /* if an error is found, bail out! */ } - } while (newObj != NULL); + } while (1); *start = tmp; /* undo null-termination */ objName = Tcl_DStringValue(&buffer); @@ -903,7 +934,7 @@ Itcl_HandleClass(clientData, interp, objc, objv) int Itcl_ClassCmdResolver(interp, name, context, flags, rPtr) Tcl_Interp *interp; /* current interpreter */ - char* name; /* name of the command being accessed */ + CONST char* name; /* name of the command being accessed */ Tcl_Namespace *context; /* namespace performing the resolution */ int flags; /* TCL_LEAVE_ERR_MSG => leave error messages * in interp if anything goes wrong */ @@ -914,6 +945,7 @@ Itcl_ClassCmdResolver(interp, name, context, flags, rPtr) Tcl_HashEntry *entry; ItclMemberFunc *mfunc; Command *cmdPtr; + int isCmdDeleted; /* * If the command is a member function, and if it is @@ -960,16 +992,39 @@ Itcl_ClassCmdResolver(interp, name, context, flags, rPtr) * it--as it is being resolved again by the compiler. */ cmdPtr = (Command*)mfunc->accessCmd; - if (!cmdPtr || cmdPtr->deleted) { - mfunc->accessCmd = NULL; - - if ((flags & TCL_LEAVE_ERR_MSG) != 0) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "can't access \"", name, "\": deleted or redefined\n", - "(use the \"body\" command to redefine methods/procs)", - (char*)NULL); - } - return TCL_ERROR; /* disallow access! */ + + /* + * The following #if is needed so itcl can be compiled with + * all versions of Tcl. The integer "deleted" was renamed to + * "flags" in tcl8.4a2. This #if is also found in itcl_ensemble.c . + * We're using a runtime check with itclCompatFlags to adjust for + * the behavior of this change, too. + * + */ +#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4) +# define CMD_IS_DELETED 0x1 /* If someone ever changes this from tcl.h, + * we must change our logic here, too */ + isCmdDeleted = (!cmdPtr || + (itclCompatFlags & ITCL_COMPAT_USECMDFLAGS ? + (cmdPtr->deleted & CMD_IS_DELETED) : + cmdPtr->deleted)); +#else + isCmdDeleted = (!cmdPtr || + (itclCompatFlags & ITCL_COMPAT_USECMDFLAGS ? + (cmdPtr->flags & CMD_IS_DELETED) : + cmdPtr->flags)); +#endif + + if (isCmdDeleted) { + mfunc->accessCmd = NULL; + + if ((flags & TCL_LEAVE_ERR_MSG) != 0) { + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), + "can't access \"", name, "\": deleted or redefined\n", + "(use the \"body\" command to redefine methods/procs)", + (char*)NULL); + } + return TCL_ERROR; /* disallow access! */ } *rPtr = mfunc->accessCmd; diff --git a/itcl/itcl/generic/itcl_cmds.c b/itcl/itcl/generic/itcl_cmds.c index 773e3098af1..dff4a46890f 100644 --- a/itcl/itcl/generic/itcl_cmds.c +++ b/itcl/itcl/generic/itcl_cmds.c @@ -103,6 +103,9 @@ static char safeInitScript[] = extern ItclStubs itclStubs; + +int itclCompatFlags = -1; + /* * ------------------------------------------------------------------------ @@ -140,6 +143,26 @@ Initialize(interp) } /* + * Set the compatability options. Stubs allows us to load into many + * version of the Tcl core. Some problems have crept-in, and we need + * to adapt dynamically regarding use of some internal structures that + * have changed since 8.1.0 + * + * TODO: make a TIP for exporting a Tcl_CommandIsDeleted function in the core. + */ + if (itclCompatFlags == -1) { + int maj, min, ptch, type; + + itclCompatFlags = 0; + Tcl_GetVersion(&maj, &min, &ptch, &type); + + if ((maj == 8) && (min >= 4)) { + itclCompatFlags = ITCL_COMPAT_USECMDFLAGS; + } + } + + + /* * Initialize the ensemble package first, since we need this * for other parts of [incr Tcl]. */ @@ -392,7 +415,15 @@ ItclDelObjectInfo(cdata) while (entry) { contextObj = (ItclObject*)Tcl_GetHashValue(entry); Tcl_DeleteCommandFromToken(info->interp, contextObj->accessCmd); - entry = Tcl_NextHashEntry(&place); + /* + * Fix 227804: Whenever an object to delete was found we + * have to reset the search to the beginning as the + * current entry in the search was deleted and accessing it + * is therefore not allowed anymore. + */ + + entry = Tcl_FirstHashEntry(&info->objects, &place); + /*entry = Tcl_NextHashEntry(&place);*/ } Tcl_DeleteHashTable(&info->objects); @@ -438,8 +469,8 @@ Itcl_FindClassesCmd(clientData, interp, objc, objv) int forceFullNames = 0; char *pattern; - char *name; - int i, newEntry, handledActiveNs; + CONST char *name; + int newEntry, handledActiveNs; Tcl_HashTable unique; Tcl_HashEntry *entry; Tcl_HashSearch place; @@ -568,7 +599,8 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv) ItclClass *isaDefn = NULL; char *name, *token; - int i, pos, newEntry, match, handledActiveNs; + CONST char *cmdName; + int pos, newEntry, match, handledActiveNs; ItclObject *contextObj; Tcl_HashTable unique; Tcl_HashEntry *entry; @@ -679,8 +711,8 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv) Tcl_GetCommandFullName(interp, cmd, objPtr); name = Tcl_GetStringFromObj(objPtr, (int*)NULL); } else { - name = Tcl_GetCommandName(interp, cmd); - objPtr = Tcl_NewStringObj(name, -1); + cmdName = Tcl_GetCommandName(interp, cmd); + objPtr = Tcl_NewStringObj(cmdName, -1); } Tcl_CreateHashEntry(&unique, (char*)cmd, &newEntry); @@ -772,13 +804,7 @@ Itcl_ProtectionCmd(clientData, interp, objc, objv) oldLevel = Itcl_Protection(interp, pLevel); if (objc == 2) { - /* CYGNUS LOCAL - Fix for 8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - result = Tcl_EvalObj(interp, objv[1], 0); -#else result = Tcl_EvalObj(interp, objv[1]); -#endif - /* END CYGNUS LOCAL */ } else { result = Itcl_EvalArgs(interp, objc-1, objv+1); } diff --git a/itcl/itcl/generic/itcl_ensemble.c b/itcl/itcl/generic/itcl_ensemble.c index fb5f802ad7b..a60b487ec1c 100644 --- a/itcl/itcl/generic/itcl_ensemble.c +++ b/itcl/itcl/generic/itcl_ensemble.c @@ -91,11 +91,6 @@ Tcl_ObjType itclEnsInvocType = { SetEnsInvocFromAny /* setFromAnyProc */ }; -/* - * Boolean flag indicating whether or not the "ensemble" object - * type has been registered with the Tcl compiler. - */ -static int ensInitialized = 0; /* * Forward declarations for the procedures used in this file. @@ -166,9 +161,8 @@ int Itcl_EnsembleInit(interp) Tcl_Interp *interp; /* interpreter being initialized */ { - if (!ensInitialized) { + if (Tcl_GetObjType(itclEnsInvocType.name) == NULL) { Tcl_RegisterObjType(&itclEnsInvocType); - ensInitialized = 1; } Tcl_CreateObjCommand(interp, "::itcl::ensemble", @@ -819,7 +813,11 @@ CreateEnsemble(interp, parentEnsData, ensName) cmdPtr->clientData = NULL; cmdPtr->deleteProc = DeleteEnsemble; cmdPtr->deleteData = cmdPtr->objClientData; - cmdPtr->deleted = 0; + #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4) + cmdPtr->deleted = 0; + #else + cmdPtr->flags = 0; + #endif cmdPtr->importRefPtr = NULL; ensPart->cmdPtr = cmdPtr; @@ -896,7 +894,11 @@ AddEnsemblePart(interp, ensData, partName, usageInfo, cmdPtr->clientData = NULL; cmdPtr->deleteProc = deleteProc; cmdPtr->deleteData = (ClientData)clientData; +#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4) cmdPtr->deleted = 0; +#else + cmdPtr->flags = 0; +#endif cmdPtr->importRefPtr = NULL; ensPart->cmdPtr = cmdPtr; @@ -1689,22 +1691,12 @@ Itcl_EnsembleCmd(clientData, interp, objc, objv) ensInfo->ensData = ensData; if (objc == 3) { - /* CYGNUS LOCAL - fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - status = Tcl_EvalObj(ensInfo->parser, objv[2], 0); -#else status = Tcl_EvalObj(ensInfo->parser, objv[2]); -#endif } else if (objc > 3) { objPtr = Tcl_NewListObj(objc-2, objv+2); Tcl_IncrRefCount(objPtr); /* stop Eval trashing it */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - status = Tcl_EvalObj(ensInfo->parser, objPtr, 0); -#else status = Tcl_EvalObj(ensInfo->parser, objPtr); -#endif - /* END CYGNUS LOCAL */ Tcl_DecrRefCount(objPtr); /* we're done with the object */ } diff --git a/itcl/itcl/generic/itcl_methods.c b/itcl/itcl/generic/itcl_methods.c index 2ea41100a2b..0236d3c66fc 100644 --- a/itcl/itcl/generic/itcl_methods.c +++ b/itcl/itcl/generic/itcl_methods.c @@ -31,7 +31,6 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "itclInt.h" -#include "tclCompile.h" /* * FORWARD DECLARATIONS @@ -1001,13 +1000,7 @@ Itcl_EvalMemberCode(interp, mfunc, member, contextObj, objc, objv) ckfree((char*)argv); } else if ((mcode->flags & ITCL_IMPLEMENT_TCL) != 0) { - /* CYGNUS LOCAL - Fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - result = Tcl_EvalObj(interp, mcode->procPtr->bodyPtr, 0); -#else - result = Tcl_EvalObj(interp, mcode->procPtr->bodyPtr); -#endif - /* END CYGNUS LOCAL */ + result = Tcl_EvalObj(interp, mcode->procPtr->bodyPtr); } else { panic("itcl: bad implementation flag for %s", member->fullname); @@ -1345,7 +1338,7 @@ Itcl_GetMemberFuncUsage(mfunc, contextObj, objPtr) Tcl_Obj *objPtr; /* returns: string showing usage */ { int argcount; - char *name; + CONST char *name; CompiledLocal *arglist, *argPtr; Tcl_HashEntry *entry; ItclMemberFunc *mf; @@ -2302,14 +2295,8 @@ Itcl_ConstructBase(interp, contextObj, contextClass) * now--just before the body of the constructor is executed. */ if (contextClass->initCode) { - /* CYGNUS LOCAL - Fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - if (Tcl_EvalObj(interp, contextClass->initCode, 0) != TCL_OK) { -#else - if (Tcl_EvalObj(interp, contextClass->initCode) != TCL_OK) { -#endif - /* END CYGNUS LOCAL */ - return TCL_ERROR; + if (Tcl_EvalObj(interp, contextClass->initCode) != TCL_OK) { + return TCL_ERROR; } } diff --git a/itcl/itcl/generic/itcl_objects.c b/itcl/itcl/generic/itcl_objects.c index 468c0bf71d2..fbcbc97121e 100644 --- a/itcl/itcl/generic/itcl_objects.c +++ b/itcl/itcl/generic/itcl_objects.c @@ -238,9 +238,16 @@ Itcl_CreateObject(interp, name, cdefn, objc, objv, roPtr) if (result != TCL_OK) { istate = Itcl_SaveInterpState(interp, result); - Tcl_DeleteCommandFromToken(interp, newObj->accessCmd); - newObj->accessCmd = NULL; - + /* Bug 227824. + * The constructor may destroy the object, possibly indirectly + * through the destruction of the main widget in the iTk + * megawidget it tried to construct. If this happens we must + * not try to destroy the access command a second time. + */ + if (newObj->accessCmd != (Tcl_Command) NULL) { + Tcl_DeleteCommandFromToken(interp, newObj->accessCmd); + newObj->accessCmd = NULL; + } result = Itcl_RestoreInterpState(interp, istate); } @@ -254,9 +261,15 @@ Itcl_CreateObject(interp, name, cdefn, objc, objv, roPtr) newObj->constructed = NULL; /* - * Add it to the list of all known objects. + * Add it to the list of all known objects. The only + * tricky thing to watch out for is the case where the + * object deleted itself inside its own constructor. + * In that case, we don't want to add the object to + * the list of valid objects. We can determine that + * the object deleted itself by checking to see if + * its accessCmd member is NULL. */ - if (result == TCL_OK) { + if (result == TCL_OK && (newObj->accessCmd != NULL)) { entry = Tcl_CreateHashEntry(&cdefnPtr->info->objects, (char*)newObj->accessCmd, &newEntry); @@ -659,6 +672,16 @@ Itcl_HandleInstance(clientData, interp, objc, objv) framePtr = &context.frame; Itcl_PushStack((ClientData)framePtr, &info->transparentFrames); + /* Bug 227824 + * The tcl core will blow up in 'TclLookupVar' if we don't reset + * the 'isProcCallFrame'. This happens because without the + * callframe refered to by 'framePtr' will be inconsistent + * ('isProcCallFrame' set, but 'procPtr' not set). + */ + if (*token == 'i' && strcmp(token,"info") == 0) { + framePtr->isProcCallFrame = 0; + } + result = Itcl_EvalArgs(interp, objc-1, objv+1); Itcl_PopStack(&info->transparentFrames); diff --git a/itcl/itcl/generic/itcl_obsolete.c b/itcl/itcl/generic/itcl_obsolete.c index 6d7b2dcf1e9..9aa20552ebf 100644 --- a/itcl/itcl/generic/itcl_obsolete.c +++ b/itcl/itcl/generic/itcl_obsolete.c @@ -479,14 +479,8 @@ ItclOldClassCmd(clientData, interp, objc, objv) /* isProcCallFrame */ 0); if (result == TCL_OK) { - /* CYGNUS LOCAL - Fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - result = Tcl_EvalObj(interp, objv[2], 0); -#else - result = Tcl_EvalObj(interp, objv[2]); -#endif - /* END CYGNUS LOCAL */ - Tcl_PopCallFrame(interp); + result = Tcl_EvalObj(interp, objv[2]); + Tcl_PopCallFrame(interp); } Itcl_PopStack(&info->cdefnStack); diff --git a/itcl/itcl/generic/itcl_parse.c b/itcl/itcl/generic/itcl_parse.c index 23d4510bc14..eb792e704b3 100644 --- a/itcl/itcl/generic/itcl_parse.c +++ b/itcl/itcl/generic/itcl_parse.c @@ -255,14 +255,8 @@ Itcl_ClassCmd(clientData, interp, objc, objv) /* isProcCallFrame */ 0); if (result == TCL_OK) { - /* CYGNUS LOCAL - Fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - result = Tcl_EvalObj(interp, objv[2], 0); -#else - result = Tcl_EvalObj(interp, objv[2]); -#endif - /* END CYGNUS LOCAL */ - Tcl_PopCallFrame(interp); + result = Tcl_EvalObj(interp, objv[2]); + Tcl_PopCallFrame(interp); } Itcl_PopStack(&info->cdefnStack); @@ -580,13 +574,7 @@ Itcl_ClassProtectionCmd(clientData, interp, objc, objv) oldLevel = Itcl_Protection(interp, pInfo->pLevel); if (objc == 2) { - /* CYGNUS LOCAL - Fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - result = Tcl_EvalObj(interp, objv[1], 0); -#else - result = Tcl_EvalObj(interp, objv[1]); -#endif - /* END CYGNUS LOCAL */ + result = Tcl_EvalObj(interp, objv[1]); } else { result = Itcl_EvalArgs(interp, objc-1, objv+1); } diff --git a/itcl/itcl/generic/itcl_util.c b/itcl/itcl/generic/itcl_util.c index e6eed63217b..40c7803ee11 100644 --- a/itcl/itcl/generic/itcl_util.c +++ b/itcl/itcl/generic/itcl_util.c @@ -29,7 +29,6 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "itclInt.h" -#include "tclCompile.h" /* * POOL OF LIST ELEMENTS FOR LINKED LIST @@ -52,7 +51,7 @@ typedef struct ItclPreservedData { } ItclPreservedData; static Tcl_HashTable *ItclPreservedList = NULL; - +TCL_DECLARE_MUTEX(ItclPreservedListLock) /* * This structure is used to take a snapshot of the interpreter @@ -556,6 +555,7 @@ Itcl_EventuallyFree(cdata, fproc) * If a list has not yet been created to manage bits of * preserved data, then create it. */ + Tcl_MutexLock(&ItclPreservedListLock); if (!ItclPreservedList) { ItclPreservedList = (Tcl_HashTable*)ckalloc( (unsigned)sizeof(Tcl_HashTable) @@ -585,12 +585,15 @@ Itcl_EventuallyFree(cdata, fproc) * If the usage count is zero, then delete the data now. */ if (chunk->usage == 0) { - chunk->usage = -1; /* cannot preserve/release anymore */ + chunk->usage = -1; /* cannot preserve/release anymore */ - (*chunk->fproc)((char*)chunk->data); - Tcl_DeleteHashEntry(entry); - ckfree((char*)chunk); + Tcl_MutexUnlock(&ItclPreservedListLock); + (*chunk->fproc)((char*)chunk->data); + Tcl_MutexLock(&ItclPreservedListLock); + Tcl_DeleteHashEntry(entry); + ckfree((char*)chunk); } + Tcl_MutexUnlock(&ItclPreservedListLock); } /* @@ -624,6 +627,7 @@ Itcl_PreserveData(cdata) * If a list has not yet been created to manage bits of * preserved data, then create it. */ + Tcl_MutexLock(&ItclPreservedListLock); if (!ItclPreservedList) { ItclPreservedList = (Tcl_HashTable*)ckalloc( (unsigned)sizeof(Tcl_HashTable) @@ -657,6 +661,7 @@ Itcl_PreserveData(cdata) if (chunk->usage >= 0) { chunk->usage++; } + Tcl_MutexUnlock(&ItclPreservedListLock); } /* @@ -688,10 +693,12 @@ Itcl_ReleaseData(cdata) * decrement its usage count. */ entry = NULL; + Tcl_MutexLock(&ItclPreservedListLock); if (ItclPreservedList) { entry = Tcl_FindHashEntry(ItclPreservedList,(char*)cdata); } if (!entry) { + Tcl_MutexUnlock(&ItclPreservedListLock); panic("Itcl_ReleaseData can't find reference for 0x%x", cdata); } @@ -705,14 +712,17 @@ Itcl_ReleaseData(cdata) chunk = (ItclPreservedData*)Tcl_GetHashValue(entry); if (chunk->usage > 0 && --chunk->usage == 0) { - if (chunk->fproc) { - chunk->usage = -1; /* cannot preserve/release anymore */ - (*chunk->fproc)((char*)chunk->data); + if (chunk->fproc) { + chunk->usage = -1; /* cannot preserve/release anymore */ + Tcl_MutexUnlock(&ItclPreservedListLock); + (*chunk->fproc)((char*)chunk->data); + Tcl_MutexLock(&ItclPreservedListLock); } Tcl_DeleteHashEntry(entry); ckfree((char*)chunk); } + Tcl_MutexUnlock(&ItclPreservedListLock); } diff --git a/itcl/itcl/itclConfig.sh.in b/itcl/itcl/itclConfig.sh.in index 2e094a1875b..f8a0ebe33f4 100644 --- a/itcl/itcl/itclConfig.sh.in +++ b/itcl/itcl/itclConfig.sh.in @@ -28,10 +28,7 @@ ITCL_BUILD_LIB_SPEC='@ITCL_BUILD_LIB_SPEC@' # installed directory. ITCL_LIB_SPEC='@ITCL_LIB_SPEC@' -# Full path to itcl library for dependency checking. -ITCL_LIB_FULL_PATH='@ITCL_LIB_FULL_PATH@' - -# The name of the Itcl stub library +# The name of the Itcl stub library (a .a file): ITCL_STUB_LIB_FILE=@ITCL_STUB_LIB_FILE@ # String to pass to linker to pick up the Itcl stub library from its @@ -42,15 +39,9 @@ ITCL_BUILD_STUB_LIB_SPEC='@ITCL_BUILD_STUB_LIB_SPEC@' # installed directory. ITCL_STUB_LIB_SPEC='@ITCL_STUB_LIB_SPEC@' -# Full path to itcl library for dependency checking. -ITCL_STUB_LIB_FULL_PATH='@ITCL_STUB_LIB_FULL_PATH@' - # Location of the top-level source directories from which [incr Tcl] # was built. This is the directory that contains generic, unix, etc. # If [incr Tcl] was compiled in a different place than the directory # containing the source files, this points to the location of the sources, # not the location where [incr Tcl] was compiled. ITCL_SRC_DIR='@ITCL_SRC_DIR@' - -# Name and location of the incr tcl shell. Used during the build process. -ITCL_SH='@ITCL_SH@' diff --git a/itcl/itcl/library/itcl.tcl b/itcl/itcl/library/itcl.tcl index 3a8e54c3b22..78cb48abe96 100644 --- a/itcl/itcl/library/itcl.tcl +++ b/itcl/itcl/library/itcl.tcl @@ -16,6 +16,10 @@ # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. +proc ::itcl::delete_helper { name args } { + ::itcl::delete object $name +} + # ---------------------------------------------------------------------- # USAGE: local <className> <objName> ?<arg> <arg>...? # @@ -31,7 +35,7 @@ proc ::itcl::local {class name args} { uplevel [list set itcl-local-$ptr $ptr] set cmd [uplevel namespace which -command $ptr] uplevel [list trace variable itcl-local-$ptr u \ - "itcl::delete object $cmd; list"] + "::itcl::delete_helper $cmd"] return $ptr } @@ -109,15 +113,6 @@ foreach cmd {public protected private} { } } -# CYGNUS LOCAL -# This version of auto_import does not work, because it relies -# WHOLLY on the tclIndex files, but the tclIndex files have no -# notion of what the export list for a namespace is. So at the -# time you do "namespace import" the export list is empty, and -# so nothing is imported. -# Until that is fixed, it is best just to go back to the original -# Tcl version of auto_import... - # ---------------------------------------------------------------------- # auto_import # ---------------------------------------------------------------------- @@ -131,19 +126,19 @@ foreach cmd {public protected private} { # pattern The pattern of commands being imported (like "foo::*") # a canonical namespace as returned by [namespace current] -#proc auto_import {pattern} { -# global auto_index +proc auto_import {pattern} { + global auto_index -# set ns [uplevel namespace current] -# set patternList [auto_qualify $pattern $ns] + set ns [uplevel namespace current] + set patternList [auto_qualify $pattern $ns] -# auto_load_index + auto_load_index -# foreach pattern $patternList { -# foreach name [array names auto_index $pattern] { -# if {"" == [info commands $name]} { -# ::itcl::import::stub create $name -# } -# } -# } -# } + foreach pattern $patternList { + foreach name [array names auto_index $pattern] { + if {"" == [info commands $name]} { + ::itcl::import::stub create $name + } + } + } +} diff --git a/itcl/itcl/tests/interp.test b/itcl/itcl/tests/interp.test index e6c64793822..8b0015203a7 100644 --- a/itcl/itcl/tests/interp.test +++ b/itcl/itcl/tests/interp.test @@ -72,5 +72,20 @@ test interp-1.4 {one namespace can cause another to be destroyed} { interp delete slave } {} +test interp-1.5 {cleanup interp object list, this should not + include an object that deletes itself in ctor} { + interp create slave + load "" Itcl slave + slave eval { + itcl::class DeleteSelf { + constructor {} { + itcl::delete object $this + } + } + DeleteSelf ds + } + interp delete slave +} {} + ::tcltest::cleanupTests return diff --git a/itcl/itcl/win/dllEntryPoint.c b/itcl/itcl/win/dllEntryPoint.c index 43c25c1f51d..c9842b598bc 100644 --- a/itcl/itcl/win/dllEntryPoint.c +++ b/itcl/itcl/win/dllEntryPoint.c @@ -7,58 +7,17 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> -/* CYGNUS LOCAL */ -#include <tcl.h> - -#ifdef __CYGWIN32__ -/* - * The following declaration is for the VC++ DLL entry point. - */ - -BOOL APIENTRY DllMain _ANSI_ARGS_((HINSTANCE hInst, - DWORD reason, LPVOID reserved)); - -/* cygwin32 requires an impure pointer variable, which must be - explicitly initialized when the DLL starts up. */ -struct _reent *_impure_ptr; -extern struct _reent *_imp__reent_data; - -/* - *---------------------------------------------------------------------- - * - * DllMain -- - * - * DLL entry point. - * - * Results: - * TRUE on sucess, FALSE on failure. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -BOOL APIENTRY -DllMain(hInstance, reason, reserved) - HINSTANCE hInstance; - DWORD reason; - LPVOID reserved; -{ - /* CYGNUS LOCAL */ - /* cygwin32 requires the impure data pointer to be initialized - when the DLL starts up. */ - _impure_ptr = _imp__reent_data; - /* END CYGNUS LOCAL */ - - return(TRUE); -} - -/* END CYGNUS LOCAL */ -#else /* __CYGWIN32__ */ - -#if defined(_MSC_VER) +#ifdef _MSC_VER + /* Only do this when MSVC++ is compiling us. */ # define DllEntryPoint DllMain +# if defined(USE_TCL_STUBS) && (!defined(_MT) || !defined(_DLL) || defined(_DEBUG)) + /* + * This fixes a bug with how the Stubs library was compiled. + * The requirement for msvcrt.lib from tclstubXX.lib should + * be removed. + */ +# pragma comment(linker, "-nodefaultlib:msvcrt.lib") +# endif #endif /* @@ -79,6 +38,8 @@ DllMain(hInstance, reason, reserved) *---------------------------------------------------------------------- */ +#ifndef STATIC_BUILD + BOOL APIENTRY DllEntryPoint(hInst, reason, reserved) HINSTANCE hInst; /* Library instance handle. */ @@ -88,4 +49,4 @@ DllEntryPoint(hInst, reason, reserved) return TRUE; } -#endif +#endif
\ No newline at end of file diff --git a/itcl/itcl/win/makefile.bc b/itcl/itcl/win/makefile.bc index b8983a218e9..fd63b7e1c89 100644 --- a/itcl/itcl/win/makefile.bc +++ b/itcl/itcl/win/makefile.bc @@ -1,212 +1,213 @@ -# Borland C++ 4.52 makefile -# -# Copyright (c) 1993-1996 Lucent Technologies -# based on original from -# Copyright (c) 1995-1996 Sun Microsystems, Inc. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. - -!include "..\..\Makefile.bc" - -# -# Project directories -# -# ROOT = top of source tree -# TMPDIR = location where .obj files should be stored during build - -ROOT = .. -TMPDIR = . -TARGET_LIB_ITCL = $(TARGET_LIB)\Itcl2.2 -TARGET_DOC_ITCL = $(TARGET_DOC)\Itcl - -# uncomment the following line to compile with symbols -#DEBUG=1 - -# uncomment the following two lines to compile with TCL_MEM_DEBUG -#DEBUGDEFINES =TCL_MEM_DEBUG - -INCLUDES =$(BORLAND)\include;$(ROOT)\generic;$(ROOT)\win;$(TCLDIR)\generic -LIBDIRS =$(BORLAND)\lib;$(ROOT)\win - -!ifndef DEBUG - -# these macros cause maximum optimization and no symbols -DEBUGLDFLAGS = -DEBUGCCFLAGS = -v- -vi- -O2 -DEBUGLDFLAGS16 = -Oc -Oi -Oa -Or -!else - -# these macros enable debugging -DEBUGLDFLAGS = -v -DEBUGCCFLAGS = -k -Od -v -DEBUGLDFLAGS16 = -!endif - -DEFINES = _RTLDLL;USE_TCLALLOC=0;$(DEBUGDEFINES);NO_DLFCN_H=1;ITCL_NAMESPACES=1 -PROJECTCCFLAGS = $(DEBUGCCFLAGS) -w-par -w-stu - -CFLAGS16_dll = $(PROJECTCCFLAGS) -I$(INCLUDES) -D$(DEFINES) -WD -ml -c -3 -d -w - -LNFLAGS_exe = -Tpe -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0w32 -LNFLAGS_CONSOLE_exe = -Tpe -ap -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0x32 -LNFLAGS_dll = -Tpd -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0d32 -LNFLAGS16_dll = -Twd -c -C -A=16 $(DEBUGLDFLAGS16) $(BORLAND)\lib\c0dl.obj - -LNLIBS_exe = $(ITCLLIB) $(TCLLIBDIR)\$(TCLLIB) import32 cw32i -LNLIBS_dll = $(TCLLIBDIR)\$(TCLLIB) import32 cw32i -LNLIBS16_dll = import cwl - -# -# Global makefile settings -# - -.AUTODEPEND -.CACHEAUTODEPEND - -.suffixes: .c .dll .lib .obj .exe - -.path.c=$(ROOT)\win;$(ROOT)\generic -.path.obj=$(TMPDIR) -.path.dll=$(ROOT)\win;$(WINDIR);$(WINDIR)\SYSTEM32;$(WINDIR)\SYSTEM - -ITCLSHOBJS = \ - $(TMPDIR)\tclAppInit.obj - -ITCLOBJS = \ - $(TMPDIR)\itcl_bicmds.obj \ - $(TMPDIR)\itcl_class.obj \ - $(TMPDIR)\itcl_cmds.obj \ - $(TMPDIR)\itcl_linkage.obj \ - $(TMPDIR)\itcl_methods.obj \ - $(TMPDIR)\itcl_objects.obj \ - $(TMPDIR)\itcl_obsolete.obj \ - $(TMPDIR)\itcl_parse.obj \ - $(TMPDIR)\itcl_util.obj \ - $(TMPDIR)\dllEntryPoint.obj - - -DUMPEXTS = $(TCLLIBDIR)\dumpexts.exe -ITCLSH = itclsh.exe - -# -# Targets -# - -all: cfgcln cfgdll $(ITCLDLL) cfgexe $(ITCLSH) cfgcln -test: $(ITCLSH) - $(CP) $(TCLLIBDIR)\*.dll - $(ITCLSH) <<| - cd ../tests - source all -| - -install: all - $(MKDIR) "$(TARGET_ROOT)" - $(MKDIR) "$(TARGET_BIN)" - $(MKDIR) "$(TARGET_LIB_ROOT)" - $(MKDIR) "$(TARGET_LIB)" - $(MKDIR) "$(TARGET_LIB_ITCL)" - $(MKDIR) "$(TARGET_INCLUDE_ROOT)" - $(MKDIR) "$(TARGET_INCLUDE)" - $(MKDIR) "$(TARGET_DOC)" - $(MKDIR) "$(TARGET_DOC_ITCL)" - $(CP) $(TMPDIR)\$(ITCLSH) "$(TARGET_BIN)" - $(CP) $(TMPDIR)\$(ITCLDLL) "$(TARGET_BIN)" - $(CP) $(ROOT)\generic\itcl.h "$(TARGET_INCLUDE)" - $(CP) $(ROOT)\library\*.* "$(TARGET_LIB_ITCL)" - $(CP) $(ROOT)\win\*.tcl "$(TARGET_LIB_ITCL)" - $(CP) $(ROOT)\..\html\Itcl\*.* "$(TARGET_DOC_ITCL)" - -# Implicit Targets - -.c.obj: - @$(BCC32) {$< } - -.dll.lib: - $(IMPLIB) -c $@ $< - -#.rc.res: -# $(RC) -i$(INCLUDES) -d__WIN32__;$(DEFINES) $< - -.rc.res: - $(RC) -i$(INCLUDES) -d__WIN32__; $< - - -# -# Configuration file targets - these files are implicitly used by the compiler -# - -cfgdll: - @$(CP) &&| - -n$(TMPDIR) -I$(INCLUDES) -c -WD - -D$(DEFINES) -3 -d -w $(PROJECTCCFLAGS) -| bcc32.cfg >NUL - -cfgexe: - @$(CP) &&| - -n$(TMPDIR) -I$(INCLUDES) -c -W - -D$(DEFINES) -3 -d -w $(PROJECTCCFLAGS) -| bcc32.cfg >NUL - -cfgcln: - -@$(RM) *.cfg - -# -# Executable targets -# - -$(ITCLDLL): $(ITCLOBJS) itcl.def itcl.res - $(TLINK32) $(LNFLAGS_dll) @&&| - $(ITCLOBJS) -$@ --x -$(LNLIBS_dll) -|, itcl.def, itcl.res - -$(ITCLSH): $(ITCLSHOBJS) $(ITCLLIB) itclsh.res - $(TLINK32) $(LNFLAGS_CONSOLE_exe) @&&| - $(ITCLSHOBJS) -$@ --x -$(LNLIBS_exe) -|, &&| -EXETYPE WINDOWS -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -|, itclsh.res - - -# The following rule automatically generates a tcl.def file containing -# an export entry for every public symbol in the tcl.dll library. - -itcl.def: $(ITCLOBJS) - $(DUMPEXTS) -o itcl.def $(ITCLDLL) @&&| - $(ITCLOBJS) -| - - -# debugging rules, the .dll and .exe files must be in the same -# directory as the object files for debugging purposes - -$(TMPDIR)\$(ITCLDLL): $(ITCLDLL) - $(CP) $(ITCLDLL) $(TMPDIR) - -$(TMPDIR)\$(TCLDLL): $(TCLLIBDIR)\$(TCLDLL) - $(CP) $(TCLLIBDIR)\$(TCLDLL) $(TMPDIR) - -$(TMPDIR)\$(ITCLSH): $(ITCLSH) - $(CP) $(ITCLSH) $(TMPDIR) - -debug: $(TMPDIR)\$(ITCLDLL) $(TMPDIR)\$(TCLDLL) - -# remove all generated files - -clean: - -@$(RM) *.exe - -@$(RM) *.lib - -@$(RM) *.dll - -@$(RM) *.res - -@$(RM) itcl.def - -@$(RM) $(TMPDIR)\*.obj - -@$(RM) *.cfg +# Borland C++ 4.52 makefile
+#
+# Copyright (c) 1993-1996 Lucent Technologies
+# based on original from
+# Copyright (c) 1995-1996 Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+!include "..\..\Makefile.bc"
+
+#
+# Project directories
+#
+# ROOT = top of source tree
+# TMPDIR = location where .obj files should be stored during build
+
+ROOT = ..
+TMPDIR = .
+TARGET_LIB_ITCL = $(TARGET_LIB)\Itcl2.2
+TARGET_DOC_ITCL = $(TARGET_DOC)\Itcl
+
+# uncomment the following line to compile with symbols
+#DEBUG=1
+
+# uncomment the following two lines to compile with TCL_MEM_DEBUG
+#DEBUGDEFINES =TCL_MEM_DEBUG
+
+INCLUDES =$(BORLAND)\include;$(ROOT)\generic;$(ROOT)\win;$(TCLDIR)\generic
+LIBDIRS =$(BORLAND)\lib;$(ROOT)\win
+
+!ifndef DEBUG
+
+# these macros cause maximum optimization and no symbols
+DEBUGLDFLAGS =
+DEBUGCCFLAGS = -v- -vi- -O2
+DEBUGLDFLAGS16 = -Oc -Oi -Oa -Or
+!else
+
+# these macros enable debugging
+DEBUGLDFLAGS = -v
+DEBUGCCFLAGS = -k -Od -v
+DEBUGLDFLAGS16 =
+!endif
+
+DEFINES = _RTLDLL;USE_TCLALLOC=0;$(DEBUGDEFINES);NO_DLFCN_H=1;ITCL_NAMESPACES=1
+PROJECTCCFLAGS = $(DEBUGCCFLAGS) -w-par -w-stu
+
+CFLAGS16_dll = $(PROJECTCCFLAGS) -I$(INCLUDES) -D$(DEFINES) -WD -ml -c -3 -d -w
+
+LNFLAGS_exe = -Tpe -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0w32
+LNFLAGS_CONSOLE_exe = -Tpe -ap -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0x32
+LNFLAGS_dll = -Tpd -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0d32
+LNFLAGS16_dll = -Twd -c -C -A=16 $(DEBUGLDFLAGS16) $(BORLAND)\lib\c0dl.obj
+
+LNLIBS_exe = $(ITCLLIB) $(TCLLIBDIR)\$(TCLLIB) import32 cw32i
+LNLIBS_dll = $(TCLLIBDIR)\$(TCLLIB) import32 cw32i
+LNLIBS16_dll = import cwl
+
+#
+# Global makefile settings
+#
+
+.AUTODEPEND
+.CACHEAUTODEPEND
+
+.suffixes: .c .dll .lib .obj .exe
+
+.path.c=$(ROOT)\win;$(ROOT)\generic
+.path.obj=$(TMPDIR)
+.path.dll=$(ROOT)\win;$(WINDIR);$(WINDIR)\SYSTEM32;$(WINDIR)\SYSTEM
+
+ITCLSHOBJS = \
+ $(TMPDIR)\tclAppInit.obj
+
+ITCLOBJS = \
+ $(TMPDIR)\itcl_bicmds.obj \
+ $(TMPDIR)\itcl_class.obj \
+ $(TMPDIR)\itcl_cmds.obj \
+ $(TMPDIR)\itcl_linkage.obj \
+ $(TMPDIR)\itcl_methods.obj \
+ $(TMPDIR)\itcl_objects.obj \
+ $(TMPDIR)\itcl_obsolete.obj \
+ $(TMPDIR)\itcl_parse.obj \
+ $(TMPDIR)\itcl_util.obj \
+ $(TMPDIR)\dllEntryPoint.obj
+
+
+DUMPEXTS = $(TCLLIBDIR)\dumpexts.exe
+ITCLSH = itclsh.exe
+
+#
+# Targets
+#
+
+all: cfgcln cfgdll $(ITCLDLL) cfgexe $(ITCLSH) cfgcln
+test: $(ITCLSH)
+ $(CP) $(TCLLIBDIR)\*.dll
+ $(ITCLSH) <<|
+ cd ../tests
+ source all
+|
+
+install: all
+ $(MKDIR) "$(TARGET_ROOT)"
+ $(MKDIR) "$(TARGET_BIN)"
+ $(MKDIR) "$(TARGET_LIB_ROOT)"
+ $(MKDIR) "$(TARGET_LIB)"
+ $(MKDIR) "$(TARGET_LIB_ITCL)"
+ $(MKDIR) "$(TARGET_INCLUDE_ROOT)"
+ $(MKDIR) "$(TARGET_INCLUDE)"
+ $(MKDIR) "$(TARGET_DOC)"
+ $(MKDIR) "$(TARGET_DOC_ITCL)"
+ $(CP) $(TMPDIR)\$(ITCLSH) "$(TARGET_BIN)"
+ $(CP) $(TMPDIR)\$(ITCLDLL) "$(TARGET_BIN)"
+ $(CP) $(ROOT)\generic\itcl.h "$(TARGET_INCLUDE)"
+ $(CP) $(ROOT)\library\*.* "$(TARGET_LIB_ITCL)"
+ $(CP) $(ROOT)\win\*.tcl "$(TARGET_LIB_ITCL)"
+ $(CP) $(ROOT)\..\html\Itcl\*.* "$(TARGET_DOC_ITCL)"
+
+# Implicit Targets
+
+.c.obj:
+ @$(BCC32) {$< }
+
+.dll.lib:
+ $(IMPLIB) -c $@ $<
+
+#.rc.res:
+# $(RC) -i$(INCLUDES) -d__WIN32__;$(DEFINES) $<
+
+.rc.res:
+ $(RC) -i$(INCLUDES) -d__WIN32__; $<
+
+
+#
+# Configuration file targets - these files are implicitly used by the compiler
+#
+
+cfgdll:
+ @$(CP) &&|
+ -n$(TMPDIR) -I$(INCLUDES) -c -WD
+ -D$(DEFINES) -3 -d -w $(PROJECTCCFLAGS)
+| bcc32.cfg >NUL
+
+cfgexe:
+ @$(CP) &&|
+ -n$(TMPDIR) -I$(INCLUDES) -c -W
+ -D$(DEFINES) -3 -d -w $(PROJECTCCFLAGS)
+| bcc32.cfg >NUL
+
+cfgcln:
+ -@$(RM) *.cfg
+
+#
+# Executable targets
+#
+
+$(ITCLDLL): $(ITCLOBJS) itcl.def itcl.res
+ $(TLINK32) $(LNFLAGS_dll) @&&|
+ $(ITCLOBJS)
+$@
+-x
+$(LNLIBS_dll)
+|, itcl.def, itcl.res
+
+$(ITCLSH): $(ITCLSHOBJS) $(ITCLLIB) itclsh.res
+ $(TLINK32) $(LNFLAGS_CONSOLE_exe) @&&|
+ $(ITCLSHOBJS)
+$@
+-x
+$(LNLIBS_exe)
+|, &&|
+EXETYPE WINDOWS
+CODE PRELOAD MOVEABLE DISCARDABLE
+DATA PRELOAD MOVEABLE MULTIPLE
+|, itclsh.res
+
+
+# The following rule automatically generates a tcl.def file containing
+# an export entry for every public symbol in the tcl.dll library.
+
+itcl.def: $(ITCLOBJS)
+ $(DUMPEXTS) -o itcl.def $(ITCLDLL) @&&|
+ $(ITCLOBJS)
+|
+
+
+# debugging rules, the .dll and .exe files must be in the same
+# directory as the object files for debugging purposes
+
+$(TMPDIR)\$(ITCLDLL): $(ITCLDLL)
+ $(CP) $(ITCLDLL) $(TMPDIR)
+
+$(TMPDIR)\$(TCLDLL): $(TCLLIBDIR)\$(TCLDLL)
+ $(CP) $(TCLLIBDIR)\$(TCLDLL) $(TMPDIR)
+
+$(TMPDIR)\$(ITCLSH): $(ITCLSH)
+ $(CP) $(ITCLSH) $(TMPDIR)
+
+debug: $(TMPDIR)\$(ITCLDLL) $(TMPDIR)\$(TCLDLL)
+
+# remove all generated files
+
+clean:
+ -@$(RM) *.exe
+ -@$(RM) *.lib
+ -@$(RM) *.dll
+ -@$(RM) *.res
+ -@$(RM) itcl.def
+ -@$(RM) $(TMPDIR)\*.obj
+ -@$(RM) *.cfg
+
diff --git a/itcl/itcl/win/makefile.vc b/itcl/itcl/win/makefile.vc index 92a0827d0cb..92fb39c2eaf 100644 --- a/itcl/itcl/win/makefile.vc +++ b/itcl/itcl/win/makefile.vc @@ -1,301 +1,297 @@ -# Visual C++ 2.x and 4.0 makefile -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# Copyright (c) 1993-1998 Lucent Technologies, Inc. -# RCS: $Id$ - -# Does not depend on the presence of any environment variables in -# order to compile itcl; all needed information is derived from -# location of the compiler directories. -# -# NOTE: Be sure to modify the "makefile.vc" file in the toplevel directory -# for the itcl distribution. Include the location of your VC++ development -# tools and the installation directory. - -!include "..\..\makefile.vc" - - -# ROOT = top of source tree -# TMPDIR = location where .obj files should be stored during build - -ROOT = .. - -###################################################################### -# Do not modify below this line -###################################################################### - -NAMEPREFIX = itcl -DOTVERSION = 3.1 -VERSION = 31 -STUBPREFIX = $(NAMEPREFIX)stub - -BINROOT = . -!IF "$(NODEBUG)" == "1" -TMPNAME = Release -DBGX = -!ELSE -TMPNAME = Debug -DBGX = d -!ENDIF -TMPDIR = $(BINROOT)\$(TMPNAME) -OUTDIR = $(TMPDIR) - -PKGINDEX = $(TMPDIR)\pkgIndex.tcl - -ITCLLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)$(DBGX).lib -ITCLDLLNAME = $(NAMEPREFIX)$(VERSION)$(DBGX).dll -ITCLDLL = $(OUTDIR)\$(ITCLDLLNAME) -ITCLSH = $(OUTDIR)\$(NAMEPREFIX)sh$(VERSION)$(DBGX).exe -DUMPEXTS = $(TMPDIR)\dumpexts.exe - -TCLLIB = $(TCLDIR)\win\$(OUTDIR)\tcl81$(DBGX).lib -TCLSTUBLIB = $(TCLDIR)\win\$(OUTDIR)\tclstub81$(DBGX).lib -TCLDLL = $(TCLDIR)\win\$(OUTDIR)\tcl81$(DBGX).dll - -ITCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION)$(DBGX).lib -ITCLSTUBLIB = $(OUTDIR)\$(ITCLSTUBLIBNAME) - -LIB_INSTALL_DIR = $(INSTALLDIR)\lib -BIN_INSTALL_DIR = $(INSTALLDIR)\bin -SCRIPT_INSTALL_DIR = $(INSTALLDIR)\lib\itcl$(DOTVERSION) -INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include - -ITCLSHOBJS = \ - $(TMPDIR)\tclAppInit.obj - -ITCLOBJS = \ - $(TMPDIR)\itclStubInit.obj \ - $(TMPDIR)\itcl_bicmds.obj \ - $(TMPDIR)\itcl_class.obj \ - $(TMPDIR)\itcl_cmds.obj \ - $(TMPDIR)\itcl_ensemble.obj \ - $(TMPDIR)\itcl_linkage.obj \ - $(TMPDIR)\itcl_migrate.obj \ - $(TMPDIR)\itcl_methods.obj \ - $(TMPDIR)\itcl_objects.obj \ - $(TMPDIR)\itcl_obsolete.obj \ - $(TMPDIR)\itcl_parse.obj \ - $(TMPDIR)\itcl_util.obj \ - $(TMPDIR)\dllEntryPoint.obj - -ITCLSTUBOBJS = \ - $(TMPDIR)\itclStubLib.obj - -cc32 = $(TOOLS32)\bin\cl.exe -link32 = $(TOOLS32)\bin\link.exe -rc32 = $(TOOLS32_rc)\bin\rc.exe -include32 = -I$(TOOLS32)\include -lib32 = "$(TOOLS32)\bin\lib.exe" - -WINDIR = $(ROOT)\win -GENERICDIR = $(ROOT)\generic - -ITCL_INCLUDES = -I$(WINDIR) -I$(GENERICDIR) -I$(TCLDIR)\generic -ITCL_DEFINES = -D__WIN32__ -DBUILD_itcl $(DEBUGDEFINES) - -ITCL_EXE_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \ - $(ITCL_INCLUDES) $(ITCL_DEFINES) - -ITCL_CFLAGS = $(ITCL_EXE_CFLAGS) -DUSE_TCL_STUBS - -###################################################################### -# Link flags -###################################################################### - -!IF "$(NODEBUG)" == "1" -ldebug = /RELEASE -!ELSE -ldebug = -debug:full -debugtype:cv -!ENDIF - -# declarations common to all linker options -lcommon = /NODEFAULTLIB /RELEASE /NOLOGO - -# declarations for use on Intel i386, i486, and Pentium systems -!IF "$(MACHINE)" == "IX86" -DLLENTRY = @12 -lflags = $(lcommon) /MACHINE:$(MACHINE) -!ELSE -lflags = $(lcommon) /MACHINE:$(MACHINE) -!ENDIF - -conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup -guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup -dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll - -!IF "$(MACHINE)" == "PPC" -libc = libc.lib -libcdll = crtdll.lib -!ELSE -libc = libc.lib oldnames.lib -libcdll = msvcrt.lib oldnames.lib -!ENDIF - -baselibs = kernel32.lib $(optlibs) advapi32.lib user32.lib -winlibs = $(baselibs) gdi32.lib comdlg32.lib winspool.lib - -guilibs = $(libc) $(winlibs) -conlibs = $(libc) $(baselibs) -guilibsdll = $(libcdll) $(winlibs) -conlibsdll = $(libcdll) $(baselibs) - -###################################################################### -# Compile flags -###################################################################### - -!IF "$(NODEBUG)" == "1" -!IF "$(MACHINE)" == "ALPHA" -# MSVC on Alpha doesn't understand -Ot -cdebug = -O2i -Gs -GD -!ELSE -cdebug = -Oti -Gs -GD -!ENDIF -!ELSE -cdebug = -Z7 -Od -WX -!ENDIF - -# declarations common to all compiler options -ccommon = -c -W3 -nologo -YX -Fp$(TMPDIR)\ -Dtry=__try -Dexcept=__except - -!IF "$(MACHINE)" == "IX86" -cflags = $(ccommon) -D_X86_=1 -!ELSE -!IF "$(MACHINE)" == "MIPS" -cflags = $(ccommon) -D_MIPS_=1 -!ELSE -!IF "$(MACHINE)" == "PPC" -cflags = $(ccommon) -D_PPC_=1 -!ELSE -!IF "$(MACHINE)" == "ALPHA" -cflags = $(ccommon) -D_ALPHA_=1 -!ENDIF -!ENDIF -!ENDIF -!ENDIF - -cvars = -DWIN32 -D_WIN32 -cvarsmt = $(cvars) -D_MT -cvarsdll = $(cvarsmt) -D_DLL - -!IF "$(NODEBUG)" == "1" -cvarsdll = $(cvars) -MD -!ELSE -cvarsdll = $(cvars) -MDd -!ENDIF - -CON_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE - -###################################################################### -# Project specific targets -###################################################################### - -release: setup $(ITCLDLL) $(ITCLSTUBLIB) $(ITCLSH) -all: setup $(ITCLDLL) $(ITCLSTUBLIB) $(ITCLSH) -test: setup $(ITCLDLL) $(ITCLSTUBLIB) $(PKGINDEX) - -@copy $(TCLDLL) $(TMPDIR) - $(TCLSH) << - cd ../tests - lappend auto_path ../win/$(TMPNAME) - set env(ITCL_LIBRARY) ../library - source all -<< - -$(PKGINDEX): - -@copy pkgIndex.tcl $@ - -setup: - if not exist $(TMPDIR) mkdir $(TMPDIR) - if not exist $(OUTDIR) mkdir $(OUTDIR) - -$(ITCLLIB): $(ITCLDLL) - -$(ITCLDLL): $(ITCLOBJS) $(TMPDIR)\itclvc.def $(TMPDIR)\itcl.res - set LIB=$(TOOLS32)\lib - $(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\itclvc.def \ - -out:$@ $(TMPDIR)\itcl.res $(guilibsdll) $(TCLSTUBLIB) @<< - $(ITCLOBJS) -<< - -$(ITCLSTUBLIB): $(ITCLSTUBOBJS) - $(lib32) -nologo -out:$@ $(ITCLSTUBOBJS) - -$(ITCLSH): $(ITCLSHOBJS) $(ITCLSTUBLIB) $(TCLSTUBLIB) $(TMPDIR)\itclsh.res - set LIB=$(TOOLS32)\lib - $(link32) $(ldebug) $(conlflags) $(TMPDIR)\itclsh.res -stack:2300000 \ - -out:$@ $(conlibsdll) $(ITCLLIB) $(TCLLIB) $(ITCLSHOBJS) - -$(TMPDIR)\itclvc.def: $(DUMPEXTS) $(ITCLOBJS) - $(DUMPEXTS) -o $@ $(ITCLDLLNAME) @<< -$(ITCLOBJS) -<< - -$(DUMPEXTS): $(TCLDIR)\win\winDumpExts.c - $(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $? - set LIB=$(TOOLS32)\lib - $(link32) $(ldebug) $(conlflags) $(guilibs) -out:$@ \ - $(TMPDIR)\winDumpExts.obj - -install: all - if not exist $(INSTALLDIR) mkdir $(INSTALLDIR) - if not exist $(BIN_INSTALL_DIR) mkdir $(BIN_INSTALL_DIR) - if not exist $(LIB_INSTALL_DIR) mkdir $(LIB_INSTALL_DIR) - if not exist $(SCRIPT_INSTALL_DIR) mkdir $(SCRIPT_INSTALL_DIR) - if not exist $(INCLUDE_INSTALL_DIR) mkdir $(INCLUDE_INSTALL_DIR) - copy $(ITCLSH) "$(BIN_INSTALL_DIR)" - copy $(ITCLDLL) "$(BIN_INSTALL_DIR)" - copy $(ROOT)\generic\itcl.h "$(INCLUDE_INSTALL_DIR)" - copy $(ROOT)\library\*.* "$(SCRIPT_INSTALL_DIR)" - copy $(ROOT)\win\*.tcl "$(SCRIPT_INSTALL_DIR)" - -# -# Regenerate the stubs files. -# -genstubs: - $(TCLSH) $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \ - $(GENERICDIR)\itcl.decls $(GENERICDIR)\itclInt.decls - -# -# Special case object file targets -# - -$(TMPDIR)\tclAppInit.obj : $(WINDIR)\tclAppInit.c - $(cc32) $(ITCL_EXE_CFLAGS) -Fo$@ $? - -# The following object is part of the stub library and should not -# be built as DLL objects but none of the symbols should be exported - -$(TMPDIR)\itclStubLib.obj : $(GENERICDIR)\itclStubLib.c - $(cc32) -DSTATIC_BUILD $(ITCL_CFLAGS) -Fo$@ $? - -# -# Implicit rules -# - -{$(WINDIR)}.c{$(TMPDIR)}.obj: - $(cc32) -DDLL_BUILD $(ITCL_CFLAGS) -Fo$(TMPDIR)\ $< - -{$(GENERICDIR)}.c{$(TMPDIR)}.obj: - $(cc32) -DDLL_BUILD $(ITCL_CFLAGS) -Fo$(TMPDIR)\ $< - -{$(ROOT)\compat}.c{$(TMPDIR)}.obj: - $(cc32) -DDLL_BUILD $(ITCL_CFLAGS) -Fo$(TMPDIR)\ $< - -{$(WINDIR)}.rc{$(TMPDIR)}.res: - $(rc32) -fo $@ -r -i $(GENERICDIR) -i $(WINDIR) -i $(TCLDIR)\generic -D__WIN32__ \ - $(ITCL_DEFINES) $< - -clean: - -@del $(OUTDIR)\*.exp - -@del $(OUTDIR)\*.lib - -@del $(OUTDIR)\*.dll - -@del $(OUTDIR)\*.exe - -@del $(OUTDIR)\*.pdb - -@del $(TMPDIR)\*.pch - -@del $(TMPDIR)\*.obj - -@del $(TMPDIR)\*.res - -@del $(TMPDIR)\*.def - -@del $(TMPDIR)\*.exe - -@rmdir $(OUTDIR) - -@rmdir $(TMPDIR) +######################################################################
+# Visual C++ 5.0+ makefile for [Incr Tcl]
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# Copyright (c) 1993-1998 Lucent Technologies, Inc.
+# RCS: $Id$
+######################################################################
+# All needed information is derived from running vcvars32.bat
+#
+# NOTE: Be sure to modify the "config.vc" file in the toplevel directory
+# before running this makefile.
+######################################################################
+# Do not modify this file! modify config.vc to effect the build.
+######################################################################
+
+!include "..\..\rules.vc"
+!include "..\..\config.vc"
+!include "..\..\pkg.vc"
+
+BINROOT = .
+ROOT = ..
+NAMEPREFIX = itcl
+STUBPREFIX = $(NAMEPREFIX)stub
+
+!if $(DEBUG)
+TMPNAME = Debug
+DBGX = d
+!else
+TMPNAME = Release
+DBGX =
+!endif
+
+TMP_DIR = $(BINROOT)\$(TMPNAME)
+
+!ifndef OUT_DIR
+OUT_DIR = $(TMP_DIR)
+!endif
+
+PKGINDEX = "$(TMP_DIR)\pkgIndex.tcl"
+
+!if $(STATIC_BUILD)
+ITCLOUTNAME = $(NAMEPREFIX)$(ITCL_VERSION)s$(DBGX)
+ITCLTARGET = "$(OUT_DIR)\$(ITCLOUTNAME).lib"
+!else
+ITCLOUTNAME = $(NAMEPREFIX)$(ITCL_VERSION)$(DBGX)
+ITCLIMPLIB = "$(OUT_DIR)\$(ITCLOUTNAME).lib"
+ITCLTARGET = "$(OUT_DIR)\$(ITCLOUTNAME).dll"
+!endif
+
+!if $(ISTCLINSTALL)
+TCLSTUBLIB = "$(TCLROOT)\lib\tclstub$(TCL_VERSION).lib"
+TCLIMPLIB = "$(TCLROOT)\lib\tcl$(TCL_VERSION)$(DBGX).lib"
+TCLSH = "$(TCLROOT)\bin\tclsh$(TCL_VERSION)$(DBGX).exe"
+!else
+TCLSTUBLIB = "$(TCLROOT)\win\Release\tclstub$(TCL_VERSION).lib"
+TCLIMPLIB = "$(TCLROOT)\win\$(OUT_DIR)\tcl$(TCL_VERSION)$(DBGX).lib"
+TCLSH = "$(TCLROOT)\win\$(OUT_DIR)\tclsh$(TCL_VERSION)$(DBGX).exe"
+!endif
+
+ITCLSTUBLIBNAME = $(STUBPREFIX)$(ITCL_VERSION)$(DBGX).lib
+ITCLSTUBLIB = "$(OUT_DIR)\$(ITCLSTUBLIBNAME)"
+
+LIB_INSTALL_DIR = $(INSTALLDIR)\lib
+BIN_INSTALL_DIR = $(INSTALLDIR)\bin
+SCRIPT_INSTALL_DIR = $(INSTALLDIR)\lib\itcl$(ITCL_DOTVERSION)
+INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include
+
+ITCLSHOBJS = \
+ $(TMP_DIR)\tclAppInit.obj
+
+ITCLOBJS = \
+ $(TMP_DIR)\itcl_bicmds.obj \
+ $(TMP_DIR)\itcl_class.obj \
+ $(TMP_DIR)\itcl_cmds.obj \
+ $(TMP_DIR)\itcl_ensemble.obj \
+ $(TMP_DIR)\itcl_linkage.obj \
+ $(TMP_DIR)\itcl_migrate.obj \
+ $(TMP_DIR)\itcl_methods.obj \
+ $(TMP_DIR)\itcl_objects.obj \
+ $(TMP_DIR)\itcl_obsolete.obj \
+ $(TMP_DIR)\itcl_parse.obj \
+ $(TMP_DIR)\itcl_util.obj \
+!if $(STATIC_BUILD) == 0
+ $(TMP_DIR)\dllEntryPoint.obj \
+ $(TMP_DIR)\dllResource.obj \
+!endif
+ $(TMP_DIR)\itclStubInit.obj
+
+ITCLSTUBOBJS = \
+ $(TMP_DIR)\itclStubLib.obj
+
+WINDIR = $(ROOT)\win
+GENERICDIR = $(ROOT)\generic
+RCDIR = $(ROOT)\win\rc
+
+######################################################################
+# Link flags
+######################################################################
+
+!if $(DEBUG)
+ldebug = -debug:full -debugtype:cv -pdb:none
+!else
+ldebug = -release -opt:ref
+!endif
+
+# declarations common to all linker options
+lcommon = -nologo -link50compat -machine:$(MACHINE)
+
+ITCL_LFLAGS = $(lcommon) -subsystem:windows -dll
+
+!if $(USE_TCL_STUBS) == 0
+ITCL_LLIBS = $(TCLIMPLIB)
+!else
+ITCL_LLIBS = $(TCLSTUBLIB)
+!endif
+
+######################################################################
+# Compile flags
+######################################################################
+
+!IF $(DEBUG) == 0
+!IF "$(MACHINE)" == "ALPHA"
+# MSVC on Alpha doesn't understand -Ot
+cdebug = -O2i
+!ELSE
+cdebug = -Ox
+!ENDIF
+!ELSE
+!if $(MSDEV_VER) < 6
+cdebug = -Zi -Od -WX
+!else
+cdebug = -ZI -Od -WX
+!endif
+!ENDIF
+
+!if $(STATIC_BUILD)
+cdll =
+!else
+cdll = -GD
+!endif
+
+# declarations common to all compiler options
+ccommon = -nologo -c -W3 -YX -Fp$(TMP_DIR)\
+
+!if $(STATIC_BUILD) && $(NOMSVCRT)
+crt = -MT$(DBGX)
+!else
+crt = -MD$(DBGX)
+!endif
+
+!if $(ISTCLINSTALL)
+TCL_INCLUDES = -I"$(TCLROOT)\include"
+!else
+TCL_INCLUDES = -I"$(TCLROOT)\generic"
+!endif
+
+ITCL_INCLUDES = -I$(WINDIR) -I$(GENERICDIR)
+ITCL_DEFINES = -DBUILD_itcl -DTCL_THREADS=1
+ITCL_EXE_CFLAGS = $(ccommon) $(cdebug) $(crt) $(cdll) $(ITCL_INCLUDES) \
+ $(ITCL_DEFINES) $(TCL_INCLUDES)
+
+!if $(USE_TCL_STUBS)
+ITCL_CFLAGS = $(ITCL_EXE_CFLAGS) -DUSE_TCL_STUBS
+!else
+ITCL_CFLAGS = $(ITCL_EXE_CFLAGS)
+!endif
+
+######################################################################
+# Project specific targets
+######################################################################
+
+all : setup $(ITCLTARGET) $(ITCLSTUBLIB)
+release : setup $(ITCLTARGET) $(ITCLSTUBLIB)
+
+!if $(STATIC_BUILD)
+test :
+ @echo test target not supported for a static library.
+!else
+#test : setup $(ITCLTARGET) $(ITCLSTUBLIB) $(PKGINDEX)
+# -@copy $(TCLDLL) $(TMP_DIR)
+# $(TCLSH) <<
+#cd ../tests
+#lappend auto_path ../win/$(TMP_DIR)
+#set env(ITCL_LIBRARY) ../library
+#source all
+#<<
+!endif
+
+$(PKGINDEX) :
+ -@copy pkgIndex.tcl $@
+
+setup :
+ @$(vcvars) > nul
+ @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR) &\
+ echo Created directory '$(TMP_DIR)'
+ @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR) &\
+ echo Created directory '$(OUT_DIR)'
+
+$(ITCLTARGET): $(ITCLOBJS)
+!if $(STATIC_BUILD)
+ $(lib32) -nologo -machine:$(MACHINE) -out:$@ @<<
+!else
+ $(link32) $(ITCL_LFLAGS) -out:$@ $(ITCL_LLIBS) @<<
+!endif
+ $(ITCLOBJS)
+<<
+
+!if $(DEBUG) == 0
+$(ITCLSTUBLIB) : $(ITCLSTUBOBJS)
+ $(lib32) -nologo -out:$@ $(ITCLSTUBOBJS)
+!else
+$(ITCLSTUBLIB) :
+!endif
+
+install : all
+ if not exist "$(INSTALLDIR)" mkdir "$(INSTALLDIR)"
+ if not exist "$(BIN_INSTALL_DIR)" mkdir "$(BIN_INSTALL_DIR)"
+ if not exist "$(LIB_INSTALL_DIR)" mkdir "$(LIB_INSTALL_DIR)"
+ if not exist "$(SCRIPT_INSTALL_DIR)" mkdir "$(SCRIPT_INSTALL_DIR)"
+ if not exist "$(INCLUDE_INSTALL_DIR)" mkdir "$(INCLUDE_INSTALL_DIR)"
+ copy $(ITCLTARGET) "$(SCRIPT_INSTALL_DIR)"
+ -copy $(ITCLSTUBLIB) "$(LIB_INSTALL_DIR)"
+ copy $(ROOT)\generic\itcl.h "$(INCLUDE_INSTALL_DIR)"
+ copy $(ROOT)\generic\itclDecls.h "$(INCLUDE_INSTALL_DIR)"
+ copy $(ROOT)\library\*.* "$(SCRIPT_INSTALL_DIR)"
+ echo package ifneeded Itcl $(ITCL_DOTVERSION) [list load [file join $$dir $(ITCLOUTNAME).dll] Itcl] > \
+ "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+
+######################################################################
+# Regenerate the stubs files.
+######################################################################
+
+!if $(ISTCLINSTALL) == 0
+# Only from the sources of Tcl does genStubs.tcl exist.
+genstubs:
+ $(TCLSH) $(TCLROOT)\tools\genStubs.tcl $(GENERICDIR) \
+ $(GENERICDIR)\itcl.decls $(GENERICDIR)\itclInt.decls
+!endif
+
+######################################################################
+# Special case object file targets
+######################################################################
+
+# The following object is part of the stub library and should not
+# be built as DLL objects but none of the symbols should be exported
+
+$(TMP_DIR)\itclStubLib.obj : $(GENERICDIR)\itclStubLib.c
+ $(cc32) -DSTATIC_BUILD $(ITCL_EXE_CFLAGS) -Zl -Fo$@ $?
+
+$(TMP_DIR)\dllResource.obj : $(TMP_DIR)\itcl.res
+ $(cvtres32) -nologo -machine:$(MACHINE) -out:$@ $?
+
+######################################################################
+# Inference rules. Use batch-mode when supported.
+######################################################################
+
+!if $(_NMAKE_VER) < 162
+{$(WINDIR)}.c{$(TMP_DIR)}.obj :
+!else
+{$(WINDIR)}.c{$(TMP_DIR)}.obj ::
+!endif
+ $(cc32) -DDLL_BUILD $(ITCL_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+!if $(_NMAKE_VER) < 162
+{$(GENERICDIR)}.c{$(TMP_DIR)}.obj :
+!else
+{$(GENERICDIR)}.c{$(TMP_DIR)}.obj ::
+!endif
+ $(cc32) -DDLL_BUILD $(ITCL_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(RCDIR)}.rc{$(TMP_DIR)}.res :
+ $(rc32) -fo $@ -DDEBUG=$(DEBUG) $(ITCL_INCLUDES) $(TCL_INCLUDES) $(ITCL_DEFINES) $<
+
+######################################################################
+# Clean up
+######################################################################
+
+tidy :
+ -del $(TMP_DIR)\*.pch
+ -del $(TMP_DIR)\*.obj
+ -del $(TMP_DIR)\*.res
+
+clean : tidy
+ -del $(OUT_DIR)\*.exp
+ -del $(OUT_DIR)\*.lib
+ -del $(OUT_DIR)\*.dll
+
+hose : clean
+ -rmdir $(OUT_DIR)
+ -rmdir $(TMP_DIR)
+
diff --git a/itcl/itcl/win/rc/itcl.rc b/itcl/itcl/win/rc/itcl.rc new file mode 100644 index 00000000000..6c2be6bff85 --- /dev/null +++ b/itcl/itcl/win/rc/itcl.rc @@ -0,0 +1,60 @@ +// RCS: @(#) $Id$
+//
+// Version resource script.
+//
+
+#include <winver.h>
+
+#define RESOURCE_INCLUDED
+#include <itcl.h>
+
+
+//
+// build-up the name suffix that defines the type of build this is.
+//
+#if DEBUG == 1
+#define SUFFIX_DEBUG "d"
+#else
+#define SUFFIX_DEBUG ""
+#endif
+
+#define SUFFIX SUFFIX_DEBUG
+
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION ITCL_MAJOR_VERSION ,ITCL_MINOR_VERSION ,ITCL_RELEASE_LEVEL, 0
+ PRODUCTVERSION ITCL_MAJOR_VERSION ,ITCL_MINOR_VERSION ,ITCL_RELEASE_LEVEL, 0
+ FILEFLAGSMASK 0x3fL
+#if DEBUG == 1
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "Itcl language extension for Tcl\0"
+ VALUE "Authors", "Michael McLennan\0"
+ VALUE "OriginalFilename", "itcl" STRINGIFY(JOIN(ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION)) SUFFIX ".dll\0"
+ VALUE "CompanyName", "Bell Labs Innovations for Lucent Technologies\0"
+ VALUE "FileVersion", ITCL_PATCH_LEVEL
+ VALUE "LegalCopyright", "Copyright \251 1993-2001\0"
+ VALUE "ProductName", "[incr Tcl] " ITCL_VERSION " for Windows\0"
+ VALUE "ProductVersion", ITCL_PATCH_LEVEL
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+
+
+
+
diff --git a/itcl/itk/Makefile.in b/itcl/itk/Makefile.in index 4a5e8bba79a..25439841256 100644 --- a/itcl/itk/Makefile.in +++ b/itcl/itk/Makefile.in @@ -103,9 +103,7 @@ GENERIC_HDRS= \ SAMPLE_NEW_VAR=@SAMPLE_NEW_VAR@ -# CYGNUS LOCAL -ITK_LIBRARY = @datadir@/itk$(VERSION) -# END CYGNUS LOCAL +ITK_LIBRARY = $(prefix)/lib/itk$(VERSION) ITK_GENERIC_DIR_NATIVE = @ITK_GENERIC_DIR_NATIVE@ ITK_UNIX_DIR_NATIVE = @ITK_UNIX_DIR_NATIVE@ @@ -145,9 +143,8 @@ pkgincludedir = $(includedir)/@PACKAGE@@VERSION@ top_builddir = . -# CYGNUS LOCAL -INSTALL = @INSTALL@ -# END CYGNUS LOCAL +#INSTALL = $(top_srcdir)/../config/install-sh -c +INSTALL = $(TCLSH_PROG) `@CYGPATH@ $(top_srcdir)/../config/installFile.tcl` -c INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -290,6 +287,7 @@ install-doc: doc @for i in $(srcdir)/doc/*.n; \ do \ echo "Installing $$i info $(mandir)/mann"; \ + rm -f $(mandir)/mann/`basename $$i`; \ $(INSTALL_DATA) $$i $(mandir)/mann ; \ done @@ -316,12 +314,12 @@ depend: $(itk_LIB_FILE): $(itk_OBJECTS) -rm -f $(itk_LIB_FILE) @MAKE_LIB@ - @POST_MAKE_LIB@ + $(RANLIB) $(itk_LIB_FILE) $(itkstub_LIB_FILE): $(itkstub_OBJECTS) -rm -f $(itkstub_LIB_FILE) @MAKE_STATIC_LIB@ - @POST_MAKE_STATIC_LIB@ + $(RANLIB) $(itkstub_LIB_FILE) #======================================================================== # We need to enumerate the list of .c to .o lines here. diff --git a/itcl/itk/aclocal.m4 b/itcl/itk/aclocal.m4 index 544b05677f0..7ca9320395f 100644 --- a/itcl/itk/aclocal.m4 +++ b/itcl/itk/aclocal.m4 @@ -1,3 +1 @@ builtin(include,../tcl.m4) -builtin(include,../cygtcl.m4) -builtin(include,../../config/acinclude.m4) diff --git a/itcl/itk/configure b/itcl/itk/configure index 58134762670..4703c2aca36 100755 --- a/itcl/itk/configure +++ b/itcl/itk/configure @@ -12,14 +12,14 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help + --enable-gcc allow use of gcc if available [--disable-gcc]" +ac_help="$ac_help --with-tcl directory containing tcl configuration (tclConfig.sh)" ac_help="$ac_help --with-tk directory containing tk configuration (tkConfig.sh)" ac_help="$ac_help --with-itclinclude=DIR use Itcl headers from DIR" ac_help="$ac_help - --with-itclconfig directory containing itcl configuration (itclConfig.sh)" -ac_help="$ac_help --enable-threads build with threads" ac_help="$ac_help --enable-shared build and link with shared libraries [--enable-shared]" @@ -42,7 +42,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -157,7 +156,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -328,11 +326,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -498,16 +491,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -546,9 +535,8 @@ else fi -# CYGNUS LOCAL ac_aux_dir= -for ac_dir in ../.. $srcdir/../..; do +for ac_dir in ../config $srcdir/../config; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -560,13 +548,12 @@ for ac_dir in ../.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in ../.. $srcdir/../.." 1>&2; exit 1; } + { echo "configure: error: can not find install-sh or install.sh in ../config $srcdir/../config" 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. -# END CYGNUS LOCAL #-------------------------------------------------------------------- # __CHANGE__ @@ -580,7 +567,7 @@ PACKAGE=itk MAJOR_VERSION=3 MINOR_VERSION=2 -PATCHLEVEL=.0 +PATCHLEVEL=.1 VERSION=${MAJOR_VERSION}.${MINOR_VERSION} NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} @@ -618,11 +605,31 @@ fi # was not used. #-------------------------------------------------------------------- -# CYGNUS LOCAL -# Extract the first word of "gcc", so it can be a program name with args. + + # Check whether --enable-gcc or --disable-gcc was given. +if test "${enable_gcc+set}" = set; then + enableval="$enable_gcc" + ok=$enableval +else + ok=no +fi + + if test "$ok" = "yes"; then + CC=gcc + else + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) + CC=cl + ;; + *) + CC=${CC-cc} + ;; + esac + fi + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:626: checking for $ac_word" >&5 +echo "configure:633: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -652,7 +659,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:656: checking for $ac_word" >&5 +echo "configure:663: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -703,7 +710,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:707: checking for $ac_word" >&5 +echo "configure:714: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -735,7 +742,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:739: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -746,12 +753,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 750 "configure" +#line 757 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -777,12 +784,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:781: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:788: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:786: checking whether we are using GNU C" >&5 +echo "configure:793: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -791,7 +798,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -810,7 +817,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:814: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:821: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -841,7 +848,7 @@ else fi fi -# END CYGNUS LOCAL + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -854,7 +861,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:858: checking for a BSD compatible install" >&5 +echo "configure:865: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -912,7 +919,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' #-------------------------------------------------------------------- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:916: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:923: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -946,7 +953,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:950: checking for $ac_word" >&5 +echo "configure:957: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -979,12 +986,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:983: checking for Cygwin environment" >&5 +echo "configure:990: 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 988 "configure" +#line 995 "configure" #include "confdefs.h" int main() { @@ -995,7 +1002,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -1017,13 +1024,13 @@ test "$ac_cv_cygwin" = yes && CYGWIN=yes #-------------------------------------------------------------------- echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1021: checking for object suffix" >&5 +echo "configure:1028: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1041,19 +1048,19 @@ OBJEXT=$ac_cv_objext ac_objext=$ac_cv_objext echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:1045: checking for mingw32 environment" >&5 +echo "configure:1052: 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 1050 "configure" +#line 1057 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:1057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -1072,7 +1079,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1076: checking for executable suffix" >&5 +echo "configure:1083: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1082,10 +1089,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1116,38 +1123,9 @@ ac_exeext=$EXEEXT # This must be done before calling SC_PUBLIC_TCL_HEADERS #-------------------------------------------------------------------- -case "${host}" in - *mingw32* | *windows32*) - # Extract the first word of "cygpath", so it can be a program name with args. -set dummy cygpath; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1125: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CYGPATH"; then - ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CYGPATH="cygpath -w" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" -fi -fi -CYGPATH="$ac_cv_prog_CYGPATH" -if test -n "$CYGPATH"; then - echo "$ac_t""$CYGPATH" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) + CYGPATH="cygpath -w" RELPATH=".. .. bin" ;; *) @@ -1163,16 +1141,12 @@ esac # Includes for this package #-------------------------------------------------------------------- -# CYGNUS LOCAL -srcdir=`cd ${srcdir} ; pwd` -ITK_SRC_DIR_NATIVE=`${CYGPATH} ${srcdir}` -# END CYGNUS LOCAL ITK_GENERIC_DIR_NATIVE=`${CYGPATH} ${srcdir}/generic` ITK_WIN_DIR_NATIVE=`${CYGPATH} ${srcdir}/win` ITK_UNIX_DIR_NATIVE=`${CYGPATH} ${srcdir}/unix` -case "${host}" in - *cygwin* | *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) ITK_PLATFORM_DIR_NATIVE=${ITK_WIN_DIR_NATIVE} ;; *) @@ -1208,7 +1182,7 @@ if test "${with_tcl+set}" = set; then fi echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 -echo "configure:1212: checking for Tcl configuration" >&5 +echo "configure:1186: 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 @@ -1236,10 +1210,6 @@ else ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi - if test -f "$i/win/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/win; pwd)` - break - fi done fi @@ -1262,11 +1232,7 @@ else if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break - fi - if test -f "$i/win/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/win; pwd)` - break - fi + fi done fi @@ -1275,7 +1241,7 @@ fi if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" - { echo "configure: error: Can't find Tcl configuration definitions" 1>&2; exit 1; } + echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 exit 0 else no_tcl= @@ -1286,7 +1252,7 @@ fi echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1290: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 +echo "configure:1256: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then echo "$ac_t""loading" 1>&6 @@ -1341,7 +1307,7 @@ if test "${with_tk+set}" = set; then fi echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 -echo "configure:1345: checking for Tk configuration" >&5 +echo "configure:1311: 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 @@ -1369,10 +1335,6 @@ else ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi - if test -f "$i/win/tkConfig.sh" ; then - ac_cv_c_tkconfig=`(cd $i/win; pwd)` - break - fi done fi # check in a few common install locations @@ -1394,10 +1356,6 @@ else ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi - if test -f "$i/win/tkConfig.sh" ; then - ac_cv_c_tkconfig=`(cd $i/win; pwd)` - break - fi done fi @@ -1405,7 +1363,7 @@ fi if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" - { echo "configure: error: Can't find Tk configuration definitions" 1>&2; exit 1; } + echo "configure: warning: Can't find Tk configuration definitions" 1>&2 exit 0 else no_tk= @@ -1417,7 +1375,7 @@ fi echo $ac_n "checking for existence of $TK_BIN_DIR/tkConfig.sh""... $ac_c" 1>&6 -echo "configure:1421: checking for existence of $TK_BIN_DIR/tkConfig.sh" >&5 +echo "configure:1379: checking for existence of $TK_BIN_DIR/tkConfig.sh" >&5 if test -f "$TK_BIN_DIR/tkConfig.sh" ; then echo "$ac_t""loading" 1>&6 @@ -1448,106 +1406,146 @@ fi ITCL_INCLUDES=-I\"`${CYGPATH} ${ITCL_LIB_DIR}/generic`\" -# CYGNUS LOCAL - -# -# Ok, lets find the itcl configuration -# First, look for one uninstalled. -# the alternative search directory is invoked by --with-itclconfig -# +#-------------------------------------------------------------------- +# The value for this should have been cached during the Itcl configuration. +# Make sure the cache-ID that appears here is the same as the one that +# appears in the Itcl configure script. +#-------------------------------------------------------------------- -if test x"${no_itcl}" = x ; then - # we reset no_itcl in case something fails here - no_itcl=true - # Check whether --with-itclconfig or --without-itclconfig was given. -if test "${with_itclconfig+set}" = set; then - withval="$with_itclconfig" - with_itclconfig=${withval} +echo $ac_n "checking for name if Itcl stub library""... $ac_c" 1>&6 +echo "configure:1417: checking for name if Itcl stub library" >&5 +if eval "test \"`echo '$''{'ac_cv_itclstub_LIB_FILE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_itclstub_LIB_FILE="NONE" fi - echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 -echo "configure:1470: checking for Itcl configuration" >&5 - if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test x"${ac_cv_itclstub_LIB_FILE}" = x"NONE" ; then + { echo "configure: error: Can't find name of Itcl stub library. How did this happen?" 1>&2; exit 1; } else - + echo "$ac_t""${ac_cv_itclstub_LIB_FILE}" 1>&6 +fi +itclstub_LIB_FILE=${ac_cv_itclstub_LIB_FILE} + + + + echo $ac_n "checking for tkstub library""... $ac_c" 1>&6 +echo "configure:1434: checking for tkstub library" >&5 - # First check to see if --with-itclconfig was specified. - if test x"${with_itclconfig}" != x ; then - if test -f "${with_itclconfig}/itclConfig.sh" ; then - ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` + # Look in exec-prefix and prefix for the library. If neither of + # these were specified, look in libdir. It doesn't matter if libdir + # wasn't specified since a search in the unspecified directory will + # fail (NONE/lib) + + if test x"${exec_prefix}" != x"NONE" ; then + sc_lib_name_dir="${exec_prefix}/lib" + elif test x"${prefix}" != "NONE" ; then + sc_lib_name_dir="${prefix}/lib" else - { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } + eval "sc_lib_name_dir=${libdir}" + fi + + if test x"${TK_BIN_DIR}" != x ; then + sc_extra_lib_dir=${TK_BIN_DIR} + else + sc_extra_lib_dir=NONE fi - fi - # then check for a private itcl library - if test x"${ac_cv_c_itclconfig}" = x ; then - for i in \ - ../itcl/itcl \ - `ls -dr ../itcl/itcl[3]* 2>/dev/null` \ - ../../itcl/itcl \ - `ls -dr ../../itcl/itcl[3]* 2>/dev/null` \ - ../../../itcl/itcl \ - `ls -dr ../../../itcl/itcl[3]* 2>/dev/null` ; do - if test -f "$i/itclConfig.sh" ; then - ac_cv_c_itclconfig=`(cd $i; pwd)` - break - fi - done - fi - # check in a few common install locations - if test x"${ac_cv_c_itclconfig}" = x ; then - for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do - if test -f "$i/itclConfig.sh" ; then - ac_cv_c_itclconfig=`(cd $i; pwd)` - break - fi - done - fi - # check in a few other private locations - if test x"${ac_cv_c_itclconfig}" = x ; then for i in \ - ${srcdir}/../itcl/itcl \ - `ls -dr ${srcdir}/../itcl/itcl[3]* 2>/dev/null` ; do - if test -f "$i/itcl/itclConfig.sh" ; then - ac_cv_c_itclconfig=`(cd $i; pwd)` - break - fi + `ls -dr ${sc_extra_lib_dir}/tkstub[0-9]*.lib 2>/dev/null ` \ + `ls -dr ${sc_extra_lib_dir}/libtkstub[0-9]* 2>/dev/null ` \ + `ls -dr ${sc_lib_name_dir}/tkstub[0-9]*.lib 2>/dev/null ` \ + `ls -dr ${sc_lib_name_dir}/libtkstub[0-9]* 2>/dev/null ` \ + `ls -dr /usr/lib/tkstub[0-9]*.lib 2>/dev/null ` \ + `ls -dr /usr/lib/libtkstub[0-9]* 2>/dev/null ` \ + `ls -dr /usr/local/lib/tkstub[0-9]*.lib 2>/dev/null ` \ + `ls -dr /usr/local/lib/libtkstub[0-9]* 2>/dev/null ` ; do + if test -f "$i" ; then + + sc_lib_name_dir=`dirname $i` + tkstub_LIB_NAME=`basename $i` + tkstub_LIB_PATH_NAME=$i + break + fi done - fi - -fi - if test x"${ac_cv_c_itclconfig}" = x ; then - ITCLCONFIG="# no itcl configs found" - { echo "configure: error: Can't find itcl configuration definitions" 1>&2; exit 1; } - else - no_itcl= - ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh - echo "$ac_t""found $ITCLCONFIG" 1>&6 - fi -fi + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) + tkstub_LIB_SPEC=\"`${CYGPATH} ${tkstub_LIB_PATH_NAME}`\" + ;; + *) + # Strip off the leading "lib" and trailing ".a" or ".so" + sc_lib_name_lib=`echo ${tkstub_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[^.]*$//'` + tkstub_LIB_SPEC="-L${sc_lib_name_dir} -l${sc_lib_name_lib}" + ;; + esac + if test "xtkstub_LIB_NAME" = x ; then + { echo "configure: error: not found" 1>&2; exit 1; } + else + echo "$ac_t""${tkstub_LIB_SPEC}" 1>&6 + fi - if test -f "$ITCLCONFIG" ; then - . $ITCLCONFIG - fi - - - - + echo $ac_n "checking for itclstub library""... $ac_c" 1>&6 +echo "configure:1494: checking for itclstub library" >&5 + # Look in exec-prefix and prefix for the library. If neither of + # these were specified, look in libdir. It doesn't matter if libdir + # wasn't specified since a search in the unspecified directory will + # fail (NONE/lib) -itclstub_LIB_FILE=${ITCL_STUB_LIB_FILE} + if test x"${exec_prefix}" != x"NONE" ; then + sc_lib_name_dir="${exec_prefix}/lib" + elif test x"${prefix}" != "NONE" ; then + sc_lib_name_dir="${prefix}/lib" + else + eval "sc_lib_name_dir=${libdir}" + fi + if test x"../itcl" != x ; then + sc_extra_lib_dir=../itcl + else + sc_extra_lib_dir=NONE + fi -tkstub_LIB_SPEC=${TK_STUB_LIB_SPEC} + for i in \ + `ls -dr ${sc_extra_lib_dir}/itclstub[0-9]*.lib 2>/dev/null ` \ + `ls -dr ${sc_extra_lib_dir}/libitclstub[0-9]* 2>/dev/null ` \ + `ls -dr ${sc_lib_name_dir}/itclstub[0-9]*.lib 2>/dev/null ` \ + `ls -dr ${sc_lib_name_dir}/libitclstub[0-9]* 2>/dev/null ` \ + `ls -dr /usr/lib/itclstub[0-9]*.lib 2>/dev/null ` \ + `ls -dr /usr/lib/libitclstub[0-9]* 2>/dev/null ` \ + `ls -dr /usr/local/lib/itclstub[0-9]*.lib 2>/dev/null ` \ + `ls -dr /usr/local/lib/libitclstub[0-9]* 2>/dev/null ` ; do + if test -f "$i" ; then + + sc_lib_name_dir=`dirname $i` + itclstub_LIB_NAME=`basename $i` + itclstub_LIB_PATH_NAME=$i + break + fi + done + + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) + itclstub_LIB_SPEC=\"`${CYGPATH} ${itclstub_LIB_PATH_NAME}`\" + ;; + *) + # Strip off the leading "lib" and trailing ".a" or ".so" + + sc_lib_name_lib=`echo ${itclstub_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[^.]*$//'` + itclstub_LIB_SPEC="-L${sc_lib_name_dir} -l${sc_lib_name_lib}" + ;; + esac + if test "xitclstub_LIB_NAME" = x ; then + { echo "configure: error: not found" 1>&2; exit 1; } + else + echo "$ac_t""${itclstub_LIB_SPEC}" 1>&6 + fi -# END CYGNUS LOCAL #-------------------------------------------------------------------- # __CHANGE__ @@ -1563,10 +1561,10 @@ tkstub_LIB_SPEC=${TK_STUB_LIB_SPEC} #SC_PUBLIC_TCL_HEADERS echo $ac_n "checking for Tcl private include files""... $ac_c" 1>&6 -echo "configure:1567: checking for Tcl private include files" >&5 +echo "configure:1565: checking for Tcl private include files" >&5 - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\" TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\" TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\" @@ -1604,10 +1602,10 @@ echo "configure:1567: checking for Tcl private include files" >&5 #SC_PUBLIC_TK_HEADERS echo $ac_n "checking for Tk private include files""... $ac_c" 1>&6 -echo "configure:1608: checking for Tk private include files" >&5 +echo "configure:1606: checking for Tk private include files" >&5 - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\" TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\" TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\" @@ -1653,8 +1651,8 @@ echo "configure:1608: checking for Tk private include files" >&5 # your system. #-------------------------------------------------------------------- -case "${host}" in - *cygwin* | *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) cat >> confdefs.h <<EOF #define BUILD_${PACKAGE} 1 EOF @@ -1684,7 +1682,7 @@ esac echo $ac_n "checking for building with threads""... $ac_c" 1>&6 -echo "configure:1688: checking for building with threads" >&5 +echo "configure:1686: checking for building with threads" >&5 # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then enableval="$enable_threads" @@ -1705,13 +1703,13 @@ EOF EOF - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) echo "$ac_t""yes" 1>&6 ;; *) echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1715: checking for pthread_mutex_init in -lpthread" >&5 +echo "configure:1713: checking for pthread_mutex_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1719,7 +1717,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <<EOF -#line 1723 "configure" +#line 1721 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1730,7 +1728,7 @@ int main() { pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1732: \"$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 @@ -1776,26 +1774,22 @@ fi echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:1780: checking how to build libraries" >&5 +echo "configure:1778: checking how to build libraries" >&5 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else - tcl_ok=no + tcl_ok=yes fi -# CYGNUS LOCAL - case "${host}" in - *mingw32* | *windows32*) - # Default to shared build for Windows - if test "${enable_shared+set}" != set; then - tcl_ok=yes - fi - ;; - esac -# END CYGNUS LOCAL + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval + else + tcl_ok=yes + fi if test "$tcl_ok" = "yes" ; then echo "$ac_t""shared" 1>&6 @@ -1837,8 +1831,8 @@ SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS} #-------------------------------------------------------------------- - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) tcl_dbgx=d ;; *) @@ -1847,7 +1841,7 @@ SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS} esac echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:1851: checking for build with symbols" >&5 +echo "configure:1845: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -1910,20 +1904,15 @@ fi #-------------------------------------------------------------------- - case "${host}" in - *mingw32* | *windows32*) - if test "${CC}" = "cl"; then + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) + if test "${CC-cc}" = "cl"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$@_OBJECTS) " MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$@_OBJECTS) " - else - MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$@_OBJECTS) " - POST_MAKE_STATIC_LIB="\${RANLIB} \$@" - MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$@_OBJECTS) \${SHLIB_LDFLAGS} \$(LDFLAGS) \${SHLIB_LD_LIBS} -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)" fi ;; *) MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$@_OBJECTS)" - POST_MAKE_STATIC_LIB="\${RANLIB} \$@" MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" ;; esac @@ -1932,14 +1921,11 @@ fi MAKE_LIB=${MAKE_SHARED_LIB} else MAKE_LIB=${MAKE_STATIC_LIB} - POST_MAKE_LIB=${POST_MAKE_STATIC_LIB} fi - - #-------------------------------------------------------------------- @@ -1953,564 +1939,28 @@ eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}" # Shared libraries and static libraries have different names. #-------------------------------------------------------------------- -# CYGNUS LOCAL - -if test "${SHARED_BUILD}" = "1" ; then - # FIXME: Need to devise a TCL_TOOL macro to deal with this! - case "${host}" in - *mingw32* | *windows32*) - SHLIB_LD_LIBS="${TCL_BUILD_STUB_LIB_SPEC} ${TCL_SHLIB_LD_LIBS} \ - ${ITCL_BUILD_STUB_LIB_SPEC} ${TK_BUILD_STUB_LIB_SPEC}" - # Need to link to the .a or .lib not the .dll! - - libname=${PACKAGE} - suffix=${SHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32* | *cygwin*) - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITK_SHLIB_FILE=$long_libname - - - libname=${PACKAGE} - suffix=${UNSHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - else - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - fi - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITK_LIB_FILE=$long_libname - - ITK_TARGET_FILE=${ITK_SHLIB_FILE} - ;; - *) - SHLIB_LD_LIBS="${TK_BUILD_STUB_LIB_SPEC} ${TCL_BUILD_STUB_LIB_SPEC} \ - ${ITCL_BUILD_STUB_LIB_SPEC}" - - libname=${PACKAGE} - suffix=${SHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32* | *cygwin*) - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITK_LIB_FILE=$long_libname - - ITK_TARGET_FILE=${ITK_LIB_FILE} - ;; - esac -else - - libname=${PACKAGE} - suffix=${UNSHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - else - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - fi - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITK_LIB_FILE=$long_libname - - ITK_TARGET_FILE=${ITK_LIB_FILE} -fi - - - libname=${PACKAGE}stub - suffix=${UNSHARED_LIB_SUFFIX} - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - else - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - fi - ;; - *) - eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\"" - ;; - esac - - eval "long_libname=${long_libname}" - - # Trick to replace DBGX with TCL_DBGX - DBGX='${TCL_DBGX}' - eval "long_libname=${long_libname}" - - ITK_STUB_LIB_FILE=$long_libname - - - - - - - libname=${PACKAGE} - version=${VERSION} - - if test "$TCL_LIB_SUFFIX" = "" ; then - { echo "configure: error: The TCL_LIB_SUFFIX variable is not defined" 1>&2; exit 1; } - fi - - # If the . character is not allowed in lib name, remove it from version - if test "${TCL_LIB_VERSIONS_OK}" != "ok"; then - version=`echo $version | tr -d .` - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "short_libname=\"${TCL_VENDOR_PREFIX}${libname}${version}${TCL_LIB_SUFFIX}\"" - else - short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}${TCL_DBGX}" - fi - ;; - *) - short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}\${TCL_DBGX}" - ;; - esac - - ITK_LIB_FLAG=$short_libname - - - libname=${PACKAGE}stub - version=${VERSION} - - if test "$TCL_LIB_SUFFIX" = "" ; then - { echo "configure: error: The TCL_LIB_SUFFIX variable is not defined" 1>&2; exit 1; } - fi - - # If the . character is not allowed in lib name, remove it from version - if test "${TCL_LIB_VERSIONS_OK}" != "ok"; then - version=`echo $version | tr -d .` - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - eval "short_libname=\"${TCL_VENDOR_PREFIX}${libname}${version}${TCL_LIB_SUFFIX}\"" - else - short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}${TCL_DBGX}" - fi - ;; - *) - short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}\${TCL_DBGX}" - ;; - esac - - ITK_STUB_LIB_FLAG=$short_libname - - - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - - val="`pwd`/${ITK_LIB_FLAG}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITK_BUILD_LIB_SPEC" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITK_BUILD_LIB_SPEC=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITK_BUILD_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITK_BUILD_LIB_SPEC=$val - ;; - esac - - else - - val=`pwd` - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - dirname=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - dirname="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - dirname=$val - ;; - esac - - ITK_BUILD_LIB_SPEC="-L${dirname} ${ITK_LIB_FLAG}" - fi - ;; - *) - ITK_BUILD_LIB_SPEC="-L`pwd` ${ITK_LIB_FLAG}" - ;; - esac - - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - - val="`pwd`/${ITK_STUB_LIB_FLAG}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITK_BUILD_STUB_LIB_SPEC" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITK_BUILD_STUB_LIB_SPEC=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITK_BUILD_STUB_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITK_BUILD_STUB_LIB_SPEC=$val - ;; - esac - - else - - val=`pwd` - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - dirname=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - dirname="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - dirname=$val - ;; - esac - - ITK_BUILD_STUB_LIB_SPEC="-L${dirname} ${ITK_STUB_LIB_FLAG}" - fi - ;; - *) - ITK_BUILD_STUB_LIB_SPEC="-L`pwd` ${ITK_STUB_LIB_FLAG}" - ;; - esac - - - - - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - - val="${exec_prefix}/lib/${ITK_LIB_FLAG}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITK_LIB_SPEC" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITK_LIB_SPEC=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITK_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITK_LIB_SPEC=$val - ;; - esac - - else - - val=${exec_prefix}/lib - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - dirname=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - dirname="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - dirname=$val - ;; - esac - - ITK_LIB_SPEC="-L${dirname} ${ITK_LIB_FLAG}" - fi - ;; - *) - ITK_LIB_SPEC="-L${exec_prefix}/lib ${ITK_LIB_FLAG}" - ;; - esac - - - case "${host}" in - *windows32* | *mingw32*) - if test "$GCC" != yes; then - - val="${exec_prefix}/lib/${ITK_STUB_LIB_FLAG}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITK_STUB_LIB_SPEC" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITK_STUB_LIB_SPEC=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITK_STUB_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITK_STUB_LIB_SPEC=$val - ;; - esac - - else - - val=${exec_prefix}/lib - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - dirname=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - dirname="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - dirname=$val - ;; - esac - - ITK_STUB_LIB_SPEC="-L${dirname} ${ITK_STUB_LIB_FLAG}" - fi - ;; - *) - ITK_STUB_LIB_SPEC="-L${exec_prefix}/lib ${ITK_STUB_LIB_FLAG}" - ;; - esac - - - - - - - val="`pwd`/${ITK_LIB_FILE}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITK_LIB_FULL_PATH" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITK_LIB_FULL_PATH=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITK_LIB_FULL_PATH="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; - *) - # Default to a no-op under Unix or Cygwin gcc - ITK_LIB_FULL_PATH=$val - ;; - esac - - - - - val="`pwd`/${ITK_STUB_LIB_FILE}" - - if test "$val" = "" ; then - { echo "configure: error: Empty value for variable ITK_STUB_LIB_FULL_PATH" 1>&2; exit 1; } - fi - - case "${host}" in - *windows32* | *mingw32*) - if test "${CYGPATH}" = ""; then - { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; } - elif test "${CYGPATH}" = "echo"; then - # No cygpath when cross compiling - ITK_STUB_LIB_FULL_PATH=$val - else - # store literal argument text in a variable - val=$val - # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo) - val="`${CYGPATH} $val`" - # Convert path like C:\Tmp\foo to C:/Tmp/foo - ITK_STUB_LIB_FULL_PATH="`echo $val | sed -e s#\\\\\\\\#/#g`" - fi - ;; +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS} \"`${CYGPATH} ../itcl/${itclstub_LIB_FILE}`\" ${tkstub_LIB_SPEC} " + eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}" + fi + eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" + ;; *) - # Default to a no-op under Unix or Cygwin gcc - ITK_STUB_LIB_FULL_PATH=$val - ;; - esac - - - - - -itkstub_LIB_FILE=${ITK_STUB_LIB_FILE} -itk_LIB_FILE=${ITK_TARGET_FILE} - -# END CYGNUS LOCAL + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="${tkstub_LIB_SPEC} ${TCL_BUILD_STUB_LIB_SPEC} ../itcl/${itclstub_LIB_FILE}" + eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}" + fi + eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" + ;; +esac #-------------------------------------------------------------------- # __CHANGE__ @@ -2531,42 +1981,79 @@ itk_LIB_FILE=${ITK_TARGET_FILE} # versions have bugs in the pkg_mkIndex routine. #-------------------------------------------------------------------- -# CYGNUS LOCAL -# A Tcl shell is not available when bootstrapping! -# END CYGNUS LOCAL - -#-------------------------------------------------------------------- -# A wish shell is needed to run the test suite. -#-------------------------------------------------------------------- - -# CYGNUS LOCAL -# A Wish shell is not available when bootstrapping! -# END CYGNUS LOCAL -#-------------------------------------------------------------------- -# Finally, substitute all of the various values into the Makefile. -#-------------------------------------------------------------------- + echo $ac_n "checking for tclsh""... $ac_c" 1>&6 +echo "configure:1987: checking for tclsh" >&5 -# CYGNUS LOCAL + if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` + for dir in $search_path ; do + for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \ + `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do + if test x"$ac_cv_path_tclsh" = x ; then + if test -f "$j" ; then + ac_cv_path_tclsh=$j + break + fi + fi + done + done + +fi -# Note: The itkConfig.sh file below is not included in the net release. -# We subst these variables to retain compatibility with the previous -# version of itkConfig.sh. -ITCL_VERSION=${VERSION} + if test -f "$ac_cv_path_tclsh" ; then + TCLSH_PROG=$ac_cv_path_tclsh + echo "$ac_t""$TCLSH_PROG" 1>&6 + else + { echo "configure: error: No tclsh found in PATH: $search_path" 1>&2; exit 1; } + fi + -ITCL_MAJOR_VERSION=${MAJOR_VERSION} +#-------------------------------------------------------------------- +# A wish shell is needed to run the test suite. +#-------------------------------------------------------------------- -ITCL_MINOR_VERSION=${MINOR_VERSION} + echo $ac_n "checking for wish""... $ac_c" 1>&6 +echo "configure:2024: checking for wish" >&5 + if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` + for dir in $search_path ; do + for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \ + `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do + if test x"$ac_cv_path_wish" = x ; then + if test -f "$j" ; then + ac_cv_path_wish=$j + break + fi + fi + done + done + +fi -ITCL_RELEASE_LEVEL=${PATCHLEVEL} + if test -f "$ac_cv_path_wish" ; then + WISH_PROG=$ac_cv_path_wish + echo "$ac_t""$WISH_PROG" 1>&6 + else + { echo "configure: error: No wish found in PATH: $search_path" 1>&2; exit 1; } + fi + -ITK_SRC_DIR=${ITK_SRC_DIR_NATIVE} +#-------------------------------------------------------------------- +# Finally, substitute all of the various values into the Makefile. +#-------------------------------------------------------------------- trap '' 1 2 15 cat > confcache <<\EOF @@ -2682,8 +2169,7 @@ ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile \ - itkConfig.sh \ - pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 + pkgIndex.tcl itkConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF @@ -2750,10 +2236,6 @@ s%@TK_SRC_DIR@%$TK_SRC_DIR%g s%@TK_LIB_FILE@%$TK_LIB_FILE%g s%@TK_XINCLUDES@%$TK_XINCLUDES%g s%@ITCL_INCLUDES@%$ITCL_INCLUDES%g -s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g -s%@ITCL_SH@%$ITCL_SH%g -s%@ITCL_LIB_FILE@%$ITCL_LIB_FILE%g -s%@ITCL_LIB_FULL_PATH@%$ITCL_LIB_FULL_PATH%g s%@itclstub_LIB_FILE@%$itclstub_LIB_FILE%g s%@tkstub_LIB_SPEC@%$tkstub_LIB_SPEC%g s%@TCL_TOP_DIR_NATIVE@%$TCL_TOP_DIR_NATIVE%g @@ -2785,24 +2267,11 @@ s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g s%@MAKE_LIB@%$MAKE_LIB%g s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g -s%@POST_MAKE_LIB@%$POST_MAKE_LIB%g -s%@POST_MAKE_STATIC_LIB@%$POST_MAKE_STATIC_LIB%g -s%@ITK_LIB_FILE@%$ITK_LIB_FILE%g -s%@ITK_STUB_LIB_FILE@%$ITK_STUB_LIB_FILE%g -s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g -s%@ITK_BUILD_STUB_LIB_SPEC@%$ITK_BUILD_STUB_LIB_SPEC%g -s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g -s%@ITK_STUB_LIB_SPEC@%$ITK_STUB_LIB_SPEC%g -s%@ITK_LIB_FULL_PATH@%$ITK_LIB_FULL_PATH%g -s%@ITK_STUB_LIB_FULL_PATH@%$ITK_STUB_LIB_FULL_PATH%g s%@itkstub_LIB_FILE@%$itkstub_LIB_FILE%g s%@itk_LIB_FILE@%$itk_LIB_FILE%g s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g -s%@ITCL_VERSION@%$ITCL_VERSION%g -s%@ITCL_MAJOR_VERSION@%$ITCL_MAJOR_VERSION%g -s%@ITCL_MINOR_VERSION@%$ITCL_MINOR_VERSION%g -s%@ITCL_RELEASE_LEVEL@%$ITCL_RELEASE_LEVEL%g -s%@ITK_SRC_DIR@%$ITK_SRC_DIR%g +s%@TCLSH_PROG@%$TCLSH_PROG%g +s%@WISH_PROG@%$WISH_PROG%g CEOF EOF @@ -2845,8 +2314,7 @@ EOF cat >> $CONFIG_STATUS <<EOF CONFIG_FILES=\${CONFIG_FILES-"Makefile \ - itkConfig.sh \ - pkgIndex.tcl"} + pkgIndex.tcl itkConfig.sh"} EOF cat >> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -2917,5 +2385,3 @@ chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -# END CYGNUS LOCAL diff --git a/itcl/itk/configure.in b/itcl/itk/configure.in index b39ace6d032..87d309f74b2 100644 --- a/itcl/itk/configure.in +++ b/itcl/itk/configure.in @@ -13,9 +13,7 @@ #-------------------------------------------------------------------- AC_INIT(generic/itk.h) -# CYGNUS LOCAL -AC_CONFIG_AUX_DIR(../..) -# END CYGNUS LOCAL +AC_CONFIG_AUX_DIR(../config) #-------------------------------------------------------------------- # __CHANGE__ @@ -29,7 +27,7 @@ PACKAGE=itk MAJOR_VERSION=3 MINOR_VERSION=2 -PATCHLEVEL=.0 +PATCHLEVEL=.1 VERSION=${MAJOR_VERSION}.${MINOR_VERSION} NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} @@ -64,10 +62,7 @@ fi # was not used. #-------------------------------------------------------------------- -# CYGNUS LOCAL -dnl SC_ENABLE_GCC -AC_PROG_CC -# END CYGNUS LOCAL +SC_ENABLE_GCC AC_PROG_INSTALL #-------------------------------------------------------------------- @@ -108,8 +103,9 @@ AC_EXEEXT # This must be done before calling SC_PUBLIC_TCL_HEADERS #-------------------------------------------------------------------- -case "${host}" in - *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) + CYGPATH="cygpath -w" AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) RELPATH=".. .. bin" ;; @@ -126,16 +122,12 @@ AC_SUBST(RELPATH) # Includes for this package #-------------------------------------------------------------------- -# CYGNUS LOCAL -srcdir=`cd ${srcdir} ; pwd` -ITK_SRC_DIR_NATIVE=`${CYGPATH} ${srcdir}` -# END CYGNUS LOCAL ITK_GENERIC_DIR_NATIVE=`${CYGPATH} ${srcdir}/generic` ITK_WIN_DIR_NATIVE=`${CYGPATH} ${srcdir}/win` ITK_UNIX_DIR_NATIVE=`${CYGPATH} ${srcdir}/unix` -case "${host}" in - *cygwin* | *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) ITK_PLATFORM_DIR_NATIVE=${ITK_WIN_DIR_NATIVE} ;; *) @@ -174,16 +166,26 @@ fi ITCL_INCLUDES=-I\"`${CYGPATH} ${ITCL_LIB_DIR}/generic`\" AC_SUBST(ITCL_INCLUDES) -# CYGNUS LOCAL -CYG_AC_PATH_ITCLCONFIG -CYG_AC_LOAD_ITCLCONFIG +#-------------------------------------------------------------------- +# The value for this should have been cached during the Itcl configuration. +# Make sure the cache-ID that appears here is the same as the one that +# appears in the Itcl configure script. +#-------------------------------------------------------------------- -itclstub_LIB_FILE=${ITCL_STUB_LIB_FILE} +AC_MSG_CHECKING(for name if Itcl stub library) +AC_CACHE_VAL(ac_cv_itclstub_LIB_FILE, ac_cv_itclstub_LIB_FILE="NONE") +if test x"${ac_cv_itclstub_LIB_FILE}" = x"NONE" ; then + AC_MSG_ERROR(Can't find name of Itcl stub library. How did this happen?) +else + AC_MSG_RESULT(${ac_cv_itclstub_LIB_FILE}) +fi +itclstub_LIB_FILE=${ac_cv_itclstub_LIB_FILE} AC_SUBST(itclstub_LIB_FILE) -tkstub_LIB_SPEC=${TK_STUB_LIB_SPEC} +SC_LIB_SPEC(tkstub, ${TK_BIN_DIR}) AC_SUBST(tkstub_LIB_SPEC) -# END CYGNUS LOCAL + +SC_LIB_SPEC(itclstub, ../itcl) #-------------------------------------------------------------------- # __CHANGE__ @@ -219,8 +221,8 @@ SC_PRIVATE_TK_HEADERS # your system. #-------------------------------------------------------------------- -case "${host}" in - *cygwin* | *mingw32* | *windows32*) +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) AC_DEFINE_UNQUOTED(BUILD_${PACKAGE}) CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch" PLATFORM_SOURCES='$(WIN_SOURCES)' @@ -320,58 +322,28 @@ eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}" # Shared libraries and static libraries have different names. #-------------------------------------------------------------------- -# CYGNUS LOCAL - -if test "${SHARED_BUILD}" = "1" ; then - # FIXME: Need to devise a TCL_TOOL macro to deal with this! - case "${host}" in - *mingw32* | *windows32*) - SHLIB_LD_LIBS="${TCL_BUILD_STUB_LIB_SPEC} ${TCL_SHLIB_LD_LIBS} \ - ${ITCL_BUILD_STUB_LIB_SPEC} ${TK_BUILD_STUB_LIB_SPEC}" - # Need to link to the .a or .lib not the .dll! - TCL_TOOL_SHARED_LIB_LONGNAME(ITK_SHLIB_FILE, ${PACKAGE}, ${SHARED_LIB_SUFFIX}) - TCL_TOOL_STATIC_LIB_LONGNAME(ITK_LIB_FILE, ${PACKAGE}, ${UNSHARED_LIB_SUFFIX}) - ITK_TARGET_FILE=${ITK_SHLIB_FILE} - ;; +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*) + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS} \"`${CYGPATH} ../itcl/${itclstub_LIB_FILE}`\" ${tkstub_LIB_SPEC} " + eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}" + fi + eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" + ;; *) - SHLIB_LD_LIBS="${TK_BUILD_STUB_LIB_SPEC} ${TCL_BUILD_STUB_LIB_SPEC} \ - ${ITCL_BUILD_STUB_LIB_SPEC}" - TCL_TOOL_SHARED_LIB_LONGNAME(ITK_LIB_FILE, ${PACKAGE}, ${SHARED_LIB_SUFFIX}) - ITK_TARGET_FILE=${ITK_LIB_FILE} - ;; - esac -else - TCL_TOOL_STATIC_LIB_LONGNAME(ITK_LIB_FILE, ${PACKAGE}, ${UNSHARED_LIB_SUFFIX}) - ITK_TARGET_FILE=${ITK_LIB_FILE} -fi - -TCL_TOOL_STATIC_LIB_LONGNAME(ITK_STUB_LIB_FILE, ${PACKAGE}stub, ${UNSHARED_LIB_SUFFIX}) - -AC_SUBST(ITK_LIB_FILE) -AC_SUBST(ITK_STUB_LIB_FILE) - -TCL_TOOL_LIB_SHORTNAME(ITK_LIB_FLAG, ${PACKAGE}, ${VERSION}) -TCL_TOOL_LIB_SHORTNAME(ITK_STUB_LIB_FLAG, ${PACKAGE}stub, ${VERSION}) - -TCL_TOOL_LIB_SPEC(ITK_BUILD_LIB_SPEC, `pwd`, ${ITK_LIB_FLAG}) -TCL_TOOL_LIB_SPEC(ITK_BUILD_STUB_LIB_SPEC, `pwd`, ${ITK_STUB_LIB_FLAG}) -AC_SUBST(ITK_BUILD_LIB_SPEC) -AC_SUBST(ITK_BUILD_STUB_LIB_SPEC) - -TCL_TOOL_LIB_SPEC(ITK_LIB_SPEC, ${exec_prefix}/lib, ${ITK_LIB_FLAG}) -TCL_TOOL_LIB_SPEC(ITK_STUB_LIB_SPEC, ${exec_prefix}/lib, ${ITK_STUB_LIB_FLAG}) -AC_SUBST(ITK_LIB_SPEC) -AC_SUBST(ITK_STUB_LIB_SPEC) - -TCL_TOOL_LIB_PATH(ITK_LIB_FULL_PATH, `pwd`, ${ITK_LIB_FILE}) -TCL_TOOL_LIB_PATH(ITK_STUB_LIB_FULL_PATH, `pwd`, ${ITK_STUB_LIB_FILE}) -AC_SUBST(ITK_LIB_FULL_PATH) -AC_SUBST(ITK_STUB_LIB_FULL_PATH) - -itkstub_LIB_FILE=${ITK_STUB_LIB_FILE} -itk_LIB_FILE=${ITK_TARGET_FILE} - -# END CYGNUS LOCAL + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="${tkstub_LIB_SPEC} ${TCL_BUILD_STUB_LIB_SPEC} ../itcl/${itclstub_LIB_FILE}" + eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}" + fi + eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" + ;; +esac #-------------------------------------------------------------------- # __CHANGE__ @@ -392,47 +364,17 @@ AC_SUBST(SHLIB_LD_LIBS) # versions have bugs in the pkg_mkIndex routine. #-------------------------------------------------------------------- -# CYGNUS LOCAL -# A Tcl shell is not available when bootstrapping! -dnl SC_PROG_TCLSH -# END CYGNUS LOCAL +SC_PROG_TCLSH #-------------------------------------------------------------------- # A wish shell is needed to run the test suite. #-------------------------------------------------------------------- -# CYGNUS LOCAL -# A Wish shell is not available when bootstrapping! -dnl SC_PROG_WISH -# END CYGNUS LOCAL +SC_PROG_WISH #-------------------------------------------------------------------- # Finally, substitute all of the various values into the Makefile. #-------------------------------------------------------------------- -# CYGNUS LOCAL - -# Note: The itkConfig.sh file below is not included in the net release. -# We subst these variables to retain compatibility with the previous -# version of itkConfig.sh. - -ITCL_VERSION=${VERSION} -AC_SUBST(ITCL_VERSION) - -ITCL_MAJOR_VERSION=${MAJOR_VERSION} -AC_SUBST(ITCL_MAJOR_VERSION) - -ITCL_MINOR_VERSION=${MINOR_VERSION} -AC_SUBST(ITCL_MINOR_VERSION) - -ITCL_RELEASE_LEVEL=${PATCHLEVEL} -AC_SUBST(ITCL_RELEASE_LEVEL) - -ITK_SRC_DIR=${ITK_SRC_DIR_NATIVE} -AC_SUBST(ITK_SRC_DIR) - AC_OUTPUT([Makefile \ - itkConfig.sh \ - pkgIndex.tcl]) - -# END CYGNUS LOCAL + pkgIndex.tcl itkConfig.sh]) diff --git a/itcl/itk/demos/itkedit b/itcl/itk/demos/itkedit index b20aef7265c..12c07e06e38 100644 --- a/itcl/itk/demos/itkedit +++ b/itcl/itk/demos/itkedit @@ -1,13 +1,13 @@ #!/bin/sh #\ -exec itkwish $0 +exec wish8.4 "$0" # ====================================================================== # Simple text editor built with [incr Widgets] # ---------------------------------------------------------------------- # AUTHOR: Michael J. McLennan # CLASS: Object-Oriented Programming with [incr Tcl] # ====================================================================== -package require Iwidgets 2.1 +package require Iwidgets 4.0 option add *edit.width 5i startupFile option add *edit.height 4i startupFile @@ -20,24 +20,24 @@ set FileWindows 0 # ---------------------------------------------------------------------- # Dialog boxes # ---------------------------------------------------------------------- -messagedialog .notice -title "itkedit: Notice" \ +iwidgets::messagedialog .notice -title "itkedit: Notice" \ -bitmap info -buttonboxpos e -modality application .notice hide OK .notice hide Help .notice buttonconfigure Cancel -text "Dismiss" -messagedialog .confirm -title "itkedit: Confirm" \ +iwidgets::messagedialog .confirm -title "itkedit: Confirm" \ -bitmap questhead -modality application .confirm hide Help .confirm buttonconfigure OK -text "Yes" .confirm buttonconfigure Cancel -text "No" -fileselectiondialog .files -title "itkedit: Files" \ +iwidgets::fileselectiondialog .files -title "itkedit: Files" \ -childsitepos s -modality application .files hide Help set PaneMenu "[.files childsite].panes" -optionmenu $PaneMenu -labeltext "Edit Window:" +iwidgets::optionmenu $PaneMenu -labeltext "Edit Window:" pack $PaneMenu -pady 6 # ---------------------------------------------------------------------- @@ -168,7 +168,7 @@ proc split_view {} { set FileName($win) untitled.txt set FileChanged($win) 0 - scrolledtext $win.text -wrap none -labeltext "file: $FileName($win)" \ + iwidgets::scrolledtext $win.text -wrap none -labeltext "file: $FileName($win)" \ -hscrollmode none -vscrollmode dynamic -visibleitems 1x1 pack $win.text -expand yes -fill both @@ -213,7 +213,7 @@ menu .mbar.view.menu # ---------------------------------------------------------------------- # Editor # ---------------------------------------------------------------------- -panedwindow .edit -orient horizontal +iwidgets::panedwindow .edit -orient horizontal pack .edit -expand yes -fill both split_view @@ -225,3 +225,5 @@ after idle { update idletasks wm minsize . [winfo reqwidth .] [winfo reqheight .] } + + diff --git a/itcl/itk/generic/itk.decls b/itcl/itk/generic/itk.decls index c0f2f814fba..0d24be045d8 100644 --- a/itcl/itk/generic/itk.decls +++ b/itcl/itk/generic/itk.decls @@ -26,9 +26,9 @@ interface itk declare 0 generic { int Itk_Init (Tcl_Interp *interp) } -#declare 1 generic { -# int Itk_SafeInit (Tcl_Interp *interp) -#} +declare 1 generic { + int Itk_SafeInit (Tcl_Interp *interp) +} # diff --git a/itcl/itk/generic/itk.h b/itcl/itk/generic/itk.h index 6bfa73c92f1..c96f61930c0 100644 --- a/itcl/itk/generic/itk.h +++ b/itcl/itk/generic/itk.h @@ -55,7 +55,7 @@ * and procedure declarations, that occur below. */ -#ifndef RESOURCE_INCLUDED +#ifndef RC_INVOKED #include "itclInt.h" #include "tk.h" @@ -101,7 +101,7 @@ typedef struct ItkClassOption { #ifdef USE_ITK_STUBS -char * Itk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, +CONST char * Itk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exact)); #endif @@ -112,5 +112,5 @@ char * Itk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLIMPORT -#endif /* RESOURCE INCLUDED */ +#endif /* RC_INVOKED */ #endif /* ITK_H */ diff --git a/itcl/itk/generic/itkDecls.h b/itcl/itk/generic/itkDecls.h index 65c8522331c..625ad39dfcb 100644 --- a/itcl/itk/generic/itkDecls.h +++ b/itcl/itk/generic/itkDecls.h @@ -1,7 +1,7 @@ /* * itkDecls.h -- * - * Declarations of functions in the platform independent public Tcl API. + * Declarations of functions in the platform independent public Itk API. * * Copyright (c) 1998-1999 by XXXX * @@ -33,7 +33,8 @@ /* 0 */ EXTERN int Itk_Init _ANSI_ARGS_((Tcl_Interp * interp)); -/* Slot 1 is reserved */ +/* 1 */ +EXTERN int Itk_SafeInit _ANSI_ARGS_((Tcl_Interp * interp)); /* 2 */ EXTERN int Itk_ConfigBodyCmd _ANSI_ARGS_((ClientData cdata, Tcl_Interp * interp, int objc, @@ -91,7 +92,7 @@ typedef struct ItkStubs { struct ItkStubHooks *hooks; int (*itk_Init) _ANSI_ARGS_((Tcl_Interp * interp)); /* 0 */ - void *reserved1; + int (*itk_SafeInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 1 */ int (*itk_ConfigBodyCmd) _ANSI_ARGS_((ClientData cdata, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 2 */ int (*itk_UsualCmd) _ANSI_ARGS_((ClientData cdata, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 3 */ int (*itk_ClassOptionDefineCmd) _ANSI_ARGS_((ClientData cdata, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 4 */ @@ -128,7 +129,10 @@ extern ItkStubs *itkStubsPtr; #define Itk_Init \ (itkStubsPtr->itk_Init) /* 0 */ #endif -/* Slot 1 is reserved */ +#ifndef Itk_SafeInit +#define Itk_SafeInit \ + (itkStubsPtr->itk_SafeInit) /* 1 */ +#endif #ifndef Itk_ConfigBodyCmd #define Itk_ConfigBodyCmd \ (itkStubsPtr->itk_ConfigBodyCmd) /* 2 */ diff --git a/itcl/itk/generic/itkStubInit.c b/itcl/itk/generic/itkStubInit.c index a4a0a55009b..639d13a7fe8 100644 --- a/itcl/itk/generic/itkStubInit.c +++ b/itcl/itk/generic/itkStubInit.c @@ -29,7 +29,7 @@ ItkStubs itkStubs = { TCL_STUB_MAGIC, NULL, Itk_Init, /* 0 */ - NULL, /* 1 */ + Itk_SafeInit, /* 1 */ Itk_ConfigBodyCmd, /* 2 */ Itk_UsualCmd, /* 3 */ Itk_ClassOptionDefineCmd, /* 4 */ diff --git a/itcl/itk/generic/itkStubLib.c b/itcl/itk/generic/itkStubLib.c index 1732ef780b1..3d3e9814006 100644 --- a/itcl/itk/generic/itkStubLib.c +++ b/itcl/itk/generic/itkStubLib.c @@ -53,13 +53,13 @@ ItkStubs *itkStubsPtr; *---------------------------------------------------------------------- */ -char * +CONST char * Itk_InitStubs (interp, version, exact) Tcl_Interp *interp; char *version; int exact; { - char *actualVersion; + CONST char *actualVersion; actualVersion = Tcl_PkgRequireEx(interp, "Itk", version, exact, (ClientData *) &itkStubsPtr); diff --git a/itcl/itk/generic/itk_archetype.c b/itcl/itk/generic/itk_archetype.c index f8075863145..7356dba7989 100644 --- a/itcl/itk/generic/itk_archetype.c +++ b/itcl/itk/generic/itk_archetype.c @@ -790,13 +790,7 @@ Itk_ArchCompAddCmd(dummy, interp, objc, objv) uplevelFramePtr = _Tcl_GetCallFrame(interp, 1); oldFramePtr = _Tcl_ActivateCallFrame(interp, uplevelFramePtr); - /* CYGNUS LOCAL - Fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - if (Tcl_EvalObj(interp, objv[2], 0) != TCL_OK) { -#else if (Tcl_EvalObj(interp, objv[2]) != TCL_OK) { -#endif - /* END CYGNUS LOCAL */ goto compFail; } @@ -985,14 +979,8 @@ Itk_ArchCompAddCmd(dummy, interp, objc, objv) parserNs, /* isProcCallFrame */ 0); if (result == TCL_OK) { - /* CYGNUS LOCAL - Fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - result = Tcl_EvalObj(interp, objPtr, 0); -#else - result = Tcl_EvalObj(interp, objPtr); -#endif - /* END CYGNUS LOCAL */ - Tcl_PopCallFrame(interp); + result = Tcl_EvalObj(interp, objPtr); + Tcl_PopCallFrame(interp); } if (objPtr != objv[3]) { @@ -1580,13 +1568,7 @@ Itk_ArchOptUsualCmd(clientData, interp, objc, objv) entry = Tcl_FindHashEntry(&mergeInfo->usualCode, tag); if (entry) { codePtr = (Tcl_Obj*)Tcl_GetHashValue(entry); - /* CYGNUS LOCAL - Fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - return Tcl_EvalObj(interp, codePtr, 0); -#else return Tcl_EvalObj(interp, codePtr); -#endif - /* END CYGNUS LOCAL */ } Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), @@ -1827,6 +1809,11 @@ Itk_ArchInitCmd(dummy, interp, objc, objv) for (objc--,objv++; objc > 0; objc-=2, objv+=2) { token = Tcl_GetStringFromObj(objv[0], (int*)NULL); if (objc < 2) { + /* Bug 227814 + * Ensure that the interp result is unshared. + */ + + Tcl_ResetResult(interp); Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "value for \"", token, "\" missing", (char*)NULL); @@ -2889,6 +2876,11 @@ Itk_ArchConfigOption(interp, info, name, value) */ entry = Tcl_FindHashEntry(&info->options, name); if (!entry) { + /* Bug 227876 + * Ensure that the interp result is unshared. + */ + + Tcl_ResetResult (interp); Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "unknown option \"", name, "\"", (char*)NULL); @@ -3093,7 +3085,8 @@ Itk_CreateArchComponent(interp, info, name, cdefn, accessCmd) ItclClass *cdefn; /* component created in this class */ Tcl_Command accessCmd; /* access command for component */ { - char *wname, *init; + char *init; + CONST char *wname; ArchComponent *archComp; ArchOption *archOpt; Tk_Window tkwin; @@ -3105,14 +3098,14 @@ Itk_CreateArchComponent(interp, info, name, cdefn, accessCmd) * Save this component in the itk_component() array. */ wname = Tcl_GetCommandName(interp, accessCmd); - Tcl_SetVar2(interp, "itk_component", name, wname, 0); + Tcl_SetVar2(interp, "itk_component", name, (char *)wname, 0); /* * If the symbolic name for the component is "hull", then this * is the toplevel or frame that embodies a mega-widget. Update * the Archtype info to include the window token. */ - tkwin = Tk_NameToWindow(interp, wname, Tk_MainWindow(interp)); + tkwin = Tk_NameToWindow(interp, (char *)wname, Tk_MainWindow(interp)); if (strcmp(name, "hull") == 0) { if (tkwin == NULL) { @@ -4079,13 +4072,7 @@ Itk_CreateGenericOpt(interp, switchName, accessCmd) Tcl_AppendToObj(codePtr, " configure ", -1); Tcl_AppendToObj(codePtr, name, -1); - /* CYGNUS LOCAL - Fix for Tcl8.1 */ -#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 - if (Tcl_EvalObj(interp, codePtr, 0) != TCL_OK) { -#else - if (Tcl_EvalObj(interp, codePtr) != TCL_OK) { -#endif - /* END CYGNUS LOCAL */ + if (Tcl_EvalObj(interp, codePtr) != TCL_OK) { goto optionDone; } diff --git a/itcl/itk/generic/itk_cmds.c b/itcl/itk/generic/itk_cmds.c index 1e2fde7fcd7..878c3ee7fa6 100644 --- a/itcl/itk/generic/itk_cmds.c +++ b/itcl/itk/generic/itk_cmds.c @@ -25,11 +25,23 @@ */ #include "itk.h" +/* + * The following script is used to initialize Itcl in a safe interpreter. + */ + +static char safeInitScript[] = +"proc ::itcl::local {class name args} {\n\ + set ptr [uplevel [list $class $name] $args]\n\ + uplevel [list set itcl-local-$ptr $ptr]\n\ + set cmd [uplevel namespace which -command $ptr]\n\ + uplevel [list trace variable itcl-local-$ptr u \"::itcl::delete object $cmd; list\"]\n\ + return $ptr\n\ +}"; + /* * FORWARD DECLARATIONS */ static int Initialize _ANSI_ARGS_((Tcl_Interp *interp)); - /* * The following string is the startup script executed in new * interpreters. It looks on disk in several different directories @@ -79,9 +91,6 @@ namespace eval ::itk {\n\ }\n\ _find_init\n\ }"; - -extern ItkStubs itkStubs; - /* * ------------------------------------------------------------------------ @@ -102,6 +111,7 @@ Initialize(interp) { Tcl_Namespace *itkNs, *parserNs; ClientData parserInfo; + extern ItkStubs itkStubs; if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; @@ -109,7 +119,7 @@ Initialize(interp) if (Tk_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; }; - if (Itcl_InitStubs(interp, ITCL_VERSION, 0) == NULL) { + if (Itcl_InitStubs(interp, ITCL_VERSION, 1) == NULL) { return TCL_ERROR; } @@ -193,7 +203,10 @@ Initialize(interp) Tcl_SetVar(interp, "::itk::patchLevel", ITCL_PATCH_LEVEL, 0); /* - * Signal that the package has been loaded. + * Signal that the package has been loaded and provide the Itk Stubs table + * for dependent modules. I know this is unlikely, but possible that + * someone could be extending Itk. Who is to say that Itk is the + * end-of-the-line? */ if (Tcl_PkgProvideEx(interp, "Itk", ITCL_VERSION, (ClientData) &itkStubs) != TCL_OK) { @@ -230,6 +243,31 @@ Itk_Init(interp) /* * ------------------------------------------------------------------------ + * Itk_SafeInit() + * + * Invoked whenever a new SAFE INTERPRETER is created to install + * the [incr Tcl] package. + * + * Creates the "::itk" namespace and installs access commands for + * creating classes and querying info. + * + * Returns TCL_OK on success, or TCL_ERROR (along with an error + * message in the interpreter) if anything goes wrong. + * ------------------------------------------------------------------------ + */ +int +Itk_SafeInit(interp) + Tcl_Interp *interp; /* interpreter to be updated */ +{ + if (Initialize(interp) != TCL_OK) { + return TCL_ERROR; + } + return Tcl_Eval(interp, safeInitScript); +} + + +/* + * ------------------------------------------------------------------------ * Itk_ConfigBodyCmd() * * Replacement for the usual "itcl::configbody" command. Recognizes diff --git a/itcl/itk/itkConfig.sh.in b/itcl/itk/itkConfig.sh.in index c0b21a9fe05..e9b1f026fcb 100644 --- a/itcl/itk/itkConfig.sh.in +++ b/itcl/itk/itkConfig.sh.in @@ -27,23 +27,17 @@ ITK_BUILD_LIB_SPEC='@ITK_BUILD_LIB_SPEC@' # installed directory. ITK_LIB_SPEC='@ITK_LIB_SPEC@' -# Path to the library name. Used for dependencies. -ITK_LIB_FULL_PATH='@ITK_LIB_FULL_PATH@' - -# The name of the Itk stub library +# The name of the Itk stub library (a .a file): ITK_STUB_LIB_FILE=@ITK_STUB_LIB_FILE@ -# String to pass to linker to pick up the Itcl stub library from its +# String to pass to linker to pick up the Itk stub library from its # build directory. ITK_BUILD_STUB_LIB_SPEC='@ITK_BUILD_STUB_LIB_SPEC@' -# String to pass to linker to pick up the Itcl stub library from its +# String to pass to linker to pick up the Itk stub library from its # installed directory. ITK_STUB_LIB_SPEC='@ITK_STUB_LIB_SPEC@' -# Full path to itcl library for dependency checking. -ITK_STUB_LIB_FULL_PATH='@ITK_STUB_LIB_FULL_PATH@' - # Location of the top-level source directories from which [incr Tk] # was built. This is the directory that contains a README file as well # as subdirectories such as generic, unix, etc. If [incr Tk] was diff --git a/itcl/itk/win/dllEntryPoint.c b/itcl/itk/win/dllEntryPoint.c index 8b8c55e9d19..bc872d318c9 100644 --- a/itcl/itk/win/dllEntryPoint.c +++ b/itcl/itk/win/dllEntryPoint.c @@ -6,45 +6,33 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> -/* CYGNUS LOCAL */ -#include <tcl.h> - -/* - * The following declaration is for the VC++ DLL entry point. - */ - -BOOL APIENTRY DllMain _ANSI_ARGS_((HINSTANCE hInst, - DWORD reason, LPVOID reserved)); -/* END CYGNUS LOCAL */ - -/* #if defined(_MSC_VER) + /* Only do this when MSVC++ is compiling us. */ # define DllEntryPoint DllMain +# if defined(USE_TCL_STUBS) && (!defined(_MT) || !defined(_DLL) || defined(_DEBUG)) + /* + * This fixes a bug with how the Stubs library was compiled. + * The requirement for msvcrt.lib from tclstubXX.lib should + * be removed. + */ +# pragma comment(linker, "-nodefaultlib:msvcrt.lib") +# endif #endif -*/ - -#ifdef __CYGWIN32__ - -/* cygwin32 requires an impure pointer variable, which must be - explicitly initialized when the DLL starts up. */ -struct _reent *_impure_ptr; -extern struct _reent *_imp__reent_data; -#endif /* __CYGWIN32__ */ /* *---------------------------------------------------------------------- * * DllEntryPoint -- * - * This wrapper function is used by Borland to invoke the - * initialization code for Tk. It simply calls the DllMain - * routine. + * This wrapper function is used by Windows to invoke the + * initialization code for the DLL. If we are compiling + * with Visual C++, this routine will be renamed to DllMain. * * Results: - * See DllMain. + * Returns TRUE; * * Side effects: - * See DllMain. + * None. * *---------------------------------------------------------------------- */ @@ -55,39 +43,5 @@ DllEntryPoint(hInst, reason, reserved) DWORD reason; /* Reason this function is being called. */ LPVOID reserved; /* Not used. */ { - return DllMain(hInst, reason, reserved); -} - -/* - *---------------------------------------------------------------------- - * - * DllMain -- - * - * DLL entry point. - * - * Results: - * TRUE on sucess, FALSE on failure. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -BOOL APIENTRY -DllMain(hInstance, reason, reserved) - HINSTANCE hInstance; - DWORD reason; - LPVOID reserved; -{ -/* CYGNUS LOCAL */ -#ifdef __CYGWIN32__ - /* CYGNUS LOCAL */ - /* cygwin32 requires the impure data pointer to be initialized - when the DLL starts up. */ - _impure_ptr = _imp__reent_data; - /* END CYGNUS LOCAL */ -#endif - - return(TRUE); + return TRUE; } diff --git a/itcl/itk/win/makefile.bc b/itcl/itk/win/makefile.bc index 0d56d4d4ade..f0217796b29 100644 --- a/itcl/itk/win/makefile.bc +++ b/itcl/itk/win/makefile.bc @@ -1,227 +1,228 @@ -# Borland C++ 4.52 makefile -# -# Copyright (c) 1993-1996 Lucent Technologies -# based on original from -# Copyright (c) 1995-1996 by Sun Microsystems, Inc. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. - -!include "..\..\Makefile.bc" - -# -# Project directories -# -# ROOT = top of source tree -# TMPDIR = location where .obj files should be stored during build - -ROOT = .. -TMPDIR = . -TARGET_LIB_ITK = $(TARGET_LIB)\Itk2.2 -TARGET_DOC_ITK = $(TARGET_DOC)\Itk - -# uncomment the following line to compile with symbols -#DEBUG=1 - -# uncomment the following two lines to compile with TCL_MEM_DEBUG -#DEBUGDEFINES =TCL_MEM_DEBUG - - -INCLUDES =$(BORLAND)\include;$(ROOT)\generic;$(ROOT);$(TCLDIR)\generic;$(ITCLDIR)\generic;$(TKDIR)\generic;$(TKDIR)\xlib;$(TKDIR)\bitmaps -LIBDIRS =$(BORLAND)\lib;$(ROOT)\win - -!ifndef DEBUG - -# these macros cause maximum optimization and no symbols -DEBUGLDFLAGS = -DEBUGCCFLAGS = -v- -vi- -O2 - -!else - -# these macros enable debugging -DEBUGLDFLAGS = -v -DEBUGCCFLAGS = -k -Od -v - -!endif - -DEFINES = _RTLDLL;USE_TCLALLOC=0;STRICT;$(DEBUGDEFINES);ITCL_NAMESPACES=1 -PROJECTCCFLAGS= $(DEBUGCCFLAGS) -w-par -w-stu - -LNFLAGS_exe = -Tpe -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0w32 -LNFLAGS_dll = -Tpd -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0d32 - -LNLIBS_exe = $(ITKLIB) $(ITCLLIBDIR)\$(ITCLLIB) $(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) import32 cw32i -LNLIBS_dll = $(ITCLLIBDIR)\$(ITCLLIB) $(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) import32 cw32i - -# -# Global makefile settings -# - -.AUTODEPEND -.CACHEAUTODEPEND - -.suffixes: .c .dll .lib .obj .exe - -.path.c=$(ROOT)\win;$(ROOT)\generic; -.path.obj=$(TMPDIR) - -ITKWISHOBJS = \ - $(TMPDIR)\winMain.obj - -ITKOBJS = \ - $(TMPDIR)\itk_archetype.obj \ - $(TMPDIR)\itk_cmds.obj \ - $(TMPDIR)\itk_option.obj \ - $(TMPDIR)\itk_util.obj \ - $(TMPDIR)\dllEntryPoint.obj - -ITKWISH = itkwish.exe - - -# -# Targets -# - -all: cfgdll $(ITKDLL) cfgexe $(ITKWISH) cfgcln -test: $(ITKWISH) - $(CP) $(TCLLIBDIR)\*.dll - $(CP) $(TKLIBDIR)\*.dll - $(CP) $(ITCLLIBDIR)\*.dll -#set ITK_ - $(ITKWISH) <<| - cd ..\tests - source all - exit -| - -install: all - $(MKDIR) "$(TARGET_ROOT)" - $(MKDIR) "$(TARGET_BIN)" - $(MKDIR) "$(TARGET_LIB_ROOT)" - $(MKDIR) "$(TARGET_LIB)" - $(MKDIR) "$(TARGET_LIB_ITK)" - $(MKDIR) "$(TARGET_INCLUDE_ROOT)" - $(MKDIR) "$(TARGET_INCLUDE)" - $(MKDIR) "$(TARGET_DOC)" - $(MKDIR) "$(TARGET_DOC_ITK)" - $(CP) $(TMPDIR)\$(ITKWISH) "$(TARGET_BIN)" - $(CP) $(TMPDIR)\$(ITKDLL) "$(TARGET_BIN)" - $(CP) $(ROOT)\generic\itk.h "$(TARGET_INCLUDE)" - $(CP) $(ROOT)\library\*.* "$(TARGET_LIB_ITK)" - $(CP) $(ROOT)\win\*.tcl "$(TARGET_LIB_ITK)" - $(CP) $(ROOT)\..\html\Itk\*.* "$(TARGET_DOC_ITK)" - -# Implicit Targets - -.c.obj: - @$(BCC32) {$< } - -.dll.lib: - $(IMPLIB) -c $@ $< - -.rc.res: - $(RC) -i$(ROOT)\generic;$(ITCLDIR)\generic;$(TCLDIR)\generic;$(TKDIR)\generic $< - -# -# Special case object file targets -# - -# -# Configuration file targets - these files are implicitly used by the compiler -# - -cfgdll: - @$(CP) &&| - -n$(TMPDIR) -I$(INCLUDES) -c -WD - -D$(DEFINES) -3 -d $(PROJECTCCFLAGS) -| bcc32.cfg >NUL - -cfgexe: - @$(CP) &&| - -n$(TMPDIR) -I$(INCLUDES) -c -W - -D$(DEFINES) -3 -d $(PROJECTCCFLAGS) -| bcc32.cfg >NUL - -cfgtest: - @$(CP) &&| - -n$(TMPDIR) -I$(INCLUDES) -c -W - -D$(DEFINES);TCL_TEST -3 -d $(PROJECTCCFLAGS) -| bcc32.cfg >NUL - -cfgcln: - @$(RM) bcc32.cfg - -# -# Executable targets -# - -$(ITKDLL): $(ITKOBJS) itk.def rc\itk.res - $(TLINK32) @&&| -$(LNFLAGS_dll) $(ITKOBJS) -$@ --x -$(LNLIBS_dll) -itk.def -rc\itk.res -| - -$(ITKWISH): $(ITKWISHOBJS) $(ITKLIB) rc\itkwish.res - $(TLINK32) @&&| -$(LNFLAGS_exe) $(ITKWISHOBJS) -$@ --x -$(LNLIBS_exe) -|, &&| -EXETYPE WINDOWS -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -|, rc\itkwish.res - -# -# Other dependencies -# - - -# The following rule automatically generates a tk.def file containing -# an export entry for every public symbol in the $(TKDLL) library. - -itk.def: $(ITKOBJS) - $(TCLLIBDIR)\dumpexts.exe -o $@ $(ITKDLL) @&&| - $(ITKOBJS) -| - -# Dependencies for .rc files: -rc\itk.res: rc\*.cur rc\itk.ico -rc\itkwish.res: rc\*.cur rc\itk.ico - -# debugging rules, the .dll and .exe files must be in the same -# directory as the object files for debugging purposes - -$(TMPDIR)\$(ITKDLL): $(ITKDLL) - $(CP) $(ITKDLL) $(TMPDIR) - -$(TMPDIR)\$(ITCLDLL): $(ITCLLIBDIR)\$(ITCLDLL) - $(CP) $(ITCLLIBDIR)\$(ITCLDLL) $(TMPDIR) - -$(TMPDIR)\$(TKDLL): $(TKLIBDIR)\$(TKDLL) - $(CP) $(TKLIBDIR)\$(TKDLL) $(TMPDIR) - -$(TMPDIR)\$(TCLDLL): $(TCLLIBDIR)\$(TCLDLL) - $(CP) $(TCLLIBDIR)\$(TCLDLL) $(TMPDIR) - -$(TMPDIR)\$(ITKWISH): $(ITKWISH) - $(CP) $(ITKWISH) $(TMPDIR) - -debug: $(TMPDIR)\$(ITKDLL) $(TMPDIR)\$(ITCLDLL) $(TMPDIR)\$(TKDLL) $(TMPDIR)\$(TCLDLL) - - -# remove all generated files - -clean: - -@$(RM) $(ITKWISH) - -@$(RM) $(ITKLIB) - -@$(RM) $(ITKDLL) - -@$(RM) itk.def - -@$(RM) $(TMPDIR)\Rc\*.res - -@$(RM) $(TMPDIR)\*.obj - -@$(RM) *.cfg +# Borland C++ 4.52 makefile
+#
+# Copyright (c) 1993-1996 Lucent Technologies
+# based on original from
+# Copyright (c) 1995-1996 by Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+!include "..\..\Makefile.bc"
+
+#
+# Project directories
+#
+# ROOT = top of source tree
+# TMPDIR = location where .obj files should be stored during build
+
+ROOT = ..
+TMPDIR = .
+TARGET_LIB_ITK = $(TARGET_LIB)\Itk2.2
+TARGET_DOC_ITK = $(TARGET_DOC)\Itk
+
+# uncomment the following line to compile with symbols
+#DEBUG=1
+
+# uncomment the following two lines to compile with TCL_MEM_DEBUG
+#DEBUGDEFINES =TCL_MEM_DEBUG
+
+
+INCLUDES =$(BORLAND)\include;$(ROOT)\generic;$(ROOT);$(TCLDIR)\generic;$(ITCLDIR)\generic;$(TKDIR)\generic;$(TKDIR)\xlib;$(TKDIR)\bitmaps
+LIBDIRS =$(BORLAND)\lib;$(ROOT)\win
+
+!ifndef DEBUG
+
+# these macros cause maximum optimization and no symbols
+DEBUGLDFLAGS =
+DEBUGCCFLAGS = -v- -vi- -O2
+
+!else
+
+# these macros enable debugging
+DEBUGLDFLAGS = -v
+DEBUGCCFLAGS = -k -Od -v
+
+!endif
+
+DEFINES = _RTLDLL;USE_TCLALLOC=0;STRICT;$(DEBUGDEFINES);ITCL_NAMESPACES=1
+PROJECTCCFLAGS= $(DEBUGCCFLAGS) -w-par -w-stu
+
+LNFLAGS_exe = -Tpe -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0w32
+LNFLAGS_dll = -Tpd -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0d32
+
+LNLIBS_exe = $(ITKLIB) $(ITCLLIBDIR)\$(ITCLLIB) $(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) import32 cw32i
+LNLIBS_dll = $(ITCLLIBDIR)\$(ITCLLIB) $(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) import32 cw32i
+
+#
+# Global makefile settings
+#
+
+.AUTODEPEND
+.CACHEAUTODEPEND
+
+.suffixes: .c .dll .lib .obj .exe
+
+.path.c=$(ROOT)\win;$(ROOT)\generic;
+.path.obj=$(TMPDIR)
+
+ITKWISHOBJS = \
+ $(TMPDIR)\winMain.obj
+
+ITKOBJS = \
+ $(TMPDIR)\itk_archetype.obj \
+ $(TMPDIR)\itk_cmds.obj \
+ $(TMPDIR)\itk_option.obj \
+ $(TMPDIR)\itk_util.obj \
+ $(TMPDIR)\dllEntryPoint.obj
+
+ITKWISH = itkwish.exe
+
+
+#
+# Targets
+#
+
+all: cfgdll $(ITKDLL) cfgexe $(ITKWISH) cfgcln
+test: $(ITKWISH)
+ $(CP) $(TCLLIBDIR)\*.dll
+ $(CP) $(TKLIBDIR)\*.dll
+ $(CP) $(ITCLLIBDIR)\*.dll
+#set ITK_
+ $(ITKWISH) <<|
+ cd ..\tests
+ source all
+ exit
+|
+
+install: all
+ $(MKDIR) "$(TARGET_ROOT)"
+ $(MKDIR) "$(TARGET_BIN)"
+ $(MKDIR) "$(TARGET_LIB_ROOT)"
+ $(MKDIR) "$(TARGET_LIB)"
+ $(MKDIR) "$(TARGET_LIB_ITK)"
+ $(MKDIR) "$(TARGET_INCLUDE_ROOT)"
+ $(MKDIR) "$(TARGET_INCLUDE)"
+ $(MKDIR) "$(TARGET_DOC)"
+ $(MKDIR) "$(TARGET_DOC_ITK)"
+ $(CP) $(TMPDIR)\$(ITKWISH) "$(TARGET_BIN)"
+ $(CP) $(TMPDIR)\$(ITKDLL) "$(TARGET_BIN)"
+ $(CP) $(ROOT)\generic\itk.h "$(TARGET_INCLUDE)"
+ $(CP) $(ROOT)\library\*.* "$(TARGET_LIB_ITK)"
+ $(CP) $(ROOT)\win\*.tcl "$(TARGET_LIB_ITK)"
+ $(CP) $(ROOT)\..\html\Itk\*.* "$(TARGET_DOC_ITK)"
+
+# Implicit Targets
+
+.c.obj:
+ @$(BCC32) {$< }
+
+.dll.lib:
+ $(IMPLIB) -c $@ $<
+
+.rc.res:
+ $(RC) -i$(ROOT)\generic;$(ITCLDIR)\generic;$(TCLDIR)\generic;$(TKDIR)\generic $<
+
+#
+# Special case object file targets
+#
+
+#
+# Configuration file targets - these files are implicitly used by the compiler
+#
+
+cfgdll:
+ @$(CP) &&|
+ -n$(TMPDIR) -I$(INCLUDES) -c -WD
+ -D$(DEFINES) -3 -d $(PROJECTCCFLAGS)
+| bcc32.cfg >NUL
+
+cfgexe:
+ @$(CP) &&|
+ -n$(TMPDIR) -I$(INCLUDES) -c -W
+ -D$(DEFINES) -3 -d $(PROJECTCCFLAGS)
+| bcc32.cfg >NUL
+
+cfgtest:
+ @$(CP) &&|
+ -n$(TMPDIR) -I$(INCLUDES) -c -W
+ -D$(DEFINES);TCL_TEST -3 -d $(PROJECTCCFLAGS)
+| bcc32.cfg >NUL
+
+cfgcln:
+ @$(RM) bcc32.cfg
+
+#
+# Executable targets
+#
+
+$(ITKDLL): $(ITKOBJS) itk.def rc\itk.res
+ $(TLINK32) @&&|
+$(LNFLAGS_dll) $(ITKOBJS)
+$@
+-x
+$(LNLIBS_dll)
+itk.def
+rc\itk.res
+|
+
+$(ITKWISH): $(ITKWISHOBJS) $(ITKLIB) rc\itkwish.res
+ $(TLINK32) @&&|
+$(LNFLAGS_exe) $(ITKWISHOBJS)
+$@
+-x
+$(LNLIBS_exe)
+|, &&|
+EXETYPE WINDOWS
+CODE PRELOAD MOVEABLE DISCARDABLE
+DATA PRELOAD MOVEABLE MULTIPLE
+|, rc\itkwish.res
+
+#
+# Other dependencies
+#
+
+
+# The following rule automatically generates a tk.def file containing
+# an export entry for every public symbol in the $(TKDLL) library.
+
+itk.def: $(ITKOBJS)
+ $(TCLLIBDIR)\dumpexts.exe -o $@ $(ITKDLL) @&&|
+ $(ITKOBJS)
+|
+
+# Dependencies for .rc files:
+rc\itk.res: rc\*.cur rc\itk.ico
+rc\itkwish.res: rc\*.cur rc\itk.ico
+
+# debugging rules, the .dll and .exe files must be in the same
+# directory as the object files for debugging purposes
+
+$(TMPDIR)\$(ITKDLL): $(ITKDLL)
+ $(CP) $(ITKDLL) $(TMPDIR)
+
+$(TMPDIR)\$(ITCLDLL): $(ITCLLIBDIR)\$(ITCLDLL)
+ $(CP) $(ITCLLIBDIR)\$(ITCLDLL) $(TMPDIR)
+
+$(TMPDIR)\$(TKDLL): $(TKLIBDIR)\$(TKDLL)
+ $(CP) $(TKLIBDIR)\$(TKDLL) $(TMPDIR)
+
+$(TMPDIR)\$(TCLDLL): $(TCLLIBDIR)\$(TCLDLL)
+ $(CP) $(TCLLIBDIR)\$(TCLDLL) $(TMPDIR)
+
+$(TMPDIR)\$(ITKWISH): $(ITKWISH)
+ $(CP) $(ITKWISH) $(TMPDIR)
+
+debug: $(TMPDIR)\$(ITKDLL) $(TMPDIR)\$(ITCLDLL) $(TMPDIR)\$(TKDLL) $(TMPDIR)\$(TCLDLL)
+
+
+# remove all generated files
+
+clean:
+ -@$(RM) $(ITKWISH)
+ -@$(RM) $(ITKLIB)
+ -@$(RM) $(ITKDLL)
+ -@$(RM) itk.def
+ -@$(RM) $(TMPDIR)\Rc\*.res
+ -@$(RM) $(TMPDIR)\*.obj
+ -@$(RM) *.cfg
+
diff --git a/itcl/itk/win/makefile.vc b/itcl/itk/win/makefile.vc index 5d26cf408a3..680531bd79d 100644 --- a/itcl/itk/win/makefile.vc +++ b/itcl/itk/win/makefile.vc @@ -1,305 +1,293 @@ -# Visual C++ 2.x and 4.0 makefile -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# Copyright (c) 1995-1996 Sun Microsystems, Inc. -# SCCS: @(#) makefile.vc 1.8 98/07/29 13:14:52 - -# Does not depend on the presence of any environment variables in -# order to compile tcl; all needed information is derived from -# location of the compiler directories. -# -# NOTE: Be sure to modify the "makefile.vc" file in the toplevel directory -# for the itcl distribution. Include the location of your VC++ development -# tools and the installation directory. - -!include "..\..\makefile.vc" - - -# ROOT = top of source tree -# -# TMPDIR = location where .obj files should be stored during build - -ROOT = .. -ITCLDIR = ..\..\itcl - -###################################################################### -# Do not modify below this line -###################################################################### - -ITKNAMEPREFIX = itk -WISHNAMEPREFIX = itkwish -VERSION = 31 -DOTVERSION = 3.1 -STUBPREFIX = $(ITKNAMEPREFIX)stub - -BINROOT = . -!IF "$(NODEBUG)" == "1" -TMPDIR = $(BINROOT)\Release -DBGX = -!ELSE -TMPDIR = $(BINROOT)\Debug -DBGX = d -!ENDIF -OUTDIR = $(TMPDIR) - -ITKDLLNAME = $(ITKNAMEPREFIX)$(VERSION)$(DBGX).dll -ITKDLL = $(OUTDIR)\$(ITKDLLNAME) -ITKLIB = $(OUTDIR)\$(ITKNAMEPREFIX)$(VERSION)$(DBGX).lib - -ITKWISH = $(OUTDIR)\$(WISHNAMEPREFIX)$(VERSION)$(DBGX).exe -DUMPEXTS = $(TMPDIR)\dumpexts.exe - -ITKSTUBLIBNAME = $(STUBPREFIX)$(VERSION)$(DBGX).lib -ITKSTUBLIB = $(OUTDIR)\$(ITKSTUBLIBNAME) - - -LIB_INSTALL_DIR = $(INSTALLDIR)\lib -BIN_INSTALL_DIR = $(INSTALLDIR)\bin -SCRIPT_INSTALL_DIR = $(INSTALLDIR)\lib\itk$(DOTVERSION) -INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include - -ITKWISHOBJS = \ - $(TMPDIR)\winMain.obj - -ITKOBJS = \ - $(TMPDIR)\itkStubInit.obj \ - $(TMPDIR)\itk_archetype.obj \ - $(TMPDIR)\itk_cmds.obj \ - $(TMPDIR)\itk_option.obj \ - $(TMPDIR)\itk_util.obj \ - $(TMPDIR)\dllEntryPoint.obj - -ITKSTUBOBJS = \ - $(TMPDIR)\itkStubLib.obj - -cc32 = $(TOOLS32)\bin\cl.exe -link32 = $(TOOLS32)\bin\link.exe -rc32 = $(TOOLS32_rc)\bin\rc.exe -include32 = -I$(TOOLS32)\include -lib32 = "$(TOOLS32)\bin\lib.exe" - -WINDIR = $(ROOT)\win -GENERICDIR = $(ROOT)\generic -RCDIR = $(WINDIR)\rc - -TCLBUILDDIR = $(TCLDIR)\win\$(OUTDIR) -TCLLIB = $(TCLBUILDDIR)\tcl81$(DBGX).lib -TCLSTUBLIB = $(TCLBUILDDIR)\tclstub81$(DBGX).lib -TCLDLL = $(TCLBUILDDIR)\tcl81$(DBGX).dll -TKBUILDDIR = $(TKDIR)\win\$(OUTDIR) -TKLIB = $(TKBUILDDIR)\tk81$(DBGX).lib -TKSTUBLIB = $(TKBUILDDIR)\tkstub81$(DBGX).lib -TKDLL = $(TKBUILDDIR)\tk81$(DBGX).dll -ITCLBUILDDIR = $(ITCLDIR)\win\$(OUTDIR) -ITCLLIB = $(ITCLBUILDDIR)\itcl$(VERSION)$(DBGX).lib -ITCLDLL = $(ITCLBUILDDIR)\itcl$(VERSION)$(DBGX).dll - -ITCLSTUBLIBNAME = itclstub$(VERSION)$(DBGX).lib -ITCLSTUBLIB = $(ITCLBUILDDIR)\$(ITCLSTUBLIBNAME) - -ITK_INCLUDES = -I$(WINDIR) -I$(GENERICDIR) \ - -I$(TCLDIR)\generic -I$(TKDIR)\generic \ - -I$(TCLDIR)\win -I$(TKDIR)\win \ - -I$(TKDIR)\xlib -I$(ITCLDIR)\generic - -ITK_EXE_DEFINES = -DBUILD_itk $(DEBUGDEFINES) - -ITK_EXE_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \ - $(ITK_INCLUDES) $(ITK_EXE_DEFINES) - -ITK_CFLAGS = $(ITK_EXE_CFLAGS) -DUSE_TK_STUBS -DUSE_TCL_STUBS \ - -DUSE_ITCL_STUBS - -###################################################################### -# Link flags -###################################################################### - -!IF "$(NODEBUG)" == "1" -ldebug = /RELEASE -!ELSE -ldebug = -debug:full -debugtype:cv -!ENDIF - -# declarations common to all linker options -lcommon = /NODEFAULTLIB /RELEASE /NOLOGO - -# declarations for use on Intel i386, i486, and Pentium systems -!IF "$(MACHINE)" == "IX86" -DLLENTRY = @12 -lflags = $(lcommon) /MACHINE:$(MACHINE) -!ELSE -lflags = $(lcommon) /MACHINE:$(MACHINE) -!ENDIF - -conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup -guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup -dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll - -!IF "$(MACHINE)" == "PPC" -libc = libc.lib -libcdll = crtdll.lib -!ELSE -libc = libc.lib oldnames.lib -libcdll = msvcrt.lib oldnames.lib -!ENDIF - -baselibs = kernel32.lib $(optlibs) advapi32.lib -winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib -guilibs = $(libc) $(winlibs) - -guilibsdll = $(libcdll) $(winlibs) - -###################################################################### -# Compile flags -###################################################################### - -!IF "$(NODEBUG)" == "1" -!IF "$(MACHINE)" == "ALPHA" -# MSVC on Alpha doesn't understand -Ot -cdebug = -O2i -Gs -GD -DNDEBUG -!ELSE -cdebug = -Oti -Gs -GD -DNDEBUG -!ENDIF -!ELSE -cdebug = -Z7 -Od -WX -DDEBUG -!ENDIF - -# declarations common to all compiler options -ccommon = -c -W3 -nologo -Fp$(TMPDIR)\ -YX - -!IF "$(MACHINE)" == "IX86" -cflags = $(ccommon) -D_X86_=1 -!ELSE -!IF "$(MACHINE)" == "MIPS" -cflags = $(ccommon) -D_MIPS_=1 -!ELSE -!IF "$(MACHINE)" == "PPC" -cflags = $(ccommon) -D_PPC_=1 -!ELSE -!IF "$(MACHINE)" == "ALPHA" -cflags = $(ccommon) -D_ALPHA_=1 -!ENDIF -!ENDIF -!ENDIF -!ENDIF - -cvars = -DWIN32 -D_WIN32 -cvarsmt = $(cvars) -D_MT -cvarsdll = $(cvarsmt) -D_DLL - -!IF "$(NODEBUG)" == "1" -cvarsdll = $(cvars) -MD -!ELSE -cvarsdll = $(cvars) -MDd -!ENDIF - -CON_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE - -###################################################################### -# Project specific targets -###################################################################### - -all: setup $(ITKWISH) $(ITKDLL) $(ITKSTUBLIB) -test: setup $(ITKDLL) $(ITKSTUBLIB) $(ITKWISH) - -@copy $(TCLDLL) $(TMPDIR) - -@copy $(TKDLL) $(TMPDIR) - -@copy $(ITCLDLL) $(TMPDIR) -# $(ITKWISH) - -setup: - if not exist $(TMPDIR) mkdir $(TMPDIR) - if not exist $(OUTDIR) mkdir $(OUTDIR) - -$(ITKLIB) : $(ITKDLL) $(ITKSTUBLIB) -$(ITKDLL) : $(ITKOBJS) $(TMPDIR)\itk.res $(TMPDIR)\itkvc.def - set LIB=$(TOOLS32)\lib - $(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\itkvc.def \ - -out:$@ $(TMPDIR)\itk.res $(TCLSTUBLIB) \ - $(TKSTUBLIB) $(guilibsdll) @<< - $(ITKOBJS) -<< - - -$(ITKSTUBLIB): $(ITKSTUBOBJS) - $(lib32) -nologo -out:$@ $(ITKSTUBOBJS) - -$(ITKWISH): $(ITKWISHOBJS) $(ITKLIB) $(TMPDIR)\itkwish.res - set LIB=$(TOOLS32)\lib - $(link32) $(ldebug) $(guilflags) $(TMPDIR)\itkwish.res -out:$@ \ - $(guilibsdll) $(TCLLIB) $(TKLIB) $(ITCLLIB) $(ITKLIB) \ - $(ITKWISHOBJS) - -$(TMPDIR)\itkvc.def: $(DUMPEXTS) $(ITKOBJS) - $(DUMPEXTS) -o $@ $(ITKDLLNAME) @<< - $(ITKOBJS) -<< - -$(DUMPEXTS): $(TCLDIR)\win\winDumpExts.c - $(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $? - set LIB=$(TOOLS32)\lib - $(link32) $(ldebug) $(conlflags) $(guilibs) -out:$@ \ - $(TMPDIR)\winDumpExts.obj - -install: all - if not exist $(INSTALLDIR) mkdir $(INSTALLDIR) - if not exist $(BIN_INSTALL_DIR) mkdir $(BIN_INSTALL_DIR) - if not exist $(LIB_INSTALL_DIR) mkdir $(LIB_INSTALL_DIR) - if not exist $(SCRIPT_INSTALL_DIR) mkdir $(SCRIPT_INSTALL_DIR) - if not exist $(INCLUDE_INSTALL_DIR) mkdir $(INCLUDE_INSTALL_DIR) - copy $(ITKWISH) "$(BIN_INSTALL_DIR)" - copy $(ITKDLL) "$(BIN_INSTALL_DIR)" - copy $(ROOT)\generic\itk.h "$(INCLUDE_INSTALL_DIR)" - copy $(ROOT)\library\*.* "$(SCRIPT_INSTALL_DIR)" - copy $(ROOT)\win\*.tcl "$(SCRIPT_INSTALL_DIR)" - -# -# Regenerate the stubs files. -# -genstubs: - $(TCLSH) $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \ - $(GENERICDIR)\itk.decls - -# -# Special case object file targets -# - -$(TMPDIR)\winMain.obj: $(ROOT)\win\winMain.c - $(cc32) $(ITK_EXE_CFLAGS) -Fo$@ $? - -# The following object is part of the stub library and should not -# be built as DLL objects but none of the symbols should be exported - -$(TMPDIR)\itkStubLib.obj : $(GENERICDIR)\itkStubLib.c - $(cc32) -DSTATIC_BUILD $(ITK_CFLAGS) -Fo$@ $? - -# -# Implicit rules -# - -{$(GENERICDIR)}.c{$(TMPDIR)}.obj: - $(cc32) -DDLL_BUILD $(ITK_CFLAGS) -Fo$(TMPDIR)\ $< - -{$(WINDIR)}.c{$(TMPDIR)}.obj: - $(cc32) -DDLL_BUILD $(ITK_CFLAGS) -Fo$(TMPDIR)\ $< - -{$(ROOT)\unix}.c{$(TMPDIR)}.obj: - $(cc32) -DDLL_BUILD $(ITK_CFLAGS) -Fo$(TMPDIR)\ $< - -{$(RCDIR)}.rc{$(TMPDIR)}.res: - $(rc32) -fo $@ -r -i $(GENERICDIR) -i $(TCLDIR)\generic -i $(ITCLDIR)\generic $< - -clean: - -@del $(OUTDIR)\*.exp - -@del $(OUTDIR)\*.lib - -@del $(OUTDIR)\*.dll - -@del $(OUTDIR)\*.exe - -@del $(OUTDIR)\*.pdb - -@del $(TMPDIR)\*.pch - -@del $(TMPDIR)\*.obj - -@del $(TMPDIR)\*.res - -@del $(TMPDIR)\*.def - -@del $(TMPDIR)\*.exe - -@rmdir $(OUTDIR) - -@rmdir $(TMPDIR) +######################################################################
+# Visual C++ 5.0+ makefile for [Incr Tcl]
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# Copyright (c) 1993-1998 Lucent Technologies, Inc.
+# RCS: $Id$
+######################################################################
+# All needed information is derived from running vcvars32.bat
+#
+# NOTE: Be sure to modify the "config.vc" file in the toplevel directory
+# before running this makefile.
+######################################################################
+# Do not modify this file! modify config.vc to effect the build.
+######################################################################
+
+!include "..\..\rules.vc"
+!include "..\..\config.vc"
+!include "..\..\pkg.vc"
+
+BINROOT = .
+ROOT = ..
+ITCLDIR = ..\..\itcl
+ITKNAMEPREFIX = itk
+STUBPREFIX = $(ITKNAMEPREFIX)stub
+
+!if $(DEBUG)
+TMPNAME = Debug
+DBGX = d
+!else
+TMPNAME = Release
+DBGX =
+!endif
+
+TMP_DIR = $(BINROOT)\$(TMPNAME)
+
+!ifndef OUT_DIR
+OUT_DIR = $(TMP_DIR)
+!endif
+
+!if $(STATIC_BUILD)
+ITKOUTNAME = $(ITKNAMEPREFIX)$(ITK_VERSION)s$(DBGX)
+ITKTARGET = "$(OUT_DIR)\$(ITKOUTNAME).lib"
+!else
+ITKOUTNAME = $(ITKNAMEPREFIX)$(ITK_VERSION)$(DBGX)
+ITKIMPLIB = "$(OUT_DIR)\$(ITKOUTNAME).lib"
+ITKTARGET = "$(OUT_DIR)\$(ITKOUTNAME).dll"
+!endif
+
+!if $(ISTCLINSTALL)
+TCLSTUBLIB = "$(TCLROOT)\lib\tclstub$(TCL_VERSION).lib"
+TKSTUBLIB = "$(TCLROOT)\lib\tkstub$(TCL_VERSION).lib"
+TCLIMPLIB = "$(TCLROOT)\lib\tcl$(TCL_VERSION)$(DBGX).lib"
+TKIMPLIB = "$(TCLROOT)\lib\tk$(TCL_VERSION)$(DBGX).lib"
+TCLSH = "$(TCLROOT)\bin\tclsh$(TCL_VERSION)$(DBGX).exe"
+WISH = "$(TCLROOT)\bin\wish$(TCL_VERSION)$(DBGX).exe"
+!else
+TCLSTUBLIB = "$(TCLROOT)\win\Release\tclstub$(TCL_VERSION).lib"
+TKSTUBLIB = "$(TKROOT)\win\Release\tkstub$(TCL_VERSION).lib"
+TCLIMPLIB = "$(TCLROOT)\win\$(OUT_DIR)\tcl$(TCL_VERSION)$(DBGX).lib"
+TKIMPLIB = "$(TKROOT)\win\$(OUT_DIR)\tk$(TCL_VERSION)$(DBGX).lib"
+TCLSH = "$(TCLROOT)\win\$(OUT_DIR)\tclsh$(TCL_VERSION)$(DBGX).exe"
+WISH = "$(TCLROOT)\win\$(OUT_DIR)\wish$(TCL_VERSION)$(DBGX).exe"
+!endif
+
+ITCLSTUBLIBNAME = itclstub$(ITCL_VERSION).lib
+ITCLSTUBLIB = "$(ITCLDIR)\win\Release\$(ITCLSTUBLIBNAME)"
+
+ITKSTUBLIBNAME = $(STUBPREFIX)$(ITK_VERSION).lib
+ITKSTUBLIB = "$(OUT_DIR)\$(ITKSTUBLIBNAME)"
+
+
+LIB_INSTALL_DIR = $(INSTALLDIR)\lib
+BIN_INSTALL_DIR = $(INSTALLDIR)\bin
+SCRIPT_INSTALL_DIR = $(INSTALLDIR)\lib\itk$(ITK_DOTVERSION)
+INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include
+
+ITKOBJS = \
+ $(TMP_DIR)\itk_archetype.obj \
+ $(TMP_DIR)\itk_cmds.obj \
+ $(TMP_DIR)\itk_option.obj \
+ $(TMP_DIR)\itk_util.obj \
+!if $(STATIC_BUILD) == 0
+ $(TMP_DIR)\dllEntryPoint.obj \
+ $(TMP_DIR)\dllResource.obj \
+!endif
+ $(TMP_DIR)\itkStubInit.obj
+
+ITKSTUBOBJS = \
+ $(TMP_DIR)\itkStubLib.obj
+
+WINDIR = $(ROOT)\win
+GENERICDIR = $(ROOT)\generic
+RCDIR = $(ROOT)\win\rc
+
+######################################################################
+# Link flags
+######################################################################
+
+!if $(DEBUG)
+ldebug = -debug:full -debugtype:cv -pdb:none
+!else
+ldebug = -release -opt:ref
+!endif
+
+# declarations common to all linker options
+lcommon = -nologo -link50compat -machine:$(MACHINE)
+
+ITK_LFLAGS = $(lcommon) -subsystem:windows -dll
+
+!if $(USE_TCL_STUBS)
+ITK_LLIBS = $(TCLSTUBLIB) $(TKSTUBLIB) $(ITCLSTUBLIB)
+!else
+ITK_LLIBS = $(TCLIMPLIB) $(TKIMPLIB) $(ITCLIMPLIB)
+!endif
+
+######################################################################
+# Compile flags
+######################################################################
+
+!if $(DEBUG) == 0
+!if "$(MACHINE)" == "ALPHA"
+# MSVC on Alpha doesn't understand -Ot
+cdebug = -O2i
+!else
+cdebug = -Ox
+!endif
+!else
+!if $(MSDEV_VER) < 6
+cdebug = -Zi -Od -WX
+!else
+cdebug = -ZI -Od -WX
+!endif
+!endif
+
+!if $(STATIC_BUILD)
+cdll =
+!else
+cdll = -GD
+!endif
+
+# declarations common to all compiler options
+ccommon = -nologo -c -W3 -YX -Fp$(TMP_DIR)\
+
+!if $(STATIC_BUILD) && $(NOMSVCRT)
+crt = -MT$(DBGX)
+!else
+crt = -MD$(DBGX)
+!endif
+
+!if $(ISTCLINSTALL)
+TCL_INCLUDES = -I"$(TCLROOT)\include"
+TK_INCLUDES =
+!else
+TCL_INCLUDES = -I"$(TCLROOT)\generic"
+TK_INCLUDES = -I"$(TKROOT)\generic" -I"$(TKROOT)\xlib"
+!endif
+
+ITK_INCLUDES = -I$(WINDIR) -I$(GENERICDIR)
+ITCL_INCLUDES = -I"$(ITCLDIR)\generic"
+ITK_DEFINES = -DBUILD_itk -DTCL_THREADS=1
+ITK_EXE_CFLAGS = $(ccommon) $(cdebug) $(crt) $(cdll) $(ITCL_INCLUDES) $(ITK_INCLUDES) \
+ $(TCL_INCLUDES) $(TK_INCLUDES) $(ITK_DEFINES)
+
+!if $(USE_TCL_STUBS)
+ITK_CFLAGS = $(ITK_EXE_CFLAGS) -DUSE_TCL_STUBS -DUSE_TK_STUBS -DUSE_ITCL_STUBS
+!else
+ITK_CFLAGS = $(ITK_EXE_CFLAGS)
+!endif
+
+######################################################################
+# Project specific targets
+######################################################################
+
+all : setup $(ITKTARGET) $(ITKSTUBLIB)
+release : setup $(ITKTARGET) $(ITKSTUBLIB)
+
+test: setup $(ITKDLL) $(ITKSTUBLIB) $(ITKWISH)
+ -@copy $(TCLDLL) $(TMPDIR)
+ -@copy $(TKDLL) $(TMPDIR)
+ -@copy $(ITCLDLL) $(TMPDIR)
+# $(ITKWISH)
+
+setup :
+ @$(vcvars) > nul
+ @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR) &\
+ echo Created directory '$(TMP_DIR)'
+ @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR) &\
+ echo Created directory '$(OUT_DIR)'
+
+$(ITKTARGET): $(ITKOBJS)
+!if $(STATIC_BUILD)
+ $(lib32) -nologo -machine:$(MACHINE) -out:$@ @<<
+!else
+ $(link32) $(ITK_LFLAGS) -out:$@ $(ITK_LLIBS) @<<
+!endif
+ $(ITKOBJS)
+<<
+
+
+!if $(DEBUG) == 0
+$(ITKSTUBLIB) : $(ITKSTUBOBJS)
+ $(lib32) -nologo -out:$@ $(ITKSTUBOBJS)
+!else
+$(ITKSTUBLIB) :
+!endif
+
+install: all
+ if not exist "$(INSTALLDIR)" mkdir "$(INSTALLDIR)"
+ if not exist "$(BIN_INSTALL_DIR)" mkdir "$(BIN_INSTALL_DIR)"
+ if not exist "$(LIB_INSTALL_DIR)" mkdir "$(LIB_INSTALL_DIR)"
+ if not exist "$(SCRIPT_INSTALL_DIR)" mkdir "$(SCRIPT_INSTALL_DIR)"
+ if not exist "$(INCLUDE_INSTALL_DIR)" mkdir "$(INCLUDE_INSTALL_DIR)"
+ copy $(ITKTARGET) "$(SCRIPT_INSTALL_DIR)"
+ copy $(ITKSTUBLIB) "$(LIB_INSTALL_DIR)"
+ copy $(ROOT)\generic\itk.h "$(INCLUDE_INSTALL_DIR)"
+ copy $(ROOT)\generic\itkDecls.h "$(INCLUDE_INSTALL_DIR)"
+ copy $(ROOT)\library\*.* "$(SCRIPT_INSTALL_DIR)"
+ echo package ifneeded Itk $(ITK_DOTVERSION) [list load [file join $$dir $(ITKOUTNAME).dll] Itk] > \
+ "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+
+
+######################################################################
+# Regenerate the stubs files.
+######################################################################
+
+!if $(ISTCLINSTALL) == 0
+# Only from the sources of Tcl does genStubs.tcl exist.
+genstubs:
+ $(TCLSH) $(TCLROOT)\tools\genStubs.tcl $(GENERICDIR) \
+ $(GENERICDIR)\itk.decls
+!else
+genstubs:
+ @echo ERROR: Can't rebuild stubs tables without the Tcl source distribution
+!endif
+
+######################################################################
+# Special case object file targets
+######################################################################
+
+# The following object is part of the stub library and should not
+# be built as DLL objects but none of the symbols should be exported
+
+$(TMP_DIR)\itkStubLib.obj : $(GENERICDIR)\itkStubLib.c
+ $(cc32) -DSTATIC_BUILD $(ITK_EXE_CFLAGS) -Zl -Fo$@ $?
+
+$(TMP_DIR)\dllResource.obj : $(TMP_DIR)\itk.res
+ $(cvtres32) -nologo -machine:$(MACHINE) -out:$@ $?
+
+######################################################################
+# Inference rules. Use batch-mode when supported.
+######################################################################
+
+!if $(_NMAKE_VER) < 162
+{$(WINDIR)}.c{$(TMP_DIR)}.obj :
+!else
+{$(WINDIR)}.c{$(TMP_DIR)}.obj ::
+!endif
+ $(cc32) -DDLL_BUILD $(ITK_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+!if $(_NMAKE_VER) < 162
+{$(GENERICDIR)}.c{$(TMP_DIR)}.obj :
+!else
+{$(GENERICDIR)}.c{$(TMP_DIR)}.obj ::
+!endif
+ $(cc32) -DDLL_BUILD $(ITK_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(RCDIR)}.rc{$(TMP_DIR)}.res :
+ $(rc32) -fo $@ -DDEBUG=$(DEBUG) $(ITK_INCLUDES) $(TCL_INCLUDES) $(ITCL_INCLUDES) $(ITK_DEFINES) $<
+
+######################################################################
+# Clean up
+######################################################################
+
+tidy :
+ -del $(TMP_DIR)\*.pch
+ -del $(TMP_DIR)\*.obj
+ -del $(TMP_DIR)\*.res
+
+clean : tidy
+ -del $(OUT_DIR)\*.exp
+ -del $(OUT_DIR)\*.lib
+ -del $(OUT_DIR)\*.dll
+
+hose : clean
+ -rmdir $(OUT_DIR)
+ -rmdir $(TMP_DIR)
+
diff --git a/itcl/itk/win/rc/itk.rc b/itcl/itk/win/rc/itk.rc index f63bf01dc7d..47511b1b7f7 100644 --- a/itcl/itk/win/rc/itk.rc +++ b/itcl/itk/win/rc/itk.rc @@ -1,126 +1,62 @@ -// SCCS: @(#) tk.rc 1.17 96/09/12 16:22:08 -// -// Version -// - -#define VS_VERSION_INFO 1 -#define RESOURCE_INCLUDED -#include <itcl.h> -#include <itk.h> - -VS_VERSION_INFO VERSIONINFO - FILEVERSION ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL - PRODUCTVERSION ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL - FILEFLAGSMASK 0x3fL - FILEFLAGS 0x0L - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "Itk language extension for Tcl\0" - VALUE "Authors", "Michael McLennan\0" - VALUE "OriginalFilename", "itk" STRINGIFY(ITCL_MAJOR_VERSION) STRINGIFY(ITCL_MINOR_VERSION) ".dll\0" - VALUE "CompanyName", "Bell Labs Innovations for Lucent Technologies\0" - VALUE "FileVersion", ITCL_PATCH_LEVEL - VALUE "LegalCopyright", "Copyright \251 1993-1998\0" - VALUE "ProductName", "[incr Tk] " ITCL_VERSION " for Windows\0" - VALUE "ProductVersion", ITCL_PATCH_LEVEL - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -// -// Icon -// - -tk ICON DISCARDABLE "itk.ico" - -// -// Cursor -// - -X_cursor CURSOR DISCARDABLE "cursor00.cur" -arrow CURSOR DISCARDABLE "cursor02.cur" -based_arrow_down CURSOR DISCARDABLE "cursor04.cur" -based_arrow_up CURSOR DISCARDABLE "cursor06.cur" -boat CURSOR DISCARDABLE "cursor08.cur" -bogosity CURSOR DISCARDABLE "cursor0a.cur" -bottom_left_corner CURSOR DISCARDABLE "cursor0c.cur" -bottom_right_corner CURSOR DISCARDABLE "cursor0e.cur" -bottom_side CURSOR DISCARDABLE "cursor10.cur" -bottom_tee CURSOR DISCARDABLE "cursor12.cur" -box_spiral CURSOR DISCARDABLE "cursor14.cur" -center_ptr CURSOR DISCARDABLE "cursor16.cur" -circle CURSOR DISCARDABLE "cursor18.cur" -clock CURSOR DISCARDABLE "cursor1a.cur" -coffee_mug CURSOR DISCARDABLE "cursor1c.cur" -cross CURSOR DISCARDABLE "cursor1e.cur" -cross_reverse CURSOR DISCARDABLE "cursor20.cur" -crosshair CURSOR DISCARDABLE "cursor22.cur" -diamond_cross CURSOR DISCARDABLE "cursor24.cur" -dot CURSOR DISCARDABLE "cursor26.cur" -dotbox CURSOR DISCARDABLE "cursor28.cur" -double_arrow CURSOR DISCARDABLE "cursor2a.cur" -draft_large CURSOR DISCARDABLE "cursor2c.cur" -draft_small CURSOR DISCARDABLE "cursor2e.cur" -draped_box CURSOR DISCARDABLE "cursor30.cur" -exchange CURSOR DISCARDABLE "cursor32.cur" -fleur CURSOR DISCARDABLE "cursor34.cur" -gobbler CURSOR DISCARDABLE "cursor36.cur" -gumby CURSOR DISCARDABLE "cursor38.cur" -hand1 CURSOR DISCARDABLE "cursor3a.cur" -hand2 CURSOR DISCARDABLE "cursor3c.cur" -heart CURSOR DISCARDABLE "cursor3e.cur" -icon CURSOR DISCARDABLE "cursor40.cur" -iron_cross CURSOR DISCARDABLE "cursor42.cur" -left_ptr CURSOR DISCARDABLE "cursor44.cur" -left_side CURSOR DISCARDABLE "cursor46.cur" -left_tee CURSOR DISCARDABLE "cursor48.cur" -leftbutton CURSOR DISCARDABLE "cursor4a.cur" -ll_angle CURSOR DISCARDABLE "cursor4c.cur" -lr_angle CURSOR DISCARDABLE "cursor4e.cur" -man CURSOR DISCARDABLE "cursor50.cur" -middlebutton CURSOR DISCARDABLE "cursor52.cur" -mouse CURSOR DISCARDABLE "cursor54.cur" -pencil CURSOR DISCARDABLE "cursor56.cur" -pirate CURSOR DISCARDABLE "cursor58.cur" -plus CURSOR DISCARDABLE "cursor5a.cur" -question_arrow CURSOR DISCARDABLE "cursor5c.cur" -right_ptr CURSOR DISCARDABLE "cursor5e.cur" -right_side CURSOR DISCARDABLE "cursor60.cur" -right_tee CURSOR DISCARDABLE "cursor62.cur" -rightbutton CURSOR DISCARDABLE "cursor64.cur" -rtl_logo CURSOR DISCARDABLE "cursor66.cur" -sailboat CURSOR DISCARDABLE "cursor68.cur" -sb_down_arrow CURSOR DISCARDABLE "cursor6a.cur" -sb_h_double_arrow CURSOR DISCARDABLE "cursor6c.cur" -sb_left_arrow CURSOR DISCARDABLE "cursor6e.cur" -sb_right_arrow CURSOR DISCARDABLE "cursor70.cur" -sb_up_arrow CURSOR DISCARDABLE "cursor72.cur" -sb_v_double_arrow CURSOR DISCARDABLE "cursor74.cur" -shuttle CURSOR DISCARDABLE "cursor76.cur" -sizing CURSOR DISCARDABLE "cursor78.cur" -spider CURSOR DISCARDABLE "cursor7a.cur" -spraycan CURSOR DISCARDABLE "cursor7c.cur" -star CURSOR DISCARDABLE "cursor7e.cur" -target CURSOR DISCARDABLE "cursor80.cur" -tcross CURSOR DISCARDABLE "cursor82.cur" -top_left_arrow CURSOR DISCARDABLE "cursor84.cur" -top_left_corner CURSOR DISCARDABLE "cursor86.cur" -top_right_corner CURSOR DISCARDABLE "cursor88.cur" -top_side CURSOR DISCARDABLE "cursor8a.cur" -top_tee CURSOR DISCARDABLE "cursor8c.cur" -trek CURSOR DISCARDABLE "cursor8e.cur" -ul_angle CURSOR DISCARDABLE "cursor90.cur" -umbrella CURSOR DISCARDABLE "cursor92.cur" -ur_angle CURSOR DISCARDABLE "cursor94.cur" -watch CURSOR DISCARDABLE "cursor96.cur" -xterm CURSOR DISCARDABLE "cursor98.cur" +// RCS: @(#) $Id$
+//
+// Version resource script.
+//
+
+#include <winver.h>
+
+#define RESOURCE_INCLUDED
+#include <itcl.h>
+
+//
+// build-up the name suffix that defines the type of build this is.
+//
+#if DEBUG
+#define SUFFIX_DEBUG "d"
+#else
+#define SUFFIX_DEBUG ""
+#endif
+
+#define SUFFIX SUFFIX_DEBUG
+
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,0
+ PRODUCTVERSION ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,0
+ FILEFLAGSMASK 0x3fL
+#if DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "[incr Tk] Object-Oriented Tk extension\0"
+ VALUE "Authors", "Michael McLennan\0"
+ VALUE "OriginalFilename", "itk" STRINGIFY(JOIN(ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION)) SUFFIX ".dll\0"
+ VALUE "CompanyName", "Bell Labs Innovations for Lucent Technologies\0"
+ VALUE "FileVersion", ITCL_PATCH_LEVEL
+ VALUE "LegalCopyright", "Copyright \251 1993-2001\0"
+ VALUE "ProductName", "[incr Tk] " ITCL_VERSION " for Windows\0"
+ VALUE "ProductVersion", ITCL_PATCH_LEVEL
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+//
+// Icons
+//
+
+toaster ICON DISCARDABLE "itk.ico"
+
diff --git a/itcl/makefile.bc b/itcl/makefile.bc index 12762724db9..4a59049ab8b 100644 --- a/itcl/makefile.bc +++ b/itcl/makefile.bc @@ -1,114 +1,115 @@ -# Borland 5.01 Makefile for Itcl 2.2 Distribution -# -# This is the main Borland makefile for the Windows distribution -# of [incr Tcl] version 2.2. - -# -# TOOLS -- path to root of Borland Directory -# TARGET_ROOT -- Target Directory for installation -# SOURCE_ROOT -- Path to root of source tree - -TOOLS = c:\bc45 -TARGET_ROOT = c:\Program files\Itcl2.2 -SOURCE_ROOT = c:\Itcl2.2 - -# -# You should not have to modify anything further in this makefile -# - -# -# Borland C++ tools -# - -BORLAND = $(TOOLS) -IMPLIB = $(BORLAND)\bin\Implib -BCC32 = $(BORLAND)\bin\Bcc32 -TLINK32 = $(BORLAND)\bin\tlink32 -RC = $(BORLAND)\bin\brcc32 -BCC = $(BORLAND)\bin\Bcc -TLINK = $(BORLAND)\bin\tlink -RC16 = $(BORLAND)\bin\brcc32 -31 -MAKE = $(BORLAND)\bin\make -fmakefile.bc - -# -# System calls -# - -CP = copy -RM = del -MKDIR = -mkdir - -# -# Source and Build Paths -# - -TCLDIR = $(SOURCE_ROOT)\Tcl7.6 -TKDIR = $(SOURCE_ROOT)\Tk4.2 -ITCLDIR = $(SOURCE_ROOT)\Itcl -ITKDIR = $(SOURCE_ROOT)\Itk -IWIDGETSDIR = $(SOURCE_ROOT)\Iwidgets2.2.0 - -# -# Target Paths -# - -TARGET_BIN = $(TARGET_ROOT)\Bin -TARGET_LIB_ROOT = $(TARGET_ROOT)\Lib -TARGET_LIB = $(TARGET_LIB_ROOT)\Itcl -TARGET_INCLUDE_ROOT = $(TARGET_ROOT)\Include -TARGET_INCLUDE = $(TARGET_INCLUDE_ROOT)\Itcl -TARGET_DOC = $(TARGET_ROOT)\Html - -# -# Shared Target Files: -# - -TCLLIB = Tcl76i.lib -TCLDLL = Tcl76i.dll -TKLIB = Tk42i.lib -TKDLL = Tk42i.dll -ITCLLIB = Itcl22.lib -ITCLDLL = Itcl22.dll -ITKLIB = Itk22.lib -ITKDLL = Itk22.dll - -# -# Paths to Build locations of libraries -# -TCLLIBDIR = $(TCLDIR)\Win -TKLIBDIR = $(TKDIR)\Win -ITCLLIBDIR = $(ITCLDIR)\Win -ITKLIBDIR = $(ITKDIR)\Win - - -dist: - cd $(TCLDIR)\Win - $(MAKE) all - cd $(TKDIR)\Win - $(MAKE) all - cd $(ITCLDIR)\Win - $(MAKE) all - cd $(ITKDIR)\Win - $(MAKE) all - -dist-install: - cd $(TCLDIR)\Win - $(MAKE) install - cd $(TKDIR)\Win - $(MAKE) install - cd $(ITCLDIR)\Win - $(MAKE) install - cd $(ITKDIR)\Win - $(MAKE) install - cd $(IWIDGETSDIR)\Win - $(MAKE) install - -dist-clean: - cd $(TCLDIR)\Win - $(MAKE) clean - cd $(TKDIR)\Win - $(MAKE) clean - cd $(ITCLDIR)\Win - $(MAKE) clean - cd $(ITKDIR)\Win - $(MAKE) clean +# Borland 5.01 Makefile for Itcl 2.2 Distribution
+#
+# This is the main Borland makefile for the Windows distribution
+# of [incr Tcl] version 2.2.
+
+#
+# TOOLS -- path to root of Borland Directory
+# TARGET_ROOT -- Target Directory for installation
+# SOURCE_ROOT -- Path to root of source tree
+
+TOOLS = c:\bc45
+TARGET_ROOT = c:\Program files\Itcl2.2
+SOURCE_ROOT = c:\Itcl2.2
+
+#
+# You should not have to modify anything further in this makefile
+#
+
+#
+# Borland C++ tools
+#
+
+BORLAND = $(TOOLS)
+IMPLIB = $(BORLAND)\bin\Implib
+BCC32 = $(BORLAND)\bin\Bcc32
+TLINK32 = $(BORLAND)\bin\tlink32
+RC = $(BORLAND)\bin\brcc32
+BCC = $(BORLAND)\bin\Bcc
+TLINK = $(BORLAND)\bin\tlink
+RC16 = $(BORLAND)\bin\brcc32 -31
+MAKE = $(BORLAND)\bin\make -fmakefile.bc
+
+#
+# System calls
+#
+
+CP = copy
+RM = del
+MKDIR = -mkdir
+
+#
+# Source and Build Paths
+#
+
+TCLDIR = $(SOURCE_ROOT)\Tcl7.6
+TKDIR = $(SOURCE_ROOT)\Tk4.2
+ITCLDIR = $(SOURCE_ROOT)\Itcl
+ITKDIR = $(SOURCE_ROOT)\Itk
+IWIDGETSDIR = $(SOURCE_ROOT)\Iwidgets2.2.0
+
+#
+# Target Paths
+#
+
+TARGET_BIN = $(TARGET_ROOT)\Bin
+TARGET_LIB_ROOT = $(TARGET_ROOT)\Lib
+TARGET_LIB = $(TARGET_LIB_ROOT)\Itcl
+TARGET_INCLUDE_ROOT = $(TARGET_ROOT)\Include
+TARGET_INCLUDE = $(TARGET_INCLUDE_ROOT)\Itcl
+TARGET_DOC = $(TARGET_ROOT)\Html
+
+#
+# Shared Target Files:
+#
+
+TCLLIB = Tcl76i.lib
+TCLDLL = Tcl76i.dll
+TKLIB = Tk42i.lib
+TKDLL = Tk42i.dll
+ITCLLIB = Itcl22.lib
+ITCLDLL = Itcl22.dll
+ITKLIB = Itk22.lib
+ITKDLL = Itk22.dll
+
+#
+# Paths to Build locations of libraries
+#
+TCLLIBDIR = $(TCLDIR)\Win
+TKLIBDIR = $(TKDIR)\Win
+ITCLLIBDIR = $(ITCLDIR)\Win
+ITKLIBDIR = $(ITKDIR)\Win
+
+
+dist:
+ cd $(TCLDIR)\Win
+ $(MAKE) all
+ cd $(TKDIR)\Win
+ $(MAKE) all
+ cd $(ITCLDIR)\Win
+ $(MAKE) all
+ cd $(ITKDIR)\Win
+ $(MAKE) all
+
+dist-install:
+ cd $(TCLDIR)\Win
+ $(MAKE) install
+ cd $(TKDIR)\Win
+ $(MAKE) install
+ cd $(ITCLDIR)\Win
+ $(MAKE) install
+ cd $(ITKDIR)\Win
+ $(MAKE) install
+ cd $(IWIDGETSDIR)\Win
+ $(MAKE) install
+
+dist-clean:
+ cd $(TCLDIR)\Win
+ $(MAKE) clean
+ cd $(TKDIR)\Win
+ $(MAKE) clean
+ cd $(ITCLDIR)\Win
+ $(MAKE) clean
+ cd $(ITKDIR)\Win
+ $(MAKE) clean
+
diff --git a/itcl/makefile.vc b/itcl/makefile.vc index d5d8e2355f8..7a79939772e 100644 --- a/itcl/makefile.vc +++ b/itcl/makefile.vc @@ -1,95 +1,45 @@ -# -# Visual C++ 4.1 makefile -# - -# This is the main Visual C++ makefile for the Windows distribution -# of [incr Tcl] version 3.0. To compile the distribution using Visual -# C++, copy "makefile.vc" to "makefile". Then set the macros for the -# location of the source directory, installation directory, and the -# Microsoft Compilers. You may then "make dist" to build the distribution, -# and "make dist-install" to install it to the target directory you specify -# below, and "make dist-clean" to clean up. - -# -# Project directories -# -# ROOT = top of source tree -# -# TMPDIR = location where .obj files should be stored during build -# -# TOOLS32 = location of VC++ 32-bit development tools. Note that the -# VC++ 2.0 header files are broken, so you need to use the -# ones that come with the developer network CD's, or later -# versions of VC++. -# -# INSTALLDIR = where the install- targets should copy the binaries and -# support files -# - -TOOLS32 = c:\progra~1\devstudio\vc -TOOLS32_rc = c:\progra~1\devstudio\sharedide - -SOURCE_ROOT = \ws\incrTcl -INSTALLDIR = c:\progra~1\Tcl -TCLDIR = \ws\tcl8.1 -TKDIR = \ws\tk8.1 -TCLSH = $(TCLDIR)\win\Release\tclsh81.exe - -# Set this to the appropriate value of /MACHINE: for your platform -MACHINE = IX86 - -# Set NODEBUG to 0 to compile with symbols -NODEBUG = 1 - -# uncomment one of the following lines to compile with TCL_MEM_DEBUG, -# TCL_MEM_DEBUG, or TCL_COMPILE_DEBUG -#DEBUGDEFINES = -DTCL_MEM_DEBUG -#DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG -#DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_STATS -#DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS - - -# -# You should not have to modify anything further in this makefile -# - - -MAKE = $(TOOLS32)\bin\nmake -fmakefile.vc - -# -# System calls -# - -CP = copy -RM = del -MKDIR = -mkdir - -# -# Source and Build Paths -# -ITCLDIR = $(SOURCE_ROOT)\Itcl -ITKDIR = $(SOURCE_ROOT)\Itk -IWIDGETS2DIR = $(SOURCE_ROOT)\Iwidgets2.2.0 -IWIDGETS3DIR = $(SOURCE_ROOT)\Iwidgets3.0.0 - -dist: - cd $(ITCLDIR)\Win - $(MAKE) all - cd $(ITKDIR)\Win - $(MAKE) all - -dist-install: - cd $(ITCLDIR)\Win - $(MAKE) install - cd $(ITKDIR)\Win - $(MAKE) install - cd $(IWIDGETS2DIR)\Win - $(MAKE) install - cd $(IWIDGETS3DIR)\Win - $(MAKE) install - -dist-clean: - cd $(ITCLDIR)\Win - $(MAKE) clean - cd $(ITKDIR)\Win - $(MAKE) clean +######################################################################
+#
+# Microsoft Visual C++ 5.0+ makefile for [Incr Tcl/Tk].
+#
+######################################################################
+#
+# This is the main Visual C++ makefile for the Win32 distribution
+# of [incr Tcl/Tk]. To compile the distribution using Visual C++,
+# first open "config.vc" and follow the directions for editing the
+# approriate values for your setup. This is not the TEA makefile.
+#
+######################################################################
+# $Id$
+######################################################################
+
+!include "rules.vc"
+!include "config.vc"
+
+MAKECMD = nmake.exe -nologo /$(MAKEFLAGS) -f makefile.vc
+
+release :
+ cd itcl\win
+ $(MAKECMD) release
+ cd ..\..\itk\win
+ $(MAKECMD) release
+
+docs :
+ @echo "ack!"
+
+install :
+ cd itcl\win
+ $(MAKECMD) install
+ cd ..\..\itk\win
+ $(MAKECMD) install
+ if exist ..\..\iwidgets\nul ( \
+ cd ..\..\iwidgets\win &\
+ $(MAKECMD) install \
+ )
+
+#dist-clean:
+# cd $(ITCLDIR)\Win
+# $(MAKECMD) clean
+# cd $(ITKDIR)\Win
+# $(MAKECMD) clean
+
diff --git a/itcl/pkg.vc b/itcl/pkg.vc new file mode 100644 index 00000000000..fad1ca28dd6 --- /dev/null +++ b/itcl/pkg.vc @@ -0,0 +1,19 @@ +######################################################################
+#
+# Global package version numbers for the build.
+#
+######################################################################
+# $Id$
+######################################################################
+
+# remember to change itcl/generic/itcl.h, too.
+# don't add patchlevel!
+
+!ifndef ITCL_DOTVERSION
+ITCL_DOTVERSION = 3.2
+!endif
+
+ITCL_VERSION = $(ITCL_DOTVERSION:.=)
+ITK_DOTVERSION = $(ITCL_DOTVERSION)
+ITK_VERSION = $(ITCL_VERSION)
+
diff --git a/itcl/rules.vc b/itcl/rules.vc new file mode 100644 index 00000000000..1d26dd62118 --- /dev/null +++ b/itcl/rules.vc @@ -0,0 +1,68 @@ +######################################################################
+# rules.vc --
+#
+# Simple set of standard rules for the VC++ makefiles.
+#
+######################################################################
+# $Id$
+######################################################################
+
+######################################################################
+# a bug fix needed for VC++ 6.0's nmake tool.
+#
+# Reset the version *string* back to the integer it's supposed to be.
+# More entries will have to be made here for all subsiquent nmake
+# versions until Microsoft fixes it.
+#
+_NMAKE_VER = $(_NMAKE_VER:6.00.8168.0=600)
+######################################################################
+
+
+######################################################################
+# Commandline checks and over-rides
+######################################################################
+
+!ifndef HAVE_RULES
+HAVE_RULES = 1
+
+# Set DEBUG to 1 to compile with symbols.
+#
+!ifndef DEBUG
+DEBUG = 0
+!endif
+
+# Set STATIC_BUILD to 1 to make a static library rather
+# than a dll.
+#
+!ifndef STATIC_BUILD
+STATIC_BUILD = 0
+!endif
+
+# Set USE_TCL_STUBS to 0 to disable Stubs support. Stubs
+# will work fine even with static libraries, but you may
+# disable it if you want to.
+#
+!ifndef USE_TCL_STUBS
+!if $(STATIC_BUILD) == 0
+USE_TCL_STUBS = 1
+!else
+USE_TCL_STUBS = 0
+!endif
+!endif
+
+# Set NOMSVCRT to 1 to use libcmt(d).lib instead of the
+# dynamic run-time.
+#
+!ifndef NOMSVCRT
+!if $(STATIC_BUILD)
+NOMSVCRT = 1
+!else
+NOMSVCRT = 0
+!endif
+!endif
+
+!if $(STATIC_BUILD) == 0 && $(NOMSVCRT) == 1
+!error "The static runtime in a loadable (dll) extension is a useless configuration that will cause abnormal and unnecessary code bloat."
+!endif
+
+!endif #!ifndef HAVE_RULES
diff --git a/itcl/tcl.m4 b/itcl/tcl.m4 index 3b66d1a7c64..71578ac3d39 100644 --- a/itcl/tcl.m4 +++ b/itcl/tcl.m4 @@ -63,10 +63,6 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [ ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi - if test -f "$i/win/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/win; pwd)` - break - fi done fi @@ -89,18 +85,14 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [ if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break - fi - if test -f "$i/win/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i/win; pwd)` - break - fi + fi done fi ]) if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" - AC_MSG_ERROR(Can't find Tcl configuration definitions) + AC_MSG_WARN(Can't find Tcl configuration definitions) exit 0 else no_tcl= @@ -164,10 +156,6 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi - if test -f "$i/win/tkConfig.sh" ; then - ac_cv_c_tkconfig=`(cd $i/win; pwd)` - break - fi done fi # check in a few common install locations @@ -189,16 +177,12 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi - if test -f "$i/win/tkConfig.sh" ; then - ac_cv_c_tkconfig=`(cd $i/win; pwd)` - break - fi done fi ]) if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" - AC_MSG_ERROR(Can't find Tk configuration definitions) + AC_MSG_WARN(Can't find Tk configuration definitions) exit 0 else no_tk= @@ -296,6 +280,41 @@ AC_DEFUN(SC_LOAD_TKCONFIG, [ ]) #------------------------------------------------------------------------ +# SC_ENABLE_GCC -- +# +# Allows the use of GCC if available +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-gcc +# +# Sets the following vars: +# CC Command to use for the compiler +#------------------------------------------------------------------------ + +AC_DEFUN(SC_ENABLE_GCC, [ + AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]], + [ok=$enableval], [ok=no]) + if test "$ok" = "yes"; then + CC=gcc + else + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) + CC=cl + ;; + *) + CC=${CC-cc} + ;; + esac + fi + AC_PROG_CC +]) + +#------------------------------------------------------------------------ # SC_ENABLE_SHARED -- # # Allows the building of shared libraries @@ -320,18 +339,14 @@ AC_DEFUN(SC_ENABLE_SHARED, [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, [ --enable-shared build and link with shared libraries [--enable-shared]], - [tcl_ok=$enableval], [tcl_ok=no]) + [tcl_ok=$enableval], [tcl_ok=yes]) -# CYGNUS LOCAL - case "${host}" in - *mingw32* | *windows32*) - # Default to shared build for Windows - if test "${enable_shared+set}" != set; then - tcl_ok=yes - fi - ;; - esac -# END CYGNUS LOCAL + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval + else + tcl_ok=yes + fi if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([shared]) @@ -375,8 +390,8 @@ AC_DEFUN(SC_ENABLE_THREADS, [ AC_DEFINE(TCL_THREADS) AC_DEFINE(_REENTRANT) - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) AC_MSG_RESULT(yes) ;; *) @@ -428,8 +443,8 @@ AC_DEFUN(SC_ENABLE_THREADS, [ #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_SYMBOLS, [ - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) tcl_dbgx=d ;; *) @@ -458,6 +473,1316 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [ AC_SUBST(LDFLAGS_DEFAULT) ]) +#-------------------------------------------------------------------- +# SC_CONFIG_CFLAGS +# +# Try to determine the proper flags to pass to the compiler +# for building shared libraries and other such nonsense. +# +# Arguments: +# none +# +# Results: +# +# Defines the following vars: +# +# DL_OBJS - Name of the object file that implements dynamic +# loading for Tcl on this system. +# DL_LIBS - Library file(s) to include in tclsh and other base +# applications in order for the "load" command to work. +# LDFLAGS - Flags to pass to the compiler when linking object +# files into an executable application binary such +# as tclsh. +# LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", +# that tell the run-time dynamic linker where to look +# for shared libraries such as libtcl.so. Depends on +# the variable LIB_RUNTIME_DIR in the Makefile. +# MAKE_LIB - Command to execute to build the Tcl library; +# differs depending on whether or not Tcl is being +# compiled as a shared library. +# SHLIB_CFLAGS - Flags to pass to cc when compiling the components +# of a shared library (may request position-independent +# code, among other things). +# SHLIB_LD - Base command to use for combining object files +# into a shared library. +# SHLIB_LD_LIBS - Dependent libraries for the linker to scan when +# creating shared libraries. This symbol typically +# goes at the end of the "ld" commands that build +# shared libraries. The value of the symbol is +# "${LIBS}" if all of the dependent libraries should +# be specified when creating a shared library. If +# dependent libraries should not be specified (as on +# SunOS 4.x, where they cause the link to fail, or in +# general if Tcl and Tk aren't themselves shared +# libraries), then this symbol has an empty string +# as its value. +# SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable +# extensions. An empty string means we don't know how +# to use shared libraries on this platform. +# TCL_LIB_FILE - Name of the file that contains the Tcl library, such +# as libtcl7.8.so or libtcl7.8.a. +# TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl" +# in the shared library name, using the $VERSION variable +# to put the version in the right place. This is used +# by platforms that need non-standard library names. +# Examples: ${VERSION}.so.1.1 on NetBSD, since it needs +# to have a version after the .so, and ${VERSION}.a +# on AIX, since the Tcl shared library needs to have +# a .a extension whereas shared objects for loadable +# extensions have a .so extension. Defaults to +# ${VERSION}${SHLIB_SUFFIX}. +# TCL_NEEDS_EXP_FILE - +# 1 means that an export file is needed to link to a +# shared library. +# TCL_EXP_FILE - The name of the installed export / import file which +# should be used to link to the Tcl shared library. +# Empty if Tcl is unshared. +# TCL_BUILD_EXP_FILE - +# The name of the built export / import file which +# should be used to link to the Tcl shared library. +# Empty if Tcl is unshared. +# CFLAGS_DEBUG - +# Flags used when running the compiler in debug mode +# CFLAGS_OPTIMIZE - +# Flags used when running the compiler in optimize mode +# +# EXTRA_CFLAGS +# +# Subst's the following vars: +# DL_LIBS +# CFLAGS_DEBUG +# CFLAGS_OPTIMIZE +#-------------------------------------------------------------------- + +AC_DEFUN(SC_CONFIG_CFLAGS, [ + + # Step 0: Enable 64 bit support? + + AC_MSG_CHECKING([if 64bit support is enabled]) + AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support],,enableval="no") + + if test "$enableval" = "yes"; then + AC_MSG_RESULT(Will compile with 64bit support) + do64bit=yes + else + do64bit=no + fi + AC_MSG_RESULT($do64bit) + + # Step 1: set the variable "system" to hold the name and version number + # for the system. This can usually be done via the "uname" command, but + # there are a few systems, like Next, where this doesn't work. + + AC_MSG_CHECKING([system version (for dynamic loading)]) + if test -f /usr/lib/NextStep/software_version; then + system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` + else + system=`uname -s`-`uname -r` + if test "$?" -ne 0 ; then + AC_MSG_RESULT([unknown (can't find uname command)]) + system=unknown + else + # Special check for weird MP-RAS system (uname returns weird + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then + system=MP-RAS-`awk '{print $3}' /etc/.relid'` + fi + if test "`uname -s`" = "AIX" ; then + system=AIX-`uname -v`.`uname -r` + fi + AC_MSG_RESULT($system) + fi + fi + + # Step 2: check for existence of -ldl library. This is needed because + # Linux can use either -ldl or -ldld for dynamic loading. + + AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) + + # Step 3: set configuration options based on system name and version. + + do64bit_ok=no + fullSrcDir=`cd $srcdir; pwd` + EXTRA_CFLAGS="" + TCL_EXPORT_FILE_SUFFIX="" + UNSHARED_LIB_SUFFIX="" + TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' + ECHO_VERSION='`echo ${VERSION}`' + TCL_LIB_VERSIONS_OK=ok + CFLAGS_DEBUG=-g + CFLAGS_OPTIMIZE=-O + TCL_NEEDS_EXP_FILE=0 + TCL_BUILD_EXP_FILE="" + TCL_EXP_FILE="" + STLIB_LD="ar cr" + case $system in + AIX-4.[[2-9]]) + SHLIB_CFLAGS="" + SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="" + LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + TCL_NEEDS_EXP_FILE=1 + TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' + ;; + AIX-*) + SHLIB_CFLAGS="" + SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + LIBOBJS="$LIBOBJS tclLoadAix.o" + DL_LIBS="-lld" + LDFLAGS="" + LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + TCL_NEEDS_EXP_FILE=1 + TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' + ;; + BSD/OS-2.1*|BSD/OS-3*) + SHLIB_CFLAGS="" + SHLIB_LD="shlicc -r" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="" + LD_SEARCH_FLAGS="" + ;; + BSD/OS-4.*) + SHLIB_CFLAGS="-export-dynamic -fPIC" + SHLIB_LD="cc -shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="-export-dynamic" + LD_SEARCH_FLAGS="" + ;; + *win32*|*WIN32*|CYGWIN_NT*|cygwin_nt*|*CYGWIN_98*|*CYGWIN_95*) + CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" + CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" + LDFLAGS_CONSOLE="-subsystem:console" + LDFLAGS_WINDOW="-subsystem:windows" + LDFLAGS_DEBUG="-debug:full -debugtype:cv" + LDFLAGS_OPTIMIZE="-release" + EXTRA_CFLAGS="-YX" + PATHTYPE=-w + STLIB_LD="lib -nologo" + SHLIB_LD="link -dll -nologo" + SHLIB_LD_LIBS="user32.lib advapi32.lib" + RC="rc" + ;; + dgux*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD="cc -G" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="" + LD_SEARCH_FLAGS="" + ;; + HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*|HP-UX-*.11.*) + SHLIB_SUFFIX=".sl" + AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) + if test "$tcl_ok" = yes; then + SHLIB_CFLAGS="+z" + SHLIB_LD="ld -b" + SHLIB_LD_LIBS="" + DL_OBJS="tclLoadShl.o" + DL_LIBS="-ldld" + LDFLAGS="-Wl,-E" + LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' + fi + ;; + IRIX-4.*) + SHLIB_CFLAGS="-G 0" + SHLIB_SUFFIX=".a" + SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" + SHLIB_LD_LIBS='${LIBS}' + DL_OBJS="tclLoadAout.o" + DL_LIBS="" + LDFLAGS="-Wl,-D,08000000" + LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' + ;; + IRIX-5.*|IRIX-6.*|IRIX64-6.5*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -n32 -shared -rdata_shared" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then + EXTRA_CFLAGS="-mabi=n32" + LDFLAGS="-mabi=n32" + else + case $system in + IRIX-6.3) + # Use to build 6.2 compatible binaries on 6.3. + EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS" + ;; + *) + EXTRA_CFLAGS="-n32" + ;; + esac + LDFLAGS="-n32" + fi + ;; + IRIX64-6.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -32 -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + ;; + Linux*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings + # when you inline the string and math operations. Turn this off to + # get rid of the warnings. + + CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" + + if test "$have_dl" = yes; then + SHLIB_LD="${CC} -shared" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="-rdynamic" + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + else + AC_CHECK_HEADER(dld.h, [ + SHLIB_LD="ld -shared" + DL_OBJS="tclLoadDld.o" + DL_LIBS="-ldld" + LDFLAGS="" + LD_SEARCH_FLAGS=""]) + fi + if test "`uname -m`" = "alpha" ; then + EXTRA_CFLAGS="-mieee" + fi + ;; + MP-RAS-02*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD="cc -G" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="" + LD_SEARCH_FLAGS="" + ;; + MP-RAS-*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD="cc -G" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="-Wl,-Bexport" + LD_SEARCH_FLAGS="" + ;; + NetBSD-*|FreeBSD-[[12]].*|OpenBSD-*) + # Not available on all versions: check for include file. + AC_CHECK_HEADER(dlfcn.h, [ + SHLIB_CFLAGS="-fpic" + SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS="" + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' + ], [ + SHLIB_CFLAGS="" + SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".a" + DL_OBJS="tclLoadAout.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' + ]) + + # FreeBSD doesn't handle version numbers with dots. + + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + FreeBSD-*) + # FreeBSD 3.* and greater have ELF. + SHLIB_CFLAGS="-fpic" + SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS="" + ;; + Rhapsody-*|Darwin-*) + SHLIB_CFLAGS="-fno-common" + SHLIB_LD="cc -dynamiclib \${LDFLAGS} -compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE}" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".dylib" + DL_OBJS="tclLoadDyld.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS="" + CFLAGS_OPTIMIZE="-O3" + ;; + NEXTSTEP-*) + SHLIB_CFLAGS="" + SHLIB_LD="cc -nostdlib -r" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadNext.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS="" + ;; + OS/390-*) + CFLAGS_OPTIMIZE="" # Optimizer is buggy + AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h + ;; + OSF1-1.0|OSF1-1.1|OSF1-1.2) + # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 + SHLIB_CFLAGS="" + # Hack: make package name same as library name + SHLIB_LD='ld -R -export $@:' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadOSF.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS="" + ;; + OSF1-1.*) + # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 + SHLIB_CFLAGS="-fpic" + SHLIB_LD="ld -shared" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS="" + ;; + OSF1-V*) + # Digital OSF/1 + SHLIB_CFLAGS="" + SHLIB_LD='ld -shared -expect_unresolved "*"' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + ;; + RISCos-*) + SHLIB_CFLAGS="-G 0" + SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".a" + DL_OBJS="tclLoadAout.o" + DL_LIBS="" + LDFLAGS="-Wl,-D,08000000" + LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + ;; + SCO_SV-3.2*) + # Note, dlopen is available only on SCO 3.2.5 and greater. However, + # this test works, since "uname -s" was non-standard in 3.2.4 and + # below. + SHLIB_CFLAGS="-Kpic -belf" + SHLIB_LD="ld -G" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="-belf -Wl,-Bexport" + LD_SEARCH_FLAGS="" + ;; + SINIX*5.4*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD="cc -G" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="" + LD_SEARCH_FLAGS="" + ;; + SunOS-4*) + SHLIB_CFLAGS="-PIC" + SHLIB_LD="ld" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="" + LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + + # SunOS can't handle version numbers with dots in them in library + # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it + # requires an extra version number at the end of .so file names. + # So, the library has to have a name like libtcl75.so.1.0 + + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + SunOS-5.[[0-6]]*) + SHLIB_CFLAGS="-KPIC" + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + + # Note: need the LIBS below, otherwise Tk won't find Tcl's + # symbols when dynamically loaded into tclsh. + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="" + LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + ;; + SunOS-5*) + SHLIB_CFLAGS="-KPIC" + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + LDFLAGS="" + + do64bit_ok=no + if test "$do64bit" = "yes" ; then + arch=`isainfo` + if test "$arch" = "sparcv9 sparc" ; then + if test "$CC" != "gcc" -a `$CC -v 2>&1 | grep -c gcc` = "0" ; then + do64bit_ok=yes + EXTRA_CFLAGS="-xarch=v9" + LDFLAGS="-xarch=v9" + else + AC_MSG_WARN("64bit mode not supported using GCC on $system") + fi + else + AC_MSG_WARN("64bit mode only supported sparcv9 system") + fi + fi + + # Note: need the LIBS below, otherwise Tk won't find Tcl's + # symbols when dynamically loaded into tclsh. + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then + LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + else + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + fi + ;; + ULTRIX-4.*) + SHLIB_CFLAGS="-G 0" + SHLIB_SUFFIX=".a" + SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" + SHLIB_LD_LIBS='${LIBS}' + DL_OBJS="tclLoadAout.o" + DL_LIBS="" + LDFLAGS="-Wl,-D,08000000" + LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + ;; + UNIX_SV* | UnixWare-5*) + SHLIB_CFLAGS="-KPIC" + SHLIB_LD="cc -G" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers + # that don't grok the -Bexport option. Test that it does. + hold_ldflags=$LDFLAGS + AC_MSG_CHECKING(for ld accepts -Bexport flag) + LDFLAGS="${LDFLAGS} -Wl,-Bexport" + AC_TRY_LINK(, [int i;], found=yes, found=no) + LDFLAGS=$hold_ldflags + AC_MSG_RESULT($found) + if test $found = yes; then + LDFLAGS="-Wl,-Bexport" + else + LDFLAGS="" + fi + LD_SEARCH_FLAGS="" + ;; + esac + + if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then + AC_MSG_WARN("64bit support being disabled -- not supported on this platform") + fi + + # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic + # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, + # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need + # to determine which of several header files defines the a.out file + # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we + # support only a file format that is more or less version-7-compatible. + # In particular, + # - a.out files must begin with `struct exec'. + # - the N_TXTOFF on the `struct exec' must compute the seek address + # of the text segment + # - The `struct exec' must contain a_magic, a_text, a_data, a_bss + # and a_entry fields. + # The following compilation should succeed if and only if either sys/exec.h + # or a.out.h is usable for the purpose. + # + # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the + # `struct exec' includes a second header that contains information that + # duplicates the v7 fields that are needed. + + if test "x$DL_OBJS" = "xtclLoadAout.o" ; then + AC_MSG_CHECKING(sys/exec.h) + AC_TRY_COMPILE([#include <sys/exec.h>],[ + struct exec foo; + unsigned long seek; + int flag; +#if defined(__mips) || defined(mips) + seek = N_TXTOFF (foo.ex_f, foo.ex_o); +#else + seek = N_TXTOFF (foo); +#endif + flag = (foo.a_magic == OMAGIC); + return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; + ], tcl_ok=usable, tcl_ok=unusable) + AC_MSG_RESULT($tcl_ok) + if test $tcl_ok = usable; then + AC_DEFINE(USE_SYS_EXEC_H) + else + AC_MSG_CHECKING(a.out.h) + AC_TRY_COMPILE([#include <a.out.h>],[ + struct exec foo; + unsigned long seek; + int flag; +#if defined(__mips) || defined(mips) + seek = N_TXTOFF (foo.ex_f, foo.ex_o); +#else + seek = N_TXTOFF (foo); +#endif + flag = (foo.a_magic == OMAGIC); + return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; + ], tcl_ok=usable, tcl_ok=unusable) + AC_MSG_RESULT($tcl_ok) + if test $tcl_ok = usable; then + AC_DEFINE(USE_A_OUT_H) + else + AC_MSG_CHECKING(sys/exec_aout.h) + AC_TRY_COMPILE([#include <sys/exec_aout.h>],[ + struct exec foo; + unsigned long seek; + int flag; +#if defined(__mips) || defined(mips) + seek = N_TXTOFF (foo.ex_f, foo.ex_o); +#else + seek = N_TXTOFF (foo); +#endif + flag = (foo.a_midmag == OMAGIC); + return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; + ], tcl_ok=usable, tcl_ok=unusable) + AC_MSG_RESULT($tcl_ok) + if test $tcl_ok = usable; then + AC_DEFINE(USE_SYS_EXEC_AOUT_H) + else + DL_OBJS="" + fi + fi + fi + fi + + # Step 5: disable dynamic loading if requested via a command-line switch. + + AC_ARG_ENABLE(load, [ --disable-load disallow dynamic loading and "load" command], + [tcl_ok=$enableval], [tcl_ok=yes]) + if test "$tcl_ok" = "no"; then + DL_OBJS="" + fi + + if test "x$DL_OBJS" != "x" ; then + BUILD_DLTEST="\$(DLTEST_TARGETS)" + else + echo "Can't figure out how to do dynamic loading or shared libraries" + echo "on this system." + SHLIB_CFLAGS="" + SHLIB_LD="" + SHLIB_SUFFIX="" + DL_OBJS="tclLoadNone.o" + DL_LIBS="" + LDFLAGS="" + LD_SEARCH_FLAGS="" + BUILD_DLTEST="" + fi + + # If we're running gcc, then change the C flags for compiling shared + # libraries to the right flags for gcc, instead of those for the + # standard manufacturer compiler. + + if test "$DL_OBJS" != "tclLoadNone.o" ; then + if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then + case $system in + AIX-*) + ;; + BSD/OS*) + ;; + IRIX*) + ;; + NetBSD-*|FreeBSD-*|OpenBSD-*) + ;; + Rhapsody-*|Darwin-*) + ;; + RISCos-*) + ;; + ULTRIX-4.*) + ;; + *) + SHLIB_CFLAGS="-fPIC" + ;; + esac + fi + fi + + if test "$SHARED_LIB_SUFFIX" = "" ; then + SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' + fi + if test "$UNSHARED_LIB_SUFFIX" = "" ; then + UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' + fi + + AC_SUBST(STLIB_LD) + AC_SUBST(SHLIB_LD) + AC_SUBST(SHLIB_CFLAGS) + AC_SUBST(SHLIB_LDFLAGS) + AC_SUBST(DL_LIBS) + AC_SUBST(CFLAGS_DEBUG) + AC_SUBST(CFLAGS_OPTIMIZE) + AC_SUBST(LDFLAGS_DEBUG) + AC_SUBST(LDFLAGS_OPTIMIZE) +]) + +#-------------------------------------------------------------------- +# SC_SERIAL_PORT +# +# Determine which interface to use to talk to the serial port. +# Note that #include lines must begin in leftmost column for +# some compilers to recognize them as preprocessor directives. +# +# Arguments: +# none +# +# Results: +# +# Defines only one of the following vars: +# USE_TERMIOS +# USE_TERMIO +# USE_SGTTY +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_SERIAL_PORT, [ + AC_MSG_CHECKING([termios vs. termio vs. sgtty]) + + AC_TRY_RUN([ +#include <termios.h> + +main() +{ + struct termios t; + if (tcgetattr(0, &t) == 0) { + cfsetospeed(&t, 0); + t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; +}], tk_ok=termios, tk_ok=no, tk_ok=no) + + if test $tk_ok = termios; then + AC_DEFINE(USE_TERMIOS) + else + AC_TRY_RUN([ +#include <termio.h> + +main() +{ + struct termio t; + if (ioctl(0, TCGETA, &t) == 0) { + t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; + }], tk_ok=termio, tk_ok=no, tk_ok=no) + + if test $tk_ok = termio; then + AC_DEFINE(USE_TERMIO) + else + AC_TRY_RUN([ +#include <sgtty.h> + +main() +{ + struct sgttyb t; + if (ioctl(0, TIOCGETP, &t) == 0) { + t.sg_ospeed = 0; + t.sg_flags |= ODDP | EVENP | RAW; + return 0; + } + return 1; +}], tk_ok=sgtty, tk_ok=none, tk_ok=none) + if test $tk_ok = sgtty; then + AC_DEFINE(USE_SGTTY) + fi + fi + fi + AC_MSG_RESULT($tk_ok) +]) + +#-------------------------------------------------------------------- +# SC_MISSING_POSIX_HEADERS +# +# Supply substitutes for missing POSIX header files. Special +# notes: +# - stdlib.h doesn't define strtol, strtoul, or +# strtod insome versions of SunOS +# - some versions of string.h don't declare procedures such +# as strstr +# +# Arguments: +# none +# +# Results: +# +# Defines some of the following vars: +# NO_DIRENT_H +# NO_ERRNO_H +# NO_VALUES_H +# NO_LIMITS_H +# NO_STDLIB_H +# NO_STRING_H +# NO_SYS_WAIT_H +# NO_DLFCN_H +# HAVE_UNISTD_H +# HAVE_SYS_PARAM_H +# +# HAVE_STRING_H ? +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_MISSING_POSIX_HEADERS, [ + + AC_MSG_CHECKING(dirent.h) + AC_TRY_LINK([#include <sys/types.h> +#include <dirent.h>], [ +#ifndef _POSIX_SOURCE +# ifdef __Lynx__ + /* + * Generate compilation error to make the test fail: Lynx headers + * are only valid if really in the POSIX environment. + */ + + missing_procedure(); +# endif +#endif +DIR *d; +struct dirent *entryPtr; +char *p; +d = opendir("foobar"); +entryPtr = readdir(d); +p = entryPtr->d_name; +closedir(d); +], tcl_ok=yes, tcl_ok=no) + + if test $tcl_ok = no; then + AC_DEFINE(NO_DIRENT_H) + fi + + AC_MSG_RESULT($tcl_ok) + AC_CHECK_HEADER(errno.h, , AC_DEFINE(NO_ERRNO_H)) + AC_CHECK_HEADER(float.h, , AC_DEFINE(NO_FLOAT_H)) + AC_CHECK_HEADER(values.h, , AC_DEFINE(NO_VALUES_H)) + AC_CHECK_HEADER(limits.h, , AC_DEFINE(NO_LIMITS_H)) + AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) + AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) + AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) + AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) + if test $tcl_ok = 0; then + AC_DEFINE(NO_STDLIB_H) + fi + AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) + AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) + AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) + + # See also memmove check below for a place where NO_STRING_H can be + # set and why. + + if test $tcl_ok = 0; then + AC_DEFINE(NO_STRING_H) + fi + + AC_CHECK_HEADER(sys/wait.h, , AC_DEFINE(NO_SYS_WAIT_H)) + AC_CHECK_HEADER(dlfcn.h, , AC_DEFINE(NO_DLFCN_H)) + + # OS/390 lacks sys/param.h (and doesn't need it, by chance). + + AC_HAVE_HEADERS(unistd.h sys/param.h) + +]) + +#-------------------------------------------------------------------- +# SC_PATH_X +# +# Locate the X11 header files and the X11 library archive. Try +# the ac_path_x macro first, but if it doesn't find the X stuff +# (e.g. because there's no xmkmf program) then check through +# a list of possible directories. Under some conditions the +# autoconf macro will return an include directory that contains +# no include files, so double-check its result just to be safe. +# +# Arguments: +# none +# +# Results: +# +# Sets the the following vars: +# XINCLUDES +# XLIBSW +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_PATH_X, [ + AC_PATH_X + not_really_there="" + if test "$no_x" = ""; then + if test "$x_includes" = ""; then + AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes") + else + if test ! -r $x_includes/X11/Intrinsic.h; then + not_really_there="yes" + fi + fi + fi + if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then + AC_MSG_CHECKING(for X11 header files) + XINCLUDES="# no special path needed" + AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope") + if test "$XINCLUDES" = nope; then + dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" + for i in $dirs ; do + if test -r $i/X11/Intrinsic.h; then + AC_MSG_RESULT($i) + XINCLUDES=" -I$i" + break + fi + done + fi + else + if test "$x_includes" != ""; then + XINCLUDES=-I$x_includes + else + XINCLUDES="# no special path needed" + fi + fi + if test "$XINCLUDES" = nope; then + AC_MSG_RESULT(couldn't find any!) + XINCLUDES="# no include files found" + fi + + if test "$no_x" = yes; then + AC_MSG_CHECKING(for X11 libraries) + XLIBSW=nope + dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" + for i in $dirs ; do + if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then + AC_MSG_RESULT($i) + XLIBSW="-L$i -lX11" + x_libraries="$i" + break + fi + done + else + if test "$x_libraries" = ""; then + XLIBSW=-lX11 + else + XLIBSW="-L$x_libraries -lX11" + fi + fi + if test "$XLIBSW" = nope ; then + AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) + fi + if test "$XLIBSW" = nope ; then + AC_MSG_RESULT(couldn't find any! Using -lX11.) + XLIBSW=-lX11 + fi +]) +#-------------------------------------------------------------------- +# SC_BLOCKING_STYLE +# +# The statements below check for systems where POSIX-style +# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. +# On these systems (mostly older ones), use the old BSD-style +# FIONBIO approach instead. +# +# Arguments: +# none +# +# Results: +# +# Defines some of the following vars: +# HAVE_SYS_IOCTL_H +# HAVE_SYS_FILIO_H +# USE_FIONBIO +# O_NONBLOCK +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_BLOCKING_STYLE, [ + AC_CHECK_HEADERS(sys/ioctl.h) + AC_CHECK_HEADERS(sys/filio.h) + AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) + if test -f /usr/lib/NextStep/software_version; then + system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` + else + system=`uname -s`-`uname -r` + if test "$?" -ne 0 ; then + system=unknown + else + # Special check for weird MP-RAS system (uname returns weird + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then + system=MP-RAS-`awk '{print $3}' /etc/.relid'` + fi + if test "`uname -s`" = "AIX" ; then + system=AIX-`uname -v`.`uname -r` + fi + fi + fi + case $system in + # There used to be code here to use FIONBIO under AIX. However, it + # was reported that FIONBIO doesn't work under AIX 3.2.5. Since + # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO + # code (JO, 5/31/97). + + OSF*) + AC_DEFINE(USE_FIONBIO) + AC_MSG_RESULT(FIONBIO) + ;; + SunOS-4*) + AC_DEFINE(USE_FIONBIO) + AC_MSG_RESULT(FIONBIO) + ;; + ULTRIX-4.*) + AC_DEFINE(USE_FIONBIO) + AC_MSG_RESULT(FIONBIO) + ;; + *) + AC_MSG_RESULT(O_NONBLOCK) + ;; + esac +]) + +#-------------------------------------------------------------------- +# SC_HAVE_VFORK +# +# Check to see whether the system provides a vfork kernel call. +# If not, then use fork instead. Also, check for a problem with +# vforks and signals that can cause core dumps if a vforked child +# resets a signal handler. If the problem exists, then use fork +# instead of vfork. +# +# Arguments: +# none +# +# Results: +# +# Defines some of the following vars: +# vfork (=fork) +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_HAVE_VFORK, [ + AC_TYPE_SIGNAL() + AC_CHECK_FUNC(vfork, tcl_ok=1, tcl_ok=0) + if test "$tcl_ok" = 1; then + AC_MSG_CHECKING([vfork/signal bug]); + AC_TRY_RUN([ +#include <stdio.h> +#include <signal.h> +#include <sys/wait.h> +int gotSignal = 0; +sigProc(sig) + int sig; +{ + gotSignal = 1; +} +main() +{ + int pid, sts; + (void) signal(SIGCHLD, sigProc); + pid = vfork(); + if (pid < 0) { + exit(1); + } else if (pid == 0) { + (void) signal(SIGCHLD, SIG_DFL); + _exit(0); + } else { + (void) wait(&sts); + } + exit((gotSignal) ? 0 : 1); +}], tcl_ok=1, tcl_ok=0, tcl_ok=0) + + if test "$tcl_ok" = 1; then + AC_MSG_RESULT(ok) + else + AC_MSG_RESULT([buggy, using fork instead]) + fi + fi + rm -f core + if test "$tcl_ok" = 0; then + AC_DEFINE(vfork, fork) + fi +]) + +#-------------------------------------------------------------------- +# SC_TIME_HANLDER +# +# Checks how the system deals with time.h, what time structures +# are used on the system, and what fields the structures have. +# +# Arguments: +# none +# +# Results: +# +# Defines some of the following vars: +# USE_DELTA_FOR_TZ +# HAVE_TM_GMTOFF +# HAVE_TM_TZADJ +# HAVE_TIMEZONE_VAR +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_TIME_HANDLER, [ + AC_CHECK_HEADERS(sys/time.h) + AC_HEADER_TIME + AC_STRUCT_TIMEZONE + + AC_MSG_CHECKING([tm_tzadj in struct tm]) + AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;], + [AC_DEFINE(HAVE_TM_TZADJ) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) + + AC_MSG_CHECKING([tm_gmtoff in struct tm]) + AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;], + [AC_DEFINE(HAVE_TM_GMTOFF) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) + + # + # Its important to include time.h in this check, as some systems + # (like convex) have timezone functions, etc. + # + have_timezone=no + AC_MSG_CHECKING([long timezone variable]) + AC_TRY_COMPILE([#include <time.h>], + [extern long timezone; + timezone += 1; + exit (0);], + [have_timezone=yes + AC_DEFINE(HAVE_TIMEZONE_VAR) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) + + # + # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. + # + if test "$have_timezone" = no; then + AC_MSG_CHECKING([time_t timezone variable]) + AC_TRY_COMPILE([#include <time.h>], + [extern time_t timezone; + timezone += 1; + exit (0);], + [AC_DEFINE(HAVE_TIMEZONE_VAR) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) + fi + + # + # AIX does not have a timezone field in struct tm. When the AIX bsd + # library is used, the timezone global and the gettimeofday methods are + # to be avoided for timezone deduction instead, we deduce the timezone + # by comparing the localtime result on a known GMT value. + # + + if test "`uname -s`" = "AIX" ; then + AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes) + if test $libbsd = yes; then + AC_DEFINE(USE_DELTA_FOR_TZ) + fi + fi +]) + +#-------------------------------------------------------------------- +# SC_BUGGY_STRTOD +# +# Under Solaris 2.4, strtod returns the wrong value for the +# terminating character under some conditions. Check for this +# and if the problem exists use a substitute procedure +# "fixstrtod" (provided by Tcl) that corrects the error. +# +# Arguments: +# none +# +# Results: +# +# Might defines some of the following vars: +# strtod (=fixstrtod) +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_BUGGY_STRTOD, [ + AC_CHECK_FUNC(strtod, tk_strtod=1, tk_strtod=0) + if test "$tk_strtod" = 1; then + AC_MSG_CHECKING([for Solaris 2.4 strtod bug]) + AC_TRY_RUN([ + extern double strtod(); + int main() + { + char *string = "NaN"; + char *term; + strtod(string, &term); + if ((term != string) && (term[-1] == 0)) { + exit(1); + } + exit(0); + }], tk_ok=1, tk_ok=0, tk_ok=0) + if test "$tk_ok" = 1; then + AC_MSG_RESULT(ok) + else + AC_MSG_RESULT(buggy) + AC_DEFINE(strtod, fixstrtod) + fi + fi +]) + +#-------------------------------------------------------------------- +# SC_TCL_LINK_LIBS +# +# Search for the libraries needed to link the Tcl shell. +# Things like the math library (-lm) and socket stuff (-lsocket vs. +# -lnsl) are dealt with here. +# +# Arguments: +# Requires the following vars to be set in the Makefile: +# DL_LIBS +# LIBS +# MATH_LIBS +# +# Results: +# +# Subst's the following var: +# TCL_LIBS +# MATH_LIBS +# +# Might append to the following vars: +# LIBS +# +# Might define the following vars: +# HAVE_NET_ERRNO_H +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_TCL_LINK_LIBS, [ + #-------------------------------------------------------------------- + # On a few very rare systems, all of the libm.a stuff is + # already in libc.a. Set compiler flags accordingly. + # Also, Linux requires the "ieee" library for math to work + # right (and it must appear before "-lm"). + #-------------------------------------------------------------------- + + AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") + AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) + + #-------------------------------------------------------------------- + # On AIX systems, libbsd.a has to be linked in to support + # non-blocking file IO. This library has to be linked in after + # the MATH_LIBS or it breaks the pow() function. The way to + # insure proper sequencing, is to add it to the tail of MATH_LIBS. + # This library also supplies gettimeofday. + #-------------------------------------------------------------------- + + libbsd=no + if test "`uname -s`" = "AIX" ; then + AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes) + if test $libbsd = yes; then + MATH_LIBS="$MATH_LIBS -lbsd" + fi + fi + + + #-------------------------------------------------------------------- + # Interactive UNIX requires -linet instead of -lsocket, plus it + # needs net/errno.h to define the socket-related error codes. + #-------------------------------------------------------------------- + + AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) + AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H)) + + #-------------------------------------------------------------------- + # Check for the existence of the -lsocket and -lnsl libraries. + # The order here is important, so that they end up in the right + # order in the command line generated by make. Here are some + # special considerations: + # 1. Use "connect" and "accept" to check for -lsocket, and + # "gethostbyname" to check for -lnsl. + # 2. Use each function name only once: can't redo a check because + # autoconf caches the results of the last check and won't redo it. + # 3. Use -lnsl and -lsocket only if they supply procedures that + # aren't already present in the normal libraries. This is because + # IRIX 5.2 has libraries, but they aren't needed and they're + # bogus: they goof up name resolution if used. + # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. + # To get around this problem, check for both libraries together + # if -lsocket doesn't work by itself. + #-------------------------------------------------------------------- + + tcl_checkBoth=0 + AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) + if test "$tcl_checkSocket" = 1; then + AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", tcl_checkBoth=1) + fi + if test "$tcl_checkBoth" = 1; then + tk_oldLibs=$LIBS + LIBS="$LIBS -lsocket -lnsl" + AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) + fi + AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, + [LIBS="$LIBS -lnsl"])) + + # Don't perform the eval of the libraries here because DL_LIBS + # won't be set until we call SC_CONFIG_CFLAGS + + TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' + AC_SUBST(TCL_LIBS) + AC_SUBST(MATH_LIBS) +]) + #------------------------------------------------------------------------ # SC_MAKE_LIB -- # @@ -479,20 +1804,15 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [ #------------------------------------------------------------------------ AC_DEFUN(SC_MAKE_LIB, [ - case "${host}" in - *mingw32* | *windows32*) - if test "${CC}" = "cl"; then + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) + if test "${CC-cc}" = "cl"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$]@_OBJECTS) " MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$]@_OBJECTS) " - else - MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$]@_OBJECTS) " - POST_MAKE_STATIC_LIB="\${RANLIB} \[$]@" - MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$]@_OBJECTS) \${SHLIB_LDFLAGS} \$(LDFLAGS) \${SHLIB_LD_LIBS} -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)" fi ;; *) MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$]@_OBJECTS)" - POST_MAKE_STATIC_LIB="\${RANLIB} \[$]@" MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$]@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" ;; esac @@ -501,14 +1821,92 @@ AC_DEFUN(SC_MAKE_LIB, [ MAKE_LIB=${MAKE_SHARED_LIB} else MAKE_LIB=${MAKE_STATIC_LIB} - POST_MAKE_LIB=${POST_MAKE_STATIC_LIB} fi AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_SHARED_LIB) AC_SUBST(MAKE_STATIC_LIB) - AC_SUBST(POST_MAKE_LIB) - AC_SUBST(POST_MAKE_STATIC_LIB) +]) + +#------------------------------------------------------------------------ +# SC_LIB_SPEC -- +# +# Compute the name of an existing object library located in libdir +# from the given base name and produce the appropriate linker flags. +# +# Arguments: +# basename The base name of the library without version +# numbers, extensions, or "lib" prefixes. +# extra_dir Extra directory in which to search for the +# library. This location is used first, then +# $prefix/$exec-prefix, then some defaults. +# +# Requires: +# CYGPATH command used to generate native style paths +# +# Results: +# +# Defines the following vars: +# ${basename}_LIB_NAME The computed library name. +# ${basename}_LIB_SPEC The computed linker flags. +#------------------------------------------------------------------------ + +AC_DEFUN(SC_LIB_SPEC, [ + AC_MSG_CHECKING(for $1 library) + + # Look in exec-prefix and prefix for the library. If neither of + # these were specified, look in libdir. It doesn't matter if libdir + # wasn't specified since a search in the unspecified directory will + # fail (NONE/lib) + + if test x"${exec_prefix}" != x"NONE" ; then + sc_lib_name_dir="${exec_prefix}/lib" + elif test x"${prefix}" != "NONE" ; then + sc_lib_name_dir="${prefix}/lib" + else + eval "sc_lib_name_dir=${libdir}" + fi + + if test x"$2" != x ; then + sc_extra_lib_dir=$2 + else + sc_extra_lib_dir=NONE + fi + + for i in \ + `ls -dr ${sc_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ + `ls -dr ${sc_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ + `ls -dr ${sc_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ + `ls -dr ${sc_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ + `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ + `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ + `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \ + `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do + if test -f "$i" ; then + + sc_lib_name_dir=`dirname $i` + $1_LIB_NAME=`basename $i` + $1_LIB_PATH_NAME=$i + break + fi + done + + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) + $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME}`\" + ;; + *) + # Strip off the leading "lib" and trailing ".a" or ".so" + + sc_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//'` + $1_LIB_SPEC="-L${sc_lib_name_dir} -l${sc_lib_name_lib}" + ;; + esac + if test "x$1_LIB_NAME" = x ; then + AC_MSG_ERROR(not found) + else + AC_MSG_RESULT(${$1_LIB_SPEC}) + fi ]) #------------------------------------------------------------------------ @@ -539,8 +1937,8 @@ AC_DEFUN(SC_MAKE_LIB, [ AC_DEFUN(SC_PRIVATE_TCL_HEADERS, [ AC_MSG_CHECKING(for Tcl private include files) - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\" TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\" TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\" @@ -576,6 +1974,76 @@ AC_DEFUN(SC_PRIVATE_TCL_HEADERS, [ ]) #------------------------------------------------------------------------ +# SC_PUBLIC_TCL_HEADERS -- +# +# Locate the installed public Tcl header files +# +# Arguments: +# None. +# +# Requires: +# CYGPATH must be set +# +# Results: +# +# Adds a --with-tclinclude switch to configure. +# Result is cached. +# +# Substs the following vars: +# TCL_INCLUDES +#------------------------------------------------------------------------ + +AC_DEFUN(SC_PUBLIC_TCL_HEADERS, [ + AC_MSG_CHECKING(for Tcl public headers) + + AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files.], with_tclinclude=${withval}) + + if test x"${with_tclinclude}" != x ; then + if test -f "${with_tclinclude}/tcl.h" ; then + ac_cv_c_tclh=${with_tclinclude} + else + AC_MSG_ERROR([${with_tclinclude} directory does not contain Tcl public header file tcl.h]) + fi + else + AC_CACHE_VAL(ac_cv_c_tclh, [ + # Use the value from --with-tclinclude, if it was given + + if test x"${with_tclinclude}" != x ; then + ac_cv_c_tclh=${with_tclinclude} + else + # Check in the includedir, if --prefix was specified + + eval "temp_includedir=${includedir}" + for i in \ + `ls -d ${temp_includedir} 2>/dev/null` \ + /usr/local/include /usr/include ; do + if test -f "$i/tcl.h" ; then + ac_cv_c_tclh=$i + break + fi + done + fi + ]) + fi + + # Print a message based on how we determined the include path + + if test x"${ac_cv_c_tclh}" = x ; then + AC_MSG_ERROR(tcl.h not found. Please specify its location with --with-tclinclude) + else + AC_MSG_RESULT(${ac_cv_c_tclh}) + fi + + # Convert to a native path and substitute into the output files. + + INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` + + TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + + AC_SUBST(TCL_INCLUDES) +]) + +#------------------------------------------------------------------------ # SC_PRIVATE_TK_HEADERS -- # # Locate the private Tk include files @@ -595,8 +2063,8 @@ AC_DEFUN(SC_PRIVATE_TCL_HEADERS, [ AC_DEFUN(SC_PRIVATE_TK_HEADERS, [ AC_MSG_CHECKING(for Tk private include files) - case "${host}" in - *mingw32* | *windows32*) + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\" TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\" TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\" @@ -624,3 +2092,192 @@ AC_DEFUN(SC_PRIVATE_TK_HEADERS, [ AC_SUBST(TK_INCLUDES) AC_MSG_RESULT(Using srcdir found in tkConfig.sh) ]) + +#------------------------------------------------------------------------ +# SC_PUBLIC_TK_HEADERS -- +# +# Locate the installed public Tk header files +# +# Arguments: +# None. +# +# Requires: +# CYGPATH must be set +# +# Results: +# +# Adds a --with-tkinclude switch to configure. +# Result is cached. +# +# Substs the following vars: +# TK_INCLUDES +#------------------------------------------------------------------------ + +AC_DEFUN(SC_PUBLIC_TK_HEADERS, [ + AC_MSG_CHECKING(for Tk public headers) + + AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval}) + + if test x"${with_tkinclude}" != x ; then + if test -f "${with_tkinclude}/tk.h" ; then + ac_cv_c_tkh=${with_tkinclude} + else + AC_MSG_ERROR([${with_tkinclude} directory does not contain Tk public header file tk.h]) + fi + else + AC_CACHE_VAL(ac_cv_c_tkh, [ + # Use the value from --with-tkinclude, if it was given + + if test x"${with_tkinclude}" != x ; then + ac_cv_c_tkh=${with_tkinclude} + else + # Check in the includedir, if --prefix was specified + + eval "temp_includedir=${includedir}" + for i in \ + `ls -d ${temp_includedir} 2>/dev/null` \ + /usr/local/include /usr/include ; do + if test -f "$i/tk.h" ; then + ac_cv_c_tkh=$i + break + fi + done + fi + ]) + fi + + # Print a message based on how we determined the include path + + if test x"${ac_cv_c_tkh}" = x ; then + AC_MSG_ERROR(tk.h not found. Please specify its location with --with-tkinclude) + else + AC_MSG_RESULT(${ac_cv_c_tkh}) + fi + + # Convert to a native path and substitute into the output files. + + INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` + + TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + + AC_SUBST(TK_INCLUDES) +]) + +#------------------------------------------------------------------------ +# SC_SIMPLE_EXEEXT +# Select the executable extension based on the host type. This +# is a lightweight replacement for AC_EXEEXT that doesn't require +# a compiler. +# +# Arguments +# none +# +# Results +# Subst's the following values: +# EXEEXT +#------------------------------------------------------------------------ + +AC_DEFUN(SC_SIMPLE_EXEEXT, [ + AC_MSG_CHECKING(executable extension based on host type) + + case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) + EXEEXT=".exe" + ;; + *) + EXEEXT="" + ;; + esac + + AC_MSG_RESULT(${EXEEXT}) + AC_SUBST(EXEEXT) +]) + +#------------------------------------------------------------------------ +# SC_PROG_TCLSH +# Locate a tclsh shell in the following directories: +# ${exec_prefix}/bin +# ${prefix}/bin +# ${TCL_BIN_DIR} +# ${TCL_BIN_DIR}/../bin +# ${PATH} +# +# Arguments +# none +# +# Results +# Subst's the following values: +# TCLSH_PROG +#------------------------------------------------------------------------ + +AC_DEFUN(SC_PROG_TCLSH, [ + AC_MSG_CHECKING([for tclsh]) + + AC_CACHE_VAL(ac_cv_path_tclsh, [ + search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` + for dir in $search_path ; do + for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \ + `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do + if test x"$ac_cv_path_tclsh" = x ; then + if test -f "$j" ; then + ac_cv_path_tclsh=$j + break + fi + fi + done + done + ]) + + if test -f "$ac_cv_path_tclsh" ; then + TCLSH_PROG=$ac_cv_path_tclsh + AC_MSG_RESULT($TCLSH_PROG) + else + AC_MSG_ERROR(No tclsh found in PATH: $search_path) + fi + AC_SUBST(TCLSH_PROG) +]) + +#------------------------------------------------------------------------ +# SC_PROG_WISH +# Locate a wish shell in the following directories: +# ${exec_prefix}/bin +# ${prefix}/bin +# ${TCL_BIN_DIR} +# ${TCL_BIN_DIR}/../bin +# ${PATH} +# +# Arguments +# none +# +# Results +# Subst's the following values: +# WISH_PROG +#------------------------------------------------------------------------ + +AC_DEFUN(SC_PROG_WISH, [ + AC_MSG_CHECKING([for wish]) + + AC_CACHE_VAL(ac_cv_path_wish, [ + search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` + for dir in $search_path ; do + for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \ + `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do + if test x"$ac_cv_path_wish" = x ; then + if test -f "$j" ; then + ac_cv_path_wish=$j + break + fi + fi + done + done + ]) + + if test -f "$ac_cv_path_wish" ; then + WISH_PROG=$ac_cv_path_wish + AC_MSG_RESULT($WISH_PROG) + else + AC_MSG_ERROR(No wish found in PATH: $search_path) + fi + AC_SUBST(WISH_PROG) +]) + |